summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js
diff options
context:
space:
mode:
authorssh-odoo <ssh@openerp.com>2014-06-25 11:39:36 +0530
committerssh-odoo <ssh@openerp.com>2014-07-03 16:11:15 +0530
commit6cc4bd431220f4dea75a14b8a21f45cc77eda097 (patch)
treeee3ff4261a9b18787d3751a2cfdbaace50f38c4b /addons/web/static/src/js
parente1feec1c7ca3b8de56909fc8548c8a4c1cf4f771 (diff)
[Imp]:Improve configuration warning msg
[imp]:remove space [rem]:remove code [imp]:remove changes [imp]:remove changes [rem]:remove unused changes
Diffstat (limited to 'addons/web/static/src/js')
-rw-r--r--addons/web/static/src/js/chrome.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js
index 922c3a36e47..39c7395556e 100644
--- a/addons/web/static/src/js/chrome.js
+++ b/addons/web/static/src/js/chrome.js
@@ -124,11 +124,12 @@ instance.web.Dialog = instance.web.Widget.extend({
var $customButons = this.$buttons.find('.oe_dialog_custom_buttons').empty();
_.each(buttons, function(fn, text) {
// buttons can be object or array
+ var oe_link_class = fn.oe_link_class;
if (!_.isFunction(fn)) {
text = fn.text;
fn = fn.click;
}
- var $but = $(QWeb.render('WidgetButton', { widget : { string: text, node: { attrs: {} }}}));
+ var $but = $(QWeb.render('WidgetButton', { widget : { string: text, node: { attrs: {'class': oe_link_class} }}}));
$customButons.append($but);
$but.on('click', function(ev) {
fn.call(self.$el, ev);
@@ -330,6 +331,7 @@ instance.web.RedirectWarningHandler = instance.web.Dialog.extend(instance.web.Ex
this.error = error;
},
display: function() {
+ var self = this;
error = this.error;
error.data.message = error.data.arguments[0];
@@ -337,14 +339,15 @@ instance.web.RedirectWarningHandler = instance.web.Dialog.extend(instance.web.Ex
size: 'medium',
title: "OpenERP " + (_.str.capitalize(error.type) || "Warning"),
buttons: [
- {text: _t("Ok"), click: function() { this.$el.parents('.modal').modal('hide'); }},
- {text: error.data.arguments[2], click: function() {
+ {text: _t("Ok"), click: function() { self.$el.parents('.modal').modal('hide'); self.destroy();}},
+ {text: error.data.arguments[2],
+ oe_link_class: 'oe_link',
+ click: function() {
window.location.href='#action='+error.data.arguments[1];
- this.$el.parents('.modal').modal('hide');
+ self.destroy();
}}
],
}, QWeb.render('CrashManager.warning', {error: error})).open();
- this.destroy();
}
});
instance.web.crash_manager_registry.add('openerp.exceptions.RedirectWarning', 'instance.web.RedirectWarningHandler');