More complete template options

Recommend this page to a friend!

      Smooth Progress Bar  >  All threads  >  More complete template options  >  (Un) Subscribe thread alerts  
Subject:More complete template options
Summary:Just an addition to the code to add more rendered text options
Messages:1
Author:Paul Johnston
Date:2012-04-19 18:11:06
 

  1. More complete template options   Reply   Report abuse  
Picture of Paul Johnston Paul Johnston - 2012-04-19 18:11:06
I needed different text rather than just % progress so simply have this in the UpdateProgress() function:

var progValueHTML = o.progressTemplate;
progValueHTML = progValueHTML.replace('{progress}', (100 * o.current / o.total));
progValueHTML = progValueHTML.replace('{current}', o.current);
progValueHTML = progValueHTML.replace('{total}', o.total);
o.progressValue.innerHTML = progValueHTML;


instead of just:
o.progressValue.innerHTML = o.progressTemplate.replace('{progress}', (100 * o.current / o.total));