--- /dev/null
+{
+ "name" : "Pman.Tab.BAdminLogs",
+ "parent" : "Pman.Tab.BAdmin",
+ "title" : "Pman.Tab.BAdminLogs",
+ "path" : "/home/johns/gitlive/Pman.BAdmin/Pman.Tab.BAdminLogs.bjs",
+ "permname" : "",
+ "modOrder" : "003",
+ "strings" : {
+ "ce8ae9da5b7cd6c3df2929543a9af92d" : "Email",
+ "231bc72756b5e6de492aaaa1577f61b1" : "Remarks",
+ "ec211f7c20af43e742bf2570c3cb84f9" : "Add",
+ "b80bb7740288fda1f201890375a60c8f" : "id",
+ "7dce122004969d56ae2e0245cb754d35" : "Edit",
+ "fc6f97505d89fe9277965c126744647a" : "No Companies found",
+ "ce0be71e33226e4c1db2bcea5959f16b" : "Log",
+ "155ca6a755e25c15ad7ce45e2f638f10" : "Displaying Companies{0} - {1} of {2}",
+ "f78e208016407d8756c29673558ac14d" : "Company List",
+ "f2a6c498fb90ee345d997f888fce3b18" : "Delete",
+ "a1fa27779242b4902f7ae3bdd5c6d508" : "Type",
+ "9c9745a343efeacc9efe9b7222b27afb" : "Ref#",
+ "49ee3087348e8d44e1feda1917443987" : "Name",
+ "2e006b735fbd916d8ab26978ae6714d4" : "Tel",
+ "dd7bf230fde8d4836917806aff6a6b27" : "Address",
+ "9810aa2b9f44401be4bf73188ef2b67d" : "Fax"
+ },
+ "items" : [
+ {
+ "xtype" : "Nest",
+ "String region" : "center",
+ "$ xns" : "Roo.bootstrap.panel",
+ "String title" : "Log",
+ "Boolean background" : false,
+ "items" : [
+ {
+ "xtype" : "Border",
+ "$ xns" : "Roo.bootstrap.layout",
+ "* prop" : "layout",
+ "items" : [
+ {
+ "String tabPosition" : "top",
+ "xtype" : "Region",
+ "$ xns" : "Roo.bootstrap.layout",
+ "* prop" : "center"
+ },
+ {
+ "listeners" : {
+ "activate" : "function (_self)\n{\n\n if (_this.table) {\n _this.table.footer.onClick('first');\n _this.dialog = Pman.Dialog.BAdminCompany;\n }\n}",
+ "render" : "function (_self)\n{\n _this.grid = _self;\n}"
+ },
+ "xtype" : "Grid",
+ "Boolean fitToFrame" : true,
+ "$ xns" : "Roo.bootstrap.panel",
+ "String region" : "center",
+ "String title" : "Company List",
+ "Boolean closable" : false,
+ "items" : [
+ {
+ "xtype" : "NavSimplebar",
+ "$ xns" : "Roo.bootstrap",
+ "* prop" : "toolbar",
+ "items" : [
+ {
+ "xtype" : "NavGroup",
+ "$ xns" : "Roo.bootstrap",
+ "items" : [
+ {
+ "xtype" : "NavItem",
+ "$ xns" : "Roo.bootstrap",
+ "String style" : "float: left",
+ "items" : [
+ {
+ "listeners" : {
+ "click" : "function (_self, e)\n{\n if (!_this.dialog) {\n return;\n }\n\n _this.dialog.show({}, function() {\n if (_this.table) {\n _this.table.footer.onClick('first');\n }\n }); \n}"
+ },
+ "String weight" : "primary",
+ "xtype" : "Button",
+ "$ xns" : "Roo.bootstrap",
+ "String html" : "Add",
+ "String style" : "margin: 10px;"
+ },
+ {
+ "listeners" : {
+ "click" : "function (_self, e)\n{\n var s = _this.grid.grid.selModel.getSelections();\n if (!s.length || (s.length > 1)) {\n Roo.bootstrap.MessageBox.alert(\"Error\", s.length ? \"Select only one Row\" : \"Select a Row\");\n return;\n }\n if (!_this.dialog) {\n return;\n }\n _this.dialog.show(s[0].data, function() {\n if (_this.table) {\n _this.table.footer.onClick('first');\n }\n }); \n \n}"
+ },
+ "String weight" : "primary",
+ "xtype" : "Button",
+ "$ xns" : "Roo.bootstrap",
+ "String html" : "Edit",
+ "String style" : "margin: 10px;"
+ },
+ {
+ "listeners" : {
+ "click" : "function (_self, e)\n{\n Pman.genericDelete(_this.grid, 'core_company'); \n}"
+ },
+ "String weight" : "primary",
+ "xtype" : "Button",
+ "$ xns" : "Roo.bootstrap",
+ "String html" : "Delete",
+ "String style" : "margin: 10px;"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "listeners" : {
+ "rowdblclick" : "function (_self, el, rowIndex, e)\n{\n if (!_this.dialog) {\n return;\n }\n _this.dialog.show(_this.grid.grid.store.getAt(rowIndex).data, function() {\n if (_this.table) {\n _this.table.footer.onClick('first');\n }\n });\n}",
+ "render" : "function (_self)\n{\n _this.table = _self;\n}"
+ },
+ "String cls" : "table-fixed",
+ "boolean hover" : true,
+ "boolean striped" : false,
+ "xtype" : "Table",
+ "boolean responsive" : true,
+ "Boolean rowSelection" : true,
+ "$ xns" : "Roo.bootstrap",
+ "Boolean loadMask" : true,
+ "* prop" : "grid",
+ "items" : [
+ {
+ "boolean hover" : true,
+ "boolean striped" : true,
+ "xtype" : "Store",
+ "Boolean rowSelection" : true,
+ "$ xns" : "Roo.data",
+ "Boolean loadMask" : true,
+ "* prop" : "store",
+ "items" : [
+ {
+ "xtype" : "JsonReader",
+ "String root" : "data",
+ "$ xns" : "Roo.data",
+ "String id" : "id",
+ "* prop" : "reader",
+ "String totalProperty" : "total"
+ },
+ {
+ "listeners" : {
+ "load" : "function (This, o, arg)\n{\n _this.table.footer.onClick('first');\n}"
+ },
+ "xtype" : "HttpProxy",
+ "$ xns" : "Roo.data",
+ "String method" : "GET",
+ "* prop" : "proxy",
+ "$ String url" : "baseURL + '/Roo/core_company'"
+ }
+ ]
+ },
+ {
+ "String header" : "Type",
+ "String dataIndex" : "comptype",
+ "Number width" : 90,
+ "xtype" : "ColumnModel",
+ "$ xns" : "Roo.grid",
+ "$ renderer" : "function (v,x ,r) {\n //return Pman.Dialog.Companies.comptypeListToString(r.data.isOwner ? 'OWNER' : v);\n return v;\n}",
+ "Boolean sortable" : true,
+ "* prop" : "cm[]"
+ },
+ {
+ "String header" : "Ref#",
+ "String dataIndex" : "code",
+ "Number width" : 50,
+ "xtype" : "ColumnModel",
+ "$ xns" : "Roo.grid",
+ "$ renderer" : "function(v) { return String.format('{0}', v); }",
+ "Boolean sortable" : true,
+ "* prop" : "cm[]",
+ "Boolean hidden" : true
+ },
+ {
+ "String header" : "Name",
+ "String dataIndex" : "name",
+ "Number width" : 200,
+ "xtype" : "ColumnModel",
+ "$ xns" : "Roo.grid",
+ "$ renderer" : "function(v,x,r) {\n return String.format(r.data.comptype == 'OWNER' ? '<B>{0}</B>' : '{0}',v); \n}",
+ "Boolean sortable" : true,
+ "* prop" : "cm[]"
+ },
+ {
+ "String header" : "Tel",
+ "String dataIndex" : "tel",
+ "Number width" : 100,
+ "xtype" : "ColumnModel",
+ "$ xns" : "Roo.grid",
+ "$ renderer" : "function(v) { return String.format('{0}', v); }",
+ "* prop" : "cm[]"
+ },
+ {
+ "String header" : "Fax",
+ "String dataIndex" : "fax",
+ "Number width" : 100,
+ "xtype" : "ColumnModel",
+ "$ xns" : "Roo.grid",
+ "$ renderer" : "function(v) { return String.format('{0}', v); }",
+ "* prop" : "cm[]"
+ },
+ {
+ "String header" : "Email",
+ "String dataIndex" : "email",
+ "Number width" : 200,
+ "xtype" : "ColumnModel",
+ "$ xns" : "Roo.grid",
+ "$ renderer" : "function (v) {\n console.log('render:' + v);\n return (v.length && v.indexOf('@') > 0 ) ? \n String.format('<a href=\"mailto:{0}\">{0}</a>',v) : v;\n \n }",
+ "Boolean sortable" : true,
+ "* prop" : "cm[]"
+ },
+ {
+ "String header" : "Address",
+ "String dataIndex" : "address",
+ "Number width" : 250,
+ "xtype" : "ColumnModel",
+ "$ xns" : "Roo.grid",
+ "$ renderer" : "function(v) { return String.format('{0}', v); }",
+ "Boolean sortable" : true,
+ "* prop" : "cm[]"
+ },
+ {
+ "String header" : "Remarks",
+ "String dataIndex" : "remarks",
+ "Number width" : 200,
+ "xtype" : "ColumnModel",
+ "$ xns" : "Roo.grid",
+ "$ renderer" : "function(v) { return String.format('{0}', v); }",
+ "* prop" : "cm[]",
+ "Boolean hidden" : true
+ },
+ {
+ "String header" : "id",
+ "String dataIndex" : "id",
+ "Number width" : 50,
+ "xtype" : "ColumnModel",
+ "$ xns" : "Roo.grid",
+ "$ renderer" : "function(v) { return String.format('{0}', v); }",
+ "Boolean sortable" : true,
+ "* prop" : "cm[]",
+ "Boolean hidden" : true
+ },
+ {
+ "listeners" : {
+ "render" : "function (_self)\n{\n _this.footer = _self;\n}"
+ },
+ "Number pageSize" : 25,
+ "Boolean displayInfo" : false,
+ "String displayMsg" : "Displaying Companies{0} - {1} of {2}",
+ "xtype" : "PagingToolbar",
+ "String emptyMsg" : "No Companies found",
+ "$ xns" : "Roo.bootstrap",
+ "* prop" : "footer",
+ "string name" : "footer"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
--- /dev/null
+//<script type="text/javascript">
+
+// Auto generated file - created by app.Builder.js- do not edit directly (at present!)
+
+Roo.namespace('Pman.Tab');
+
+Pman.Tab.BAdminLogs = new Roo.XComponent({
+
+ _strings : {
+ 'ce8ae9da5b7cd6c3df2929543a9af92d' :"Email",
+ '231bc72756b5e6de492aaaa1577f61b1' :"Remarks",
+ 'ec211f7c20af43e742bf2570c3cb84f9' :"Add",
+ 'b80bb7740288fda1f201890375a60c8f' :"id",
+ '7dce122004969d56ae2e0245cb754d35' :"Edit",
+ 'fc6f97505d89fe9277965c126744647a' :"No Companies found",
+ 'ce0be71e33226e4c1db2bcea5959f16b' :"Log",
+ '155ca6a755e25c15ad7ce45e2f638f10' :"Displaying Companies{0} - {1} of {2}",
+ 'f78e208016407d8756c29673558ac14d' :"Company List",
+ 'f2a6c498fb90ee345d997f888fce3b18' :"Delete",
+ 'a1fa27779242b4902f7ae3bdd5c6d508' :"Type",
+ '9c9745a343efeacc9efe9b7222b27afb' :"Ref#",
+ '49ee3087348e8d44e1feda1917443987' :"Name",
+ '2e006b735fbd916d8ab26978ae6714d4' :"Tel",
+ 'dd7bf230fde8d4836917806aff6a6b27' :"Address",
+ '9810aa2b9f44401be4bf73188ef2b67d' :"Fax"
+ },
+
+ part : ["BAdmin", "Logs" ],
+ order : '003-Pman.Tab.BAdminLogs',
+ region : 'center',
+ parent : 'Pman.Tab.BAdmin',
+ name : "Pman.Tab.BAdminLogs",
+ disabled : false,
+ permname : '',
+ _tree : function(_data)
+ {
+ var _this = this;
+ var MODULE = this;
+ return {
+ xtype : 'Nest',
+ background : false,
+ region : 'center',
+ title : _this._strings['ce0be71e33226e4c1db2bcea5959f16b'] /* Log */,
+ xns : Roo.bootstrap.panel,
+ '|xns' : 'Roo.bootstrap.panel',
+ layout : {
+ xtype : 'Border',
+ xns : Roo.bootstrap.layout,
+ '|xns' : 'Roo.bootstrap.layout',
+ center : {
+ xtype : 'Region',
+ tabPosition : 'top',
+ xns : Roo.bootstrap.layout,
+ '|xns' : 'Roo.bootstrap.layout'
+ },
+ items : [
+ {
+ xtype : 'Grid',
+ closable : false,
+ fitToFrame : true,
+ region : 'center',
+ title : _this._strings['f78e208016407d8756c29673558ac14d'] /* Company List */,
+ listeners : {
+ activate : function (_self)
+ {
+
+ if (_this.table) {
+ _this.table.footer.onClick('first');
+ _this.dialog = Pman.Dialog.BAdminCompany;
+ }
+ },
+ render : function (_self)
+ {
+ _this.grid = _self;
+ }
+ },
+ xns : Roo.bootstrap.panel,
+ '|xns' : 'Roo.bootstrap.panel',
+ toolbar : {
+ xtype : 'NavSimplebar',
+ xns : Roo.bootstrap,
+ '|xns' : 'Roo.bootstrap',
+ items : [
+ {
+ xtype : 'NavGroup',
+ xns : Roo.bootstrap,
+ '|xns' : 'Roo.bootstrap',
+ items : [
+ {
+ xtype : 'NavItem',
+ style : 'float: left',
+ xns : Roo.bootstrap,
+ '|xns' : 'Roo.bootstrap',
+ items : [
+ {
+ xtype : 'Button',
+ html : _this._strings['ec211f7c20af43e742bf2570c3cb84f9'] /* Add */,
+ style : 'margin: 10px;',
+ weight : 'primary',
+ listeners : {
+ click : function (_self, e)
+ {
+ if (!_this.dialog) {
+ return;
+ }
+
+ _this.dialog.show({}, function() {
+ if (_this.table) {
+ _this.table.footer.onClick('first');
+ }
+ });
+ }
+ },
+ xns : Roo.bootstrap,
+ '|xns' : 'Roo.bootstrap'
+ },
+ {
+ xtype : 'Button',
+ html : _this._strings['7dce122004969d56ae2e0245cb754d35'] /* Edit */,
+ style : 'margin: 10px;',
+ weight : 'primary',
+ listeners : {
+ click : function (_self, e)
+ {
+ var s = _this.grid.grid.selModel.getSelections();
+ if (!s.length || (s.length > 1)) {
+ Roo.bootstrap.MessageBox.alert("Error", s.length ? "Select only one Row" : "Select a Row");
+ return;
+ }
+ if (!_this.dialog) {
+ return;
+ }
+ _this.dialog.show(s[0].data, function() {
+ if (_this.table) {
+ _this.table.footer.onClick('first');
+ }
+ });
+
+ }
+ },
+ xns : Roo.bootstrap,
+ '|xns' : 'Roo.bootstrap'
+ },
+ {
+ xtype : 'Button',
+ html : _this._strings['f2a6c498fb90ee345d997f888fce3b18'] /* Delete */,
+ style : 'margin: 10px;',
+ weight : 'primary',
+ listeners : {
+ click : function (_self, e)
+ {
+ Pman.genericDelete(_this.grid, 'core_company');
+ }
+ },
+ xns : Roo.bootstrap,
+ '|xns' : 'Roo.bootstrap'
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ grid : {
+ xtype : 'Table',
+ cls : 'table-fixed',
+ hover : true,
+ loadMask : true,
+ responsive : true,
+ rowSelection : true,
+ striped : false,
+ listeners : {
+ render : function (_self)
+ {
+ _this.table = _self;
+ },
+ rowdblclick : function (_self, el, rowIndex, e)
+ {
+ if (!_this.dialog) {
+ return;
+ }
+ _this.dialog.show(_this.grid.grid.store.getAt(rowIndex).data, function() {
+ if (_this.table) {
+ _this.table.footer.onClick('first');
+ }
+ });
+ }
+ },
+ xns : Roo.bootstrap,
+ '|xns' : 'Roo.bootstrap',
+ footer : {
+ xtype : 'PagingToolbar',
+ displayInfo : false,
+ displayMsg : _this._strings['155ca6a755e25c15ad7ce45e2f638f10'] /* Displaying Companies{0} - {1} of {2} */,
+ emptyMsg : _this._strings['fc6f97505d89fe9277965c126744647a'] /* No Companies found */,
+ name : 'footer',
+ pageSize : 25,
+ listeners : {
+ render : function (_self)
+ {
+ _this.footer = _self;
+ }
+ },
+ xns : Roo.bootstrap,
+ '|xns' : 'Roo.bootstrap'
+ },
+ store : {
+ xtype : 'Store',
+ hover : true,
+ loadMask : true,
+ rowSelection : true,
+ striped : true,
+ xns : Roo.data,
+ '|xns' : 'Roo.data',
+ proxy : {
+ xtype : 'HttpProxy',
+ method : 'GET',
+ url : baseURL + '/Roo/core_company',
+ listeners : {
+ load : function (This, o, arg)
+ {
+ _this.table.footer.onClick('first');
+ }
+ },
+ xns : Roo.data,
+ '|xns' : 'Roo.data'
+ },
+ reader : {
+ xtype : 'JsonReader',
+ id : 'id',
+ root : 'data',
+ totalProperty : 'total',
+ xns : Roo.data,
+ '|xns' : 'Roo.data'
+ }
+ },
+ cm : [
+ {
+ xtype : 'ColumnModel',
+ dataIndex : 'comptype',
+ header : _this._strings['a1fa27779242b4902f7ae3bdd5c6d508'] /* Type */,
+ renderer : function (v,x ,r) {
+ //return Pman.Dialog.Companies.comptypeListToString(r.data.isOwner ? 'OWNER' : v);
+ return v;
+ },
+ sortable : true,
+ width : 90,
+ xns : Roo.grid,
+ '|xns' : 'Roo.grid'
+ },
+ {
+ xtype : 'ColumnModel',
+ dataIndex : 'code',
+ header : _this._strings['9c9745a343efeacc9efe9b7222b27afb'] /* Ref# */,
+ hidden : true,
+ renderer : function(v) { return String.format('{0}', v); },
+ sortable : true,
+ width : 50,
+ xns : Roo.grid,
+ '|xns' : 'Roo.grid'
+ },
+ {
+ xtype : 'ColumnModel',
+ dataIndex : 'name',
+ header : _this._strings['49ee3087348e8d44e1feda1917443987'] /* Name */,
+ renderer : function(v,x,r) {
+ return String.format(r.data.comptype == 'OWNER' ? '<B>{0}</B>' : '{0}',v);
+ },
+ sortable : true,
+ width : 200,
+ xns : Roo.grid,
+ '|xns' : 'Roo.grid'
+ },
+ {
+ xtype : 'ColumnModel',
+ dataIndex : 'tel',
+ header : _this._strings['2e006b735fbd916d8ab26978ae6714d4'] /* Tel */,
+ renderer : function(v) { return String.format('{0}', v); },
+ width : 100,
+ xns : Roo.grid,
+ '|xns' : 'Roo.grid'
+ },
+ {
+ xtype : 'ColumnModel',
+ dataIndex : 'fax',
+ header : _this._strings['9810aa2b9f44401be4bf73188ef2b67d'] /* Fax */,
+ renderer : function(v) { return String.format('{0}', v); },
+ width : 100,
+ xns : Roo.grid,
+ '|xns' : 'Roo.grid'
+ },
+ {
+ xtype : 'ColumnModel',
+ dataIndex : 'email',
+ header : _this._strings['ce8ae9da5b7cd6c3df2929543a9af92d'] /* Email */,
+ renderer : function (v) {
+ console.log('render:' + v);
+ return (v.length && v.indexOf('@') > 0 ) ?
+ String.format('<a href="mailto:{0}">{0}</a>',v) : v;
+
+ },
+ sortable : true,
+ width : 200,
+ xns : Roo.grid,
+ '|xns' : 'Roo.grid'
+ },
+ {
+ xtype : 'ColumnModel',
+ dataIndex : 'address',
+ header : _this._strings['dd7bf230fde8d4836917806aff6a6b27'] /* Address */,
+ renderer : function(v) { return String.format('{0}', v); },
+ sortable : true,
+ width : 250,
+ xns : Roo.grid,
+ '|xns' : 'Roo.grid'
+ },
+ {
+ xtype : 'ColumnModel',
+ dataIndex : 'remarks',
+ header : _this._strings['231bc72756b5e6de492aaaa1577f61b1'] /* Remarks */,
+ hidden : true,
+ renderer : function(v) { return String.format('{0}', v); },
+ width : 200,
+ xns : Roo.grid,
+ '|xns' : 'Roo.grid'
+ },
+ {
+ xtype : 'ColumnModel',
+ dataIndex : 'id',
+ header : _this._strings['b80bb7740288fda1f201890375a60c8f'] /* id */,
+ hidden : true,
+ renderer : function(v) { return String.format('{0}', v); },
+ sortable : true,
+ width : 50,
+ xns : Roo.grid,
+ '|xns' : 'Roo.grid'
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }; }
+});