From 48f602734d1ebdb00ba170881e179b16633e778d Mon Sep 17 00:00:00 2001 From: Eygene Ryabinkin Date: Sun, 12 Sep 2010 23:48:49 +0400 Subject: [PATCH] www/trac-keywords: add omitted 'var' qualified to the JS code Without it, IE goes mad and throws errors that some object does not support some method. This is a known issue, because IE creates global variables with the names for all DOM nodes, so the 'link' should really be made local variable. Signed-off-by: Eygene Ryabinkin --- www/trac-keywords/Makefile | 1 + www/trac-keywords/files/patch-fix-javascript | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 0 deletions(-) create mode 100644 www/trac-keywords/files/patch-fix-javascript diff --git a/www/trac-keywords/Makefile b/www/trac-keywords/Makefile index 409d768..0485baa 100644 --- a/www/trac-keywords/Makefile +++ b/www/trac-keywords/Makefile @@ -7,6 +7,7 @@ PORTNAME= keywords PORTVERSION= 0.2 +PORTREVISION= 1 CATEGORIES= www python MASTER_SITES= http://dist.codelabs.ru/fbsd/ PKGNAMEPREFIX= trac- diff --git a/www/trac-keywords/files/patch-fix-javascript b/www/trac-keywords/files/patch-fix-javascript new file mode 100644 index 0000000..5771d0f --- /dev/null +++ b/www/trac-keywords/files/patch-fix-javascript @@ -0,0 +1,22 @@ +--- trackeywords/templates/keywords.cs.orig 2010-09-12 23:33:05.000000000 +0400 ++++ trackeywords/templates/keywords.cs 2010-09-12 23:33:25.000000000 +0400 +@@ -9,7 +9,7 @@ + var el = document.getElementById('keywords'); + var currentTags = el.value.split(/\s+/); + for(i in currentTags) { +- link = document.getElementById('add_' + currentTags[i]); ++ var link = document.getElementById('add_' + currentTags[i]); + if(link) + link.className = "sel"; + } +--- trackeywords/templates/keywords.html.orig 2010-09-12 23:33:05.000000000 +0400 ++++ trackeywords/templates/keywords.html 2010-09-12 23:33:46.000000000 +0400 +@@ -14,7 +14,7 @@ + var currentTags = el.value.split(/\s+/); + + for(i in currentTags) { +- link = document.getElementById('add_' + currentTags[i]); ++ var link = document.getElementById('add_' + currentTags[i]); + if(link) + link.className = "sel"; + } -- 1.7.2.1