unknown 5 лет назад
Родитель
Сommit
786f7f3b63

+ 9 - 7
o2web/source/x_component_Template/Selector/Custom.js

@@ -59,6 +59,7 @@ MWF.xApplication.Template.Selector.Custom = new Class({
     },
     },
     initialize: function (container, options) {
     initialize: function (container, options) {
         this.setOptions(options);
         this.setOptions(options);
+
         this.path = "../x_component_Selector/$Selector/";
         this.path = "../x_component_Selector/$Selector/";
         this.cssPath = "../x_component_Selector/$Selector/" + this.options.style + "/css.wcss";
         this.cssPath = "../x_component_Selector/$Selector/" + this.options.style + "/css.wcss";
         this._loadCss(true);
         this._loadCss(true);
@@ -81,8 +82,8 @@ MWF.xApplication.Template.Selector.Custom = new Class({
                 if (item.isItem) {
                 if (item.isItem) {
                     var item = this._newItem(item, this, this.itemAreaNode);
                     var item = this._newItem(item, this, this.itemAreaNode);
                     this.items.push(item);
                     this.items.push(item);
-                }
-                if ( (item.subItemList && item.subItemList.length > 0) || item.subCategoryList && item.subCategoryList.length > 0 ) {
+                }else{
+                    // if ( (item.subItemList && item.subItemList.length > 0) || item.subCategoryList && item.subCategoryList.length > 0 ) {
                     if( this.options.categorySelectable ){
                     if( this.options.categorySelectable ){
                         var category = this._newItemCategorySelectable(item, this, this.itemAreaNode);
                         var category = this._newItemCategorySelectable(item, this, this.itemAreaNode);
                         this.categorys.push( category );
                         this.categorys.push( category );
@@ -90,11 +91,12 @@ MWF.xApplication.Template.Selector.Custom = new Class({
                         var category = this._newItemCategory(item, this, this.itemAreaNode);
                         var category = this._newItemCategory(item, this, this.itemAreaNode);
                         this.categorys.push( category );
                         this.categorys.push( category );
                     }
                     }
-                    // item.subItemList.each(function (subItem, index) {
-                    //     var item = this._newItem(subItem, this, category.children, 2, category);
-                    //     this.items.push(item);
-                    //     category.subItems.push(item);
-                    // }.bind(this));
+                        // item.subItemList.each(function (subItem, index) {
+                        //     var item = this._newItem(subItem, this, category.children, 2, category);
+                        //     this.items.push(item);
+                        //     category.subItems.push(item);
+                        // }.bind(this));
+                    // }
                 }
                 }
             }.bind(this));
             }.bind(this));
         }
         }

+ 15 - 1
o2web/source/x_component_portal_PageDesigner/Module/Page.js

@@ -790,7 +790,21 @@ MWF.xApplication.portal.PageDesigner.Module.Page = MWF.PCPage = new Class({
             MWF.FormImport.create("office", this);
             MWF.FormImport.create("office", this);
         }.bind(this));
         }.bind(this));
     },
     },
-
+	deletePropertiesOrStyles: function(name, key){
+		if (name=="styles"){
+			try{
+				if( key && this.json.styles[key] ){
+					delete this.json.styles[key];
+				}
+				this.setCustomStyles();
+			}catch(e){}
+		}
+		if (name=="properties"){
+			try{
+				this.node.removeProperty(key);
+			}catch(e){}
+		}
+	},
 	setPropertiesOrStyles: function(name){
 	setPropertiesOrStyles: function(name){
 		if (name==="styles"){
 		if (name==="styles"){
 			this.setCustomStyles();
 			this.setCustomStyles();

+ 1 - 1
o2web/source/x_component_process_Work/Processor.js

@@ -451,7 +451,7 @@ MWF.xApplication.process.Work.Processor = new Class({
         }
         }
 
 
         //临时添加
         //临时添加
-        if(this.form.data.json.events.afterSelectRoute){
+        if(this.form.data.json.events && this.form.data.json.events.afterSelectRoute){
             this.form.Macro.exec(this.form.data.json.events.afterSelectRoute.code, node);
             this.form.Macro.exec(this.form.data.json.events.afterSelectRoute.code, node);
         }
         }