Changes between Version 71 and Version 72 of Catalogue


Ignore:
Timestamp:
Jun 27, 2012 1:52:49 PM (12 years ago)
Author:
tolix
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Catalogue

    v71 v72  
    1212  function recalc(el) {
    1313    var price = getPrice(el);
    14     var amountEl = el.nextSibling;
    15     if( !amountEl ) {
    16       amountEl = document.createTextNode(' ');
    17       amountEl.setAttribute('style', 'color: #888888;');
    18       el.parentNode.appendChild(amountEl);
    19       // amountEl.style.color = "#888888";
    20     }
    21     amountEl.nodeValue = ' = ' + (price * el.value).toFixed(2).toString();
     14    var amountDiv = el.nextSibling;
     15    if( !amountDiv ) {
     16      amountDiv = document.createElement('div');
     17      amountDiv.style.color = '#888888';
     18      el.parentNode.appendChild(amountDiv);
     19      amountText = document.createTextNode();
     20      amountDiv.appendChild(amountText);
     21    }
     22    amountText.nodeValue = ' = ' + (price * el.value).toFixed(2).toString();
    2223    updateTotals();
    2324  }