"parent": "",
"title": "",
"path": "/home/alan/gitlive/Pman.Admin/Pman.Dialog.AdminWatch.bjs",
- "items": false,
+ "items": [
+ {
+ "closable": false,
+ "collapsible": false,
+ "height": 230,
+ "resizable": false,
+ "title": "Edit / Create core_watch",
+ "width": 400,
+ "xtype": "LayoutDialog",
+ "|xns": "Roo",
+ "items": [
+ {
+ "|xns": "Roo",
+ "xtype": "LayoutRegion",
+ "*prop": "center"
+ },
+ {
+ "region": "center",
+ "xtype": "ContentPanel",
+ "|xns": "Roo",
+ "items": [
+ {
+ "|xns": "Roo.form",
+ "xtype": "Form",
+ "listeners": {
+ "|actioncomplete": "function(_self,action)\n{\n if (action.type == 'setdata') {\n //_this.dialog.el.mask(\"Loading\");\n //this.load({ method: 'GET', params: { '_id' : _this.data.id }});\n return;\n }\n if (action.type == 'load') {\n _this.dialog.el.unmask();\n return;\n }\n if (action.type =='submit') {\n \n _this.dialog.el.unmask();\n _this.dialog.hide();\n \n if (_this.callback) {\n _this.callback.call(_this, _this.form.getValues());\n }\n _this.form.reset();\n return;\n }\n}\n",
+ "|rendered": "function (form)\n{\n _this.form= form;\n}\n"
+ },
+ "method": "POST",
+ "style": "margin:10px;",
+ "|url": "baseURL + '/Roo/core_watch.php'",
+ "items": [
+ {
+ "fieldLabel": "Ontable",
+ "name": "ontable",
+ "width": 200,
+ "|xns": "Roo.form",
+ "xtype": "TextField"
+ },
+ {
+ "fieldLabel": "Onid",
+ "name": "onid",
+ "width": 75,
+ "|xns": "Roo.form",
+ "xtype": "TextField"
+ },
+ {
+ "|xns": "Roo.form",
+ "xtype": "ComboBox",
+ "allowBlank": "false",
+ "editable": "false",
+ "emptyText": "Select Person",
+ "forceSelection": true,
+ "listWidth": 400,
+ "loadingText": "Searching...",
+ "minChars": 2,
+ "pageSize": 20,
+ "qtip": "Select Person",
+ "selectOnFocus": true,
+ "triggerAction": "all",
+ "typeAhead": true,
+ "width": 300,
+ "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> </div>",
+ "queryParam": "query[name]",
+ "fieldLabel": "Person",
+ "valueField": "id",
+ "displayField": "name",
+ "hiddenName": "person_id",
+ "name": "person_id_name",
+ "items": [
+ {
+ "*prop": "store",
+ "xtype": "Store",
+ "|xns": "Roo.data",
+ "remoteSort": true,
+ "|sortInfo": "{ direction : 'ASC', field: 'id' }",
+ "listeners": {
+ "|beforeload": "function (_self, o){\n o.params = o.params || {};\n // set more here\n}\n"
+ },
+ "items": [
+ {
+ "*prop": "proxy",
+ "xtype": "HttpProxy",
+ "method": "GET",
+ "|xns": "Roo.data",
+ "|url": "baseURL + '/Roo/Person.php'"
+ },
+ {
+ "*prop": "reader",
+ "xtype": "JsonReader",
+ "|xns": "Roo.data",
+ "id": "id",
+ "root": "data",
+ "totalProperty": "total",
+ "|fields": "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"name\",\"type\":\"string\"}]"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "fieldLabel": "Event",
+ "name": "event",
+ "width": 200,
+ "|xns": "Roo.form",
+ "xtype": "TextField"
+ },
+ {
+ "fieldLabel": "Medium",
+ "name": "medium",
+ "width": 200,
+ "|xns": "Roo.form",
+ "xtype": "TextField"
+ },
+ {
+ "fieldLabel": "Active",
+ "name": "active",
+ "width": 75,
+ "|xns": "Roo.form",
+ "xtype": "TextField"
+ },
+ {
+ "name": "id",
+ "|xns": "Roo.form",
+ "xtype": "Hidden"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "listeners": {
+ "click": "function (_self, e)\n{\n _this.dialog.hide();\n}"
+ },
+ "*prop": "buttons[]",
+ "text": "Cancel",
+ "xtype": "Button",
+ "|xns": "Roo"
+ },
+ {
+ "listeners": {
+ "click": "function (_self, e)\n{\n // do some checks?\n \n \n _this.dialog.el.mask(\"Saving\");\n _this.form.doAction(\"submit\");\n\n}"
+ },
+ "*prop": "buttons[]",
+ "text": "Save",
+ "xtype": "Button",
+ "|xns": "Roo"
+ }
+ ]
+ }
+ ],
"permname": "",
"modOrder": "001"
}
\ No newline at end of file
-0
\ No newline at end of file
+//<script type="text/javascript">
+
+// Auto generated file - created by app.Builder.js- do not edit directly (at present!)
+
+Pman.Dialog.AdminWatch = {
+
+ dialog : false,
+ callback: false,
+
+ show : function(data, cb)
+ {
+ if (!this.dialog) {
+ this.create();
+ }
+
+ this.callback = cb;
+ this.data = data;
+ this.dialog.show(this.data._el);
+ if (this.form) {
+ this.form.reset();
+ this.form.setValues(data);
+ this.form.fireEvent('actioncomplete', this.form, { type: 'setdata', data: data });
+ }
+
+ },
+
+ create : function()
+ {
+ var _this = this;
+ this.dialog = Roo.factory({
+ xtype: 'LayoutDialog',
+ xns: Roo,
+ closable : false,
+ collapsible : false,
+ height : 230,
+ resizable : false,
+ title : "Edit / Create core_watch",
+ width : 400,
+ items : [
+ {
+ xtype: 'ContentPanel',
+ xns: Roo,
+ region : 'center',
+ items : [
+ {
+ xtype: 'Form',
+ xns: Roo.form,
+ listeners : {
+ actioncomplete : function(_self,action)
+ {
+ if (action.type == 'setdata') {
+ //_this.dialog.el.mask("Loading");
+ //this.load({ method: 'GET', params: { '_id' : _this.data.id }});
+ return;
+ }
+ if (action.type == 'load') {
+ _this.dialog.el.unmask();
+ return;
+ }
+ if (action.type =='submit') {
+
+ _this.dialog.el.unmask();
+ _this.dialog.hide();
+
+ if (_this.callback) {
+ _this.callback.call(_this, _this.form.getValues());
+ }
+ _this.form.reset();
+ return;
+ }
+ },
+ rendered : function (form)
+ {
+ _this.form= form;
+ }
+ },
+ method : 'POST',
+ style : 'margin:10px;',
+ url : baseURL + '/Roo/core_watch.php',
+ items : [
+ {
+ xtype: 'TextField',
+ xns: Roo.form,
+ fieldLabel : 'Ontable',
+ name : 'ontable',
+ width : 200
+ },
+ {
+ xtype: 'TextField',
+ xns: Roo.form,
+ fieldLabel : 'Onid',
+ name : 'onid',
+ width : 75
+ },
+ {
+ xtype: 'ComboBox',
+ xns: Roo.form,
+ allowBlank : 'false',
+ editable : 'false',
+ emptyText : "Select Person",
+ forceSelection : true,
+ listWidth : 400,
+ loadingText : "Searching...",
+ minChars : 2,
+ pageSize : 20,
+ qtip : "Select Person",
+ selectOnFocus : true,
+ triggerAction : 'all',
+ typeAhead : true,
+ width : 300,
+ tpl : '<div class="x-grid-cell-text x-btn button"><b>{name}</b> </div>',
+ queryParam : 'query[name]',
+ fieldLabel : 'Person',
+ valueField : 'id',
+ displayField : 'name',
+ hiddenName : 'person_id',
+ name : 'person_id_name',
+ store : {
+ xtype: 'Store',
+ xns: Roo.data,
+ remoteSort : true,
+ sortInfo : { direction : 'ASC', field: 'id' },
+ listeners : {
+ beforeload : function (_self, o){
+ o.params = o.params || {};
+ // set more here
+ }
+ },
+ proxy : {
+ xtype: 'HttpProxy',
+ xns: Roo.data,
+ method : 'GET',
+ url : baseURL + '/Roo/Person.php'
+ },
+ reader : {
+ xtype: 'JsonReader',
+ xns: Roo.data,
+ id : 'id',
+ root : 'data',
+ totalProperty : 'total',
+ fields : [{"name":"id","type":"int"},{"name":"name","type":"string"}]
+ }
+ }
+ },
+ {
+ xtype: 'TextField',
+ xns: Roo.form,
+ fieldLabel : 'Event',
+ name : 'event',
+ width : 200
+ },
+ {
+ xtype: 'TextField',
+ xns: Roo.form,
+ fieldLabel : 'Medium',
+ name : 'medium',
+ width : 200
+ },
+ {
+ xtype: 'TextField',
+ xns: Roo.form,
+ fieldLabel : 'Active',
+ name : 'active',
+ width : 75
+ },
+ {
+ xtype: 'Hidden',
+ xns: Roo.form,
+ name : 'id'
+ }
+ ]
+ }
+ ]
+ }
+ ],
+ center : {
+ xtype: 'LayoutRegion',
+ xns: Roo
+ },
+ buttons : [
+ {
+ xtype: 'Button',
+ xns: Roo,
+ listeners : {
+ click : function (_self, e)
+ {
+ _this.dialog.hide();
+ }
+ },
+ text : "Cancel"
+ },
+ {
+ xtype: 'Button',
+ xns: Roo,
+ listeners : {
+ click : function (_self, e)
+ {
+ // do some checks?
+
+
+ _this.dialog.el.mask("Saving");
+ _this.form.doAction("submit");
+
+ }
+ },
+ text : "Save"
+ }
+ ]
+ });
+ }
+};