diff options
| author | Fabien Meghazi <fme@openerp.com> | 2011-11-30 14:11:54 +0100 |
|---|---|---|
| committer | Fabien Meghazi <fme@openerp.com> | 2011-11-30 14:11:54 +0100 |
| commit | b552ff1991575bf167e2fe889521aa9268ecd7fc (patch) | |
| tree | 386e4dfb2fd5b84185e856710cf3f38cbf0570b4 /addons/web/static/src | |
| parent | 4ceed8ea6be3c2c4a8707f0f66b75aa921921269 (diff) | |
[IMP] Seperate menu tips from action view manager's content
bzr revid: fme@openerp.com-20111130131154-cu9hrcxyjvw15wnc
Diffstat (limited to 'addons/web/static/src')
| -rw-r--r-- | addons/web/static/src/js/views.js | 6 | ||||
| -rw-r--r-- | addons/web/static/src/xml/base.xml | 28 |
2 files changed, 21 insertions, 13 deletions
diff --git a/addons/web/static/src/js/views.js b/addons/web/static/src/js/views.js index 582a526e57a..b19cf7a7626 100644 --- a/addons/web/static/src/js/views.js +++ b/addons/web/static/src/js/views.js @@ -426,8 +426,8 @@ session.web.ViewManagerAction = session.web.ViewManager.extend(/** @lends oepner }); if (this.action.help && !this.flags.low_profile) { var Users = new session.web.DataSet(self, 'res.users'), - header = this.$element.find('.oe-view-manager-header'); - header.delegate('blockquote button', 'click', function() { + $tips = this.$element.find('.oe_view_manager_menu_tips'); + $tips.delegate('blockquote button', 'click', function() { var $this = $(this); //noinspection FallthroughInSwitchStatementJS switch ($this.attr('name')) { @@ -444,7 +444,7 @@ session.web.ViewManagerAction = session.web.ViewManager.extend(/** @lends oepner if (!(user && user.id === self.session.uid)) { return; } - header.find('blockquote').toggle(user.menu_tips); + $tips.find('blockquote').toggle(user.menu_tips); }); } } diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 23fa97ce7f5..754364c6c8d 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -418,6 +418,7 @@ </t> <t t-name="ViewManager"> <table class="view-manager-main-table"> + <tbody> <tr> <td class="view-manager-main-content"> <div class="oe-view-manager-header"> @@ -443,21 +444,28 @@ </t> </td> </tr> + </tbody> </table> </t> <t t-extend="ViewManager" t-name="ViewManagerAction"> + <t t-jquery=".view-manager-main-table tbody" t-operation="prepend"> + <tr> + <td class="oe_view_manager_menu_tips" colspan="2"> + <blockquote t-if="self.action.help and !self.flags.low_profile + and !(self.action.id in self.session.hidden_menutips)"> + <p><t t-esc="self.action.help"/></p> + <div> + <button type="button" name="hide">Hide this tip</button> + <button type="button" name="disable">Disable all tips</button> + </div> + </blockquote> + </td> + </tr> + </t> <t t-jquery=".oe-view-manager-header" t-operation="prepend"> - <blockquote t-if="self.action.help and !self.flags.low_profile - and !(self.action.id in self.session.hidden_menutips)"> - <p><t t-esc="self.action.help"/></p> - <div> - <button type="button" name="hide">Hide this tip</button> - <button type="button" name="disable">Disable all tips</button> - </div> - </blockquote> - <a class="oe-shortcut-toggle" title="Add / Remove Shortcut..." - href="javascript: void(0)"> </a> + <a class="oe-shortcut-toggle" title="Add / Remove Shortcut..." + href="javascript: void(0)"> </a> <button t-if="self.session.debug" class="oe_get_xml_view"> View#<span></span> </button> |
