corrected apostrophe bug V02.06
authorveltr
Tue, 13 Mar 2012 16:15:22 +0100
changeset 168 1de44b71d69c
parent 167 5629f485f329
child 169 822676c32474
corrected apostrophe bug
web/hdalab/static/hdalab/js/gomina.js
--- a/web/hdalab/static/hdalab/js/gomina.js	Tue Mar 13 15:39:54 2012 +0100
+++ b/web/hdalab/static/hdalab/js/gomina.js	Tue Mar 13 16:15:22 2012 +0100
@@ -314,7 +314,9 @@
                     + _d.description.replace(/(^.{0,160})([\s]|$)(.*)/,'$1…')
                     + '</p><ul class="content-tags">'
                     + _d.tags.map(function(_t) {
-                        return '<li class="content-tag-item"><a href="#" onclick="tagInfo(\''+_t.label+'\'); return false;"'
+                        return '<li class="content-tag-item"><a href="#" onclick="tagInfo(this.getAttribute(\'original-label\')); return false;" original-label="'
+                            + _t.label
+                            + '"'
                             + (_t.match ? ' class="tagmatch"' : '')
                             + '>'
                             + _t.translated_label
@@ -444,7 +446,9 @@
             + _(data.tags).map(function(_d) {
                 return '<li style="font-size:'
                     + parseInt(10 + _scale * Math.sqrt(_d.score - _minTag))
-                    + 'px;"><a href="#" onclick="tagInfo(\''+_d.label+'\'); return false;"'
+                    + 'px;"><a href="#" onclick="tagInfo(this.getAttribute(\'original-label\')); return false;" original-label="'
+                    + _d.label
+                    +'"'
                     + (_d.match ? ' class="tagmatch"' : '')
                     + '>'
                     + _d.translated_label
@@ -491,7 +495,9 @@
             '<ul class="disc-ul">'
             + _disc.map(function(_d) {
                 var _col = getGradient(_d.score / _max);
-                return '<li class="disc-li" onclick="tagInfo(\''+_d.label+'\'); return false;"><div class="disc-label"><a href="#">'
+                return '<li class="disc-li" onclick="tagInfo(this.getAttribute(\'original-label\')); return false;" original-label="'
+                    + _d.label
+                    + '"><div class="disc-label"><a href="#">'
                     + _d.translated_label
                     + '</a></div><div class="disc-bar" style="background:'
                     + _col