[dev] [commit] r1009 - templates/common/bits wwwbase/js

automailer at dexonline.ro automailer at dexonline.ro
Thu Sep 26 10:16:26 EEST 2013


Author: grigoroiualex
Date: Thu Sep 26 10:16:26 2013
New Revision: 1009

Log:
Made tags ids more specific by adding 'tagsInfo' prefix, as to avoid future id conflicts.

Modified:
   templates/common/bits/tagsInfo.ihtml
   wwwbase/js/dexGallery.js

Modified: templates/common/bits/tagsInfo.ihtml
==============================================================================
--- templates/common/bits/tagsInfo.ihtml	Wed Sep 25 21:33:00 2013	(r1008)
+++ templates/common/bits/tagsInfo.ihtml	Thu Sep 26 10:16:26 2013	(r1009)
@@ -1,6 +1,6 @@
 <div id="tagsInfo">
 {foreach from=$tags item=img}
-  <div id="{$img.id}">
+  <div id="tagsInfo_{$img.id}">
     <p>{$img.width}, {$img.height}</p>
     {foreach from=$img.tags item=tag}
       <p>{$tag.textX}, {$tag.textY}, {$tag.imgX}, {$tag.imgY}, "{$tag.label}", "{$tag.lexeme}"</p>

Modified: wwwbase/js/dexGallery.js
==============================================================================
--- wwwbase/js/dexGallery.js	Wed Sep 25 21:33:00 2013	(r1008)
+++ wwwbase/js/dexGallery.js	Thu Sep 26 10:16:26 2013	(r1009)
@@ -43,7 +43,7 @@
   // In the tagsInfo div, all the tags corresponding to one image are nested
   // in a div element whose id is the the unique id of that image in the Visual table.
   // Thus the title is parsed, the id extracted and the div element with that specific id selected.
-  var tags = $('#' + parseInt(title)).children();
+  var tags = $('#tagsInfo_' + parseInt(title)).children();
   // As we want the title to show the lexeme, the id is removed.
   $('#cboxTitle').html(title.match(/[^\d]+$/));
 


More information about the Dev mailing list