added call number browser entry point from advanced search page
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 6 Mar 2006 15:19:17 +0000 (15:19 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 6 Mar 2006 15:19:17 +0000 (15:19 +0000)
persisting the 'dbg' debug flag as URL param

git-svn-id: svn://svn.open-ils.org/ILS/trunk@3265 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/opac/common/js/config.js
Open-ILS/web/opac/common/js/opac_utils.js
Open-ILS/web/opac/locale/en-US/opac_common.dtd
Open-ILS/web/opac/skin/default/css/layout.css
Open-ILS/web/opac/skin/default/js/advanced.js
Open-ILS/web/opac/skin/default/js/cn_browse.js
Open-ILS/web/opac/skin/default/xml/advanced/advanced_quick.xml
Open-ILS/web/opac/skin/default/xml/common/cn_browse.xml
Open-ILS/web/opac/skin/default/xml/setenv.xml

index c8b8dec..5d2273a 100644 (file)
@@ -21,6 +21,7 @@ var PARAM_RTYPE               = "rt";
 var PARAM_SORT                 = "s";
 var PARAM_SORT_DIR     = "sd";
 var PARAM_DEBUG                = "dbg";
+var PARAM_CN                   = "cn";
 
 /* URL param values (see comments above) */
 var TERM;  
@@ -44,6 +45,7 @@ var SORT;
 var SORT_DIR;
 var RLIST;
 var DEBUG;
+var CALLNUM;
 
 /* cookie values */
 var SBEXTRAS; 
@@ -67,6 +69,7 @@ var ADVANCED  = "advanced";
 var HOME                       = "home";
 var BBAGS              = "bbags";
 var REQITEMS   = "reqitems";
+var CNBROWSE   = "cnbrowse";
 
 /* search type (STYPE) options */
 var STYPE_AUTHOR       = "author";
@@ -155,6 +158,7 @@ config.page[MYOPAC]         = "myopac.xml";
 config.page[RDETAIL]           = "rdetail.xml";
 config.page[BBAGS]             = "bbags.xml";
 config.page[REQITEMS]  = "reqitems.xml";
+config.page[CNBROWSE]  = "cnbrowse.xml";
 
 /* themes */
 config.themes = {};
@@ -222,8 +226,6 @@ config.ids.altcanvas = {};
 
 var FETCH_MRIDS_                                       = "open-ils.search:open-ils.search.biblio.metabib.class.search:1";
 var FETCH_SEARCH_RIDS                  = "open-ils.search:open-ils.search.biblio.record.class.search:1";
-/*var FETCH_MRIDS                                      = "open-ils.search:open-ils.search.biblio.class:1";*/
-/*var FETCH_MRIDS_FULL                         = "open-ils.search:open-ils.search.biblio.class.full:1";*/
 var FETCH_MRMODS                                       = "open-ils.search:open-ils.search.biblio.metarecord.mods_slim.retrieve";
 var FETCH_MODS_FROM_COPY               = "open-ils.search:open-ils.search.biblio.mods_from_copy";
 var FETCH_MR_COPY_COUNTS               = "open-ils.search:open-ils.search.biblio.metarecord.copy_count:1";
index 22544d2..33e498d 100644 (file)
@@ -102,6 +102,7 @@ function initParams() {
        SORT            = cgi.param(PARAM_SORT);
        SORT_DIR        = cgi.param(PARAM_SORT_DIR);
        DEBUG           = cgi.param(PARAM_DEBUG);
+       CALLNUM = cgi.param(PARAM_CN);
 
        /* set up some sane defaults */
        if(isNaN(LOCATION))     LOCATION        = 1;
@@ -145,6 +146,7 @@ function getRtype(){return RTYPE;}
 function getSort(){return SORT;}
 function getSortDir(){return SORT_DIR;}
 function getDebug(){return DEBUG;}
+function getCallnumber() { return CALLNUM; }
 
 
 function findBasePath() {
@@ -207,6 +209,8 @@ function  buildOPACLink(args, slim, ssl) {
                }
        }
 
+       if(getDebug())
+               string += _appendParam(DEBUG,   PARAM_DEBUG, args, getDebug, string);
        if(getOrigLocation() != 1) 
                string += _appendParam(ORIGLOC, PARAM_ORIGLOC, args, getOrigLocation, string);
        if(getTerm()) 
index f68cd3a..66d2bf3 100644 (file)
 <!ENTITY opac.search.nowSearching "Now Searching">
 
 
-<!ENTITY opac.title.home "Evergreen: Home">
+<!ENTITY opac.title.home "Evergreen Home">
 <!ENTITY opac.title.mresult "Evergreen Title Groups">
 <!ENTITY opac.title.rresult "Evergreen Titles">
 <!ENTITY opac.title.myopac "Evergreen My Account">
 <!ENTITY opac.title.rdetail "Evergreen Title Details">
 <!ENTITY opac.title.advanced "Evergreen Advanced Search">
 <!ENTITY opac.title.reqitems "Evergreen Request Items">
+<!ENTITY opac.title.cnbrowse "Evergreen Call Number Browse">
 <!ENTITY opac.login.login "Login with your username and password">
index 0e21503..42038d6 100644 (file)
@@ -17,6 +17,7 @@ table { border-collapse: collapse; }
 
 .classic_link { text-decoration: underline; color: black;}
 .classic_link:visited { text-decoration: underline; color: black;}
+.classic_link_col { text-decoration: underline; color: red;}
 
 
 
index 359f1d4..3bcc767 100644 (file)
@@ -47,6 +47,7 @@ function advInit() {
 
        setEnterFunc($('opac.advanced.quick.isbn'), advISBNRun );
        setEnterFunc($('opac.advanced.quick.issn'), advISSNRun );
+       setEnterFunc($('opac.advanced.quick.cn'), advCNRun );
        setEnterFunc( $n( $('advanced.marc.tbody'), 'advanced.marc.value'), advMARCRun );
 }
 
@@ -160,6 +161,15 @@ function advISSNRun() {
        goTo(buildOPACLink(arg));
 }
 
+function advCNRun() {
+       var cn = $('opac.advanced.quick.cn').value;
+       if(!cn) return;
+       var arg                 = {};
+       arg.page                        = CNBROWSE;
+       arg[PARAM_CN]   = cn;
+       goTo(buildOPACLink(arg));
+}
+
 
 function advRefinedTerm( type, term ) {
        var t = getSelectorVal($('advanced.refined.' + type + '_type'));
index 7a88436..0a7c048 100644 (file)
@@ -9,6 +9,24 @@ var cnBrowseShowNext = false;
 var cnBrowseShowPrev = false;
 var MAX_CN = 9;
 
+if( findCurrentPage() == CNBROWSE ) {
+       attachEvt("common", "run", cnBrowseLoadSearch);
+       attachEvt( "common", "locationUpdated", cnBrowseResubmit );
+}
+
+function cnBrowseLoadSearch() {
+       unHideMe($('cn_browse'));
+       cnBrowseGo(getCallnumber(), getDepth());
+}
+
+function cnBrowseResubmit() {
+       var args = {}
+       args[PARAM_CN] = cnBrowseCurrent;
+       args[PARAM_DEPTH] = getNewSearchDepth();
+       args[PARAM_LOCATION] = getNewSearchLocation();
+       goTo(buildOPACLink(args));
+}
+
 function cnBrowseGo(cn, depth) { 
        if(depth == null) depth = getDepth();
        cnBrowseDepth = depth;
index f4f5bd3..c9c0726 100644 (file)
@@ -1,4 +1,4 @@
-<table class='data_grid' width='80%'>
+<table class='data_grid' width='95%'>
        <thead>
                <tr>
                        <td colspan='6'>&opac.advanced.quick.title;</td>
@@ -7,14 +7,19 @@
        <tbody>
                <tr>
                        <td>
-                               <span style='padding-right: 10px;'>&opac.advanced.quick.isbn;:</span>
-                               <input id='opac.advanced.quick.isbn' style='margin: 5px;' type='text' size='10' maxlength='10'> </input>
-                               <input type='submit' onclick='advISBNRun();' value='&common.submit;'> </input>
+                               <span style='padding-right: 0px;'>Call Number:</span>
+                               <input id='opac.advanced.quick.cn' style='margin: 2px;' type='text' size='12'> </input>
+                               <input type='submit' onclick='advCNRun();' value='Go'> </input>
                        </td>
                        <td>
-                               <span style='padding-right: 10px;'>&opac.advanced.quick.issn;:</span>
-                               <input id='opac.advanced.quick.issn' style='margin: 5px;' type='text' size='9' maxlength='9'> </input>
-                               <input type='submit' onclick='advISSNRun();' value='&common.submit;'> </input>
+                               <span style='padding-right: 0px;'>&opac.advanced.quick.isbn;:</span>
+                               <input id='opac.advanced.quick.isbn' style='margin: 2px;' type='text' size='10' maxlength='10'> </input>
+                               <input type='submit' onclick='advISBNRun();' value='Go'> </input>
+                       </td>
+                       <td>
+                               <span style='padding-right: 0px;'>&opac.advanced.quick.issn;:</span>
+                               <input id='opac.advanced.quick.issn' style='margin: 2px;' type='text' size='9' maxlength='9'> </input>
+                               <input type='submit' onclick='advISSNRun();' value='Go'> </input>
                        </td>
                </tr>
        </tbody>
index 307c913..4444fa5 100644 (file)
@@ -3,7 +3,7 @@
        style='width: 90%; text-align: center; padding: 15px;'>
        -->
 <div id='cn_browse' class='hide_me cn_browser' 
-       style='width: 99%; text-align: center; padding: 15px;'>
+       style='width: 95%; text-align: center; padding: 15px;'>
        <div id='cn_browse_loading'  class='cn_browse_loading hide_me'>Loading Callnumber Page...</div>
        <div id='cn_browse_div'> 
                <table class='data_grid bookshelf' width='100%'>
index d41ad16..e1030a9 100644 (file)
 <!--#elif expr="$DOCUMENT_NAME='advanced.xml'"-->
        <!--#set var='OILS_TITLE' value='opac.title.advanced'-->
 
+<!--#elif expr="$DOCUMENT_NAME='reqitems.xml'"-->
+       <!--#set var='OILS_TITLE' value='opac.title.reqitems'-->
+
+<!--#elif expr="$DOCUMENT_NAME='cnbrowse.xml'"-->
+       <!--#set var='OILS_TITLE' value='opac.title.cnbrowse'-->
+
 <!--#endif-->
 
 <!--#set var="OILS_BASE" value="http://${SERVER_NAME}/${OILS_OPAC_BASE}"-->