diff options
| author | 2014-01-18 19:29:44 +0100 | |
|---|---|---|
| committer | 2014-01-18 19:29:44 +0100 | |
| commit | fdd179d344dbe8734480b83bb7a0fba189275d5a (patch) | |
| tree | c044bc5e7d60e8ad5ebccd676d064e2ac581d4d3 /p/scripts | |
| parent | 69f7bce75b6f45b7f8be376a5d9c14d5da62c91d (diff) | |
Corrections vue globale
Contribue à https://github.com/marienfressinaud/FreshRSS/issues/353
Diffstat (limited to 'p/scripts')
| -rw-r--r-- | p/scripts/global_view.js | 10 | ||||
| -rw-r--r-- | p/scripts/main.js | 8 |
2 files changed, 15 insertions, 3 deletions
diff --git a/p/scripts/global_view.js b/p/scripts/global_view.js index c34fbf1a7..3973cb2ec 100644 --- a/p/scripts/global_view.js +++ b/p/scripts/global_view.js @@ -24,6 +24,16 @@ function load_panel(link) { // en en ouvrant une autre ensuite, on se retrouve au même point de scroll $("#panel").scrollTop(0); + $('#nav_menu_read_all a, #bigMarkAsRead').click(function () { + $.ajax({ + url: $(this).attr("href"), + async: false + }); + //$("#panel .close").first().click(); + window.location.reload(false); + return false; + }); + panel_loading = false; }); } diff --git a/p/scripts/main.js b/p/scripts/main.js index 5bdc316db..3f6352baf 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -137,7 +137,9 @@ function mark_favorite(active) { if (active.closest('div').hasClass('not_read')) { var elem = $('#aside_flux .favorites').children(':first').get(0), feed_unreads = elem ? (parseInt(elem.getAttribute('data-unread'), 10) || 0) : 0; - elem.setAttribute('data-unread', Math.max(0, feed_unreads + inc)); + if (elem) { + elem.setAttribute('data-unread', Math.max(0, feed_unreads + inc)); + } } }); } @@ -559,6 +561,8 @@ function load_more_posts() { } function init_load_more(box) { + box_load_more = box; + var $next_link = $("#load_more"); if (!$next_link.length) { // no more article to load @@ -566,8 +570,6 @@ function init_load_more(box) { return; } - box_load_more = box; - url_load_more = $next_link.attr("href"); var $prefetch = $('#prefetch'); if ($prefetch.attr('href') !== url_load_more) { |
