Pman.Dialog.BAdminCompany.bjs
authorjohn <john@roojs.com>
Tue, 12 Dec 2017 09:25:37 +0000 (17:25 +0800)
committerjohn <john@roojs.com>
Tue, 12 Dec 2017 09:25:37 +0000 (17:25 +0800)
Pman.Dialog.BAdminCompany.js

Pman.Dialog.BAdminCompany.bjs
Pman.Dialog.BAdminCompany.js

index 848dbf1..94a1755 100644 (file)
@@ -42,7 +42,7 @@
        "items" : [
         {
          "listeners" : {
-          "actionfailed" : "function (_self, action)\n{\n    //Pman.standardActionFailed(_self,action);\n    \n    if (!this.isValid) {\n        \n        return;\n    }\n    \n    Roo.bootstrap.MessageBox.alert(action.result.errorMsg);\n\n}",
+          "actionfailed" : "function (_self, action)\n{\n    //Pman.standardActionFailed(_self,action);\n    \n    if (!this.isValid) {\n        return;\n    }\n    \n    Roo.bootstrap.MessageBox.alert(action.result.errorMsg);\n\n}",
           "actioncomplete" : "function (_self, action)\n{\n    if(action.type == 'setdata'){\n        _self.reset(); \n        _this.img_upload_form.reset();\n        if(_this.data.id * 1 > 0) {\n            this.doAction('load',{ method: 'GET', params: { '_id' : _this.data.id }});\n            _this.modal.setTitle('Modify Company');\n            _this.onid.setValue(_this.data.id);\n            \n            if(_this.data.logo_id * 1 > 0) {\n                _this.logo.el.dom.src = String.format('{0}/Images/Thumb/300/{1}/', baseURL, _this.data.logo_id); \n            }\n        } else {\n           _this.modal.setTitle('Add Company');\n           _this.onid.setValue(''); \n           _this.logo.el.dom.src = ''; \n        }\n        //_this.type.store.load({}); \n\n        _this.ontable.setValue('core_company');\n\n        _this.imgtype.setValue('LOGO');\n        return;\n    }\n   \n   \n    if (action.type == 'load') {\n        _this.data = action.result.data;\n        var meth = _this.data.comptype == 'OWNER' ? 'disable' : 'enable';\n     \n            \n        if (_this.form.findField('comptype')) {\n            _this.form.findField('comptype')[meth]();\n        }\n          \n       // _this.loaded();\n        return;\n    }\n    \n    \n    if (action.type == 'submit') { // only submitted here if we are \n        //_this.dialog.hide();\n        if (!_this.img_upload_form.findField('imageUpload')) {\n           return;\n        }\n        if (_this.img_upload_form.findField('imageUpload').getValue() !='') {\n            if(action.result.data.id *1 <= 0) {\n                return;\n            }\n            _this.onid.setValue(action.result.data.id);\n            _this.img_upload_form.doAction(\"submit\");\n                        \n        } else {\n            _this.dialog.hide();\n             if (_this.callback) {\n                _this.callback.call(this, action.result.data);\n            }\n        }\n        return; \n    }\n}",
           "render" : "function (_self)\n{\n    _this.form = _self; \n}"
          },
index 72715e7..59d48c4 100644 (file)
@@ -205,7 +205,6 @@ Roo.apply(Pman.Dialog.BAdminCompany.prototype, {
                 //Pman.standardActionFailed(_self,action);
                 
                 if (!this.isValid) {
-                    
                     return;
                 }