[REF] Share link is now a button, not a clickable image anymore

bzr revid: tde@openerp.com-20120327101453-epjtcr4etwu52js2
This commit is contained in:
Thibault Delavallée 2012-03-27 12:14:53 +02:00
parent c7e1656c11
commit a945ee82c9
3 changed files with 7 additions and 5 deletions

View File

@ -1 +1,3 @@
button.oe-share-mail {
width: 120px;
}

View File

@ -1,7 +1,7 @@
openerp.share = function(session) {
function launch_wizard(self, view, user_type, subscribe) {
function launch_wizard(self, view, user_type, invite) {
var action = view.getParent().action;
var Share = new session.web.DataSet(self, 'share.wizard', view.dataset.get_context());
var domain = new session.web.CompoundDomain(view.dataset.domain);
@ -18,7 +18,7 @@ function launch_wizard(self, view, user_type, subscribe) {
action_id: action.id,
user_type: user_type || 'embedded',
view_type: view.fields_view.type,
subscribe: subscribe || false,
invite: invite || false,
}, function(result) {
var share_id = result.result;
var step1 = Share.call('go_step_1', [[share_id],], function(result) {
@ -69,7 +69,7 @@ session.web.ViewManagerAction.include({
has_share(function() {
self.$element.find('a.oe-share_link').click(self.on_click_share_link);
self.$element.find('a.oe-share').click(self.on_click_share);
self.$element.delegate('a.oe-share-mail', 'click', self.on_click_share_mail);
self.$element.delegate('button.oe-share-mail', 'click', self.on_click_share_mail);
}, function() {
self.$element.find('a.oe-share_link').remove();
self.$element.find('a.oe-share').remove();

View File

@ -12,7 +12,7 @@
<t t-extend="RecordThread">
<t t-jquery=".oe_mail_button_follow" t-operation="before">
<a class="oe-share-mail" href="#share" title="Share with..."><img t-att-src='_s + "/share/static/src/img/share.png"'/></a>
<button type="button" class="oe-share-mail">Invite</button>
</t>
</t>