Explorar o código

Merge pull request #280 from zta192/master

Fixed error for failed response types - fixes #279
Kartik Visweswaran %!s(int64=10) %!d(string=hai) anos
pai
achega
9f4e4ef1d8
Modificáronse 2 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      js/fileinput.js
  2. 0 0
      js/fileinput.min.js

+ 2 - 1
js/fileinput.js

@@ -523,7 +523,8 @@
         parseError: function (jqXHR, errorThrown, fileName) {
             var self = this, errMsg = $.trim(errorThrown + ''),
                 dot = errMsg.slice(-1) === '.' ? '' : '.',
-                text = $(jqXHR.responseText).text();
+                text = jqXHR.responseJSON !== undefined && jqXHR.responseJSON.error !== undefined
+                        ? jqXHR.responseJSON.error : jqXHR.responseText;
             if (self.showAjaxErrorDetails) {
                 text = $.trim(text.replace(/\n\s*\n/g, '\n'));
                 text = text.length > 0 ? '<pre>' + text + '</pre>' : '';

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
js/fileinput.min.js


Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio