| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691 |
- MWF.xApplication.Execution = MWF.xApplication.Execution || {};
- MWF.xDesktop.requireApp("Template", "Explorer", null, false);
- MWF.xDesktop.requireApp("Template", "MPopupForm", null, false);
- MWF.require("MWF.widget.Identity", null,false);
- MWF.xApplication.Execution.SettingExplorer = new Class({
- Extends: MWF.widget.Common,
- Implements: [Options, Events],
- options: {
- "style": "default"
- },
- initialize: function (node, app, actions, options) {
- this.setOptions(options);
- this.app = app;
- this.lp = app.lp;
- this.path = "/x_component_Execution/$SettingExplorer/";
- this.loadCss();
- this.actions = actions;
- this.node = $(node);
- },
- loadCss: function () {
- this.cssPath = "/x_component_Execution/$SettingExplorer/" + this.options.style + "/css.wcss";
- this._loadCss();
- },
- load: function () {
- this.middleContent = this.app.middleContent;
- //this.middleContent.setStyles({"margin-top":"0px","border":"0px solid #f00"});
- this.createNaviContent();
- this.createContentDiv();
- this.resizeWindow();
- this.app.addEvent("resize", function(){
- this.resizeWindow();
- }.bind(this));
- },
- resizeWindow: function(){
- var size = this.app.middleContent.getSize();
- this.naviDiv.setStyles({"height":(size.y-40)+"px"});
- this.naviContentDiv.setStyles({"height":(size.y-180)+"px"});
- this.contentDiv.setStyles({"height":(size.y-40)+"px"});
- },
- createNaviContent: function(){
- this.naviDiv = new Element("div.naviDiv",{
- "styles":this.css.naviDiv
- }).inject(this.middleContent);
- this.naviTitleDiv = new Element("div.naviTitleDiv",{
- "styles":this.css.naviTitleDiv,
- "text": this.lp.systemSetting
- }).inject(this.naviDiv);
- this.naviContentDiv = new Element("div.naviContentDiv",{"styles":this.css.naviContentDiv}).inject(this.naviDiv);
- this.naviBottomDiv = new Element("div.naviBottomDiv",{"styles":this.css.naviBottomDiv}).inject(this.naviDiv);
- var jsonUrl = this.path+"navi.json";
- MWF.getJSON(jsonUrl, function(json){
- json.each(function(data, i){
- var naviContentLi = new Element("li.naviContentLi",{"styles":this.css.naviContentLi}).inject(this.naviContentDiv);
- naviContentLi.addEvents({
- "mouseover" : function(ev){
- if(this.bindObj.currentNaviItem != this.node)this.node.setStyles( this.styles )
- }.bind({"styles": this.css.naviContentLi_over, "node":naviContentLi, "bindObj": this }) ,
- "mouseout" : function(ev){
- if(this.bindObj.currentNaviItem != this.node)this.node.setStyles( this.styles )
- }.bind({"styles": this.css.naviContentLi, "node":naviContentLi, "bindObj": this }) ,
- "click" : function(ev){
- if( this.bindObj.currentNaviItem )this.bindObj.currentNaviItem.setStyles( this.bindObj.css.naviContentLi );
- this.node.setStyles( this.styles );
- this.bindObj.currentNaviItem = this.node;
- if( this.action && this.bindObj[this.action] )this.bindObj[this.action]();
- }.bind({"styles": this.css.naviContentLi_current, "node":naviContentLi, "bindObj": this, "action" : data.action })
- });
- var naviContentImg = new Element("img.naviContentImg",{
- "styles":this.css.naviContentImg,
- "src":"/x_component_Execution/$Main/"+this.options.style+"/icon/"+data.icon
- }).inject(naviContentLi);
- var naviContentSpan = new Element("span.naviContentSpan",{
- "styles":this.css.naviContentSpan,
- "text":data.title
- }).inject(naviContentLi);
- if( i == 0 )naviContentLi.click();
- }.bind(this));
- }.bind(this));
- },
- createContentDiv: function(){
- this.contentDiv = new Element("div.contentDiv",{"styles":this.css.contentDiv}).inject(this.middleContent);
- },
- openSystemConfig: function(){
- if( this.contentDiv )this.contentDiv.empty();
- if( this.explorer ){
- this.explorer.destroy();
- delete this.explorer;
- }
- this.explorer = new MWF.xApplication.Execution.SettingExplorer.SystemConfigExplorer(this.contentDiv, this.app, this,{style:this.options.style});
- this.explorer.load();
- },
- openSecretarySetting: function(){
- if( this.contentDiv )this.contentDiv.empty();
- if( this.explorer ){
- this.explorer.destroy();
- delete this.explorer;
- }
- this.explorer = new MWF.xApplication.Execution.SettingExplorer.SecretarySettingExplorer(this.contentDiv, this.app, this,{style:this.options.style});
- this.explorer.load();
- },
- openCategorySetting: function(){
- if( this.contentDiv )this.contentDiv.empty();
- if( this.explorer ){
- this.explorer.destroy();
- delete this.explorer;
- }
- this.explorer = new MWF.xApplication.Execution.SettingExplorer.CategorySettingExplorer(this.contentDiv, this.app, this,{style:this.options.style});
- this.explorer.load();
- }
- });
- MWF.xApplication.Execution.SettingExplorer.SystemConfigExplorer = new Class({
- Extends: MWF.widget.Common,
- Implements: [Options, Events],
- options: {
- "style": "default"
- },
- initialize: function (container, app, parent, options) {
- this.container = container;
- this.parent = parent;
- this.app = app;
- this.css = this.parent.css;
- this.lp = this.app.lp;
- },
- load: function () {
- this.container.empty();
- //this.loadToolbar();
- this.loadView();
- },
- destroy : function(){
- if(this.resizeWindowFun)this.app.removeEvent("resize",this.resizeWindowFun);
- this.view.destroy();
- },
- aa:function(){
- if(d.configValue && d.configValue!=''){vl=''}else {var v = d.configValue.split(',');v1 = '';for (i = 0; i < v.length; i++) {if (v1 == '') {v1 = v[i].split('@')[0];} else {v1 = v1 + ',' + v[i].split('@')[0];};}} return v1
- },
- loadToolbar: function(){
- this.toolbar = new Element("div",{
- styles : this.css.toolbar
- }).inject(this.container);
- this.createActionNode = new Element("div",{
- styles : this.css.toolbarActionNode,
- text: this.lp.createConfig
- }).inject(this.toolbar);
- this.createActionNode.addEvent("click",function(){
- var form = new MWF.xApplication.Execution.SettingExplorer.SystemConfigForm(this, {}, {
- onPostOk : function(){
- this.view.reload();
- }.bind(this)});
- form.create();
- }.bind(this));
- this.fileterNode = new Element("div",{
- styles : this.css.fileterNode
- }).inject(this.toolbar);
- },
- loadView : function(){
- this.viewContainer = Element("div",{
- "styles" : this.css.viewContainer
- }).inject(this.container);
- this.resizeWindow();
- this.resizeWindowFun = this.resizeWindow.bind(this);
- this.app.addEvent("resize", this.resizeWindowFun );
- this.view = new MWF.xApplication.Execution.SettingExplorer.SystemConfigView( this.viewContainer, this.app, this, {
- templateUrl : this.parent.path+"listItem_config.json",
- scrollEnable : true
- } );
- this.view.load();
- },
- resizeWindow: function(){
- var size = this.app.content.getSize();
- this.viewContainer.setStyles({"height":(size.y-65)+"px"});
- }
- });
- MWF.xApplication.Execution.SettingExplorer.SystemConfigView = new Class({
- Extends: MWF.xApplication.Template.Explorer.ComplexView,
- _createDocument: function(data){
- return new MWF.xApplication.Execution.SettingExplorer.SystemConfigDocument(this.viewNode, data, this.explorer, this);
- },
- _getCurrentPageData: function(callback, count){
- if (!count)count = 20;
- //var id = (this.items.length) ? this.items[this.items.length - 1].data.id : "(0)";
- //var filter = this.filterData || {};
- this.actions.listConfigAll( function (json) {
- if (callback)callback(json);
- }.bind(this))
- },
- _removeDocument: function(documentData, all){
- this.actions.deleteConfig(documentData.id, function(json){
- this.reload();
- this.app.notice(this.app.lp.deleteDocumentOK, "success");
- }.bind(this));
- },
- _create: function(){
- },
- _openDocument: function( documentData ){
- var form = new MWF.xApplication.Execution.SettingExplorer.SystemConfigForm(this, documentData, {
- onPostOk : function(){
- this.reload();
- }.bind(this)
- });
- form.edit();
- },
- _queryCreateViewNode: function(){
- },
- _postCreateViewNode: function( viewNode ){
- },
- _queryCreateViewHead:function(){
- },
- _postCreateViewHead: function( headNode ){
- }
- });
- MWF.xApplication.Execution.SettingExplorer.SystemConfigDocument = new Class({
- Extends: MWF.xApplication.Template.Explorer.ComplexDocument,
- _queryCreateDocumentNode:function( itemData ){
- },
- _postCreateDocumentNode: function( itemNode, itemData ){
- }
- });
- MWF.xApplication.Execution.SettingExplorer.SystemConfigForm = new Class({
- Extends: MPopupForm,
- Implements: [Options, Events],
- options: {
- "style": "default",
- "width": "600",
- "height": "290",
- "hasTop": true,
- "hasIcon": false,
- "hasTopIcon" : true,
- "hasTopContent" : true,
- "hasBottom": true,
- "title": MWF.xApplication.Execution.LP.categoryFormTitle,
- "draggable": true,
- "closeAction": true
- },
- _createTableContent: function () {
- var html = "<table width='100%' bordr='0' cellpadding='5' cellspacing='0' styles='formTable'>" +
- "<tr><td styles='formTableTitle' lable='configName' width='20%'></td>" +
- " <td styles='formTableValue' item='configName' width='80%'></td></tr>" +
- "<tr><td styles='formTableTitle' lable='configValue'></td>" +
- " <td styles='formTableValue' item='configValue'></td></tr>" +
- "<tr><td styles='formTableTitle' lable='orderNumber'></td>" +
- " <td styles='formTableValue' item='orderNumber'></td></tr>" +
- "<tr><td styles='formTableTitle' lable='description'></td>" +
- " <td styles='formTableValue' item='description'></td></tr>" +
- "</table>";
- this.formTableArea.set("html", html);
- var configValueSetting = {text: this.lp.configValue };
- //alert(JSON.stringify(this.data))
- //alert(this.data.valueType)
- //if( this.data.configCode == "REPORT_WORKFLOW_TYPE" ){
- // configValueSetting.type = "select";
- // configValueSetting.selectValue = ["ADMIN_AND_ALLLEADER","DEPLOYER"];
- //}else if( this.data.configCode == "REPORT_SUPERVISOR" ){
- // configValueSetting.tType = "identity";
- // configValueSetting.count = 1;
- //}else if( this.data.configCode == "REPORT_AUDIT_LEADER" ){
- // configValueSetting.tType = "identity";
- // configValueSetting.count = 0;
- //}else if( this.data.configCode == "COMPANY_WORK_ADMIN" ){
- // configValueSetting.tType = "identity";
- // configValueSetting.count = 0;
- //}else if( this.data.configCode == "ARCHIVEMANAGER" ){
- // configValueSetting.tType = "identity";
- // configValueSetting.count = 0;
- //}else if( this.data.configCode == "REPORT_AUDIT_LEVEL" ){
- // configValueSetting.tType = "number";
- //}
- //alert(this.data.valueType)
- configValueSetting.tType = this.data.valueType;
- if(configValueSetting.tType=="select"){
- configValueSetting.type = "select";
- configValueSetting.selectValue = this.data.selectContent.split("|")
- }else if(configValueSetting.tType=="identity"){
- configValueSetting.type="org";
- configValueSetting.orgType = "identity";
- if(this.data.isMultiple){
- configValueSetting.count = 0
- }
- }else if(configValueSetting.tType == "workflow"){
- configValueSetting.type="org";
- configValueSetting.orgType = "process";
- }else{
- }
- MWF.xDesktop.requireApp("Template", "MForm", function () {
- this.form = new MForm(this.formTableArea, this.data, {
- style: "execution",
- isEdited: this.isEdited || this.isNew,
- itemTemplate: {
- configName: {text: this.lp.configName, type : "innerText" },
- configValue : configValueSetting,
- orderNumber: {text: this.lp.orderNumber, type : "innerText" },
- description: {text: this.lp.description, type : "innerText" }
- }
- }, this.app);
- this.form.load();
- }.bind(this), true);
- },
- _ok: function (data, callback) {
- //if(this.data.configCode == "APPRAISE_WORKFLOW_ID"){
- if(this.data.valueType == "workflow"){
- if(this.form.getItem("configValue").orgObject){
- this.data.configValue = this.form.getItem("configValue").orgObject[0].data.id
- }else if(this.form.getItem("configValue").dom.orgData){
- this.data.configValue = this.form.getItem("configValue").dom.orgData[0]
- }else{
- this.data.configValue = ""
- }
- }
- this.app.restActions.saveConfig( data, function(json){
- if( callback )callback(json);
- this.fireEvent("postOk")
- }.bind(this));
- }
- });
- MWF.xApplication.Execution.SettingExplorer.SecretarySettingExplorer = new Class({
- Extends: MWF.widget.Common,
- Implements: [Options, Events],
- options: {
- "style": "default"
- },
- initialize: function (container, app, parent, options) {
- this.container = container;
- this.parent = parent;
- this.app = app;
- this.css = this.parent.css;
- this.lp = this.app.lp;
- },
- load: function () {
- this.container.empty();
- this.loadToolbar();
- this.loadView();
- },
- destroy : function(){
- if(this.resizeWindowFun)this.app.removeEvent("resize",this.resizeWindowFun);
- this.view.destroy();
- },
- loadToolbar: function(){
- this.toolbar = new Element("div",{
- styles : this.css.toolbar
- }).inject(this.container);
- this.createActionNode = new Element("div",{
- styles : this.css.toolbarActionNode,
- text: this.lp.createSecretary
- }).inject(this.toolbar);
- this.createActionNode.addEvent("click",function(){
- var form = new MWF.xApplication.Execution.SettingExplorer.SecretarySettingForm(this, {}, {
- onPostOk : function(){
- this.view.reload();
- }.bind(this)});
- form.create();
- }.bind(this));
- this.fileterNode = new Element("div",{
- styles : this.css.fileterNode
- }).inject(this.toolbar);
- },
- loadView : function(){
- this.viewContainer = Element("div",{
- "styles" : this.css.viewContainer
- }).inject(this.container);
- this.resizeWindow();
- this.resizeWindowFun = this.resizeWindow.bind(this);
- this.app.addEvent("resize", this.resizeWindowFun );
- this.view = new MWF.xApplication.Execution.SettingExplorer.SecretarySettingView( this.viewContainer, this.app, this, {
- templateUrl : this.parent.path+"listItem_secretary.json",
- scrollEnable : true
- } );
- this.view.load();
- },
- resizeWindow: function(){
- var size = this.app.content.getSize();
- this.viewContainer.setStyles({"height":(size.y-121)+"px"});
- }
- });
- MWF.xApplication.Execution.SettingExplorer.SecretarySettingView = new Class({
- Extends: MWF.xApplication.Template.Explorer.ComplexView,
- _createDocument: function(data){
- return new MWF.xApplication.Execution.SettingExplorer.SecretarySettingDocument(this.viewNode, data, this.explorer, this);
- },
- _getCurrentPageData: function(callback, count){
- if (!count)count = 20;
- var id = (this.items.length) ? this.items[this.items.length - 1].data.id : "(0)";
- var filter = this.filterData || {};
- this.actions.listSecretaryNext(id, count, filter, function (json) {
- if (callback)callback(json);
- }.bind(this))
- },
- _removeDocument: function(documentData, all){
- this.actions.deleteSecretary(documentData.id, function(json){
- this.reload();
- this.app.notice(this.app.lp.deleteDocumentOK, "success");
- }.bind(this));
- },
- _create: function(){
- },
- _openDocument: function( documentData ){
- var form = new MWF.xApplication.Execution.SettingExplorer.SecretarySettingForm(this, documentData, {
- onPostOk : function(){
- this.reload();
- }.bind(this)
- });
- form.edit();
- },
- _queryCreateViewNode: function(){
- },
- _postCreateViewNode: function( viewNode ){
- },
- _queryCreateViewHead:function(){
- },
- _postCreateViewHead: function( headNode ){
- }
- });
- MWF.xApplication.Execution.SettingExplorer.SecretarySettingDocument = new Class({
- Extends: MWF.xApplication.Template.Explorer.ComplexDocument,
- _queryCreateDocumentNode:function( itemData ){
- },
- _postCreateDocumentNode: function( itemNode, itemData ){
- }
- });
- MWF.xApplication.Execution.SettingExplorer.SecretarySettingForm = new Class({
- Extends: MPopupForm,
- Implements: [Options, Events],
- options: {
- "style": "default",
- "width": "600",
- "height": "260",
- "hasTop": true,
- "hasIcon": false,
- "hasTopIcon" : true,
- "hasTopContent" : true,
- "hasBottom": true,
- "title": MWF.xApplication.Execution.LP.secretaryFormTitle,
- "draggable": true,
- "closeAction": true
- },
- _createTableContent: function () {
- var html = "<table width='100%' bordr='0' cellpadding='5' cellspacing='0' styles='formTable'>" +
- "<tr><td styles='formTableTitle' lable='secretaryIdentity'></td>" +
- " <td styles='formTableValue' item='secretaryIdentity'></td></tr>" +
- "<tr><td styles='formTableTitle' lable='leaderIdentity'></td>" +
- " <td styles='formTableValue' item='leaderIdentity'></td></tr>" +
- "<tr><td styles='formTableTitle' lable='description'></td>" +
- " <td styles='formTableValue' item='description'></td></tr>" +
- "</table>";
- this.formTableArea.set("html", html);
- MWF.xDesktop.requireApp("Template", "MForm", function () {
- this.form = new MForm(this.formTableArea, this.data, {
- style: "execution",
- isEdited: this.isEdited || this.isNew,
- itemTemplate: {
- secretaryIdentity: {text: this.lp.secretaryIdentity, type:"org",orgType: "identity", notEmpty: true},
- leaderIdentity: {text: this.lp.leaderIdentity, type:"org",orgType: "identity", notEmpty: true},
- description: {text: this.lp.description, type: "textarea"}
- }
- }, this.app);
- this.form.load();
- }.bind(this), true);
- },
- _ok: function (data, callback) {
- this.app.restActions.saveSecretary( data, function(json){
- if( callback )callback(json);
- this.fireEvent("postOk")
- }.bind(this));
- }
- });
- MWF.xApplication.Execution.SettingExplorer.CategorySettingExplorer = new Class({
- Extends: MWF.widget.Common,
- Implements: [Options, Events],
- options: {
- "style": "default"
- },
- initialize: function (container, app, parent, options) {
- this.container = container;
- this.parent = parent;
- this.app = app;
- this.css = this.parent.css;
- this.lp = this.app.lp;
- },
- load: function () {
- this.container.empty();
- this.loadToolbar();
- this.loadView();
- },
- destroy : function(){
- if(this.resizeWindowFun)this.app.removeEvent("resize",this.resizeWindowFun);
- this.view.destroy();
- },
- loadToolbar: function(){
- this.toolbar = new Element("div",{
- styles : this.css.toolbar
- }).inject(this.container);
- this.createActionNode = new Element("div",{
- styles : this.css.toolbarActionNode,
- text: this.lp.createCategory
- }).inject(this.toolbar);
- this.createActionNode.addEvent("click",function(){
- var form = new MWF.xApplication.Execution.SettingExplorer.CategorySettingForm(this, {}, {
- onPostOk : function(){
- this.view.reload();
- }.bind(this)});
- form.create();
- }.bind(this));
- this.fileterNode = new Element("div",{
- styles : this.css.fileterNode
- }).inject(this.toolbar);
- },
- loadView : function(){
- this.viewContainer = Element("div",{
- "styles" : this.css.viewContainer
- }).inject(this.container);
- this.resizeWindow();
- this.resizeWindowFun = this.resizeWindow.bind(this);
- this.app.addEvent("resize", this.resizeWindowFun );
- this.view = new MWF.xApplication.Execution.SettingExplorer.CategorySettingView( this.viewContainer, this.app, this, {
- templateUrl : this.parent.path+"listItem_category.json",
- scrollEnable : true
- } );
- this.view.load();
- },
- resizeWindow: function(){
- var size = this.app.content.getSize();
- this.viewContainer.setStyles({"height":(size.y-121)+"px"});
- }
- });
- MWF.xApplication.Execution.SettingExplorer.CategorySettingView = new Class({
- Extends: MWF.xApplication.Template.Explorer.ComplexView,
-
- _createDocument: function(data){
- return new MWF.xApplication.Execution.SettingExplorer.CategorySettingDocument(this.viewNode, data, this.explorer, this);
- },
- _getCurrentPageData: function(callback, count){
- if (!count)count = 20;
- //var id = (this.items.length) ? this.items[this.items.length - 1].data.id : "(0)";
- //var filter = this.filterData || {};
- this.actions.listCategoryAll( function (json) {
- if (callback)callback(json);
- }.bind(this))
- },
- _removeDocument: function(documentData, all){
- this.actions.deleteCategory(documentData.id, function(json){
- this.reload();
- this.app.notice(this.app.lp.deleteDocumentOK, "success");
- }.bind(this));
- },
- _create: function(){
- },
- _openDocument: function( documentData ){
- var form = new MWF.xApplication.Execution.SettingExplorer.CategorySettingForm(this, documentData, {
- onPostOk : function(){
- this.reload();
- }.bind(this)
- });
- form.edit();
- },
- _queryCreateViewNode: function(){
- },
- _postCreateViewNode: function( viewNode ){
- },
- _queryCreateViewHead:function(){
- },
- _postCreateViewHead: function( headNode ){
- }
- });
- MWF.xApplication.Execution.SettingExplorer.CategorySettingDocument = new Class({
- Extends: MWF.xApplication.Template.Explorer.ComplexDocument,
- _queryCreateDocumentNode:function( itemData ){
- },
- _postCreateDocumentNode: function( itemNode, itemData ){
- }
- });
- MWF.xApplication.Execution.SettingExplorer.CategorySettingForm = new Class({
- Extends: MPopupForm,
- Implements: [Options, Events],
- options: {
- "style": "default",
- "width": "600",
- "height": "260",
- "hasTop": true,
- "hasIcon": false,
- "hasTopIcon" : true,
- "hasTopContent" : true,
- "hasBottom": true,
- "title": MWF.xApplication.Execution.LP.categoryFormTitle,
- "draggable": true,
- "closeAction": true
- },
- _createTableContent: function () {
- var html = "<table width='100%' bordr='0' cellpadding='5' cellspacing='0' styles='formTable'>" +
- "<tr><td styles='formTableTitle' lable='workTypeName'></td>" +
- " <td styles='formTableValue' item='workTypeName'></td></tr>" +
- "<tr><td styles='formTableTitle' lable='orderNumber'></td>" +
- " <td styles='formTableValue' item='orderNumber'></td></tr>" +
- "<tr><td styles='formTableTitle' lable='description'></td>" +
- " <td styles='formTableValue' item='description'></td></tr>" +
- "</table>";
- this.formTableArea.set("html", html);
- MWF.xDesktop.requireApp("Template", "MForm", function () {
- this.form = new MForm(this.formTableArea, this.data, {
- style: "execution",
- isEdited: this.isEdited || this.isNew,
- itemTemplate: {
- workTypeName: {text: this.lp.workTypeName, notEmpty: true},
- orderNumber: {text: this.lp.orderNumber, tType : "number" },
- description: {text: this.lp.description, type: "textarea"}
- }
- }, this.app);
- this.form.load();
- }.bind(this), true);
- },
- _ok: function (data, callback) {
- this.app.restActions.saveCategory( data, function(json){
- if( callback )callback(json);
- this.fireEvent("postOk")
- }.bind(this));
- }
- });
|