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({
48 title : _this._strings['bd88a20b53a47f7b5704a83a15ff5506'] /* Saved Version */,
52 xtype : 'LayoutDialog',
54 show : function (_self)
56 if(typeof(_this.data) != 'undefined'){
57 _this.grid.footer.onClick('first');
65 xtype : 'LayoutRegion'
72 xtype : 'LayoutRegion'
76 text : _this._strings['ea4788705e6873b424c65e91c2846b19'] /* Cancel */,
87 text : _this._strings['e0aa021e21dddbd6d8cecec71e9cf564'] /* OK */,
96 if (_this.callback && _this.source != '') {
97 _this.callback.call(this, _this.source);
109 tableName : 'Events',
110 title : _this._strings['87f9f735a1d36793ceaecd4e47124b63'] /* Events */,
115 activate : function() {
118 _this.grid.footer.onClick('first');
123 autoExpandColumn : 'event_when',
133 if (_this.panel.active) {
134 this.footer.onClick('first');
143 xtype : 'PagingToolbar'
147 sortInfo : { field : 'event_when', direction: 'DESC' },
152 beforeload : function (_self, o)
154 o.params = o.params || {};
156 if(typeof(_this.data) == 'undefined'){
161 var d = Roo.apply({}, _this.data);
164 Roo.apply(o.params, d);
167 load : function (_self, records, options)
169 var sm = _this.grid.getSelectionModel();
170 if (!sm.getSelections().length) {
173 sm.fireEvent('afterselectionchange', sm);
179 url : baseURL + '/Roo/Events.php',
191 'name': 'event_when',
197 totalProperty : 'total',
207 xtype : 'RowSelectionModel',
209 afterselectionchange : function (_self)
211 var selected = this.getSelected();
216 _this.viewPanel.setContent("Please select an saved version on the left");
220 _this.viewPanel.load( { url : baseURL + "/Roo/Events", method : 'GET' }, {_id : selected.data.id, _retrieve_source : 1}, function(oElement, bSuccess, oResponse){
222 var res = Roo.decode(oResponse.responseText);
224 if(!bSuccess || !res.success){
225 _this.viewPanel.setContent("Load data failed?!");
228 if(typeof(res.data) === 'string'){
229 _this.viewPanel.setContent(res.data);
233 if(!_this.data.successFn){
234 Roo.MessageBox.alert('Error', 'Please setup the successFn');
238 _this.source = _this.data.successFn(res);
240 _this.viewPanel.setContent(_this.source);
248 dataIndex : 'event_when',
249 header : _this._strings['44749712dbec183e983dcd78a7736c41'] /* Date */,
250 renderer : function(v) { return String.format('{0}', v ? v.format('Y-m-d H:i:s') : ''); },
254 xtype : 'ColumnModel'
257 dataIndex : 'person_id_name',
258 header : _this._strings['53e5aa2c97fef1555d2511de8218c544'] /* By */,
259 renderer : function(v) { return String.format('{0}', v ); },
263 xtype : 'ColumnModel'
276 xtype : 'ContentPanel',
278 render : function (_self)
280 _this.viewPanel = _self;