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 '53e5aa2c97fef1555d2511de8218c544' :"By",
11 '87f9f735a1d36793ceaecd4e47124b63' :"Events",
12 'ea4788705e6873b424c65e91c2846b19' :"Cancel",
13 'bd88a20b53a47f7b5704a83a15ff5506' :"Saved Version",
14 '44749712dbec183e983dcd78a7736c41' :"Date",
15 'e0aa021e21dddbd6d8cecec71e9cf564' :"OK"
21 show : function(data, cb)
29 this.dialog.show(this.data._el);
32 this.form.setValues(data);
33 this.form.fireEvent('actioncomplete', this.form, { type: 'setdata', data: data });
41 this.dialog = Roo.factory({
45 xtype : 'LayoutRegion'
52 xtype : 'LayoutRegion'
61 title : _this._strings['bd88a20b53a47f7b5704a83a15ff5506'],
64 xtype : 'LayoutDialog',
68 text : _this._strings['ea4788705e6873b424c65e91c2846b19'],
79 text : _this._strings['e0aa021e21dddbd6d8cecec71e9cf564'],
87 if (_this.callback && _this.source != '') {
88 _this.callback.call(this, _this.source);
95 show : function (_self)
97 if(typeof(_this.data) != 'undefined'){
98 _this.grid.footer.onClick('first');
110 xtype : 'RowSelectionModel',
112 afterselectionchange : function (_self)
114 var selected = this.getSelected();
119 _this.viewPanel.setContent("Please select an saved version on the left");
123 _this.viewPanel.load( { url : baseURL + "/Roo/Events", method : 'GET' }, {_id : selected.data.id, _retrieve_source : 1}, function(oElement, bSuccess, oResponse){
125 var res = Roo.decode(oResponse.responseText);
127 if(!bSuccess || !res.success){
128 _this.viewPanel.setContent("Load data failed?!");
131 if(typeof(res.data) === 'string'){
132 _this.viewPanel.setContent(res.data);
136 if(!_this.data.successFn){
137 Roo.MessageBox.alert('Error', 'Please setup the successFn');
141 _this.source = _this.data.successFn(res);
143 _this.viewPanel.setContent(_this.source);
153 url : baseURL + '/Roo/Events.php',
165 'name': 'event_when',
171 totalProperty : 'total',
177 sortInfo : { field : 'event_when', direction: 'DESC' },
181 beforeload : function (_self, o)
183 o.params = o.params || {};
185 if(typeof(_this.data) == 'undefined'){
190 var d = Roo.apply({}, _this.data);
193 Roo.apply(o.params, d);
196 load : function (_self, records, options)
198 var sm = _this.grid.getSelectionModel();
199 if (!sm.getSelections().length) {
202 sm.fireEvent('afterselectionchange', sm);
216 xtype : 'PagingToolbar'
219 autoExpandColumn : 'event_when',
226 dataIndex : 'event_when',
227 header : _this._strings['44749712dbec183e983dcd78a7736c41'],
228 renderer : function(v) { return String.format('{0}', v ? v.format('Y-m-d H:i:s') : ''); },
231 xtype : 'ColumnModel'
235 dataIndex : 'person_id_name',
236 header : _this._strings['53e5aa2c97fef1555d2511de8218c544'],
237 renderer : function(v) { return String.format('{0}', v ); },
240 xtype : 'ColumnModel'
248 if (_this.panel.active) {
249 this.footer.onClick('first');
263 tableName : 'Events',
264 title : _this._strings['87f9f735a1d36793ceaecd4e47124b63'],
268 activate : function() {
271 _this.grid.footer.onClick('first');
288 xtype : 'ContentPanel',
290 render : function (_self)
292 _this.viewPanel = _self;