[Erp5-report] r20089 - in /erp5admin/trunk/content/erp5admin: erp5admin.xul erp5admin_async.js
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Mar 20 22:48:33 CET 2008
Author: bartek
Date: Thu Mar 20 22:48:33 2008
New Revision: 20089
URL: http://svn.erp5.org?rev=20089&view=rev
Log:
no automatic reloading of security window; buttons above the window allow now to reload the same context or read for the current context; in status bar a button to open security window;
Modified:
erp5admin/trunk/content/erp5admin/erp5admin.xul
erp5admin/trunk/content/erp5admin/erp5admin_async.js
Modified: erp5admin/trunk/content/erp5admin/erp5admin.xul
URL: http://svn.erp5.org/erp5admin/trunk/content/erp5admin/erp5admin.xul?rev=20089&r1=20088&r2=20089&view=diff
==============================================================================
--- erp5admin/trunk/content/erp5admin/erp5admin.xul (original)
+++ erp5admin/trunk/content/erp5admin/erp5admin.xul Thu Mar 20 22:48:33 2008
@@ -124,7 +124,16 @@
<window id="main-window" context="dashboardPopup">
<splitter id="erp5admin-dashboard-splitter" class="chromeclass-extrachrome" hidden="true"/>
<vbox id="erp5admin-dashboard" class="chromeclass-extrachrome" hidden="true" persist="height,width">
- <checkbox label="Stay here (monitor security for this object)" oncommand="erp5admin_toggleStayHere(this)" id="erp5admin-stayhere" checked="true"/>
+ <hbox>
+ <spacer flex="1"/>
+ <separator class="groove-thin" orient="vertical"/>
+ <toolbarbutton id="erp5admin-refresh-security" label="[[ Refresh ]]" tooltiptext="Re-read security information for the same object" oncommand="erp5admin_refreshSecurity();"/>
+ <separator class="groove-thin" orient="vertical"/>
+ <toolbarbutton id="erp5admin-read-security" label="[[ Go Here ]]" tooltiptext="Read security info for current context" oncommand="erp5admin_openSecurity();"/>
+ <separator class="groove-thin" orient="vertical"/>
+ <toolbarbutton id="erp5admin-close-security" label="-- Close --" oncommand="erp5admin_hideDashboard();"/>
+ <separator class="groove-thin" orient="vertical"/>
+ </hbox>
<vbox id="erp5admin-dashboard-browse" flex="1">
</vbox>
</vbox>
@@ -137,6 +146,12 @@
</popup>
</popupset>
+ <statusbar id="status-bar">
+ <statusbarpanel id="erp5admin-statusbar-panel" insertafter="page-report-button">
+ <toolbarbutton id="erp5admin-statusbar-read-security" style="font-weight:bold;" label=" -- Open Security -- " oncommand="erp5admin_openSecurity();"/>
+ </statusbarpanel>
+ </statusbar>
+
<!--<menu label="&webdeveloper.name;" accesskey="&webdeveloper.context.key;" id="webdeveloper-context">
<menupopup>
<menu label="&webdeveloper.disable.label;" accesskey="&webdeveloper.disable.key;">
Modified: erp5admin/trunk/content/erp5admin/erp5admin_async.js
URL: http://svn.erp5.org/erp5admin/trunk/content/erp5admin/erp5admin_async.js?rev=20089&r1=20088&r2=20089&view=diff
==============================================================================
--- erp5admin/trunk/content/erp5admin/erp5admin_async.js (original)
+++ erp5admin/trunk/content/erp5admin/erp5admin_async.js Thu Mar 20 22:48:33 2008
@@ -122,8 +122,11 @@
function erp5admin_openSecurity(){
context_url = erp5admin_getContextURL();
erp5admin_openInDashboard('security', context_url + '/Admin_viewSecurity');
- sec_timeout = window.setTimeout(erp5admin_openSecurity, 3000);
}
+
+function erp5admin_refreshSecurity(){
+ erp5admin_openInDashboard('security', security_url);
+}
function erp5admin_getTestScriptName(){
var name = navigator.preference("erp5.erp5admin.test_script_name");
@@ -211,7 +214,7 @@
browser = dashboard_browse.childNodes[0]
}
try {
- if((security_url == false) || (dashboard.stayhere == false)) security_url = url;
+ security_url = url;
browser.setAttribute("src", security_url);
browser.loadURI(security_url);
}catch(e){
@@ -234,22 +237,7 @@
}
function erp5admin_hideDashboard(){
- window.clearTimeout(sec_timeout);
dashboard.hidden = true;
- dashboard.stayhere = true;
- document.getElementById("erp5admin-stayhere").checked = true; // somehow it does not sync by itself
document.getElementById("erp5admin-dashboard-splitter").hidden = true;
security_url = false;
}
-
-function erp5admin_toggleStayHere(checkbox){
- dashboard.stayhere = checkbox.checked;
- if(!checkbox.checked){
- checkbox.label = " ATTENTION: if you uncheck this and go to a script's management tab it may be executed!!!";
- window.setTimeout(erp5admin_clearStayhereWarning, 3000);
- }
-}
-
-function erp5admin_clearStayhereWarning(){
- document.getElementById("erp5admin-stayhere").label = "Stay here (monitor security for this object)";
-}
More information about the Erp5-report
mailing list