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){
99 var res = Roo.decode(oResponse.responseText);
101 if(!bSuccess || !res.success){
102 _this.viewPanel.setContent("Load data failed?!");
105 if(typeof(res.data) === 'string'){
106 _this.viewPanel.setContent(res.data);
110 if(!_this.data.successFn){
111 Roo.MessageBox.alert('Error', 'Please setup the successFn');
115 _this.source = _this.data.successFn(res);
117 _this.viewPanel.setContent(_this.source);
128 beforeload : function (_self, o)
130 o.params = o.params || {};
132 if(typeof(_this.data) == 'undefined'){
137 var d = Roo.apply(_this.data);
140 Roo.apply(o.params, d);
145 sortInfo : { field : 'event_when', direction: 'DESC' },
150 url : baseURL + '/Roo/Events.php'
157 totalProperty : 'total',
164 'name': 'event_when',
171 xtype: 'PagingToolbar',
178 xtype: 'ColumnModel',
180 dataIndex : 'event_when',
183 renderer : function(v) { return String.format('{0}', v ? v.format('Y-m-d H:i:s') : ''); }
189 xtype: 'ContentPanel',
192 render : function (_self)
194 _this.viewPanel = _self;
205 xtype: 'LayoutRegion',
209 xtype: 'LayoutRegion',
233 if (_this.callback) {
234 _this.callback.call(this, _this.source);