[MERGE] Merge lp:openerp-web.
bzr revid: bth@tinyerp.com-20130218122223-reyc4zsyslxd2uec
This commit is contained in:
@@ -327,6 +327,34 @@ instance.web.ExceptionHandler = {
|
||||
*/
|
||||
instance.web.crash_manager_registry = new instance.web.Registry();
|
||||
|
||||
/**
|
||||
* Handle redirection warnings, which behave more or less like a regular
|
||||
* warning, with an additional redirection button.
|
||||
*/
|
||||
instance.web.RedirectWarningHandler = instance.web.Dialog.extend(instance.web.ExceptionHandler, {
|
||||
init: function(parent, error) {
|
||||
this._super(parent);
|
||||
this.error = error;
|
||||
},
|
||||
display: function() {
|
||||
error = this.error;
|
||||
error.data.message = error.data.arguments[0];
|
||||
|
||||
instance.web.dialog($('<div>' + QWeb.render('CrashManager.warning', {error: error}) + '</div>'), {
|
||||
title: "OpenERP " + (_.str.capitalize(error.type) || "Warning"),
|
||||
buttons: [
|
||||
{text: _t("Ok"), click: function() { $(this).dialog("close"); }},
|
||||
{text: error.data.arguments[2], click: function() {
|
||||
window.location.href='#action='+error.data.arguments[1];
|
||||
$(this).dialog("close");
|
||||
}}
|
||||
]
|
||||
});
|
||||
this.destroy();
|
||||
}
|
||||
});
|
||||
instance.web.crash_manager_registry.add('openerp.exceptions.RedirectWarning', 'instance.web.RedirectWarningHandler');
|
||||
|
||||
instance.web.Loading = instance.web.Widget.extend({
|
||||
template: _t("Loading"),
|
||||
init: function(parent) {
|
||||
|
||||
@@ -14,7 +14,7 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2013-02-15 04:49+0000\n"
|
||||
"X-Launchpad-Export-Date: 2013-02-16 05:09+0000\n"
|
||||
"X-Generator: Launchpad (build 16491)\n"
|
||||
|
||||
#. module: web_kanban
|
||||
|
||||
Reference in New Issue
Block a user