diff options
| author | 2014-01-03 00:03:28 -0500 | |
|---|---|---|
| committer | 2014-01-03 00:03:28 -0500 | |
| commit | f0c2bb74ebbae1bd336d79a22c5ccf4080620bb4 (patch) | |
| tree | afc52950d50d5d4567437e42240b3998b51c4f6e /app/views | |
| parent | 7db271e95ebab52c31c78f51270de71af1d750d2 (diff) | |
| parent | 1d3ff88ae6cbb072f0d2a76308a42f2baf6cb84d (diff) | |
Merge branch 'dev' into shortcuts
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/helpers/view/normal_view.phtml | 2 | ||||
| -rw-r--r-- | app/views/javascript/actualize.phtml | 32 |
2 files changed, 19 insertions, 15 deletions
diff --git a/app/views/helpers/view/normal_view.phtml b/app/views/helpers/view/normal_view.phtml index 1b4388796..ce036e281 100644 --- a/app/views/helpers/view/normal_view.phtml +++ b/app/views/helpers/view/normal_view.phtml @@ -25,7 +25,7 @@ if (!empty($this->entries)) { $bottomline_favorite = $this->conf->bottomline_favorite; $bottomline_sharing = $this->conf->bottomline_sharing && ( $shaarli || $poche || $diaspora || $twitter || - $google_plus || $facebook || $email); + $google_plus || $facebook || $email || $print); $bottomline_tags = $this->conf->bottomline_tags; $bottomline_date = $this->conf->bottomline_date; $bottomline_link = $this->conf->bottomline_link; diff --git a/app/views/javascript/actualize.phtml b/app/views/javascript/actualize.phtml index 69689133c..1f6072c29 100644 --- a/app/views/javascript/actualize.phtml +++ b/app/views/javascript/actualize.phtml @@ -1,37 +1,41 @@ -var feeds = new Array (); +"use strict"; +var feeds = []; <?php foreach ($this->feeds as $feed) { ?> -feeds.push ("<?php echo Minz_Url::display (array ('c' => 'feed', 'a' => 'actualize', 'params' => array ('id' => $feed->id (), 'ajax' => '1')), 'php'); ?>"); +feeds.push("<?php echo Minz_Url::display (array ('c' => 'feed', 'a' => 'actualize', 'params' => array ('id' => $feed->id (), 'ajax' => '1')), 'php'); ?>"); <?php } ?> -function initProgressBar (init) { +function initProgressBar(init) { if (init) { - $("body").after ("\<div id=\"actualizeProgress\" class=\"actualizeProgress\">\ + $("body").after("\<div id=\"actualizeProgress\" class=\"actualizeProgress\">\ <?php echo Minz_Translate::t ('refresh'); ?> <span class=\"progress\">0 / " + feeds.length + "</span><br />\ <progress id=\"actualizeProgressBar\" value=\"0\" max=\"" + feeds.length + "\"></progress>\ </div>"); } else { - window.location.reload (); + window.location.reload(); } } -function updateProgressBar (i) { +function updateProgressBar(i) { $("#actualizeProgressBar").val(i); - $("#actualizeProgress .progress").html (i + " / " + feeds.length); + $("#actualizeProgress .progress").html(i + " / " + feeds.length); } -function updateFeeds () { - initProgressBar (true); +function updateFeeds() { + if (feeds.length === 0) { + return; + } + initProgressBar(true); var i = 0; for (var f in feeds) { - $.ajax ({ + $.ajax({ type: 'POST', url: feeds[f], - }).done (function (data) { + }).done(function (data) { i++; - updateProgressBar (i); + updateProgressBar(i); - if (i == feeds.length) { - initProgressBar (false); + if (i === feeds.length) { + initProgressBar(false); } }); } |
