[open-ils-commits] r16141 - in trunk/Open-ILS: web/opac/locale/en-US xul/staff_client/chrome/content/cat xul/staff_client/chrome/content/main xul/staff_client/chrome/content/util (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Apr 6 12:47:27 EDT 2010
Author: phasefx
Date: 2010-04-06 12:47:24 -0400 (Tue, 06 Apr 2010)
New Revision: 16141
Modified:
trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
trunk/Open-ILS/xul/staff_client/chrome/content/cat/opac.js
trunk/Open-ILS/xul/staff_client/chrome/content/main/menu.js
trunk/Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul
trunk/Open-ILS/xul/staff_client/chrome/content/main/menu_frame_overlay.xul
trunk/Open-ILS/xul/staff_client/chrome/content/util/browser.js
trunk/Open-ILS/xul/staff_client/chrome/content/util/browser.xul
trunk/Open-ILS/xul/staff_client/chrome/content/util/rbrowser.xul
Log:
move the browser progress meter next to the network progress meter and provide a toggle in the Admin menu. The org unit setting isn't wired up in trunk, but that's probably a good thing. still experimental
Modified: trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
===================================================================
--- trunk/Open-ILS/web/opac/locale/en-US/lang.dtd 2010-04-06 16:40:33 UTC (rev 16140)
+++ trunk/Open-ILS/web/opac/locale/en-US/lang.dtd 2010-04-06 16:47:24 UTC (rev 16141)
@@ -739,6 +739,8 @@
<!ENTITY staff.main.menu.admin.ping "Ping Server">
<!ENTITY staff.main.menu.admin.toggle_buttonbar.accesskey "B">
<!ENTITY staff.main.menu.admin.toggle_buttonbar.label "Toggle Button Bar">
+<!ENTITY staff.main.menu.admin.toggle_meters.accesskey "M">
+<!ENTITY staff.main.menu.admin.toggle_meters.label "Toggle Activity Meters">
<!ENTITY staff.main.menu.cat.accesskey "g">
<!ENTITY staff.main.menu.cat.add_bib.key "B">
<!ENTITY staff.main.menu.cat.add_bib.label "Add Bib Record">
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/cat/opac.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/cat/opac.js 2010-04-06 16:40:33 UTC (rev 16140)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/cat/opac.js 2010-04-06 16:47:24 UTC (rev 16141)
@@ -309,6 +309,7 @@
content_params.open_chrome_window = xulG.open_chrome_window;
content_params.url_prefix = xulG.url_prefix;
content_params.network_meter = xulG.network_meter;
+ content_params.page_meter = xulG.page_meter;
content_params.set_statusbar = xulG.set_statusbar;
if (opac_url) { content_params.url = opac_url; } else { content_params.url = xulG.url_prefix( urls.browser ); }
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/main/menu.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/main/menu.js 2010-04-06 16:40:33 UTC (rev 16140)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/main/menu.js 2010-04-06 16:47:24 UTC (rev 16141)
@@ -64,6 +64,8 @@
if (! network_meter) {
var x = document.getElementById('network_progress');
if (x) x.setAttribute('hidden','true');
+ var y = document.getElementById('page_progress');
+ if (y) y.setAttribute('hidden','true');
}
function open_conify_page(path, labelKey) {
@@ -486,6 +488,16 @@
}
],
+ 'cmd_toggle_meters' : [
+ ['oncommand'],
+ function() {
+ var x = document.getElementById('network_progress');
+ if (x) x.hidden = ! x.hidden;
+ var y = document.getElementById('page_progress');
+ if (y) y.hidden = ! y.hidden;
+ }
+ ],
+
'cmd_local_admin_reports' : [
['oncommand'],
function() {
@@ -1277,6 +1289,22 @@
}
},
+ 'page_meter' : {
+ 'node' : document.getElementById('page_progress'),
+ 'on' : function() {
+ document.getElementById('page_progress').setAttribute('mode','undetermined');
+ },
+ 'off' : function() {
+ document.getElementById('page_progress').setAttribute('mode','determined');
+ },
+ 'tooltip' : function(text) {
+ if (text || text == '') {
+ document.getElementById('page_progress').setAttribute('tooltiptext',text);
+ }
+ return document.getElementById('page_progress').getAttribute('tooltiptext');
+ }
+ },
+
'network_meter' : {
'inc' : function(app,method) {
try {
@@ -1398,6 +1426,7 @@
content_params.open_chrome_window = function(a,b,c) { return xulG.window.open(a,b,c); };
content_params.url_prefix = function(url) { return obj.url_prefix(url); };
content_params.network_meter = obj.network_meter;
+ content_params.page_meter = obj.page_meter;
content_params.set_statusbar = function(slot,text) {
var e = document.getElementById('statusbarpanel'+slot);
if (e) { e.setAttribute('label',text); }
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul 2010-04-06 16:40:33 UTC (rev 16140)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul 2010-04-06 16:47:24 UTC (rev 16141)
@@ -57,6 +57,7 @@
<command id="cmd_download_patrons" />
<command id="cmd_local_admin" />
<command id="cmd_toggle_buttonbar" />
+ <command id="cmd_toggle_meters" />
<command id="cmd_extension_manager"/>
<command id="cmd_theme_manager"/>
@@ -373,6 +374,7 @@
<menuseparator />
<menuitem label="&staff.main.menu.admin.user_edit.label;" accesskey="&staff.main.menu.admin.user_edit.accesskey;" command="cmd_adv_user_edit"/>
<menuitem label="&staff.main.menu.admin.toggle_buttonbar.label;" accesskey="&staff.main.menu.admin.toggle_buttonbar.accesskey;" command="cmd_toggle_buttonbar"/>
+ <menuitem label="&staff.main.menu.admin.toggle_meters.label;" accesskey="&staff.main.menu.admin.toggle_meters.accesskey;" command="cmd_toggle_meters"/>
<menuseparator />
<menu id="main.menu.admin.sub" accesskey="&staff.main.menu.admin.developer.accesskey;" label="&staff.main.menu.admin.developer.label;">
<menupopup id="main.menu.admin.sub.popup">
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/main/menu_frame_overlay.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/main/menu_frame_overlay.xul 2010-04-06 16:40:33 UTC (rev 16140)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/main/menu_frame_overlay.xul 2010-04-06 16:47:24 UTC (rev 16141)
@@ -47,7 +47,8 @@
<statusbarpanel id="statusbarpanel4"/>
<statusbarpanel id="statusbarpanel5"/>
<spacer flex="1" />
- <progressmeter id="network_progress" flex="1" mode="determined" value="0" tooltip="network_progress_tip"/>
+ <progressmeter id="network_progress" flex="0" mode="determined" value="0" tooltip="network_progress_tip"/>
+ <progressmeter id="page_progress" flex="0" mode="determined" value="0" />
<statusbarpanel />
</statusbar>
<tooltip id="network_progress_tip" noautohide="true">
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/util/browser.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/util/browser.js 2010-04-06 16:40:33 UTC (rev 16140)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/util/browser.js 2010-04-06 16:47:24 UTC (rev 16141)
@@ -233,18 +233,18 @@
const nsIWebProgressListener = Components.interfaces.nsIWebProgressListener;
const nsIChannel = Components.interfaces.nsIChannel;
////// handle the throbber
- var throbber = document.getElementById('throbber');
+ var throbber = xulG.page_meter;
if (throbber) {
var busy = false;
if (!(stateFlags & nsIWebProgressListener.STATE_RESTORING)) {
busy = true;
- throbber.setAttribute('mode','undetermined');
+ throbber.on();
}
if (stateFlags & nsIWebProgressListener.STATE_STOP) {
busy = false;
setTimeout(
function() {
- if (!busy) { throbber.setAttribute('mode','determined'); }
+ if (!busy) { throbber.off(); }
}, 2000
);
}
@@ -298,7 +298,7 @@
s += ('\tSTATE_STOP\n');
}
//obj.error.sdump('D_BROWSER',s);
- if (throbber) { throbber.setAttribute('tooltiptext',s); }
+ if (throbber) { throbber.tooltip(s); }
} catch(E) {
obj.error.sdump('D_ERROR','util.browser.progresslistener.onstatechange: ' + (E));
}
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/util/browser.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/util/browser.xul 2010-04-06 16:40:33 UTC (rev 16140)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/util/browser.xul 2010-04-06 16:47:24 UTC (rev 16141)
@@ -111,7 +111,6 @@
<button id="reload" command="cmd_reload" disabled="false" hidden="false"/>
<button id="forward" command="cmd_forward" disabled="true" hidden="true"/>
<spacer flex="1"/>
- <progressmeter id="throbber" mode="determined" flex="1"/>
<label id="debug" value="Debug" disabled="true" command="cmd_debug" onclick="this.doCommand();" />
<button id="browser_print" label="Print Page" command="cmd_print" hidden="true"/>
</hbox>
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/util/rbrowser.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/util/rbrowser.xul 2010-04-06 16:40:33 UTC (rev 16140)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/util/rbrowser.xul 2010-04-06 16:47:24 UTC (rev 16141)
@@ -112,7 +112,6 @@
<button id="reload" command="cmd_reload" disabled="false" hidden="false"/>
<button id="forward" command="cmd_forward" disabled="true" hidden="true"/>
<spacer flex="1"/>
- <progressmeter id="throbber" mode="determined" flex="1"/>
<label id="debug" value="Debug" disabled="true" command="cmd_debug" onclick="this.doCommand();" />
<button id="browser_print" label="Print Page" oldcommand="cmd_print" hidden="true"
oncommand="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (g.browser.alt_print) { JSAN.use('util.print'); var p = new util.print(); p.NSPrint(g.browser.get_content(),false,{}); } else { g.browser.get_content().print(); }"
More information about the open-ils-commits
mailing list