[open-ils-commits] [GIT] Evergreen ILS branch master updated. e0623504fb0466ea4c121df3d124e082cb13762f

Evergreen Git git at git.evergreen-ils.org
Wed Mar 13 14:16:27 EDT 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  e0623504fb0466ea4c121df3d124e082cb13762f (commit)
       via  f483d430ad87ddacce775322b48284087cd62ac1 (commit)
      from  ba4d0aeadbaab20763d665e2c8c1ad0c76be5256 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit e0623504fb0466ea4c121df3d124e082cb13762f
Author: Thomas Berezansky <tsbere at mvlc.org>
Date:   Wed Apr 25 11:55:42 2012 -0400

    Default and force patrons to TPac
    
    May be incomplete, but better than nothing.
    
    Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
    Signed-off-by: Ben Shum <bshum at biblio.org>
    Signed-off-by: Mike Rylander <mrylander at gmail.com>

diff --git a/Open-ILS/examples/apache/eg_vhost.conf.in b/Open-ILS/examples/apache/eg_vhost.conf.in
index 26b0485..60605b3 100644
--- a/Open-ILS/examples/apache/eg_vhost.conf.in
+++ b/Open-ILS/examples/apache/eg_vhost.conf.in
@@ -6,7 +6,7 @@
 # ----------------------------------------------------------------------------------
 # Point / to the opac - if you have a custom skin or locale, point at it here
 # ----------------------------------------------------------------------------------
-RedirectMatch 301 ^/$ /opac/en-US/skin/default/xml/index.xml
+RedirectMatch 301 ^/$ /eg/opac/home
 
 # ----------------------------------------------------------------------------------
 # Point / to the IP address redirector
@@ -87,6 +87,50 @@ RewriteCond %{REQUEST_URI} ^/opac/(.*?)/
 RewriteRule . - [E=locale:%1]
 
 # ----------------------------------------------------------------------------------
+# Rewrite JSPac->TPac with redirects
+# ----------------------------------------------------------------------------------
+
+# First things first, extract useful data
+# And we are going to start with a "this is the JSPac" check on each of these:
+# RewriteCond %{REQUEST_URI} ^/?opac/
+
+# Basic (overall) search type, if present
+# I am cheating and grabbing RT or TP because I dunno the difference between them.
+RewriteCond %{REQUEST_URI} ^/opac/
+RewriteCond %{QUERY_STRING} (^|[^0-9a-zA-Z])(rt|tp)=([^;&]*)
+RewriteRule . - [E=OILS_JSPAC_SEARCH_TYPE:qtype=%3;]
+
+# Basic (overall) search term(s), if present - NOTE: Not doing advanced search.
+RewriteCond %{REQUEST_URI} ^/opac/
+RewriteCond %{QUERY_STRING} (^|[^0-9a-zA-Z])t=([^;&]*)
+RewriteRule . - [E=OILS_JSPAC_SEARCH_TERMS:query=%2;]
+
+# Search Location, if present
+RewriteCond %{REQUEST_URI} ^/opac/
+RewriteCond %{QUERY_STRING} (^|[^0-9a-zA-Z])l=([^;&]*)
+RewriteRule . - [E=OILS_JSPAC_SEARCH_LOCATION:locg=%2;]
+
+# My Account
+RewriteRule /opac/[^/]*/skin/default/xml/myopac.xml /eg/opac/myopac/main?%{ENV:OILS_JSPAC_SEARCH_TYPE}%{ENV:OILS_JSPAC_SEARCH_TERMS}%{ENV:OILS_JSPAC_SEARCH_LOCATION} [NE,R,L]
+
+# Record Pages
+# /opac/en-US/skin/default/xml/rdetail.xml?r=32 -> /eg/opac/record/32
+RewriteCond %{QUERY_STRING} (^|[^0-9a-zA-Z])r=([^;&]*)
+RewriteRule /opac/.*/rdetail.xml /eg/opac/record/%2?%{ENV:OILS_JSPAC_SEARCH_TYPE}%{ENV:OILS_JSPAC_SEARCH_TERMS}%{ENV:OILS_JSPAC_SEARCH_LOCATION} [NE,R,L]
+
+# Bookbag Pages
+# /opac/extras/feed/bookbag/html-full/1 -> /eg/opac/results?bookbag=1;page=0;locg=1;depth=0
+RewriteRule /opac/extras/feed/bookbag/html-full/(\d*) /eg/opac/results?bookbag=$1;%{ENV:OILS_JSPAC_SEARCH_TYPE}%{ENV:OILS_JSPAC_SEARCH_TERMS}%{ENV:OILS_JSPAC_SEARCH_LOCATION} [NE,R,L]
+
+# Search Results Pages
+RewriteRule /opac/[^/]*/skin/[^/]*/xml/rresult.xml /eg/opac/results?%{ENV:OILS_JSPAC_SEARCH_TYPE}%{ENV:OILS_JSPAC_SEARCH_TERMS}%{ENV:OILS_JSPAC_SEARCH_LOCATION} [NE,R,L]
+
+# Basic Search (STILL not doing advanced)
+# Fallback! But only for things that end in xml, htm, or html
+# Images, CSS, etc can stick around.
+RewriteRule /opac/[^/]*/skin/.*(xml|htm|html|/)$ /eg/opac/home?%{ENV:OILS_JSPAC_SEARCH_TYPE}%{ENV:OILS_JSPAC_SEARCH_TERMS}%{ENV:OILS_JSPAC_SEARCH_LOCATION} [NE,R,L]
+
+# ----------------------------------------------------------------------------------
 # For sanity reasons, default indexes to Off
 # ----------------------------------------------------------------------------------
 Options -Indexes

commit f483d430ad87ddacce775322b48284087cd62ac1
Author: Thomas Berezansky <tsbere at mvlc.org>
Date:   Mon Sep 17 10:02:13 2012 -0400

    Disable JSPac in staff client
    
    This includes removing the toggle option for TPac usage.
    
    Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
    Signed-off-by: Ben Shum <bshum at biblio.org>
    Signed-off-by: Mike Rylander <mrylander at gmail.com>

diff --git a/Open-ILS/web/opac/locale/en-US/lang.dtd b/Open-ILS/web/opac/locale/en-US/lang.dtd
index 6f2543d..0f6b2fe 100644
--- a/Open-ILS/web/opac/locale/en-US/lang.dtd
+++ b/Open-ILS/web/opac/locale/en-US/lang.dtd
@@ -3645,9 +3645,6 @@
 <!ENTITY staff.client.portal.receipts.description "Edit Receipt Templates">
 <!ENTITY staff.client.portal.copyright "Copyright &copy; 2006-2012 Georgia Public Library Service, and others">
 <!ENTITY staff.client.portal.poweredby "Powered by">
-<!ENTITY staff.client.portal.toggle_tpac "Toggle Template Toolkit OPAC Use">
-<!ENTITY staff.client.portal.toggle_tpac.message_on "The use of the Template Toolkit OPAC has been enabled. You may need to restart the staff client for this to take effect.">
-<!ENTITY staff.client.portal.toggle_tpac.message_off "The use of the Template Toolkit OPAC has been disabled. You may need to restart the staff client for this to take effect.">
 <!ENTITY staff.client.portal.open_new_tab.description "Open in a new tab">
 <!ENTITY staff.client.portal.search.button "Search">
 <!ENTITY staff.item.batch.hold.groupbox_caption "Request Details">
diff --git a/Open-ILS/xul/staff_client/chrome/content/cat/opac.js b/Open-ILS/xul/staff_client/chrome/content/cat/opac.js
index a59d44f..a9b9f5a 100644
--- a/Open-ILS/xul/staff_client/chrome/content/cat/opac.js
+++ b/Open-ILS/xul/staff_client/chrome/content/cat/opac.js
@@ -604,17 +604,10 @@ function set_opac() {
         content_params.get_barcode = xulG.get_barcode;
         content_params.get_barcode_and_settings = xulG.get_barcode_and_settings;
 
-        var secure_opac = true; // default to secure
-        var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces['nsIPrefBranch']);
-        if (prefs.prefHasUserValue('oils.secure_opac')) {
-            secure_opac = prefs.getBoolPref('oils.secure_opac');
-        }
-        dump('secure_opac = ' + secure_opac + '\n');
-
         if (opac_url) {
-            content_params.url = xulG.url_prefix( opac_url, secure_opac );
+            content_params.url = xulG.url_prefix( opac_url, true );
         } else {
-            content_params.url = xulG.url_prefix( 'browser', secure_opac );
+            content_params.url = xulG.url_prefix( 'browser', true );
         }
         if (g.data.adv_pane) {
             // For fun, we can have no extra params, extra params with &, or extra params with ;.
diff --git a/Open-ILS/xul/staff_client/chrome/content/main/constants.js b/Open-ILS/xul/staff_client/chrome/content/main/constants.js
index 8ec44a8..3556c8c 100644
--- a/Open-ILS/xul/staff_client/chrome/content/main/constants.js
+++ b/Open-ILS/xul/staff_client/chrome/content/main/constants.js
@@ -25,13 +25,6 @@ if (!LOCALE) {
     LOCALE = 'en-US';
 }
 
-var use_tpac = false;
-try {
-    use_tpac = pref.getBoolPref('oils.use_tpac');
-} catch (E) {
-    dump("Failed to get TPac preference: " + E + "\n");
-}
-
 const MODE_RDONLY   = 0x01;
 const MODE_WRONLY   = 0x02;
 const MODE_CREATE   = 0x08;
@@ -379,12 +372,12 @@ var api = {
 
 var urls = {
 
-    'opac' : 'oils://remote/opac/' + LOCALE + '/skin/default/xml/advanced.xml?nps=1',
-    'opac_rdetail' : 'oils://remote/opac/' + LOCALE + '/skin/default/xml/rdetail.xml?r=',
-    'opac_rresult' : 'oils://remote/opac/' + LOCALE + '/skin/default/xml/rresult.xml',
-    'opac_rresult_metarecord' : 'oils://remote/opac/' + LOCALE + '/skin/default/xml/rresult.xml?m=',
+    'opac' : 'oils://remote/eg/opac/advanced',
+    'opac_rdetail' : 'oils://remote/eg/opac/record/',
+    'opac_rresult' : 'oils://remote/eg/opac/results',
+    'opac_rresult_metarecord' : 'oils://remote/eg/opac/results?metarecord=',
     'org_tree' : '/opac/common/js/' + LOCALE + '/OrgTree.js',
-    'browser' : 'oils://remote/opac/' + LOCALE + '/skin/default/xml/advanced.xml?nps=1',
+    'browser' : 'oils://remote/eg/opac/advanced',
     'fieldmapper' : '/opac/common/js/fmall.js',
     'xsl_marc2html' : '/opac/extras/xsl/oilsMARC21slim2HTML.xsl',
     'ac_jacket_small' : '/opac/extras/ac/jacket/small/',
@@ -525,12 +518,3 @@ var urls = {
     'EG_TRIGGER_EVENTS' : 'oils://remote/eg/actor/user/event_log',
     'XUL_SEARCH_PREFS' : 'chrome://open_ils_staff_client/content/main/search_prefs.xul'
 }
-
-if(use_tpac) {
-    urls['opac'] = 'oils://remote/eg/opac/advanced';
-    urls['opac_rdetail'] = 'oils://remote/eg/opac/record/';
-    urls['opac_rresult'] = 'oils://remote/eg/opac/results';
-    urls['opac_rresult_metarecord'] = 'oils://remote/eg/opac/results?metarecord=';
-    urls['browser'] = urls.opac;
-    pref.setBoolPref('oils.secure_opac',true);
-}
diff --git a/Open-ILS/xul/staff_client/defaults/preferences/prefs.js b/Open-ILS/xul/staff_client/defaults/preferences/prefs.js
index 6352b6e..0613a13 100644
--- a/Open-ILS/xul/staff_client/defaults/preferences/prefs.js
+++ b/Open-ILS/xul/staff_client/defaults/preferences/prefs.js
@@ -27,9 +27,6 @@ pref("open-ils.menu.toolbar.mode", "");
 pref("open-ils.menu.toolbar.labelbelow", false);
 pref("open-ils.toolbar.defaultnewtab", false);
 
-// Template Toolkit Opac Enabled in Staff Client
-pref("oils.use_tpac", false);
-
 // Copy location name first in copy editor
 pref("oils.copy_editor.copy_location_name_first", false);
 
diff --git a/Open-ILS/xul/staff_client/server/index.xhtml b/Open-ILS/xul/staff_client/server/index.xhtml
index 03bc29c..fafe2a1 100644
--- a/Open-ILS/xul/staff_client/server/index.xhtml
+++ b/Open-ILS/xul/staff_client/server/index.xhtml
@@ -248,23 +248,6 @@
                         else
                                 xulG.set_tab(loc, {}, content_params);
                 }
-                function toggle_tpac(mode) {
-                    var use_tpac = false;
-                    var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces['nsIPrefBranch']);
-                    try {
-                        use_tpac = prefs.getBoolPref('oils.use_tpac');
-                    } catch (E) {
-                        dump('Failed to get current use_tpac setting - Assuming false: ' + E);
-                    }
-                    use_tpac = !use_tpac;
-                    prefs.setBoolPref('oils.use_tpac', use_tpac);
-                    var message = document.getElementById('tpac_toggled_on');
-                    if(!use_tpac) {
-                        message = document.getElementById('tpac_toggled_off');
-                    }
-                    message = message.textContent;
-                    alert(message);
-                }
                 // ]]>
   </script>
   <style type="text/css">
@@ -554,18 +537,8 @@
               "#" onclick=
               "try { receipt_editor(false); } catch(E) { alert(E); }; return false;">&staff.client.portal.receipts;</a></td>
             </tr>
-
-            <tr>
-              <td height="50"><img src="skin/media/images/portal/book.png" height="48" width="48"
-              onclick="try { toggle_tpac(); } catch(E) { alert(E) }; return false;" alt="&staff.client.portal.toggle_tpac;" /></td>
-
-              <td><a href="#"
-              onclick="try { toggle_tpac(); } catch(E) { alert(E); }; return false;">&staff.client.portal.toggle_tpac;</a></td>
-            </tr>
           </table>
         </div>
-        <span style="display:none" id="tpac_toggled_on">&staff.client.portal.toggle_tpac.message_on;</span>
-        <span style="display:none" id="tpac_toggled_off">&staff.client.portal.toggle_tpac.message_off;</span>
       </td>
     </tr>
   </table>

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/examples/apache/eg_vhost.conf.in          |   46 +++++++++++++++++++-
 Open-ILS/web/opac/locale/en-US/lang.dtd            |    3 -
 .../xul/staff_client/chrome/content/cat/opac.js    |   11 +----
 .../staff_client/chrome/content/main/constants.js  |   26 ++---------
 .../xul/staff_client/defaults/preferences/prefs.js |    3 -
 Open-ILS/xul/staff_client/server/index.xhtml       |   27 -----------
 6 files changed, 52 insertions(+), 64 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list