ViewExplorer.js 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641
  1. MWF.xDesktop.requireApp("cms.ColumnManager", "Explorer", null, false);
  2. MWF.xApplication.cms.ColumnManager.ViewExplorer = new Class({
  3. Extends: MWF.xApplication.cms.ColumnManager.Explorer,
  4. Implements: [Options, Events],
  5. options: {
  6. "style" : "default",
  7. "create": MWF.CMSCM.LP.view.create,
  8. "search": MWF.CMSCM.LP.view.search,
  9. "searchText": MWF.CMSCM.LP.view.searchText,
  10. "noElement": MWF.CMSCM.LP.view.noViewNoticeText
  11. },
  12. //_createElement: function(e){
  13. // var _self = this;
  14. // var options = {
  15. // "onQueryLoad": function(){
  16. // this.actions = _self.app.restActions;
  17. // this.application = _self.app.options.column;
  18. // this.column = _self.app.options.column;
  19. // }
  20. // };
  21. // this.app.desktop.openApplication(e, "cms.ViewDesigner", options);
  22. //},
  23. _createElement: function(e){
  24. var _self = this;
  25. var createView = function(e, form){
  26. layout.desktop.getFormDesignerStyle(function(){
  27. var options = {
  28. "style": layout.desktop.formDesignerStyle,
  29. "onQueryLoad": function(){
  30. this.actions = _self.app.restActions;
  31. this.column = _self.app.options.column;
  32. this.application = _self.app.options.column;
  33. this.relativeForm = form;
  34. },
  35. "onPostSave" : function(){
  36. _self.reload();
  37. }
  38. };
  39. layout.desktop.openApplication(e, "cms.ViewDesigner", options);
  40. }.bind(this));
  41. };
  42. this.loadSelectFormDialog( createView );
  43. },
  44. loadSelectFormDialog : function(callback, title, appId){
  45. var _self = this;
  46. var selectFormMaskNode = new Element("div", {"styles": this.css.selectFormMaskNode}).inject(this.app.content);
  47. var selectFormAreaNode = new Element("div", {"styles": this.css.selectFormTemplateAreaNode}).inject(this.app.content);
  48. selectFormAreaNode.fade("in");
  49. var selectFormTitleNode = new Element("div",{
  50. "styles":this.css.createTemplateFormTitleNode,
  51. "text":title || this.app.lp.view.selectRelativeForm
  52. }).inject(selectFormAreaNode);
  53. var selectFormScrollNode = new Element("div", {"styles": this.css.selectFormScrollNode}).inject(selectFormAreaNode);
  54. var selectFormContentNode = new Element("div", {"styles": this.css.selectFormContentNode}).inject(selectFormScrollNode);
  55. MWF.require("MWF.widget.ScrollBar", function(){
  56. new MWF.widget.ScrollBar(selectFormScrollNode, {"indent": false});
  57. }.bind(this));
  58. var _self = this;
  59. this.app.restActions.listForm( appId || this.app.options.column.id, function(json){
  60. json.data.each(function(form){
  61. var formNode = new Element("div", {
  62. "styles": this.css.formNode
  63. }).inject(selectFormContentNode);
  64. var x = "process_icon_" + (Math.random()*33).toInt() + ".png";
  65. var iconUrl = this.path+this.options.style+"/processIcon/"+x;
  66. var formIconNode = new Element("div", {
  67. "styles": this.css.formIconNode
  68. }).inject(formNode);
  69. formIconNode.setStyle("background", "url("+iconUrl+") center center no-repeat");
  70. new Element("div", {
  71. "styles": this.css.formTitleNode,
  72. "text": form.name
  73. }).inject(formNode);
  74. new Element("div", {
  75. "styles": this.css.formDescriptionNode,
  76. "text": form.description || "",
  77. "title": form.description || ""
  78. }).inject(formNode);
  79. new Element("div", {
  80. "styles": this.css.formDateNode,
  81. "text": (form.updateTime || "")
  82. }).inject(formNode);
  83. formNode.store("form", {"name":form.name, "id":form.id});
  84. formNode.addEvents({
  85. "mouseover": function(){this.setStyles(_self.css.formNode_over)},
  86. "mouseout": function(){this.setStyles(_self.css.formNode)},
  87. "mousedown": function(){this.setStyles(_self.css.formNode_down)},
  88. "mouseup": function(){this.setStyles(_self.css.formNode_over)},
  89. "click": function(e){
  90. //createView(e, this.retrieve("form"));
  91. if(callback)callback(e, this.retrieve("form"));
  92. selectFormAreaNode.destroy();
  93. selectFormMaskNode.destroy();
  94. }
  95. });
  96. }.bind(this));
  97. var size = this.app.content.getSize();
  98. var nodeSize = selectFormAreaNode.getSize();
  99. var y = (size.y - nodeSize.y)/2;
  100. var x = (size.x - nodeSize.x)/2;
  101. if (y<0) y=0;
  102. if (x<0) x=0;
  103. selectFormAreaNode.setStyles({
  104. "top": ""+y+"px",
  105. "left": ""+x+"px"
  106. });
  107. }.bind(this));
  108. selectFormMaskNode.addEvent("click", function(){
  109. selectFormAreaNode.destroy();
  110. selectFormMaskNode.destroy();
  111. });
  112. },
  113. _loadItemDataList: function(callback){
  114. this.actions.listView(this.app.options.column.id,callback);
  115. },
  116. _getItemObject: function(item, index){
  117. return new MWF.xApplication.cms.ColumnManager.ViewExplorer.View(this, item, {index:index})
  118. },
  119. setTooltip: function(){
  120. this.options.tooltip = {
  121. "create": MWF.CMSCM.LP.view.create,
  122. "search": MWF.CMSCM.LP.view.search,
  123. "searchText": MWF.CMSCM.LP.view.searchText,
  124. "noElement": MWF.CMSCM.LP.view.noViewNoticeText
  125. };
  126. },
  127. loadElementList: function(){
  128. this._loadItemDataList(function(json){
  129. json.data = json.data || [];
  130. if (json.data.length){
  131. json.data.each(function(item){
  132. var itemObj = this._getItemObject(item, this.itemArray.length+1);
  133. itemObj.load();
  134. this.itemObject[ item.id ] = itemObj;
  135. this.itemArray.push( itemObj );
  136. }.bind(this));
  137. }else{
  138. var noElementNode = new Element("div", {
  139. "styles": this.css.noElementNode,
  140. "text": (this.options.noCreate) ? MWF.CMSCM.LP.view.noViewNoCreateNoticeText : this.options.tooltip.noElement
  141. }).inject(this.elementContentListNode);
  142. if (!this.options.noCreate){
  143. noElementNode.addEvent("click", function(e){
  144. this._createElement(e);
  145. }.bind(this));
  146. }
  147. }
  148. }.bind(this));
  149. },
  150. deleteItems: function(){
  151. while (this.deleteMarkItems.length){
  152. var item = this.deleteMarkItems.shift();
  153. if (this.deleteMarkItems.length){
  154. item.deleteView();
  155. }else{
  156. item.deleteView(function(){
  157. // this.reloadItems();
  158. this.hideDeleteAction();
  159. this.reload();
  160. }.bind(this));
  161. }
  162. }
  163. },
  164. keyCopy: function(e){
  165. if (this.selectMarkItems.length){
  166. var items = [];
  167. var i = 0;
  168. var checkItems = function(e){
  169. if (i>=this.selectMarkItems.length){
  170. if (items.length){
  171. var str = JSON.encode(items);
  172. if (e){
  173. e.clipboardData.setData('text/plain', str);
  174. }else {
  175. window.clipboardData.setData("Text", str);
  176. }
  177. this.app.notice(this.app.lp.copyed, "success");
  178. }
  179. }
  180. }.bind(this);
  181. this.selectMarkItems.each(function(item){
  182. this.app.restActions.getView(item.data.id, function(json){
  183. json.data.elementType = "view";
  184. items.push(json.data);
  185. i++;
  186. checkItems(e);
  187. }.bind(this), null, false)
  188. }.bind(this));
  189. }
  190. },
  191. keyPaste: function(e){
  192. var dataStr = "";
  193. if (e){
  194. dataStr = e.clipboardData.getData('text/plain');
  195. }else{
  196. dataStr = window.clipboardData.getData("Text");
  197. }
  198. var data = JSON.decode(dataStr);
  199. this.loadSelectFormDialog( function( e, form ){
  200. this.pasteItem(data, 0, form);
  201. }.bind(this), "请选择需粘贴视图的关联表单");
  202. },
  203. pasteItem: function(data, i, form){
  204. if (i<data.length){
  205. var item = data[i];
  206. if (item.elementType==="view"){
  207. this.saveItemAs(item, function(){
  208. i++;
  209. this.pasteItem(data, i, form);
  210. }.bind(this), function(){
  211. i++;
  212. this.pasteItem(data, i, form);
  213. }.bind(this), function(){
  214. this.reload();
  215. }.bind(this), form );
  216. }else{
  217. i++;
  218. this.pasteItem(data, i, form);
  219. }
  220. }else{
  221. this.reload();
  222. }
  223. },
  224. saveItemAs: function(data, success, failure, cancel, form){
  225. this.app.restActions.listView(this.app.options.application.id, function(dJson){
  226. dJson.data = dJson.data || [];
  227. var i=1;
  228. var someItems = dJson.data.filter(function(d){ return d.id===data.id });
  229. if (someItems.length){
  230. var someItem = someItems[0];
  231. var lp = this.app.lp;
  232. var _self = this;
  233. var d1 = new Date().parse(data.updateTime);
  234. var d2 = new Date().parse(someItem.updateTime);
  235. var html = "<div>"+lp.copyConfirmInfor+"</div>";
  236. html += "<div style='overflow: hidden; margin: 10px 0px; padding: 5px 10px; background-color: #ffffff; border-radius: 6px;'><div style='font-weight: bold; font-size:14px;'>"+lp.copySource+" "+someItem.name+"</div>";
  237. html += "<div style='font-size:12px; color: #666666; float: left'>"+someItem.updateTime+"</div>" +
  238. "<div style='font-size:12px; color: #666666; float: left; margin-left: 20px;'></div>" +
  239. "<div style='color: red; float: right;'>"+((d1>=d2) ? "": lp.copynew)+"</div></div>";
  240. html += "<div style='overflow: hidden; margin: 10px 0px; padding: 5px 10px; background-color: #ffffff; border-radius: 6px;'><div style='clear: both;font-weight: bold; font-size:14px;'>"+lp.copyTarget+" "+data.name+"</div>";
  241. html += "<div style='font-size:12px; color: #666666; float: left;'>"+data.updateTime+"</div>" +
  242. "<div style='font-size:12px; color: #666666; float: left; margin-left: 20px;'></div>" +
  243. "<div style='color: red; float: right;'>"+((d1<=d2) ? "": lp.copynew)+"</div></div>";
  244. // html += "<>"
  245. this.app.dlg("inofr", null, this.app.lp.copyConfirmTitle, {"html": html}, 500, 290, [
  246. {
  247. "text": lp.copyConfirm_overwrite,
  248. "action": function(){_self.saveItemAsUpdate(someItem, data, success, failure);this.close();}
  249. },
  250. {
  251. "text": lp.copyConfirm_new,
  252. "action": function(){_self.saveItemAsNew(dJson, data, success, failure);this.close();}
  253. },
  254. {
  255. "text": lp.copyConfirm_skip,
  256. "action": function(){/*nothing*/ this.close(); if (success) success();}
  257. },
  258. {
  259. "text": lp.copyConfirm_cancel,
  260. "action": function(){this.close(); if (cancel) cancel();}
  261. }
  262. ]);
  263. }else{
  264. this.saveItemAsNew(dJson, data, success, failure, form)
  265. }
  266. }.bind(this), function(){if (failure) failure();}.bind(this));
  267. },
  268. saveItemAsUpdate: function(someItem, data, success, failure, form){
  269. data.isNew = false;
  270. data.id = someItem.id;
  271. data.application = someItem.appId || someItem.application;
  272. data.applicationName = someItem.appName || someItem.applicationName;
  273. data.appId = data.application;
  274. data.appName = data.applicationName;
  275. data.name = someItem.name;
  276. data.alias = someItem.alias;
  277. data.formId = form.id;
  278. var content = JSON.parse( data.content );
  279. content.application = data.application;
  280. content.applicationName = data.applicationName;
  281. content.relativeForm = form;
  282. content.id = data.id;
  283. content.name = someItem.name;
  284. content.alias = someItem.alias;
  285. var fields = [];
  286. content.columns.each( function( c ){
  287. c.id = this.app.restActions.getUUID();
  288. c.isNew = false;
  289. var field = {};
  290. field.id = c.id;
  291. field.isNew = true;
  292. field.viewId = data.id;
  293. field.fieldTitle = c.title;
  294. field.fieldName = c.value;
  295. field.xshowSequence = form.id;
  296. fields.push( field )
  297. }.bind(this));
  298. //data.fields.each( function(field){
  299. // var list = content.columns.filter(function(d){ return d.id===field.id });
  300. // field.xshowSequence = form.id;
  301. // field.viewId = data.id;
  302. // field.id = this.app.restActions.getUUID();
  303. // if(list.length > 0 ){
  304. // list[0].id = field.id;
  305. // }
  306. //}.bind(this));
  307. data.content = JSON.stringify( content );
  308. this.app.restActions.saveView(data, function(){
  309. if (success) success();
  310. }.bind(this), function(){
  311. if (failure) failure();
  312. }.bind(this));
  313. },
  314. saveItemAsNew: function(dJson, data, success, failure, form){
  315. var item = this.app.options.application;
  316. var id = item.id;
  317. var name = item.name;
  318. var oldName = data.name;
  319. var i=1;
  320. while (dJson.data.some(function(d){ return d.name==data.name || d.alias==data.name })){
  321. data.name = oldName+"_copy"+i;
  322. data.alias = oldName+"_copy"+i;
  323. i++;
  324. }
  325. data.isNew = true;
  326. data.id = this.app.restActions.getUUID();
  327. data.application = id;
  328. data.applicationName = name;
  329. data.appId = id;
  330. data.appName = name;
  331. data.formId = form.id;
  332. var content = JSON.parse( data.content );
  333. content.application = data.application;
  334. content.applicationName = data.applicationName;
  335. content.relativeForm = form;
  336. content.id = data.id;
  337. content.name = data.name;
  338. content.alias = data.alias;
  339. var fields = [];
  340. content.columns.each( function( c ){
  341. c.id = this.app.restActions.getUUID();
  342. c.isNew = false;
  343. var field = {};
  344. field.id = c.id;
  345. field.isNew = true;
  346. field.viewId = data.id;
  347. field.fieldTitle = c.title;
  348. field.fieldName = c.value;
  349. field.xshowSequence = form.id;
  350. fields.push( field )
  351. }.bind(this));
  352. data.content = JSON.stringify( content );
  353. delete data.createTime;
  354. delete data.updateTime;
  355. delete data.elementType;
  356. this.app.restActions.saveView(data, function(){
  357. if (success) success();
  358. }.bind(this), function(){
  359. if (failure) failure();
  360. }.bind(this));
  361. }
  362. });
  363. MWF.xApplication.cms.ColumnManager.ViewExplorer.View = new Class({
  364. Extends: MWF.xApplication.cms.ColumnManager.Explorer.Item,
  365. load_bak: function(){
  366. if( this.options.index % 2 == 0 ){
  367. this.itemNodeCss = this.explorer.css.itemNode_even
  368. }else{
  369. this.itemNodeCss = this.explorer.css.itemNode
  370. }
  371. this.node = new Element("div", {
  372. "styles": this.itemNodeCss,
  373. "events": {
  374. "click": function(e){this._open(e);e.stopPropagation();}.bind(this),
  375. "mouseover": function(){
  376. this.node.setStyles( this.explorer.css.itemNode_over )
  377. }.bind(this),
  378. "mouseout": function(){
  379. this.node.setStyles( this.itemNodeCss )
  380. }.bind(this)
  381. }
  382. }).inject(this.container,this.options.where);
  383. if (this.data.name.icon) this.icon = this.data.name.icon;
  384. var iconUrl = this.explorer.path+""+this.explorer.options.style+"/processIcon/"+this.icon;
  385. var itemIconNode = new Element("div", {
  386. "styles": this.explorer.css.itemIconNode
  387. }).inject(this.node);
  388. itemIconNode.setStyle("background", "url("+iconUrl+") center center no-repeat");
  389. //new Element("img", {
  390. // "src": iconUrl, "border": "0"
  391. //}).inject(itemIconNode);
  392. itemIconNode.makeLnk({
  393. "par": this._getLnkPar()
  394. });
  395. this.actionsArea = new Element("div.actionsArea",{
  396. styles : this.explorer.css.actionsArea
  397. }).inject(this.node);
  398. if (!this.explorer.options.noDelete){
  399. this.deleteActionNode = new Element("div.deleteAction", {
  400. "styles": this.explorer.css.deleteAction
  401. }).inject(this.actionsArea);
  402. this.deleteActionNode.addEvent("click", function(e){
  403. this.deleteItem(e);
  404. e.stopPropagation();
  405. }.bind(this));
  406. this.deleteActionNode.addEvents({
  407. "mouseover" : function(ev){
  408. this.deleteActionNode.setStyles( this.explorer.css.deleteAction_over )
  409. }.bind(this),
  410. "mouseout" : function(ev){
  411. this.deleteActionNode.setStyles( this.explorer.css.deleteAction )
  412. }.bind(this)
  413. })
  414. }
  415. var inforNode = new Element("div.itemInforNode", {
  416. "styles": this.explorer.css.itemInforNode
  417. }).inject(this.node);
  418. var inforBaseNode = new Element("div.itemInforBaseNode", {
  419. "styles": this.explorer.css.itemInforBaseNode
  420. }).inject(inforNode);
  421. new Element("div.itemTextTitleNode", {
  422. "styles": this.explorer.css.itemTextTitleNode,
  423. "text": this.data.name,
  424. "title": this.data.name
  425. }).inject(inforBaseNode);
  426. new Element("div.itemTextAliasNode", {
  427. "styles": this.explorer.css.itemTextAliasNode,
  428. "text": this.data.alias,
  429. "title": this.data.alias
  430. }).inject(inforBaseNode);
  431. new Element("div.itemTextDateNode", {
  432. "styles": this.explorer.css.itemTextDateNode,
  433. "text": (this.data.updateTime || "")
  434. }).inject(inforBaseNode);
  435. new Element("div.itemTextDescriptionNode", {
  436. "styles": this.explorer.css.itemTextDescriptionNode,
  437. "text": this.data.description || "",
  438. "title": this.data.description || ""
  439. }).inject(inforBaseNode);
  440. this._customNodes();
  441. //this._isNew();
  442. },
  443. _customNodes: function(){},
  444. _open: function(e){
  445. var _self = this;
  446. var options = {
  447. "onQueryLoad": function(){
  448. this.actions = _self.explorer.actions;
  449. this.category = _self;
  450. this.options.id = _self.data.id;
  451. this.column = _self.explorer.app.options.column;
  452. this.application = _self.explorer.app.options.column;
  453. this.options.noModifyName = _self.explorer.options.noModifyName;
  454. this.options.readMode = _self.explorer.options.readMode,
  455. this.options.formId = _self.data.formId;
  456. }
  457. };
  458. this.explorer.app.desktop.openApplication(e, "cms.ViewDesigner", options);
  459. },
  460. _getIcon: function(){
  461. var x = (Math.random()*33).toInt();
  462. return "process_icon_"+x+".png";
  463. },
  464. _getLnkPar: function(){
  465. return {
  466. "icon": this.explorer.path+this.explorer.options.style+"/viewIcon/lnk.png",
  467. "title": this.data.name,
  468. "par": "cms.ViewDesigner#{\"id\": \""+this.data.id+"\", \"application\": "+JSON.stringify( this.explorer.app.options.application )+"}"
  469. };
  470. },
  471. // deleteItem: function(e){
  472. // var _self = this;
  473. // this.explorer.app.confirm("info", e, this.explorer.app.lp.form.deleteFormTitle, this.explorer.app.lp.form.deleteForm, 320, 110, function(){
  474. // _self.deleteForm();
  475. // this.close();
  476. // },function(){
  477. // this.close();
  478. // });
  479. // },
  480. deleteView: function(callback){
  481. this.explorer.app.restActions.deleteView(this.data.id, function(){
  482. this.node.destroy();
  483. if (callback) callback();
  484. }.bind(this));
  485. },
  486. saveas: function(){
  487. MWF.xDesktop.requireApp("Selector", "package", function(){
  488. var app = this.explorer.app.options.application;
  489. app.name = app.appName;
  490. var selector = new MWF.O2Selector(this.explorer.app.content, {
  491. "title": this.explorer.app.lp.copyto,
  492. "type": "CMSApplication",
  493. "count" : 1,
  494. "values": [app],
  495. "onComplete": function(items){
  496. items.each(function(item){
  497. this.saveItemAs(item.data);
  498. }.bind(this));
  499. }.bind(this)
  500. });
  501. }.bind(this));
  502. },
  503. saveItemAs: function(item){
  504. //var selectForm = function(){
  505. // this.explorer.loadSelectFormDialog( function( e, form ){
  506. // this._saveItemAs(item, form);
  507. // }.bind(this), "请选择需粘贴视图的关联表单", item.id);
  508. //}.bind(this);
  509. //this.explorer.app.restActions.getForm(item.formId, function( json ){
  510. // if( json && json.data && json.data.id ){
  511. // this._saveItemAs(item, form);
  512. // }else{
  513. // selectForm();
  514. // }
  515. //}.bind(this), function(){
  516. // selectForm();
  517. //}.bind(this));
  518. this.explorer.loadSelectFormDialog( function( e, form ){
  519. this._saveItemAs(item, form);
  520. }.bind(this), "请选择需粘贴视图的关联表单", item.id);
  521. },
  522. _saveItemAs: function(item, form){
  523. this.app = this.app || this.explorer.app;
  524. var id = item.id;
  525. var name = item.name || item.appName;
  526. this.explorer.app.restActions.getView(this.data.id, function(json){
  527. var data = json.data;
  528. var oldName = data.name;
  529. this.explorer.app.restActions.listView(id, function(dJson){
  530. dJson.data = dJson.data || [];
  531. var i=1;
  532. while (dJson.data.some(function(d){ return d.name==data.name || d.alias==data.name })){
  533. data.name = oldName+"_copy"+i;
  534. data.alias = oldName+"_copy"+i;
  535. i++;
  536. }
  537. data.isNew = true;
  538. data.id = this.app.restActions.getUUID();
  539. data.application = id;
  540. data.applicationName = name;
  541. data.appId = id;
  542. data.appName = name;
  543. data.formId = form.id;
  544. var content = JSON.parse( data.content );
  545. content.application = data.application;
  546. content.applicationName = data.applicationName;
  547. content.relativeForm = form;
  548. content.id = data.id;
  549. content.name = data.name;
  550. content.alias = data.alias;
  551. var fields = [];
  552. content.columns.each( function( c ){
  553. c.id = this.app.restActions.getUUID();
  554. c.isNew = false;
  555. var field = {};
  556. field.id = c.id;
  557. field.isNew = true;
  558. field.viewId = data.id;
  559. field.fieldTitle = c.title;
  560. field.fieldName = c.value;
  561. field.xshowSequence = form.id;
  562. fields.push( field )
  563. }.bind(this));
  564. data.content = JSON.stringify( content );
  565. delete data.createTime;
  566. delete data.updateTime;
  567. delete data.elementType;
  568. this.explorer.app.restActions.saveView(data, function(){
  569. if (id == this.explorer.app.options.application.id) this.explorer.reload();
  570. }.bind(this));
  571. }.bind(this));
  572. }.bind(this));
  573. }
  574. });