提交 56811f13 编写于 作者: NoSubject's avatar NoSubject

Portal增加ElementUI组件

上级 d015559f
......@@ -52,6 +52,19 @@
"float": "right",
"cursor": "pointer"
},
"toolbarTitleCategoryActionNode": {
"width": "22px",
"height": "22px",
"margin-top": "-26px",
"margin-right": "22px",
"background": "url(../x_component_portal_PageDesigner/$Main/default/category.png) no-repeat center center",
"float": "right",
"cursor": "pointer"
},
"toolbarGroupContentNode": {
"overflow": "hidden"
},
"toolbarContentNode": {
"background-color": "#DDD",
"border-radius": "0px",
......@@ -127,7 +140,10 @@
"height": "42px",
"background-position": "center center",
"background-repeat": "no-repeat",
"float": "left"
"float": "left",
"font-size": "24px",
"line-height": "40px",
"text-align": "center"
},
"toolbarToolTextNode": {
"margin-left": "46px",
......@@ -379,4 +395,4 @@
"background-color": "#CCC",
"position": "absolute"
}
}
\ No newline at end of file
}
......@@ -50,6 +50,19 @@
"float": "right",
"cursor": "pointer"
},
"toolbarTitleCategoryActionNode": {
"width": "22px",
"height": "22px",
"margin-top": "-26px",
"margin-right": "22px",
"background": "url(../x_component_portal_PageDesigner/$Main/default/category.png) no-repeat center center",
"float": "right",
"cursor": "pointer"
},
"toolbarGroupContentNode": {
"overflow": "hidden"
},
"toolbarContentNode": {
"background-color": "#DDD",
"border-radius": "0px",
......@@ -125,7 +138,10 @@
"height": "42px",
"background-position": "center center",
"background-repeat": "no-repeat",
"float": "left"
"float": "left",
"font-size": "24px",
"line-height": "40px",
"text-align": "center"
},
"toolbarToolTextNode": {
"margin-left": "46px",
......@@ -378,4 +394,4 @@
"background-color": "#CCC",
"position": "absolute"
}
}
\ No newline at end of file
}
{
"source": {
"icon": "source.png",
"text": MWF.APPPD.LP.modules.source,
"className": "Source"
},
"SubSource": {
"icon": "subSource.png",
"text": MWF.APPPD.LP.modules.subSource,
"className": "SubSource"
},
"sourceText": {
"icon": "sourceText.png",
"text": MWF.APPPD.LP.modules.sourceText,
"className": "SourceText"
}
}
{
"elcontainer": {
"fontIcon": "el-icon-s-grid",
"text": MWF.xApplication.process.FormDesigner.LP.modules.el_container,
"className": "Elcontainer"
},
"elinput": {
"fontIcon": "el-icon-edit",
"text": MWF.xApplication.process.FormDesigner.LP.modules.el_input,
"className": "Elinput"
},
"elautocomplete": {
"fontIcon": "el-icon-finished",
"text": MWF.xApplication.process.FormDesigner.LP.modules.el_autocomplete,
"className": "Elautocomplete"
},
"elnumber": {
"fontIcon": "el-icon-edit-outline",
"text": MWF.xApplication.process.FormDesigner.LP.modules.el_number,
"className": "Elnumber"
},
"elradio": {
"fontIcon": "el-icon-success",
"text": MWF.xApplication.process.FormDesigner.LP.modules.el_radio,
"className": "Elradio"
},
"elcheckbox": {
"fontIcon": "el-icon-circle-plus",
"text": MWF.xApplication.process.FormDesigner.LP.modules.el_checkbox,
"className": "Elcheckbox"
},
"elselect": {
"fontIcon": "el-icon-arrow-down",
"text": MWF.xApplication.process.FormDesigner.LP.modules.el_select,
"className": "Elselect"
},
"elcascader": {
"fontIcon": "el-icon-d-arrow-right",
"text": MWF.xApplication.process.FormDesigner.LP.modules.el_cascader,
"className": "Elcascader"
},
"elswitch": {
"fontIcon": "el-icon-open",
"text": MWF.xApplication.process.FormDesigner.LP.modules.el_switch,
"className": "Elswitch"
},
"elslider": {
"fontIcon": "el-icon-s-operation",
"text": MWF.xApplication.process.FormDesigner.LP.modules.el_slider,
"className": "Elslider"
},
"elbutton": {
"fontIcon": "el-icon-thumb",
"text": MWF.xApplication.process.FormDesigner.LP.modules.el_button,
"className": "Elbutton"
},
"elicon": {
"fontIcon": "el-icon-picture-outline-round",
"text": MWF.xApplication.process.FormDesigner.LP.modules.el_icon,
"className": "Elicon"
},
"elcommon": {
"fontIcon": "el-icon-full-screen",
"text": MWF.xApplication.process.FormDesigner.LP.modules.el_common,
"className": "Elcommon"
}
}
{
"label": {
"icon": "label.png",
"text": MWF.APPPD.LP.modules.label,
"className": "Label"
},
"textfield": {
"icon": "textfield.png",
"text": MWF.APPPD.LP.modules.textfield,
"className": "Textfield"
},
"org": {
"icon": "personfield.png",
"text": MWF.APPPD.LP.modules.org,
"className": "Org"
},
"calendar": {
"icon": "calendar.png",
"text": MWF.APPPD.LP.modules.calendar,
"className": "Calendar"
},
"textarea": {
"icon": "textarea.png",
"text": MWF.APPPD.LP.modules.textarea,
"className": "Textarea"
},
"select": {
"icon": "select.png",
"text": MWF.APPPD.LP.modules.select,
"className": "Select"
},
"radio": {
"icon": "radio.png",
"text": MWF.APPPD.LP.modules.radio,
"className": "Radio"
},
"checkbox": {
"icon": "checkbox.png",
"text": MWF.APPPD.LP.modules.checkbox,
"className": "Checkbox"
},
"address": {
"icon": "address.png",
"text": MWF.APPPD.LP.modules.address,
"className": "Address"
},
"combox": {
"icon": "combox.png",
"text": MWF.APPPD.LP.modules.combox,
"className": "Combox"
},
"datatable": {
"icon": "datagrid.png",
"text": MWF.APPPD.LP.modules.datatable,
"className": "Datatable"
},
"datatemplate": {
"icon": "datatemplate.png",
"text": MWF.APPPD.LP.modules.datatemplate,
"className": "Datatemplate"
}
}
{
"view": {
"icon": "view.png",
"text": MWF.APPPD.LP.modules.view,
"className": "View"
},
"stat": {
"icon": "stat.png",
"text": MWF.APPPD.LP.modules.stat,
"className": "Stat"
},
"widget": {
"icon": "subpage.png",
"text": MWF.APPPD.LP.modules.widget,
"className": "Widget"
},
"widgetmodules": {
"icon": "subpage.png",
"text": MWF.APPPD.LP.modules.widgetmodules,
"className": "Widgetmodules"
},
"statement": {
"icon": "statement.png",
"text": MWF.APPPD.LP.modules.statement,
"className": "Statement"
},
"importer": {
"icon": "importer.png",
"text": MWF.APPPD.LP.modules.importer,
"className": "Importer"
}
}
{
"div": {
"icon": "div.png",
"text": MWF.APPPD.LP.modules.div,
"className": "Div"
},
"label": {
"icon": "label.png",
"text": MWF.APPPD.LP.modules.label,
"className": "Label"
},
"source": {
"icon": "source.png",
"text": MWF.APPPD.LP.modules.source,
"className": "Source"
},
"SubSource": {
"icon": "subSource.png",
"text": MWF.APPPD.LP.modules.subSource,
"className": "SubSource"
},
"sourceText": {
"icon": "sourceText.png",
"text": MWF.APPPD.LP.modules.sourceText,
"className": "SourceText"
},
"table": {
"icon": "table.png",
"text": MWF.APPPD.LP.modules.table,
"className": "Table"
},
"tab": {
"icon": "tabs.png",
"text": MWF.APPPD.LP.modules.tab,
"className": "Tab"
},
"image": {
"icon": "image.png",
"text": MWF.APPPD.LP.modules.image,
"className": "Image"
},
"button": {
"icon": "button.png",
"text": MWF.APPPD.LP.modules.button,
"className": "Button"
},
"iframe": {
"icon": "iframe.png",
"text": MWF.APPPD.LP.modules.iframe,
"className": "Iframe"
},
"html": {
"icon": "html.png",
"text": MWF.APPPD.LP.modules.html,
"className": "Html"
},
"common": {
"icon": "common.png",
"text": MWF.APPPD.LP.modules.common,
"className": "Common"
},
"tree": {
"icon": "tree.png",
"text": MWF.APPPD.LP.modules.tree,
"className": "Tree"
}
}
[
{
"name": "default",
"json": "tools.json",
"text": MWF.APPPD.LP.modules.group_all,
},
{
"name": "form",
"json": "tools-form.json",
"text": MWF.APPPD.LP.modules.group_form,
},
{
"name": "layout",
"json": "tools-layout.json",
"text": MWF.APPPD.LP.modules.group_layout,
},
{
"name": "data",
"json": "tools-data.json",
"text": MWF.APPPD.LP.modules.group_data,
},
{
"name": "function",
"json": "tools-function.json",
"text": MWF.APPPD.LP.modules.group_function,
},
{
"name": "element",
"json": "tools-element.json",
"text": MWF.APPPD.LP.modules.group_element,
"className": "Textfield"
}
]
......@@ -202,9 +202,14 @@ MWF.xApplication.portal.PageDesigner.Main = new Class({
this.loadToolbar();
this.loadPageNode();
this.loadProperty();
this.loadTools();
this.resizeNode();
this.addEvent("resize", this.resizeNode.bind(this));
//this.loadTools();
this.loadTools(function(){
this.resizeNode();
this.addEvent("resize", this.resizeNode.bind(this));
}.bind(this));
// this.resizeNode();
// this.addEvent("resize", this.resizeNode.bind(this));
this.loadPage();
if (this.toolbarContentNode){
......@@ -223,6 +228,7 @@ MWF.xApplication.portal.PageDesigner.Main = new Class({
this.toolsData = null;
this.toolbarMode = "all";
this.tools = [];
this.toolGroups = [];
this.toolbarDecrease = 0;
this.designNode = null;
......@@ -258,17 +264,50 @@ MWF.xApplication.portal.PageDesigner.Main = new Class({
}.bind(this)
}
}).inject(this.toolbarNode);
this.toolbarContentNode = new Element("div", {
"styles": this.css.toolbarContentNode,
"events": {
"selectstart": function(e){
e.preventDefault();
e.stopPropagation();
}
}
}).inject(this.toolbarNode);
this.toolbarTitleCategoryActionNode = new Element("div", {
"styles": this.css.toolbarTitleCategoryActionNode
}).inject(this.toolbarNode);
this.categoryActionMenu = new o2.xDesktop.Menu(this.toolbarTitleCategoryActionNode, {
"event": "click", "style": "flatUser", "offsetX": 0, "offsetY": 0, "container": this.node,
"onQueryShow": this.showCategoryMenu.bind(this)
});
this.categoryActionMenu.load();
this.toolbarGroupContentNode = new Element("div", {"styles": this.css.toolbarGroupContentNode}).inject(this.toolbarNode);
this.toolbarGroupContentNode.addEvent("selectstart", function(e){
e.preventDefault();
e.stopPropagation();
});
// this.toolbarContentNode = new Element("div", {
// "styles": this.css.toolbarContentNode,
// "events": {
// "selectstart": function(e){
// e.preventDefault();
// e.stopPropagation();
// }
// }
// }).inject(this.toolbarNode);
},
showCategoryMenu: function(){
this.categoryActionMenu.items.each(function(item){
debugger;
if (this.currentToolGroup && this.currentToolGroup.data.text==item.options.text){
item.setDisable(true);
var imgDiv = item.item.getFirst();
var img = imgDiv.getElement("img");
if (!img) img = new Element("img", {"styles": item.menu.css.menuItemImg}).inject(imgDiv);
img.set("src", this.path+this.options.style+"/check.png");
}else{
item.setDisable(false);
var imgDiv = item.item.getFirst();
var img = imgDiv.getElement("img");
if (img) img.destroy();
}
}.bind(this));
},
switchToolbarMode: function(){
if (this.toolbarMode=="all"){
var size = this.toolbarNode.getSize();
......@@ -287,7 +326,9 @@ MWF.xApplication.portal.PageDesigner.Main = new Class({
this.pageNode.setStyle("margin-left", ""+pageMargin+"px");
this.toolbarTitleActionNode.setStyles(this.css.toolbarTitleActionNodeRight);
this.toolbarGroupContentNode.getElements(".o2formModuleTools").hide();
this.toolbarMode="simple";
}else{
sizeX = 60 + this.toolbarDecrease;
......@@ -304,6 +345,9 @@ MWF.xApplication.portal.PageDesigner.Main = new Class({
this.toolbarTitleNode.set("text", MWF.APPPD.LP.tools);
this.toolbarTitleActionNode.setStyles(this.css.toolbarTitleActionNode);
this.toolbarGroupContentNode.getElements(".o2formModuleTools").show();
this.toolbarMode="all";
}
......@@ -1032,90 +1076,113 @@ MWF.xApplication.portal.PageDesigner.Main = new Class({
},
//loadTools------------------------------
loadTools: function(){
var designer = this;
this.getTools(function(){
Object.each(this.toolsData, function(value, key){
var toolNode = new Element("div", {
"styles": this.css.toolbarToolNode,
"title": value.text,
"events": {
"mouseover": function(e){
try {
this.setStyles(designer.css.toolbarToolNodeOver);
}catch(e){
this.setStyles(designer.css.toolbarToolNodeOverCSS2);
};
},
"mouseout": function(e){
try {
this.setStyles(designer.css.toolbarToolNode);
}catch(e){};
},
"mousedown": function(e){
try {
this.setStyles(designer.css.toolbarToolNodeDown);
}catch(e){
this.setStyles(designer.css.toolbarToolNodeDownCSS2);
};
},
"mouseup": function(e){
try {
this.setStyles(designer.css.toolbarToolNodeUp);
}catch(e){
this.setStyles(designer.css.toolbarToolNodeUpCSS2);
};
}
}
}).inject(this.toolbarContentNode);
toolNode.store("toolClass", value.className);
var iconNode = new Element("div", {
"styles": this.css.toolbarToolIconNode
}).inject(toolNode);
iconNode.setStyle("background-image", "url("+this.path+this.options.style+"/icon/"+value.icon+")");
var textNode = new Element("div", {
"styles": this.css.toolbarToolTextNode,
"text": value.text
});
textNode.inject(toolNode);
// var designer = this;
toolNode.addEvent("mousedown", function(e){
var className = this.retrieve("toolClass");
designer.page.createModule(className, e);
});
this.tools.push(toolNode);
}.bind(this));
}.bind(this));
},
getTools: function(callback){
loadTools: function(callback){
o2.loadCss("../o2_lib/vue/element/index.css");
this.getGroups(function(){
this.toolsGroupData.forEach(function(o){
//var o = this.toolsGroupData[key];
this.toolGroups.push(new MWF.xApplication.portal.PageDesigner.ToolsGroup(o, this));
}, this);
if (callback) callback();
}.bind(this));
},
getGroups: function(callback){
if (this.toolsGroupData){
if (callback) callback();
}else{
var toolsGroupDataUrl = this.path+this.options.style+"/toolsGroup.json";
o2.JSON.get(toolsGroupDataUrl, function(responseJSON){
this.toolsGroupData = responseJSON;
if (callback) callback();
}.bind(this));
}
},
if (this.toolsData){
if (callback) callback();
}else{
var toolsDataUrl = this.path+this.options.style+"/tools.json";
var r = new Request.JSON({
url: toolsDataUrl,
secure: false,
async: false,
method: "get",
noCache: true,
onSuccess: function(responseJSON, responseText){
this.toolsData = responseJSON;
if (callback) callback();
}.bind(this),
onError: function(text, error){
debugger;
this.notice("request tools data error: "+error, "error");
}.bind(this)
});
r.send();
}
},
// loadTools: function(){
// var designer = this;
// this.getTools(function(){
// Object.each(this.toolsData, function(value, key){
// var toolNode = new Element("div", {
// "styles": this.css.toolbarToolNode,
// "title": value.text,
// "events": {
// "mouseover": function(e){
// try {
// this.setStyles(designer.css.toolbarToolNodeOver);
// }catch(e){
// this.setStyles(designer.css.toolbarToolNodeOverCSS2);
// };
// },
// "mouseout": function(e){
// try {
// this.setStyles(designer.css.toolbarToolNode);
// }catch(e){};
// },
// "mousedown": function(e){
// try {
// this.setStyles(designer.css.toolbarToolNodeDown);
// }catch(e){
// this.setStyles(designer.css.toolbarToolNodeDownCSS2);
// };
// },
// "mouseup": function(e){
// try {
// this.setStyles(designer.css.toolbarToolNodeUp);
// }catch(e){
// this.setStyles(designer.css.toolbarToolNodeUpCSS2);
// };
// }
// }
// }).inject(this.toolbarContentNode);
// toolNode.store("toolClass", value.className);
//
// var iconNode = new Element("div", {
// "styles": this.css.toolbarToolIconNode
// }).inject(toolNode);
// iconNode.setStyle("background-image", "url("+this.path+this.options.style+"/icon/"+value.icon+")");
//
// var textNode = new Element("div", {
// "styles": this.css.toolbarToolTextNode,
// "text": value.text
// });
// textNode.inject(toolNode);
//
// // var designer = this;
// toolNode.addEvent("mousedown", function(e){
//
// var className = this.retrieve("toolClass");
// designer.page.createModule(className, e);
// });
//
// this.tools.push(toolNode);
// }.bind(this));
// }.bind(this));
// },
// getTools: function(callback){
//
// if (this.toolsData){
// if (callback) callback();
// }else{
// var toolsDataUrl = this.path+this.options.style+"/tools.json";
// var r = new Request.JSON({
// url: toolsDataUrl,
// secure: false,
// async: false,
// method: "get",
// noCache: true,
// onSuccess: function(responseJSON, responseText){
// this.toolsData = responseJSON;
// if (callback) callback();
// }.bind(this),
// onError: function(text, error){
// debugger;
// this.notice("request tools data error: "+error, "error");
// }.bind(this)
// });
// r.send();
// }
// },
//resizeNode------------------------------------------------
resizeNodeLeftRight: function(){
......@@ -1153,7 +1220,15 @@ MWF.xApplication.portal.PageDesigner.Main = new Class({
y = titleSize.y+titleMarginTop+titleMarginBottom+titlePaddingTop+titlePaddingBottom;
y = nodeSize.y-y;
this.toolbarContentNode.setStyle("height", ""+y+"px");
this.toolbarGroupContentNode.setStyle("height", ""+y+"px");
var groupHeight = 0;
var contentHeight = y-groupHeight-5;
this.toolGroups.each(function(g){
g.setContentHeight(contentHeight);
});
//this.toolbarContentNode.setStyle("height", ""+y+"px");
titleSize = this.propertyTitleNode.getSize();
......@@ -1205,9 +1280,18 @@ MWF.xApplication.portal.PageDesigner.Main = new Class({
y = titleSize.y+titleMarginTop+titleMarginBottom+titlePaddingTop+titlePaddingBottom;
y = nodeSize.y-y;
this.toolbarContentNode.setStyle("height", ""+y+"px");
this.toolbarGroupContentNode.setStyle("height", ""+y+"px");
var groupHeight = 0;
// this.toolGroups.each(function(g){
// groupHeight += g.toolbarGroupTitleNode.getSize().y;
// });
var contentHeight = y-groupHeight-5;
this.toolGroups.each(function(g){
g.setContentHeight(contentHeight);
});
//this.toolbarContentNode.setStyle("height", ""+y+"px");
titleSize = this.propertyTitleNode.getSize();
titleMarginTop = this.propertyTitleNode.getStyle("margin-top").toFloat();
......@@ -1710,7 +1794,150 @@ MWF.xApplication.portal.PageDesigner.Main = new Class({
}
}
});
//
// MWF.APPPD.Script = new Class({
//
// })
MWF.xApplication.portal.PageDesigner.ToolsGroup = new Class({
Implements: [Events],
initialize: function(data, app){
this.data = data;
this.app = app;
this.css = this.app.css;
this.tools = [];
this.load();
},
load: function(){
this.toolbarGroupNode = new Element("div", {
"styles": this.css.toolbarGroupNode,
}).inject(this.app.toolbarGroupContentNode);
this.toolbarContentNode = new Element("div", {
"styles": this.css.toolbarContentNode,
}).inject(this.toolbarGroupNode);
this.loadTools();
if (this.toolbarContentNode){
this.app.setScrollBar(this.toolbarContentNode, null, {
"V": {"x": 0, "y": 0},
"H": {"x": 0, "y": 0}
}, function(scrollBar){
this.scrollBar = scrollBar;
}.bind(this));
}
this.toolbarContentNode.setStyle("height", "0px");
this.toolbarContentNode.hide();
var memuItem = this.app.categoryActionMenu.addMenuItem(this.data.text, "click", function(){this.show();}.bind(this));
},
setContentHeight: function(height){
debugger;
this.height = height;
if (this.isShow){
this.toolbarContentNode.setStyle("height", ""+this.height+"px");
}
},
show: function(){
if (this.app.currentToolGroup != this){
if (this.app.currentToolGroup) this.app.currentToolGroup.hide();
this.toolbarContentNode.show();
this.toolbarContentNode.setStyle("height", this.height);
if (this.scrollBar && this.scrollBar.scrollVAreaNode) this.scrollBar.scrollVAreaNode.show();
this.app.currentToolGroup = this;
this.isShow = true;
if (this.app.toolbarMode=="all") this.app.toolbarTitleNode.set("text", this.data.text);
}
},
hide: function(){
if (this.app.currentToolGroup==this) this.app.currentToolGroup = null;
this.toolbarContentNode.hide();
if (this.scrollBar && this.scrollBar.scrollVAreaNode) this.scrollBar.scrollVAreaNode.hide();
this.isShow = false;
},
loadTools: function(){
var designer = this.app;
var group = this;
this.getTools(function(){
Object.each(this.toolsData, function(value, key){
var toolNode = new Element("div", {
"styles": this.css.toolbarToolNode,
"title": value.text,
"events": {
"mouseover": function(e){
try {
this.setStyles(designer.css.toolbarToolNodeOver);
}catch(e){
this.setStyles(designer.css.toolbarToolNodeOverCSS2);
};
},
"mouseout": function(e){
try {
this.setStyles(designer.css.toolbarToolNode);
}catch(e){};
},
"mousedown": function(e){
try {
this.setStyles(designer.css.toolbarToolNodeDown);
}catch(e){
this.setStyles(designer.css.toolbarToolNodeDownCSS2);
};
},
"mouseup": function(e){
try {
this.setStyles(designer.css.toolbarToolNodeUp);
}catch(e){
this.setStyles(designer.css.toolbarToolNodeUpCSS2);
};
}
}
}).inject(this.toolbarContentNode);
toolNode.store("toolClass", value.className);
var iconNode = new Element("div", {
"styles": this.css.toolbarToolIconNode
}).inject(toolNode);
if (value.icon) iconNode.setStyle("background-image", "url("+this.app.path+this.app.options.style+"/icon/"+value.icon+")");
if (value.fontIcon){
iconNode.addClass("mainColor_color");
iconNode.set("html", "<i class=\""+value.fontIcon+"\"></i>");
}
var textNode = new Element("div.o2formModuleTools", {
"styles": this.css.toolbarToolTextNode,
"text": value.text
});
textNode.inject(toolNode);
toolNode.addEvent("mousedown", function(e){
var className = this.retrieve("toolClass");
designer.page.createModule(className, e, group.data.name);
});
this.tools.push(toolNode);
}.bind(this));
if (this.data.name==="default") this.show();
}.bind(this));
},
getTools: function(callback){
if (this.toolsData){
if (callback) callback();
}else{
var toolsDataUrl = this.app.path+this.app.options.style+"/"+this.data.json;
o2.JSON.get(toolsDataUrl, function(responseJSON){
this.toolsData = responseJSON;
if (!this.app.toolsData){
this.app.toolsData = this.toolsData;
}else{
this.app.toolsData = Object.merge(this.app.toolsData, this.toolsData)
}
if (callback) callback();
}.bind(this));
}
},
});
MWF.APPPD.Module.Elbutton = MWF.PCElbutton = new Class({ Extends: MWF.FCElbutton });
MWF.APPPD.Module.Elbutton.templateJsonPath = "../x_component_process_FormDesigner/Module/";
MWF.APPPD.Module.Elautocomplete = MWF.PCElautocomplete = new Class({ Extends: MWF.FCElautocomplete });
MWF.APPPD.Module.Elautocomplete.templateJsonPath = "../x_component_process_FormDesigner/Module/";
MWF.APPPD.Module.Elcascader = MWF.PCElcascader = new Class({ Extends: MWF.FCElcascader });
MWF.APPPD.Module.Elcascader.templateJsonPath = "../x_component_process_FormDesigner/Module/";
MWF.APPPD.Module.Elcheckbox = MWF.PCElcheckbox = new Class({ Extends: MWF.FCElcheckbox });
MWF.APPPD.Module.Elcheckbox.templateJsonPath = "../x_component_process_FormDesigner/Module/";
MWF.APPPD.Module.Elcommon = MWF.PCElcommon = new Class({ Extends: MWF.FCElcommon });
MWF.APPPD.Module.Elcommon.templateJsonPath = "../x_component_process_FormDesigner/Module/";
MWF.APPPD.Module.Elicon = MWF.PCElicon = new Class({ Extends: MWF.FCElicon });
MWF.APPPD.Module.Elicon.templateJsonPath = "../x_component_process_FormDesigner/Module/";
MWF.APPPD.Module.Elinput = MWF.PCElinput = new Class({ Extends: MWF.FCElinput });
MWF.APPPD.Module.Elinput.templateJsonPath = "../x_component_process_FormDesigner/Module/";
MWF.APPPD.Module.Elnumber = MWF.PCElnumber = new Class({ Extends: MWF.FCElnumber });
MWF.APPPD.Module.Elnumber.templateJsonPath = "../x_component_process_FormDesigner/Module/";
MWF.APPPD.Module.Elradio = MWF.PCElradio = new Class({ Extends: MWF.FCElradio });
MWF.APPPD.Module.Elradio.templateJsonPath = "../x_component_process_FormDesigner/Module/";
MWF.APPPD.Module.Elselect = MWF.PCElselect = new Class({ Extends: MWF.FCElselect });
MWF.APPPD.Module.Elselect.templateJsonPath = "../x_component_process_FormDesigner/Module/";
MWF.APPPD.Module.Elslider = MWF.PCElslider = new Class({ Extends: MWF.FCElslider });
MWF.APPPD.Module.Elslider.templateJsonPath = "../x_component_process_FormDesigner/Module/";
MWF.APPPD.Module.Elswitch = MWF.PCElswitch = new Class({ Extends: MWF.FCElswitch });
MWF.APPPD.Module.Elswitch.templateJsonPath = "../x_component_process_FormDesigner/Module/";
MWF.APPPD.Module.Elcontainer = MWF.PCElcontainer = new Class({ Extends: MWF.FCElcontainer });
MWF.APPPD.Module.Elcontainer.templateJsonPath = "../x_component_process_FormDesigner/Module/";
MWF.APPPD.Module.Elcontainer$Main = MWF.PCElcontainer$Main = new Class({ Extends: MWF.FCElcontainer$Main });
MWF.APPPD.Module.Elcontainer$Main.templateJsonPath = "../x_component_process_FormDesigner/Module/";
MWF.APPPD.Module.Elcontainer$Aside = MWF.PCElcontainer$Aside = new Class({ Extends: MWF.FCElcontainer$Aside });
MWF.APPPD.Module.Elcontainer$Aside.templateJsonPath = "../x_component_process_FormDesigner/Module/";
MWF.APPPD.Module.Elcontainer$Footer = MWF.PCElcontainer$Footer = new Class({ Extends: MWF.FCElcontainer$Footer });
MWF.APPPD.Module.Elcontainer$Footer.templateJsonPath = "../x_component_process_FormDesigner/Module/";
MWF.APPPD.Module.Elcontainer$Header = MWF.PCElcontainer$Header = new Class({ Extends: MWF.FCElcontainer$Header });
MWF.APPPD.Module.Elcontainer$Header.templateJsonPath = "../x_component_process_FormDesigner/Module/";
MWF.APPPD.Module.Elcontainer$Container = MWF.PCElcontainer$Container = {};
MWF.PCElcontainer$Header.templateJsonPath = "../x_component_process_FormDesigner/Module/";
......@@ -34,4 +34,5 @@ MWF.xDesktop.requireApp("portal.PageDesigner", "Module.Statement", null, false);
MWF.xDesktop.requireApp("portal.PageDesigner", "Module.Datagrid", null, false);
MWF.xDesktop.requireApp("portal.PageDesigner", "Module.Datatable", null, false);
MWF.xDesktop.requireApp("portal.PageDesigner", "Module.Datatemplate", null, false);
MWF.xDesktop.requireApp("portal.PageDesigner", "Module.Importer", null, false);
\ No newline at end of file
MWF.xDesktop.requireApp("portal.PageDesigner", "Module.Importer", null, false);
MWF.xDesktop.requireApp("portal.PageDesigner", "Module.ElementUI", null, false);
......@@ -374,7 +374,7 @@ MWF.xApplication.portal.PageDesigner.Module.Page = MWF.PCPage = new Class({
if (this.dataTemplate[className]){
if (callback) callback(this.dataTemplate[className]);
}else{
var templateUrl = "../x_component_portal_PageDesigner/Module/"+className+"/template.json";
var templateUrl = (MWF["PC"+className].templateJsonPath || "../x_component_portal_PageDesigner/Module/")+className+"/template.json";
MWF.getJSON(templateUrl, function(responseJSON, responseText){
this.dataTemplate[className] = responseJSON;
if (callback) callback(responseJSON);
......
......@@ -265,7 +265,15 @@ MWF.APPPD.LP = {
"widget": "部件",
"widgetmodules": "部件元素",
"address": "地址",
"importer": "数据导入"
"importer": "数据导入",
"group_all": "所有组件",
"group_form": "表单组件",
"group_layout": "布局组件",
"group_data": "数据组件",
"group_filetext": "文件编辑组件",
"group_function": "功能组件",
"group_element": "Element组件",
},
"filedConfigurator": {
"sequence": "序号",
......
......@@ -52,8 +52,21 @@
"float": "right",
"cursor": "pointer"
},
"toolbarTitleCategoryActionNode": {
"width": "22px",
"height": "22px",
"margin-top": "-26px",
"margin-right": "22px",
"background": "url(../x_component_process_FormDesigner/$Main/default/category.png) no-repeat center center",
"float": "right",
"cursor": "pointer"
},
"toolbarGroupContentNode": {
"overflow": "hidden"
},
"toolbarContentNode": {
"background-color": "#DDD",
"background-color": "#FFFFFF",
"border-radius": "0px",
"margin": "2px",
"padding-right": "4px",
......
{
"htmledit": {
"icon": "htmleditor.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.htmledit,
"className": "Htmleditor"
},
"office": {
"icon": "office.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.office,
"className": "Office"
},
"iWebOffice": {
"icon": "iWebOffice.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.iWebOffice,
"className": "IWebOffice"
},
"yozoOffice": {
"icon": "yozoOffice.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.yozoOffice,
"className": "YozoOffice"
},
"onlyOffice": {
"icon": "onlyOffice.png",
"text": "onlyOffice",
"className": "OnlyOffice"
},
"wpsOffice": {
"icon": "wpsOffice.png",
"text": "wpsOffice",
"className": "WpsOffice"
}
}
{
"label": {
"icon": "label.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.label,
"className": "Label"
},
"textfield": {
"icon": "textfield.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.textfield,
"className": "Textfield"
},
"number": {
"icon": "number.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.number,
"className": "Number"
},
"org": {
"icon": "personfield.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.org,
"className": "Org"
},
"calendar": {
"icon": "calendar.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.calendar,
"className": "Calendar"
},
"textarea": {
"icon": "textarea.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.textarea,
"className": "Textarea"
},
"select": {
"icon": "select.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.select,
"className": "Select"
},
"radio": {
"icon": "radio.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.radio,
"className": "Radio"
},
"checkbox": {
"icon": "checkbox.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.checkbox,
"className": "Checkbox"
},
"combox": {
"icon": "combox.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.combox,
"className": "Combox"
},
"opinion": {
"icon": "opinion.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.opinion,
"className": "Opinion"
},
"button": {
"icon": "button.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.button,
"className": "Button"
},
"Address": {
"icon": "address.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.Address,
"className": "Address"
},
"attachment": {
"icon": "attachment.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.attachment,
"className": "Attachment"
},
"datatable": {
"icon": "datagrid.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.datatable,
"className": "Datatable"
},
"datatemplate": {
"icon": "datatemplate.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.datatemplate,
"className": "Datatemplate"
},
"documenteditor": {
"icon": "documenteditor.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.documenteditor,
"className": "Documenteditor"
},
"htmledit": {
"icon": "htmleditor.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.htmledit,
"className": "Htmleditor"
}
}
{
"ViewSelector": {
"icon": "viewSelector.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.ViewSelector,
"className": "ViewSelector"
},
"view": {
"icon": "view.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.view,
"className": "View"
},
"stat": {
"icon": "stat.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.stat,
"className": "Stat"
},
"documenteditor": {
"icon": "documenteditor.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.documenteditor,
"className": "Documenteditor"
},
"statementSelector": {
"icon": "statementSelector.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.statementSelector,
"className": "StatementSelector"
},
"statement": {
"icon": "statement.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.statement,
"className": "Statement"
},
"importer": {
"icon": "importer.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.importer,
"className": "Importer"
}
}
{
"label": {
"icon": "label.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.label,
"className": "Label"
},
"button": {
"icon": "button.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.button,
"className": "Button"
},
"image": {
"icon": "image.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.image,
"className": "Image"
},
"imageclipper": {
"icon": "imageclipper.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.imageclipper,
"className": "ImageClipper"
},
"div": {
"icon": "div.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.div,
"className": "Div"
},
"table": {
"icon": "table.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.table,
"className": "Table"
},
"datatemplate": {
"icon": "datatemplate.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.datatemplate,
"className": "Datatemplate"
},
"subform": {
"icon": "subform.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.subform,
"className": "Subform"
},
"html": {
"icon": "html.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.html,
"className": "Html"
},
"common": {
"icon": "common.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.common,
"className": "Common"
},
"tab": {
"icon": "tabs.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.tab,
"className": "Tab"
},
"tree": {
"icon": "tree.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.tree,
"className": "Tree"
},
"iframe": {
"icon": "iframe.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.iframe,
"className": "Iframe"
}
}
{
"opinion": {
"icon": "opinion.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.opinion,
"className": "Opinion"
},
"Actionbar": {
"icon": "actionbar.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.Actionbar,
"className": "Actionbar"
},
"Sidebar": {
"icon": "sidebar.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.Sidebar,
"className": "Sidebar"
},
"attachment": {
"icon": "attachment.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.attachment,
"className": "Attachment"
},
"subform": {
"icon": "subform.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.subform,
"className": "Subform"
},
"log": {
"icon": "log.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.log,
"className": "Log"
},
"readLog": {
"icon": "log.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.readLog,
"className": "ReadLog"
},
"monitor": {
"icon": "monitor.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.monitor,
"className": "Monitor"
},
"documenteditor": {
"icon": "documenteditor.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.documenteditor,
"className": "Documenteditor"
}
}
......@@ -162,6 +162,11 @@
"text": MWF.xApplication.process.FormDesigner.LP.modules.log,
"className": "Log"
},
"readLog": {
"icon": "log.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.readLog,
"className": "ReadLog"
},
"monitor": {
"icon": "monitor.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.monitor,
......@@ -187,6 +192,26 @@
"text": MWF.xApplication.process.FormDesigner.LP.modules.office,
"className": "Office"
},
"iWebOffice": {
"icon": "iWebOffice.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.iWebOffice,
"className": "IWebOffice"
},
"yozoOffice": {
"icon": "yozoOffice.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.yozoOffice,
"className": "YozoOffice"
},
"onlyOffice": {
"icon": "onlyOffice.png",
"text": "onlyOffice",
"className": "OnlyOffice"
},
"wpsOffice": {
"icon": "wpsOffice.png",
"text": "wpsOffice",
"className": "WpsOffice"
},
"statementSelector": {
"icon": "statementSelector.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.statementSelector,
......
......@@ -2,7 +2,32 @@
{
"name": "default",
"json": "tools.json",
"text": MWF.xApplication.process.FormDesigner.LP.modules.group_system,
"text": MWF.xApplication.process.FormDesigner.LP.modules.group_all,
},
{
"name": "form",
"json": "tools-form.json",
"text": MWF.xApplication.process.FormDesigner.LP.modules.group_form,
},
{
"name": "layout",
"json": "tools-layout.json",
"text": MWF.xApplication.process.FormDesigner.LP.modules.group_layout,
},
{
"name": "process",
"json": "tools-process.json",
"text": MWF.xApplication.process.FormDesigner.LP.modules.group_process,
},
{
"name": "function",
"json": "tools-function.json",
"text": MWF.xApplication.process.FormDesigner.LP.modules.group_function,
},
{
"name": "filetext",
"json": "tools-filetext.json",
"text": MWF.xApplication.process.FormDesigner.LP.modules.group_filetext,
},
{
"name": "element",
......
......@@ -10,7 +10,7 @@
"text": MWF.xApplication.process.FormDesigner.LP.modules.group_form,
},
{
"name": "form",
"name": "layout",
"json": "tools-layout.json",
"text": MWF.xApplication.process.FormDesigner.LP.modules.group_layout,
},
......
......@@ -102,7 +102,7 @@ MWF.xApplication.process.FormDesigner.Module.Elcontainer$Aside = MWF.FCElcontain
Extends: MWF.FCElcontainer$Main,
Implements: [Options, Events],
_initModuleType: function(){
this.className = "Elcontainer$Aside"
this.className = "Elcontainer$Aside";
this.moduleType = "container";
this.moduleName = "elcontainer$Aside";
this.cssName = "css_aside";
......@@ -112,7 +112,7 @@ MWF.xApplication.process.FormDesigner.Module.Elcontainer$Footer = MWF.FCElcontai
Extends: MWF.FCElcontainer$Main,
Implements: [Options, Events],
_initModuleType: function(){
this.className = "Elcontainer$Footer"
this.className = "Elcontainer$Footer";
this.moduleType = "container";
this.moduleName = "elcontainer$Footer";
this.cssName = "css_footer";
......@@ -122,7 +122,7 @@ MWF.xApplication.process.FormDesigner.Module.Elcontainer$Header = MWF.FCElcontai
Extends: MWF.FCElcontainer$Main,
Implements: [Options, Events],
_initModuleType: function(){
this.className = "Elcontainer$Header"
this.className = "Elcontainer$Header";
this.moduleType = "container";
this.moduleName = "elcontainer$Header";
this.cssName = "css_header";
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册