diff options
| author | 2013-11-10 22:16:55 +0100 | |
|---|---|---|
| committer | 2013-11-10 22:16:55 +0100 | |
| commit | 0c96d3489b3a74e10804206f1be0789fb63a6949 (patch) | |
| tree | 71e6ced84a78d208fd6c0eb58913fd49682734d8 /public/scripts | |
| parent | e7fa10dc9de6c136b0f57097c7d9d8b93460c43f (diff) | |
Mise à jour de la vue globale
* Nombre de non lus mis à jour automatiquement
* Mise à jour structure HTML
* Mise à jour design
Diffstat (limited to 'public/scripts')
| -rw-r--r-- | public/scripts/global_view.js | 4 | ||||
| -rw-r--r-- | public/scripts/main.js | 12 |
2 files changed, 11 insertions, 5 deletions
diff --git a/public/scripts/global_view.js b/public/scripts/global_view.js index 2c95bdfb7..94580dc0d 100644 --- a/public/scripts/global_view.js +++ b/public/scripts/global_view.js @@ -35,11 +35,13 @@ function init_close_panel() { init_close_panel(); $("#panel").slideToggle(); $("#overlay").fadeOut(); + + return false; }); } function init_global_view() { - $("#stream .category a").click(function () { + $("#stream .box-category a").click(function () { var link = $(this).attr("href"); load_panel(link); diff --git a/public/scripts/main.js b/public/scripts/main.js index 2f3ed38f1..e0df69f61 100644 --- a/public/scripts/main.js +++ b/public/scripts/main.js @@ -68,15 +68,19 @@ function mark_read(active, only_not_read) { //Update unread: all if (feed_priority > 0) { elem = $('#aside_flux .all').children(':first').get(0); - feed_unread = elem ? (parseInt(elem.getAttribute('data-unread'), 10) || 0) : 0; - elem.setAttribute('data-unread', Math.max(0, feed_unread + inc)); + if (elem) { + feed_unread = elem ? (parseInt(elem.getAttribute('data-unread'), 10) || 0) : 0; + elem.setAttribute('data-unread', Math.max(0, feed_unread + inc)); + } } //Update unread: favourites if (active.closest('div').hasClass('favorite')) { elem = $('#aside_flux .favorites').children(':first').get(0); - feed_unread = elem ? (parseInt(elem.getAttribute('data-unread'), 10) || 0) : 0; - elem.setAttribute('data-unread', Math.max(0, feed_unread + inc)); + if (elem) { + feed_unread = elem ? (parseInt(elem.getAttribute('data-unread'), 10) || 0) : 0; + elem.setAttribute('data-unread', Math.max(0, feed_unread + inc)); + } } //Update unread: title |
