From: john Date: Mon, 15 Jan 2018 08:08:44 +0000 (+0800) Subject: Pman.Dialog.CoreAutoSavePreview.bjs X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=commitdiff_plain;h=1a5a2c7af68bdfff927cbab8e05956a0b117ed7c Pman.Dialog.CoreAutoSavePreview.bjs Pman.Dialog.CoreAutoSavePreview.js --- diff --git a/Pman.Dialog.CoreAutoSavePreview.bjs b/Pman.Dialog.CoreAutoSavePreview.bjs index 20975ff5..73b12034 100644 --- a/Pman.Dialog.CoreAutoSavePreview.bjs +++ b/Pman.Dialog.CoreAutoSavePreview.bjs @@ -2,7 +2,7 @@ "name" : "Pman.Dialog.CoreAutoSavePreview", "parent" : "", "title" : "", - "path" : "/home/edward/gitlive/Pman.Core/Pman.Dialog.CoreAutoSavePreview.bjs", + "path" : "/home/johns/gitlive/Pman.Core/Pman.Dialog.CoreAutoSavePreview.bjs", "permname" : "", "modOrder" : "001", "strings" : { @@ -36,8 +36,8 @@ }, { "xtype" : "LayoutRegion", - "width" : 200, "$ xns" : "Roo", + "width" : 200, "split" : true, "* prop" : "west" }, @@ -45,9 +45,9 @@ "listeners" : { "|activate" : "function() {\n _this.panel = this;\n if (_this.grid) {\n _this.grid.footer.onClick('first');\n }\n}" }, + "fitToframe" : true, "background" : false, "region" : "west", - "fitToframe" : true, "title" : "Events", "xtype" : "GridPanel", "fitContainer" : true, @@ -86,8 +86,8 @@ "items" : [ { "$ url" : "baseURL + '/Roo/Events.php'", - "xtype" : "HttpProxy", "method" : "GET", + "xtype" : "HttpProxy", "$ xns" : "Roo.data", "* prop" : "proxy" }, @@ -111,8 +111,8 @@ }, { "xtype" : "ColumnModel", - "width" : 100, "header" : "Date", + "width" : 100, "$ renderer" : "function(v) { return String.format('{0}', v ? v.format('Y-m-d H:i:s') : ''); }", "$ xns" : "Roo.grid", "* prop" : "colModel[]", @@ -120,8 +120,8 @@ }, { "xtype" : "ColumnModel", - "header" : "By", "width" : 100, + "header" : "By", "$ renderer" : "function(v) { return String.format('{0}', v ); }", "$ xns" : "Roo.grid", "* prop" : "colModel[]", @@ -136,8 +136,8 @@ "render" : "function (_self)\n{\n _this.viewPanel = _self;\n}" }, "autoScroll" : true, - "background" : false, "fitToFrame" : true, + "background" : false, "region" : "center", "xtype" : "ContentPanel", "fitContainer" : true, diff --git a/Pman.Dialog.CoreAutoSavePreview.js b/Pman.Dialog.CoreAutoSavePreview.js index e679c3aa..96d2178c 100644 --- a/Pman.Dialog.CoreAutoSavePreview.js +++ b/Pman.Dialog.CoreAutoSavePreview.js @@ -39,6 +39,7 @@ Pman.Dialog.CoreAutoSavePreview = { { var _this = this; this.dialog = Roo.factory({ + xtype : 'LayoutDialog', background : false, closable : false, collapsible : false, @@ -47,9 +48,6 @@ Pman.Dialog.CoreAutoSavePreview = { resizable : false, title : _this._strings['bd88a20b53a47f7b5704a83a15ff5506'] /* Saved Version */, width : 800, - xns : Roo, - '|xns' : 'Roo', - xtype : 'LayoutDialog', listeners : { show : function (_self) { @@ -59,35 +57,35 @@ Pman.Dialog.CoreAutoSavePreview = { } }, + xns : Roo, + '|xns' : 'Roo', center : { + xtype : 'LayoutRegion', xns : Roo, - '|xns' : 'Roo', - xtype : 'LayoutRegion' + '|xns' : 'Roo' }, west : { + xtype : 'LayoutRegion', split : true, width : 200, xns : Roo, - '|xns' : 'Roo', - xtype : 'LayoutRegion' + '|xns' : 'Roo' }, buttons : [ { - text : _this._strings['ea4788705e6873b424c65e91c2846b19'] /* Cancel */, - xns : Roo, - '|xns' : 'Roo', xtype : 'Button', + text : _this._strings['ea4788705e6873b424c65e91c2846b19'] /* Cancel */, listeners : { click : function() { _this.dialog.hide(); } - } + }, + xns : Roo, + '|xns' : 'Roo' }, { - text : _this._strings['e0aa021e21dddbd6d8cecec71e9cf564'] /* OK */, - xns : Roo, - '|xns' : 'Roo', xtype : 'Button', + text : _this._strings['e0aa021e21dddbd6d8cecec71e9cf564'] /* OK */, listeners : { click : function() { @@ -97,20 +95,20 @@ Pman.Dialog.CoreAutoSavePreview = { _this.callback.call(this, _this.source); } } - } + }, + xns : Roo, + '|xns' : 'Roo' } ], items : [ { + xtype : 'GridPanel', background : false, fitContainer : true, fitToframe : true, region : 'west', tableName : 'Events', title : _this._strings['87f9f735a1d36793ceaecd4e47124b63'] /* Events */, - xns : Roo, - '|xns' : 'Roo', - xtype : 'GridPanel', listeners : { activate : function() { _this.panel = this; @@ -119,12 +117,12 @@ Pman.Dialog.CoreAutoSavePreview = { } } }, + xns : Roo, + '|xns' : 'Roo', grid : { + xtype : 'Grid', autoExpandColumn : 'event_when', loadMask : true, - xns : Roo.grid, - '|xns' : 'Roo.grid', - xtype : 'Grid', listeners : { render : function() { @@ -135,19 +133,19 @@ Pman.Dialog.CoreAutoSavePreview = { } } }, + xns : Roo.grid, + '|xns' : 'Roo.grid', footer : { + xtype : 'PagingToolbar', displayInfo : false, pageSize : 25, xns : Roo, - '|xns' : 'Roo', - xtype : 'PagingToolbar' + '|xns' : 'Roo' }, dataSource : { + xtype : 'Store', remoteSort : true, sortInfo : { field : 'event_when', direction: 'DESC' }, - xns : Roo.data, - '|xns' : 'Roo.data', - xtype : 'Store', listeners : { beforeload : function (_self, o) { @@ -174,14 +172,17 @@ Pman.Dialog.CoreAutoSavePreview = { } } }, + xns : Roo.data, + '|xns' : 'Roo.data', proxy : { + xtype : 'HttpProxy', method : 'GET', url : baseURL + '/Roo/Events.php', xns : Roo.data, - '|xns' : 'Roo.data', - xtype : 'HttpProxy' + '|xns' : 'Roo.data' }, reader : { + xtype : 'JsonReader', fields : [ { 'name': 'id', @@ -196,15 +197,12 @@ Pman.Dialog.CoreAutoSavePreview = { root : 'data', totalProperty : 'total', xns : Roo.data, - '|xns' : 'Roo.data', - xtype : 'JsonReader' + '|xns' : 'Roo.data' } }, sm : { - singleSelect : true, - xns : Roo.grid, - '|xns' : 'Roo.grid', xtype : 'RowSelectionModel', + singleSelect : true, listeners : { afterselectionchange : function (_self) { @@ -241,45 +239,47 @@ Pman.Dialog.CoreAutoSavePreview = { }); } - } + }, + xns : Roo.grid, + '|xns' : 'Roo.grid' }, colModel : [ { + xtype : 'ColumnModel', dataIndex : 'event_when', header : _this._strings['44749712dbec183e983dcd78a7736c41'] /* Date */, renderer : function(v) { return String.format('{0}', v ? v.format('Y-m-d H:i:s') : ''); }, width : 100, xns : Roo.grid, - '|xns' : 'Roo.grid', - xtype : 'ColumnModel' + '|xns' : 'Roo.grid' }, { + xtype : 'ColumnModel', dataIndex : 'person_id_name', header : _this._strings['53e5aa2c97fef1555d2511de8218c544'] /* By */, renderer : function(v) { return String.format('{0}', v ); }, width : 100, xns : Roo.grid, - '|xns' : 'Roo.grid', - xtype : 'ColumnModel' + '|xns' : 'Roo.grid' } ] } }, { + xtype : 'ContentPanel', autoScroll : true, background : false, fitContainer : true, fitToFrame : true, region : 'center', - xns : Roo, - '|xns' : 'Roo', - xtype : 'ContentPanel', listeners : { render : function (_self) { _this.viewPanel = _self; } - } + }, + xns : Roo, + '|xns' : 'Roo' } ] });