diff options
| author | 2013-03-17 02:47:54 +0100 | |
|---|---|---|
| committer | 2013-03-17 02:47:54 +0100 | |
| commit | fb32aa4ef1253573115766bc48068ea1a7db4082 (patch) | |
| tree | 60c7f10eabc9bd2de4ecf2278b0545a26622416b /app/views | |
| parent | d63eddf0c5a563d11c880bb700dafc889ee87a3d (diff) | |
Amélioration affichage notifications + améliorations divers niveau affichage + ajout options pour auto-marquage des articles comme lus (à l'ouverture de l'article / du site / de la page)
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/configure/display.phtml | 20 | ||||
| -rw-r--r-- | app/views/configure/importExport.phtml | 4 | ||||
| -rw-r--r-- | app/views/index/about.phtml | 6 | ||||
| -rw-r--r-- | app/views/javascript/main.phtml | 45 |
4 files changed, 65 insertions, 10 deletions
diff --git a/app/views/configure/display.phtml b/app/views/configure/display.phtml index bf488dbe0..12292c137 100644 --- a/app/views/configure/display.phtml +++ b/app/views/configure/display.phtml @@ -20,7 +20,7 @@ </div> </div> - <legend>Configuration de l'affichage</legend> + <legend>Configuration de lecture</legend> <div class="form-group"> <label class="group-name" for="posts_per_page">Nombre d'articles par page</label> @@ -67,6 +67,24 @@ </div> </div> + <div class="form-group"> + <label class="group-name">Article automatiquement marqué comme lu lorsque</label> + <div class="group-controls"> + <label class="checkbox" for="check_open_article"> + <input type="checkbox" name="mark_open_article" id="check_open_article" value="yes"<?php echo $this->conf->markWhenArticle () == 'yes' ? ' checked="checked"' : ''; ?> /> + l'article est sélectionné + </label> + <label class="checkbox" for="check_open_site"> + <input type="checkbox" name="mark_open_site" id="check_open_site" value="yes"<?php echo $this->conf->markWhenSite () == 'yes' ? ' checked="checked"' : ''; ?> /> + l'article est ouvert sur le site d'origine + </label> + <label class="checkbox" for="check_open_page"> + <input type="checkbox" name="mark_open_page" id="check_open_page" value="yes"<?php echo $this->conf->markWhenPage () == 'yes' ? ' checked="checked"' : ''; ?> /> + la page est chargée + </label> + </div> + </div> + <div class="form-group form-actions"> <div class="group-controls"> <button type="submit" class="btn btn-important">Valider</button> diff --git a/app/views/configure/importExport.phtml b/app/views/configure/importExport.phtml index e660274d6..fd274b5b2 100644 --- a/app/views/configure/importExport.phtml +++ b/app/views/configure/importExport.phtml @@ -11,9 +11,7 @@ </body> </opml> <?php } else { ?> -<?php $this->partial ('aside_configure'); ?> - -<div class="post"> +<div class="post "> <form method="post" action="<?php echo Url::display (array ('c' => 'configure', 'a' => 'importExport', 'params' => array ('q' => 'import'))); ?>" enctype="multipart/form-data"> <legend>Import / export au format OPML</legend> <div class="form-group"> diff --git a/app/views/index/about.phtml b/app/views/index/about.phtml index ab19fe18a..e958807d2 100644 --- a/app/views/index/about.phtml +++ b/app/views/index/about.phtml @@ -10,7 +10,13 @@ <dt>Pour les rapports de bugs</dt> <dd><a href="https://github.com/marienfressinaud/FreshRSS/issues">sur Github</a> ou <a href="mailto:dev@marienfressinaud.fr">par mail</a></dd> + + <dt>Licence</dt> + <dd><a href="https://www.gnu.org/licenses/agpl-3.0.html">AGPL 3</a></dd> </dl> <p>FreshRSS est un agrégateur de flux RSS à auto-héberger à l'image de <a href="http://rsslounge.aditu.de/">RSSLounge</a>, <a href="http://tt-rss.org/redmine/projects/tt-rss/wiki">TinyTinyRSS</a> ou <a href="http://projet.idleman.fr/leed/">Leed</a>. Il se veut léger et facile à prendre en main tout en étant un outil puissant et paramétrable. L'objectif étant d'offrir une alternative sérieuse au futur feu-Google Reader.</p> + + <h1>Crédits</h1> + Les <a href="https://git.gnome.org/browse/gnome-icon-theme-symbolic">icônes</a> sont issus du <a href="https://www.gnome.org/">projet GNOME</a>. La police <em>Open Sans</em> utilisée a été créée par <a href="https://www.google.com/webfonts/specimen/Open+Sans">Steve Matteson</a>. FreshRSS repose sur <a href="https://github.com/marienfressinaud/MINZ">Minz</a>, un framework PHP. </div> diff --git a/app/views/javascript/main.phtml b/app/views/javascript/main.phtml index a4e3229bf..d2bde2a42 100644 --- a/app/views/javascript/main.phtml +++ b/app/views/javascript/main.phtml @@ -4,7 +4,10 @@ var hide_posts = true; var hide_posts = false; <?php } ?> -<?php $s = $this->conf->shortcuts (); ?> +<?php + $s = $this->conf->shortcuts (); + $mark = $this->conf->markWhen (); +?> function redirect (url, new_tab) { if (url) { @@ -32,13 +35,22 @@ function slide (new_active, old_active) { offset: new_active.position ().top }); } + + <?php if ($mark['article'] == 'yes') { ?> + mark_read(new_active, true); + <?php } ?> } -function mark_read (active) { - if (active[0] === undefined) { +var load = false; +function mark_read (active, only_not_read) { + if (active[0] === undefined || ( + only_not_read === true && !active.hasClass("not_read")) || + load === true) { return false; } + load = true; + url = active.find ("a.read").attr ("href"); if (url === undefined) { return false; @@ -57,6 +69,8 @@ function mark_read (active) { } else { active.addClass ("not_read"); } + + load = false; }); } @@ -95,6 +109,13 @@ function init_img () { } function init_posts () { + <?php if ($mark['page'] == 'yes') { ?> + if ($(".flux.not_read")[0] != undefined) { + url = $(".nav_menu a.read_all").attr ("href"); + redirect (url, false); + } + <?php } ?> + init_img (); if (hide_posts) { @@ -112,7 +133,7 @@ function init_posts () { $(".flux a.read").click (function () { active = $(this).parents (".flux"); - mark_read (active); + mark_read (active, false); return false; }); @@ -127,6 +148,12 @@ function init_posts () { $(".flux .content a").click (function () { $(this).attr ('target', '_blank'); }); + + <?php if ($mark['site'] == 'yes') { ?> + $(".flux .link a").click (function () { + mark_read($(this).parent().parent().parent(), true); + }); + <?php } ?> } function init_column_categories () { @@ -152,13 +179,13 @@ $(document).ready (function () { shortcut.add("<?php echo $s['mark_read']; ?>", function () { // on marque comme lu ou non lu active = $(".flux.active"); - mark_read (active); + mark_read (active, false); }, { 'disable_in_input':true }); shortcut.add("shift+<?php echo $s['mark_read']; ?>", function () { // on marque tout comme lu - url = $("#top a.read_all").attr ("href"); + url = $(".nav_menu a.read_all").attr ("href"); redirect (url, false); }, { 'disable_in_input':true @@ -233,6 +260,12 @@ $(document).ready (function () { shortcut.add("<?php echo $s['go_website']; ?>", function () { url = $(".flux.active .link a").attr ("href"); + <?php if ($mark['site'] == 'yes') { ?> + $(".flux.active").each (function () { + mark_read($(this), true); + }); + <?php } ?> + redirect (url, true); }, { 'disable_in_input':true |
