{ "items" : [ { "$ xns" : "Roo", "Boolean background" : false, "String region" : "center", "String title" : "Current Notifications", "items" : [ { "$ xns" : "Roo", "* prop" : "layout", "items" : [ { "$ xns" : "Roo", "* prop" : "center", "xtype" : "LayoutRegion" }, { "$ xns" : "Roo", "* prop" : "south", "Boolean collapsible" : true, "Boolean split" : true, "String collapsedTitle" : "View Details", "String title" : "Event Details", "autoScroll" : true, "height" : 150, "xtype" : "LayoutRegion" }, { "$ xns" : "Roo", "bool background" : false, "fitContainer" : true, "fitToframe" : true, "items" : [ { "$ xns" : "Roo.grid", "* prop" : "grid", "autoExpandColumn" : "person_id_name", "items" : [ { "$ sortInfo" : "{ field : 'act_when', direction: 'DESC' }", "$ xns" : "Roo.data", "* prop" : "dataSource", "items" : [ { "$ url" : "baseURL + '/Roo/core_notify.php'", "$ xns" : "Roo.data", "* prop" : "proxy", "method" : "GET", "xtype" : "HttpProxy" }, { "$ fields" : [ "[", " {", " 'name': 'id',", " 'type': 'int'", " },", " {", " 'name': 'act_when',", " 'type': 'date',", " 'dateFormat': 'Y-m-d'", " },", " {", " 'name': 'onid',", " 'type': 'int'", " },", " {", " 'name': 'ontable',", " 'type': 'string'", " },", " {", " 'name': 'person_id',", " 'type': 'int'", " },", " {", " 'name': 'msgid',", " 'type': 'string'", " },", " {", " 'name': 'sent',", " 'type': 'date',", " 'dateFormat': 'Y-m-d'", " },", " {", " 'name': 'event_id',", " 'type': 'int'", " },", " {", " 'name': 'person_id_id',", " 'type': 'int'", " },", " {", " 'name': 'person_id_office_id',", " 'type': 'int'", " },", " {", " 'name': 'person_id_name',", " 'type': 'string'", " },", " {", " 'name': 'person_id_phone',", " 'type': 'string'", " },", " {", " 'name': 'person_id_fax',", " 'type': 'string'", " },", " {", " 'name': 'person_id_email',", " 'type': 'string'", " },", " {", " 'name': 'person_id_company_id',", " 'type': 'int'", " },", " {", " 'name': 'person_id_role',", " 'type': 'string'", " },", " {", " 'name': 'person_id_active',", " 'type': 'int'", " },", " {", " 'name': 'person_id_remarks',", " 'type': 'string'", " },", " {", " 'name': 'person_id_passwd',", " 'type': 'string'", " },", " {", " 'name': 'person_id_owner_id',", " 'type': 'int'", " },", " {", " 'name': 'person_id_lang',", " 'type': 'string'", " },", " {", " 'name': 'person_id_no_reset_sent',", " 'type': 'int'", " },", " {", " 'name': 'person_id_action_type',", " 'type': 'string'", " },", " {", " 'name': 'person_id_project_id',", " 'type': 'int'", " },", " {", " 'name': 'person_id_deleted_by',", " 'type': 'int'", " },", " {", " 'name': 'person_id_deleted_dt',", " 'type': 'date'", " },", " {", " 'name': 'event_id_id',", " 'type': 'int'", " },", " {", " 'name': 'event_id_person_name',", " 'type': 'string'", " },", " {", " 'name': 'event_id_event_when',", " 'type': 'date'", " },", " {", " 'name': 'event_id_action',", " 'type': 'string'", " },", " {", " 'name': 'event_id_ipaddr',", " 'type': 'string'", " },", " {", " 'name': 'event_id_on_id',", " 'type': 'int'", " },", " {", " 'name': 'event_id_on_table',", " 'type': 'string'", " },", " {", " 'name': 'event_id_person_id',", " 'type': 'int'", " },", " {", " 'name': 'event_id_remarks',", " 'type': 'string'", " }", "]" ], "$ xns" : "Roo.data", "* prop" : "reader", "id" : "id", "root" : "data", "totalProperty" : "total", "xtype" : "JsonReader" } ], "listeners" : { "beforeload" : [ "function (_self, options)", "{", " options.params = options.params || {};", " ", " options.params._evtype_align = 1;", " ", " if (!_this.toggleBtn.pressed) {", " options.params['event_id'] = 0;", " } else {", " options.params['!event_id'] = 0;", " }", " ", " if (!_this.personCombo) {", " return false;", " }", " var p = _this.personCombo.getValue();", " if (p*1) { ", " options.params.person_id = p;", " }", " ", " var from = _this.fromDateSel.getValue();", " ", " if(from){", " options.params.from = from.format('Y-m-d');", " }", " ", " var to = _this.toDateSel.getValue();", " ", " if(to){", " options.params.to = to.format('Y-m-d');", " }", " ", " var type = _this.typeCombo.getValue();", " ", " if(type.length){", " options.params.evtype = type;", " }", " options.params['search[contains]'] = _this.searchBox.getValue();", " ", "}" ] }, "remoteSort" : true, "xtype" : "Store" }, { "$ xns" : "Roo.grid", "* prop" : "sm", "listeners" : { "afterselectionchange" : [ "function (_self)", "{", " // load detail log in _this.viewPanel;", " if (!this.getSelected()) {", " this.viewPanel.setContent(\"Nothing Selected\");", " return;", " }", " var id = this.getSelected().data.event_id;", " if (id *1 < 1) {", " ", " _this.viewPanel.setContent(\"No Event for this line\"); ", " return;", " }", " _this.viewPanel.load( { url : baseURL + \"/Admin/EventView/\" + id + \".html\" });", " ", "}" ] }, "singleSelect" : false, "xtype" : "RowSelectionModel" }, { "$ xns" : "Roo", "* prop" : "footer", "displayInfo" : true, "displayMsg" : "Displaying core_notify{0} - {1} of {2}", "emptyMsg" : "No core_notify found", "pageSize" : 25, "xtype" : "PagingToolbar" }, { "$ xns" : "Roo", "* prop" : "toolbar", "items" : [ { "$ xns" : "Roo.form", "String emptyText" : "Search Subject", "listeners" : { "render" : [ "function (_self)", "{", " _this.searchBox = this;", "}" ], "specialkey" : [ "function (_self, e)", "{", " _this.grid.footer.onClick('first');", "}" ] }, "xtype" : "TextField" }, { "$ xns" : "Roo.form", "allowBlank" : true, "displayField" : "person_id_name", "editable" : true, "emptyText" : "Select person", "forceSelection" : true, "items" : [ { "$ sortInfo" : "{ direction : 'ASC', field: 'person_id_name' }", "$ xns" : "Roo.data", "* prop" : "store", "items" : [ { "$ url" : "baseURL + '/Roo/core_notify.php'", "$ xns" : "Roo.data", "* prop" : "proxy", "method" : "GET", "xtype" : "HttpProxy" }, { "$ fields" : "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"ontable\",\"type\":\"string\"}]", "$ xns" : "Roo.data", "* prop" : "reader", "id" : "id", "root" : "data", "totalProperty" : "total", "xtype" : "JsonReader" } ], "listeners" : { "|beforeload" : [ "function (_self, o){", " o.params = o.params || {};", " o.params._distinct='person_id';", " o.params._columns='person_id,person_id_name,person_id_email';", " o.params['!person_id_name'] = '';", " ", " // set more here", "}", "" ] }, "remoteSort" : true, "xtype" : "Store" } ], "listWidth" : 400, "listeners" : { "render" : [ "function (_self)", "{", " _this.personCombo = _self;", "}" ], "select" : [ "function (combo, record, index)", "{", " _this.grid.footer.onClick('first');", "}" ] }, "loadingText" : "Searching...", "minChars" : 2, "pageSize" : 20, "qtip" : "Select person", "queryParam" : "query[person_id_name]", "selectOnFocus" : true, "tpl" : "