"name" : "Pman.Dialog.BAdminCompany",
"parent" : "Pman.Tab.BAdmin",
"title" : "",
- "path" : "/home/khlau/gitlive/Pman.BAdmin/Pman.Dialog.BAdminCompany.bjs",
+ "path" : "/home/alan/gitlive/Pman.BAdmin/Pman.Dialog.BAdminCompany.bjs",
"permname" : "",
"modOrder" : "001",
"strings" : {
"1c76cbfe21c6f44c1d1e59d54f3e4420" : "Company",
"ce8ae9da5b7cd6c3df2929543a9af92d" : "Email",
"231bc72756b5e6de492aaaa1577f61b1" : "Remarks",
- "b999e07cf80ea5eca8e589cd8540a81e" : "Select Logo",
"1243daf593fa297e07ab03bf06d925af" : "Searching...",
"bcc254b55c4a1babdf1dcb82c207506b" : "Phone",
+ "66bc3ece76861852889e623217049d32" : "Edit Company Details",
"ea4788705e6873b424c65e91c2846b19" : "Cancel",
- "30a47f1901469a01975f8d24bbb9f701" : "Modify Company",
+ "ca0dbad92a874b2f69b549293387925e" : "Code",
"a1fa27779242b4902f7ae3bdd5c6d508" : "Type",
"dd7bf230fde8d4836917806aff6a6b27" : "Address",
"c9cc8cce247e49bae79f15173ce97354" : "Save",
- "9810aa2b9f44401be4bf73188ef2b67d" : "Fax",
"e6b391a8d2c4d45902a23a8b6585703d" : "URL"
},
+ "named_strings" : {
+ "tel_fieldLabel" : "bcc254b55c4a1babdf1dcb82c207506b",
+ "comptype_display_name_loadingText" : "1243daf593fa297e07ab03bf06d925af",
+ "code_fieldLabel" : "ca0dbad92a874b2f69b549293387925e",
+ "name_fieldLabel" : "1c76cbfe21c6f44c1d1e59d54f3e4420",
+ "remarks_fieldLabel" : "231bc72756b5e6de492aaaa1577f61b1",
+ "url_fieldLabel" : "e6b391a8d2c4d45902a23a8b6585703d",
+ "email_fieldLabel" : "ce8ae9da5b7cd6c3df2929543a9af92d",
+ "address_fieldLabel" : "dd7bf230fde8d4836917806aff6a6b27",
+ "comptype_display_name_fieldLabel" : "a1fa27779242b4902f7ae3bdd5c6d508"
+ },
"items" : [
{
"listeners" : {
+ "show" : "function (_self)\n{\n _this.form.findField('code').hide();\n\n if(appDisabled.indexOf('Coba.SuperAdmin') * 1 == -1) {\n _this.form.findField('code').show();\n }\n}",
"render" : "function (_self)\n{\n _this.modal = _self;\n}"
},
+ "String cls" : "padding-bottom-trim badmin-dialog-company enable-modal-body-overflow",
"xtype" : "Modal",
- "Boolean fitwindow" : true,
+ "int max_width" : 650,
"$ xns" : "Roo.bootstrap",
- "String title" : "Modify Company",
+ "String title" : "Edit Company Details",
"items" : [
{
- "String cls" : "col-md-12",
- "xtype" : "Row",
+ "xtype" : "Container",
"$ xns" : "Roo.bootstrap",
+ "String style" : "width: 100%;",
"items" : [
{
- "xtype" : "Column",
- "Number xs" : 6,
+ "listeners" : {
+ "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\n if(_this.data.id * 1 > 0) {\n this.doAction('load',{ method: 'GET', params: { '_id' : _this.data.id }});\n _this.modal.setTitle('Edit Company Details');\n \n } else {\n _this.modal.setTitle('Create Company');\n }\n return;\n }\n \n \n if (action.type == 'load') {\n _this.data = action.result.data;\n \n if(_this.data.comptype == 'OWNER'){\n _this.form.findField('comptype').hide();\n }\n \n return;\n }\n \n \n if (action.type == 'submit') { // only submitted here if we are \n //_this.dialog.hide();\n \n _this.dialog.hide();\n \n if (_this.callback) {\n _this.callback.call(this, action.result.data);\n }\n return; \n }\n}",
+ "render" : "function (_self)\n{\n _this.form = _self; \n}"
+ },
+ "$ url" : "baseURL + '/Roo/Core_company.php'",
+ "xtype" : "Form",
"$ xns" : "Roo.bootstrap",
"items" : [
{
- "listeners" : {
- "actionfailed" : "function (_self, action)\n{\n //Pman.standardActionFailed(_self,action);\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 \n if(_this.logo.getValue()!='') \n {\n _this.img_upload_form.method = 'POST';\n _this.img_upload_form.doAction(\"submit\");\n }\n \n if (_this.callback) {\n _this.callback.call(this, action.result.data);\n }\n return; \n }\n}",
- "render" : "function (_self)\n{\n _this.form = _self; \n}"
- },
- "$ url" : "baseURL + '/Roo/Core_company.php'",
- "xtype" : "Form",
+ "xtype" : "Row",
"$ xns" : "Roo.bootstrap",
"items" : [
{
- "listeners" : {
- "render" : "function (_self)\n{\n _this.companyID = _self;\n}"
- },
- "String name" : "id",
- "xtype" : "Input",
- "String inputType" : "hidden",
- "$ xns" : "Roo.bootstrap"
- },
+ "Number md" : 12,
+ "xtype" : "Column",
+ "$ xns" : "Roo.bootstrap",
+ "items" : [
+ {
+ "listeners" : {
+ "render" : "function (_self)\n{\n _this.company = _self;\n}"
+ },
+ "String name" : "code",
+ "xtype" : "Input",
+ "string fieldLabel" : "Code",
+ "$ xns" : "Roo.bootstrap",
+ "String indicatorpos" : "left"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "xtype" : "Row",
+ "$ xns" : "Roo.bootstrap",
+ "items" : [
{
- "listeners" : {
- "render" : "function (_self)\n{\n _this.type = _self;\n _self.store.load({});\n}"
- },
- "Boolean selectOnFocus" : true,
- "Boolean allowBlank" : false,
- "String loadingText" : "Searching...",
- "String name" : "comptype_display_name",
- "Number minChars" : 2,
- "String valueField" : "name",
- "String queryParam" : "query[name]",
- "Boolean typeAhead" : false,
- "xtype" : "ComboBox",
- "Boolean editable" : false,
- "String triggerAction" : "all",
- "string fieldLabel" : "Type",
- "String labelAlign" : "left",
- "Boolean alwaysQuery" : true,
- "Number listWidth" : 250,
+ "Number md" : 12,
+ "xtype" : "Column",
"$ xns" : "Roo.bootstrap",
- "String hiddenName" : "comptype",
- "String displayField" : "display_name",
"items" : [
{
"listeners" : {
- "beforeload" : "function (_self, options)\n{\n options.params = options.params || {};\n // set more here\n //o.params['query[empty_etype]'] = 1;\n options.params.etype = 'COMPTYPE';\n}"
+ "render" : "function (_self)\n{\n _this.type = _self;\n _self.store.load({});\n}"
},
- "Object sortInfo" : "{ direction : 'ASC', field: 'id' }",
- "xtype" : "Store",
- "boolean remoteSort" : true,
- "$ xns" : "Roo.data",
- "* prop" : "store",
+ "Boolean selectOnFocus" : true,
+ "Boolean allowBlank" : false,
+ "String loadingText" : "Searching...",
+ "String name" : "comptype_display_name",
+ "Number minChars" : 2,
+ "String valueField" : "name",
+ "String queryParam" : "query[name]",
+ "Boolean typeAhead" : false,
+ "xtype" : "ComboBox",
+ "Boolean editable" : false,
+ "String triggerAction" : "all",
+ "string fieldLabel" : "Type",
+ "Boolean alwaysQuery" : true,
+ "$ xns" : "Roo.bootstrap",
+ "String hiddenName" : "comptype",
+ "String displayField" : "display_name",
+ "String indicatorpos" : "left",
"items" : [
{
- "$ url" : "baseURL + '/Roo/core_enum.php'",
- "xtype" : "HttpProxy",
- "$ xns" : "Roo.data",
- "String method" : "GET",
- "* prop" : "proxy"
- },
- {
- "xtype" : "JsonReader",
- "String root" : "data",
+ "listeners" : {
+ "beforeload" : "function (_self, options)\n{\n options.params = options.params || {};\n // set more here\n //o.params['query[empty_etype]'] = 1;\n options.params.etype = 'COMPTYPE';\n}"
+ },
+ "Object sortInfo" : "{ direction : 'ASC', field: 'id' }",
+ "xtype" : "Store",
+ "boolean remoteSort" : true,
"$ xns" : "Roo.data",
- "String id" : "id",
- "* prop" : "reader",
- "String totalProperty" : "total"
+ "* prop" : "store",
+ "items" : [
+ {
+ "$ url" : "baseURL + '/Roo/core_enum.php'",
+ "xtype" : "HttpProxy",
+ "$ xns" : "Roo.data",
+ "String method" : "GET",
+ "* prop" : "proxy"
+ },
+ {
+ "xtype" : "JsonReader",
+ "String root" : "data",
+ "$ xns" : "Roo.data",
+ "String id" : "id",
+ "* prop" : "reader",
+ "String totalProperty" : "total"
+ }
+ ]
}
]
}
]
- },
- {
- "listeners" : {
- "render" : "function (_self)\n{\n _this.company = _self;\n}"
- },
- "String name" : "name",
- "xtype" : "Input",
- "string fieldLabel" : "Company",
- "String labelAlign" : "left",
- "$ xns" : "Roo.bootstrap"
- },
- {
- "listeners" : {
- "render" : "function (_self)\n{\n _this.tel = _self;\n}"
- },
- "String name" : "tel",
- "xtype" : "Input",
- "string fieldLabel" : "Phone",
- "String labelAlign" : "left",
- "$ xns" : "Roo.bootstrap"
- },
- {
- "listeners" : {
- "render" : "function (_self)\n{\n _this.fax = _self;\n}"
- },
- "String name" : "fax",
- "xtype" : "Input",
- "string fieldLabel" : "Fax",
- "String labelAlign" : "left",
- "$ xns" : "Roo.bootstrap"
- },
+ }
+ ]
+ },
+ {
+ "xtype" : "Row",
+ "$ xns" : "Roo.bootstrap",
+ "items" : [
{
- "listeners" : {
- "render" : "function (_self)\n{\n _this.fax = _self;\n}"
- },
- "String name" : "email",
- "xtype" : "Input",
- "string fieldLabel" : "Email",
- "String labelAlign" : "left",
- "$ xns" : "Roo.bootstrap"
- },
+ "Number md" : 12,
+ "xtype" : "Column",
+ "$ xns" : "Roo.bootstrap",
+ "items" : [
+ {
+ "listeners" : {
+ "render" : "function (_self)\n{\n _this.company = _self;\n}"
+ },
+ "String name" : "name",
+ "xtype" : "Input",
+ "string fieldLabel" : "Company",
+ "$ xns" : "Roo.bootstrap",
+ "String indicatorpos" : "left"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "xtype" : "Row",
+ "$ xns" : "Roo.bootstrap",
+ "items" : [
{
- "listeners" : {
- "render" : "function (_self)\n{\n _this.url = _self;\n}"
- },
- "String name" : "url",
- "xtype" : "Input",
- "string fieldLabel" : "URL",
- "String labelAlign" : "left",
- "$ xns" : "Roo.bootstrap"
- },
+ "Number md" : 12,
+ "xtype" : "Column",
+ "$ xns" : "Roo.bootstrap",
+ "items" : [
+ {
+ "listeners" : {
+ "render" : "function (_self)\n{\n _this.address = _self;\n}"
+ },
+ "String name" : "address",
+ "xtype" : "Input",
+ "string fieldLabel" : "Address",
+ "$ xns" : "Roo.bootstrap",
+ "String indicatorpos" : "left"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "xtype" : "Row",
+ "$ xns" : "Roo.bootstrap",
+ "items" : [
{
- "listeners" : {
- "render" : "function (_self)\n{\n _this.address = _self;\n}"
- },
- "String name" : "address",
- "xtype" : "Input",
- "string fieldLabel" : "Address",
- "String labelAlign" : "left",
- "$ xns" : "Roo.bootstrap"
- },
+ "Number md" : 12,
+ "xtype" : "Column",
+ "$ xns" : "Roo.bootstrap",
+ "items" : [
+ {
+ "listeners" : {
+ "render" : "function (_self)\n{\n _this.tel = _self;\n}"
+ },
+ "String name" : "tel",
+ "xtype" : "Input",
+ "string fieldLabel" : "Phone",
+ "$ xns" : "Roo.bootstrap",
+ "String indicatorpos" : "left"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "xtype" : "Row",
+ "$ xns" : "Roo.bootstrap",
+ "items" : [
{
- "listeners" : {
- "render" : "function (_self)\n{\n _this.remarks = _self;\n}"
- },
- "String name" : "remarks",
- "xtype" : "TextArea",
- "string fieldLabel" : "Remarks",
- "String labelAlign" : "left",
- "$ xns" : "Roo.bootstrap"
+ "Number md" : 12,
+ "xtype" : "Column",
+ "$ xns" : "Roo.bootstrap",
+ "items" : [
+ {
+ "listeners" : {
+ "render" : "function (_self)\n{\n _this.fax = _self;\n}"
+ },
+ "String name" : "email",
+ "xtype" : "Input",
+ "string fieldLabel" : "Email",
+ "$ xns" : "Roo.bootstrap",
+ "String indicatorpos" : "left"
+ }
+ ]
}
]
- }
- ]
- },
- {
- "xtype" : "Column",
- "Number xs" : 6,
- "$ xns" : "Roo.bootstrap",
- "items" : [
+ },
{
"xtype" : "Row",
"$ xns" : "Roo.bootstrap",
"items" : [
{
+ "Number md" : 12,
"xtype" : "Column",
"$ xns" : "Roo.bootstrap",
"items" : [
{
"listeners" : {
- "render" : "function (_self)\n{\n _this.logo = _self;\n}"
+ "render" : "function (_self)\n{\n _this.url = _self;\n}"
},
- "Boolean imgResponsive" : true,
- "xtype" : "Img",
+ "String name" : "url",
+ "xtype" : "Input",
+ "string fieldLabel" : "URL",
"$ xns" : "Roo.bootstrap",
- "String style" : "text-align: center; margin-left: auto; margin-right: auto; "
+ "String indicatorpos" : "left"
}
]
}
]
},
{
+ "String cls" : "badmin-company-edit-remark",
"xtype" : "Row",
"$ xns" : "Roo.bootstrap",
"items" : [
{
+ "Number md" : 12,
"xtype" : "Column",
"$ xns" : "Roo.bootstrap",
"items" : [
{
"listeners" : {
- "actionfailed" : "function (_self, action)\n{\n\n}",
- "actioncomplete" : "function (_self, action)\n{\n if(action.type == 'setdata'){\n _self.reset(); \n if(_this.data.id * 1 > 0) {\n _this.onid.setValue(_this.data.id);\n _this.ontable.setValue('coba_company');\n } \n return;\n }\n \n if (action.type == 'submit') { // only submitted here if we are \n if (_this.callback) {\n _this.callback.call(this, action.result.data);\n \n console.log(action.result.data);\n }\n return;\n }\n}",
- "render" : "function (_self)\n{\n _this.img_upload_form = _self;\n}"
+ "render" : "function (_self)\n{\n _this.remarks = _self;\n}"
},
- "$ url" : "baseURL + '/Roo/Images.php'",
- "xtype" : "Form",
- "Boolean fileUpload" : true,
+ "String name" : "remarks",
+ "xtype" : "TextArea",
+ "string fieldLabel" : "Remarks",
"$ xns" : "Roo.bootstrap",
- "String style" : "margin:15px;",
- "String method" : "POST",
- "items" : [
- {
- "listeners" : {
- "change" : "function (_self, newValue, oldValue)\n{ \n console.log(newValue);\n}"
- },
- "Boolean allowBlank" : false,
- "String name" : "imageUpload",
- "xtype" : "Input",
- "string fieldLabel" : "Select Logo",
- "String inputType" : "file",
- "$ xns" : "Roo.bootstrap",
- "$ listeners" : " { \n 'change' : function(e) { \n console.log(e); \n }\n}",
- "Boolean forceFeedback" : true
- },
- {
- "listeners" : {
- "render" : "function (_self)\n{\n _this.onid = _self;\n}"
- },
- "String name" : "onid",
- "xtype" : "Input",
- "String inputType" : "input",
- "$ xns" : "Roo.bootstrap"
- },
- {
- "listeners" : {
- "render" : "function (_self)\n{\n _this.ontable = _self;\n}"
- },
- "String name" : "ontable",
- "xtype" : "Input",
- "String inputType" : "input",
- "$ xns" : "Roo.bootstrap"
- },
- {
- "listeners" : {
- "render" : "function (_self)\n{\n _this.imgtype = _self;\n}"
- },
- "String name" : "imgtype",
- "xtype" : "Input",
- "String inputType" : "input",
- "$ xns" : "Roo.bootstrap"
- }
- ]
+ "String indicatorpos" : "left"
}
]
}
]
+ },
+ {
+ "listeners" : {
+ "render" : "function (_self)\n{\n _this.companyID = _self;\n}"
+ },
+ "String name" : "id",
+ "xtype" : "Input",
+ "String inputType" : "hidden",
+ "$ xns" : "Roo.bootstrap"
}
]
}
]
},
- {
- "xtype" : "Row",
- "$ xns" : "Roo.bootstrap",
- "items" : [
- {
- "xtype" : "Column",
- "$ xns" : "Roo.bootstrap"
- }
- ]
- },
{
"listeners" : {
"click" : "function (_self, e)\n{\n _this.dialog.hide();\n}"
},
- "String weight" : "danger",
+ "String weight" : "default",
"xtype" : "Button",
"$ xns" : "Roo.bootstrap",
"String html" : "Cancel",
- "String style" : "float: right; margin: 10px;",
"* prop" : "buttons[]"
},
{
"listeners" : {
"render" : "function (_self)\n{\n _this.btn_ok=this;\n}",
- "click" : "function (_self, e)\n{\n if(!_this.form.isValid()){\n Roo.bootstrap.MessageBox.alert('Error', 'Please Correct all the errors in red');\n return;\n }\n \n var myID = _this.form.findField('id').getValue();\n var myName = _this.form.findField('name').getValue();\n \n console.log(myID + ' ' + myName);\n \n new Pman.Request({\n url : baseURL + '/Roo/Core_company.php',\n method : 'POST',\n params : {\n id : _this.form.findField('id').getValue() * 1,\n name : _this.form.findField('name').getValue(),\n _check_name : 1\n }, \n success : function(res) {\n \n // Adding new record\n _this.form.method = 'POST';\n _this.form.doAction(\"submit\");\n },\n failure : function(res) {\n _this.form.method = 'POST';\n _this.form.doAction(\"submit\");\n }\n });\n \n return;\n \n}"
+ "click" : "function (_self, e)\n{\n if(!_this.form.isValid()){\n Roo.bootstrap.MessageBox.alert('Error', 'Please Correct all the errors in red');\n return;\n }\n \n var myID = _this.form.findField('id').getValue();\n var myName = _this.form.findField('name').getValue();\n \n console.log(myID + ' ' + myName);\n \n new Pman.Request({\n url : baseURL + '/Roo/Core_company.php',\n method : 'POST',\n params : {\n id : _this.form.findField('id').getValue() * 1,\n name : _this.form.findField('name').getValue(),\n _check_name : 1\n }, \n success : function(res) {\n \n // Adding new record\n _this.form.doAction(\"submit\");\n },\n failure : function(res) {\n _this.form.doAction(\"submit\");\n }\n });\n \n return;\n \n}"
},
"String weight" : "primary",
"xtype" : "Button",
"$ xns" : "Roo.bootstrap",
"String html" : "Save",
- "String style" : "float: right; margin: 10px; width: 70px;",
"* prop" : "buttons[]"
}
]