1 //<script type="text/javascript">
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
5 Roo.namespace('Pman.Dialog');
7 Pman.Dialog.CoreAutoSavePreview = {
10 '87f9f735a1d36793ceaecd4e47124b63' :"Events",
11 'ea4788705e6873b424c65e91c2846b19' :"Cancel",
12 'bd88a20b53a47f7b5704a83a15ff5506' :"Saved Version",
13 '44749712dbec183e983dcd78a7736c41' :"Date",
14 'e0aa021e21dddbd6d8cecec71e9cf564' :"OK"
20 show : function(data, cb)
28 this.dialog.show(this.data._el);
31 this.form.setValues(data);
32 this.form.fireEvent('actioncomplete', this.form, { type: 'setdata', data: data });
40 this.dialog = Roo.factory({
44 xtype : 'LayoutRegion'
51 xtype : 'LayoutRegion'
60 title : _this._strings['bd88a20b53a47f7b5704a83a15ff5506'],
63 xtype : 'LayoutDialog',
67 text : _this._strings['ea4788705e6873b424c65e91c2846b19'],
78 text : _this._strings['e0aa021e21dddbd6d8cecec71e9cf564'],
86 if (_this.callback && _this.source != '') {
87 _this.callback.call(this, _this.source);
94 show : function (_self)
96 if(typeof(_this.data) != 'undefined'){
97 _this.grid.footer.onClick('first');
109 xtype : 'RowSelectionModel',
111 afterselectionchange : function (_self)
113 var selected = this.getSelected();
118 _this.viewPanel.setContent("Please select an saved version on the left");
122 _this.viewPanel.load( { url : baseURL + "/Roo/Events", method : 'GET' }, {_id : selected.data.id, _retrieve_source : 1}, function(oElement, bSuccess, oResponse){
124 var res = Roo.decode(oResponse.responseText);
126 if(!bSuccess || !res.success){
127 _this.viewPanel.setContent("Load data failed?!");
130 if(typeof(res.data) === 'string'){
131 _this.viewPanel.setContent(res.data);
135 if(!_this.data.successFn){
136 Roo.MessageBox.alert('Error', 'Please setup the successFn');
140 _this.source = _this.data.successFn(res);
142 _this.viewPanel.setContent(_this.source);
152 url : baseURL + '/Roo/Events.php',
164 'name': 'event_when',
170 totalProperty : 'total',
176 sortInfo : { field : 'event_when', direction: 'DESC' },
180 beforeload : function (_self, o)
182 o.params = o.params || {};
184 if(typeof(_this.data) == 'undefined'){
189 var d = Roo.apply({}, _this.data);
192 Roo.apply(o.params, d);
195 load : function (_self, records, options)
197 var sm = _this.grid.getSelectionModel();
198 if (!sm.getSelections().length) {
201 sm.fireEvent('afterselectionchange', sm);
215 xtype : 'PagingToolbar'
218 autoExpandColumn : 'event_when',
225 dataIndex : 'event_when',
226 header : _this._strings['44749712dbec183e983dcd78a7736c41'],
227 renderer : function(v) { return String.format('{0}', v ? v.format('Y-m-d H:i:s') : ''); },
230 xtype : 'ColumnModel'
234 dataIndex : 'event_when',
235 header : _this._strings['44749712dbec183e983dcd78a7736c41'],
236 renderer : function(v) { return String.format('{0}', v ? v.format('Y-m-d H:i:s') : ''); },
239 xtype : 'ColumnModel'
247 if (_this.panel.active) {
248 this.footer.onClick('first');
262 tableName : 'Events',
263 title : _this._strings['87f9f735a1d36793ceaecd4e47124b63'],
267 activate : function() {
270 _this.grid.footer.onClick('first');
287 xtype : 'ContentPanel',
289 render : function (_self)
291 _this.viewPanel = _self;