Loading...
 
Skip to main content

Fix for Bug Ticket ID 2184

Status
Open
Subject
Fix for Bug Ticket ID 2184
Version
6.x
Category
  • Patch
Feature
Menu
Modules
Submitted by
mycroft
Lastmod by
mycroft
Rating
(0)
Related-to
Description

I have confirmed this bug (2184) in Tiki 6.3 using Chrome and IE7/8.

I am not a javascript guru so this may not be the most eloquent solution, but it works.

To fix, replace the icntoggle function (line 693) in tiki-js.js with the following:

Solution

function icntoggle(foo, img) {

if (!img) {
if (document.getElementsByName("icn" + foo).item(0).attributes.item("src").value.search(/\\//)) {
img = document.getElementsByName("icn" + foo).item(0).attributes.item("src").value.replace(/.*\\/(^\\/*)$/, "$1");
} else {
img = 'folder.png';
}
}

if ($("#" + foo + ":hidden").length) {
show(foo, true, "menu");
document.getElementsByName("icn" + foo).item(0).attributes.item("src").value = document.getElementsByName("icn" + foo).item(0).attributes.item("src").value.replace(/^\\/*$/, 'o' + img);

} else {
hide(foo, true, "menu");
img = img.replace(/(^|\/|\\)o(.*)$/, '$1$2');
document.getElementsByName("icn" + foo).item(0).attributes.item("src").value = document.getElementsByName("icn" + foo).item(0).attributes.item("src").value.replace(/^\\/*$/, img);
}
}

Priority
25
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
3909
Created
Thursday 02 June, 2011 14:49:15 UTC
by mycroft
LastModif
Thursday 02 June, 2011 14:49:15 UTC


Show PHP error messages