koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] CVS: koha/koha-tmpl/opac-tmpl/css/en/includes basket.js,1.1,1


From: doXulting
Subject: [Koha-cvs] CVS: koha/koha-tmpl/opac-tmpl/css/en/includes basket.js,1.1,1.2
Date: Fri, 23 Jul 2004 09:00:47 -0700

Update of /cvsroot/koha/koha/koha-tmpl/opac-tmpl/css/en/includes
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2577/koha-tmpl/opac-tmpl/css/en/includes

Modified Files:
        basket.js 
Log Message:
addMultiple feature modified

Index: basket.js
===================================================================
RCS file: /cvsroot/koha/koha/koha-tmpl/opac-tmpl/css/en/includes/basket.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** basket.js   20 Jul 2004 17:19:52 -0000      1.1
--- basket.js   23 Jul 2004 16:00:31 -0000      1.2
***************
*** 20,43 ****
  }
  
- function addMultiple(){
- var c_value = "";
- if(document.myform.bibid.length > 0){
- for (var i=0; i < document.myform.bibid.length; i++)
-    {
-    if (document.myform.bibid[i].checked)
-       {
-       c_value = c_value + document.myform.bibid[i].value + "|";
-       }
-    }
-       var arrayChosen = c_value.split("|");
-       for(i=0;i<(arrayChosen.length-1);i++){
-               addRecord(arrayChosen[i],"","silent");
-       }
-       alert(i+MSG_NRECORDS_ADDED);
-       } else {
-               alert(MSG_NO_RECORD_SELECTED);
-       }
- }
- 
  function writeCookie(name, val, wd) {
        if (wd) {
--- 20,23 ----
***************
*** 102,111 ****
  
        if (strCookie) {
- //            alert(strCookie);
- //            return;
- 
- //            var Wmax = screen.width;
- //            var Hmax = screen.height;
- 
                var iW = 620;
                var iH = 450;
--- 82,85 ----
***************
*** 117,126 ****
        else {
                alert(MSG_BASKET_EMPTY);
-               //alert("Il n'y a aucune notice !");
        }
  }
  
  
! function addRecord(val, selection, display) {
        var nameCookie = "bib_list";
        var valCookie = readCookie(nameCookie);
--- 91,99 ----
        else {
                alert(MSG_BASKET_EMPTY);
        }
  }
  
  
! function addRecord(val, selection) {
        var nameCookie = "bib_list";
        var valCookie = readCookie(nameCookie);
***************
*** 148,154 ****
                                return 0;
                        }
-                       if( display != "silent" ){
                        alert(MSG_RECORD_IN_BASKET);
-                       }
                }
                else {
--- 121,125 ----
***************
*** 161,176 ****
        if (write) {
                writeCookie(nameCookie, valCookie);
!               if (selection) { // ajout à partir d'une sélection de notices
                        return 1;
                }
-                       if( display != "silent" ){
                alert(MSG_RECORD_ADDED);
                }
        }
  }
  
  
! function addSelRecords(valSel) { // fonction permettant d'ajouter une 
sélection de notices
!                                                                       // (à 
partir d'une page de résultats) au panier
        var arrayRecords = valSel.split("/");
        var i = 0;
--- 132,158 ----
        if (write) {
                writeCookie(nameCookie, valCookie);
!               if (selection) { // when adding a selection of records
                        return 1;
                }
                alert(MSG_RECORD_ADDED);
+       }
+ }
+ 
+ 
+ function addMultiple(){
+       var c_value = "";
+       if(document.myform.bibid.length > 0) {
+               for (var i=0; i < document.myform.bibid.length; i++) {
+                       if (document.myform.bibid[i].checked) {
+                               c_value = c_value + 
document.myform.bibid[i].value + "/";
+                       }
                }
+               addSelRecords(c_value);
        }
  }
  
  
! function addSelRecords(valSel) { // function for adding a selection of 
biblios to the basket
!                                                                               
                // from the results list
        var arrayRecords = valSel.split("/");
        var i = 0;
***************
*** 188,192 ****
        if (nbAdd) {
                if (i > nbAdd) {
!                       msg = nbAdd+" "+MSG_NRECORDS_ADDED+", "+(i-nbAj)+" 
"+MSG_NRECORDS_IN_BASKET;
                }
                else {
--- 170,174 ----
        if (nbAdd) {
                if (i > nbAdd) {
!                       msg = nbAdd+" "+MSG_NRECORDS_ADDED+", "+(i-nbAdd)+" 
"+MSG_NRECORDS_IN_BASKET;
                }
                else {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]