From 4d21eb67468a83c849b1bbf683eec1a573aacf04 Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Sun, 28 Oct 2012 14:56:52 +0100 Subject: Correction js lorsqu'on n'est pas loggué MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/javascript/main.phtml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'app/views/javascript') diff --git a/app/views/javascript/main.phtml b/app/views/javascript/main.phtml index 6e216f598..fe0492b67 100644 --- a/app/views/javascript/main.phtml +++ b/app/views/javascript/main.phtml @@ -63,8 +63,11 @@ function mark_read (active) { if (active[0] === undefined) { return false; } - + url = active.find ("a.read").attr ("href"); + if (url === undefined) { + return false; + } $.ajax ({ type: 'POST', @@ -92,6 +95,9 @@ function mark_favorite (active) { } url = active.find ("a.bookmark").attr ("href"); + if (url === undefined) { + return false; + } $.ajax ({ type: 'POST', -- cgit v1.2.3