From 724e13f0a6419b046b33da71e66058e279551edd Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Fri, 31 Oct 2014 16:43:05 +0100 Subject: Fix global view mark as read --- p/scripts/global_view.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'p/scripts') diff --git a/p/scripts/global_view.js b/p/scripts/global_view.js index 14909f44e..7d7ba22b5 100644 --- a/p/scripts/global_view.js +++ b/p/scripts/global_view.js @@ -24,12 +24,13 @@ function load_panel(link) { // en en ouvrant une autre ensuite, on se retrouve au même point de scroll $("#panel").scrollTop(0); - $('#panel').on('click', '#nav_menu_read_all > a, #nav_menu_read_all .item > a, #bigMarkAsRead', function () { + $('#panel').on('click', '#nav_menu_read_all button, #bigMarkAsRead', function () { + console.log($(this).attr("formaction")); $.ajax({ - url: $(this).attr("href"), + type: "POST", + url: $(this).attr("formaction"), async: false }); - //$("#panel .close").first().click(); window.location.reload(false); return false; }); @@ -39,9 +40,8 @@ function load_panel(link) { } function init_close_panel() { - $("#panel .close").click(function () { - $("#panel").html('' + icons['close'] + ''); - init_close_panel(); + $("#overlay .close").click(function () { + $("#panel").html(''); $("#panel").slideToggle(); $("#overlay").fadeOut(); -- cgit v1.2.3