Changeset 33252

Show
Ignore:
Timestamp:
28.06.2019 12:48:52 (4 weeks ago)
Author:
kjdon
Message:

made berry icons easier to customise. instead of hard coded image paths in the javascript, now the images are defined using variables, which are defined in js/berrybasket/berryvariables.js

Location:
main/trunk/greenstone3/web/interfaces/default/js/berrybasket
Files:
1 added
3 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/default/js/berrybasket/berrybasket.js

    r33152 r33252  
    132132    for (var i =0;i < berryList.length && i<12 ; i++ ){ 
    133133        var img = document.createElement('img'); 
    134         img.src = 'interfaces/default/images/berry.png'; 
     134        img.src = berry_icon; 
    135135        berries.appendChild(img); 
    136136    } 
     
    356356                for (var i =0; i < berryList.length; i++ ){ 
    357357                    var img = document.createElement('img'); 
    358                     img.src = 'interfaces/default/images/berry.png'; 
     358                    img.src = berry_icon; 
    359359                    berries.appendChild(img); 
    360360                } 
  • main/trunk/greenstone3/web/interfaces/default/js/berrybasket/berrycheckout.js

    r33182 r33252  
    306306        var doc_id = doc['collection']+":"+ doc['name'];         
    307307         
    308         img.setAttribute("src", "interfaces/default/images/berry.png"); 
     308        img.setAttribute("src", berry_icon); 
    309309        img.setAttribute("id", doc_id); 
    310310        img.setAttribute("height", "15px"); 
  • main/trunk/greenstone3/web/interfaces/default/js/berrybasket/ygDDPlayer.js

    r33103 r33252  
    6969     
    7070    var img = document.createElement('img'); 
    71     img.src = 'interfaces/default/images/berry.png'; 
     71    img.src = berry_moving_icon; 
    7272    dragEl.appendChild(img); 
    7373     
     
    208208                for (var i =0; i < player.berryList.length; i++ ){ 
    209209                    var img = document.createElement('img'); 
    210                     img.src = 'interfaces/default/images/berry.png'; 
     210                    img.src = berry_moving_icon; 
    211211                    berries.appendChild(img); 
    212212                }