Inquiry.js 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591
  1. MWF.xApplication = MWF.xApplication || {};
  2. MWF.xApplication.query = MWF.xApplication.query || {};
  3. MWF.xApplication.query.InquiryDesigner = MWF.xApplication.query.InquiryDesigner || {};
  4. MWF.APPDVD = MWF.xApplication.query.InquiryDesigner;
  5. MWF.require("MWF.widget.Common", null, false);
  6. MWF.require("MWF.xScript.Macro", null, false);
  7. MWF.APPISTD = MWF.xApplication.query.InquiryDesigner;
  8. MWF.xDesktop.requireApp("query.InquiryDesigner", "lp."+MWF.language, null, false);
  9. MWF.xDesktop.requireApp("query.ViewDesigner", "View", null, false);
  10. MWF.xDesktop.requireApp("query.InquiryDesigner", "Property", null, false);
  11. MWF.xApplication.query.InquiryDesigner.View = new Class({
  12. Extends: MWF.xApplication.query.ViewDesigner.View,
  13. Implements: [Options, Events],
  14. options: {
  15. "style": "default",
  16. "isView": false,
  17. "showTab": true,
  18. "propertyPath": "../x_component_query_InquiryDesigner/$View/view.html"
  19. },
  20. initialize: function(designer, data, options){
  21. this.setOptions(options);
  22. this.path = "../x_component_query_InquiryDesigner/$View/";
  23. this.cssPath = "../x_component_query_InquiryDesigner/$View/"+this.options.style+"/css.wcss";
  24. this._loadCss();
  25. this.designer = designer;
  26. this.data = data;
  27. if (!this.data.data) this.data.data = {};
  28. this.parseData();
  29. this.node = this.designer.designNode;
  30. //this.tab = this.designer.tab;
  31. this.areaNode = new Element("div", {"styles": {"height": "100%", "overflow": "auto"}});
  32. //MWF.require("MWF.widget.ScrollBar", function(){
  33. // new MWF.widget.ScrollBar(this.areaNode, {"distance": 100});
  34. //}.bind(this));
  35. this.propertyListNode = this.designer.propertyDomArea;
  36. //this.propertyNode = this.designer.propertyContentArea;
  37. if(this.designer.application) this.data.applicationName = this.designer.application.name;
  38. if(this.designer.application) this.data.application = this.designer.application.id;
  39. this.isNewView = (this.data.name) ? false : true;
  40. this.items = [];
  41. this.view = this;
  42. this.autoSave();
  43. this.designer.addEvent("queryClose", function(){
  44. if (this.autoSaveTimerID) window.clearInterval(this.autoSaveTimerID);
  45. }.bind(this));
  46. },
  47. parseData: function(){
  48. this.json = this.data;
  49. if( !this.json.data.events ){
  50. var url = "../x_component_query_InquiryDesigner/$View/view.json";
  51. MWF.getJSON(url, {
  52. "onSuccess": function(obj){
  53. this.json.data.events = obj.data.events;
  54. }.bind(this),
  55. "onerror": function(text){
  56. this.notice(text, "error");
  57. }.bind(this),
  58. "onRequestFailure": function(xhr){
  59. this.notice(xhr.responseText, "error");
  60. }.bind(this)
  61. },false);
  62. }
  63. },
  64. showProperty: function(){
  65. if (!this.property){
  66. this.property = new MWF.xApplication.query.InquiryDesigner.Property(this, this.designer.propertyContentArea, this.designer, {
  67. "path": this.options.propertyPath,
  68. "onPostLoad": function(){
  69. this.property.show();
  70. }.bind(this)
  71. });
  72. this.property.load();
  73. }else{
  74. this.property.show();
  75. }
  76. },
  77. hideProperty: function(){
  78. if (this.property) this.property.hide();
  79. },
  80. loadViewData: function(){
  81. if (this.data.id){
  82. this.saveSilence(function(){
  83. this.viewContentBodyNode.empty();
  84. this.viewContentTableNode = new Element("table", {
  85. "styles": this.css.viewContentTableNode,
  86. "border": "0px",
  87. "cellPadding": "0",
  88. "cellSpacing": "0"
  89. }).inject(this.viewContentBodyNode);
  90. this.designer.actions.loadView(this.data.id, null,function(json){
  91. var entries = {};
  92. json.data.selectList.each(function(entry){entries[entry.column] = entry;}.bind(this));
  93. if (this.json.data.group.column){
  94. if (json.data.groupGrid.length){
  95. var groupColumn = null;
  96. for (var c = 0; c<json.data.selectList.length; c++){
  97. if (json.data.selectList[c].column === json.data.group.column){
  98. groupColumn = json.data.selectList[c];
  99. break;
  100. }
  101. }
  102. json.data.groupGrid.each(function(line, idx){
  103. var groupTr = new Element("tr", {
  104. "styles": this.json.data.viewStyles ? this.json.data.viewStyles["contentTr"] : this.css.viewContentTrNode,
  105. "data-is-group" : "yes"
  106. }).inject(this.viewContentTableNode);
  107. var colSpan = this.items.length ;
  108. var td = new Element("td", {
  109. "styles": this.json.data.viewStyles ? this.json.data.viewStyles["contentGroupTd"] : this.css.viewContentGroupTdNode,
  110. "colSpan": colSpan
  111. }).inject(groupTr);
  112. var groupAreaNode;
  113. if( this.json.data.viewStyles ){
  114. groupAreaNode = new Element("div", {"styles": this.json.data.viewStyles["groupCollapseNode"]}).inject(td);
  115. groupAreaNode.set("text", line.group);
  116. }else{
  117. groupAreaNode = new Element("div", {"styles": this.css.viewContentTdGroupNode}).inject(td);
  118. var groupIconNode = new Element("div", {"styles": this.css.viewContentTdGroupIconNode}).inject(groupAreaNode);
  119. var groupTextNode = new Element("div", {"styles": this.css.viewContentTdGroupTextNode}).inject(groupAreaNode);
  120. if (groupColumn){
  121. //groupTextNode.set("text", (groupColumn.code) ? MWF.Macro.exec(groupColumn.code, {"value": line.group, "gridData": json.data.groupGrid, "data": json.data, "entry": line}) : line.group);
  122. groupTextNode.set("text", line.group);
  123. }else{
  124. groupTextNode.set("text", line.group);
  125. }
  126. }
  127. var subtrs = [];
  128. line.list.each(function(entry){
  129. var tr = new Element("tr", {
  130. "styles": this.json.data.viewStyles ? this.json.data.viewStyles["contentTr"] : this.css.viewContentTrNode
  131. }).inject(this.viewContentTableNode);
  132. tr.setStyle("display", "none");
  133. //this.createViewCheckboxTd( tr );
  134. var td = new Element("td", {
  135. "styles": this.json.data.viewStyles ? this.json.data.viewStyles["contentTd"] : this.css.viewContentTdNode
  136. }).inject(tr);
  137. Object.each(entries, function(c, k){
  138. var d = entry.data[k];
  139. if (d!=undefined){
  140. if (k!=this.json.data.group.column){
  141. var td = new Element("td", {
  142. "styles": this.json.data.viewStyles ? this.json.data.viewStyles["contentTd"] : this.css.viewContentTdNode
  143. }).inject(tr);
  144. //td.set("text", (entries[k].code) ? MWF.Macro.exec(entries[k].code, {"value": d, "gridData": json.data.groupGrid, "data": json.data, "entry": entry}) : d);
  145. if (c.isHtml){
  146. td.set("html", d);
  147. }else{
  148. td.set("text", d);
  149. }
  150. }
  151. }
  152. }.bind(this));
  153. // Object.each(entry.data, function(d, k){
  154. // if (k!=this.json.data.group.column){
  155. // var td = new Element("td", {"styles": this.css.viewContentTdNode}).inject(tr);
  156. // td.set("text", (entries[k].code) ? MWF.Macro.exec(entries[k].code, {"value": d, "gridData": json.data.groupGrid, "data": json.data, "entry": entry}) : d);
  157. // }
  158. // }.bind(this));
  159. subtrs.push(tr)
  160. }.bind(this));
  161. groupAreaNode.store("subtrs", subtrs);
  162. var _self = this;
  163. groupAreaNode.addEvent("click", function(){
  164. var subtrs = this.retrieve("subtrs");
  165. var iconNode = groupAreaNode.getFirst("div");
  166. if (subtrs[0]){
  167. if (subtrs[0].getStyle("display")=="none"){
  168. subtrs.each(function(subtr){ subtr.setStyle("display", "table-row"); });
  169. if( iconNode ) {
  170. iconNode.setStyle("background", "url(" + "../x_component_process_InquiryDesigner/$View/default/icon/down.png) center center no-repeat");
  171. }else{
  172. this.setStyles( _self.json.data.viewStyles["groupExpandNode"] )
  173. }
  174. }else{
  175. subtrs.each(function(subtr){ subtr.setStyle("display", "none"); });
  176. if( iconNode ) {
  177. iconNode.setStyle("background", "url(" + "../x_component_process_InquiryDesigner/$View/default/icon/right.png) center center no-repeat");
  178. }else{
  179. this.setStyles( _self.json.data.viewStyles["groupCollapseNode"] )
  180. }
  181. }
  182. }
  183. _self.setContentHeight();
  184. });
  185. }.bind(this));
  186. this.setContentColumnWidth();
  187. this.setContentHeight();
  188. }else if(this.json.data.noDataText){
  189. var noDataTextNodeStyle = this.css.noDataTextNode;
  190. if( this.json.data.viewStyles ){
  191. if( this.json.data.viewStyles["noDataTextNode"] ){
  192. noDataTextNodeStyle = this.json.data.viewStyles["noDataTextNode"]
  193. }else{
  194. this.json.data.viewStyles["noDataTextNode"] = this.css.noDataTextNode
  195. }
  196. }
  197. this.noDataTextNode = new Element( "div", {
  198. "styles": noDataTextNodeStyle,
  199. "text" : this.json.data.noDataText
  200. }).inject( this.viewContentBodyNode );
  201. }
  202. }else{
  203. if (json.data.grid.length){
  204. json.data.grid.each(function(line, idx){
  205. var tr = new Element("tr", {
  206. "styles": this.json.data.viewStyles ? this.json.data.viewStyles["contentTr"] : this.css.viewContentTrNode
  207. }).inject(this.viewContentTableNode);
  208. //this.createViewCheckboxTd( tr );
  209. Object.each(entries, function(c, k){
  210. var d = line.data[k];
  211. if (d!=undefined){
  212. var td = new Element("td", {
  213. "styles": this.json.data.viewStyles ? this.json.data.viewStyles["contentTd"] : this.css.viewContentTdNode
  214. }).inject(tr);
  215. //td.set("text", (entries[k].code) ? MWF.Macro.exec(entries[k].code, {"value": d, "gridData": json.data.grid, "data": json.data, "entry": line}) : d);
  216. if (c.isHtml){
  217. td.set("html", d);
  218. }else{
  219. td.set("text", d);
  220. }
  221. //td.set("text", d);
  222. }
  223. }.bind(this));
  224. // Object.each(line.data, function(d, k){
  225. // var td = new Element("td", {"styles": this.css.viewContentTdNode}).inject(tr);
  226. // td.set("text", (entries[k].code) ? MWF.Macro.exec(entries[k].code, {"value": d, "gridData": json.data.grid, "data": json.data, "entry": line}) : d);
  227. // }.bind(this));
  228. }.bind(this));
  229. this.setContentColumnWidth();
  230. this.setContentHeight();
  231. }else if(this.json.data.noDataText){
  232. var noDataTextNodeStyle = this.css.noDataTextNode;
  233. if( this.json.data.viewStyles ){
  234. if( this.json.data.viewStyles["noDataTextNode"] ){
  235. noDataTextNodeStyle = this.json.data.viewStyles["noDataTextNode"]
  236. }else{
  237. this.json.data.viewStyles["noDataTextNode"] = this.css.noDataTextNode
  238. }
  239. }
  240. this.noDataTextNode = new Element( "div", {
  241. "styles": noDataTextNodeStyle,
  242. "text" : this.json.data.noDataText
  243. }).inject( this.viewContentBodyNode );
  244. }
  245. }
  246. }.bind(this));
  247. }.bind(this));
  248. }
  249. },
  250. addColumn: function(){
  251. debugger;
  252. MWF.require("MWF.widget.UUID", function(){
  253. var id = (new MWF.widget.UUID).id;
  254. var json = {
  255. "id": id,
  256. "column": id,
  257. "displayName": this.designer.lp.unnamed,
  258. "orderType": "original"
  259. };
  260. if (!this.json.data.selectList) this.json.data.selectList = [];
  261. this.json.data.selectList.push(json);
  262. var column = new MWF.xApplication.query.InquiryDesigner.View.Column(json, this);
  263. this.items.push(column);
  264. column.selected();
  265. if (this.viewContentTableNode){
  266. var trs = this.viewContentTableNode.getElements("tr");
  267. trs.each(function(tr){
  268. new Element("td", {"styles": this.css.viewContentTdNode}).inject(tr)
  269. }.bind(this));
  270. //this.setContentColumnWidth();
  271. }
  272. this.setViewWidth();
  273. this.addColumnNode.scrollIntoView(true);
  274. }.bind(this));
  275. //new Fx.Scroll(this.view.areaNode, {"wheelStops": false, "duration": 0}).toRight();
  276. },
  277. unSelected: function(){
  278. this.currentSelectedModule = null;
  279. this.hideProperty();
  280. },
  281. loadViewColumns: function(){
  282. // for (var i=0; i<10; i++){
  283. if (this.json.data.selectList) {
  284. this.json.data.selectList.each(function (json) {
  285. this.items.push(new MWF.xApplication.query.InquiryDesigner.View.Column(json, this));
  286. }.bind(this));
  287. }
  288. // }
  289. },
  290. showActionbar : function( noSetHeight ){
  291. this.actionbarNode.show();
  292. if( !this.json.data.actionbarList )this.json.data.actionbarList = [];
  293. if( !this.actionbarList || this.actionbarList.length == 0 ){
  294. if( this.json.data.actionbarList.length ){
  295. this.json.data.actionbarList.each( function(json){
  296. this.actionbarList.push( new MWF.xApplication.query.InquiryDesigner.View.Actionbar( json, this.json.data.actionbarList, this) )
  297. }.bind(this));
  298. }else{
  299. this.actionbarList.push( new MWF.xApplication.query.InquiryDesigner.View.Actionbar( null, this.json.data.actionbarList, this) )
  300. }
  301. }
  302. if( !noSetHeight )this.setContentHeight();
  303. },
  304. loadPaging: function( noSetHeight ){
  305. this.pagingNode = new Element("div#pagingNode", {"styles": this.css.pagingNode}).inject(this.areaNode);
  306. this.pagingList = [];
  307. if( !this.json.data.pagingList )this.json.data.pagingList = [];
  308. if( !this.pagingList || this.pagingList.length == 0 ){
  309. if( this.json.data.pagingList.length ){
  310. this.json.data.pagingList.each( function(json){
  311. this.pagingList.push( new MWF.xApplication.query.InquiryDesigner.View.Paging( json, this.json.data.pagingList, this) )
  312. }.bind(this));
  313. }else{
  314. this.pagingList.push( new MWF.xApplication.query.InquiryDesigner.View.Paging( null, this.json.data.pagingList, this) )
  315. }
  316. }
  317. // if( !noSetHeight )this.setContentHeight();
  318. },
  319. setViewWidth: function(){
  320. if( !this.viewAreaNode )return;
  321. this.viewAreaNode.setStyle("width", "auto");
  322. this.viewTitleNode.setStyle("width", "auto");
  323. var s1 = this.viewTitleTableNode.getSize();
  324. var s2 = this.refreshNode.getSize();
  325. var s3 = this.addColumnNode.getSize();
  326. var width = s1.x+s2.x+s2.x;
  327. var size = this.areaNode.getSize();
  328. if (width>size.x){
  329. this.viewTitleNode.setStyle("width", ""+width+"px");
  330. this.viewAreaNode.setStyle("width", ""+width+"px");
  331. }else{
  332. this.viewTitleNode.setStyle("width", ""+size.x+"px");
  333. this.viewAreaNode.setStyle("width", ""+size.x+"px");
  334. }
  335. this.setContentColumnWidth();
  336. this.setContentHeight();
  337. },
  338. preview: function(){
  339. if( this.isNewView ){
  340. this.designer.notice( this.designer.lp.saveViewNotice, "error" );
  341. return;
  342. }
  343. this.saveSilence( function () {
  344. var url = "../x_desktop/app.html?app=query.Query&status=";
  345. url += JSON.stringify({
  346. id : this.data.application,
  347. viewId : this.data.id
  348. });
  349. window.open(o2.filterUrl(url),"_blank");
  350. }.bind(this));
  351. },
  352. saveSilence: function(callback){
  353. if (!this.data.name){
  354. this.designer.notice(this.designer.lp.notice.inputName, "error");
  355. return false;
  356. }
  357. this.designer.actions.saveView(this.data, function(json){
  358. this.data.id = json.data.id;
  359. this.isNewView = false;
  360. //this.page.textNode.set("text", this.data.name);
  361. if (this.lisNode) {
  362. this.lisNode.getLast().set("text", this.data.name+"("+this.data.alias+")");
  363. }
  364. if (callback) callback();
  365. }.bind(this));
  366. },
  367. save: function(callback){
  368. //if (this.designer.tab.showPage==this.page){
  369. if (!this.data.name){
  370. this.designer.notice(this.designer.lp.notice.inputName, "error");
  371. return false;
  372. }
  373. //}
  374. this.designer.actions.saveView(this.data, function(json){
  375. this.designer.notice(this.designer.lp.notice.save_success, "success", this.node, {"x": "left", "y": "bottom"});
  376. this.isNewView = false;
  377. this.data.id = json.data.id;
  378. //this.page.textNode.set("text", this.data.name);
  379. if (this.lisNode) {
  380. this.lisNode.getLast().set("text", this.data.name+"("+this.data.alias+")");
  381. }
  382. if (callback) callback();
  383. }.bind(this));
  384. },
  385. _setEditStyle: function(name, input, oldValue){
  386. if (name=="type"){
  387. this.items.each(function(item){
  388. if (item.property){
  389. var processDiv = item.property.propertyContent.getElements("#"+item.json.id+"dataPathSelectedProcessArea");
  390. var cmsDiv = item.property.propertyContent.getElements("#"+item.json.id+"dataPathSelectedCMSArea");
  391. if (this.json[name]=="cms"){
  392. cmsDiv.setStyle("display", "block");
  393. processDiv.setStyle("display", "none");
  394. }else{
  395. cmsDiv.setStyle("display", "none");
  396. processDiv.setStyle("display", "block");
  397. }
  398. }
  399. }.bind(this));
  400. }
  401. if( name=="data.actionbarHidden" ){
  402. if( this.json.data.actionbarHidden ){
  403. this.hideActionbar()
  404. }else{
  405. this.showActionbar()
  406. }
  407. }
  408. if( name=="data.selectAllEnable" ){
  409. if( this.json.data.selectAllEnable ){
  410. this.viewTitleTrNode.getElement(".viewTitleCheckboxTd").setStyle("display","table-cell");
  411. this.viewContentTableNode.getElements(".viewContentCheckboxTd").setStyle("display","table-cell");
  412. }else{
  413. this.viewTitleTrNode.getElement(".viewTitleCheckboxTd").setStyle("display","none");
  414. this.viewContentTableNode.getElements(".viewContentCheckboxTd").setStyle("display","none");
  415. }
  416. }
  417. if (name=="data.viewStyleType"){
  418. var file = (this.stylesList && this.json.data.viewStyleType) ? this.stylesList[this.json.data.viewStyleType].file : null;
  419. var extendFile = (this.stylesList && this.json.data.viewStyleType) ? this.stylesList[this.json.data.viewStyleType].extendFile : null;
  420. this.loadTemplateStyles( file, extendFile, function( templateStyles ){
  421. this.templateStyles = templateStyles;
  422. var oldFile, oldExtendFile;
  423. if( oldValue && this.stylesList[oldValue] ){
  424. oldFile = this.stylesList[oldValue].file;
  425. oldExtendFile = this.stylesList[oldValue].extendFile;
  426. }
  427. this.loadTemplateStyles( oldFile, oldExtendFile, function( oldTemplateStyles ){
  428. this.json.data.styleConfig = (this.stylesList && this.json.data.viewStyleType) ? this.stylesList[this.json.data.viewStyleType] : null;
  429. if (oldTemplateStyles["view"]) this.clearTemplateStyles(oldTemplateStyles["view"]);
  430. if (this.templateStyles["view"]) this.setTemplateStyles(this.templateStyles["view"]);
  431. this.setAllStyles();
  432. this.actionbarList.each( function (module) {
  433. if (oldTemplateStyles["actionbar"]){
  434. module.clearTemplateStyles(oldTemplateStyles["actionbar"]);
  435. }
  436. module.setStyleTemplate();
  437. module.setAllStyles();
  438. })
  439. this.pagingList.each( function (module) {
  440. if (oldTemplateStyles["paging"]){
  441. module.clearTemplateStyles(oldTemplateStyles["paging"]);
  442. }
  443. module.setStyleTemplate();
  444. module.setAllStyles();
  445. });
  446. // this.moduleList.each(function(module){
  447. // if (oldTemplateStyles[module.moduleName]){
  448. // module.clearTemplateStyles(oldTemplateStyles[module.moduleName]);
  449. // }
  450. // module.setStyleTemplate();
  451. // module.setAllStyles();
  452. // }.bind(this));
  453. }.bind(this))
  454. }.bind(this))
  455. }
  456. if (name=="data.viewStyles"){
  457. this.setCustomStyles();
  458. }
  459. },
  460. removeStyles: function(from, to){
  461. if (this.json.data.viewStyles[to]){
  462. Object.each(from, function(style, key){
  463. if (this.json.data.viewStyles[to][key] && this.json.data.viewStyles[to][key]==style){
  464. delete this.json.data.viewStyles[to][key];
  465. }
  466. }.bind(this));
  467. }
  468. },
  469. copyStyles: function(from, to){
  470. if (!this.json.data.viewStyles[to]) this.json.data.viewStyles[to] = {};
  471. Object.each(from, function(style, key){
  472. if (!this.json.data.viewStyles[to][key]) this.json.data.viewStyles[to][key] = style;
  473. }.bind(this));
  474. },
  475. saveAs: function(){
  476. var form = new MWF.xApplication.query.InquiryDesigner.View.NewNameForm(this, {
  477. name : this.data.name + "_" + MWF.xApplication.query.InquiryDesigner.LP.copy,
  478. query : this.data.query || this.data.application,
  479. queryName : this.data.queryName || this.data.applicationName
  480. }, {
  481. onSave : function( data, callback ){
  482. this._saveAs( data, callback );
  483. }.bind(this)
  484. }, {
  485. app: this.designer
  486. });
  487. form.edit()
  488. },
  489. _saveAs : function( data , callback){
  490. var _self = this;
  491. var d = this.cloneObject( this.data );
  492. d.isNewView = true;
  493. d.id = this.designer.actions.getUUID();
  494. d.name = data.name;
  495. d.alias = "";
  496. d.query = data.query;
  497. d.queryName = data.queryName;
  498. d.application = data.query;
  499. d.applicationName = data.queryName;
  500. d.pid = d.id + d.id;
  501. delete d[this.data.id+"viewFilterType"];
  502. d[d.id+"viewFilterType"]="custom";
  503. d.data.selectList.each( function( entry ){
  504. entry.id = (new MWF.widget.UUID).id;
  505. }.bind(this));
  506. this.designer.actions.saveView(d, function(json){
  507. this.designer.notice(this.designer.lp.notice.saveAs_success, "success", this.node, {"x": "left", "y": "bottom"});
  508. if (callback) callback();
  509. }.bind(this));
  510. }
  511. });
  512. MWF.xApplication.query.InquiryDesigner.View.Column = new Class({
  513. Extends: MWF.xApplication.query.ViewDesigner.View.Column
  514. });
  515. MWF.xApplication.query.InquiryDesigner.View.Actionbar = new Class({
  516. Extends: MWF.xApplication.query.ViewDesigner.View.Actionbar
  517. });
  518. MWF.xApplication.query.InquiryDesigner.View.Paging = new Class({
  519. Extends: MWF.xApplication.query.ViewDesigner.View.Paging
  520. });