12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- MWF.xDesktop.requireApp("process.Xform", "Datatable", null, false);
- MWF.xApplication.cms.Xform.Datatable = MWF.CMSDatatable = new Class({
- Extends: MWF.APPDatatable,
- deleteAttachment: function( attId ){
- this.form.documentAction.deleteAttachment(attId, this.form.businessData.work.id);
- },
- saveFormData: function(){
- this.form.saveFormData();
- },
- validationConfigItem: function(routeName, data){
- var flag = (data.status=="all") ? true: (routeName == "publ" || routeName == "publish");
- if (flag){
- var n = this.getData();
- var v = (data.valueType=="value") ? n : n.length;
- switch (data.operateor){
- case "isnull":
- if (!v){
- this.notValidationMode(data.prompt);
- return false;
- }
- break;
- case "notnull":
- if (v){
- this.notValidationMode(data.prompt);
- return false;
- }
- break;
- case "gt":
- if (v>data.value){
- this.notValidationMode(data.prompt);
- return false;
- }
- break;
- case "lt":
- if (v<data.value){
- this.notValidationMode(data.prompt);
- return false;
- }
- break;
- case "equal":
- if (v==data.value){
- this.notValidationMode(data.prompt);
- return false;
- }
- break;
- case "neq":
- if (v!=data.value){
- this.notValidationMode(data.prompt);
- return false;
- }
- break;
- case "contain":
- if (v.indexOf(data.value)!=-1){
- this.notValidationMode(data.prompt);
- return false;
- }
- break;
- case "notcontain":
- if (v.indexOf(data.value)==-1){
- this.notValidationMode(data.prompt);
- return false;
- }
- break;
- }
- }
- return true;
- }
- });
- MWF.xApplication.cms.Xform.Datatable$Title = MWF.CMSDatatable$Title = new Class({
- Extends: MWF.APPDatatable$Title
- });
- MWF.xApplication.cms.Xform.Datatable$Data = MWF.CMSDatatable$Data = new Class({
- Extends: MWF.APPDatatable$Data
- });
|