Pman.Dialog.CoreAutoSavePreview.bjs
[Pman.Core] / Pman.Dialog.CoreAutoSavePreview.js
index 499e419..a198ae2 100644 (file)
@@ -76,14 +76,13 @@ Pman.Dialog.CoreAutoSavePreview = {
                             listeners : {
                                 afterselectionchange : function (_self)
                                 {
-                                    // load detail log in _this.viewPanel;
+                                    
                                     if (!this.getSelected()) {
                                         this.viewPanel.setContent("Nothing Selected");
                                         return;
                                     }
-                                    var id = this.getSelected().data.id;
-                                    _this.viewPanel.load( { url : baseURL + "/Admin/EventView/" + id + ".html" });
                                     
+                                    this.viewPanel.setContent("data");
                                 }
                             },
                             singleSelect : true
@@ -94,52 +93,9 @@ Pman.Dialog.CoreAutoSavePreview = {
                             listeners : {
                                 beforeload : function (_self, o)
                                 {
-                                    if (!Pman.buildCompleted) {
-                                        return false;
-                                    }
-                                   
-                                   
-                                   if (! _this.personSel) {
-                                    return false;
-                                    }
-                                    o.params = o.params || {};
-                                    o.params.person_id = _this.personSel.getValue();
-                                    var act = _this.actionSel.getValue();
-                                    if (act.length) {
-                                        o.params.action = act;
-                                    }
-                                    var tbl = _this.affectSel.getValue();
-                                    if (tbl.length) {
-                                        o.params.on_table = tbl;
-                                    }
-                                    act = _this.dateFrom.getValue();
-                                    if (act.format) {
-                                        o.params['query[from]'] = act.format('Y-m-d');
-                                    }
-                                    act = _this.dateTo.getValue();
-                                    if (act.format) {
-                                        o.params['query[to]'] = act.format('Y-m-d');
-                                    }
-                                 
-                                    
-                                    /*
-                                    act = _this.groupedCombo.getValue();
-                                    o.params['query[grouped]'] = act;
-                                    if (o.params['query[grouped]'] == 'gr') {
-                                    
-                                        if (!tbl.length) {
-                                            Roo.MessageBox.alert("Error", "Select a table to group results on");
-                                            return false;
-                                        }
-                                //        o.params['_columns']  = 
-                                        o.params['_distinct'] = 'on_id';
-                                        
-                                        
-                                    }
-                                    
-                                    */
-                                
-                                    
+                                    Roo.log(_this.data);
+                                    o.params = o.parmas || {};
+                                    o.action = 'AUTOSAVE'
                                 }
                             },
                             remoteSort : true,
@@ -298,12 +254,21 @@ Pman.Dialog.CoreAutoSavePreview = {
                             }
                         ]
                     }
+                },
+                {
+                    xtype: 'ContentPanel',
+                    xns: Roo,
+                    listeners : {
+                        render : function (_self)
+                        {
+                            _this.viewPanel = _self;
+                        }
+                    }
                 }
             ],
             center : {
                 xtype: 'LayoutRegion',
-                xns: Roo,
-                titlebar : false
+                xns: Roo
             },
             west : {
                 xtype: 'LayoutRegion',