Vaibhav (OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-bug-909390-vda into
lp:openobject-addons.
Requested reviews:
Xavier (Open ERP) (xmo)
Related bugs:
Bug #909390 in OpenERP Web: "trunk : Improve share wizard"
https://bugs.launchpad.net/openerp-web/+bug/909390
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-909390-vda/+merge/90844
User cannot toggle shared actions.
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-909390-vda/+merge/90844
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-bug-909390-vda.
=== modified file 'share/static/src/css/share.css'
--- share/static/src/css/share.css 2011-12-19 16:54:40 +0000
+++ share/static/src/css/share.css 2012-01-31 10:24:28 +0000
@@ -1,1 +1,11 @@
-
+a.oe-share,
+a.oe-share_link {
+ height: 20px;
+ margin-top:8px;
+ padding: 0;
+ width: 24px;
+ cursor: pointer;
+ display: block;
+ background: url(/share/static/src/img/share.png) no-repeat center center;
+ float: left;
+}
=== modified file 'share/static/src/js/share.js'
--- share/static/src/js/share.js 2011-12-27 20:36:18 +0000
+++ share/static/src/js/share.js 2012-01-31 10:24:28 +0000
@@ -74,6 +74,18 @@
});
return this._super.apply(this, arguments);
},
+ shortcut_check: function() {
+ var self = this;
+ this._super.apply(this, arguments);
+ (new session.web.DataSetSearch(
+ self, 'res.users', self.session.context,
+ [['id','=', self.session.uid]]
+ )).read_slice(['share']).then(function(user) {
+ if (user && user[0].share) {
+ self.$element.find('.oe-shortcut-toggle').hide();
+ }
+ });
+ },
on_click_share_link: function(e) {
e.preventDefault();
launch_wizard(this, this.views[this.active_view].controller);
=== modified file 'share/static/src/xml/share.xml'
--- share/static/src/xml/share.xml 2011-12-23 16:24:21 +0000
+++ share/static/src/xml/share.xml 2012-01-31 10:24:28 +0000
@@ -4,9 +4,9 @@
<templates id="template" xml:space="preserve">
<t t-extend="ViewManagerAction">
- <t t-jquery=".oe-shortcut-toggle" t-operation="after">
- <a class="oe-share_link" href="#share_link" title="Link or embed..."><img t-att-src='_s + "/share/static/src/img/share.png"'/></a>
- <a class="oe-share" href="#share" title="Share with..."><img t-att-src='_s + "/share/static/src/img/share.png"'/></a>
+ <t t-jquery=".oe-view-manager-header" t-operation="append">
+ <a t-if="self.flags.display_title !== false" class="oe-share_link" href="#share_link" title="Link or embed..."></a>
+ <a t-if="self.flags.display_title !== false" class="oe-share" href="#share" title="Share with..."></a>
</t>
</t>
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp