var self = this;
var ids = this.get_selected_ids();
if (ids.length === 0) {
- instance.web.dialog($("<div />").text(_t("You must choose at least one record.")), {
+ new instance.web.Dialog(this, {
title: _t("Warning"),
- modal: true
- });
+ modal_size: 'medium',
+ }, $("<div />").text(_t("You must choose at least one record."))).open();
return false;
}
var qdict = {
current_layout : this.$el.find('.oe_dashboard').attr('data-layout')
};
- var $dialog = instance.web.dialog($('<div>'), {
- modal: true,
+ var $dialog = instance.web.Dialog(this, {
title: _t("Edit Layout"),
- width: 'auto',
- height: 'auto'
- }).html(QWeb.render('DashBoard.layouts', qdict));
+ }, QWeb.render('DashBoard.layouts', qdict)).open();
$dialog.find('li').click(function() {
var layout = $(this).attr('data-layout');
- $dialog.dialog('destroy');
+ $dialog.modal('hide');
self.do_change_layout(layout);
});
},
.openerp .oe_followers .oe_partner .oe_hidden{
display: none;
}
-.openerp.ui-dialog .ui-dialog-titlebar .ui-dialog-title{
- padding-right: 20px;
-}
.openerp .oe_followers .oe_show_more{
cursor: pointer;
}
-
/* ---------------- MESSAGES BODY ------------------ */
.openerp .oe_mail .oe_msg_content .oe_blockquote,
.openerp .oe_mail .oe_msg_content blockquote {
var $currentTarget = $(event.currentTarget);
var user_pid = $currentTarget.data('id');
$('div.oe_edit_actions').remove();
- self.$dialog = new session.web.dialog($('<div class="oe_edit_actions">'), {
- modal: true,
- width: 'auto',
- height: 'auto',
+ self.$dialog = new session.web.Dialog(this, {
+ destroy_on_close: false,
+ modal_size: 'small',
title: _t('Edit Subscription of ') + $currentTarget.siblings('a').text(),
buttons: [
{ text: _t("Apply"), click: function() {
self.do_update_subscription(event, user_pid);
- $(this).dialog("close");
+ this.parents('.modal').modal('hide');
}},
- { text: _t("Cancel"), click: function() { $(this).dialog("close"); }}
+ { text: _t("Cancel"), click: function() { this.parents('.modal').modal('hide'); }}
],
- });
+ }, "<div class='oe_edit_actions'>").open();
return self.fetch_subtypes(user_pid);
},
display_subtypes:function (data, id, dialog) {
var self = this;
if (dialog) {
- var $list = self.$dialog;
+ var $list = self.$dialog.$el;
}
else {
var $list = this.$('.oe_subtype_list ul');
this.linkedin_def.reject();
this.auth_def.reject();
IN = false;
- instance.web.dialog($(QWeb.render("LinkedIn.DisabledWarning", {'error': error})), {
+ var dialog = new instance.web.Dialog(this, {
title: _t("LinkedIn is not enabled"),
buttons: [
- {text: _t("Ok"), click: function() { $(this).dialog("close"); }}
- ]
- });
+ {text: _t("Ok"), click: function() { this.parents('.modal').modal('hide'); }}
+ ],
+ }, QWeb.render('LinkedIn.DisabledWarning', {error: error})).open();
},
test_linkedin: function() {
var self = this;
},
bind_event: function() {
var self = this;
- this.$el.parent().on("click", ".oe_linkedin_logout", function () {
+ this.$el.parents('.modal').on("click", ".oe_linkedin_logout", function () {
IN.User.logout();
self.destroy();
});
- this.$search = this.$el.parent().find(".oe_linkedin_advanced_search" );
+ this.$search = this.$el.parents('.modal').find(".oe_linkedin_advanced_search" );
this.$url = this.$search.find("input[name='search']" );
this.$button = this.$search.find("button");
IN.API.Profile("me")
.fields(["firstName", "lastName"])
.result(function (result) {
- $(QWeb.render('LinkedIn.loginInformation', result.values[0])).appendTo(self.$el.parent().find(".ui-dialog-buttonpane"));
+ $(QWeb.render('LinkedIn.loginInformation', result.values[0])).appendTo(self.$el.parents('.modal').find(".oe_dialog_custom_buttons"));
})
},
do_search: function(url) {