Просмотр исходного кода

Merge branch 'fix/Query.view_add_column_execption' into 'develop'

Merge of fix/Query.view_add_column_execption 修复视图中新增列可能报错的问题 to develop

See merge request o2oa/o2oa!1599
蔡祥熠 5 лет назад
Родитель
Сommit
9a8551c0bc
1 измененных файлов с 4 добавлено и 1 удалено
  1. 4 1
      o2web/source/x_component_query_ViewDesigner/View.js

+ 4 - 1
o2web/source/x_component_query_ViewDesigner/View.js

@@ -410,6 +410,8 @@ MWF.xApplication.query.ViewDesigner.View = new Class({
     //},
     addColumn: function(){
 
+        debugger;
+
         MWF.require("MWF.widget.UUID", function(){
             var id = (new MWF.widget.UUID).id;
             var json = {
@@ -1329,6 +1331,7 @@ MWF.xApplication.query.ViewDesigner.View.Column = new Class({
         if( this.view.defaultColumnJson ){
             this.json = Object.merge( this.json, Object.clone(this.view.defaultColumnJson) );
             if (callback) callback(this.json);
+            return;
         }
         var url = this.view.path+"column.json";
         MWF.getJSON(url, {
@@ -1343,7 +1346,7 @@ MWF.xApplication.query.ViewDesigner.View.Column = new Class({
             "onRequestFailure": function(xhr){
                 this.view.designer.notice(xhr.responseText, "error");
             }.bind(this)
-        });
+        }, false);
     },
     setCustomStyles : function(){
         var viewStyles = this.view.json.data.viewStyles;