From fb8408e878dfa9c4282f28ded6e31e50e0a10ce5 Mon Sep 17 00:00:00 2001 From: mossroy Date: Fri, 10 May 2013 16:45:25 +0200 Subject: [PATCH] Small fixes for links inside an article --- www/js/app.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/www/js/app.js b/www/js/app.js index 96c82807..4601a2ef 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -164,11 +164,10 @@ define(function(require) { title = title[0]; if (title.fileNr == 255) { localArchive.resolveRedirect(title, readArticle); + return; } } - else { - localArchive.readArticle(title, displayArticleInForm); - } + localArchive.readArticle(title, displayArticleInForm); } /** @@ -190,6 +189,9 @@ define(function(require) { else if (url.substring(0,4) === "http") { // It's an external link : do nothing } + else if (url.substring(0,2) === ".." || url.substring(0,4) === "./..") { + // It's a link to another language : TODO redirect to the online article? + } else { // It's a link to another article : add an onclick event to go to this article // instead of following the link