[FIX] website_forum: various fixes and usability improvements
- question title is now a link - fixed a crash when trying to see badges in the 'new badge' notification - improved the tags manager: manage tag at blur event (otherwise the last tag was ften not created) + manage already-existing tags bzr revid: tde@openerp.com-20140423142034-5si58h4jgd1jyyem
This commit is contained in:
parent
f53ecc076a
commit
252be1b9ab
|
@ -129,11 +129,16 @@ $(document).ready(function () {
|
||||||
cacheResults: true
|
cacheResults: true
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// Note: Adding event handler of whitespaceKeyDown event.
|
// Adds: create tags on space + blur
|
||||||
$("input.load_tags").bind("whitespaceKeyDown",function () {
|
$("input.load_tags").on('whitespaceKeyDown blur', function () {
|
||||||
$(this).textext()[0].tags().addTags([ $(this).val() ]);
|
$(this).textext()[0].tags().addTags([ $(this).val() ]);
|
||||||
$(this).val("");
|
$(this).val("");
|
||||||
});
|
});
|
||||||
|
$("input.load_tags").on('isTagAllowed', function(e, data) {
|
||||||
|
if (_.indexOf($(this).textext()[0].tags()._formData, data.tag) != -1) {
|
||||||
|
data.result = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($('textarea.load_editor').length) {
|
if ($('textarea.load_editor').length) {
|
||||||
|
|
|
@ -80,7 +80,7 @@
|
||||||
<div t-foreach="notifications or []" t-as="notification" class="alert alert-success alert-dismissable">
|
<div t-foreach="notifications or []" t-as="notification" class="alert alert-success alert-dismissable">
|
||||||
<button type="button" class="close notification_close" t-att-id="notification.id" data-dismiss="alert" aria-hidden="true">&times;</button>
|
<button type="button" class="close notification_close" t-att-id="notification.id" data-dismiss="alert" aria-hidden="true">&times;</button>
|
||||||
<div t-field="notification.body"/>
|
<div t-field="notification.body"/>
|
||||||
<a t-attf-href="/forum/#{ slug(forum) }/user/#{ slug(user) }#badges" class="fa fa-arrow-right">View Your Badges</a>
|
<a t-attf-href="/forum/#{ slug(forum) }/user/#{ user.id }#badges" class="fa fa-arrow-right">View Your Badges</a>
|
||||||
</div>
|
</div>
|
||||||
<t t-raw="0"/>
|
<t t-raw="0"/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -414,7 +414,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-left: 95px;">
|
<div style="margin-left: 95px;">
|
||||||
<h1 class="mt0">
|
<h1 class="mt0">
|
||||||
<span t-field="question.name"/>
|
<a t-attf-href="/forum/#{ slug(forum) }/question/#{ slug(question) }" t-field="question.name"/>
|
||||||
<span t-if="not question.active"><b> [Deleted]</b></span>
|
<span t-if="not question.active"><b> [Deleted]</b></span>
|
||||||
<span t-if="question.state == 'close'"><b> [Closed]</b></span>
|
<span t-if="question.state == 'close'"><b> [Closed]</b></span>
|
||||||
</h1>
|
</h1>
|
||||||
|
|
Loading…
Reference in New Issue