Main.js 72 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650
  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. MWF.release(_self);
  335. }
  336. }
  337. ],
  338. "onPostShow": function(){
  339. if (callback) callback();
  340. }.bind(this)
  341. });
  342. this.dlg.show();
  343. }.bind(this));
  344. },
  345. checkInput: function(){
  346. var name = this.moduleNameInput.get("value");
  347. var category = this.moduleCategoryInput.get("value");
  348. var description = this.moduleDescriptionInput.get("value");
  349. if (!name){
  350. this.app.notice(this.lp.noNameError, "error");
  351. return false;
  352. }
  353. if (!this.selectData.processPlatformList.length &&
  354. !this.selectData.portalList.length &&
  355. !this.selectData.queryList.length &&
  356. !this.selectData.serviceModuleList.length &&
  357. !this.selectData.cmsList.length){
  358. this.app.notice(this.lp.noModuleError, "error");
  359. return false;
  360. }
  361. this.selectData.name = name;
  362. this.selectData.category = category;
  363. this.selectData.description = description;
  364. return true;
  365. },
  366. next: function(){
  367. if (this.setp==1){
  368. if (this.checkInput()) this.showStatus();
  369. }
  370. },
  371. prev: function(){
  372. if (this.step==2){
  373. if (this.statusContentNode){
  374. this.statusContentNode.destroy();
  375. this.statusContentNode = null;
  376. }
  377. this.contentNode.setStyle("display", "block");
  378. this.okBut.setStyle("display", "none");
  379. this.prevBut.setStyle("display", "nonde");
  380. this.nextBut.setStyle("display", "inline");
  381. }
  382. },
  383. output: function(){
  384. if (this.step==2){
  385. if (this.checkInput()){
  386. MWF.require("o2.widget.Mask", function(){
  387. this.mask = new o2.widget.Mask();
  388. this.mask.loadNode(this.dlg.node);
  389. this.app.actions.output(this.selectData, function(json){
  390. var uri = this.app.actions.action.actions["download"].uri;
  391. uri = uri.replace("{flag}", json.data.flag);
  392. if (this.mask) this.mask.hide();
  393. this.dlg.close();
  394. window.open(this.app.actions.action.address+uri);
  395. MWF.release(this);
  396. }.bind(this), function(xhr, text, error){
  397. if (xhr.status!=0){
  398. var errorText = error;
  399. if (xhr){
  400. var json = JSON.decode(xhr.responseText);
  401. if (json){
  402. errorText = json.message.trim() || "request json error";
  403. }else{
  404. errorText = "request json error: "+xhr.responseText;
  405. }
  406. }
  407. MWF.xDesktop.notice("error", {x: "right", y:"top"}, errorText);
  408. }
  409. if (this.mask) this.mask.hide();
  410. }.bind(this));
  411. }.bind(this));
  412. }
  413. }
  414. },
  415. showStatus: function(){
  416. this.statusContentNode = new Element("div", {"styles": this.css.moduleSelectContentAreaNode}).inject(this.contentNode, "after");
  417. this.statusTitleNode = new Element("div", {"styles": this.css.moduleSelectTitleNode, "text": this.lp.selected}).inject(this.statusContentNode);
  418. this.statusInfoNode = new Element("div", {"styles": this.css.moduleSelectContentNode}).inject(this.statusContentNode);
  419. var size = this.contentNode.getSize();
  420. var position = this.contentNode.getPosition(this.contentNode.getOffsetParent());
  421. var css = {
  422. "height": ""+size.y+"px",
  423. "width": ""+size.x+"px",
  424. "top": ""+position.y+"px",
  425. "left": ""+position.x+"px",
  426. "background-color": "#eeeeee"
  427. };
  428. this.statusContentNode.setStyles(css);
  429. var titleSize = this.statusTitleNode.getSize();
  430. var h = size.y-titleSize.y-20;
  431. this.statusInfoNode.setStyle("height", ""+h+"px");
  432. this.showStatusList();
  433. this.contentNode.setStyle("display", "none");
  434. this.okBut.setStyle("display", "inline");
  435. this.prevBut.setStyle("display", "inline");
  436. this.nextBut.setStyle("display", "none");
  437. this.step = 2;
  438. },
  439. showStatusList: function(){
  440. this.showStatusItemList("processPlatformList", ["processList", "formList", "applicationDictList", "scriptList", "fileList"]);
  441. this.showStatusItemList("portalList", ["pageList", "scriptList", "widgetList", "fileList"]);
  442. this.showStatusItemList("cmsList", ["categoryInfoList", "formList", "appDictList", "scriptList"]);
  443. this.showStatusItemList("queryList", ["viewList", "statList", "revealList", "tableList", "statementList"]);
  444. this.showStatusItemList("serviceModuleList", ["agentList", "invokeList"]);
  445. },
  446. showStatusItemList: function(listName, subList){
  447. this.selectData[listName].each(function(app){
  448. new Element("div", {"styles": this.css.moduleStatusInforNode1, "text": "["+this.lp[listName]+"] "+(app.name || app.appName)}).inject(this.statusInfoNode);
  449. subList.each(function(name){
  450. if (app[name] && app[name].length) app[name].each(function(process){
  451. new Element("div", {"styles": this.css.moduleStatusInforNode2, "text": "["+this.lp[name]+"] "+(process.name || process.categoryName)}).inject(this.statusInfoNode);
  452. }.bind(this));
  453. }.bind(this));
  454. }.bind(this));
  455. },
  456. load: function(){
  457. this.showDlg(function(){
  458. this.createLayout();
  459. this.loadStructure();
  460. }.bind(this));
  461. },
  462. createLayout: function(){
  463. this.nextBut = this.dlg.button.getFirst("input");
  464. this.prevBut = this.nextBut.getNext("input");
  465. this.okBut = this.prevBut.getNext("input");
  466. if (this.setp==1){
  467. this.okBut.setStyle("display", "none");
  468. this.prevBut.setStyle("display", "none");
  469. }
  470. this.node = new Element("div", {"styles": this.css.moduleSetupContentNode}).inject(this.dlg.content);
  471. this.titleNode = new Element("div", {"styles": this.css.moduleSetupTitleNode}).inject(this.node);
  472. var iconNode = new Element("div", {"styles": this.css.moduleIconNode}).inject(this.titleNode);
  473. var contentNode = new Element("div", {"styles": this.css.moduleSetupTitleContentNode}).inject(this.titleNode);
  474. var nameNode = new Element("div", {"styles": this.css.moduleSetupNameNode}).inject(contentNode);
  475. var categoryNode = new Element("div", {"styles": this.css.moduleSetupCategoryNode}).inject(contentNode);
  476. categoryNode.hide();
  477. var descriptionNode = new Element("div", {"styles": this.css.moduleSetupDescriptionNode}).inject(contentNode);
  478. var nameTitleNode = new Element("div", {"styles": this.css.moduleInputTitleNode, "text": this.lp.moduleName}).inject(nameNode);
  479. var nameContentNode = new Element("div", {"styles": this.css.moduleInputContentNode}).inject(nameNode);
  480. this.moduleNameInput = new Element("input", {"styles": this.css.moduleInputNode}).inject(nameContentNode);
  481. var categoryTitleNode = new Element("div", {"styles": this.css.moduleInputTitleNode, "text": this.lp.moduleCategory}).inject(categoryNode);
  482. var categoryContentNode = new Element("div", {"styles": this.css.moduleInputContentNode}).inject(categoryNode);
  483. this.moduleCategoryInput = new Element("input", {"styles": this.css.moduleInputNode}).inject(categoryContentNode);
  484. var descriptionTitleNode = new Element("div", {"styles": this.css.moduleInputTitleNode, "text": this.lp.moduleDescription}).inject(descriptionNode);
  485. var descriptionContentNode = new Element("div", {"styles": this.css.moduleInputContentNode}).inject(descriptionNode);
  486. this.moduleDescriptionInput = new Element("input", {"styles": this.css.moduleInputNode}).inject(descriptionContentNode);
  487. this.moduleNameInput.set("value", this.selectData.name);
  488. this.moduleCategoryInput.set("value", this.selectData.category);
  489. this.moduleDescriptionInput.set("value", this.selectData.description);
  490. this.contentNode = new Element("div", {"styles": this.css.moduleSetupCompareContentNode}).inject(this.node);
  491. this.setListContentSize();
  492. this.createLoading(this.contentNode);
  493. },
  494. setListContentSize: function(){
  495. var size = this.dlg.content.getSize();
  496. var h = size.y;
  497. var titleH = this.titleNode.getSize().y+10;
  498. var contentH = h-titleH-10;
  499. this.contentNode.setStyle("height", ""+contentH+"px");
  500. },
  501. createLoading: function(node){
  502. //this.okBut.setStyle("display", "none");
  503. this.nextBut.setStyle("display", "none");
  504. this.loadingAreaNode = new Element("div", {"styles": this.css.moduleLoadingAreaNode}).inject(node);
  505. var img = new Element("img", {
  506. "styles": this.css.moduleLoadingImgNode,
  507. "src": this.app.path+this.app.options.style+"/icon/loading.gif"
  508. }).inject(this.loadingAreaNode);
  509. },
  510. clearLoading: function(){
  511. if (this.loadingAreaNode){
  512. this.loadingAreaNode.destroy();
  513. this.loadingAreaNode = null;
  514. }
  515. //this.okBut.setStyle("display", "inline");
  516. this.nextBut.setStyle("display", "inline");
  517. },
  518. createContent: function(){
  519. this.clearLoading();
  520. this.createListArea();
  521. this.loadProcessList();
  522. this.loadPortalList();
  523. this.loadCMSList();
  524. this.loadQueryList();
  525. this.loadServiceList();
  526. //this.structure
  527. },
  528. createListArea: function(){
  529. this.contentAreaNode = new Element("div").inject(this.contentNode);
  530. // this.contentInforNode = new Element("div", {"styles": this.css.moduleSetupContentInforNode, "text": this.lp.selectModules}).inject(this.contentAreaNode);
  531. // //this.processArea = new Element("div", {"styles": this.css.moduleSetupListAreaNode}).inject(this.contentNode);
  532. //
  533. // this.listAreaNode = new Element("div").inject(this.contentAreaNode);
  534. this.processAreaTitle = new Element("div", {"styles": this.css.moduleSetupListAreaTitleNode, "text": this.lp.process}).inject(this.contentAreaNode);
  535. this.processAreaContent = new Element("div", {"styles": this.css.moduleSetupListAreaContentNode}).inject(this.contentAreaNode);
  536. this.portalAreaTitle = new Element("div", {"styles": this.css.moduleSetupListAreaTitleNode, "text": this.lp.portal}).inject(this.contentAreaNode);
  537. this.portalAreaContent = new Element("div", {"styles": this.css.moduleSetupListAreaContentNode}).inject(this.contentAreaNode);
  538. this.cmsAreaTitle = new Element("div", {"styles": this.css.moduleSetupListAreaTitleNode, "text": this.lp.cms}).inject(this.contentAreaNode);
  539. this.cmsAreaContent = new Element("div", {"styles": this.css.moduleSetupListAreaContentNode}).inject(this.contentAreaNode);
  540. this.queryAreaTitle = new Element("div", {"styles": this.css.moduleSetupListAreaTitleNode, "text": this.lp.query}).inject(this.contentAreaNode);
  541. this.queryAreaContent = new Element("div", {"styles": this.css.moduleSetupListAreaContentNode}).inject(this.contentAreaNode);
  542. this.serviceAreaTitle = new Element("div", {"styles": this.css.moduleSetupListAreaTitleNode, "text": this.lp.service}).inject(this.contentAreaNode);
  543. this.serviceAreaContent = new Element("div", {"styles": this.css.moduleSetupListAreaContentNode}).inject(this.contentAreaNode);
  544. },
  545. loadProcessList: function(){
  546. this.processListNodes = [];
  547. this.structure.processPlatformList.each(function(item){
  548. var postData = null;
  549. for (var i=0; i<this.selectData.processPlatformList.length; i++){
  550. if (this.selectData.processPlatformList[i].id == item.id){
  551. postData = this.selectData.processPlatformList[i];
  552. break;
  553. }
  554. }
  555. this.processListNodes.push(new MWF.xApplication.AppCenter.Exporter.ProcessElement(this, this.processAreaContent, item, postData));
  556. }.bind(this));
  557. },
  558. loadPortalList: function(){
  559. this.portalListNodes = [];
  560. this.structure.portalList.each(function(item){
  561. this.portalListNodes.push(new MWF.xApplication.AppCenter.Exporter.PortalElement(this, this.portalAreaContent, item));
  562. }.bind(this));
  563. },
  564. loadCMSList: function(){
  565. this.cmsListNodes = [];
  566. this.structure.cmsList.each(function(item){
  567. this.cmsListNodes.push(new MWF.xApplication.AppCenter.Exporter.CmsElement(this, this.cmsAreaContent, item));
  568. }.bind(this));
  569. },
  570. loadQueryList: function(){
  571. this.queryListNodes = [];
  572. this.structure.queryList.each(function(item){
  573. this.queryListNodes.push(new MWF.xApplication.AppCenter.Exporter.QueryElement(this, this.queryAreaContent, item));
  574. }.bind(this));
  575. },
  576. loadServiceList: function(){
  577. this.serviceListNodes = [];
  578. this.structure.serviceModuleList.each(function(item){
  579. this.serviceListNodes.push(new MWF.xApplication.AppCenter.Exporter.ServiceElement(this, this.serviceAreaContent, item));
  580. }.bind(this));
  581. }
  582. });
  583. MWF.xApplication.AppCenter.Exporter.Element = new Class({
  584. initialize: function(exporter, content, data, postData){
  585. this.exporter = exporter;
  586. this.app = this.exporter.app;
  587. this.data = data;
  588. this.lp = this.app.lp;
  589. this.css = this.app.css;
  590. this.content = content;
  591. this.initPostData(postData);
  592. //this.selectStatus = selectStatus || "none";
  593. this.load();
  594. },
  595. initPostData: function(postData){
  596. this.postData = postData || {
  597. "id": this.data.id,
  598. "name": this.data.name || this.data.appName,
  599. "alias": this.data.alias,
  600. "description": this.data.description,
  601. "processList": [],
  602. "formList": [],
  603. "applicationDictList": [],
  604. "scriptList": [],
  605. "fileList": []
  606. };
  607. },
  608. load: function(){
  609. this.contentNode = new Element("div", {"styles": this.css.moduleSetupListContentNode}).inject(this.content);
  610. this.iconNode = new Element("div", {"styles": this.css.moduleSetupListIconNode}).inject(this.contentNode);
  611. this.actionNode = new Element("div", {"styles": this.css.moduleSetupListActionNode}).inject(this.contentNode);
  612. this.inforNode = new Element("div", {"styles": this.css.moduleSetupListInforNode}).inject(this.contentNode);
  613. this.nameNode = new Element("div", {"styles": this.css.moduleSetupListNameNode}).inject(this.contentNode);
  614. this.nameNode.set(this.getNameContent());
  615. // switch (this.selectStatus){
  616. // case "all":
  617. // this.iconNode.setStyle("background", "url("+this.app.path+this.app.options.style+"/icon/sel_all.png) center center no-repeat");
  618. // break;
  619. // case "part":
  620. // this.iconNode.setStyle("background", "url("+this.app.path+this.app.options.style+"/icon/sel_part.png) center center no-repeat");
  621. // break;
  622. // default:
  623. this.iconNode.setStyle("background", "url("+this.app.path+this.app.options.style+"/icon/sel_none.png) center center no-repeat");
  624. //}
  625. this.action = new Element("div", {"styles": this.css.moduleSelectActionNode, "text": this.lp.select}).inject(this.actionNode);
  626. this.setEvent();
  627. this.checkSelect(this.postData);
  628. },
  629. setEvent: function(){
  630. this.contentNode.addEvents({
  631. "mouseover": function(){this.contentNode.setStyles(this.css.moduleSetupListContentNode_over);}.bind(this),
  632. "mouseout": function(){this.contentNode.setStyles(this.css.moduleSetupListContentNode);}.bind(this)
  633. });
  634. this.iconNode.addEvent("click", this.selectAll.bind(this));
  635. this.action.addEvent("click", function(){
  636. this.selectElements();
  637. }.bind(this));
  638. this.nameNode.addEvent("click", function(){
  639. this.selectElements();
  640. }.bind(this));
  641. },
  642. selectAll: function(){
  643. var selectData = this.postData;
  644. if (selectData.processList.length || selectData.formList.length || selectData.applicationDictList.length || selectData.scriptList.length || selectData.fileList.length){
  645. if (selectData.processList.length===this.data.processList.length &&
  646. selectData.formList.length===this.data.formList.length &&
  647. selectData.applicationDictList.length===this.data.applicationDictList.length &&
  648. selectData.scriptList.length===this.data.scriptList.length &&
  649. selectData.fileList.length===this.data.fileList.length){
  650. selectData = {
  651. "processList": [],
  652. "formList": [],
  653. "applicationDictList": [],
  654. "scriptList": [],
  655. "fileList": []
  656. };
  657. }else{
  658. selectData = {
  659. "processList": this.data.processList,
  660. "formList": this.data.formList,
  661. "applicationDictList": this.data.applicationDictList,
  662. "scriptList": this.data.scriptList,
  663. "fileList": this.data.fileList
  664. };
  665. }
  666. }else{
  667. selectData = {
  668. "processList": this.data.processList,
  669. "formList": this.data.formList,
  670. "applicationDictList": this.data.applicationDictList,
  671. "scriptList": this.data.scriptList,
  672. "fileList": this.data.fileList
  673. };
  674. }
  675. this.checkSelect(selectData);
  676. },
  677. getNameContent: function(){
  678. return {
  679. "title": this.lp.name+": "+this.data.name+" "+this.lp.id+": "+this.data.id,
  680. "text": this.data.name
  681. }
  682. },
  683. selectElements: function(){
  684. new MWF.xApplication.AppCenter.Exporter.Element.Selector(this, this.data);
  685. },
  686. checkSelect: function(selectData){
  687. this.postData.processList = selectData.processList;
  688. this.postData.formList = selectData.formList;
  689. this.postData.applicationDictList = selectData.applicationDictList;
  690. this.postData.scriptList = selectData.scriptList;
  691. this.postData.fileList = selectData.fileList;
  692. this.exporter.selectData.processPlatformList.erase(this.postData);
  693. if (selectData.processList.length || selectData.formList.length || selectData.applicationDictList.length || selectData.scriptList.length || selectData.fileList.length){
  694. this.exporter.selectData.processPlatformList.push(this.postData);
  695. if (selectData.processList.length==this.data.processList.length &&
  696. selectData.formList.length==this.data.formList.length &&
  697. selectData.applicationDictList.length==this.data.applicationDictList.length &&
  698. selectData.scriptList.length==this.data.scriptList.length &&
  699. selectData.fileList.length==this.data.fileList.length){
  700. this.iconNode.setStyle("background", "url("+this.app.path+this.app.options.style+"/icon/sel_all.png) center center no-repeat");
  701. }else{
  702. this.iconNode.setStyle("background", "url("+this.app.path+this.app.options.style+"/icon/sel_part.png) center center no-repeat");
  703. }
  704. }else{
  705. this.iconNode.setStyle("background", "url("+this.app.path+this.app.options.style+"/icon/sel_none.png) center center no-repeat");
  706. }
  707. }
  708. });
  709. MWF.xApplication.AppCenter.Exporter.ProcessElement = new Class({
  710. Extends: MWF.xApplication.AppCenter.Exporter.Element
  711. });
  712. MWF.xApplication.AppCenter.Exporter.PortalElement = new Class({
  713. Extends: MWF.xApplication.AppCenter.Exporter.Element,
  714. initPostData: function(postData){
  715. this.postData = postData || {
  716. "id": this.data.id,
  717. "name": this.data.name || this.data.appName,
  718. "alias": this.data.alias,
  719. "description": this.data.description,
  720. "pageList": [],
  721. "scriptList": [],
  722. "widgetList": [],
  723. "fileList": []
  724. };
  725. },
  726. selectAll: function(){
  727. var selectData = this.postData;
  728. if (selectData.pageList.length || selectData.scriptList.length || selectData.widgetList.length || selectData.fileList.length){
  729. if (selectData.pageList.length===this.data.pageList.length &&
  730. selectData.scriptList.length===this.data.scriptList.length &&
  731. selectData.widgetList.length===this.data.widgetList.length &&
  732. selectData.fileList.length===this.data.fileList.length){
  733. selectData = {
  734. "pageList": [],
  735. "scriptList": [],
  736. "widgetList": [],
  737. "fileList": []
  738. };
  739. }else{
  740. selectData = {
  741. "pageList": this.data.pageList,
  742. "scriptList": this.data.scriptList,
  743. "widgetList": this.data.widgetList,
  744. "fileList": this.data.fileList
  745. };
  746. }
  747. }else{
  748. selectData = {
  749. "pageList": this.data.pageList,
  750. "scriptList": this.data.scriptList,
  751. "widgetList": this.data.widgetList,
  752. "fileList": this.data.fileList
  753. };
  754. }
  755. this.checkSelect(selectData);
  756. },
  757. selectElements: function(){
  758. new MWF.xApplication.AppCenter.Exporter.Element.PortalSelector(this, this.data);
  759. },
  760. checkSelect: function(selectData){
  761. this.postData.pageList = selectData.pageList;
  762. this.postData.scriptList = selectData.scriptList;
  763. this.postData.widgetList = selectData.widgetList;
  764. this.postData.fileList = selectData.fileList;
  765. this.exporter.selectData.portalList.erase(this.postData);
  766. if (selectData.pageList.length || selectData.scriptList.length || selectData.widgetList.length || selectData.fileList.length){
  767. this.exporter.selectData.portalList.push(this.postData);
  768. if (selectData.pageList.length==this.data.pageList.length &&
  769. selectData.scriptList.length==this.data.scriptList.length &&
  770. selectData.widgetList.length==this.data.widgetList.length &&
  771. selectData.fileList.length==this.data.fileList.length){
  772. this.iconNode.setStyle("background", "url("+this.app.path+this.app.options.style+"/icon/sel_all.png) center center no-repeat");
  773. }else{
  774. this.iconNode.setStyle("background", "url("+this.app.path+this.app.options.style+"/icon/sel_part.png) center center no-repeat");
  775. }
  776. }else{
  777. this.iconNode.setStyle("background", "url("+this.app.path+this.app.options.style+"/icon/sel_none.png) center center no-repeat");
  778. }
  779. }
  780. });
  781. MWF.xApplication.AppCenter.Exporter.CmsElement = new Class({
  782. Extends: MWF.xApplication.AppCenter.Exporter.Element,
  783. getNameContent: function(){
  784. return {
  785. "title": this.lp.name+": "+this.data.appName+" "+this.lp.id+": "+this.data.id,
  786. "text": this.data.appName
  787. }
  788. },
  789. initPostData: function(postData){
  790. this.postData = postData || {
  791. "id": this.data.id,
  792. "name": this.data.name || this.data.appName,
  793. "alias": this.data.alias,
  794. "description": this.data.description,
  795. "categoryInfoList": [],
  796. "formList": [],
  797. "appDictList": [],
  798. "scriptList": [],
  799. "fileList": []
  800. };
  801. },
  802. selectElements: function(){
  803. new MWF.xApplication.AppCenter.Exporter.Element.CmsSelector(this, this.data);
  804. },
  805. selectAll: function(){
  806. var selectData = this.postData;
  807. if (selectData.categoryInfoList.length || selectData.formList.length || selectData.appDictList.length || selectData.scriptList.length || selectData.fileList.length){
  808. if (selectData.categoryInfoList.length===this.data.categoryInfoList.length &&
  809. selectData.formList.length===this.data.formList.length &&
  810. selectData.appDictList.length===this.data.appDictList.length &&
  811. selectData.scriptList.length===this.data.scriptList.length &&
  812. selectData.fileList.length===this.data.fileList.length){
  813. selectData = {
  814. "categoryInfoList": [],
  815. "formList": [],
  816. "appDictList": [],
  817. "scriptList": [],
  818. "fileList": []
  819. };
  820. }else{
  821. selectData = {
  822. "categoryInfoList": this.data.categoryInfoList,
  823. "formList": this.data.formList,
  824. "appDictList": this.data.appDictList,
  825. "scriptList": this.data.scriptList,
  826. "fileList": this.data.fileList
  827. };
  828. }
  829. }else{
  830. selectData = {
  831. "categoryInfoList": this.data.categoryInfoList,
  832. "formList": this.data.formList,
  833. "appDictList": this.data.appDictList,
  834. "scriptList": this.data.scriptList,
  835. "fileList": this.data.fileList
  836. };
  837. }
  838. this.checkSelect(selectData);
  839. },
  840. checkSelect: function(selectData){
  841. this.postData.categoryInfoList = selectData.categoryInfoList;
  842. this.postData.formList = selectData.formList;
  843. this.postData.appDictList = selectData.appDictList;
  844. this.postData.scriptList = selectData.scriptList;
  845. this.postData.fileList = selectData.fileList;
  846. this.exporter.selectData.cmsList.erase(this.postData);
  847. if (selectData.categoryInfoList.length || selectData.formList.length || selectData.appDictList.length || selectData.scriptList.length || selectData.fileList.length){
  848. this.exporter.selectData.cmsList.push(this.postData);
  849. if (selectData.categoryInfoList.length===this.data.categoryInfoList.length &&
  850. selectData.formList.length===this.data.formList.length &&
  851. selectData.appDictList.length===this.data.appDictList.length &&
  852. selectData.scriptList.length===this.data.scriptList.length &&
  853. selectData.fileList.length===this.data.fileList.length){
  854. this.iconNode.setStyle("background", "url("+this.app.path+this.app.options.style+"/icon/sel_all.png) center center no-repeat");
  855. }else{
  856. this.iconNode.setStyle("background", "url("+this.app.path+this.app.options.style+"/icon/sel_part.png) center center no-repeat");
  857. }
  858. }else{
  859. this.iconNode.setStyle("background", "url("+this.app.path+this.app.options.style+"/icon/sel_none.png) center center no-repeat");
  860. }
  861. }
  862. });
  863. MWF.xApplication.AppCenter.Exporter.QueryElement = new Class({
  864. Extends: MWF.xApplication.AppCenter.Exporter.Element,
  865. initPostData: function(postData){
  866. this.postData = postData || {
  867. "id": this.data.id,
  868. "name": this.data.name || this.data.appName,
  869. "alias": this.data.alias,
  870. "description": this.data.description,
  871. "viewList": [],
  872. "statList": [],
  873. "revealList": [],
  874. "statementList": [],
  875. "tableList": []
  876. };
  877. },
  878. selectElements: function(){
  879. new MWF.xApplication.AppCenter.Exporter.Element.QuerySelector(this, this.data);
  880. },
  881. selectAll: function(){
  882. var selectData = this.postData;
  883. if (selectData.viewList.length || selectData.statList.length || selectData.revealList.length|| selectData.statementList.length|| selectData.tableList.length){
  884. if (selectData.viewList.length===this.data.viewList.length &&
  885. selectData.statList.length===this.data.statList.length &&
  886. selectData.statementList.length===this.data.statementList.length &&
  887. selectData.tableList.length===this.data.tableList.length &&
  888. selectData.revealList.length===this.data.revealList.length){
  889. selectData = {
  890. "viewList": this.data.viewList,
  891. "statList": this.data.statList,
  892. "revealList": this.data.revealList,
  893. "statementList": this.data.statementList,
  894. "tableList": this.data.tableList
  895. };
  896. }else{
  897. selectData = {
  898. "viewList": this.data.viewList,
  899. "statList": this.data.statList,
  900. "revealList": this.data.revealList,
  901. "statementList": this.data.statementList,
  902. "tableList": this.data.tableList
  903. };
  904. }
  905. }else{
  906. selectData = {
  907. "viewList": this.data.viewList,
  908. "statList": this.data.statList,
  909. "revealList": this.data.revealList,
  910. "statementList": this.data.statementList,
  911. "tableList": this.data.tableList
  912. };
  913. }
  914. this.checkSelect(selectData);
  915. },
  916. checkSelect: function(selectData){
  917. this.postData.viewList = selectData.viewList;
  918. this.postData.statList = selectData.statList;
  919. this.postData.revealList = selectData.revealList;
  920. this.postData.statementList = selectData.statementList;
  921. this.postData.tableList = selectData.tableList;
  922. this.exporter.selectData.queryList.erase(this.postData);
  923. if (selectData.viewList.length || selectData.statList.length || selectData.revealList.length|| selectData.statementList.length|| selectData.tableList.length){
  924. this.exporter.selectData.queryList.push(this.postData);
  925. if (selectData.viewList.length==this.data.viewList.length &&
  926. selectData.statList.length==this.data.statList.length &&
  927. selectData.statementList.length==this.data.statementList.length &&
  928. selectData.tableList.length==this.data.tableList.length &&
  929. selectData.revealList.length==this.data.revealList.length){
  930. this.iconNode.setStyle("background", "url("+this.app.path+this.app.options.style+"/icon/sel_all.png) center center no-repeat");
  931. }else{
  932. this.iconNode.setStyle("background", "url("+this.app.path+this.app.options.style+"/icon/sel_part.png) center center no-repeat");
  933. }
  934. }else{
  935. this.iconNode.setStyle("background", "url("+this.app.path+this.app.options.style+"/icon/sel_none.png) center center no-repeat");
  936. }
  937. }
  938. });
  939. MWF.xApplication.AppCenter.Exporter.ServiceElement = new Class({
  940. Extends: MWF.xApplication.AppCenter.Exporter.Element,
  941. initPostData: function(postData){
  942. this.postData = postData || {
  943. "id": this.data.id,
  944. "name": this.data.name || this.data.appName,
  945. "alias": this.data.alias,
  946. "description": this.data.description,
  947. "agentList": [],
  948. "invokeList": []
  949. };
  950. },
  951. selectElements: function(){
  952. new MWF.xApplication.AppCenter.Exporter.Element.ServiceSelector(this, this.data);
  953. },
  954. selectAll: function(){
  955. var selectData = this.postData;
  956. if (selectData.agentList.length || selectData.invokeList.length){
  957. if (selectData.agentList.length===this.data.invokeList.length ){
  958. selectData = {
  959. "agentList": [],
  960. "invokeList": []
  961. };
  962. }else{
  963. selectData = {
  964. "agentList": this.data.agentList,
  965. "invokeList": this.data.invokeList
  966. };
  967. }
  968. }else{
  969. selectData = {
  970. "agentList": this.data.agentList,
  971. "invokeList": this.data.invokeList
  972. };
  973. }
  974. this.checkSelect(selectData);
  975. },
  976. checkSelect: function(selectData){
  977. this.postData.agentList = selectData.agentList;
  978. this.postData.invokeList = selectData.invokeList;
  979. this.exporter.selectData.serviceModuleList.erase(this.postData);
  980. if (selectData.agentList.length || selectData.invokeList.length ){
  981. this.exporter.selectData.serviceModuleList.push(this.postData);
  982. if (selectData.agentList.length===this.data.agentList.length &&
  983. selectData.invokeList.length===this.data.invokeList.length
  984. ){
  985. this.iconNode.setStyle("background", "url("+this.app.path+this.app.options.style+"/icon/sel_all.png) center center no-repeat");
  986. }else{
  987. this.iconNode.setStyle("background", "url("+this.app.path+this.app.options.style+"/icon/sel_part.png) center center no-repeat");
  988. }
  989. }else{
  990. this.iconNode.setStyle("background", "url("+this.app.path+this.app.options.style+"/icon/sel_none.png) center center no-repeat");
  991. }
  992. }
  993. });
  994. MWF.xApplication.AppCenter.Exporter.Element.Selector = new Class({
  995. initialize: function(element, data){
  996. this.element = element;
  997. this.app = this.element.app;
  998. this.data = data;
  999. this.lp = this.app.lp;
  1000. this.css = this.app.css;
  1001. this.content = this.element.contentNode;
  1002. this.areaNode = this.element.exporter.contentNode;
  1003. this.selectData = this.initData();
  1004. this.load();
  1005. },
  1006. initData: function(){
  1007. return {
  1008. "processList": [],
  1009. "formList": [],
  1010. "applicationDictList": [],
  1011. "scriptList": [],
  1012. "fileList": []
  1013. }
  1014. },
  1015. load: function(){
  1016. this.node = new Element("div", {"styles": this.css.moduleSelectContentAreaNode}).inject(this.areaNode, "after");
  1017. this.titleNode = new Element("div", {"styles": this.css.moduleSelectTitleNode, "text": this.data.name}).inject(this.node);
  1018. var size = this.content.getSize();
  1019. this.node.setStyle("width", ""+size.x+"px");
  1020. this.node.position({
  1021. "relativeTo": this.content,
  1022. "position": "topLeft",
  1023. "edge": "topLeft"
  1024. });
  1025. this.element.exporter.dlg.button.setStyle("display", "none");
  1026. this.show();
  1027. },
  1028. show: function(){
  1029. var size = this.areaNode.getSize();
  1030. var height = size.y+40;
  1031. var width = size.x;
  1032. var position = this.areaNode.getPosition(this.areaNode.getOffsetParent());
  1033. //var oStyles = this.node.getStyles("height", "width", "top", "left", "background-color");
  1034. //this.node.store("ostyles", oStyles);
  1035. var css = {
  1036. "height": ""+height+"px",
  1037. "width": ""+width+"px",
  1038. "top": ""+position.y+"px",
  1039. "left": ""+position.x+"px",
  1040. "background-color": "#eeeeee"
  1041. };
  1042. this.morph = new Fx.Morph(this.node, {"duration": 100});
  1043. this.morph.start(css).chain(function(){
  1044. this.loadContent();
  1045. }.bind(this));
  1046. },
  1047. hide: function(){
  1048. if (!this.morph) this.morph = new Fx.Morph(this.node, {"duration": 100});
  1049. this.areaNode.setStyle("display", "block");
  1050. this.element.exporter.dlg.button.setStyle("display", "block");
  1051. var size = this.content.getSize();
  1052. var height = size.y;
  1053. var width = size.x;
  1054. var position = this.content.getPosition(this.areaNode);
  1055. var thisPosition = this.node.getPosition(this.node.getOffsetParent());
  1056. var x = thisPosition.x+position.x;
  1057. var y = thisPosition.y+position.y;
  1058. var css = {
  1059. "height": ""+height+"px",
  1060. "width": ""+width+"px",
  1061. "top": ""+y+"px",
  1062. "left": ""+x+"px"
  1063. };
  1064. this.contentNode.destroy();
  1065. this.morph.start(css).chain(function(){
  1066. this.node.destroy();
  1067. MWF.release(this);
  1068. }.bind(this));
  1069. },
  1070. loadContent: function(){
  1071. this.areaNode.setStyle("display", "none");
  1072. this.contentNode = new Element("div", {"styles": this.css.moduleSelectContentNode}).inject(this.node);
  1073. this.buttonNode = new Element("div", {"styles": this.css.moduleSelectButtonNode}).inject(this.node);
  1074. this.cancelButton = new Element("div", {"styles": this.css.moduleSelectButtonActionNode, "text": this.lp.cancel}).inject(this.buttonNode);
  1075. this.okButton = new Element("div", {"styles": this.css.moduleSelectButtonActionNode, "text": this.lp.ok}).inject(this.buttonNode);
  1076. this.setContentHeight();
  1077. this.loadContentList();
  1078. this.cancelButton.addEvent("click", function(){
  1079. this.hide();
  1080. }.bind(this));
  1081. this.okButton.addEvent("click", function(){
  1082. this.checkSelect();
  1083. }.bind(this));
  1084. },
  1085. checkSelect: function() {
  1086. this.selectData.processList = this.getCheckedList(this.listProcessContent);
  1087. this.selectData.formList = this.getCheckedList(this.listFormContent);
  1088. this.selectData.applicationDictList = this.getCheckedList(this.listDictContent);
  1089. this.selectData.scriptList = this.getCheckedList(this.listScriptContent);
  1090. this.selectData.fileList = this.getCheckedList(this.listFileContent);
  1091. this.element.checkSelect(this.selectData);
  1092. this.hide();
  1093. },
  1094. getCheckedList: function(node){
  1095. var list = [];
  1096. node.getElements("input").each(function(input){
  1097. if (input.checked){
  1098. list.push(input.retrieve("data"));
  1099. }
  1100. }.bind());
  1101. return list;
  1102. },
  1103. setContentHeight: function(){
  1104. var size = this.node.getSize();
  1105. var titleSize = this.titleNode.getSize();
  1106. var buttonSize = this.buttonNode.getSize();
  1107. var h = size.y-titleSize.y-buttonSize.y;
  1108. this.contentNode.setStyle("height", ""+h+"px");
  1109. },
  1110. loadContentList: function(){
  1111. this.contentAreaNode = new Element("div", {"styles": {"overflow": "hidden"}}).inject(this.contentNode);
  1112. this.listProcessContent = this.listProcess("processList");
  1113. this.listFormContent = this.listProcess("formList");
  1114. this.listDictContent = this.listProcess("applicationDictList");
  1115. this.listScriptContent = this.listProcess("scriptList");
  1116. this.listFileContent = this.listProcess("fileList");
  1117. },
  1118. listProcess: function(name){
  1119. var title = new Element("div", {"styles": this.css.moduleSelectContentTitleNode}).inject(this.contentAreaNode);
  1120. var titleActionNode = new Element("div", {"styles": this.css.moduleSelectContentTitleButtonNode}).inject(title);
  1121. var inverseAction = new Element("div", {"styles": this.css.moduleSelectContentTitleButtonActionNode, "text": this.lp.inverse}).inject(titleActionNode);
  1122. var selectAllAction = new Element("div", {"styles": this.css.moduleSelectContentTitleButtonActionNode, "text": this.lp.selectAll}).inject(titleActionNode);
  1123. var titleText = new Element("div", {"styles": this.css.moduleSelectContentTitleTextNode, "text": this.lp[name]}).inject(title);
  1124. //moduleSelectContentTitleButtonActionNode
  1125. var listContent = new Element("div", {"styles": this.css.moduleSelectContentListNode}).inject(this.contentAreaNode);
  1126. this.listProcessItems(name, listContent);
  1127. inverseAction.addEvent("click", function(){
  1128. inputs = listContent.getElements("input");
  1129. inputs.each(function(checkbox){
  1130. checkbox.set("checked", !checkbox.get("checked"));
  1131. });
  1132. });
  1133. selectAllAction.addEvent("click", function(){
  1134. inputs = listContent.getElements("input");
  1135. inputs.each(function(checkbox){
  1136. checkbox.set("checked", true);
  1137. });
  1138. });
  1139. return listContent;
  1140. },
  1141. listProcessItems: function(name, listContent){
  1142. this.data[name].each(function(item){
  1143. var div = new Element("div", {"styles": this.css.moduleSelectContentListItemNode}).inject(listContent);
  1144. var flag = false;
  1145. var selectedList = this.element.postData[name];
  1146. if (selectedList){
  1147. for (var i=0; i<selectedList.length; i++){
  1148. if (selectedList[i].id==item.id){
  1149. flag = true;
  1150. break;
  1151. }
  1152. }
  1153. }
  1154. var checkNode = new Element("input", {
  1155. "styles": {"float": "left"},
  1156. "type": "checkbox",
  1157. //"checked": (this.element.postData[name] && this.element.postData[name].indexOf(item)!=-1),
  1158. "checked": flag,
  1159. "value": item.id
  1160. }).inject(div);
  1161. new Element("div", {
  1162. "styles": {"float": "left"},
  1163. "text": this.getItemName(item),
  1164. "events": {
  1165. "click": function(){checkNode.click();}
  1166. }
  1167. }).inject(div);
  1168. checkNode.store("data", item);
  1169. }.bind(this));
  1170. },
  1171. getItemName: function(item){
  1172. return item.name;
  1173. }
  1174. });
  1175. MWF.xApplication.AppCenter.Exporter.Element.ProcessSelector = new Class({
  1176. Extends: MWF.xApplication.AppCenter.Exporter.Element.Selector
  1177. });
  1178. MWF.xApplication.AppCenter.Exporter.Element.PortalSelector = new Class({
  1179. Extends: MWF.xApplication.AppCenter.Exporter.Element.Selector,
  1180. initData: function(){
  1181. return {
  1182. "pageList": [],
  1183. "scriptList": [],
  1184. "widgetList": [],
  1185. "fileList": []
  1186. }
  1187. },
  1188. checkSelect: function() {
  1189. this.selectData.pageList = this.getCheckedList(this.listPageContent);
  1190. this.selectData.scriptList = this.getCheckedList(this.listScriptContent);
  1191. this.selectData.widgetList = this.getCheckedList(this.listWidgetContent);
  1192. this.selectData.fileList = this.getCheckedList(this.listFileContent);
  1193. this.element.checkSelect(this.selectData);
  1194. this.hide();
  1195. },
  1196. loadContentList: function(){
  1197. this.contentAreaNode = new Element("div", {"styles": {"overflow": "hidden"}}).inject(this.contentNode);
  1198. this.listPageContent = this.listProcess("pageList");
  1199. this.listScriptContent = this.listProcess("scriptList");
  1200. this.listWidgetContent = this.listProcess("widgetList");
  1201. this.listFileContent = this.listProcess("fileList");
  1202. }
  1203. });
  1204. MWF.xApplication.AppCenter.Exporter.Element.CmsSelector = new Class({
  1205. Extends: MWF.xApplication.AppCenter.Exporter.Element.Selector,
  1206. initData: function(){
  1207. return {
  1208. "categoryInfoList": [],
  1209. "formList": [],
  1210. "appDictList": [],
  1211. "scriptList": [],
  1212. "fileList": []
  1213. }
  1214. },
  1215. checkSelect: function() {
  1216. this.selectData.categoryInfoList = this.getCheckedList(this.listCategoryInfoContent);
  1217. this.selectData.formList = this.getCheckedList(this.listFormContent);
  1218. this.selectData.appDictList = this.getCheckedList(this.listDictContent);
  1219. this.selectData.scriptList = this.getCheckedList(this.listScriptContent);
  1220. this.selectData.fileList = this.getCheckedList(this.listFileContent);
  1221. this.element.checkSelect(this.selectData);
  1222. this.hide();
  1223. },
  1224. loadContentList: function(){
  1225. this.contentAreaNode = new Element("div", {"styles": {"overflow": "hidden"}}).inject(this.contentNode);
  1226. this.listCategoryInfoContent = this.listProcess("categoryInfoList");
  1227. this.listFormContent = this.listProcess("formList");
  1228. this.listDictContent = this.listProcess("appDictList");
  1229. this.listScriptContent = this.listProcess("scriptList");
  1230. this.listFileContent = this.listProcess("fileList");
  1231. },
  1232. getItemName: function(item){
  1233. return item.name || item.categoryName;
  1234. }
  1235. });
  1236. MWF.xApplication.AppCenter.Exporter.Element.QuerySelector = new Class({
  1237. Extends: MWF.xApplication.AppCenter.Exporter.Element.Selector,
  1238. initData: function(){
  1239. return {
  1240. "viewList": [],
  1241. "statList": [],
  1242. "revealList": [],
  1243. "tableList": [],
  1244. "statementList": []
  1245. }
  1246. },
  1247. checkSelect: function() {
  1248. this.selectData.viewList = this.getCheckedList(this.listViewContent);
  1249. this.selectData.statList = this.getCheckedList(this.listStatContent);
  1250. this.selectData.revealList = this.getCheckedList(this.listRevealContent);
  1251. this.selectData.statementList = this.getCheckedList(this.listRevealContent);
  1252. this.selectData.tableList = this.getCheckedList(this.listRevealContent);
  1253. this.element.checkSelect(this.selectData);
  1254. this.hide();
  1255. },
  1256. loadContentList: function(){
  1257. this.contentAreaNode = new Element("div", {"styles": {"overflow": "hidden"}}).inject(this.contentNode);
  1258. this.listViewContent = this.listProcess("viewList");
  1259. this.listStatContent = this.listProcess("statList");
  1260. this.listRevealContent = this.listProcess("revealList");
  1261. this.listRevealContent = this.listProcess("tableList");
  1262. this.listRevealContent = this.listProcess("statementList");
  1263. }
  1264. });
  1265. MWF.xApplication.AppCenter.Exporter.Element.ServiceSelector = new Class({
  1266. Extends: MWF.xApplication.AppCenter.Exporter.Element.Selector,
  1267. initData: function(){
  1268. return {
  1269. "agentList": [],
  1270. "invokeList": []
  1271. }
  1272. },
  1273. checkSelect: function() {
  1274. this.selectData.agentList = this.getCheckedList(this.listAgentContent);
  1275. this.selectData.invokeList = this.getCheckedList(this.listInvokeContent);
  1276. this.element.checkSelect(this.selectData);
  1277. this.hide();
  1278. },
  1279. loadContentList: function(){
  1280. this.contentAreaNode = new Element("div", {"styles": {"overflow": "hidden"}}).inject(this.contentNode);
  1281. this.listAgentContent = this.listProcess("agentList");
  1282. this.listInvokeContent = this.listProcess("invokeList");
  1283. },
  1284. getItemName: function(item){
  1285. return item.name
  1286. }
  1287. });
  1288. MWF.xApplication.AppCenter.Module.Setup = new Class({
  1289. initialize: function(module, dlg){
  1290. this.module = module;
  1291. this.app = this.module.app;
  1292. this.data = this.module.data;
  1293. this.lp = this.module.lp;
  1294. this.css = this.app.css;
  1295. this.dlg = dlg;
  1296. this.content = this.dlg.content;
  1297. this.setupData = {};
  1298. this.compareData = null;
  1299. this.load();
  1300. },
  1301. load: function(){
  1302. this.node = new Element("div", {"styles": this.css.moduleSetupContentNode}).inject(this.content);
  1303. this.loadTitle();
  1304. this.loadContent();
  1305. },
  1306. loadTitle: function(){
  1307. this.titleNode = new Element("div", {"styles": this.css.moduleSetupTitleNode2}).inject(this.node);
  1308. this.iconAreaNode = new Element("div", {"styles": this.css.moduleSetupIconAreaNode}).inject(this.titleNode);
  1309. var iconNode = new Element("div", {"styles": this.css.moduleSetupIconNode}).inject(this.iconAreaNode);
  1310. if (this.data.icon){
  1311. iconNode.setStyle("background-image", "url(data:image/png;base64,"+this.data.icon+")");
  1312. iconNode.setStyle("background-size", "cover");
  1313. }
  1314. var contentNode = new Element("div", {"styles": this.css.moduleSetupTitleContentNode2}).inject(this.titleNode);
  1315. var nameNode = new Element("div", {"styles": this.css.moduleSetupNameNode2}).inject(contentNode);
  1316. var categoryNode = new Element("div", {"styles": this.css.moduleSetupCategoryNode2}).inject(contentNode);
  1317. var descriptionNode = new Element("div", {"styles": this.css.moduleSetupDescriptionNode2}).inject(contentNode);
  1318. nameNode.set("text", this.data.name);
  1319. categoryNode.set("text", this.data.category);
  1320. descriptionNode.set("text", this.data.description);
  1321. },
  1322. loadContent: function(){
  1323. this.contentNode = new Element("div", {"styles": this.css.moduleSetupCompareContentNode}).inject(this.node);
  1324. this.createLoading(this.contentNode);
  1325. this.loadCompare();
  1326. },
  1327. createLoading: function(node){
  1328. this.dlg.button.setStyle("display", "none");
  1329. this.loadingAreaNode = new Element("div", {"styles": this.css.moduleLoadingAreaNode}).inject(node);
  1330. var img = new Element("img", {
  1331. "styles": this.css.moduleLoadingImgNode,
  1332. "src": this.app.path+this.app.options.style+"/icon/loading.gif"
  1333. }).inject(this.loadingAreaNode);
  1334. },
  1335. clearLoading: function(){
  1336. if (this.loadingAreaNode){
  1337. this.loadingAreaNode.destroy();
  1338. this.loadingAreaNode = null;
  1339. }
  1340. this.dlg.button.setStyle("display", "block");
  1341. },
  1342. loadCompare: function(){
  1343. this.app.actions.compareModule(this.data.id, function(json){
  1344. this.clearLoading();
  1345. this.setupData.flag = json.data.flag;
  1346. this.createListArea();
  1347. this.compareData = json.data;
  1348. this.loadProcessList();
  1349. this.loadPortalList();
  1350. this.loadCMSList();
  1351. this.loadQueryList();
  1352. this.loadServiceList();
  1353. //json.data.processPlatformList
  1354. }.bind(this));
  1355. },
  1356. createListArea: function(){
  1357. this.contentAreaNode = new Element("div").inject(this.contentNode);
  1358. this.contentInforNode = new Element("div", {"styles": this.css.moduleSetupContentInforNode, "text": this.lp.downloadInfor}).inject(this.contentAreaNode);
  1359. //this.processArea = new Element("div", {"styles": this.css.moduleSetupListAreaNode}).inject(this.contentNode);
  1360. this.processAreaTitle = new Element("div", {"styles": this.css.moduleSetupListAreaTitleNode2, "text": this.lp.process}).inject(this.contentAreaNode);
  1361. this.processAreaContent = new Element("div", {"styles": this.css.moduleSetupListAreaContentNode}).inject(this.contentAreaNode);
  1362. this.portalAreaTitle = new Element("div", {"styles": this.css.moduleSetupListAreaTitleNode, "text": this.lp.portal}).inject(this.contentAreaNode);
  1363. this.portalAreaContent = new Element("div", {"styles": this.css.moduleSetupListAreaContentNode2}).inject(this.contentAreaNode);
  1364. this.cmsAreaTitle = new Element("div", {"styles": this.css.moduleSetupListAreaTitleNode, "text": this.lp.cms}).inject(this.contentAreaNode);
  1365. this.cmsAreaContent = new Element("div", {"styles": this.css.moduleSetupListAreaContentNode2}).inject(this.contentAreaNode);
  1366. this.queryAreaTitle = new Element("div", {"styles": this.css.moduleSetupListAreaTitleNode, "text": this.lp.query}).inject(this.contentAreaNode);
  1367. this.queryAreaContent = new Element("div", {"styles": this.css.moduleSetupListAreaContentNode2}).inject(this.contentAreaNode);
  1368. this.serviceAreaTitle = new Element("div", {"styles": this.css.moduleSetupListAreaTitleNode, "text": this.lp.service}).inject(this.contentAreaNode);
  1369. this.serviceAreaContent = new Element("div", {"styles": this.css.moduleSetupListAreaContentNode2}).inject(this.contentAreaNode);
  1370. },
  1371. loadProcessList: function(){
  1372. this.processListNodes = [];
  1373. this.compareData.processPlatformList.each(function(item){
  1374. this.processListNodes.push(new MWF.xApplication.AppCenter.Module.Setup.ProcessElement(this, this.processAreaContent, item));
  1375. }.bind(this));
  1376. },
  1377. loadPortalList: function(){
  1378. this.portalListNodes = [];
  1379. this.compareData.portalList.each(function(item){
  1380. this.portalListNodes.push(new MWF.xApplication.AppCenter.Module.Setup.PortalElement(this, this.portalAreaContent, item));
  1381. }.bind(this));
  1382. },
  1383. loadCMSList: function(){
  1384. this.cmsListNodes = [];
  1385. this.compareData.cmsList.each(function(item){
  1386. this.cmsListNodes.push(new MWF.xApplication.AppCenter.Module.Setup.CmsElement(this, this.cmsAreaContent, item));
  1387. }.bind(this));
  1388. },
  1389. loadQueryList: function(){
  1390. this.queryListNodes = [];
  1391. this.compareData.queryList.each(function(item){
  1392. this.queryListNodes.push(new MWF.xApplication.AppCenter.Module.Setup.QueryElement(this, this.queryAreaContent, item));
  1393. }.bind(this));
  1394. },
  1395. loadServiceList: function(){
  1396. this.serviceListNodes = [];
  1397. this.compareData.serviceModuleList.each(function(item){
  1398. this.serviceListNodes.push(new MWF.xApplication.AppCenter.Module.Setup.ServiceElement(this, this.serviceAreaContent, item));
  1399. }.bind(this));
  1400. },
  1401. setup: function(){
  1402. this.setupData.flag = this.compareData.flag;
  1403. this.setupData.processPlatformList = [];
  1404. this.setupData.portalList = [];
  1405. this.setupData.queryList = [];
  1406. this.setupData.serviceModuleList = [];
  1407. this.setupData.cmsList = [];
  1408. this.getWriteData(this.processListNodes, this.setupData.processPlatformList);
  1409. this.getWriteData(this.portalListNodes, this.setupData.portalList);
  1410. this.getWriteData(this.cmsListNodes, this.setupData.cmsList);
  1411. this.getWriteData(this.queryListNodes, this.setupData.queryList);
  1412. this.getWriteData(this.serviceListNodes, this.setupData.serviceModuleList);
  1413. this.contentAreaNode.setStyle("display", "none");
  1414. this.createLoading(this.contentNode);
  1415. this.app.actions.importModule(this.compareData.flag, this.setupData, function(){
  1416. this.app.notice(this.module.data.name+" "+this.lp.setupSuccess, "success");
  1417. this.clearLoading();
  1418. }.bind(this));
  1419. },
  1420. getWriteData: function(nodes, json){
  1421. nodes.each(function(item){
  1422. if (item.action){
  1423. var v = item.action.options[item.action.selectedIndex].get("value");
  1424. if (v!="ignore"){
  1425. json.push({"id": item.data.id, "method":v});
  1426. }
  1427. }else{
  1428. json.push({"id": item.data.id});
  1429. }
  1430. }.bind(this));
  1431. }
  1432. });
  1433. MWF.xApplication.AppCenter.Module.SetupLocal = new Class({
  1434. Extends: MWF.xApplication.AppCenter.Module.Setup,
  1435. initialize: function(file, dlg, app){
  1436. this.app = app;
  1437. this.file = file;
  1438. this.lp = this.app.lp;
  1439. this.module = {
  1440. "data": {
  1441. "name": this.lp.localApp,
  1442. "category": "",
  1443. "description": ""
  1444. }
  1445. };
  1446. this.data = this.module.data;
  1447. this.css = this.app.css;
  1448. this.dlg = dlg;
  1449. this.content = this.dlg.content;
  1450. this.setupData = {};
  1451. this.compareData = null;
  1452. this.load();
  1453. },
  1454. loadCompare: function(){
  1455. var formData = new FormData();
  1456. formData.append('file', this.file);
  1457. this.app.actions.compareUpload(formData, this.file, function(json){
  1458. this.clearLoading();
  1459. this.setupData.flag = json.data.flag;
  1460. this.createListArea();
  1461. this.compareData = json.data;
  1462. this.loadProcessList();
  1463. this.loadPortalList();
  1464. this.loadCMSList();
  1465. this.loadQueryList();
  1466. this.loadServiceList();
  1467. //json.data.processPlatformList
  1468. }.bind(this));
  1469. }
  1470. });
  1471. MWF.xApplication.AppCenter.Module.Setup.Element = new Class({
  1472. initialize: function(setup, content, data){
  1473. this.setup = setup;
  1474. this.app = this.setup.app;
  1475. this.data = data;
  1476. this.lp = this.app.lp;
  1477. this.css = this.app.css;
  1478. this.content = content;
  1479. this.load();
  1480. },
  1481. load: function(){
  1482. this.contentNode = new Element("div", {"styles": this.css.moduleSetupListContentNode}).inject(this.content);
  1483. this.iconNode = new Element("div", {"styles": this.css.moduleSetupListIconNode}).inject(this.contentNode);
  1484. this.actionNode = new Element("div", {"styles": this.css.moduleSetupListActionNode}).inject(this.contentNode);
  1485. this.inforNode = new Element("div", {"styles": this.css.moduleSetupListInforNode}).inject(this.contentNode);
  1486. this.nameNode = new Element("div", {"styles": this.css.moduleSetupListNameNode}).inject(this.contentNode);
  1487. this.nameNode.set(this.getNameContent());
  1488. if (this.data.exist){
  1489. this.iconNode.setStyle("background", "url("+this.app.path+this.app.options.style+"/icon/conflict.png) center center no-repeat");
  1490. this.contentNode.setStyle("color", "#e86a58");
  1491. this.inforNode.set("text", this.lp.conflict);
  1492. this.action = new Element("select", {"styles": this.css.moduleSetupListActionSelectNode}).inject(this.actionNode);
  1493. var options = "<option value='cover' selected>"+this.lp.cover+"</option>";
  1494. options += "<option value='create'>"+this.lp.create+"</option>";
  1495. options += "<option value='ignore'>"+this.lp.ignore+"</option>";
  1496. this.action.set("html", options);
  1497. // this.action.addEvent("change", function(e){
  1498. //
  1499. // }.bind(this));
  1500. }else{
  1501. this.action = new Element("select", {"styles": this.css.moduleSetupListActionSelectNode}).inject(this.actionNode);
  1502. var options = "<option value='ignore'>"+this.lp.ignore+"</option>";
  1503. options += "<option value='create' selected>"+this.lp.create+"</option>";
  1504. this.action.set("html", options);
  1505. //this.inforNode.set("text", this.lp.setup);
  1506. }
  1507. },
  1508. getNameContent: function(){
  1509. return {
  1510. "title": this.lp.name+": "+this.data.name+" "+this.lp.id+": "+this.data.id,
  1511. "text": this.data.name
  1512. }
  1513. }
  1514. });
  1515. MWF.xApplication.AppCenter.Module.Setup.ProcessElement = new Class({
  1516. Extends: MWF.xApplication.AppCenter.Module.Setup.Element
  1517. });
  1518. MWF.xApplication.AppCenter.Module.Setup.PortalElement = new Class({
  1519. Extends: MWF.xApplication.AppCenter.Module.Setup.Element
  1520. });
  1521. MWF.xApplication.AppCenter.Module.Setup.CmsElement = new Class({
  1522. Extends: MWF.xApplication.AppCenter.Module.Setup.Element
  1523. });
  1524. MWF.xApplication.AppCenter.Module.Setup.QueryElement = new Class({
  1525. Extends: MWF.xApplication.AppCenter.Module.Setup.Element
  1526. });
  1527. MWF.xApplication.AppCenter.Module.Setup.ServiceElement = new Class({
  1528. Extends: MWF.xApplication.AppCenter.Module.Setup.Element
  1529. });