[open-ils-commits] r11675 - in trunk/Open-ILS/xul/staff_client: . chrome/content/auth chrome/content/main chrome/locale/en-US server/locale/en-US server/main
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Dec 23 16:41:41 EST 2008
Author: phasefx
Date: 2008-12-23 16:41:37 -0500 (Tue, 23 Dec 2008)
New Revision: 11675
Added:
trunk/Open-ILS/xul/staff_client/server/main/verify_credentials.js
trunk/Open-ILS/xul/staff_client/server/main/verify_credentials.xul
Removed:
trunk/Open-ILS/xul/staff_client/chrome/content/auth/verify_credentials.js
trunk/Open-ILS/xul/staff_client/chrome/content/auth/verify_credentials.xul
Modified:
trunk/Open-ILS/xul/staff_client/Makefile.am
trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js
trunk/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties
trunk/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties
Log:
Move this from chrome to remote, where it belongs
Modified: trunk/Open-ILS/xul/staff_client/Makefile.am
===================================================================
--- trunk/Open-ILS/xul/staff_client/Makefile.am 2008-12-23 21:38:26 UTC (rev 11674)
+++ trunk/Open-ILS/xul/staff_client/Makefile.am 2008-12-23 21:41:37 UTC (rev 11675)
@@ -34,7 +34,6 @@
# Convert chrome to remote for server localization
chrome2remote:
- @sed -i 's/chrome:\/\/open_ils_staff_client\/locale\//\/xul\/server\/locale\/<\!--#echo var=locale-->\//' build/server/auth/verify_credentials.xul
@sed -i 's/chrome:\/\/open_ils_staff_client\/locale\//\/xul\/server\/locale\/<\!--#echo var=locale-->\//' build/server/main/simple_auth.xul
@for loc in $(CHROME_LOCALES); do \
cp -fr chrome/locale/$$loc build/server/locale/. ; \
Deleted: trunk/Open-ILS/xul/staff_client/chrome/content/auth/verify_credentials.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/auth/verify_credentials.js 2008-12-23 21:38:26 UTC (rev 11674)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/auth/verify_credentials.js 2008-12-23 21:41:37 UTC (rev 11675)
@@ -1,104 +0,0 @@
-function verify_init() {
- try {
- offlineStrings = document.getElementById('offlineStrings');
-
- if (typeof JSAN == 'undefined') {
- throw(
- offlineStrings.getString('common.jsan.missing')
- );
- }
-
- JSAN.errorLevel = "die"; // none, warn, or die
- JSAN.addRepository('..');
-
- JSAN.use('OpenILS.data'); var data = new OpenILS.data(); data.stash_retrieve();
- XML_HTTP_SERVER = data.server_unadorned;
-
- JSAN.use('util.network'); var net = new util.network();
- document.getElementById('cmd_verify').addEventListener(
- 'command',
- function() {
- try {
- var barcode = document.getElementById('barcode_prompt').value;
- var name = document.getElementById('name_prompt').value;
- var password = document.getElementById('password_prompt').value;
- var req = net.simple_request(
- 'AUTH_VERIFY_CREDENTIALS',
- [
- ses(),
- barcode,
- name,
- hex_md5( password )
- ]
- );
-
- if (typeof req.ilsevent != 'undefined') { throw(req); }
-
- var msg_area = document.getElementById('messages');
- var hbox = document.createElement('hbox'); msg_area.insertBefore(hbox, msg_area.firstChild);
- var success_msg = document.createElement('description'); hbox.appendChild(success_msg);
- success_msg.setAttribute('class', String(req) == '1' ? 'success_text' : 'failure_text');
- success_msg.appendChild(
- document.createTextNode(
- String(req) == '1' ?
- offlineStrings.getString('menu.cmd_verify_credentials.correct_credentials') :
- offlineStrings.getString('menu.cmd_verify_credentials.incorrect_credentials')
- )
- );
- var name_msg = document.createElement('description'); hbox.appendChild(name_msg);
- name_msg.appendChild(
- document.createTextNode(
- offlineStrings.getFormattedString('menu.cmd_verify_credentials.name_feedback',[name])
- )
- );
- var barcode_msg = document.createElement('description'); hbox.appendChild(barcode_msg);
- barcode_msg.appendChild(
- document.createTextNode(
- offlineStrings.getFormattedString('menu.cmd_verify_credentials.barcode_feedback',[barcode])
- )
- );
- var date_msg = document.createElement('description'); hbox.appendChild(date_msg);
- date_msg.appendChild(
- document.createTextNode(
- new Date()
- )
- );
-
-
- } catch(E) {
- alert(E);
- }
- document.getElementById('name_prompt').focus();
- },
- false
- );
- document.getElementById('cmd_retrieve').addEventListener(
- 'command',
- function() {
- var barcode = document.getElementById('barcode_prompt').value;
- var name = document.getElementById('name_prompt').value;
- var req = net.simple_request(
- 'FM_AU_ID_RETRIEVE_VIA_BARCODE_OR_USERNAME',
- [
- ses(),
- barcode,
- name
- ]
- );
- if (typeof req.ilsevent != 'undefined') {
- alert (req.desc);
- document.getElementById('name_prompt').focus();
- } else {
- var url = xulG.url_prefix( urls.XUL_PATRON_DISPLAY );
- xulG.set_tab( url, {}, { 'id' : req } );
- }
- },
- false
- );
-
- document.getElementById('name_prompt').focus();
-
- } catch(E) {
- alert(E);
- }
-}
Deleted: trunk/Open-ILS/xul/staff_client/chrome/content/auth/verify_credentials.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/auth/verify_credentials.xul 2008-12-23 21:38:26 UTC (rev 11674)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/auth/verify_credentials.xul 2008-12-23 21:41:37 UTC (rev 11675)
@@ -1,80 +0,0 @@
-<?xml version="1.0"?>
-<!-- Application: Evergreen Staff Client -->
-<!-- Screen: Verify Credentials -->
-
-<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
-<!-- PRESENTATION -->
-<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
-<?xml-stylesheet href="chrome://open_ils_staff_client/skin/global.css" type="text/css"?>
-<?xml-stylesheet href="chrome://open_ils_staff_client/skin/auth.css" type="text/css"?>
-
-<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
-<!-- LOCALIZATION -->
-<!DOCTYPE window SYSTEM "chrome://open_ils_staff_client/locale/lang.dtd">
-
-<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
-<!-- OVERLAYS -->
-
-<window id="verify_win" onload="try { verify_init(); } catch(E) { alert(E); }"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
- <!-- BEHAVIOR -->
- <script type="text/javascript">var myPackageDir = 'open_ils_staff_client'; var IAMXUL = true; var G;</script>
- <scripts id="openils_util_scripts">
- <script type="text/javascript" src="../main/constants.js" />
- <script type="text/javascript" src="../OpenILS/util/utils.js" />
- <script type="text/javascript" src="../OpenILS/util/CGI.js" />
- <script type="text/javascript" src="../OpenILS/util/md5.js" />
- <script type="text/javascript" src="../OpenILS/util/JSON_v1.js" />
- <script type="text/javascript" src="../OpenILS/util/RemoteRequest.js" />
- <script type="text/javascript" src="../OpenILS/util/org_utils.js" />
- <script type="text/javascript" src="../OpenILS/global_util.js" />
- </scripts>
-
- <script type="text/javascript" src="chrome://open_ils_staff_client/content/main/JSAN.js"/>
- <script type="text/javascript" src="chrome://open_ils_staff_client/content/auth/verify_credentials.js"/>
-
- <messagecatalog id="authStrings" src="chrome://open_ils_staff_client/locale/auth.properties"/>
- <messagecatalog id="offlineStrings" src="chrome://open_ils_staff_client/locale/offline.properties"/>
-
- <commandset id="verify_cmds">
- <command id="cmd_verify" />
- <command id="cmd_retrieve" />
- </commandset>
-
- <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
- <!-- CONTENT -->
- <groupbox id="verify_groupbox" flex="1" style="overflow: auto;">
- <caption id="verify_caption" label="&staff.auth.verify.caption;"/>
- <grid>
- <columns> <column /> <column /> </columns>
- <rows>
- <row>
- <label value="&common.username;" control="name_prompt" accesskey="&common.username.accesskey;"/>
- <textbox id="name_prompt" value=""/>
- </row>
- <row>
- <label value="&common.barcode;" control="barcode_prompt" accesskey="&common.barcode.accesskey;"/>
- <textbox id="barcode_prompt" value=""/>
- </row>
- <row>
- <label value="&common.password;" control="password_prompt" accesskey="&common.password.accesskey;"/>
- <textbox id="password_prompt" value="" type="password"/>
- </row>
- <row>
- <spacer />
- <hbox>
- <button id="submit_button" command="cmd_verify" label="&staff.auth.verify.submit.label;" accesskey="&staff.auth.verify.submit.accesskey;" />
- <button id="retrieve_button" command="cmd_retrieve" label="&staff.auth.verify.retrieve.label;" accesskey="&staff.auth.verify.retrieve.accesskey;" />
- </hbox>
- </row>
- </rows>
- </grid>
- <vbox id="messages" flex="1" class="my_overflow">
- <label id="footer"/>
- </vbox>
- </groupbox>
-
-</window>
-
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js 2008-12-23 21:38:26 UTC (rev 11674)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js 2008-12-23 21:41:37 UTC (rev 11675)
@@ -309,7 +309,7 @@
'XUL_STAT_CAT_EDIT' : '/xul/server/admin/stat_cat_editor.xhtml',
'XUL_SURVEY_WIZARD' : 'chrome://open_ils_staff_client/content/admin/survey_wizard.xul',
'XUL_USER_BUCKETS' : '/xul/server/patron/user_buckets.xul',
- 'XUL_VERIFY_CREDENTIALS' : 'chrome://open_ils_staff_client/content/auth/verify_credentials.xul',
+ 'XUL_VERIFY_CREDENTIALS' : '/xul/server/main/verify_credentials.xul',
'XUL_VOLUME_BUCKETS' : '/xul/server/cat/volume_buckets.xul',
'XUL_VOLUME_COPY_CREATOR' : '/xul/server/cat/volume_copy_creator.xul',
'XUL_VOLUME_EDITOR' : '/xul/server/cat/volume_editor.xul',
Modified: trunk/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties 2008-12-23 21:38:26 UTC (rev 11674)
+++ trunk/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties 2008-12-23 21:41:37 UTC (rev 11675)
@@ -131,12 +131,8 @@
menu.cmd_extension_manager.tab=Extension Manager
menu.cmd_theme_manager.tab=Theme Manager
menu.cmd_shutdown.prompt=Exit Evergreen completely?
-menu.cmd_verify_credentials.tabname=Verify Credentials
-menu.cmd_verify_credentials.correct_credentials=Success testing credentials!
-menu.cmd_verify_credentials.incorrect_credentials=Failure testing credentials!
-menu.cmd_verify_credentials.name_feedback=Username: <%1$s>
-menu.cmd_verify_credentials.barcode_feedback=Barcode: <%1$s>
menu.spawn_search.msg=Editor would like to search for: %1$s
+menu.cmd_verify_credentials.tabname=Verify Credentials
menu.close_all_tabs.error=Error closing all tabs
menu.new_tab.tab=Tab
main.session_cookie.error=Error setting session cookie: %1$s
Modified: trunk/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties 2008-12-23 21:38:26 UTC (rev 11674)
+++ trunk/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties 2008-12-23 21:41:37 UTC (rev 11675)
@@ -249,5 +249,9 @@
staff.patron.user_edit.save_user.depth_required=Depth is required on the %1$s permission.
staff.patron.user_edit.save_user.user_modified_successfully=User %1$s [%2$s] successfully modified.\n%3$s permissions and %4$s work locations updated.
staff.patron.user_edit.display_perm.select_one=-- Select One --
+staff.patron.cmd_verify_credentials.correct_credentials=Success testing credentials!
+staff.patron.cmd_verify_credentials.incorrect_credentials=Failure testing credentials!
+staff.patron.cmd_verify_credentials.name_feedback=Username: <%1$s>
+staff.patron.cmd_verify_credentials.barcode_feedback=Barcode: <%1$s>
web.staff.patron.ue.session_no_defined=User session is not defined
web.staff.patron.ue.uedit_show_search.search_would_be=Search would be:\n%1$s
Copied: trunk/Open-ILS/xul/staff_client/server/main/verify_credentials.js (from rev 11672, trunk/Open-ILS/xul/staff_client/chrome/content/auth/verify_credentials.js)
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/main/verify_credentials.js (rev 0)
+++ trunk/Open-ILS/xul/staff_client/server/main/verify_credentials.js 2008-12-23 21:41:37 UTC (rev 11675)
@@ -0,0 +1,105 @@
+function verify_init() {
+ try {
+ commonStrings = document.getElementById('commonStrings');
+ patronStrings = document.getElementById('patronStrings');
+
+ if (typeof JSAN == 'undefined') {
+ throw(
+ commonStrings.getString('common.jsan.missing')
+ );
+ }
+
+ JSAN.errorLevel = "die"; // none, warn, or die
+ JSAN.addRepository('..');
+
+ JSAN.use('OpenILS.data'); var data = new OpenILS.data(); data.stash_retrieve();
+ XML_HTTP_SERVER = data.server_unadorned;
+
+ JSAN.use('util.network'); var net = new util.network();
+ document.getElementById('cmd_verify').addEventListener(
+ 'command',
+ function() {
+ try {
+ var barcode = document.getElementById('barcode_prompt').value;
+ var name = document.getElementById('name_prompt').value;
+ var password = document.getElementById('password_prompt').value;
+ var req = net.simple_request(
+ 'AUTH_VERIFY_CREDENTIALS',
+ [
+ ses(),
+ barcode,
+ name,
+ hex_md5( password )
+ ]
+ );
+
+ if (typeof req.ilsevent != 'undefined') { throw(req); }
+
+ var msg_area = document.getElementById('messages');
+ var hbox = document.createElement('hbox'); msg_area.insertBefore(hbox, msg_area.firstChild);
+ var success_msg = document.createElement('description'); hbox.appendChild(success_msg);
+ success_msg.setAttribute('class', String(req) == '1' ? 'success_text' : 'failure_text');
+ success_msg.appendChild(
+ document.createTextNode(
+ String(req) == '1' ?
+ patronStrings.getString('staff.patron.cmd_verify_credentials.correct_credentials') :
+ patronStrings.getString('staff.patron.cmd_verify_credentials.incorrect_credentials')
+ )
+ );
+ var name_msg = document.createElement('description'); hbox.appendChild(name_msg);
+ name_msg.appendChild(
+ document.createTextNode(
+ patronStrings.getFormattedString('staff.patron.cmd_verify_credentials.name_feedback',[name])
+ )
+ );
+ var barcode_msg = document.createElement('description'); hbox.appendChild(barcode_msg);
+ barcode_msg.appendChild(
+ document.createTextNode(
+ patronStrings.getFormattedString('staff.patron.cmd_verify_credentials.barcode_feedback',[barcode])
+ )
+ );
+ var date_msg = document.createElement('description'); hbox.appendChild(date_msg);
+ date_msg.appendChild(
+ document.createTextNode(
+ new Date()
+ )
+ );
+
+
+ } catch(E) {
+ alert(E);
+ }
+ document.getElementById('name_prompt').focus();
+ },
+ false
+ );
+ document.getElementById('cmd_retrieve').addEventListener(
+ 'command',
+ function() {
+ var barcode = document.getElementById('barcode_prompt').value;
+ var name = document.getElementById('name_prompt').value;
+ var req = net.simple_request(
+ 'FM_AU_ID_RETRIEVE_VIA_BARCODE_OR_USERNAME',
+ [
+ ses(),
+ barcode,
+ name
+ ]
+ );
+ if (typeof req.ilsevent != 'undefined') {
+ alert (req.desc);
+ document.getElementById('name_prompt').focus();
+ } else {
+ var url = xulG.url_prefix( urls.XUL_PATRON_DISPLAY );
+ xulG.set_tab( url, {}, { 'id' : req } );
+ }
+ },
+ false
+ );
+
+ document.getElementById('name_prompt').focus();
+
+ } catch(E) {
+ alert(E);
+ }
+}
Copied: trunk/Open-ILS/xul/staff_client/server/main/verify_credentials.xul (from rev 11672, trunk/Open-ILS/xul/staff_client/chrome/content/auth/verify_credentials.xul)
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/main/verify_credentials.xul (rev 0)
+++ trunk/Open-ILS/xul/staff_client/server/main/verify_credentials.xul 2008-12-23 21:41:37 UTC (rev 11675)
@@ -0,0 +1,74 @@
+<?xml version="1.0"?>
+<!-- Application: Evergreen Staff Client -->
+<!-- Screen: Verify Credentials -->
+
+<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
+<!-- PRESENTATION -->
+<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
+<?xml-stylesheet href="chrome://open_ils_staff_client/skin/global.css" type="text/css"?>
+<?xml-stylesheet href="/xul/server/skin/global.css" type="text/css"?>
+
+<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
+<!-- LOCALIZATION -->
+<!DOCTYPE window PUBLIC "" ""[
+ <!--#include virtual="/opac/locale/${locale}/lang.dtd"-->
+]>
+
+<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
+<!-- OVERLAYS -->
+<?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
+
+<window id="verify_win" onload="try { verify_init(); } catch(E) { alert(E); }"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+ <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
+ <!-- BEHAVIOR -->
+ <script type="text/javascript">var myPackageDir = 'open_ils_staff_client'; var IAMXUL = true; var G;</script>
+ <scripts id="openils_util_scripts"/>
+
+ <script type="text/javascript" src="/xul/server/main/JSAN.js"/>
+ <script type="text/javascript" src="verify_credentials.js"/>
+
+ <messagecatalog id="commonStrings" src="/xul/server/locale/<!--#echo var='locale'-->/common.properties" />
+ <messagecatalog id="patronStrings" src="/xul/server/locale/<!--#echo var='locale'-->/patron.properties" />
+
+ <commandset id="verify_cmds">
+ <command id="cmd_verify" />
+ <command id="cmd_retrieve" />
+ </commandset>
+
+ <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
+ <!-- CONTENT -->
+ <groupbox id="verify_groupbox" flex="1" style="overflow: auto;">
+ <caption id="verify_caption" label="&staff.auth.verify.caption;"/>
+ <grid>
+ <columns> <column /> <column /> </columns>
+ <rows>
+ <row>
+ <label value="&common.username;" control="name_prompt" accesskey="&common.username.accesskey;"/>
+ <textbox id="name_prompt" value=""/>
+ </row>
+ <row>
+ <label value="&common.barcode;" control="barcode_prompt" accesskey="&common.barcode.accesskey;"/>
+ <textbox id="barcode_prompt" value=""/>
+ </row>
+ <row>
+ <label value="&common.password;" control="password_prompt" accesskey="&common.password.accesskey;"/>
+ <textbox id="password_prompt" value="" type="password"/>
+ </row>
+ <row>
+ <spacer />
+ <hbox>
+ <button id="submit_button" command="cmd_verify" label="&staff.auth.verify.submit.label;" accesskey="&staff.auth.verify.submit.accesskey;" />
+ <button id="retrieve_button" command="cmd_retrieve" label="&staff.auth.verify.retrieve.label;" accesskey="&staff.auth.verify.retrieve.accesskey;" />
+ </hbox>
+ </row>
+ </rows>
+ </grid>
+ <vbox id="messages" flex="1" class="my_overflow">
+ <label id="footer"/>
+ </vbox>
+ </groupbox>
+
+</window>
+
More information about the open-ils-commits
mailing list