Index: trunk/kernel/admin/include/toolbar/main_import.php =================================================================== diff -u -r338 -r348 --- trunk/kernel/admin/include/toolbar/main_import.php (.../main_import.php) (revision 338) +++ trunk/kernel/admin/include/toolbar/main_import.php (.../main_import.php) (revision 348) @@ -13,6 +13,17 @@ if(!$ro_perm) { ?> + var StepInfo = Array(); + + function InitStep(step_id, step_name, total_recs) + { + StepInfo[step_id] = Array(); + StepInfo[step_id]['total'] = total_recs; + StepInfo[step_id]['current'] = 0; + StepInfo[step_id]['name'] = step_name; + SetTotal(step_name); + } + function PageOnLoad(step_no) { if( step_no == 1 ) @@ -74,18 +85,26 @@ } } - function SetPercent(step_id, new_percent, additional, time_str) + function SetPercent(step_id, new_percent, current_rec, time_str) { var step_element = document.getElementById(step_id); step_element.innerHTML = new_percent; var add_element = document.getElementById(step_id+'_additional'); - add_element.innerHTML = additional; + StepInfo[step_id]['current'] = current_rec; + add_element.innerHTML = '('+StepInfo[step_id]['current']+' of '+StepInfo[step_id]['total']+')'; + var time_element = document.getElementById('total_time'); - time_element.innerHTML = time_str; + time_element.innerHTML = time_str+'s'; } + function SetTotal(text) + { + var txt = document.getElementById('import_totals'); + if(txt) txt.innerHTML = text; + } +