MPopupForm.js 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653
  1. var MPopupForm = new Class({
  2. Extends: MWF.widget.Common,
  3. Implements: [Options, Events],
  4. options: {
  5. "style": "default",
  6. "width": 500,
  7. "height": 450,
  8. "top": null,
  9. "left": null,
  10. "bottom" : null,
  11. "right" : null,
  12. "minWidth" : 300,
  13. "minHeight" : 220,
  14. "isLimitSize": true,
  15. "ifFade": true,
  16. "hasTop": false,
  17. "hasTopIcon" : false,
  18. "hasTopContent" : false,
  19. "hasIcon": true,
  20. "hasScroll" : true,
  21. "hasBottom": true,
  22. "hasMask" : true,
  23. "closeByClickMask" : false,
  24. "title": "",
  25. "draggable": false,
  26. "resizeable" : false,
  27. "maxAction" : false,
  28. "closeAction": true,
  29. "relativeToApp" : true,
  30. "sizeRelateTo" : "app", //desktop
  31. "resultSeparator" : ","
  32. },
  33. initialize: function (explorer, data, options, para) {
  34. this.setOptions(options);
  35. this.explorer = explorer;
  36. if( para ){
  37. if( this.options.relativeToApp ){
  38. this.app = para.app || this.explorer.app;
  39. this.container = para.container || this.app.content;
  40. this.lp = para.lp || this.explorer.lp || this.app.lp;
  41. this.css = para.css || this.explorer.css || this.app.css;
  42. this.actions = para.actions || this.explorer.actions || this.app.actions || this.app.restActions;
  43. }else{
  44. this.container = para.container;
  45. this.lp = para.lp || this.explorer.lp;
  46. this.css = para.css || this.explorer.css;
  47. this.actions = para.actions || this.explorer.actions;
  48. }
  49. }else{
  50. if( this.options.relativeToApp ){
  51. this.app = this.explorer.app;
  52. this.container = this.app.content;
  53. this.lp = this.explorer.lp || this.app.lp;
  54. this.css = this.explorer.css || this.app.css;
  55. this.actions = this.explorer.actions || this.app.actions || this.app.restActions;
  56. }else{
  57. this.container = window.document.body;
  58. this.lp = this.explorer.lp;
  59. this.css = this.explorer.css;
  60. this.actions = this.explorer.actions;
  61. }
  62. }
  63. this.data = data || {};
  64. this.cssPath = "/x_component_Template/$MPopupForm/"+this.options.style+"/css.wcss";
  65. this.load();
  66. },
  67. load: function () {
  68. this._loadCss();
  69. },
  70. _loadCss: function(){
  71. var css = {};
  72. var r = new Request.JSON({
  73. url: this.cssPath,
  74. secure: false,
  75. async: false,
  76. method: "get",
  77. noCache: false,
  78. onSuccess: function(responseJSON, responseText){
  79. css = responseJSON;
  80. MWF.widget.css[key] = responseJSON;
  81. }.bind(this),
  82. onError: function(text, error){
  83. alert(error + text);
  84. }
  85. });
  86. r.send();
  87. var isEmptyObject = true;
  88. for( var key in css ){
  89. if(key){
  90. isEmptyObject = false;
  91. break;
  92. }
  93. }
  94. if( !isEmptyObject ){
  95. this.css = Object.merge( css, this.css );
  96. }
  97. },
  98. reload : function( keepData ){
  99. if( keepData ){
  100. this.data = this.form.getResult(false, this.options.resultSeparator, false, false, true);
  101. }
  102. this.formTopNode = null;
  103. if(this.setFormNodeSizeFun && this.app ){
  104. this.app.removeEvent("resize",this.setFormNodeSizeFun);
  105. }
  106. if( this.formMaskNode )this.formMaskNode.destroy();
  107. if( this.formAreaNode )this.formAreaNode.destroy();
  108. if( this.isNew ){
  109. this.create();
  110. }else if( this.isEdited ){
  111. this.edit();
  112. }else{
  113. this.open();
  114. }
  115. },
  116. open: function (e) {
  117. this.fireEvent("queryOpen");
  118. this.isNew = false;
  119. this.isEdited = false;
  120. this._open();
  121. this.fireEvent("postOpen");
  122. },
  123. create: function () {
  124. this.fireEvent("queryCreate");
  125. this.isNew = true;
  126. this._open();
  127. this.fireEvent("postCreate");
  128. },
  129. edit: function () {
  130. this.fireEvent("queryEdit");
  131. this.isEdited = true;
  132. this._open();
  133. this.fireEvent("postEdit");
  134. },
  135. _open: function () {
  136. if( this.options.hasMask ){
  137. this.formMaskNode = new Element("div.formMaskNode", {
  138. "styles": this.css.formMaskNode,
  139. "events": {
  140. "mouseover": function (e) {
  141. e.stopPropagation();
  142. },
  143. "mouseout": function (e) {
  144. e.stopPropagation();
  145. },
  146. "click": function (e) {
  147. e.stopPropagation();
  148. }
  149. }
  150. }).inject( this.container || this.app.content);
  151. }
  152. this.formAreaNode = new Element("div.formAreaNode", {
  153. "styles": this.css.formAreaNode
  154. });
  155. this.createFormNode();
  156. if( this.formMaskNode ){
  157. this.formAreaNode.inject(this.formMaskNode , "after");
  158. }else{
  159. this.formAreaNode.inject( this.container || this.app.content );
  160. }
  161. if (this.options.ifFade){
  162. this.formAreaNode.fade("in");
  163. }else{
  164. this.formAreaNode.setStyle("opacity", 1);
  165. }
  166. this.setFormNodeSize();
  167. this.setFormNodeSizeFun = this.setFormNodeSize.bind(this);
  168. if( this.app )this.app.addEvent("resize", this.setFormNodeSizeFun);
  169. if (this.options.draggable && this.formTopNode) {
  170. var size = (this.container || this.app.content).getSize();
  171. var nodeSize = this.formAreaNode.getSize();
  172. this.formAreaNode.makeDraggable({
  173. "handle": this.formTopNode,
  174. "limit": {
  175. "x": [0, size.x - nodeSize.x],
  176. "y": [0, size.y - nodeSize.y]
  177. },
  178. "onDrag": function(){
  179. this.fireEvent("drag");
  180. }.bind(this),
  181. "onComplete": function(){
  182. this.fireEvent("dragCompleted");
  183. }.bind(this)
  184. });
  185. }
  186. if( this.options.closeByClickMask && this.formMaskNode ){
  187. this.formMaskNode.addEvent("click", function(e){
  188. this.close(e)
  189. }.bind(this));
  190. }
  191. if (this.options.resizeable){
  192. this.resizeNode = new Element("div.resizeNode", {
  193. "styles": this.css.resizeNode
  194. }).inject(this.formNode);
  195. this.formAreaNode.makeResizable({
  196. "handle": this.resizeNode,
  197. "limit": {x:[ this.options.minWidth, null], y:[this.options.minHeight, null]},
  198. "onDrag": function(){
  199. var size = this.formAreaNode.getComputedSize();
  200. this.setNodesSize( size.width, size.height );
  201. this.fireEvent("resize");
  202. }.bind(this),
  203. "onComplete": function(){
  204. var size = this.formAreaNode.getComputedSize();
  205. this.options.width = size.width;
  206. this.options.height = size.height;
  207. if( this.oldCoordinate ){
  208. this.oldCoordinate.width = size.width;
  209. this.oldCoordinate.height = size.height;
  210. }
  211. this.fireEvent("resizeCompleted");
  212. }.bind(this)
  213. });
  214. }
  215. },
  216. createFormNode: function () {
  217. var _self = this;
  218. this.formNode = new Element("div.formNode", {
  219. "styles": this.css.formNode
  220. }).inject(this.formAreaNode);
  221. if (this.options.hasTop) {
  222. this.createTopNode();
  223. }
  224. if (this.options.hasIcon) {
  225. this.formIconNode = new Element("div.formIconNode", {
  226. "styles": this.isNew ? this.css.formNewNode : this.css.formIconNode
  227. }).inject(this.formNode);
  228. }
  229. this.createContent();
  230. //formContentNode.set("html", html);
  231. if (this.options.hasBottom) {
  232. this.createBottomNode();
  233. }
  234. this._setCustom();
  235. if( this.options.hasScroll ){
  236. //this.setScrollBar(this.formTableContainer)
  237. MWF.require("MWF.widget.ScrollBar", function () {
  238. new MWF.widget.ScrollBar(this.formTableContainer, {
  239. "indent": false,
  240. "style": "xApp_TaskList",
  241. "where": "before",
  242. "distance": 30,
  243. "friction": 4,
  244. "axis": {"x": false, "y": true},
  245. "onScroll": function (y) {
  246. //var scrollSize = _self.viewContainerNode.getScrollSize();
  247. //var clientSize = _self.viewContainerNode.getSize();
  248. //var scrollHeight = scrollSize.y - clientSize.y;
  249. //if (y + 200 > scrollHeight && _self.view && _self.view.loadElementList) {
  250. // if (!_self.view.isItemsLoaded) _self.view.loadElementList();
  251. //}
  252. }
  253. });
  254. }.bind(this));
  255. }
  256. },
  257. _setCustom : function(){
  258. },
  259. createTopNode: function () {
  260. this.fireEvent("queryCreateTop");
  261. if (!this.formTopNode) {
  262. this.formTopNode = new Element("div.formTopNode", {
  263. "styles": this.css.formTopNode
  264. }).inject(this.formNode);
  265. if(this.options.hasTopIcon){
  266. this.formTopIconNode = new Element("div", {
  267. "styles": this.css.formTopIconNode
  268. }).inject(this.formTopNode)
  269. }
  270. this.formTopTextNode = new Element("div", {
  271. "styles": this.css.formTopTextNode,
  272. "text": this.options.title
  273. }).inject(this.formTopNode);
  274. if (this.options.closeAction) {
  275. this.formTopCloseActionNode = new Element("div", {
  276. "styles": this.css.formTopCloseActionNode,
  277. "title" : "关闭"
  278. }).inject(this.formTopNode);
  279. this.formTopCloseActionNode.addEvent("click", function ( ev ) {
  280. this.close();
  281. ev.stopPropagation();
  282. }.bind(this))
  283. }
  284. if( this.options.maxAction ){
  285. this.formTopMaxActionNode = new Element("div", {
  286. "styles": this.css.formTopMaxActionNode,
  287. "title" : "最大化"
  288. }).inject(this.formTopNode);
  289. this.formTopMaxActionNode.addEvent("click", function () {
  290. this.maxSize()
  291. }.bind(this));
  292. this.formTopRestoreActionNode = new Element("div", {
  293. "styles": this.css.formTopRestoreActionNode,
  294. "title" : "还原"
  295. }).inject(this.formTopNode);
  296. this.formTopRestoreActionNode.addEvent("click", function () {
  297. this.restoreSize()
  298. }.bind(this));
  299. this.formTopNode.addEvent("dblclick", function(){
  300. this.switchMax();
  301. }.bind(this));
  302. }
  303. if(this.options.hasTopContent){
  304. this.formTopContentNode = new Element("div.formTopContentNode", {
  305. "styles": this.css.formTopContentNode
  306. }).inject(this.formTopNode);
  307. this._createTopContent();
  308. }
  309. }
  310. this.fireEvent("postCreateTop");
  311. //if (!this.formTopNode) {
  312. // this.formTopNode = new Element("div.formTopNode", {
  313. // "styles": this.css.formTopNode,
  314. // "text": this.options.title
  315. // }).inject(this.formNode);
  316. //
  317. // this._createTopContent();
  318. //
  319. // if (this.options.closeAction) {
  320. // this.formTopCloseActionNode = new Element("div.formTopCloseActionNode", {"styles": this.css.formTopCloseActionNode}).inject(this.formTopNode);
  321. // this.formTopCloseActionNode.addEvent("click", function () {
  322. // this.close()
  323. // }.bind(this))
  324. // }
  325. //}
  326. },
  327. _createTopContent: function () {
  328. },
  329. createContent: function () {
  330. this.formContentNode = new Element("div.formContentNode", {
  331. "styles": this.css.formContentNode
  332. }).inject(this.formNode);
  333. this.formTableContainer = new Element("div.formTableContainer", {
  334. "styles": this.css.formTableContainer
  335. }).inject(this.formContentNode);
  336. this.formTableArea = new Element("div.formTableArea", {
  337. "styles": this.css.formTableArea
  338. }).inject(this.formTableContainer);
  339. this._createTableContent();
  340. },
  341. _createTableContent: function () {
  342. var html = "<table width='100%' bordr='0' cellpadding='5' cellspacing='0' styles='formTable'>" +
  343. //"<tr><td colspan='2' styles='formTableHead'>申诉处理单</td></tr>" +
  344. "<tr><td styles='formTableTitle' lable='empName'></td>" +
  345. " <td styles='formTableValue' item='empName'></td></tr>" +
  346. "<tr><td styles='formTableTitle' lable='departmentName'></td>" +
  347. " <td styles='formTableValue' item='departmentName'></td></tr>" +
  348. "<tr><td styles='formTableTitle' lable='recordDateString'></td>" +
  349. " <td styles='formTableValue' item='recordDateString'></td></tr>" +
  350. "<tr><td styles='formTableTitle' lable='status'></td>" +
  351. " <td styles='formTableValue' item='status'></td></tr>" +
  352. "<tr><td styles='formTableTitle' lable='appealReason'></td>" +
  353. " <td styles='formTableValue' item='appealReason'></td></tr>" +
  354. "<tr><td styles='formTableTitle' lable='appealDescription'></td>" +
  355. " <td styles='formTableValue' item='appealDescription'></td></tr>" +
  356. "<tr><td styles='formTableTitle' lable='opinion1'></td>" +
  357. " <td styles='formTableValue' item='opinion1'></td></tr>" +
  358. "</table>";
  359. this.formTableArea.set("html", html);
  360. MWF.xDesktop.requireApp("Template", "MForm", function () {
  361. this.form = new MForm(this.formTableArea, {empName: "xadmin"}, {
  362. isEdited: this.isEdited || this.isNew,
  363. itemTemplate: {
  364. empName: {text: "姓名", type: "innertext"},
  365. departmentName: {text: "部门", tType: "department", notEmpty: true},
  366. recordDateString: {text: "日期", tType: "date"},
  367. status: {text: "状态", tType: "number"},
  368. appealReason: {
  369. text: "下拉框",
  370. type: "select",
  371. selectValue: ["测试1", "测试2"]
  372. },
  373. appealDescription: {text: "描述", type: "textarea"},
  374. opinion1: {text: "测试", type: "button", "value": "测试"}
  375. }
  376. }, this.app);
  377. this.form.load();
  378. }.bind(this), true);
  379. },
  380. createBottomNode: function () {
  381. this.fireEvent("queryCreateBottom");
  382. this.formBottomNode = new Element("div.formBottomNode", {
  383. "styles": this.css.formBottomNode
  384. }).inject(this.formNode);
  385. this._createBottomContent();
  386. this.fireEvent("postCreateBottom");
  387. },
  388. _createBottomContent: function () {
  389. this.cancelActionNode = new Element("div.formCancelActionNode", {
  390. "styles": this.css.formCancelActionNode,
  391. "text": this.lp.cancel
  392. }).inject(this.formBottomNode);
  393. this.cancelActionNode.addEvent("click", function (e) {
  394. this.cancel(e);
  395. }.bind(this));
  396. if (this.isNew || this.isEdited) {
  397. this.okActionNode = new Element("div.formOkActionNode", {
  398. "styles": this.css.formOkActionNode,
  399. "text": this.lp.ok
  400. }).inject(this.formBottomNode);
  401. this.okActionNode.addEvent("click", function (e) {
  402. this.ok(e);
  403. }.bind(this));
  404. }
  405. },
  406. cancel: function (e) {
  407. this.fireEvent("queryCancel");
  408. this.close();
  409. this.fireEvent("postCancel");
  410. },
  411. close: function (e) {
  412. this.fireEvent("queryClose");
  413. this._close();
  414. //if( this.form ){
  415. // this.form.destroy();
  416. //}
  417. if(this.setFormNodeSizeFun && this.app ){
  418. this.app.removeEvent("resize",this.setFormNodeSizeFun);
  419. }
  420. if( this.formMaskNode )this.formMaskNode.destroy();
  421. if( this.formAreaNode )this.formAreaNode.destroy();
  422. this.fireEvent("postClose");
  423. delete this;
  424. },
  425. _close: function(){
  426. },
  427. ok: function (e) {
  428. this.fireEvent("queryOk");
  429. var data = this.form.getResult(true, this.options.resultSeparator, true, false, true);
  430. if (data) {
  431. this._ok(data, function (json) {
  432. if (json.type == "error") {
  433. if( this.app )this.app.notice(json.message, "error");
  434. } else {
  435. if( this.formMaskNode )this.formMaskNode.destroy();
  436. if( this.formAreaNode )this.formAreaNode.destroy();
  437. if (this.explorer && this.explorer.view)this.explorer.view.reload();
  438. if( this.app )this.app.notice(this.isNew ? this.lp.createSuccess : this.lp.updateSuccess, "success");
  439. this.fireEvent("postOk");
  440. }
  441. }.bind(this))
  442. }
  443. },
  444. _ok: function (data, callback) {
  445. //this.app.restActions.saveDocument( this.data.id, data, function(json){
  446. // if( callback )callback(json);
  447. //}.bind(this), function( errorObj ){
  448. // var error = JSON.parse( errorObj.responseText );
  449. // this.app.notice( error.message, error );
  450. //}.bind(this));
  451. },
  452. switchMax : function(){
  453. if( !this.isMax ){
  454. this.maxSize();
  455. }else{
  456. this.restoreSize();
  457. }
  458. },
  459. maxSize: function(){
  460. if(!this.oldCoordinate)this.oldCoordinate = {
  461. width : this.options.width,
  462. height : this.options.height,
  463. top : this.options.top,
  464. left : this.options.left,
  465. bottom : this.options.bottom,
  466. right : this.options.right
  467. };
  468. this.options.width = "100%";
  469. this.options.height = "100%";
  470. this.options.top = null;
  471. this.options.left = null;
  472. this.options.bottom = null;
  473. this.options.right = null;
  474. this.setFormNodeSize();
  475. this.formTopMaxActionNode.setStyle("display","none");
  476. this.formTopRestoreActionNode.setStyle("display","");
  477. this.isMax = true;
  478. this.fireEvent("max");
  479. },
  480. restoreSize : function(){
  481. if( this.oldCoordinate){
  482. this.options.width = this.oldCoordinate.width;
  483. this.options.height = this.oldCoordinate.height;
  484. this.options.top = this.oldCoordinate.top;
  485. this.options.left = this.oldCoordinate.left;
  486. this.options.bottom = this.oldCoordinate.bottom;
  487. this.options.right = this.oldCoordinate.right;
  488. }
  489. this.setFormNodeSize();
  490. this.formTopMaxActionNode.setStyle("display","");
  491. this.formTopRestoreActionNode.setStyle("display","none");
  492. this.isMax = false;
  493. this.fireEvent("restore");
  494. },
  495. setFormNodeSize: function (width, height, top, left, bottom, right) {
  496. this._beforeFormNodeSize();
  497. if (!width)width = this.options.width ? this.options.width : "50%";
  498. if (!height)height = this.options.height ? this.options.height : "50%";
  499. if (!top && top != 0 ) top = this.options.top; // ? this.options.top : 0;
  500. if (!left && left != 0) left = this.options.left; // ? this.options.left : 0;
  501. if (!bottom && bottom != 0) bottom = this.options.bottom; // ? this.options.bottom : 0;
  502. if (!right && right != 0) right = this.options.right; // ? this.options.right : 0;
  503. width = width.toString();
  504. height = height.toString();
  505. var allSize = ( this.container || this.app.content).getSize();
  506. var limitWidth = allSize.x; //window.screen.width
  507. var limitHeight = allSize.y; //window.screen.height
  508. if (this.options.isLimitSize){
  509. if( "%" != width.substr(width.length - 1, 1) ){
  510. if( allSize.x < parseInt(width) )width = allSize.x;
  511. }
  512. if( "%" != height.substr(height.length - 1, 1) ){
  513. if( allSize.y < parseInt(height) )height = allSize.y;
  514. }
  515. }
  516. "string" == typeof width && (1 < width.length && "%" == width.substr(width.length - 1, 1)) && (width = parseInt(limitWidth * parseInt(width, 10) / 100, 10));
  517. "string" == typeof height && (1 < height.length && "%" == height.substr(height.length - 1, 1)) && (height = parseInt(limitHeight * parseInt(height, 10) / 100, 10));
  518. this.options.minWidth > width && (width = this.options.minWidth);
  519. this.options.minHeight > height && (height = this.options.minHeight);
  520. var styles = {
  521. "width": "" + width + "px",
  522. "height": "" + height + "px"
  523. };
  524. if( top != null ){
  525. styles.top = "" + top + "px";
  526. styles.bottom = "auto";
  527. }else if( bottom != null ){
  528. styles.top = "auto";
  529. styles.bottom = "" + bottom + "px";
  530. }else{
  531. styles.top = "" + parseInt((limitHeight - height) / 2, 10) + "px";
  532. styles.bottom = "auto";
  533. }
  534. if( left != null ){
  535. styles.left = "" + left + "px";
  536. styles.right = "auto";
  537. }else if( right != null ){
  538. styles.left = "auto";
  539. styles.right = "" + right + "px";
  540. }else{
  541. styles.left = "" + parseInt((limitWidth - width) / 2, 10) + "px";
  542. styles.right = "auto";
  543. }
  544. //top = top || parseInt((limitHeight - height) / 2, 10);
  545. //left = left || parseInt((limitWidth - width) / 2, 10);
  546. if( this.formAreaNode )this.formAreaNode.setStyles(styles);
  547. this._setFormNodeSize(styles);
  548. this.setNodesSize( width, height );
  549. },
  550. _beforeFormNodeSize : function(){
  551. },
  552. _setFormNodeSize: function( styles ){
  553. },
  554. setNodesSize: function(width, height){
  555. this.options.minWidth > width && (width = this.options.minWidth);
  556. this.options.minHeight > height && (height = this.options.minHeight);
  557. this.formNode.setStyles({
  558. "width": "" + width + "px",
  559. "height": "" + height + "px"
  560. });
  561. var iconSize = this.formIconNode ? this.formIconNode.getSize() : {x: 0, y: 0};
  562. var topSize = this.formTopNode ? this.formTopNode.getSize() : {x: 0, y: 0};
  563. var bottomSize = this.formBottomNode ? this.formBottomNode.getSize() : {x: 0, y: 0};
  564. var contentHeight = height - iconSize.y - topSize.y - bottomSize.y;
  565. var marginTop = parseFloat(this.formContentNode.getStyle( "margin-top" )) || 0;
  566. var marginBottom = parseFloat(this.formContentNode.getStyle( "margin-bottom" )) || 0;
  567. var formContentHeight = contentHeight - marginTop - marginBottom;
  568. this.formContentNode.setStyles({
  569. "height": "" + formContentHeight + "px"
  570. });
  571. var paddingTop = parseFloat( this.formContentNode.getStyle( "padding-top" )) || 0;
  572. var paddingBottom = parseFloat( this.formContentNode.getStyle( "padding-bottom" )) || 0;
  573. marginTop = parseFloat( this.formTableContainer.getStyle( "margin-top" )) || 0;
  574. marginBottom = parseFloat( this.formTableContainer.getStyle( "margin-bottom" )) || 0;
  575. var tablePaddingTop = parseFloat( this.formTableContainer.getStyle( "padding-top" )) || 0;
  576. var tablePaddingTBottom = parseFloat( this.formTableContainer.getStyle( "padding-bottom" )) || 0;
  577. var formTableHeight = contentHeight - marginTop - marginBottom - paddingTop - paddingBottom - tablePaddingTop - tablePaddingTBottom;
  578. this.formTableContainer.setStyles({
  579. "height": "" + formTableHeight + "px"
  580. });
  581. this._setNodesSize( width, height, formContentHeight, formTableHeight );
  582. this.fireEvent("resizeForm");
  583. },
  584. _setNodesSize : function(width, height, formContentHeight, formTableHeight ){
  585. }
  586. });