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');
79 rowdblclick : function (_self, rowIndex, e)
84 _this.callback.call(this, _this.source);
88 autoExpandColumn : 'filename',
91 xtype: 'RowSelectionModel',
94 afterselectionchange : function (_self)
96 var selected = this.getSelected();
99 _this.viewPanel.setContent("Nothing Selected");
103 _this.viewPanel.load( { url : baseURL + "/Roo/Events", method : 'GET' }, {_id : selected.data.id, _retrieve_source : 1}, function(oElement, bSuccess, oResponse){
105 var res = Roo.decode(oResponse.responseText);
107 if(!bSuccess || !res.success){
108 _this.viewPanel.setContent("Load data failed?!");
111 if(typeof(res.data) === 'string'){
112 _this.viewPanel.setContent(res.data);
116 _this.source = res.data.POST.source;
118 _this.viewPanel.setContent(_this.source);
129 beforeload : function (_self, o)
131 o.params = o.params || {};
133 if(typeof(_this.data) == 'undefined'){
138 o.params.action = 'AUTOSAVE';
142 sortInfo : { field : 'event_when', direction: 'DESC' },
147 url : baseURL + '/Roo/Events.php'
154 totalProperty : 'total',
161 'name': 'event_when',
168 xtype: 'PagingToolbar',
175 xtype: 'ColumnModel',
177 dataIndex : 'event_when',
180 renderer : function(v) { return String.format('{0}', v ? v.format('Y-m-d H:i:s') : ''); }
186 xtype: 'ContentPanel',
189 render : function (_self)
191 _this.viewPanel = _self;
202 xtype: 'LayoutRegion',
206 xtype: 'LayoutRegion',
230 if (_this.callback) {
231 _this.callback.call(this, _this.source);