1 //<script type="text/javascript">
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
5 Pman.Dialog.CoreAutoSavePreview = {
10 show : function(data, cb)
18 this.dialog.show(this.data._el);
21 this.form.setValues(data);
22 this.form.fireEvent('actioncomplete', this.form, { type: 'setdata', data: data });
30 this.dialog = Roo.factory({
31 xtype: 'LayoutDialog',
34 show : function (_self)
36 if(typeof(_this.data) != 'undefined'){
37 _this.grid.footer.onClick('first');
47 title : "Saved Version",
54 activate : function() {
57 _this.grid.footer.onClick('first');
75 if (_this.panel.active) {
76 this.footer.onClick('first');
80 autoExpandColumn : 'event_when',
83 xtype: 'RowSelectionModel',
86 afterselectionchange : function (_self)
88 var selected = this.getSelected();
91 _this.viewPanel.setContent("Nothing Selected");
95 _this.viewPanel.load( { url : baseURL + "/Roo/Events", method : 'GET' }, {_id : selected.data.id, _retrieve_source : 1}, function(oElement, bSuccess, oResponse){
97 var res = Roo.decode(oResponse.responseText);
99 if(!bSuccess || !res.success){
100 _this.viewPanel.setContent("Load data failed?!");
103 _this.data.successFn();
114 beforeload : function (_self, o)
116 o.params = o.params || {};
118 if(typeof(_this.data) == 'undefined'){
123 o.params.action = 'AUTOSAVE';
127 sortInfo : { field : 'event_when', direction: 'DESC' },
132 url : baseURL + '/Roo/Events.php'
139 totalProperty : 'total',
146 'name': 'event_when',
153 xtype: 'PagingToolbar',
160 xtype: 'ColumnModel',
162 dataIndex : 'event_when',
165 renderer : function(v) { return String.format('{0}', v ? v.format('Y-m-d H:i:s') : ''); }
171 xtype: 'ContentPanel',
174 render : function (_self)
176 _this.viewPanel = _self;
187 xtype: 'LayoutRegion',
191 xtype: 'LayoutRegion',
215 if (_this.callback) {
216 _this.callback.call(this, _this.source);