X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=blobdiff_plain;f=Pman.Request.js;h=82d18ff0c5c822661a5e750f5006af9ecdf557ad;hp=070ed7570331c71ef7b4636b4b421406ae23cef9;hb=8cd2a9237c684aa16bc21e3ac6d3793c49c65400;hpb=d3a5f2b43fc363612b1e385455b1102e6f82fbae diff --git a/Pman.Request.js b/Pman.Request.js index 070ed757..82d18ff0 100644 --- a/Pman.Request.js +++ b/Pman.Request.js @@ -25,7 +25,7 @@ var t = new Pman.Request({ * request, a url encoded string or a function to call to get either. * @cfg {Function} success called with ( JSON decoded data of the data.. ) * @cfg {Function} success called with ( JSON decoded data of the data.. ) -* @cfg {Boolean} showFailtureDialog (true|false) default true +* @cfg {Boolean} showFailureDialog (true|false) default true */ Pman.Request = function(config){ @@ -43,7 +43,7 @@ Pman.Request = function(config){ Roo.extend(Pman.Request, Roo.data.Connection, { // private - showFailtureDialog : true, + showFailureDialog : true, processResponse : function(response) { // convert the Roo Connection response into JSON data. @@ -81,7 +81,7 @@ Roo.extend(Pman.Request, Roo.data.Connection, { } var res = this.processResponse(response); - if (!res.success) { // error! + if (!res.success && !res.done) { // error! if (options.failure) { // failure is handled... - do not show error.. Roo.callback(options.failure, options.scope, [res, options]); @@ -103,14 +103,13 @@ Roo.extend(Pman.Request, Roo.data.Connection, { if (this.mask && this.maskEl) { Roo.get(this.maskEl).unmask(true); } + if(!this.showFailureDialog){ + return; + } if (res !== true) { var decode = this.processResponse(response); Roo.log(decode); - if(!this.showFailtureDialog){ - return; - } - if (Roo.MessageBox.isVisible()) { alert(decode && decode.errorMsg ? decode.errorMsg : "Error Sending data - return true from failure to remove message"); return; @@ -120,4 +119,4 @@ Roo.extend(Pman.Request, Roo.data.Connection, { } } -}); \ No newline at end of file +});