Monotone-Parent: 3763045346dc745f788d643351451debf6ce0626

Monotone-Revision: 11701b15db10c26f527b23aa39f6d4ba7256523d

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2006-10-23T21:37:22
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2006-10-23 21:37:22 +00:00
parent 4eb06322e3
commit be4b5bbb2a
2 changed files with 39 additions and 0 deletions

View File

@@ -1,5 +1,8 @@
2006-10-23 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* UI/WebServerResources/generic.js: added code to enable or
disable anchor visually (following our internal algorithm).
* UI/Scheduler/UIxComponentEditor.m ([UIxComponentEditor -init]):
added new "url" ivar with its classic accessors.
([UIxComponentEditor -urlButtonClasses]): new method that returns

View File

@@ -1002,6 +1002,42 @@ function onTabClick(event) {
return false;
}
function enableAnchor(anchor) {
var classStr = '' + anchor.getAttribute("class");
var position = classStr.indexOf("_disabled", 0);
if (position > -1) {
var disabledHref = anchor.getAttribute("disabled-href");
if (disabledHref)
anchor.setAttribute("href", disabledHref);
var disabledOnclick = anchor.getAttribute("disabled-onclick");
if (disabledOnclick)
anchor.setAttribute("onclick", disabledOnclick);
anchor.removeClassName("_disabled");
anchor.setAttribute("disabled-href", null);
anchor.setAttribute("disabled-onclick", null);
anchor.disabled = 0;
anchor.enabled = 1;
}
}
function disableAnchor(anchor) {
var classStr = '' + anchor.getAttribute("class");
var position = classStr.indexOf("_disabled", 0);
if (position < 0) {
var href = anchor.getAttribute("href");
if (href)
anchor.setAttribute("disabled-href", href);
var onclick = anchor.getAttribute("onclick");
if (onclick)
anchor.setAttribute("disabled-onclick", onclick);
anchor.addClassName("_disabled");
anchor.setAttribute("href", null);
anchor.setAttribute("onclick", null);
anchor.disabled = 1;
anchor.enabled = 0;
}
}
/* custom extensions to the DOM api */
HTMLElement.prototype.childNodesWithTag = function(tagName) {
var matchingNodes = new Array();