did some debugging.. made buildOPACLink safer WRT array params
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 3 Mar 2006 17:57:15 +0000 (17:57 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 3 Mar 2006 17:57:15 +0000 (17:57 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@3248 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/opac/common/js/opac_utils.js
Open-ILS/web/opac/skin/default/js/cn_browse.js

index 9315ced..22544d2 100644 (file)
@@ -198,8 +198,8 @@ function  buildOPACLink(args, slim, ssl) {
                if(x == PARAM_DEPTH && v == 0) continue;
                if(x == PARAM_COUNT && v == 10) continue;
                if(x == PARAM_FORM && v == 'all' ) continue;
                if(x == PARAM_DEPTH && v == 0) continue;
                if(x == PARAM_COUNT && v == 10) continue;
                if(x == PARAM_FORM && v == 'all' ) continue;
-               if( instanceOf(v, Array) ) {
-                       for( var i = 0; i != v.length; i++ ) {
+               if( instanceOf(v, Array) && v.length ) {
+                       for( var i = 0; i < v.length; i++ ) {
                                string += "&" + x + "=" + encodeURIComponent(v[i]);
                        }
                } else {
                                string += "&" + x + "=" + encodeURIComponent(v[i]);
                        }
                } else {
index 78c1a0a..7a88436 100644 (file)
@@ -125,12 +125,6 @@ function _cnBrowseDraw( list ) {
                var record      = list[idx][2];
                var id          = list[idx][3];
 
                var record      = list[idx][2];
                var id          = list[idx][3];
 
-               /*
-               if( label != cnBrowseCurrent ) {
-                       removeCSSClass( td, 'cn_browse_home_cn' );
-               }
-               */
-
                if( idx == 0 ) { cnBrowseTopCn = label; cnBrowseTopId = id; } 
                cnBrowseBottomCn = label;
                cnBrowseBottomId = id;
                if( idx == 0 ) { cnBrowseTopCn = label; cnBrowseTopId = id; } 
                cnBrowseBottomCn = label;
                cnBrowseBottomId = id;
@@ -164,6 +158,7 @@ function _cnBrowseDraw( list ) {
 
 function cnBrowseDrawTitle(r) {
        var mods = r.getResultObject();
 
 function cnBrowseDrawTitle(r) {
        var mods = r.getResultObject();
+
        buildTitleDetailLink(mods, r.title_td); 
        buildSearchLink(STYPE_AUTHOR, mods.author(), r.author_td);
        r.pic_td.setAttribute("src", buildISBNSrc(cleanISBN(mods.isbn())));
        buildTitleDetailLink(mods, r.title_td); 
        buildSearchLink(STYPE_AUTHOR, mods.author(), r.author_td);
        r.pic_td.setAttribute("src", buildISBNSrc(cleanISBN(mods.isbn())));