diff options
| author | 2014-09-08 19:26:35 +0200 | |
|---|---|---|
| committer | 2014-09-08 19:26:35 +0200 | |
| commit | ef1b35fc4385c99c4d38e3f87e8126d0dbe21519 (patch) | |
| tree | c2127f92281084c3cb28f635dea63a9a179eabbb /app/views/javascript | |
| parent | 909d8747ba09f9c9a6ac895f1f4f0763bdb27a55 (diff) | |
| parent | c3fd8877c021b86180b3bea4d4260e6478f0558e (diff) | |
Merge branch 'dev' into 411-update-system
Conflicts:
constants.php
Diffstat (limited to 'app/views/javascript')
| -rw-r--r-- | app/views/javascript/actualize.phtml | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/app/views/javascript/actualize.phtml b/app/views/javascript/actualize.phtml index d08dc47d1..74cef4998 100644 --- a/app/views/javascript/actualize.phtml +++ b/app/views/javascript/actualize.phtml @@ -1,25 +1,24 @@ "use strict"; -var feeds = [<?php - foreach ($this->feeds as $feed) { - echo "'", Minz_Url::display(array('c' => 'feed', 'a' => 'actualize', 'params' => array('id' => $feed->id(), 'ajax' => '1')), 'php'), "',\n"; - } - ?>], +var feeds = [<?php foreach ($this->feeds as $feed) { ?>{<?php + ?>url: "<?php echo Minz_Url::display(array('c' => 'feed', 'a' => 'actualize', 'params' => array('id' => $feed->id(), 'ajax' => '1')), 'php'); ?>",<?php + ?>title: "<?php echo $feed->name(); ?>"<?php +?>},<?php } ?>], feed_processed = 0, feed_count = feeds.length; function initProgressBar(init) { if (init) { $("body").after("\<div id=\"actualizeProgress\" class=\"notification good\">\ - <?php echo _t('refresh'); ?> <span class=\"progress\">0 / " + feed_count + "</span><br />\ - <progress id=\"actualizeProgressBar\" value=\"0\" max=\"" + feed_count + "\"></progress>\ + <?php echo _t('refresh'); ?><br /><span class=\"title\">/</span><br />\ + <span class=\"progress\">0 / " + feed_count + "</span>\ </div>"); } else { window.location.reload(); } } -function updateProgressBar(i) { - $("#actualizeProgressBar").val(i); +function updateProgressBar(i, title_feed) { $("#actualizeProgress .progress").html(i + " / " + feed_count); + $("#actualizeProgress .title").html(title_feed); } function updateFeeds() { @@ -43,10 +42,10 @@ function updateFeed() { $.ajax({ type: 'POST', - url: feed, + url: feed['url'], }).complete(function (data) { feed_processed++; - updateProgressBar(feed_processed); + updateProgressBar(feed_processed, feed['title']); if (feed_processed === feed_count) { initProgressBar(false); |
