From: <ast...@hy...> - 2008-09-11 21:30:37
|
Author: astroganov Date: 2008-09-11 14:30:30 -0700 (Thu, 11 Sep 2008) New Revision: 11100 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=11100 Modified: trunk/web/js/lib/lib.js Log: followup to r11098 (HHQ-2378 fix), moved tooltip to link's title instead of extra abbr tag. Modified: trunk/web/js/lib/lib.js =================================================================== --- trunk/web/js/lib/lib.js 2008-09-11 20:26:58 UTC (rev 11099) +++ trunk/web/js/lib/lib.js 2008-09-11 21:30:30 UTC (rev 11100) @@ -269,18 +269,20 @@ function loadSearchData(type, response, evt) { if(type == 'load'){ var resURL = resourceURL+"?eid="; - var template = "<li class='type'><a href='link'>text<\/a><\/li>"; + var template = "<li class='type'><a href='link' title='fullname'>text<\/a><\/li>"; var count = 0; var res = ""; var relink = new RegExp("link", "g"); var retext = new RegExp("text", "g"); + var refulltext = new RegExp("fullname", "g"); var retype = new RegExp("type", "g"); for(var i = 0; i < response.length; i++) { var length = response[i].name.length; + var fullname = response[i].name; if(length >= 37){ - response[i].name = '<abbr title="'+response[i].name+'">'+response[i].name.substring(0,4) + "..." + response[i].name.substring(length-28, length)+'</abbr>'; + response[i].name = response[i].name.substring(0,4) + "..." + response[i].name.substring(length-28, length); } - res += template.replace(relink, resURL+response[i].eId).replace(retext, response[i].name).replace(retype, response[i].resType); + res += template.replace(relink, resURL+response[i].eId).replace(retext, response[i].name).replace(retype, response[i].resType).replace(refulltext, fullname); count++; } dojo.byId("resourceResults").innerHTML = res; |