Browse Source
Merge pull request #998 from hbrunn/10.0-web_shortcut-improvements
[web_shortcut] don't destroy debug mode; allow opening shortcut in new tab
pull/1029/head
Pedro M. Baeza
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
5 additions and
2 deletions
-
web_shortcut/static/src/js/web_shortcut.js
-
web_shortcut/static/src/xml/web_shortcut.xml
|
@ -26,7 +26,9 @@ odoo.define('web.shortcut', function (require) { |
|
|
var self = this; |
|
|
var self = this; |
|
|
this._super(); |
|
|
this._super(); |
|
|
this.trigger('load'); |
|
|
this.trigger('load'); |
|
|
this.$el.on('click', '.oe_systray_shortcut_menu a', function () { |
|
|
|
|
|
|
|
|
this.$el.on('click', '.oe_systray_shortcut_menu a', function (e) { |
|
|
|
|
|
e.preventDefault(); |
|
|
|
|
|
e.stopPropagation(); |
|
|
self.click($(this)); |
|
|
self.click($(this)); |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
@ -88,6 +90,7 @@ odoo.define('web.shortcut', function (require) { |
|
|
return item instanceof ShortcutMenu; |
|
|
return item instanceof ShortcutMenu; |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
return this._super.apply(this, arguments); |
|
|
}, |
|
|
}, |
|
|
show_application: function () { |
|
|
show_application: function () { |
|
|
var self = this; |
|
|
var self = this; |
|
|
|
@ -10,7 +10,7 @@ |
|
|
</t> |
|
|
</t> |
|
|
<t t-name="Systray.ShortcutMenu.Item"> |
|
|
<t t-name="Systray.ShortcutMenu.Item"> |
|
|
<li> |
|
|
<li> |
|
|
<a href="#" t-att-data-id="shortcut.menu_id[0]" t-att-data-shortcut-id="shortcut.id"> |
|
|
|
|
|
|
|
|
<a t-attf-href="/web#menu_id={{shortcut.menu_id[0]}}" t-att-data-id="shortcut.menu_id[0]" t-att-data-shortcut-id="shortcut.id"> |
|
|
<t t-esc="shortcut.name"/> |
|
|
<t t-esc="shortcut.name"/> |
|
|
</a> |
|
|
</a> |
|
|
</li> |
|
|
</li> |
|
|