added first round "no metarecords" flag to opac
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 22 Aug 2006 03:14:45 +0000 (03:14 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 22 Aug 2006 03:14:45 +0000 (03:14 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5638 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/opac/skin/default/js/adv_global.js
Open-ILS/web/opac/skin/default/js/result_common.js
Open-ILS/web/opac/skin/default/js/rresult.js
Open-ILS/web/opac/skin/default/xml/advanced/advanced_global.xml

index 767a3f1..44d9a67 100644 (file)
@@ -1,8 +1,13 @@
 
 attachEvt("common", "run", advgInit);
 
+var COOKIE_NOGROUP_RECORDS = 'grpt';
+
 function advgInit() {
 
+       if( cookieManager.read(COOKIE_NOGROUP_RECORDS) )
+               $('adv_group_titles').checked = false;
+
        $n($('adv_global_tbody'), 'term').focus();
 
        var extras = [ 
@@ -111,11 +116,17 @@ function advSubmitGlobal() {
        args[PARAM_TERM]                = "";
 
        /* pubdate sorting causes a record (not metarecord) search */
-       if( sortby == SORT_TYPE_PUBDATE ) {
+       if( sortby == SORT_TYPE_PUBDATE || !$('adv_group_titles').checked ) {
                args.page = RRESULT;
                args[PARAM_RTYPE] = RTYPE_MULTI;
        }
 
+       if($('adv_group_titles').checked ) 
+               cookieManager.write(COOKIE_NOGROUP_RECORDS,'');
+       else
+               cookieManager.write(COOKIE_NOGROUP_RECORDS,'1', '+10m');
+
+
        goTo(buildOPACLink(args));
 }
 
index a2adae1..8c92156 100644 (file)
@@ -82,6 +82,7 @@ function resultCollectSearchIds( type, method, handler ) {
        if(getLanguage()) args.language = getLanguage().split(/,/);
 
        //alert(js2JSON(args));
+       _debug('SEARCH: \n' + js2JSON(args) + '\n\n');
        var req = new Request(method, args, 1);
        req.callback(handler);
        req.send();
index d8b02e3..e3a91fe 100644 (file)
@@ -318,6 +318,8 @@ function rresultDoRecordMultiSearch() {
 function rresultFilterSearchResults(r) {
        var result = r.getResultObject();
 
+//     _debug("SEARCH RETURNED: \n" + js2JSON(result) + '\n\n');
+
        var ids = [];
        for( var i = 0; i != result.ids.length; i++ ) 
                ids.push(result.ids[i][0]);
index 7db6fba..7a188fd 100644 (file)
                                                config.ids.common.now_searching = 'now_searching_location';
                                        </script>
 
-                                       <!--
-                                       <tr>
-                                               <td align='center' width='100%' nowrap='nowrap'>
-                                                       <b id='now_searching_location'> </b>
-                                               </td>
-                                       </tr>
-                                       -->
-
                                        <!--#set var="adv_global_row_id" value="adv_global_trow"-->
                                        <!--#include virtual="adv_global_row.xml"-->
 
 
 
                <td rowspan='2'>
+
+                       <!--
+                       <table width='100%' style='margin-bottom: 3px;'>
+                               <thead>
+                                       <tr>
+                                               <td colspan='2' align='center'>
+                                                       <span>Group Formats and Editions</span>
+                                                       <input id='adv_group_titles' type='checkbox' checked='checked'> </input>
+                                               </td>
+                                       </tr>
+                               </thead>
+                       </table>
+                       -->
+
                        <table with='100%'>
                                <thead>
                                        <tr><td colspan='2' align='center'>Search Filters</td></tr>
        <tr style='border-top: none;'>
                <td align='center' valign='bottom' style='border-top: none;'>
 
+                       <!--
+                       <table width='100%' style='padding: 1px;'>
+                               <thead>
+                                       <tr>
+                                               <td colspan='2' align='center'>
+                                                       <span>Group Formats and Editions</span>
+                                                       <input id='adv_group_titles' type='checkbox' checked='checked'> </input>
+                                               </td>
+                                       </tr>
+                               </thead>
+                       </table>
+                       -->
+
+
                        <table style='border: none; width: 100%;'>
                                <tr>
                                        <td align='center' width='100%'>
                                                                        </td>
 
                                                                </tr>
+                                                               <tr>
+                                                                       <td colspan='2' align='center'>
+                                                                               <span>Group Formats and Editions</span>
+                                                                               <input id='adv_group_titles' type='checkbox' checked='checked'> </input>
+                                                                       </td>
+                                                               </tr>
                                                        </tbody>
                                                </table>
                                        </td>