Pman.Tab.AdminLogEvents.bjs
authorEdward <edward@roojs.com>
Tue, 14 Jul 2015 06:55:31 +0000 (14:55 +0800)
committerEdward <edward@roojs.com>
Tue, 14 Jul 2015 06:55:31 +0000 (14:55 +0800)
Pman.Tab.AdminLogEvents.js

Pman.Tab.AdminLogEvents.bjs
Pman.Tab.AdminLogEvents.js

index 3b6a315..117ba69 100644 (file)
@@ -24,6 +24,7 @@
   "4e97aeeaa8b15ca1180fcd1f3ac478d1" : "When",
   "40bed7cf9b3d4bb3a3d7a7e3eb18c5eb" : "Person",
   "004bf6c9a40003140292e97330236c53" : "Action",
+  "2bd339d85ee3b33e513359ce781b60cc" : "Restore",
   "90e4ac2e5a22e53df63b6b186d8727ba" : "No Events found",
   "2c92a9a6a5dbf570825e62eabcdecd8d" : "Affected"
  },
             {
              "xtype" : "Separator",
              "$ xns" : "Roo.Toolbar"
+            },
+            {
+             "listeners" : {
+              "|click" : "function()\n{\n    var s = _this.grid.getSelectionModel().getSelections();\n    if (!s.length || (s.length > 1))  {\n        Roo.MessageBox.alert(\"Error\", s.length ? \"Select only one Row\" : \"Select a Row\");\n        return;\n    }\n    if (!_this.dialog) return;\n    _this.dialog.show(s[0].data, function() {\n        _this.grid.footer.onClick('first');\n    }); \n    \n}\n"
+             },
+             "text" : "Restore",
+             "xtype" : "Button",
+             "cls" : "x-btn-text-icon",
+             "$ icon" : "Roo.rootURL + 'images/default/tree/leaf.gif'",
+             "$ xns" : "Roo.Toolbar"
             }
            ]
           },
index 66d9a01..d724665 100644 (file)
@@ -25,6 +25,7 @@ Pman.Tab.AdminLogEvents = new Roo.XComponent({
   '4e97aeeaa8b15ca1180fcd1f3ac478d1' :"When",
   '40bed7cf9b3d4bb3a3d7a7e3eb18c5eb' :"Person",
   '004bf6c9a40003140292e97330236c53' :"Action",
+  '2bd339d85ee3b33e513359ce781b60cc' :"Restore",
   '90e4ac2e5a22e53df63b6b186d8727ba' :"No Events found",
   '2c92a9a6a5dbf570825e62eabcdecd8d' :"Affected"
  },
@@ -229,6 +230,29 @@ Pman.Tab.AdminLogEvents = new Roo.XComponent({
           xns : Roo.Toolbar,
           '|xns' : 'Roo.Toolbar',
           xtype : 'Separator'
+         },
+         {
+          cls : 'x-btn-text-icon',
+          icon : Roo.rootURL + 'images/default/tree/leaf.gif',
+          text : _this._strings['2bd339d85ee3b33e513359ce781b60cc'] /* Restore */,
+          xns : Roo.Toolbar,
+          '|xns' : 'Roo.Toolbar',
+          xtype : 'Button',
+          listeners : {
+           click : function()
+            {
+                var s = _this.grid.getSelectionModel().getSelections();
+                if (!s.length || (s.length > 1))  {
+                    Roo.MessageBox.alert("Error", s.length ? "Select only one Row" : "Select a Row");
+                    return;
+                }
+                if (!_this.dialog) return;
+                _this.dialog.show(s[0].data, function() {
+                    _this.grid.footer.onClick('first');
+                }); 
+                
+            }
+          }
          }
         ]
        },