mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-03 15:24:00 +01:00
onclick needs if check and simpler title updating
onclick function needed is statement plus passing of event on anon function to solve repeated CTRL+click issue Update title not by adjusting hardcoded values but by looking to ID of targetElem We're able to get rid of a lot of code here as the onmouseover function is now looking to a child node item in get-branch.php, so no need to mess with updating hardcoded string values.
This commit is contained in:
@@ -440,7 +440,11 @@ var ICEcoder = {
|
||||
openCloseDir: function(dir,load) {
|
||||
var node, d;
|
||||
|
||||
dir.onclick = function() {top.ICEcoder.openCloseDir(this,false)};
|
||||
dir.onclick = function(event) {
|
||||
if(!event.ctrlKey) {
|
||||
top.ICEcoder.openCloseDir(this,false);
|
||||
}
|
||||
};
|
||||
node = dir.parentNode;
|
||||
if (node.nextSibling) {node = node.nextSibling};
|
||||
if (node && node.tagName=="UL") {
|
||||
@@ -807,11 +811,9 @@ var ICEcoder = {
|
||||
targetElem = document.getElementById('filesFrame').contentWindow.document.getElementById(shortURL);
|
||||
// Set the name to be as per our new file/folder name
|
||||
targetElem.innerHTML = file;
|
||||
// Finally, update the ID of the target & set a new mouseover function for the parent too
|
||||
// Finally, update the ID of the target & set a new title and perms ID
|
||||
targetElem.id = location.replace(/\//g,"|") + "|" + file;
|
||||
newMouseOver = targetElem.parentNode.onmouseover.toString().replace(shortURL.substring(shortURL.lastIndexOf("|")+1),file).split('\'');
|
||||
eval("targetElem.parentNode.onmouseover = function() { top.ICEcoder.overFileFolder('"+newMouseOver[1]+"','"+newMouseOver[3]+"');}");
|
||||
targetElem.parentNode.title = function(fileFolder) {return fileFolder.replace(/\|/g,"/");}(newMouseOver[3]);
|
||||
targetElem.parentNode.title = targetElem.id.replace(/\|/g,"/");
|
||||
targetElemPerms = document.getElementById('filesFrame').contentWindow.document.getElementById(shortURL+"_perms");
|
||||
targetElemPerms.id = location.replace(/\//g,"|") + "|" + file + "_perms";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user