Browse Source

Merge remote-tracking branch 'origin/develop' into develop

o2lee 5 years ago
parent
commit
b297d9f85e
1 changed files with 12 additions and 4 deletions
  1. 12 4
      o2web/source/x_component_cms_ColumnManager/CategoryExplorer.js

+ 12 - 4
o2web/source/x_component_cms_ColumnManager/CategoryExplorer.js

@@ -982,11 +982,19 @@ MWF.xApplication.cms.ColumnManager.CategoryExplorer.Category = new Class({
         }.bind(this),function(xhr, text, error){
         }.bind(this),function(xhr, text, error){
             var errorText = error;
             var errorText = error;
             if (xhr) errorText = xhr.responseText;
             if (xhr) errorText = xhr.responseText;
-            if( errorText.indexOf( "referenced" ) > -1 ){
-                var lp = this.explorer.app.lp.category;
-                var text = lp.deleteFailAsHasDocument.replace(/{title}/g, this.data.name );
-                this.app.notice( text,"error");
+            try{
+                var errorObj = JSON.parse(errorText);
+                if( errorObj.message ){
+                    this.app.notice( errorObj.message,"error");
+                }
+            }catch(e){
+
             }
             }
+            // if( errorText.indexOf( "referenced" ) > -1 ){
+            //     var lp = this.explorer.app.lp.category;
+            //     var text = lp.deleteFailAsHasDocument.replace(/{title}/g, this.data.name );
+            //     this.app.notice( text,"error");
+            // }
         }.bind(this));
         }.bind(this));
     },
     },
     moveCategory: function(e){
     moveCategory: function(e){