Magic Control+Alt+F7 Key for debugging
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 12 Nov 2009 05:16:44 +0000 (05:16 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 12 Nov 2009 05:16:44 +0000 (05:16 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@14878 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/OpenILS/util_overlay.xul

index 135088b..857f832 100644 (file)
         <messagecatalog id="commonStrings" src='/xul/server/locale/<!--#echo var="locale"-->/common.properties'/>
         <messagecatalog id="offlineStrings" src='/xul/server/locale/<!--#echo var="locale"-->/offline.properties'/>
         <messagecatalog id="authStrings" src='/xul/server/locale/<!--#echo var="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,alt" 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>