Main.js 72 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652
  1. MWF.xApplication.AppCenter = MWF.xApplication.AppCenter || {};
  2. MWF.xDesktop.requireApp("AppCenter", "lp."+MWF.language, null, false);
  3. MWF.xApplication.AppCenter.Main = new Class({
  4. Extends: MWF.xApplication.Common.Main,
  5. Implements: [Options, Events],
  6. options: {
  7. "style": "default",
  8. "name": "AppCenter",
  9. "icon": "icon.png",
  10. "width": "1000",
  11. "height": "700",
  12. "title": MWF.xApplication.AppCenter.LP.title
  13. },
  14. onQueryLoad: function(){
  15. this.lp = MWF.xApplication.AppCenter.LP;
  16. this.actions = MWF.Actions.get("x_program_center");
  17. },
  18. loadApplication: function(callback){
  19. this.components = [];
  20. //this.node = new Element("div", {"styles": {"width": "100%", "height": "100%", "overflow": "hidden"}}).inject(this.content);
  21. this.loadTitle();
  22. this.contentNode = new Element("div", {"styles": this.css.contentNode}).inject(this.content);
  23. this.contentModuleArea = new Element("div", {"styles": this.css.contentModuleArea}).inject(this.contentNode);
  24. this.setContentSize();
  25. this.addEvent("resize", this.setContentSize);
  26. this.loadModuleContent();
  27. },
  28. loadTitle: function(){
  29. this.titleBar = new Element("div", {"styles": this.css.titleBar}).inject(this.content);
  30. if (MWF.AC.isProcessPlatformCreator()){
  31. this.createApplicationNode = new Element("div", {
  32. "styles": this.css.createApplicationNode,
  33. "title": this.lp.export
  34. }).inject(this.titleBar);
  35. this.createApplicationNode.addEvent("click", function(){
  36. this.createApplication();
  37. }.bind(this));
  38. this.importApplicationNode = new Element("div", {
  39. "styles": this.css.setupApplicationNode,
  40. "title": this.lp.setup
  41. }).inject(this.titleBar);
  42. this.importApplicationNode.addEvent("click", function(){
  43. this.implodeLocal();
  44. }.bind(this));
  45. }
  46. this.taskTitleTextNode = new Element("div", {"styles": this.css.titleTextNode,"text": this.lp.title}).inject(this.titleBar);
  47. },
  48. implodeLocal: function(){
  49. if (!this.uploadFileAreaNode){
  50. this.uploadFileAreaNode = new Element("div");
  51. var html = "<input name=\"file\" type=\"file\" accept=\".xapp\"/>";
  52. this.uploadFileAreaNode.set("html", html);
  53. this.fileUploadNode = this.uploadFileAreaNode.getFirst();
  54. this.fileUploadNode.addEvent("change", this.implodeLocalFile.bind(this));
  55. }else{
  56. if (this.fileUploadNode) this.fileUploadNode.destroy();
  57. this.uploadFileAreaNode.empty();
  58. var html = "<input name=\"file\" type=\"file\" accept=\".xapp\"/>";
  59. this.uploadFileAreaNode.set("html", html);
  60. this.fileUploadNode = this.uploadFileAreaNode.getFirst();
  61. this.fileUploadNode.addEvent("change", this.implodeLocalFile.bind(this));
  62. }
  63. this.fileUploadNode.click();
  64. },
  65. implodeLocalFile: function(){
  66. var files = this.fileUploadNode.files;
  67. if (files.length){
  68. var file = files[0];
  69. var position = this.titleBar.getPosition(this.content);
  70. var size = this.contentNode.getSize();
  71. var width = size.x*0.9;
  72. if (width>600) width = 600;
  73. var height = size.y*0.9;
  74. var x = (size.x-width)/2;
  75. var y = (size.y-height)/2;
  76. var setupModule = null;
  77. MWF.require("MWF.xDesktop.Dialog", function(){
  78. var dlg = new MWF.xDesktop.Dialog({
  79. "title": this.lp.setupTitle,
  80. "style": "appMarket",
  81. "top": y+20,
  82. "left": x,
  83. "fromTop":position.y,
  84. "fromLeft": position.x,
  85. "width": width,
  86. "height": height,
  87. "html": "",
  88. "maskNode": this.content,
  89. "container": this.content,
  90. "buttonList": [
  91. {
  92. "text": this.lp.ok,
  93. "action": function(){
  94. if (setupModule) setupModule.setup();
  95. this.close();
  96. }
  97. },
  98. {
  99. "text": this.lp.cancel,
  100. "action": function(){this.close();}
  101. }
  102. ]
  103. });
  104. dlg.show();
  105. setupModule = new MWF.xApplication.AppCenter.Module.SetupLocal(file, dlg, this);
  106. }.bind(this));
  107. }
  108. },
  109. setContentSize: function(){
  110. var size = this.content.getSize();
  111. var titleSize = this.titleBar.getSize();
  112. var height = size.y-titleSize.y;
  113. this.contentNode.setStyles({"height": ""+height+"px", "overflow": "auto"});
  114. var max = size.x*0.98;
  115. var n = (size.x/320).toInt();
  116. var x = n*320;
  117. while (x>max){
  118. n--;
  119. x = n*320;
  120. }
  121. this.contentModuleArea.setStyle("width", ""+x+"px");
  122. },
  123. loadModuleContent: function(){
  124. this.actions.listStructure(function(json){
  125. this.moduleList = json.data;
  126. if (this.moduleList.length){
  127. this.moduleList.each(function(module){
  128. new MWF.xApplication.AppCenter.Module(this, module);
  129. }.bind(this));
  130. }else{
  131. this.createEmptyElement();
  132. }
  133. }.bind(this));
  134. },
  135. createEmptyElement: function(){
  136. this.emptyNode = new Element("div", {"styles": this.css.emptyNode}).inject(this.contentModuleArea);
  137. if (MWF.AC.isProcessPlatformCreator()){
  138. this.emptyNode.set("text", this.lp.emptyModuleManagerInfo);
  139. this.emptyNode.addEvent("click", function(){
  140. this.createApplication();
  141. }.bind(this));
  142. }else{
  143. this.emptyNode.set("text", this.lp.emptyModuleInfo);
  144. }
  145. },
  146. createApplication: function(target,id){
  147. if(id) this.curAppId = id;
  148. if(target) this.content = target;
  149. new MWF.xApplication.AppCenter.Exporter(this);
  150. }
  151. });
  152. MWF.xApplication.AppCenter.Module = new Class({
  153. initialize: function(app, data){
  154. this.app = app;
  155. this.data = data;
  156. this.json = JSON.decode(this.data.data);
  157. this.json.structure = this.data.id;
  158. this.lp = this.app.lp;
  159. this.css = this.app.css;
  160. this.content = this.app.contentModuleArea;
  161. this.load();
  162. },
  163. load: function(){
  164. this.node = new Element("div", {"styles": this.css.moduleNode}).inject(this.content);
  165. this.iconNode = new Element("div", {"styles": this.css.moduleIconNode}).inject(this.node);
  166. this.contentNode = new Element("div", {"styles": this.css.moduleContentNode}).inject(this.node);
  167. this.nameNode = new Element("div", {"styles": this.css.moduleNameNode}).inject(this.contentNode);
  168. this.categoryNode = new Element("div", {"styles": this.css.moduleCategoryNode}).inject(this.contentNode);
  169. this.descriptionNode = new Element("div", {"styles": this.css.moduleDescriptionNode}).inject(this.contentNode);
  170. this.actionNode = new Element("div", {"styles": this.css.moduleActionNode}).inject(this.contentNode);
  171. this.viewActionNode = new Element("div", {"styles": this.css.moduleActionNode}).inject(this.contentNode);
  172. this.deleteActionNode = new Element("div", {"styles": this.css.moduleDeleteActionNode}).inject(this.contentNode);
  173. this.deleteActionNode.set("text", this.lp.delete);
  174. this.nameNode.set("text", this.data.name);
  175. this.categoryNode.set("text", this.data.createTime);
  176. this.descriptionNode.set("text", this.data.description);
  177. this.actionNode.set("text", this.lp.output);
  178. this.viewActionNode.set("text", this.lp.outputView);
  179. this.viewActionNode.setStyle("margin-left", "10px");
  180. this.loadEvent();
  181. },
  182. loadEvent: function(){
  183. this.actionNode.addEvent("click", function(e){
  184. var uri = this.app.actions.action.actions["download"].uri;
  185. uri = uri.replace("{flag}", this.json.structure);
  186. window.open(this.app.actions.action.address+uri);
  187. }.bind(this));
  188. this.viewActionNode.addEvent("click", function(e){
  189. this.outputApp();
  190. e.stopPropagation();
  191. }.bind(this));
  192. this.node.addEvent("click", function(){
  193. this.openApp();
  194. }.bind(this));
  195. var _self = this;
  196. this.deleteActionNode.addEvent("click",function (e) {
  197. this.app.confirm("warn", e, "tip", "confirm delete?", 300, 120, function(){
  198. this.structureRes = _self.app.actions.removeStructure(_self.json.structure,function(json){
  199. _self.app.notice("success");
  200. _self.node.destroy();
  201. }.bind(this));
  202. this.close();
  203. }, function(){
  204. this.close();
  205. }, null);
  206. }.bind(this));
  207. },
  208. outputApp: function(){
  209. new MWF.xApplication.AppCenter.Exporter(this.app, this.json)
  210. },
  211. openApp: function(){
  212. }
  213. });
  214. MWF.xApplication.AppCenter.Exporter = new Class({
  215. initialize: function(app, selectData){
  216. this.app = app;
  217. this.lp = this.app.lp;
  218. this.css = this.app.css;
  219. this.structure = null;
  220. this.dlg = null;
  221. this.selectData = selectData || {
  222. "structure": "",
  223. "name": "",
  224. "description": "",
  225. "processPlatformList": [],
  226. "portalList": [],
  227. "queryList": [],
  228. "serviceModuleList": [],
  229. "cmsList": []
  230. };
  231. this.setp = 1;
  232. this.load();
  233. },
  234. loadStructure: function(){
  235. this.structureRes = this.app.actions.outputStructure(function(json){
  236. if(this.app.curAppId){
  237. var cmsList = json.data.cmsList;
  238. var portalList = json.data.portalList;
  239. var processPlatformList = json.data.processPlatformList;
  240. var queryList = json.data.queryList;
  241. var serviceModuleList = json.data.serviceModuleList;
  242. var curAppData = {
  243. "portalList":[],
  244. "cmsList":[],
  245. "processPlatformList":[],
  246. "queryList":[],
  247. "serviceModuleList":[]
  248. };
  249. cmsList.each(function (cms) {
  250. if(cms.id===this.app.curAppId) {
  251. curAppData.cmsList.push(cms);
  252. }
  253. }.bind(this));
  254. portalList.each(function (portal) {
  255. if(portal.id === this.app.curAppId){
  256. curAppData.portalList.push(portal);
  257. }
  258. }.bind(this));
  259. processPlatformList.each(function (processPlatform) {
  260. if(processPlatform.id===this.app.curAppId){
  261. curAppData.processPlatformList.push(processPlatform)
  262. }
  263. }.bind(this));
  264. queryList.each(function (query) {
  265. if(query.id===this.app.curAppId) {
  266. curAppData.queryList.push(query);
  267. }
  268. }.bind(this));
  269. serviceModuleList.each(function (service) {
  270. if(service.id===this.app.curAppId) {
  271. curAppData.serviceModuleList.push(service);
  272. }
  273. }.bind(this));
  274. this.structure = curAppData;
  275. }else{
  276. this.structure = json.data;
  277. }
  278. this.createContent();
  279. }.bind(this));
  280. },
  281. showDlg: function(callback){
  282. var position = this.app.createApplicationNode.getPosition(this.app.content);
  283. var size = this.app.content.getSize();
  284. var width = size.x*0.9;
  285. if (width>600) width = 600;
  286. var height = size.y*0.8;
  287. var x = (size.x-width)/2;
  288. var y = (size.y-height)/2;
  289. if (y<80) y = 80;
  290. var _self = this;
  291. MWF.require("MWF.xDesktop.Dialog", function(){
  292. this.dlg = new MWF.xDesktop.Dialog({
  293. "title": this.lp.exportTitle,
  294. "style": "appCenter",
  295. "top": y+20,
  296. "left": x,
  297. "fromTop":position.y,
  298. "fromLeft": position.x,
  299. "width": width,
  300. "height": height,
  301. "html": "",
  302. "maskNode": this.app.content,
  303. "container": this.app.content,
  304. "buttonList": [
  305. {
  306. "text": this.lp.next,
  307. "action": function(){
  308. _self.next();
  309. //this.close();
  310. }
  311. },
  312. {
  313. "text": this.lp.prev,
  314. "action": function(){
  315. _self.prev();
  316. //this.close();
  317. }
  318. },
  319. {
  320. "text": this.lp.ok,
  321. "action": function(){
  322. _self.output();
  323. //this.close();
  324. }
  325. },
  326. {
  327. "text": this.lp.cancel,
  328. "action": function(){
  329. this.close();
  330. if (_self.structureRes){
  331. if (_self.structureRes.isRunning()){_self.structureRes.cancel();}
  332. _self.structureRes = null;
  333. }
  334. }
  335. }
  336. ],
  337. "onPostShow": function(){
  338. if (callback) callback();
  339. }.bind(this),
  340. "onPostClose": function() {
  341. _self.app.fireEvent("exporterClose");
  342. MWF.release(_self);
  343. }
  344. });
  345. this.dlg.show();
  346. }.bind(this));
  347. },
  348. checkInput: function(){
  349. var name = this.moduleNameInput.get("value");
  350. var category = this.moduleCategoryInput.get("value");
  351. var description = this.moduleDescriptionInput.get("value");
  352. if (!name){
  353. this.app.notice(this.lp.noNameError, "error");
  354. return false;
  355. }
  356. if (!this.selectData.processPlatformList.length &&
  357. !this.selectData.portalList.length &&
  358. !this.selectData.queryList.length &&
  359. !this.selectData.serviceModuleList.length &&
  360. !this.selectData.cmsList.length){
  361. this.app.notice(this.lp.noModuleError, "error");
  362. return false;
  363. }
  364. this.selectData.name = name;
  365. this.selectData.category = category;
  366. this.selectData.description = description;
  367. return true;
  368. },
  369. next: function(){
  370. if (this.setp==1){
  371. if (this.checkInput()) this.showStatus();
  372. }
  373. },
  374. prev: function(){
  375. if (this.step==2){
  376. if (this.statusContentNode){
  377. this.statusContentNode.destroy();
  378. this.statusContentNode = null;
  379. }
  380. this.contentNode.setStyle("display", "block");
  381. this.okBut.setStyle("display", "none");
  382. this.prevBut.setStyle("display", "nonde");
  383. this.nextBut.setStyle("display", "inline");
  384. }
  385. },
  386. output: function(){
  387. if (this.step==2){
  388. if (this.checkInput()){
  389. MWF.require("o2.widget.Mask", function(){
  390. this.mask = new o2.widget.Mask();
  391. this.mask.loadNode(this.dlg.node);
  392. this.app.actions.output(this.selectData, function(json){
  393. var uri = this.app.actions.action.actions["download"].uri;
  394. uri = uri.replace("{flag}", json.data.flag);
  395. if (this.mask) this.mask.hide();
  396. this.dlg.close();
  397. window.open(this.app.actions.action.address+uri);
  398. MWF.release(this);
  399. }.bind(this), function(xhr, text, error){
  400. if (xhr.status!=0){
  401. var errorText = error;
  402. if (xhr){
  403. var json = JSON.decode(xhr.responseText);
  404. if (json){
  405. errorText = json.message.trim() || "request json error";
  406. }else{
  407. errorText = "request json error: "+xhr.responseText;
  408. }
  409. }
  410. MWF.xDesktop.notice("error", {x: "right", y:"top"}, errorText);
  411. }
  412. if (this.mask) this.mask.hide();
  413. }.bind(this));
  414. }.bind(this));
  415. }
  416. }
  417. },
  418. showStatus: function(){
  419. this.statusContentNode = new Element("div", {"styles": this.css.moduleSelectContentAreaNode}).inject(this.contentNode, "after");
  420. this.statusTitleNode = new Element("div", {"styles": this.css.moduleSelectTitleNode, "text": this.lp.selected}).inject(this.statusContentNode);
  421. this.statusInfoNode = new Element("div", {"styles": this.css.moduleSelectContentNode}).inject(this.statusContentNode);
  422. var size = this.contentNode.getSize();
  423. var position = this.contentNode.getPosition(this.contentNode.getOffsetParent());
  424. var css = {
  425. "height": ""+size.y+"px",
  426. "width": ""+size.x+"px",
  427. "top": ""+position.y+"px",
  428. "left": ""+position.x+"px",
  429. "background-color": "#eeeeee"
  430. };
  431. this.statusContentNode.setStyles(css);
  432. var titleSize = this.statusTitleNode.getSize();
  433. var h = size.y-titleSize.y-20;
  434. this.statusInfoNode.setStyle("height", ""+h+"px");
  435. this.showStatusList();
  436. this.contentNode.setStyle("display", "none");
  437. this.okBut.setStyle("display", "inline");
  438. this.prevBut.setStyle("display", "inline");
  439. this.nextBut.setStyle("display", "none");
  440. this.step = 2;
  441. },
  442. showStatusList: function(){
  443. this.showStatusItemList("processPlatformList", ["processList", "formList", "applicationDictList", "scriptList", "fileList"]);
  444. this.showStatusItemList("portalList", ["pageList", "scriptList", "widgetList", "fileList"]);
  445. this.showStatusItemList("cmsList", ["categoryInfoList", "formList", "appDictList", "scriptList"]);
  446. this.showStatusItemList("queryList", ["viewList", "statList", "revealList", "tableList", "statementList"]);
  447. this.showStatusItemList("serviceModuleList", ["agentList", "invokeList"]);
  448. },
  449. showStatusItemList: function(listName, subList){
  450. this.selectData[listName].each(function(app){
  451. new Element("div", {"styles": this.css.moduleStatusInforNode1, "text": "["+this.lp[listName]+"] "+(app.name || app.appName)}).inject(this.statusInfoNode);
  452. subList.each(function(name){
  453. if (app[name] && app[name].length) app[name].each(function(process){
  454. new Element("div", {"styles": this.css.moduleStatusInforNode2, "text": "["+this.lp[name]+"] "+(process.name || process.categoryName)}).inject(this.statusInfoNode);
  455. }.bind(this));
  456. }.bind(this));
  457. }.bind(this));
  458. },
  459. load: function(){
  460. this.showDlg(function(){
  461. this.createLayout();
  462. this.loadStructure();
  463. }.bind(this));
  464. },
  465. createLayout: function(){
  466. this.nextBut = this.dlg.button.getFirst("input");
  467. this.prevBut = this.nextBut.getNext("input");
  468. this.okBut = this.prevBut.getNext("input");
  469. if (this.setp==1){
  470. this.okBut.setStyle("display", "none");
  471. this.prevBut.setStyle("display", "none");
  472. }
  473. this.node = new Element("div", {"styles": this.css.moduleSetupContentNode}).inject(this.dlg.content);
  474. this.titleNode = new Element("div", {"styles": this.css.moduleSetupTitleNode}).inject(this.node);
  475. var iconNode = new Element("div", {"styles": this.css.moduleIconNode}).inject(this.titleNode);
  476. var contentNode = new Element("div", {"styles": this.css.moduleSetupTitleContentNode}).inject(this.titleNode);
  477. var nameNode = new Element("div", {"styles": this.css.moduleSetupNameNode}).inject(contentNode);
  478. var categoryNode = new Element("div", {"styles": this.css.moduleSetupCategoryNode}).inject(contentNode);
  479. categoryNode.hide();
  480. var descriptionNode = new Element("div", {"styles": this.css.moduleSetupDescriptionNode}).inject(contentNode);
  481. var nameTitleNode = new Element("div", {"styles": this.css.moduleInputTitleNode, "text": this.lp.moduleName}).inject(nameNode);
  482. var nameContentNode = new Element("div", {"styles": this.css.moduleInputContentNode}).inject(nameNode);
  483. this.moduleNameInput = new Element("input", {"styles": this.css.moduleInputNode}).inject(nameContentNode);
  484. var categoryTitleNode = new Element("div", {"styles": this.css.moduleInputTitleNode, "text": this.lp.moduleCategory}).inject(categoryNode);
  485. var categoryContentNode = new Element("div", {"styles": this.css.moduleInputContentNode}).inject(categoryNode);
  486. this.moduleCategoryInput = new Element("input", {"styles": this.css.moduleInputNode}).inject(categoryContentNode);
  487. var descriptionTitleNode = new Element("div", {"styles": this.css.moduleInputTitleNode, "text": this.lp.moduleDescription}).inject(descriptionNode);
  488. var descriptionContentNode = new Element("div", {"styles": this.css.moduleInputContentNode}).inject(descriptionNode);
  489. this.moduleDescriptionInput = new Element("input", {"styles": this.css.moduleInputNode}).inject(descriptionContentNode);
  490. this.moduleNameInput.set("value", this.selectData.name);
  491. this.moduleCategoryInput.set("value", this.selectData.category);
  492. this.moduleDescriptionInput.set("value", this.selectData.description);
  493. this.contentNode = new Element("div", {"styles": this.css.moduleSetupCompareContentNode}).inject(this.node);
  494. this.setListContentSize();
  495. this.createLoading(this.contentNode);
  496. },
  497. setListContentSize: function(){
  498. var size = this.dlg.content.getSize();
  499. var h = size.y;
  500. var titleH = this.titleNode.getSize().y+10;
  501. var contentH = h-titleH-10;
  502. this.contentNode.setStyle("height", ""+contentH+"px");
  503. },
  504. createLoading: function(node){
  505. //this.okBut.setStyle("display", "none");
  506. this.nextBut.setStyle("display", "none");
  507. this.loadingAreaNode = new Element("div", {"styles": this.css.moduleLoadingAreaNode}).inject(node);
  508. var img = new Element("img", {
  509. "styles": this.css.moduleLoadingImgNode,
  510. "src": this.app.path+this.app.options.style+"/icon/loading.gif"
  511. }).inject(this.loadingAreaNode);
  512. },
  513. clearLoading: function(){
  514. if (this.loadingAreaNode){
  515. this.loadingAreaNode.destroy();
  516. this.loadingAreaNode = null;
  517. }
  518. //this.okBut.setStyle("display", "inline");
  519. this.nextBut.setStyle("display", "inline");
  520. },
  521. createContent: function(){
  522. this.clearLoading();
  523. this.createListArea();
  524. this.loadProcessList();
  525. this.loadPortalList();
  526. this.loadCMSList();
  527. this.loadQueryList();
  528. this.loadServiceList();
  529. //this.structure
  530. },
  531. createListArea: function(){
  532. this.contentAreaNode = new Element("div").inject(this.contentNode);
  533. // this.contentInforNode = new Element("div", {"styles": this.css.moduleSetupContentInforNode, "text": this.lp.selectModules}).inject(this.contentAreaNode);
  534. // //this.processArea = new Element("div", {"styles": this.css.moduleSetupListAreaNode}).inject(this.contentNode);
  535. //
  536. // this.listAreaNode = new Element("div").inject(this.contentAreaNode);
  537. this.processAreaTitle = new Element("div", {"styles": this.css.moduleSetupListAreaTitleNode, "text": this.lp.process}).inject(this.contentAreaNode);
  538. this.processAreaContent = new Element("div", {"styles": this.css.moduleSetupListAreaContentNode}).inject(this.contentAreaNode);
  539. this.portalAreaTitle = new Element("div", {"styles": this.css.moduleSetupListAreaTitleNode, "text": this.lp.portal}).inject(this.contentAreaNode);
  540. this.portalAreaContent = new Element("div", {"styles": this.css.moduleSetupListAreaContentNode}).inject(this.contentAreaNode);
  541. this.cmsAreaTitle = new Element("div", {"styles": this.css.moduleSetupListAreaTitleNode, "text": this.lp.cms}).inject(this.contentAreaNode);
  542. this.cmsAreaContent = new Element("div", {"styles": this.css.moduleSetupListAreaContentNode}).inject(this.contentAreaNode);
  543. this.queryAreaTitle = new Element("div", {"styles": this.css.moduleSetupListAreaTitleNode, "text": this.lp.query}).inject(this.contentAreaNode);
  544. this.queryAreaContent = new Element("div", {"styles": this.css.moduleSetupListAreaContentNode}).inject(this.contentAreaNode);
  545. this.serviceAreaTitle = new Element("div", {"styles": this.css.moduleSetupListAreaTitleNode, "text": this.lp.service}).inject(this.contentAreaNode);
  546. this.serviceAreaContent = new Element("div", {"styles": this.css.moduleSetupListAreaContentNode}).inject(this.contentAreaNode);
  547. },
  548. loadProcessList: function(){
  549. this.processListNodes = [];
  550. this.structure.processPlatformList.each(function(item){
  551. var postData = null;
  552. for (var i=0; i<this.selectData.processPlatformList.length; i++){
  553. if (this.selectData.processPlatformList[i].id == item.id){
  554. postData = this.selectData.processPlatformList[i];
  555. break;
  556. }
  557. }
  558. this.processListNodes.push(new MWF.xApplication.AppCenter.Exporter.ProcessElement(this, this.processAreaContent, item, postData));
  559. }.bind(this));
  560. },
  561. loadPortalList: function(){
  562. this.portalListNodes = [];
  563. this.structure.portalList.each(function(item){
  564. this.portalListNodes.push(new MWF.xApplication.AppCenter.Exporter.PortalElement(this, this.portalAreaContent, item));
  565. }.bind(this));
  566. },
  567. loadCMSList: function(){
  568. this.cmsListNodes = [];
  569. this.structure.cmsList.each(function(item){
  570. this.cmsListNodes.push(new MWF.xApplication.AppCenter.Exporter.CmsElement(this, this.cmsAreaContent, item));
  571. }.bind(this));
  572. },
  573. loadQueryList: function(){
  574. this.queryListNodes = [];
  575. this.structure.queryList.each(function(item){
  576. this.queryListNodes.push(new MWF.xApplication.AppCenter.Exporter.QueryElement(this, this.queryAreaContent, item));
  577. }.bind(this));
  578. },
  579. loadServiceList: function(){
  580. this.serviceListNodes = [];
  581. this.structure.serviceModuleList.each(function(item){
  582. this.serviceListNodes.push(new MWF.xApplication.AppCenter.Exporter.ServiceElement(this, this.serviceAreaContent, item));
  583. }.bind(this));
  584. }
  585. });
  586. MWF.xApplication.AppCenter.Exporter.Element = new Class({
  587. initialize: function(exporter, content, data, postData){
  588. this.exporter = exporter;
  589. this.app = this.exporter.app;
  590. this.data = data;
  591. this.lp = this.app.lp;
  592. this.css = this.app.css;
  593. this.content = content;
  594. this.initPostData(postData);
  595. //this.selectStatus = selectStatus || "none";
  596. this.load();
  597. },
  598. initPostData: function(postData){
  599. this.postData = postData || {
  600. "id": this.data.id,
  601. "name": this.data.name || this.data.appName,
  602. "alias": this.data.alias,
  603. "description": this.data.description,
  604. "processList": [],
  605. "formList": [],
  606. "applicationDictList": [],
  607. "scriptList": [],
  608. "fileList": []
  609. };
  610. },
  611. load: function(){
  612. this.contentNode = new Element("div", {"styles": this.css.moduleSetupListContentNode}).inject(this.content);
  613. this.iconNode = new Element("div", {"styles": this.css.moduleSetupListIconNode}).inject(this.contentNode);
  614. this.actionNode = new Element("div", {"styles": this.css.moduleSetupListActionNode}).inject(this.contentNode);
  615. this.inforNode = new Element("div", {"styles": this.css.moduleSetupListInforNode}).inject(this.contentNode);
  616. this.nameNode = new Element("div", {"styles": this.css.moduleSetupListNameNode}).inject(this.contentNode);
  617. this.nameNode.set(this.getNameContent());
  618. // switch (this.selectStatus){
  619. // case "all":
  620. // this.iconNode.setStyle("background", "url("+this.app.path+this.app.options.style+"/icon/sel_all.png) center center no-repeat");
  621. // break;
  622. // case "part":
  623. // this.iconNode.setStyle("background", "url("+this.app.path+this.app.options.style+"/icon/sel_part.png) center center no-repeat");
  624. // break;
  625. // default:
  626. this.iconNode.setStyle("background", "url("+this.app.path+this.app.options.style+"/icon/sel_none.png) center center no-repeat");
  627. //}
  628. this.action = new Element("div", {"styles": this.css.moduleSelectActionNode, "text": this.lp.select}).inject(this.actionNode);
  629. this.setEvent();
  630. this.checkSelect(this.postData);
  631. },
  632. setEvent: function(){
  633. this.contentNode.addEvents({
  634. "mouseover": function(){this.contentNode.setStyles(this.css.moduleSetupListContentNode_over);}.bind(this),
  635. "mouseout": function(){this.contentNode.setStyles(this.css.moduleSetupListContentNode);}.bind(this)
  636. });
  637. this.iconNode.addEvent("click", this.selectAll.bind(this));
  638. this.action.addEvent("click", function(){
  639. this.selectElements();
  640. }.bind(this));
  641. this.nameNode.addEvent("click", function(){
  642. this.selectElements();
  643. }.bind(this));
  644. },
  645. selectAll: function(){
  646. var selectData = this.postData;
  647. if (selectData.processList.length || selectData.formList.length || selectData.applicationDictList.length || selectData.scriptList.length || selectData.fileList.length){
  648. if (selectData.processList.length===this.data.processList.length &&
  649. selectData.formList.length===this.data.formList.length &&
  650. selectData.applicationDictList.length===this.data.applicationDictList.length &&
  651. selectData.scriptList.length===this.data.scriptList.length &&
  652. selectData.fileList.length===this.data.fileList.length){
  653. selectData = {
  654. "processList": [],
  655. "formList": [],
  656. "applicationDictList": [],
  657. "scriptList": [],
  658. "fileList": []
  659. };
  660. }else{
  661. selectData = {
  662. "processList": this.data.processList,
  663. "formList": this.data.formList,
  664. "applicationDictList": this.data.applicationDictList,
  665. "scriptList": this.data.scriptList,
  666. "fileList": this.data.fileList
  667. };
  668. }
  669. }else{
  670. selectData = {
  671. "processList": this.data.processList,
  672. "formList": this.data.formList,
  673. "applicationDictList": this.data.applicationDictList,
  674. "scriptList": this.data.scriptList,
  675. "fileList": this.data.fileList
  676. };
  677. }
  678. this.checkSelect(selectData);
  679. },
  680. getNameContent: function(){
  681. return {
  682. "title": this.lp.name+": "+this.data.name+" "+this.lp.id+": "+this.data.id,
  683. "text": this.data.name
  684. }
  685. },
  686. selectElements: function(){
  687. new MWF.xApplication.AppCenter.Exporter.Element.Selector(this, this.data);
  688. },
  689. checkSelect: function(selectData){
  690. this.postData.processList = selectData.processList;
  691. this.postData.formList = selectData.formList;
  692. this.postData.applicationDictList = selectData.applicationDictList;
  693. this.postData.scriptList = selectData.scriptList;
  694. this.postData.fileList = selectData.fileList;
  695. this.exporter.selectData.processPlatformList.erase(this.postData);
  696. if (selectData.processList.length || selectData.formList.length || selectData.applicationDictList.length || selectData.scriptList.length || selectData.fileList.length){
  697. this.exporter.selectData.processPlatformList.push(this.postData);
  698. if (selectData.processList.length==this.data.processList.length &&
  699. selectData.formList.length==this.data.formList.length &&
  700. selectData.applicationDictList.length==this.data.applicationDictList.length &&
  701. selectData.scriptList.length==this.data.scriptList.length &&
  702. selectData.fileList.length==this.data.fileList.length){
  703. this.iconNode.setStyle("background", "url("+this.app.path+this.app.options.style+"/icon/sel_all.png) center center no-repeat");
  704. }else{
  705. this.iconNode.setStyle("background", "url("+this.app.path+this.app.options.style+"/icon/sel_part.png) center center no-repeat");
  706. }
  707. }else{
  708. this.iconNode.setStyle("background", "url("+this.app.path+this.app.options.style+"/icon/sel_none.png) center center no-repeat");
  709. }
  710. }
  711. });
  712. MWF.xApplication.AppCenter.Exporter.ProcessElement = new Class({
  713. Extends: MWF.xApplication.AppCenter.Exporter.Element
  714. });
  715. MWF.xApplication.AppCenter.Exporter.PortalElement = new Class({
  716. Extends: MWF.xApplication.AppCenter.Exporter.Element,
  717. initPostData: function(postData){
  718. this.postData = postData || {
  719. "id": this.data.id,
  720. "name": this.data.name || this.data.appName,
  721. "alias": this.data.alias,
  722. "description": this.data.description,
  723. "pageList": [],
  724. "scriptList": [],
  725. "widgetList": [],
  726. "fileList": []
  727. };
  728. },
  729. selectAll: function(){
  730. var selectData = this.postData;
  731. if (selectData.pageList.length || selectData.scriptList.length || selectData.widgetList.length || selectData.fileList.length){
  732. if (selectData.pageList.length===this.data.pageList.length &&
  733. selectData.scriptList.length===this.data.scriptList.length &&
  734. selectData.widgetList.length===this.data.widgetList.length &&
  735. selectData.fileList.length===this.data.fileList.length){
  736. selectData = {
  737. "pageList": [],
  738. "scriptList": [],
  739. "widgetList": [],
  740. "fileList": []
  741. };
  742. }else{
  743. selectData = {
  744. "pageList": this.data.pageList,
  745. "scriptList": this.data.scriptList,
  746. "widgetList": this.data.widgetList,
  747. "fileList": this.data.fileList
  748. };
  749. }
  750. }else{
  751. selectData = {
  752. "pageList": this.data.pageList,
  753. "scriptList": this.data.scriptList,
  754. "widgetList": this.data.widgetList,
  755. "fileList": this.data.fileList
  756. };
  757. }
  758. this.checkSelect(selectData);
  759. },
  760. selectElements: function(){
  761. new MWF.xApplication.AppCenter.Exporter.Element.PortalSelector(this, this.data);
  762. },
  763. checkSelect: function(selectData){
  764. this.postData.pageList = selectData.pageList;
  765. this.postData.scriptList = selectData.scriptList;
  766. this.postData.widgetList = selectData.widgetList;
  767. this.postData.fileList = selectData.fileList;
  768. this.exporter.selectData.portalList.erase(this.postData);
  769. if (selectData.pageList.length || selectData.scriptList.length || selectData.widgetList.length || selectData.fileList.length){
  770. this.exporter.selectData.portalList.push(this.postData);
  771. if (selectData.pageList.length==this.data.pageList.length &&
  772. selectData.scriptList.length==this.data.scriptList.length &&
  773. selectData.widgetList.length==this.data.widgetList.length &&
  774. selectData.fileList.length==this.data.fileList.length){
  775. this.iconNode.setStyle("background", "url("+this.app.path+this.app.options.style+"/icon/sel_all.png) center center no-repeat");
  776. }else{
  777. this.iconNode.setStyle("background", "url("+this.app.path+this.app.options.style+"/icon/sel_part.png) center center no-repeat");
  778. }
  779. }else{
  780. this.iconNode.setStyle("background", "url("+this.app.path+this.app.options.style+"/icon/sel_none.png) center center no-repeat");
  781. }
  782. }
  783. });
  784. MWF.xApplication.AppCenter.Exporter.CmsElement = new Class({
  785. Extends: MWF.xApplication.AppCenter.Exporter.Element,
  786. getNameContent: function(){
  787. return {
  788. "title": this.lp.name+": "+this.data.appName+" "+this.lp.id+": "+this.data.id,
  789. "text": this.data.appName
  790. }
  791. },
  792. initPostData: function(postData){
  793. this.postData = postData || {
  794. "id": this.data.id,
  795. "name": this.data.name || this.data.appName,
  796. "alias": this.data.alias,
  797. "description": this.data.description,
  798. "categoryInfoList": [],
  799. "formList": [],
  800. "appDictList": [],
  801. "scriptList": [],
  802. "fileList": []
  803. };
  804. },
  805. selectElements: function(){
  806. new MWF.xApplication.AppCenter.Exporter.Element.CmsSelector(this, this.data);
  807. },
  808. selectAll: function(){
  809. var selectData = this.postData;
  810. if (selectData.categoryInfoList.length || selectData.formList.length || selectData.appDictList.length || selectData.scriptList.length || selectData.fileList.length){
  811. if (selectData.categoryInfoList.length===this.data.categoryInfoList.length &&
  812. selectData.formList.length===this.data.formList.length &&
  813. selectData.appDictList.length===this.data.appDictList.length &&
  814. selectData.scriptList.length===this.data.scriptList.length &&
  815. selectData.fileList.length===this.data.fileList.length){
  816. selectData = {
  817. "categoryInfoList": [],
  818. "formList": [],
  819. "appDictList": [],
  820. "scriptList": [],
  821. "fileList": []
  822. };
  823. }else{
  824. selectData = {
  825. "categoryInfoList": this.data.categoryInfoList,
  826. "formList": this.data.formList,
  827. "appDictList": this.data.appDictList,
  828. "scriptList": this.data.scriptList,
  829. "fileList": this.data.fileList
  830. };
  831. }
  832. }else{
  833. selectData = {
  834. "categoryInfoList": this.data.categoryInfoList,
  835. "formList": this.data.formList,
  836. "appDictList": this.data.appDictList,
  837. "scriptList": this.data.scriptList,
  838. "fileList": this.data.fileList
  839. };
  840. }
  841. this.checkSelect(selectData);
  842. },
  843. checkSelect: function(selectData){
  844. this.postData.categoryInfoList = selectData.categoryInfoList;
  845. this.postData.formList = selectData.formList;
  846. this.postData.appDictList = selectData.appDictList;
  847. this.postData.scriptList = selectData.scriptList;
  848. this.postData.fileList = selectData.fileList;
  849. this.exporter.selectData.cmsList.erase(this.postData);
  850. if (selectData.categoryInfoList.length || selectData.formList.length || selectData.appDictList.length || selectData.scriptList.length || selectData.fileList.length){
  851. this.exporter.selectData.cmsList.push(this.postData);
  852. if (selectData.categoryInfoList.length===this.data.categoryInfoList.length &&
  853. selectData.formList.length===this.data.formList.length &&
  854. selectData.appDictList.length===this.data.appDictList.length &&
  855. selectData.scriptList.length===this.data.scriptList.length &&
  856. selectData.fileList.length===this.data.fileList.length){
  857. this.iconNode.setStyle("background", "url("+this.app.path+this.app.options.style+"/icon/sel_all.png) center center no-repeat");
  858. }else{
  859. this.iconNode.setStyle("background", "url("+this.app.path+this.app.options.style+"/icon/sel_part.png) center center no-repeat");
  860. }
  861. }else{
  862. this.iconNode.setStyle("background", "url("+this.app.path+this.app.options.style+"/icon/sel_none.png) center center no-repeat");
  863. }
  864. }
  865. });
  866. MWF.xApplication.AppCenter.Exporter.QueryElement = new Class({
  867. Extends: MWF.xApplication.AppCenter.Exporter.Element,
  868. initPostData: function(postData){
  869. this.postData = postData || {
  870. "id": this.data.id,
  871. "name": this.data.name || this.data.appName,
  872. "alias": this.data.alias,
  873. "description": this.data.description,
  874. "viewList": [],
  875. "statList": [],
  876. "revealList": [],
  877. "statementList": [],
  878. "tableList": []
  879. };
  880. },
  881. selectElements: function(){
  882. new MWF.xApplication.AppCenter.Exporter.Element.QuerySelector(this, this.data);
  883. },
  884. selectAll: function(){
  885. var selectData = this.postData;
  886. if (selectData.viewList.length || selectData.statList.length || selectData.revealList.length|| selectData.statementList.length|| selectData.tableList.length){
  887. if (selectData.viewList.length===this.data.viewList.length &&
  888. selectData.statList.length===this.data.statList.length &&
  889. selectData.statementList.length===this.data.statementList.length &&
  890. selectData.tableList.length===this.data.tableList.length &&
  891. selectData.revealList.length===this.data.revealList.length){
  892. selectData = {
  893. "viewList": this.data.viewList,
  894. "statList": this.data.statList,
  895. "revealList": this.data.revealList,
  896. "statementList": this.data.statementList,
  897. "tableList": this.data.tableList
  898. };
  899. }else{
  900. selectData = {
  901. "viewList": this.data.viewList,
  902. "statList": this.data.statList,
  903. "revealList": this.data.revealList,
  904. "statementList": this.data.statementList,
  905. "tableList": this.data.tableList
  906. };
  907. }
  908. }else{
  909. selectData = {
  910. "viewList": this.data.viewList,
  911. "statList": this.data.statList,
  912. "revealList": this.data.revealList,
  913. "statementList": this.data.statementList,
  914. "tableList": this.data.tableList
  915. };
  916. }
  917. this.checkSelect(selectData);
  918. },
  919. checkSelect: function(selectData){
  920. this.postData.viewList = selectData.viewList;
  921. this.postData.statList = selectData.statList;
  922. this.postData.revealList = selectData.revealList;
  923. this.postData.statementList = selectData.statementList;
  924. this.postData.tableList = selectData.tableList;
  925. this.exporter.selectData.queryList.erase(this.postData);
  926. if (selectData.viewList.length || selectData.statList.length || selectData.revealList.length|| selectData.statementList.length|| selectData.tableList.length){
  927. this.exporter.selectData.queryList.push(this.postData);
  928. if (selectData.viewList.length==this.data.viewList.length &&
  929. selectData.statList.length==this.data.statList.length &&
  930. selectData.statementList.length==this.data.statementList.length &&
  931. selectData.tableList.length==this.data.tableList.length &&
  932. selectData.revealList.length==this.data.revealList.length){
  933. this.iconNode.setStyle("background", "url("+this.app.path+this.app.options.style+"/icon/sel_all.png) center center no-repeat");
  934. }else{
  935. this.iconNode.setStyle("background", "url("+this.app.path+this.app.options.style+"/icon/sel_part.png) center center no-repeat");
  936. }
  937. }else{
  938. this.iconNode.setStyle("background", "url("+this.app.path+this.app.options.style+"/icon/sel_none.png) center center no-repeat");
  939. }
  940. }
  941. });
  942. MWF.xApplication.AppCenter.Exporter.ServiceElement = new Class({
  943. Extends: MWF.xApplication.AppCenter.Exporter.Element,
  944. initPostData: function(postData){
  945. this.postData = postData || {
  946. "id": this.data.id,
  947. "name": this.data.name || this.data.appName,
  948. "alias": this.data.alias,
  949. "description": this.data.description,
  950. "agentList": [],
  951. "invokeList": []
  952. };
  953. },
  954. selectElements: function(){
  955. new MWF.xApplication.AppCenter.Exporter.Element.ServiceSelector(this, this.data);
  956. },
  957. selectAll: function(){
  958. var selectData = this.postData;
  959. if (selectData.agentList.length || selectData.invokeList.length){
  960. if (selectData.agentList.length===this.data.invokeList.length ){
  961. selectData = {
  962. "agentList": [],
  963. "invokeList": []
  964. };
  965. }else{
  966. selectData = {
  967. "agentList": this.data.agentList,
  968. "invokeList": this.data.invokeList
  969. };
  970. }
  971. }else{
  972. selectData = {
  973. "agentList": this.data.agentList,
  974. "invokeList": this.data.invokeList
  975. };
  976. }
  977. this.checkSelect(selectData);
  978. },
  979. checkSelect: function(selectData){
  980. this.postData.agentList = selectData.agentList;
  981. this.postData.invokeList = selectData.invokeList;
  982. this.exporter.selectData.serviceModuleList.erase(this.postData);
  983. if (selectData.agentList.length || selectData.invokeList.length ){
  984. this.exporter.selectData.serviceModuleList.push(this.postData);
  985. if (selectData.agentList.length===this.data.agentList.length &&
  986. selectData.invokeList.length===this.data.invokeList.length
  987. ){
  988. this.iconNode.setStyle("background", "url("+this.app.path+this.app.options.style+"/icon/sel_all.png) center center no-repeat");
  989. }else{
  990. this.iconNode.setStyle("background", "url("+this.app.path+this.app.options.style+"/icon/sel_part.png) center center no-repeat");
  991. }
  992. }else{
  993. this.iconNode.setStyle("background", "url("+this.app.path+this.app.options.style+"/icon/sel_none.png) center center no-repeat");
  994. }
  995. }
  996. });
  997. MWF.xApplication.AppCenter.Exporter.Element.Selector = new Class({
  998. initialize: function(element, data){
  999. this.element = element;
  1000. this.app = this.element.app;
  1001. this.data = data;
  1002. this.lp = this.app.lp;
  1003. this.css = this.app.css;
  1004. this.content = this.element.contentNode;
  1005. this.areaNode = this.element.exporter.contentNode;
  1006. this.selectData = this.initData();
  1007. this.load();
  1008. },
  1009. initData: function(){
  1010. return {
  1011. "processList": [],
  1012. "formList": [],
  1013. "applicationDictList": [],
  1014. "scriptList": [],
  1015. "fileList": []
  1016. }
  1017. },
  1018. load: function(){
  1019. this.node = new Element("div", {"styles": this.css.moduleSelectContentAreaNode}).inject(this.areaNode, "after");
  1020. this.titleNode = new Element("div", {"styles": this.css.moduleSelectTitleNode, "text": this.data.name}).inject(this.node);
  1021. var size = this.content.getSize();
  1022. this.node.setStyle("width", ""+size.x+"px");
  1023. this.node.position({
  1024. "relativeTo": this.content,
  1025. "position": "topLeft",
  1026. "edge": "topLeft"
  1027. });
  1028. this.element.exporter.dlg.button.setStyle("display", "none");
  1029. this.show();
  1030. },
  1031. show: function(){
  1032. var size = this.areaNode.getSize();
  1033. var height = size.y+40;
  1034. var width = size.x;
  1035. var position = this.areaNode.getPosition(this.areaNode.getOffsetParent());
  1036. //var oStyles = this.node.getStyles("height", "width", "top", "left", "background-color");
  1037. //this.node.store("ostyles", oStyles);
  1038. var css = {
  1039. "height": ""+height+"px",
  1040. "width": ""+width+"px",
  1041. "top": ""+position.y+"px",
  1042. "left": ""+position.x+"px",
  1043. "background-color": "#eeeeee"
  1044. };
  1045. this.morph = new Fx.Morph(this.node, {"duration": 100});
  1046. this.morph.start(css).chain(function(){
  1047. this.loadContent();
  1048. }.bind(this));
  1049. },
  1050. hide: function(){
  1051. if (!this.morph) this.morph = new Fx.Morph(this.node, {"duration": 100});
  1052. this.areaNode.setStyle("display", "block");
  1053. this.element.exporter.dlg.button.setStyle("display", "block");
  1054. var size = this.content.getSize();
  1055. var height = size.y;
  1056. var width = size.x;
  1057. var position = this.content.getPosition(this.areaNode);
  1058. var thisPosition = this.node.getPosition(this.node.getOffsetParent());
  1059. var x = thisPosition.x+position.x;
  1060. var y = thisPosition.y+position.y;
  1061. var css = {
  1062. "height": ""+height+"px",
  1063. "width": ""+width+"px",
  1064. "top": ""+y+"px",
  1065. "left": ""+x+"px"
  1066. };
  1067. this.contentNode.destroy();
  1068. this.morph.start(css).chain(function(){
  1069. this.node.destroy();
  1070. MWF.release(this);
  1071. }.bind(this));
  1072. },
  1073. loadContent: function(){
  1074. this.areaNode.setStyle("display", "none");
  1075. this.contentNode = new Element("div", {"styles": this.css.moduleSelectContentNode}).inject(this.node);
  1076. this.buttonNode = new Element("div", {"styles": this.css.moduleSelectButtonNode}).inject(this.node);
  1077. this.cancelButton = new Element("div", {"styles": this.css.moduleSelectButtonActionNode, "text": this.lp.cancel}).inject(this.buttonNode);
  1078. this.okButton = new Element("div", {"styles": this.css.moduleSelectButtonActionNode, "text": this.lp.ok}).inject(this.buttonNode);
  1079. this.setContentHeight();
  1080. this.loadContentList();
  1081. this.cancelButton.addEvent("click", function(){
  1082. this.hide();
  1083. }.bind(this));
  1084. this.okButton.addEvent("click", function(){
  1085. this.checkSelect();
  1086. }.bind(this));
  1087. },
  1088. checkSelect: function() {
  1089. this.selectData.processList = this.getCheckedList(this.listProcessContent);
  1090. this.selectData.formList = this.getCheckedList(this.listFormContent);
  1091. this.selectData.applicationDictList = this.getCheckedList(this.listDictContent);
  1092. this.selectData.scriptList = this.getCheckedList(this.listScriptContent);
  1093. this.selectData.fileList = this.getCheckedList(this.listFileContent);
  1094. this.element.checkSelect(this.selectData);
  1095. this.hide();
  1096. },
  1097. getCheckedList: function(node){
  1098. var list = [];
  1099. node.getElements("input").each(function(input){
  1100. if (input.checked){
  1101. list.push(input.retrieve("data"));
  1102. }
  1103. }.bind());
  1104. return list;
  1105. },
  1106. setContentHeight: function(){
  1107. var size = this.node.getSize();
  1108. var titleSize = this.titleNode.getSize();
  1109. var buttonSize = this.buttonNode.getSize();
  1110. var h = size.y-titleSize.y-buttonSize.y;
  1111. this.contentNode.setStyle("height", ""+h+"px");
  1112. },
  1113. loadContentList: function(){
  1114. this.contentAreaNode = new Element("div", {"styles": {"overflow": "hidden"}}).inject(this.contentNode);
  1115. this.listProcessContent = this.listProcess("processList");
  1116. this.listFormContent = this.listProcess("formList");
  1117. this.listDictContent = this.listProcess("applicationDictList");
  1118. this.listScriptContent = this.listProcess("scriptList");
  1119. this.listFileContent = this.listProcess("fileList");
  1120. },
  1121. listProcess: function(name){
  1122. var title = new Element("div", {"styles": this.css.moduleSelectContentTitleNode}).inject(this.contentAreaNode);
  1123. var titleActionNode = new Element("div", {"styles": this.css.moduleSelectContentTitleButtonNode}).inject(title);
  1124. var inverseAction = new Element("div", {"styles": this.css.moduleSelectContentTitleButtonActionNode, "text": this.lp.inverse}).inject(titleActionNode);
  1125. var selectAllAction = new Element("div", {"styles": this.css.moduleSelectContentTitleButtonActionNode, "text": this.lp.selectAll}).inject(titleActionNode);
  1126. var titleText = new Element("div", {"styles": this.css.moduleSelectContentTitleTextNode, "text": this.lp[name]}).inject(title);
  1127. //moduleSelectContentTitleButtonActionNode
  1128. var listContent = new Element("div", {"styles": this.css.moduleSelectContentListNode}).inject(this.contentAreaNode);
  1129. this.listProcessItems(name, listContent);
  1130. inverseAction.addEvent("click", function(){
  1131. inputs = listContent.getElements("input");
  1132. inputs.each(function(checkbox){
  1133. checkbox.set("checked", !checkbox.get("checked"));
  1134. });
  1135. });
  1136. selectAllAction.addEvent("click", function(){
  1137. inputs = listContent.getElements("input");
  1138. inputs.each(function(checkbox){
  1139. checkbox.set("checked", true);
  1140. });
  1141. });
  1142. return listContent;
  1143. },
  1144. listProcessItems: function(name, listContent){
  1145. this.data[name].each(function(item){
  1146. var div = new Element("div", {"styles": this.css.moduleSelectContentListItemNode}).inject(listContent);
  1147. var flag = false;
  1148. var selectedList = this.element.postData[name];
  1149. if (selectedList){
  1150. for (var i=0; i<selectedList.length; i++){
  1151. if (selectedList[i].id==item.id){
  1152. flag = true;
  1153. break;
  1154. }
  1155. }
  1156. }
  1157. var checkNode = new Element("input", {
  1158. "styles": {"float": "left"},
  1159. "type": "checkbox",
  1160. //"checked": (this.element.postData[name] && this.element.postData[name].indexOf(item)!=-1),
  1161. "checked": flag,
  1162. "value": item.id
  1163. }).inject(div);
  1164. new Element("div", {
  1165. "styles": {"float": "left"},
  1166. "text": this.getItemName(item),
  1167. "events": {
  1168. "click": function(){checkNode.click();}
  1169. }
  1170. }).inject(div);
  1171. checkNode.store("data", item);
  1172. }.bind(this));
  1173. },
  1174. getItemName: function(item){
  1175. return item.name;
  1176. }
  1177. });
  1178. MWF.xApplication.AppCenter.Exporter.Element.ProcessSelector = new Class({
  1179. Extends: MWF.xApplication.AppCenter.Exporter.Element.Selector
  1180. });
  1181. MWF.xApplication.AppCenter.Exporter.Element.PortalSelector = new Class({
  1182. Extends: MWF.xApplication.AppCenter.Exporter.Element.Selector,
  1183. initData: function(){
  1184. return {
  1185. "pageList": [],
  1186. "scriptList": [],
  1187. "widgetList": [],
  1188. "fileList": []
  1189. }
  1190. },
  1191. checkSelect: function() {
  1192. this.selectData.pageList = this.getCheckedList(this.listPageContent);
  1193. this.selectData.scriptList = this.getCheckedList(this.listScriptContent);
  1194. this.selectData.widgetList = this.getCheckedList(this.listWidgetContent);
  1195. this.selectData.fileList = this.getCheckedList(this.listFileContent);
  1196. this.element.checkSelect(this.selectData);
  1197. this.hide();
  1198. },
  1199. loadContentList: function(){
  1200. this.contentAreaNode = new Element("div", {"styles": {"overflow": "hidden"}}).inject(this.contentNode);
  1201. this.listPageContent = this.listProcess("pageList");
  1202. this.listScriptContent = this.listProcess("scriptList");
  1203. this.listWidgetContent = this.listProcess("widgetList");
  1204. this.listFileContent = this.listProcess("fileList");
  1205. }
  1206. });
  1207. MWF.xApplication.AppCenter.Exporter.Element.CmsSelector = new Class({
  1208. Extends: MWF.xApplication.AppCenter.Exporter.Element.Selector,
  1209. initData: function(){
  1210. return {
  1211. "categoryInfoList": [],
  1212. "formList": [],
  1213. "appDictList": [],
  1214. "scriptList": [],
  1215. "fileList": []
  1216. }
  1217. },
  1218. checkSelect: function() {
  1219. this.selectData.categoryInfoList = this.getCheckedList(this.listCategoryInfoContent);
  1220. this.selectData.formList = this.getCheckedList(this.listFormContent);
  1221. this.selectData.appDictList = this.getCheckedList(this.listDictContent);
  1222. this.selectData.scriptList = this.getCheckedList(this.listScriptContent);
  1223. this.selectData.fileList = this.getCheckedList(this.listFileContent);
  1224. this.element.checkSelect(this.selectData);
  1225. this.hide();
  1226. },
  1227. loadContentList: function(){
  1228. this.contentAreaNode = new Element("div", {"styles": {"overflow": "hidden"}}).inject(this.contentNode);
  1229. this.listCategoryInfoContent = this.listProcess("categoryInfoList");
  1230. this.listFormContent = this.listProcess("formList");
  1231. this.listDictContent = this.listProcess("appDictList");
  1232. this.listScriptContent = this.listProcess("scriptList");
  1233. this.listFileContent = this.listProcess("fileList");
  1234. },
  1235. getItemName: function(item){
  1236. return item.name || item.categoryName;
  1237. }
  1238. });
  1239. MWF.xApplication.AppCenter.Exporter.Element.QuerySelector = new Class({
  1240. Extends: MWF.xApplication.AppCenter.Exporter.Element.Selector,
  1241. initData: function(){
  1242. return {
  1243. "viewList": [],
  1244. "statList": [],
  1245. "revealList": [],
  1246. "tableList": [],
  1247. "statementList": []
  1248. }
  1249. },
  1250. checkSelect: function() {
  1251. this.selectData.viewList = this.getCheckedList(this.listViewContent);
  1252. this.selectData.statList = this.getCheckedList(this.listStatContent);
  1253. this.selectData.revealList = this.getCheckedList(this.listRevealContent);
  1254. this.selectData.statementList = this.getCheckedList(this.listRevealContent);
  1255. this.selectData.tableList = this.getCheckedList(this.listRevealContent);
  1256. this.element.checkSelect(this.selectData);
  1257. this.hide();
  1258. },
  1259. loadContentList: function(){
  1260. this.contentAreaNode = new Element("div", {"styles": {"overflow": "hidden"}}).inject(this.contentNode);
  1261. this.listViewContent = this.listProcess("viewList");
  1262. this.listStatContent = this.listProcess("statList");
  1263. this.listRevealContent = this.listProcess("revealList");
  1264. this.listRevealContent = this.listProcess("tableList");
  1265. this.listRevealContent = this.listProcess("statementList");
  1266. }
  1267. });
  1268. MWF.xApplication.AppCenter.Exporter.Element.ServiceSelector = new Class({
  1269. Extends: MWF.xApplication.AppCenter.Exporter.Element.Selector,
  1270. initData: function(){
  1271. return {
  1272. "agentList": [],
  1273. "invokeList": []
  1274. }
  1275. },
  1276. checkSelect: function() {
  1277. this.selectData.agentList = this.getCheckedList(this.listAgentContent);
  1278. this.selectData.invokeList = this.getCheckedList(this.listInvokeContent);
  1279. this.element.checkSelect(this.selectData);
  1280. this.hide();
  1281. },
  1282. loadContentList: function(){
  1283. this.contentAreaNode = new Element("div", {"styles": {"overflow": "hidden"}}).inject(this.contentNode);
  1284. this.listAgentContent = this.listProcess("agentList");
  1285. this.listInvokeContent = this.listProcess("invokeList");
  1286. },
  1287. getItemName: function(item){
  1288. return item.name
  1289. }
  1290. });
  1291. MWF.xApplication.AppCenter.Module.Setup = new Class({
  1292. initialize: function(module, dlg){
  1293. this.module = module;
  1294. this.app = this.module.app;
  1295. this.data = this.module.data;
  1296. this.lp = this.module.lp;
  1297. this.css = this.app.css;
  1298. this.dlg = dlg;
  1299. this.content = this.dlg.content;
  1300. this.setupData = {};
  1301. this.compareData = null;
  1302. this.load();
  1303. },
  1304. load: function(){
  1305. this.node = new Element("div", {"styles": this.css.moduleSetupContentNode}).inject(this.content);
  1306. this.loadTitle();
  1307. this.loadContent();
  1308. },
  1309. loadTitle: function(){
  1310. this.titleNode = new Element("div", {"styles": this.css.moduleSetupTitleNode2}).inject(this.node);
  1311. this.iconAreaNode = new Element("div", {"styles": this.css.moduleSetupIconAreaNode}).inject(this.titleNode);
  1312. var iconNode = new Element("div", {"styles": this.css.moduleSetupIconNode}).inject(this.iconAreaNode);
  1313. if (this.data.icon){
  1314. iconNode.setStyle("background-image", "url(data:image/png;base64,"+this.data.icon+")");
  1315. iconNode.setStyle("background-size", "cover");
  1316. }
  1317. var contentNode = new Element("div", {"styles": this.css.moduleSetupTitleContentNode2}).inject(this.titleNode);
  1318. var nameNode = new Element("div", {"styles": this.css.moduleSetupNameNode2}).inject(contentNode);
  1319. var categoryNode = new Element("div", {"styles": this.css.moduleSetupCategoryNode2}).inject(contentNode);
  1320. var descriptionNode = new Element("div", {"styles": this.css.moduleSetupDescriptionNode2}).inject(contentNode);
  1321. nameNode.set("text", this.data.name);
  1322. categoryNode.set("text", this.data.category);
  1323. descriptionNode.set("text", this.data.description);
  1324. },
  1325. loadContent: function(){
  1326. this.contentNode = new Element("div", {"styles": this.css.moduleSetupCompareContentNode}).inject(this.node);
  1327. this.createLoading(this.contentNode);
  1328. this.loadCompare();
  1329. },
  1330. createLoading: function(node){
  1331. this.dlg.button.setStyle("display", "none");
  1332. this.loadingAreaNode = new Element("div", {"styles": this.css.moduleLoadingAreaNode}).inject(node);
  1333. var img = new Element("img", {
  1334. "styles": this.css.moduleLoadingImgNode,
  1335. "src": this.app.path+this.app.options.style+"/icon/loading.gif"
  1336. }).inject(this.loadingAreaNode);
  1337. },
  1338. clearLoading: function(){
  1339. if (this.loadingAreaNode){
  1340. this.loadingAreaNode.destroy();
  1341. this.loadingAreaNode = null;
  1342. }
  1343. this.dlg.button.setStyle("display", "block");
  1344. },
  1345. loadCompare: function(){
  1346. this.app.actions.compareModule(this.data.id, function(json){
  1347. this.clearLoading();
  1348. this.setupData.flag = json.data.flag;
  1349. this.createListArea();
  1350. this.compareData = json.data;
  1351. this.loadProcessList();
  1352. this.loadPortalList();
  1353. this.loadCMSList();
  1354. this.loadQueryList();
  1355. this.loadServiceList();
  1356. //json.data.processPlatformList
  1357. }.bind(this));
  1358. },
  1359. createListArea: function(){
  1360. this.contentAreaNode = new Element("div").inject(this.contentNode);
  1361. this.contentInforNode = new Element("div", {"styles": this.css.moduleSetupContentInforNode, "text": this.lp.downloadInfor}).inject(this.contentAreaNode);
  1362. //this.processArea = new Element("div", {"styles": this.css.moduleSetupListAreaNode}).inject(this.contentNode);
  1363. this.processAreaTitle = new Element("div", {"styles": this.css.moduleSetupListAreaTitleNode2, "text": this.lp.process}).inject(this.contentAreaNode);
  1364. this.processAreaContent = new Element("div", {"styles": this.css.moduleSetupListAreaContentNode}).inject(this.contentAreaNode);
  1365. this.portalAreaTitle = new Element("div", {"styles": this.css.moduleSetupListAreaTitleNode, "text": this.lp.portal}).inject(this.contentAreaNode);
  1366. this.portalAreaContent = new Element("div", {"styles": this.css.moduleSetupListAreaContentNode2}).inject(this.contentAreaNode);
  1367. this.cmsAreaTitle = new Element("div", {"styles": this.css.moduleSetupListAreaTitleNode, "text": this.lp.cms}).inject(this.contentAreaNode);
  1368. this.cmsAreaContent = new Element("div", {"styles": this.css.moduleSetupListAreaContentNode2}).inject(this.contentAreaNode);
  1369. this.queryAreaTitle = new Element("div", {"styles": this.css.moduleSetupListAreaTitleNode, "text": this.lp.query}).inject(this.contentAreaNode);
  1370. this.queryAreaContent = new Element("div", {"styles": this.css.moduleSetupListAreaContentNode2}).inject(this.contentAreaNode);
  1371. this.serviceAreaTitle = new Element("div", {"styles": this.css.moduleSetupListAreaTitleNode, "text": this.lp.service}).inject(this.contentAreaNode);
  1372. this.serviceAreaContent = new Element("div", {"styles": this.css.moduleSetupListAreaContentNode2}).inject(this.contentAreaNode);
  1373. },
  1374. loadProcessList: function(){
  1375. this.processListNodes = [];
  1376. this.compareData.processPlatformList.each(function(item){
  1377. this.processListNodes.push(new MWF.xApplication.AppCenter.Module.Setup.ProcessElement(this, this.processAreaContent, item));
  1378. }.bind(this));
  1379. },
  1380. loadPortalList: function(){
  1381. this.portalListNodes = [];
  1382. this.compareData.portalList.each(function(item){
  1383. this.portalListNodes.push(new MWF.xApplication.AppCenter.Module.Setup.PortalElement(this, this.portalAreaContent, item));
  1384. }.bind(this));
  1385. },
  1386. loadCMSList: function(){
  1387. this.cmsListNodes = [];
  1388. this.compareData.cmsList.each(function(item){
  1389. this.cmsListNodes.push(new MWF.xApplication.AppCenter.Module.Setup.CmsElement(this, this.cmsAreaContent, item));
  1390. }.bind(this));
  1391. },
  1392. loadQueryList: function(){
  1393. this.queryListNodes = [];
  1394. this.compareData.queryList.each(function(item){
  1395. this.queryListNodes.push(new MWF.xApplication.AppCenter.Module.Setup.QueryElement(this, this.queryAreaContent, item));
  1396. }.bind(this));
  1397. },
  1398. loadServiceList: function(){
  1399. this.serviceListNodes = [];
  1400. this.compareData.serviceModuleList.each(function(item){
  1401. this.serviceListNodes.push(new MWF.xApplication.AppCenter.Module.Setup.ServiceElement(this, this.serviceAreaContent, item));
  1402. }.bind(this));
  1403. },
  1404. setup: function(){
  1405. this.setupData.flag = this.compareData.flag;
  1406. this.setupData.processPlatformList = [];
  1407. this.setupData.portalList = [];
  1408. this.setupData.queryList = [];
  1409. this.setupData.serviceModuleList = [];
  1410. this.setupData.cmsList = [];
  1411. this.getWriteData(this.processListNodes, this.setupData.processPlatformList);
  1412. this.getWriteData(this.portalListNodes, this.setupData.portalList);
  1413. this.getWriteData(this.cmsListNodes, this.setupData.cmsList);
  1414. this.getWriteData(this.queryListNodes, this.setupData.queryList);
  1415. this.getWriteData(this.serviceListNodes, this.setupData.serviceModuleList);
  1416. this.contentAreaNode.setStyle("display", "none");
  1417. this.createLoading(this.contentNode);
  1418. this.app.actions.importModule(this.compareData.flag, this.setupData, function(){
  1419. this.app.notice(this.module.data.name+" "+this.lp.setupSuccess, "success");
  1420. this.clearLoading();
  1421. }.bind(this));
  1422. },
  1423. getWriteData: function(nodes, json){
  1424. nodes.each(function(item){
  1425. if (item.action){
  1426. var v = item.action.options[item.action.selectedIndex].get("value");
  1427. if (v!="ignore"){
  1428. json.push({"id": item.data.id, "method":v});
  1429. }
  1430. }else{
  1431. json.push({"id": item.data.id});
  1432. }
  1433. }.bind(this));
  1434. }
  1435. });
  1436. MWF.xApplication.AppCenter.Module.SetupLocal = new Class({
  1437. Extends: MWF.xApplication.AppCenter.Module.Setup,
  1438. initialize: function(file, dlg, app){
  1439. this.app = app;
  1440. this.file = file;
  1441. this.lp = this.app.lp;
  1442. this.module = {
  1443. "data": {
  1444. "name": this.lp.localApp,
  1445. "category": "",
  1446. "description": ""
  1447. }
  1448. };
  1449. this.data = this.module.data;
  1450. this.css = this.app.css;
  1451. this.dlg = dlg;
  1452. this.content = this.dlg.content;
  1453. this.setupData = {};
  1454. this.compareData = null;
  1455. this.load();
  1456. },
  1457. loadCompare: function(){
  1458. var formData = new FormData();
  1459. formData.append('file', this.file);
  1460. this.app.actions.compareUpload(formData, this.file, function(json){
  1461. this.clearLoading();
  1462. this.setupData.flag = json.data.flag;
  1463. this.createListArea();
  1464. this.compareData = json.data;
  1465. this.loadProcessList();
  1466. this.loadPortalList();
  1467. this.loadCMSList();
  1468. this.loadQueryList();
  1469. this.loadServiceList();
  1470. //json.data.processPlatformList
  1471. }.bind(this));
  1472. }
  1473. });
  1474. MWF.xApplication.AppCenter.Module.Setup.Element = new Class({
  1475. initialize: function(setup, content, data){
  1476. this.setup = setup;
  1477. this.app = this.setup.app;
  1478. this.data = data;
  1479. this.lp = this.app.lp;
  1480. this.css = this.app.css;
  1481. this.content = content;
  1482. this.load();
  1483. },
  1484. load: function(){
  1485. this.contentNode = new Element("div", {"styles": this.css.moduleSetupListContentNode}).inject(this.content);
  1486. this.iconNode = new Element("div", {"styles": this.css.moduleSetupListIconNode}).inject(this.contentNode);
  1487. this.actionNode = new Element("div", {"styles": this.css.moduleSetupListActionNode}).inject(this.contentNode);
  1488. this.inforNode = new Element("div", {"styles": this.css.moduleSetupListInforNode}).inject(this.contentNode);
  1489. this.nameNode = new Element("div", {"styles": this.css.moduleSetupListNameNode}).inject(this.contentNode);
  1490. this.nameNode.set(this.getNameContent());
  1491. if (this.data.exist){
  1492. this.iconNode.setStyle("background", "url("+this.app.path+this.app.options.style+"/icon/conflict.png) center center no-repeat");
  1493. this.contentNode.setStyle("color", "#e86a58");
  1494. this.inforNode.set("text", this.lp.conflict);
  1495. this.action = new Element("select", {"styles": this.css.moduleSetupListActionSelectNode}).inject(this.actionNode);
  1496. var options = "<option value='cover' selected>"+this.lp.cover+"</option>";
  1497. options += "<option value='create'>"+this.lp.create+"</option>";
  1498. options += "<option value='ignore'>"+this.lp.ignore+"</option>";
  1499. this.action.set("html", options);
  1500. // this.action.addEvent("change", function(e){
  1501. //
  1502. // }.bind(this));
  1503. }else{
  1504. this.action = new Element("select", {"styles": this.css.moduleSetupListActionSelectNode}).inject(this.actionNode);
  1505. var options = "<option value='ignore'>"+this.lp.ignore+"</option>";
  1506. options += "<option value='create' selected>"+this.lp.create+"</option>";
  1507. this.action.set("html", options);
  1508. //this.inforNode.set("text", this.lp.setup);
  1509. }
  1510. },
  1511. getNameContent: function(){
  1512. return {
  1513. "title": this.lp.name+": "+this.data.name+" "+this.lp.id+": "+this.data.id,
  1514. "text": this.data.name
  1515. }
  1516. }
  1517. });
  1518. MWF.xApplication.AppCenter.Module.Setup.ProcessElement = new Class({
  1519. Extends: MWF.xApplication.AppCenter.Module.Setup.Element
  1520. });
  1521. MWF.xApplication.AppCenter.Module.Setup.PortalElement = new Class({
  1522. Extends: MWF.xApplication.AppCenter.Module.Setup.Element
  1523. });
  1524. MWF.xApplication.AppCenter.Module.Setup.CmsElement = new Class({
  1525. Extends: MWF.xApplication.AppCenter.Module.Setup.Element
  1526. });
  1527. MWF.xApplication.AppCenter.Module.Setup.QueryElement = new Class({
  1528. Extends: MWF.xApplication.AppCenter.Module.Setup.Element
  1529. });
  1530. MWF.xApplication.AppCenter.Module.Setup.ServiceElement = new Class({
  1531. Extends: MWF.xApplication.AppCenter.Module.Setup.Element
  1532. });