Procházet zdrojové kódy

catch 417 in request.js

version-14
Rushabh Mehta před 11 roky
rodič
revize
a409a82f7e
1 změnil soubory, kde provedl 6 přidání a 2 odebrání
  1. +6
    -2
      frappe/public/js/frappe/request.js

+ 6
- 2
frappe/public/js/frappe/request.js Zobrazit soubor

@@ -50,15 +50,19 @@ frappe.request.call = function(opts) {
type: 'POST',
dataType: opts.dataType || 'json',
statusCode: {
200: function(data, xhr) {
if(typeof data === "string") data = JSON.parse(data);
opts.success && opts.success(data, xhr.responseText);
},
404: function(xhr) {
msgprint(__("Not found"));
},
403: function(xhr) {
msgprint(__("Not permitted"));
},
200: function(data, xhr) {
417: function(data, xhr) {
if(typeof data === "string") data = JSON.parse(data);
opts.success && opts.success(data, xhr.responseText);
opts.error && opts.error(data, xhr.responseText)
},
501: function(data, xhr) {
if(typeof data === "string") data = JSON.parse(data);


Načítá se…
Zrušit
Uložit