{ "id": "roo-file-169", "name": "Pman.Tab.AdminWatches", "parent": "Pman.Tab.Admin", "title": "Pman.Tab.AdminWatches", "path": "/home/alan/gitlive/Pman.Admin/Pman.Tab.AdminWatches.bjs", "items": [ { "listeners": { "|activate": "function() {\n _this.panel = this;\n if (_this.grid) {\n _this.grid.footer.onClick('first');\n }\n}" }, "background": true, "fitContainer": true, "fitToframe": true, "region": "center", "tableName": "core_watch", "title": "Watches", "xtype": "GridPanel", "|xns": "Roo", "items": [ { "listeners": { "|render": "function() \n{\n _this.grid = this; \n //_this.dialog = Pman.Dialog.FILL_IN\n if (_this.panel.active) {\n this.footer.onClick('first');\n }\n}", "|rowdblclick": "function (_self, rowIndex, e)\n{\n if (!_this.dialog) return;\n _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {\n _this.grid.footer.onClick('first');\n }); \n}\n" }, "*prop": "grid", "autoExpandColumn": "person_id_name", "loadMask": true, "xtype": "Grid", "|xns": "Roo.grid", "items": [ { "listeners": { "beforeload": "function (_self, options)\n{\n var val = _this.affectSel.getValue();\n if (val.length) {\n options.params.ontable = val;\n }\n \n}" }, "*prop": "dataSource", "remoteSort": true, "xtype": "Store", "|sortInfo": "{ field : 'ontable', direction: 'ASC' }", "|xns": "Roo.data", "items": [ { "*prop": "proxy", "xtype": "HttpProxy", "method": "GET", "|url": "baseURL + '/Roo/core_watch.php'", "|xns": "Roo.data" }, { "|xns": "Roo.data", "xtype": "JsonReader", "totalProperty": "total", "root": "data", "*prop": "reader", "id": "id", "|fields": "[\n {\n 'name': 'id',\n 'type': 'int'\n },\n {\n 'name': 'ontable',\n 'type': 'string'\n },\n {\n 'name': 'onid',\n 'type': 'int'\n },\n {\n 'name': 'person_id',\n 'type': 'int'\n },\n {\n 'name': 'event',\n 'type': 'string'\n },\n {\n 'name': 'medium',\n 'type': 'string'\n },\n {\n 'name': 'active',\n 'type': 'int'\n },\n {\n 'name': 'person_id_id',\n 'type': 'int'\n },\n {\n 'name': 'person_id_office_id',\n 'type': 'int'\n },\n {\n 'name': 'person_id_name',\n 'type': 'string'\n },\n {\n 'name': 'person_id_phone',\n 'type': 'string'\n },\n {\n 'name': 'person_id_fax',\n 'type': 'string'\n },\n {\n 'name': 'person_id_email',\n 'type': 'string'\n },\n {\n 'name': 'person_id_company_id',\n 'type': 'int'\n },\n {\n 'name': 'person_id_role',\n 'type': 'string'\n },\n {\n 'name': 'person_id_active',\n 'type': 'int'\n },\n {\n 'name': 'person_id_remarks',\n 'type': 'string'\n },\n {\n 'name': 'person_id_passwd',\n 'type': 'string'\n },\n {\n 'name': 'person_id_owner_id',\n 'type': 'int'\n },\n {\n 'name': 'person_id_lang',\n 'type': 'string'\n },\n {\n 'name': 'person_id_no_reset_sent',\n 'type': 'int'\n },\n {\n 'name': 'person_id_action_type',\n 'type': 'string'\n },\n {\n 'name': 'person_id_project_id',\n 'type': 'int'\n },\n {\n 'name': 'person_id_deleted_by',\n 'type': 'int'\n },\n {\n 'name': 'person_id_deleted_dt',\n 'type': 'date'\n }\n]" } ] }, { "*prop": "footer", "xtype": "PagingToolbar", "pageSize": 25, "displayInfo": true, "displayMsg": "Displaying core_watch{0} - {1} of {2}", "emptyMsg": "No core_watch found", "|xns": "Roo" }, { "*prop": "toolbar", "xtype": "Toolbar", "|xns": "Roo", "items": [ { "text": "Show", "xtype": "TextItem", "|xns": "Roo.Toolbar" }, { "listeners": { "|select": "function (combo, record, index)\n{\n _this.grid.footer.onClick('first');\n}", "|render": "function (_self)\n{\n _this.affectSel = _self;\n}" }, "allowBlank": true, "displayField": "ontable", "editable": false, "emptyText": "Select Affects", "forceSelection": true, "listWidth": 300, "loadingText": "Searching...", "minChars": 2, "name": "ontable", "pageSize": 20, "qtip": "Select Action", "queryParam": "query[on_table]", "selectOnFocus": true, "tpl": "
{ontable}
", "triggerAction": "all", "typeAhead": true, "valueField": "action", "width": 150, "xtype": "ComboBox", "|xns": "Roo.form", "items": [ { "listeners": { "|beforeload": "function (_self, o)\n{\n o.params = o.params || {};\n // staff can see all logs, other companies can only see their own.\n if (Pman.Login.authUser.company_id_comptype != 'OWNER') {\n o.params.company_id = Pman.Login.authUser.company_id;\n }\n o.params._distinct = 'ontable';\n o.params._columns ='ontable';\n}" }, "*prop": "store", "remoteSort": true, "xtype": "Store", "|sortInfo": "{ field : 'ontable' , direction : 'ASC' }", "|xns": "Roo.data", "items": [ { "*prop": "proxy", "method": "GET", "xtype": "HttpProxy", "|url": "baseURL + '/Roo/Core_watch.php'", "|xns": "Roo.data" }, { "*prop": "reader", "id": "id", "root": "data", "totalProperty": "total", "xtype": "JsonReader", "|fields": "[\n {\n 'name': 'id',\n 'type': 'int'\n },\n {\n 'name': 'on_table',\n 'type': 'string'\n }\n \n]", "|xns": "Roo.data" } ] } ] }, { "|xns": "Roo.Toolbar", "xtype": "Fill" }, { "text": "Add", "xtype": "Button", "cls": "x-btn-text-icon", "|icon": "Roo.rootURL + 'images/default/dd/drop-add.gif'", "listeners": { "|click": "function()\n{\n if (!_this.dialog) return;\n _this.dialog.show( { id : 0 } , function() {\n _this.grid.footer.onClick('first');\n }); \n}\n" }, "|xns": "Roo.Toolbar" }, { "text": "Edit", "xtype": "Button", "cls": "x-btn-text-icon", "|icon": "Roo.rootURL + 'images/default/tree/leaf.gif'", "listeners": { "|click": "function()\n{\n var s = _this.grid.getSelectionModel().getSelections();\n if (!s.length || (s.length > 1)) {\n Roo.MessageBox.alert(\"Error\", s.length ? \"Select only one Row\" : \"Select a Row\");\n return;\n }\n if (!_this.dialog) return;\n _this.dialog.show(s[0].data, function() {\n _this.grid.footer.onClick('first');\n }); \n \n}\n" }, "|xns": "Roo.Toolbar" }, { "text": "Delete", "cls": "x-btn-text-icon", "|icon": "rootURL + '/Pman/templates/images/trash.gif'", "xtype": "Button", "listeners": { "|click": "function()\n{\n Pman.genericDelete(_this, 'core_watch'); \n}\n " }, "|xns": "Roo.Toolbar" } ] }, { "*prop": "colModel[]", "dataIndex": "event", "header": "Watch Event", "width": 100, "xtype": "ColumnModel", "|renderer": "function(v) { return String.format('{0}', v); }", "|xns": "Roo.grid" }, { "*prop": "colModel[]", "dataIndex": "ontable", "header": "Watch Table", "width": 150, "xtype": "ColumnModel", "|renderer": "function(v) { return String.format('{0}', v); }", "|xns": "Roo.grid" }, { "*prop": "colModel[]", "dataIndex": "onid", "header": "Watch ID", "width": 75, "xtype": "ColumnModel", "|renderer": "function(v) { return String.format('{0}', v); }", "|xns": "Roo.grid" }, { "*prop": "colModel[]", "dataIndex": "person_id_name", "header": "Who get's notified", "width": 150, "xtype": "ColumnModel", "|renderer": "function(v) { return String.format('{0}', v); }", "|xns": "Roo.grid" }, { "*prop": "colModel[]", "dataIndex": "medium", "header": "What happens", "width": 200, "xtype": "ColumnModel", "|renderer": "function(v) { return String.format('{0}', v); }", "|xns": "Roo.grid" }, { "xtype": "ColumnModel", "header": "Active", "width": 75, "dataIndex": "active", "|renderer": "function(v) { return String.format('{0}', v); }", "|xns": "Roo.grid", "*prop": "colModel[]" } ] } ] } ], "permname": "", "modOrder": "860" }