Index: trunk/kernel/admin_templates/incs/ajax.js =================================================================== diff -u -N -r5494 -r5496 --- trunk/kernel/admin_templates/incs/ajax.js (.../ajax.js) (revision 5494) +++ trunk/kernel/admin_templates/incs/ajax.js (.../ajax.js) (revision 5496) @@ -182,17 +182,20 @@ }; // AJAX ProgressBar classs -function AjaxProgressBar($prefix, $url, $format) { - this.Prefix = $prefix; +function AjaxProgressBar($url) { + this.WindowTitle = this.GetWindow().document.title; this.URL = $url; - this.DisplayFormat = $format; this.BusyRequest = false; this.LastResponceTime = this.GetMicroTime(); this.ProgressPercent = 0; // progress percent this.ProgressTime = new Array(); this.Query(); } +AjaxProgressBar.prototype.GetWindow = function() { + return window.parent ? window.parent : window; +} + AjaxProgressBar.prototype.GetMicroTime = function() { var $now = new Date(); return Math.round($now.getTime() / 1000); // because miliseconds are returned too @@ -227,7 +230,13 @@ AjaxProgressBar.prototype.FormatTime = function ($seconds) { $seconds = parseInt($seconds); - return Math.floor($seconds / 60) + ':' + $seconds % 60; + + var $minutes = Math.floor($seconds / 60); + if ($minutes < 10) $minutes = '0' + $minutes; + $seconds = $seconds % 60; + if ($seconds < 10) $seconds = '0' + $seconds; + + return $minutes + ':' + $seconds; } AjaxProgressBar.prototype.showProgress = function ($percent) { @@ -237,14 +246,11 @@ this.LastResponceTime = $now; var $display_progress = parseInt(this.ProgressPercent); - var $display_div = document.getElementById('progress_display[' + this.Prefix + ']'); - if ($display_div) { - var $result = this.DisplayFormat; - $result = $result.replace('#PERCENT_DONE#', $display_progress); - $result = $result.replace('#TIME_LEFT#', this.FormatTime( this.GetEstimatedTime() )); - $result = $result.replace('#TIME_USED#', this.FormatTime( Math.sum(this.ProgressTime) )); - $display_div.innerHTML = $result; - } - document.getElementById('progress_done[' + this.Prefix + ']').style.width = $display_progress + '%'; - document.getElementById('progress_left[' + this.Prefix + ']').style.width = (100 - $display_progress) + '%'; + this.GetWindow().document.title = $display_progress + '% - ' + this.WindowTitle; + document.getElementById('progress_display[percents_completed]').innerHTML = $display_progress + '%'; + document.getElementById('progress_display[elapsed_time]').innerHTML = this.FormatTime( Math.sum(this.ProgressTime) ); + document.getElementById('progress_display[Estimated_time]').innerHTML = this.FormatTime( this.GetEstimatedTime() ); + + document.getElementById('progress_bar[done]').style.width = $display_progress + '%'; + document.getElementById('progress_bar[left]').style.width = (100 - $display_progress) + '%'; } \ No newline at end of file Index: trunk/core/units/categories/categories_config.php =================================================================== diff -u -N -r5464 -r5496 --- trunk/core/units/categories/categories_config.php (.../categories_config.php) (revision 5464) +++ trunk/core/units/categories/categories_config.php (.../categories_config.php) (revision 5496) @@ -62,7 +62,7 @@ 'categories_permissions'=> Array('prefixes' => Array('c', 'g_List'), 'format' => "#c_status# '#c_titlefield#' - !la_title_Permissions!"), 'categories_custom' => Array('prefixes' => Array('c'), 'format' => "#c_status# '#c_titlefield#' - !la_title_Custom!"), - 'categories_update' => Array('prefixes' => Array(), 'format' => "!la_title_UpdatingCategories! "), + 'categories_update' => Array('prefixes' => Array(), 'format' => "!la_title_UpdatingCategories!"), 'images_edit' => Array( 'prefixes' => Array('c', 'c-img'), 'new_status_labels' => Array('c-img'=>'!la_title_Adding_Image!'), Index: trunk/kernel/units/categories/categories_config.php =================================================================== diff -u -N -r5464 -r5496 --- trunk/kernel/units/categories/categories_config.php (.../categories_config.php) (revision 5464) +++ trunk/kernel/units/categories/categories_config.php (.../categories_config.php) (revision 5496) @@ -62,7 +62,7 @@ 'categories_permissions'=> Array('prefixes' => Array('c', 'g_List'), 'format' => "#c_status# '#c_titlefield#' - !la_title_Permissions!"), 'categories_custom' => Array('prefixes' => Array('c'), 'format' => "#c_status# '#c_titlefield#' - !la_title_Custom!"), - 'categories_update' => Array('prefixes' => Array(), 'format' => "!la_title_UpdatingCategories! "), + 'categories_update' => Array('prefixes' => Array(), 'format' => "!la_title_UpdatingCategories!"), 'images_edit' => Array( 'prefixes' => Array('c', 'c-img'), 'new_status_labels' => Array('c-img'=>'!la_title_Adding_Image!'), Index: trunk/core/admin_templates/categories/cache_updater.tpl =================================================================== diff -u -N -r5494 -r5496 --- trunk/core/admin_templates/categories/cache_updater.tpl (.../cache_updater.tpl) (revision 5494) +++ trunk/core/admin_templates/categories/cache_updater.tpl (.../cache_updater.tpl) (revision 5496) @@ -33,17 +33,9 @@ - - - - -
-
- -
-
+ Index: trunk/kernel/admin_templates/incs/form_blocks.tpl =================================================================== diff -u -N -r5464 -r5496 --- trunk/kernel/admin_templates/incs/form_blocks.tpl (.../form_blocks.tpl) (revision 5464) +++ trunk/kernel/admin_templates/incs/form_blocks.tpl (.../form_blocks.tpl) (revision 5496) @@ -319,34 +319,56 @@ - - - -
0% - - +
+ +
+
+ + - - - - - - + + + + + + + + + + + +
- + + - + - - -
0% + + - - + + + + + + + + +
]" style="background: url(img/progress_done.gif);" align="left">]" align="right">
+ + + + + +
+
+
100%
- + +
100%
:0%
:00:00
:00:00
\ No newline at end of file Index: trunk/kernel/admin_templates/categories/cache_updater.tpl =================================================================== diff -u -N -r5494 -r5496 --- trunk/kernel/admin_templates/categories/cache_updater.tpl (.../cache_updater.tpl) (revision 5494) +++ trunk/kernel/admin_templates/categories/cache_updater.tpl (.../cache_updater.tpl) (revision 5496) @@ -33,17 +33,9 @@
- - - - -
-
- -
-
+