summaryrefslogtreecommitdiff
path: root/addons/web
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
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')
-rw-r--r--addons/web/static/src/css/base.css10
-rw-r--r--addons/web/static/src/css/base.sass8
-rw-r--r--addons/web/static/src/js/chrome.js13
-rw-r--r--addons/web/static/src/xml/base.xml2
4 files changed, 27 insertions, 6 deletions
diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css
index 1917396b6a3..acdcc0a95aa 100644
--- a/addons/web/static/src/css/base.css
+++ b/addons/web/static/src/css/base.css
@@ -376,6 +376,16 @@
display: inline;
vertical-align: middle;
}
+.openerp .oe_warning_redirect {
+ border: none !important;
+ padding: 0 !important;
+ margin-left: 20px !important;
+ background: #f5f7f9 !important;
+ box-shadow: none !important;
+}
+.openerp .oe_warning_redirect:hover {
+ text-decoration: underline !important;
+}
.openerp .oe_stat_button:hover {
background: #7c7bad;
color: white;
diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass
index cb30ffecde8..b806c32ffc2 100644
--- a/addons/web/static/src/css/base.sass
+++ b/addons/web/static/src/css/base.sass
@@ -348,6 +348,14 @@ $sheet-padding: 16px
@include box-shadow(none)
&:hover
background: #ED6F6A
+ .oe_warning_redirect
+ border: none !important
+ padding: 0 !important
+ margin-left: 20px !important
+ background: #f5f7f9 !important
+ box-shadow: none !important
+ &:hover
+ text-decoration: underline !important
.oe_stat_button
font-weight: normal
width: 132px !important
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');
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml
index 8c833817d99..e2d5ae02068 100644
--- a/addons/web/static/src/xml/base.xml
+++ b/addons/web/static/src/xml/base.xml
@@ -1365,7 +1365,7 @@
</div>
</t>
<t t-name="WidgetButton">
- <button type="button" t-att-class="widget.is_stat_button ? 'oe_stat_button btn btn-default' : 'oe_button oe_form_button'"
+ <button type="button" t-att-class="widget.is_stat_button ? 'oe_stat_button btn btn-default' : 'oe_button oe_form_button ' + (widget.node.attrs.class ? widget.node.attrs.class : '')"
t-att-style="widget.node.attrs.style"
t-att-tabindex="widget.node.attrs.tabindex"
t-att-autofocus="widget.node.attrs.autofocus"