[open-ils-commits] r817 - in conifer/branches/rel_1_6_0/web/opac: locale/en-CA locale/en-US locale/fr-CA skin/lul/js skin/lul/xml/common (dbs)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Mar 4 11:52:08 EST 2010
Author: dbs
Date: 2010-03-04 11:52:05 -0500 (Thu, 04 Mar 2010)
New Revision: 817
Added:
conifer/branches/rel_1_6_0/web/opac/skin/lul/js/search_bar.js
conifer/branches/rel_1_6_0/web/opac/skin/lul/xml/common/stypes_selector.xml
Modified:
conifer/branches/rel_1_6_0/web/opac/locale/en-CA/opac_conifer.dtd
conifer/branches/rel_1_6_0/web/opac/locale/en-US/opac_conifer.dtd
conifer/branches/rel_1_6_0/web/opac/locale/fr-CA/opac_conifer.dtd
Log:
Add a "Journal title" search option to the standard search selector
Modified: conifer/branches/rel_1_6_0/web/opac/locale/en-CA/opac_conifer.dtd
===================================================================
--- conifer/branches/rel_1_6_0/web/opac/locale/en-CA/opac_conifer.dtd 2010-03-04 14:31:25 UTC (rev 816)
+++ conifer/branches/rel_1_6_0/web/opac/locale/en-CA/opac_conifer.dtd 2010-03-04 16:52:05 UTC (rev 817)
@@ -41,6 +41,7 @@
<!ENTITY lu.myopac.forgot_password.question "Forgot your password?">
<!ENTITY lu.myopac.forgot_password.url "http://laurentian.ca/Laurentian/Home/Departments/Library/PASSWORD+Request.htm?Laurentian_Lang=en-CA">
<!ENTITY lu.myopac.forgot_password.url_text "Library Patron Password Request">
+<!ENTITY common.journal.title "Journal title">
<!-- override some existing links -->
<!ENTITY lu.footer.library.about "Home">
<!ENTITY lu.footer.library.url "http://laurentian.ca/library">
Modified: conifer/branches/rel_1_6_0/web/opac/locale/en-US/opac_conifer.dtd
===================================================================
--- conifer/branches/rel_1_6_0/web/opac/locale/en-US/opac_conifer.dtd 2010-03-04 14:31:25 UTC (rev 816)
+++ conifer/branches/rel_1_6_0/web/opac/locale/en-US/opac_conifer.dtd 2010-03-04 16:52:05 UTC (rev 817)
@@ -40,6 +40,7 @@
<!ENTITY lu.myopac.forgot_password.question "Forgot your password?">
<!ENTITY lu.myopac.forgot_password.url "http://laurentian.ca/Laurentian/Home/Departments/Library/PASSWORD+Request.htm?Laurentian_Lang=en-CA">
<!ENTITY lu.myopac.forgot_password.url_text "Library Patron Password Request">
+<!ENTITY common.journal.title "Journal title">
<!-- override some existing links -->
<!ENTITY lu.footer.library.about "Home">
<!ENTITY lu.footer.library.url "http://laurentian.ca/library">
Modified: conifer/branches/rel_1_6_0/web/opac/locale/fr-CA/opac_conifer.dtd
===================================================================
--- conifer/branches/rel_1_6_0/web/opac/locale/fr-CA/opac_conifer.dtd 2010-03-04 14:31:25 UTC (rev 816)
+++ conifer/branches/rel_1_6_0/web/opac/locale/fr-CA/opac_conifer.dtd 2010-03-04 16:52:05 UTC (rev 817)
@@ -40,6 +40,7 @@
<!ENTITY lu.myopac.forgot_password.question "Vous avez oublié votre mot de passe?">
<!ENTITY lu.myopac.forgot_password.url "http://laurentian.ca/Laurentian/Home/Departments/Library/PASSWORD+Request.htm?Laurentian_Lang=fr-CA">
<!ENTITY lu.myopac.forgot_password.url_text "Demande de mot de passe de client de la bibliothèque">
+<!ENTITY common.journal.title "Titre de périodique">
<!-- override some existing links -->
<!ENTITY lu.footer.library.about "Accueil">
<!ENTITY lu.footer.library.url "http://laurentienne.ca/library">
Added: conifer/branches/rel_1_6_0/web/opac/skin/lul/js/search_bar.js
===================================================================
--- conifer/branches/rel_1_6_0/web/opac/skin/lul/js/search_bar.js (rev 0)
+++ conifer/branches/rel_1_6_0/web/opac/skin/lul/js/search_bar.js 2010-03-04 16:52:05 UTC (rev 817)
@@ -0,0 +1,92 @@
+var searchBarExpanded = false;
+/* our search selector boxes */
+var _ts, _fs;
+
+
+var isFrontPage = false;
+
+
+G.evt.common.init.push(searchBarInit);
+
+/* if set by the org selector, this will be the location used the
+ next time the search is submitted */
+var newSearchLocation;
+var newSearchDepth = null;
+
+
+function searchBarInit() {
+
+ _ts = G.ui.searchbar.type_selector;
+ _fs = G.ui.searchbar.form_selector;
+
+ try{G.ui.searchbar.text.focus();}catch(e){}
+ G.ui.searchbar.text.onkeydown =
+ function(evt) {if(userPressedEnter(evt)) { searchBarSubmit(); } };
+ _ts.onkeydown =
+ function(evt) {if(userPressedEnter(evt)) { searchBarSubmit(); } };
+ _fs.onkeydown =
+ function(evt) {if(userPressedEnter(evt)) { searchBarSubmit(); } };
+
+ G.ui.searchbar.submit.onclick = searchBarSubmit;
+
+ /* set up the selector objects, etc */
+ G.ui.searchbar.text.value = (getTerm() != null) ? getTerm() : "";
+ setSelector(_ts, getStype());
+ setSelector(_fs, getForm());
+
+ depthSelInit();
+
+
+ if(!isFrontPage && (findCurrentPage() != MYOPAC)) {
+ attachEvt('common','depthChanged', searchBarSubmit);
+ }
+
+ if( (limit = $('opac.result.limit2avail')) ) {
+ if(getAvail()) limit.checked = true;
+ if(getSort() && getSortDir())
+ setSelector($('opac.result.sort'), getSort()+'.'+getSortDir());
+ }
+}
+
+function searchBarSubmit(isFilterSort) {
+
+ var text = G.ui.searchbar.text.value;
+
+ clearSearchParams();
+
+ if(!text || text == "") return;
+
+ var d = (newSearchDepth != null) ? newSearchDepth : depthSelGetDepth();
+ if(isNaN(d)) d = 0;
+
+ var args = {};
+
+ if(SHOW_MR_DEFAULT || (isFilterSort && findCurrentPage() == MRESULT)) {
+ args.page = MRESULT;
+ } else {
+ args.page = RRESULT;
+ args[PARAM_RTYPE] = _ts.options[_ts.selectedIndex].value;
+ }
+
+ args[PARAM_STYPE] = _ts.options[_ts.selectedIndex].value;
+ args[PARAM_TERM] = text;
+ args[PARAM_LOCATION] = depthSelGetNewLoc();
+ args[PARAM_DEPTH] = d;
+ args[PARAM_FORM] = _fs.options[_fs.selectedIndex].value;
+ if (_ts.options[_ts.selectedIndex].id == 'jtitle') {
+ args[PARAM_BIBLEVEL] = 's';
+ }
+
+
+ if($('opac.result.limit2avail')) {
+ args[PARAM_AVAIL] = ($('opac.result.limit2avail').checked) ? 1 : '';
+ if( (val = getSelectorVal($('opac.result.sort'))) ) {
+ args[PARAM_SORT] = val.split('.')[0]
+ args[PARAM_SORT_DIR] = val.split('.')[1]
+ }
+ }
+
+ goTo(buildOPACLink(args));
+}
+
+
Added: conifer/branches/rel_1_6_0/web/opac/skin/lul/xml/common/stypes_selector.xml
===================================================================
--- conifer/branches/rel_1_6_0/web/opac/skin/lul/xml/common/stypes_selector.xml (rev 0)
+++ conifer/branches/rel_1_6_0/web/opac/skin/lul/xml/common/stypes_selector.xml 2010-03-04 16:52:05 UTC (rev 817)
@@ -0,0 +1,9 @@
+<select id='search_type_selector'>
+ <option value='keyword' selected='selected'>&common.keyword;</option>
+ <option value='title'>&common.title;</option>
+ <option value='title' id='jtitle'>&common.journal_title;</option>
+ <option value='author'>&common.author;</option>
+ <option value='subject'>&common.subject;</option>
+ <option value='series'>&common.series;</option>
+</select>
+
More information about the open-ils-commits
mailing list