showing edition, pubdate, publisher on title result page
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 15 Sep 2005 19:16:52 +0000 (19:16 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 15 Sep 2005 19:16:52 +0000 (19:16 +0000)
keeping 'loading results' until all results loaded

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

Open-ILS/web/opac/skin/default/js/mresult.js
Open-ILS/web/opac/skin/default/js/result_common.js
Open-ILS/web/opac/skin/default/xml/result_common.xml
Open-ILS/web/opac/skin/default/xml/result_table.xml

index 40ec13f..43da813 100644 (file)
@@ -85,7 +85,7 @@ function mresultSetRecords(idstruct) {
                if(idstruct[x-o] == null) break;
                records[x] = parseInt(idstruct[x - o][0]);
                ranks[x] = parseFloat(idstruct[x - o][1]);
-               onlyrecord[x] = parseInt(idstruct[x - o][4]);
+               onlyrecord[x] = parseInt(idstruct[x - o][2]);
        }
        idsCookie.put(COOKIE_IDS, js2JSON({ recs: records, ranks : ranks }) );
        idsCookie.write();
index dc75d05..01f6a78 100644 (file)
@@ -75,8 +75,6 @@ function resultDisplayRecord(rec, pos, is_mr) {
        recordsHandled++;
        recordsCache.push(rec);
 
-       /* hide the 'now loading...' message */
-       hideMe(G.ui.common.loading);
 
        var r = table.rows[pos + 1];
        
@@ -107,14 +105,35 @@ function resultDisplayRecord(rec, pos, is_mr) {
 
        buildSearchLink(STYPE_AUTHOR, rec.author(), author_link);
 
+       if(! is_mr ) {
+       
+               if(!isNull(rec.edition()))      {
+                       unHideMe( findNodeByName(r, "result_table_extra_span"));
+                       findNodeByName(r, "result_table_edition_span").appendChild( text( rec.edition()) );
+               }
+               if(!isNull(rec.pubdate())) {
+                       unHideMe( findNodeByName(r, "result_table_extra_span"));
+                       unHideMe(findNodeByName(r, "result_table_pub_span"));
+                       findNodeByName(r, "result_table_pub_span").appendChild( text( rec.pubdate() ));
+               }
+               if(!isNull(rec.publisher()) ) {
+                       unHideMe( findNodeByName(r, "result_table_extra_span"));
+                       unHideMe(findNodeByName(r, "result_table_pub_span"));
+                       findNodeByName(r, "result_table_pub_span").appendChild( text( " " + rec.publisher() ));
+               }
+       }
+
        resultBuildFormatIcons( r, rec );
 
        unHideMe(r);
        
        runEvt("result", "recordDrawn", rec.doc_id(), title_link);
 
-       if(resultPageIsDone()) 
+       if(resultPageIsDone())  {
+               /* hide the 'now loading...' message */
+               hideMe(G.ui.common.loading);
                runEvt('result', 'allRecordsReceived', recordsCache);
+       }
 }
 
 function resultBuildFormatIcons( row, rec ) {
index 9489d22..99b60dc 100644 (file)
        </table>
        -->
 
+       <div id='loading_div' class='color_1'> Loading Results... </div>
        <!-- Load the result table -->
        <xi:include href="result_table.xml"/>
 
-       <div id='loading_div' class='color_1'> Loading Results... </div>
 
 </div>
 
index e9f3c17..0eb832c 100644 (file)
                                                                        <a title="Perform an Author Search" name='item_author' class='search_link'> 
                                                                                <!-- Author goes here -->
                                                                        </a>
+                                                                       <span name='result_table_extra_span' class='hide_me'>
+                                                                               <span name='result_table_edition_span' style='padding-left: 10px;'> -- </span>
+                                                                               <span name='result_table_pub_box' style='padding-left: 10px;'> 
+                                                                                       <span> [ </span>
+                                                                                       <span name='result_table_pub_span'> </span>
+                                                                                       <span> ] </span>
+                                                                               </span>
+                                                                       </span>
                                                                </td>
                                                        </tr>