[open-ils-commits] r16456 - trunk/Open-ILS/xul/staff_client/chrome/content/OpenILS (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu May 20 00:53:54 EDT 2010
Author: phasefx
Date: 2010-05-20 00:53:50 -0400 (Thu, 20 May 2010)
New Revision: 16456
Modified:
trunk/Open-ILS/xul/staff_client/chrome/content/OpenILS/util_overlay_chrome.xul
trunk/Open-ILS/xul/staff_client/chrome/content/OpenILS/util_overlay_offline.xul
Log:
add magic debug controls to chrome interfaces
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/OpenILS/util_overlay_chrome.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/OpenILS/util_overlay_chrome.xul 2010-05-20 01:25:15 UTC (rev 16455)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/OpenILS/util_overlay_chrome.xul 2010-05-20 04:53:50 UTC (rev 16456)
@@ -17,6 +17,15 @@
<script type="text/javascript" src="global_util.js" />
<messagecatalog id="offlineStrings" src='chrome://open_ils_staff_client/locale/offline.properties'/>
<messagecatalog id="authStrings" src='chrome://open_ils_staff_client/locale/auth.properties'/>
+ <hbox id="debug_box" hidden="true" flex="1" style="border: red thin dashed">
+ <label value="Debug:" />
+ <textbox id="debug_tb" flex="1"/>
+ <button label="Execute" oncommand="try { var dtb = document.getElementById('debug_tb'); alert( eval( dtb.value ) ); } catch(E) { alert(E); }; dtb.focus();"/>
+ <button label="Inspect" oncommand="try { var dtb = document.getElementById('debug_tb'); var dx = eval( dtb.value ); var ds = ''; for (var di in dx) { ds += di + '=' + dx[di] + '\r\n'; }; window.open('data:text/plain;charset=UTF-8,'+window.escape(ds),'debug_win','chrome,resizable,modal'); } catch(E) { alert(E); }; dtb.focus();"/>
+ <button label="js2JSON" oncommand="try { var dtb = document.getElementById('debug_tb'); alert( js2JSON( eval( dtb.value ) ) ); } catch(E) { alert(E); }; dtb.focus();"/>
+ </hbox>
+ <keyset><key id="debug_box_key" keycode="VK_F7" modifiers="control,shift" oncommand="var dtb = document.getElementById('debug_tb'); var dx = document.getElementById('debug_box'); dx.hidden = !dx.hidden; if (!dx.hidden) dtb.focus();"/></keyset>
+
<script>dump('finished openils_util_overlay\n');</script>
</scripts>
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/OpenILS/util_overlay_offline.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/OpenILS/util_overlay_offline.xul 2010-05-20 01:25:15 UTC (rev 16455)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/OpenILS/util_overlay_offline.xul 2010-05-20 04:53:50 UTC (rev 16456)
@@ -12,6 +12,15 @@
<script type="text/javascript" src="util/md5.js" />
<script type="text/javascript" src="util/JSON_v1.js" />
<script type="text/javascript" src="global_util.js" />
+ <hbox id="debug_box" hidden="true" flex="1" style="border: red thin dashed">
+ <label value="Debug:" />
+ <textbox id="debug_tb" flex="1"/>
+ <button label="Execute" oncommand="try { var dtb = document.getElementById('debug_tb'); alert( eval( dtb.value ) ); } catch(E) { alert(E); }; dtb.focus();"/>
+ <button label="Inspect" oncommand="try { var dtb = document.getElementById('debug_tb'); var dx = eval( dtb.value ); var ds = ''; for (var di in dx) { ds += di + '=' + dx[di] + '\r\n'; }; window.open('data:text/plain;charset=UTF-8,'+window.escape(ds),'debug_win','chrome,resizable,modal'); } catch(E) { alert(E); }; dtb.focus();"/>
+ <button label="js2JSON" oncommand="try { var dtb = document.getElementById('debug_tb'); alert( js2JSON( eval( dtb.value ) ) ); } catch(E) { alert(E); }; dtb.focus();"/>
+ </hbox>
+ <keyset><key id="debug_box_key" keycode="VK_F7" modifiers="control,shift" oncommand="var dtb = document.getElementById('debug_tb'); var dx = document.getElementById('debug_box'); dx.hidden = !dx.hidden; if (!dx.hidden) dtb.focus();"/></keyset>
+
</scripts>
<script>dump('Loaded OpenILS/util_overlay_offline.xul\n');</script>
More information about the open-ils-commits
mailing list