Monotone-Parent: 05aeb8f1ae44da7f6bcfe572acfabe06f62b5581

Monotone-Revision: ab64e7a2a001d712b867322558be1f8685e0ab71

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2006-10-30T22:43:13
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2006-10-30 22:43:13 +00:00
parent ff61bea99e
commit a55da84f79
4 changed files with 170 additions and 39 deletions
+28 -4
View File
@@ -1213,6 +1213,14 @@ String.prototype.trim = function() {
return this.replace(/(^\s+|\s+$)/g, '');
}
String.prototype.capitalize = function() {
return this.replace(/\w+/g,
function(a) {
return ( a.charAt(0).toUpperCase()
+ a.substr(1).toLowerCase() );
});
}
String.prototype.decodeEntities = function() {
return this.replace(/&#(\d+);/g,
function(wholematch, parenmatch1) {
@@ -1221,21 +1229,37 @@ String.prototype.decodeEntities = function() {
}
HTMLInputElement.prototype._replicate = function() {
this.replica.value = this.value;
if (this.replica) {
this.replica.value = this.value;
var onReplicaChangeEvent = document.createEvent("Event");
onReplicaChangeEvent.initEvent("change", true, true);
this.replica.dispatchEvent(onReplicaChangeEvent);
}
}
HTMLInputElement.prototype.assignReplica = function(otherInput) {
if (!this._onChangeBound) {
this.addEventListener("change", this._replicate, false);
this._onChangeBound = true;
}
this.replica = otherInput;
this.addEventListener("change", this._replicate, false);
}
HTMLSelectElement.prototype._replicate = function() {
this.replica.value = this.value;
if (this.replica) {
this.replica.value = this.value;
var onReplicaChangeEvent = document.createEvent("Event");
onReplicaChangeEvent.initEvent("change", true, true);
this.replica.dispatchEvent(onReplicaChangeEvent);
}
}
HTMLSelectElement.prototype.assignReplica = function(otherSelect) {
if (!this._onChangeBound) {
this.addEventListener("change", this._replicate, false);
this._onChangeBound = true;
}
this.replica = otherSelect;
this.addEventListener("change", this._replicate, false);
}
function d2h(d) {