Ignore:
Timestamp:
01/05/12 17:19:14 (13 years ago)
Author:
cartis
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Dev/branches/Cartis/js/dashboardScripts.js

    r202 r204  
    105105function removeFromList(event) {
    106106    if (event == null || event == undefined) return;
     107   
    107108    var id = event.target.parentNode.id;
    108109    var uid = id.split("shoppingCartItem")[1];
    109110    // find index, remove from object
    110111    var indexInCart = shoppingCart.contents.uids.indexOf(uid);
     112    var tempTitle = shoppingCart.contents.titles[indexInCart];
     113    var cn = confirm("Are you sure you want to remove: "+tempTitle+"?");
     114    if (cn == false) return;
     115   
     116   
    111117    shoppingCart.contents.uids.splice(indexInCart, 1);
    112118    var title = shoppingCart.contents.titles.splice(indexInCart, 1)[0];
     
    114120    //Then replace element back into relevant list
    115121    // First set element
     122       
    116123    var element;
    117124    switch (type){
     
    161168        currentlySelected.type = null;
    162169    }
     170   
     171function configureDashboard() {
     172    var data = JSON.stringify(shoppingCart);
     173    var form = ce("form");
     174    form.action = "DProbeersel.php";
     175    form.method = "POST";
     176    var input = ce("input");
     177    input.type = "hidden";
     178    input.name = "selectedData";
     179    input.value = data;
     180    form.appendChild(input);
     181    form.submit();
     182}
Note: See TracChangeset for help on using the changeset viewer.