Pman.Dialog.CoreAutoSavePreview.bjs
[Pman.Core] / Pman.Dialog.CoreAutoSavePreview.js
index 78f3421..e4ce7fa 100644 (file)
@@ -37,10 +37,6 @@ Pman.Dialog.CoreAutoSavePreview = {
                         _this.grid.footer.onClick('first');
                     }
                     
-                    _this.source = '';
-                    
-                    _this.viewPanel.setContent("Please select a version on the left");
-                    
                 }
             },
             background : false,
@@ -67,8 +63,8 @@ Pman.Dialog.CoreAutoSavePreview = {
                     fitContainer : true,
                     fitToframe : true,
                     region : 'west',
-                    tableName : 'Images',
-                    title : "Images",
+                    tableName : 'Events',
+                    title : "Events",
                     grid : {
                         xtype: 'Grid',
                         xns: Roo.grid,
@@ -139,6 +135,15 @@ Pman.Dialog.CoreAutoSavePreview = {
                                 
                                     Roo.apply(o.params, d);
                                     
+                                },
+                                load : function (_self, records, options)
+                                {
+                                    var sm = _this.grid.getSelectionModel();
+                                    if (!sm.getSelections().length) {
+                                        sm.selectFirstRow();
+                                        
+                                        sm.fireEvent('afterselectionchange', sm);
+                                    }
                                 }
                             },
                             remoteSort : true,