Skip to content

Commit

Permalink
[IMP] help_popup: Better look and feel for button.
Browse files Browse the repository at this point in the history
[FIX] Cleanup js, no necesary console and better jquery selector.
  • Loading branch information
nhomar committed Jan 23, 2016
1 parent faf4f58 commit 2aa17a4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
4 changes: 1 addition & 3 deletions help_popup/static/src/js/popup_help.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@ openerp.help_popup = function(instance, local) {
do_create_view: function(view_type) {
var self = this;
var res = self._super(view_type);
self.$el.find('span.view_help').each(function () {
self.$el.find('.view_help').each(function () {
var $elem = $(this);
if ($elem.data('click-init')) {
return true;
}
$elem.data('click-init', true);
//alert('ee' + self.action)
console.log(self.action.id)
if (self.action.id == undefined || (self.action.advanced_help == '' && self.action.enduser_help == '')) {
self.$el.find('span.view_help').hide()
}
Expand Down
12 changes: 9 additions & 3 deletions help_popup/static/src/xml/popup_help.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates>
<t t-name="ViewManagerAction" t-extend="ViewManagerAction">
<t t-jquery="h2.oe_view_title" t-operation="before">
<span> &amp;nbsp; </span><span class="oe_button oe_highlight view_help">?</span>
<t t-name="ViewManagerAction" t-extend="ViewManager">
<t t-jquery="ul.oe_view_manager_switch" t-operation="after">
<ul class="oe_view_manager_switch oe_button_group oe_right">
<li class="oe_e">
<a class="view_help">
b
</a>
</li>
</ul>
</t>
</t>
</templates>

0 comments on commit 2aa17a4

Please sign in to comment.