From: Edward Date: Tue, 14 Jul 2015 06:55:31 +0000 (+0800) Subject: Pman.Tab.AdminLogEvents.bjs X-Git-Url: http://git.roojs.org/?p=Pman.Admin;a=commitdiff_plain;h=8ecb6299d249b6550c381dd9946f4bba4001d532 Pman.Tab.AdminLogEvents.bjs Pman.Tab.AdminLogEvents.js --- diff --git a/Pman.Tab.AdminLogEvents.bjs b/Pman.Tab.AdminLogEvents.bjs index 3b6a315..117ba69 100644 --- a/Pman.Tab.AdminLogEvents.bjs +++ b/Pman.Tab.AdminLogEvents.bjs @@ -24,6 +24,7 @@ "4e97aeeaa8b15ca1180fcd1f3ac478d1" : "When", "40bed7cf9b3d4bb3a3d7a7e3eb18c5eb" : "Person", "004bf6c9a40003140292e97330236c53" : "Action", + "2bd339d85ee3b33e513359ce781b60cc" : "Restore", "90e4ac2e5a22e53df63b6b186d8727ba" : "No Events found", "2c92a9a6a5dbf570825e62eabcdecd8d" : "Affected" }, @@ -149,6 +150,16 @@ { "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" } ] }, diff --git a/Pman.Tab.AdminLogEvents.js b/Pman.Tab.AdminLogEvents.js index 66d9a01..d724665 100644 --- a/Pman.Tab.AdminLogEvents.js +++ b/Pman.Tab.AdminLogEvents.js @@ -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'); + }); + + } + } } ] },