aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-02-13 21:01:12 +0100
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-02-13 21:01:12 +0100
commit178af19fb0e7c13015e991593feea6a5f4aafcc0 (patch)
treea24f99372a88e14e67f38ae9478f7d38508c0e2e /app
parentc33b13809ef4e1941d3655479db8c5fcf5731013 (diff)
Add possibility to open notification in JavaScript + new message
Notifications can be opened directly in JavaScript Class .notification is now id #notification New message when there is no feed to refresh See 06abbd02c2d10934155b2464f73d8ecdb2a68de1 (comments)
Diffstat (limited to 'app')
-rwxr-xr-xapp/Controllers/feedController.php4
-rw-r--r--app/i18n/en.php1
-rw-r--r--app/i18n/fr.php1
-rw-r--r--app/layout/layout.phtml11
-rw-r--r--app/views/javascript/actualize.phtml1
5 files changed, 13 insertions, 5 deletions
diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php
index d98c77558..264607216 100755
--- a/app/Controllers/feedController.php
+++ b/app/Controllers/feedController.php
@@ -283,8 +283,8 @@ class FreshRSS_feed_Controller extends Minz_ActionController {
} else {
// aucun flux n'a été mis à jour, oups
$notif = array (
- 'type' => 'bad',
- 'content' => Minz_Translate::t ('no_feed_actualized')
+ 'type' => 'good',
+ 'content' => Minz_Translate::t ('no_feed_to_refresh')
);
}
diff --git a/app/i18n/en.php b/app/i18n/en.php
index af051673d..369853610 100644
--- a/app/i18n/en.php
+++ b/app/i18n/en.php
@@ -248,6 +248,7 @@ return array (
'rss_feeds_of' => 'RSS feed of %s',
'refresh' => 'Refresh',
+ 'no_feed_to_refresh' => 'There is no feed to refresh…',
'today' => 'Today',
'yesterday' => 'Yesterday',
diff --git a/app/i18n/fr.php b/app/i18n/fr.php
index 5dc184aa3..275c3b1d8 100644
--- a/app/i18n/fr.php
+++ b/app/i18n/fr.php
@@ -248,6 +248,7 @@ return array (
'rss_feeds_of' => 'Flux RSS de %s',
'refresh' => 'Actualisation',
+ 'no_feed_to_refresh' => 'Il n’y a aucun flux à actualiser…',
'today' => 'Aujourd’hui',
'yesterday' => 'Hier',
diff --git a/app/layout/layout.phtml b/app/layout/layout.phtml
index d6a1737ee..1501df3c3 100644
--- a/app/layout/layout.phtml
+++ b/app/layout/layout.phtml
@@ -36,13 +36,18 @@
</div>
<?php
+ $msg = '';
+ $status = 'closed';
if (isset ($this->notification)) {
+ $msg = $this->notification['content'];
+ $status = $this->notification['type'];
+
invalidateHttpCache();
+ }
?>
-<div class="notification <?php echo $this->notification['type']; ?>">
- <?php echo $this->notification['content']; ?>
+<div id="notification" class="<?php echo $status; ?>">
+ <span class="msg"><?php echo $msg; ?></span>
<a class="close" href=""><?php echo FreshRSS_Themes::icon('close'); ?></a>
</div>
-<?php } ?>
</body>
</html>
diff --git a/app/views/javascript/actualize.phtml b/app/views/javascript/actualize.phtml
index 58c3b7c8f..a2b076ea8 100644
--- a/app/views/javascript/actualize.phtml
+++ b/app/views/javascript/actualize.phtml
@@ -24,6 +24,7 @@ function updateProgressBar(i) {
function updateFeeds() {
if (feed_count === 0) {
+ openNotification("<?php echo Minz_Translate::t ('no_feed_to_refresh'); ?>", "good");
return;
}
initProgressBar(true);