summaryrefslogtreecommitdiff
authorGiulio Cesare Solaroli <giulio.cesare@clipperz.com>2012-03-17 21:08:23 (UTC)
committer Giulio Cesare Solaroli <giulio.cesare@clipperz.com>2012-03-17 21:08:23 (UTC)
commit928f3f3ed3981f7f81b69ed94f2a315205db39fa (patch) (unidiff)
tree8a47229b56e4c906de8512baf0c5ca100bc03dfb
parentbf7d8191a3a6dbd092a88911098a3e7f6cf30cf7 (diff)
downloadclipperz-928f3f3ed3981f7f81b69ed94f2a315205db39fa.zip
clipperz-928f3f3ed3981f7f81b69ed94f2a315205db39fa.tar.gz
clipperz-928f3f3ed3981f7f81b69ed94f2a315205db39fa.tar.bz2
Fixed frontend properties and updated MochiKit version
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--frontend/beta/properties/beta.properties.json3
-rw-r--r--frontend/gamma/js/MochiKit/Async.js118
-rw-r--r--frontend/gamma/js/MochiKit/Base.js140
-rw-r--r--frontend/gamma/js/MochiKit/Color.js17
-rw-r--r--frontend/gamma/js/MochiKit/DOM.js165
-rw-r--r--frontend/gamma/js/MochiKit/DateTime.js25
-rw-r--r--frontend/gamma/js/MochiKit/DragAndDrop.js14
-rw-r--r--frontend/gamma/js/MochiKit/Format.js16
-rw-r--r--frontend/gamma/js/MochiKit/Iter.js16
-rw-r--r--frontend/gamma/js/MochiKit/Logging.js4
-rw-r--r--frontend/gamma/js/MochiKit/LoggingPane.js13
-rw-r--r--frontend/gamma/js/MochiKit/MochiKit.js9
-rw-r--r--frontend/gamma/js/MochiKit/MockDOM.js9
-rw-r--r--frontend/gamma/js/MochiKit/Position.js2
-rw-r--r--frontend/gamma/js/MochiKit/Selector.js16
-rw-r--r--frontend/gamma/js/MochiKit/Signal.js47
-rw-r--r--frontend/gamma/js/MochiKit/Sortable.js12
-rw-r--r--frontend/gamma/js/MochiKit/Style.js19
-rw-r--r--frontend/gamma/js/MochiKit/Test.js2
-rw-r--r--frontend/gamma/js/MochiKit/Text.js349
-rw-r--r--frontend/gamma/js/MochiKit/Visual.js39
-rw-r--r--frontend/gamma/js/MochiKit/__package__.js18
-rw-r--r--frontend/gamma/js/main.js6
-rw-r--r--frontend/gamma/properties/gamma.properties.json7
-rw-r--r--frontend/gamma/tests/tests/Clipperz/Crypto/AES.html1
-rw-r--r--frontend/gamma/tests/tests/Clipperz/Crypto/AES.performance.html1
-rw-r--r--frontend/gamma/tests/tests/Clipperz/Crypto/Base.html1
-rw-r--r--frontend/gamma/tests/tests/Clipperz/Crypto/BigInt.html1
-rw-r--r--frontend/gamma/tests/tests/Clipperz/Crypto/ECC.BinaryField.FiniteField.B283.html1
-rw-r--r--frontend/gamma/tests/tests/Clipperz/Crypto/ECC.BinaryField.FiniteField.html1
-rw-r--r--frontend/gamma/tests/tests/Clipperz/Crypto/ECC.BinaryField.Value.html1
-rw-r--r--frontend/gamma/tests/tests/Clipperz/Crypto/PRNG.html1
-rw-r--r--frontend/gamma/tests/tests/Clipperz/Crypto/RSA.html1
-rw-r--r--frontend/gamma/tests/tests/Clipperz/Crypto/SHA.html1
-rw-r--r--frontend/gamma/tests/tests/Clipperz/Crypto/SRP.html1
-rw-r--r--frontend/gamma/tests/tests/Clipperz/Crypto/Usage.html1
-rw-r--r--frontend/gamma/tests/tests/Clipperz/PM/Date.html1
-rw-r--r--frontend/gamma/tests/tests/Clipperz/PM/Proxy.html1
-rw-r--r--frontend/gamma/tests/tests/Clipperz/PM/Toll.html1
-rw-r--r--frontend/gamma/tests/tests/Clipperz/PM/UI/Web/Controllers/MainController.html1
-rw-r--r--frontend/gamma/tests/tests/Clipperz/RoboFormExportProcessor.html1
-rw-r--r--frontend/gamma/tests/tests/Components/CardDialogNew/index.html4
-rw-r--r--frontend/gamma/tests/tests/Components/Tooltips/index.html4
43 files changed, 594 insertions, 497 deletions
diff --git a/frontend/beta/properties/beta.properties.json b/frontend/beta/properties/beta.properties.json
index 7b0c1f9..476becd 100644
--- a/frontend/beta/properties/beta.properties.json
+++ b/frontend/beta/properties/beta.properties.json
@@ -3,6 +3,9 @@
3 "mochikit.repository": "http://svn.mochikit.com/mochikit/trunk/", 3 "mochikit.repository": "http://svn.mochikit.com/mochikit/trunk/",
4 "mochikit.version": "1249" 4 "mochikit.version": "1249"
5 }, 5 },
6
7 "html.template": "index_template.html",
8
6 "js": [ 9 "js": [
7 "MochiKit/Base.js", 10 "MochiKit/Base.js",
8 "MochiKit/Iter.js", 11 "MochiKit/Iter.js",
diff --git a/frontend/gamma/js/MochiKit/Async.js b/frontend/gamma/js/MochiKit/Async.js
index c7408e7..cc43835 100644
--- a/frontend/gamma/js/MochiKit/Async.js
+++ b/frontend/gamma/js/MochiKit/Async.js
@@ -8,7 +8,7 @@ See <http://mochikit.com/> for documentation, downloads, license, etc.
8 8
9***/ 9***/
10 10
11MochiKit.Base._module('Async', '1.5', ['Base']); 11MochiKit.Base.module(MochiKit, 'Async', '1.5', ['Base']);
12 12
13/** @id MochiKit.Async.Deferred */ 13/** @id MochiKit.Async.Deferred */
14MochiKit.Async.Deferred = function (/* optional */ canceller) { 14MochiKit.Async.Deferred = function (/* optional */ canceller) {
@@ -20,28 +20,32 @@ MochiKit.Async.Deferred = function (/* optional */ canceller) {
20 this.canceller = canceller; 20 this.canceller = canceller;
21 this.silentlyCancelled = false; 21 this.silentlyCancelled = false;
22 this.chained = false; 22 this.chained = false;
23 this.finalized = false;
23}; 24};
24 25
25MochiKit.Async.Deferred.prototype = { 26MochiKit.Async.Deferred.prototype = {
26 /** @id MochiKit.Async.Deferred.prototype.repr */ 27 /** @id MochiKit.Async.Deferred.prototype.repr */
27 repr: function () { 28 repr: function () {
28 var state; 29 return 'Deferred(' + this.id + ', ' + this.state() + ')';
29 if (this.fired == -1) {
30 state = 'unfired';
31 } else if (this.fired === 0) {
32 state = 'success';
33 } else {
34 state = 'error';
35 }
36 return 'Deferred(' + this.id + ', ' + state + ')';
37 }, 30 },
38 31
39 toString: MochiKit.Base.forwardCall("repr"), 32 toString: MochiKit.Base.forwardCall("repr"),
40 33
41 _nextId: MochiKit.Base.counter(), 34 _nextId: MochiKit.Base.counter(),
42 35
36 /** @id MochiKit.Async.Deferred.prototype.state */
37 state: function () {
38 if (this.fired == -1) {
39 return 'unfired';
40 } else if (this.fired === 0) {
41 return 'success';
42 } else {
43 return 'error';
44 }
45 },
46
43 /** @id MochiKit.Async.Deferred.prototype.cancel */ 47 /** @id MochiKit.Async.Deferred.prototype.cancel */
44 cancel: function () { 48 cancel: function (e) {
45 var self = MochiKit.Async; 49 var self = MochiKit.Async;
46 if (this.fired == -1) { 50 if (this.fired == -1) {
47 if (this.canceller) { 51 if (this.canceller) {
@@ -50,10 +54,15 @@ MochiKit.Async.Deferred.prototype = {
50 this.silentlyCancelled = true; 54 this.silentlyCancelled = true;
51 } 55 }
52 if (this.fired == -1) { 56 if (this.fired == -1) {
53 this.errback(new self.CancelledError(this)); 57 if (typeof(e) === 'string') {
58 e = new self.GenericError(e);
59 } else if (!(e instanceof Error)) {
60 e = new self.CancelledError(this);
61 }
62 this.errback(e);
54 } 63 }
55 } else if ((this.fired === 0) && (this.results[0] instanceof self.Deferred)) { 64 } else if ((this.fired === 0) && (this.results[0] instanceof self.Deferred)) {
56 this.results[0].cancel(); 65 this.results[0].cancel(e);
57 } 66 }
58 }, 67 },
59 68
@@ -65,7 +74,9 @@ MochiKit.Async.Deferred.prototype = {
65 ***/ 74 ***/
66 this.fired = ((res instanceof Error) ? 1 : 0); 75 this.fired = ((res instanceof Error) ? 1 : 0);
67 this.results[this.fired] = res; 76 this.results[this.fired] = res;
77 if (this.paused === 0) {
68 this._fire(); 78 this._fire();
79 }
69 }, 80 },
70 81
71 _check: function () { 82 _check: function () {
@@ -129,6 +140,9 @@ MochiKit.Async.Deferred.prototype = {
129 if (this.chained) { 140 if (this.chained) {
130 throw new Error("Chained Deferreds can not be re-used"); 141 throw new Error("Chained Deferreds can not be re-used");
131 } 142 }
143 if (this.finalized) {
144 throw new Error("Finalized Deferreds can not be re-used");
145 }
132 this.chain.push([cb, eb]); 146 this.chain.push([cb, eb]);
133 if (this.fired >= 0) { 147 if (this.fired >= 0) {
134 this._fire(); 148 this._fire();
@@ -136,6 +150,24 @@ MochiKit.Async.Deferred.prototype = {
136 return this; 150 return this;
137 }, 151 },
138 152
153 /** @id MochiKit.Async.Deferred.prototype.setFinalizer */
154 setFinalizer: function (fn) {
155 if (this.chained) {
156 throw new Error("Chained Deferreds can not be re-used");
157 }
158 if (this.finalized) {
159 throw new Error("Finalized Deferreds can not be re-used");
160 }
161 if (arguments.length > 1) {
162 fn = MochiKit.Base.partial.apply(null, arguments);
163 }
164 this._finalizer = fn;
165 if (this.fired >= 0) {
166 this._fire();
167 }
168 return this;
169 },
170
139 _fire: function () { 171 _fire: function () {
140 /*** 172 /***
141 173
@@ -160,11 +192,8 @@ MochiKit.Async.Deferred.prototype = {
160 fired = ((res instanceof Error) ? 1 : 0); 192 fired = ((res instanceof Error) ? 1 : 0);
161 if (res instanceof MochiKit.Async.Deferred) { 193 if (res instanceof MochiKit.Async.Deferred) {
162 cb = function (res) { 194 cb = function (res) {
163 self._resback(res);
164 self.paused--; 195 self.paused--;
165 if ((self.paused === 0) && (self.fired >= 0)) { 196 self._resback(res);
166 self._fire();
167 }
168 }; 197 };
169 this.paused++; 198 this.paused++;
170 } 199 }
@@ -178,6 +207,10 @@ MochiKit.Async.Deferred.prototype = {
178 } 207 }
179 this.fired = fired; 208 this.fired = fired;
180 this.results[fired] = res; 209 this.results[fired] = res;
210 if (this.chain.length == 0 && this.paused === 0 && this._finalizer) {
211 this.finalized = true;
212 this._finalizer(res);
213 }
181 if (cb && this.paused) { 214 if (cb && this.paused) {
182 // this is for "tail recursion" in case the dependent deferred 215 // this is for "tail recursion" in case the dependent deferred
183 // is already fired 216 // is already fired
@@ -249,7 +282,7 @@ MochiKit.Base.update(MochiKit.Async, {
249 var status = null; 282 var status = null;
250 try { 283 try {
251 status = this.status; 284 status = this.status;
252 if (!status && m.isNotEmpty(this.responseText)) { 285 if (!status && (this.response || m.isNotEmpty(this.responseText))) {
253 // 0 or undefined seems to mean cached or local 286 // 0 or undefined seems to mean cached or local
254 status = 304; 287 status = 304;
255 } 288 }
@@ -337,7 +370,8 @@ MochiKit.Base.update(MochiKit.Async, {
337 username: undefined, 370 username: undefined,
338 password: undefined, 371 password: undefined,
339 headers: undefined, 372 headers: undefined,
340 mimeType: undefined 373 mimeType: undefined,
374 responseType: undefined
341 */ 375 */
342 }, opts); 376 }, opts);
343 var self = MochiKit.Async; 377 var self = MochiKit.Async;
@@ -371,6 +405,9 @@ MochiKit.Base.update(MochiKit.Async, {
371 req.setRequestHeader(name, value); 405 req.setRequestHeader(name, value);
372 } 406 }
373 } 407 }
408 if ("responseType" in opts && "responseType" in req) {
409 req.responseType = opts.responseType;
410 }
374 return self.sendXMLHttpRequest(req, opts.sendContent); 411 return self.sendXMLHttpRequest(req, opts.sendContent);
375 }, 412 },
376 413
@@ -404,16 +441,44 @@ MochiKit.Base.update(MochiKit.Async, {
404 return d; 441 return d;
405 }, 442 },
406 443
444 /** @id MochiKit.Async.loadScript */
445 loadScript: function (url) {
446 var d = new MochiKit.Async.Deferred();
447 var script = document.createElement("script");
448 script.type = "text/javascript";
449 script.src = url;
450 script.onload = function () {
451 script.onload = null;
452 script.onerror = null;
453 script.onreadystatechange = null;
454 script = null;
455 d.callback();
456 };
457 script.onerror = function (msg) {
458 script.onload = null;
459 script.onerror = null;
460 script.onreadystatechange = null;
461 script = null;
462 msg = "Failed to load script at " + url + ": " + msg;
463 d.errback(new URIError(msg, url));
464 }
465 script.onreadystatechange = function () {
466 if (script.readyState == "loaded" || script.readyState == "complete") {
467 script.onload();
468 } else {
469 // IE doesn't bother to report errors...
470 MochiKit.Async.callLater(10, script.onerror, "Script loading timed out")
471 }
472 };
473 document.getElementsByTagName("head")[0].appendChild(script);
474 return d;
475 },
476
407 /** @id MochiKit.Async.wait */ 477 /** @id MochiKit.Async.wait */
408 wait: function (seconds, /* optional */value) { 478 wait: function (seconds, /* optional */value) {
409 var d = new MochiKit.Async.Deferred(); 479 var d = new MochiKit.Async.Deferred();
410 var m = MochiKit.Base; 480 var cb = MochiKit.Base.bind("callback", d, value);
411 if (typeof(value) != 'undefined') { 481 var timeout = setTimeout(cb, Math.floor(seconds * 1000));
412 d.addCallback(function () { return value; });
413 }
414 var timeout = setTimeout(
415 m.bind("callback", d),
416 Math.floor(seconds * 1000));
417 d.canceller = function () { 482 d.canceller = function () {
418 try { 483 try {
419 clearTimeout(timeout); 484 clearTimeout(timeout);
@@ -510,6 +575,7 @@ MochiKit.Async.DeferredList = function (list, /* optional */fireOnOneCallback, f
510}; 575};
511 576
512MochiKit.Async.DeferredList.prototype = new MochiKit.Async.Deferred(); 577MochiKit.Async.DeferredList.prototype = new MochiKit.Async.Deferred();
578MochiKit.Async.DeferredList.prototype.constructor = MochiKit.Async.DeferredList;
513 579
514MochiKit.Async.DeferredList.prototype._cbDeferred = function (index, succeeded, result) { 580MochiKit.Async.DeferredList.prototype._cbDeferred = function (index, succeeded, result) {
515 this.resultList[index] = [succeeded, result]; 581 this.resultList[index] = [succeeded, result];
diff --git a/frontend/gamma/js/MochiKit/Base.js b/frontend/gamma/js/MochiKit/Base.js
index d33c269..ca1734c 100644
--- a/frontend/gamma/js/MochiKit/Base.js
+++ b/frontend/gamma/js/MochiKit/Base.js
@@ -8,33 +8,43 @@ See <http://mochikit.com/> for documentation, downloads, license, etc.
8 8
9***/ 9***/
10 10
11if (typeof(MochiKit) == 'undefined') { 11
12 MochiKit = {}; 12// MochiKit module (namespace)
13} 13var MochiKit = MochiKit || {};
14if (typeof(MochiKit.__export__) == "undefined") { 14if (typeof(MochiKit.__export__) == "undefined") {
15 MochiKit.__export__ = true; 15 MochiKit.__export__ = true;
16} 16}
17if (typeof(MochiKit.Base) == 'undefined') { 17MochiKit.NAME = "MochiKit";
18 MochiKit.Base = {}; 18MochiKit.VERSION = "1.5";
19} 19MochiKit.__repr__ = function () {
20 return "[" + this.NAME + " " + this.VERSION + "]";
21};
22MochiKit.toString = function () {
23 return this.__repr__();
24};
25
26
27// MochiKit.Base module
28MochiKit.Base = MochiKit.Base || {};
20 29
21/** 30/**
22 * Registers a new MochiKit module. This function will insert a new 31 * Creates a new module in a parent namespace. This function will
23 * property into the "MochiKit" object, making sure that all 32 * create a new empty module object with "NAME", "VERSION",
24 * dependency modules have already been inserted. It will also make 33 * "toString" and "__repr__" properties. This object will be inserted into the parent object
25 * sure that the appropriate properties and default module functions 34 * using the specified name (i.e. parent[name] = module). It will
26 * are defined. 35 * also verify that all the dependency modules are defined in the
36 * parent, or an error will be thrown.
27 * 37 *
38 * @param {Object} parent the parent module (use "this" or "window" for
39 * a global module)
28 * @param {String} name the module name, e.g. "Base" 40 * @param {String} name the module name, e.g. "Base"
29 * @param {String} version the module version, e.g. "1.5" 41 * @param {String} version the module version, e.g. "1.5"
30 * @param {Array} deps the array of module dependencies (as strings) 42 * @param {Array} [deps] the array of module dependencies (as strings)
31 */ 43 */
32MochiKit.Base._module = function (name, version, deps) { 44MochiKit.Base.module = function (parent, name, version, deps) {
33 if (!(name in MochiKit)) { 45 var module = parent[name] = parent[name] || {};
34 MochiKit[name] = {}; 46 var prefix = (parent.NAME ? parent.NAME + "." : "");
35 } 47 module.NAME = prefix + name;
36 var module = MochiKit[name];
37 module.NAME = "MochiKit." + name;
38 module.VERSION = version; 48 module.VERSION = version;
39 module.__repr__ = function () { 49 module.__repr__ = function () {
40 return "[" + this.NAME + " " + this.VERSION + "]"; 50 return "[" + this.NAME + " " + this.VERSION + "]";
@@ -42,14 +52,15 @@ MochiKit.Base._module = function (name, version, deps) {
42 module.toString = function () { 52 module.toString = function () {
43 return this.__repr__(); 53 return this.__repr__();
44 }; 54 };
45 for (var i = 0; i < deps.length; i++) { 55 for (var i = 0; deps != null && i < deps.length; i++) {
46 if (!(deps[i] in MochiKit)) { 56 if (!(deps[i] in parent)) {
47 throw 'MochiKit.' + name + ' depends on MochiKit.' + deps[i] + '!'; 57 throw module.NAME + ' depends on ' + prefix + deps[i] + '!';
48 }
49 } 58 }
50} 59}
60 return module;
61};
51 62
52MochiKit.Base._module("Base", "1.5", []); 63MochiKit.Base.module(MochiKit, "Base", "1.5", []);
53 64
54/** @id MochiKit.Base.update */ 65/** @id MochiKit.Base.update */
55MochiKit.Base.update = function (self, obj/*, ... */) { 66MochiKit.Base.update = function (self, obj/*, ... */) {
@@ -240,6 +251,7 @@ MochiKit.Base.update(MochiKit.Base, {
240 251
241 _newNamedError: function (module, name, func) { 252 _newNamedError: function (module, name, func) {
242 func.prototype = new MochiKit.Base.NamedError(module.NAME + "." + name); 253 func.prototype = new MochiKit.Base.NamedError(module.NAME + "." + name);
254 func.prototype.constructor = func;
243 module[name] = func; 255 module[name] = func;
244 }, 256 },
245 257
@@ -351,7 +363,7 @@ MochiKit.Base.update(MochiKit.Base, {
351 } else if (typeof(value) === "number" || value instanceof Number) { 363 } else if (typeof(value) === "number" || value instanceof Number) {
352 return !isNaN(value) && value != 0; 364 return !isNaN(value) && value != 0;
353 } else if (value != null && typeof(value.length) === "number") { 365 } else if (value != null && typeof(value.length) === "number") {
354 return value.length !== 0 366 return value.length !== 0;
355 } else { 367 } else {
356 return value != null; 368 return value != null;
357 } 369 }
@@ -675,6 +687,9 @@ MochiKit.Base.update(MochiKit.Base, {
675 newfunc.im_self = im_self; 687 newfunc.im_self = im_self;
676 newfunc.im_func = im_func; 688 newfunc.im_func = im_func;
677 newfunc.im_preargs = im_preargs; 689 newfunc.im_preargs = im_preargs;
690 if (typeof(im_func.NAME) == 'string') {
691 newfunc.NAME = "bind(" + im_func.NAME + ",...)";
692 }
678 return newfunc; 693 return newfunc;
679 }, 694 },
680 695
@@ -788,12 +803,15 @@ MochiKit.Base.update(MochiKit.Base, {
788 } 803 }
789 return MochiKit.Base.reprRegistry.match(o); 804 return MochiKit.Base.reprRegistry.match(o);
790 } catch (e) { 805 } catch (e) {
806 try {
791 if (typeof(o.NAME) == 'string' && ( 807 if (typeof(o.NAME) == 'string' && (
792 o.toString == Function.prototype.toString || 808 o.toString == Function.prototype.toString ||
793 o.toString == Object.prototype.toString 809 o.toString == Object.prototype.toString
794 )) { 810 )) {
795 return o.NAME; 811 return o.NAME;
796 } 812 }
813 } catch (ignore) {
814 }
797 } 815 }
798 try { 816 try {
799 var ostring = (o + ""); 817 var ostring = (o + "");
@@ -840,16 +858,13 @@ MochiKit.Base.update(MochiKit.Base, {
840 858
841 859
842 /** @id MochiKit.Base.evalJSON */ 860 /** @id MochiKit.Base.evalJSON */
843 evalJSON: function () { 861 evalJSON: function (jsonText) {
844 return eval("(" + MochiKit.Base._filterJSON(arguments[0]) + ")"); 862 return eval("(" + MochiKit.Base._filterJSON(jsonText) + ")");
845 }, 863 },
846 864
847 _filterJSON: function (s) { 865 _filterJSON: function (s) {
848 var m = s.match(/^\s*\/\*(.*)\*\/\s*$/); 866 var m = s.match(/^\s*\/\*(.*)\*\/\s*$/);
849 if (m) { 867 return (m) ? m[1] : s;
850 return m[1];
851 }
852 return s;
853 }, 868 },
854 869
855 /** @id MochiKit.Base.serializeJSON */ 870 /** @id MochiKit.Base.serializeJSON */
@@ -894,6 +909,12 @@ MochiKit.Base.update(MochiKit.Base, {
894 // short-circuit for objects that support "json" serialization 909 // short-circuit for objects that support "json" serialization
895 // if they return "self" then just pass-through... 910 // if they return "self" then just pass-through...
896 var newObj; 911 var newObj;
912 if (typeof(o.toJSON) == "function") {
913 newObj = o.toJSON();
914 if (o !== newObj) {
915 return me(newObj);
916 }
917 }
897 if (typeof(o.__json__) == "function") { 918 if (typeof(o.__json__) == "function") {
898 newObj = o.__json__(); 919 newObj = o.__json__();
899 if (o !== newObj) { 920 if (o !== newObj) {
@@ -1100,7 +1121,7 @@ MochiKit.Base.update(MochiKit.Base, {
1100 if (data.length === 0) { 1121 if (data.length === 0) {
1101 throw new TypeError('median() requires at least one argument'); 1122 throw new TypeError('median() requires at least one argument');
1102 } 1123 }
1103 data.sort(compare); 1124 data.sort(MochiKit.Base.compare);
1104 if (data.length % 2 == 0) { 1125 if (data.length % 2 == 0) {
1105 var upper = data.length / 2; 1126 var upper = data.length / 2;
1106 return (data[upper] + data[upper - 1]) / 2; 1127 return (data[upper] + data[upper - 1]) / 2;
@@ -1290,19 +1311,45 @@ MochiKit.Base.AdapterRegistry.prototype = {
1290 } 1311 }
1291}; 1312};
1292 1313
1293MochiKit.Base._exportSymbols = function (globals, module) { 1314/**
1294 if (MochiKit.__export__ === false || module.__export__ === false) { 1315 * Exports all symbols from one or more modules into the specified
1295 return; 1316 * namespace (or scope). This is similar to MochiKit.Base.update(),
1296 } 1317 * except for special handling of the "__export__" flag, contained
1318 * sub-modules (exported recursively), and names starting with "_".
1319 *
1320 * @param {Object} namespace the object or scope to modify
1321 * @param {Object} module the module to export
1322 */
1323MochiKit.Base.moduleExport = function (namespace, module/*, ...*/) {
1324 var SKIP = { toString: true, NAME: true, VERSION: true };
1325 var mods = MochiKit.Base.extend([], arguments, 1);
1326 while ((module = mods.shift()) != null) {
1297 for (var k in module) { 1327 for (var k in module) {
1298 var v = module[k]; 1328 var v = module[k];
1299 if (v != null) { 1329 if (v != null) {
1300 var okName = (k[0] !== "_" && k !== "toString"); 1330 var flagSet = (typeof(v.__export__) == 'boolean');
1301 if (v.__export__ === true || (v.__export__ !== false && okName)) { 1331 var nameValid = (k[0] !== "_" && !SKIP[k]);
1302 globals[k] = module[k]; 1332 if (flagSet ? v.__export__ : nameValid) {
1333 if (typeof(v) == 'object' && v.NAME && v.VERSION) {
1334 mods.push(v);
1335 } else {
1336 namespace[k] = module[k];
1337 }
1338 }
1303 } 1339 }
1304 } 1340 }
1305 } 1341 }
1342 return namespace;
1343};
1344
1345/**
1346 * Identical to moduleExport, but also considers the global and
1347 * module-specific "__export__" flag.
1348 */
1349MochiKit.Base._exportSymbols = function (namespace, module) {
1350 if (MochiKit.__export__ !== false && module.__export__ !== false) {
1351 MochiKit.Base.moduleExport(namespace, module);
1352 }
1306}; 1353};
1307 1354
1308/** 1355/**
@@ -1321,7 +1368,7 @@ MochiKit.Base._exportSymbols = function (globals, module) {
1321 * @param {String} version the first version when the source function 1368 * @param {String} version the first version when the source function
1322 * was deprecated (e.g. '1.4') 1369 * was deprecated (e.g. '1.4')
1323 * @param {Boolean} [exportable] the exportable function flag, 1370 * @param {Boolean} [exportable] the exportable function flag,
1324 * defaults to true 1371 * defaults to false
1325 */ 1372 */
1326MochiKit.Base._deprecated = function (module, name, target, version, exportable) { 1373MochiKit.Base._deprecated = function (module, name, target, version, exportable) {
1327 if (typeof(module) === 'string') { 1374 if (typeof(module) === 'string') {
@@ -1349,11 +1396,9 @@ MochiKit.Base._deprecated = function (module, name, target, version, exportable)
1349 } 1396 }
1350 return MochiKit[targetModule][targetName].apply(this, arguments); 1397 return MochiKit[targetModule][targetName].apply(this, arguments);
1351 }; 1398 };
1352 if (exportable === false) { 1399 func.__export__ = (exportable === true);
1353 func.__export__ = false;
1354 }
1355 module[name] = func; 1400 module[name] = func;
1356} 1401};
1357 1402
1358MochiKit.Base.__new__ = function () { 1403MochiKit.Base.__new__ = function () {
1359 var m = this; 1404 var m = this;
@@ -1362,8 +1407,8 @@ MochiKit.Base.__new__ = function () {
1362 m.noop = m.operator.identity; 1407 m.noop = m.operator.identity;
1363 1408
1364 // Backwards compat 1409 // Backwards compat
1365 m._deprecated(m, 'forward', 'MochiKit.Base.forwardCall', '1.3', false); 1410 m._deprecated(m, 'forward', 'MochiKit.Base.forwardCall', '1.3');
1366 m._deprecated(m, 'find', 'MochiKit.Base.findValue', '1.3', false); 1411 m._deprecated(m, 'find', 'MochiKit.Base.findValue', '1.3');
1367 1412
1368 if (typeof(encodeURIComponent) != "undefined") { 1413 if (typeof(encodeURIComponent) != "undefined") {
1369 /** @id MochiKit.Base.urlEncode */ 1414 /** @id MochiKit.Base.urlEncode */
@@ -1375,7 +1420,7 @@ MochiKit.Base.__new__ = function () {
1375 return escape(unencoded 1420 return escape(unencoded
1376 ).replace(/\+/g, '%2B' 1421 ).replace(/\+/g, '%2B'
1377 ).replace(/\"/g,'%22' 1422 ).replace(/\"/g,'%22'
1378 ).rval.replace(/\'/g, '%27'); 1423 ).replace(/\'/g, '%27');
1379 }; 1424 };
1380 } 1425 }
1381 1426
@@ -1385,6 +1430,7 @@ MochiKit.Base.__new__ = function () {
1385 this.name = name; 1430 this.name = name;
1386 }; 1431 };
1387 m.NamedError.prototype = new Error(); 1432 m.NamedError.prototype = new Error();
1433 m.NamedError.prototype.constructor = m.NamedError;
1388 m.update(m.NamedError.prototype, { 1434 m.update(m.NamedError.prototype, {
1389 repr: function () { 1435 repr: function () {
1390 if (this.message && this.message != this.name) { 1436 if (this.message && this.message != this.name) {
@@ -1409,6 +1455,8 @@ MochiKit.Base.__new__ = function () {
1409 m.isCallable = m.typeMatcher('function'); 1455 m.isCallable = m.typeMatcher('function');
1410 /** @id MochiKit.Base.isUndefined */ 1456 /** @id MochiKit.Base.isUndefined */
1411 m.isUndefined = m.typeMatcher('undefined'); 1457 m.isUndefined = m.typeMatcher('undefined');
1458 /** @id MochiKit.Base.isValue */
1459 m.isValue = m.typeMatcher('boolean', 'number', 'string');
1412 1460
1413 /** @id MochiKit.Base.merge */ 1461 /** @id MochiKit.Base.merge */
1414 m.merge = m.partial(m.update, null); 1462 m.merge = m.partial(m.update, null);
diff --git a/frontend/gamma/js/MochiKit/Color.js b/frontend/gamma/js/MochiKit/Color.js
index 27dc2d0..f2a0f67 100644
--- a/frontend/gamma/js/MochiKit/Color.js
+++ b/frontend/gamma/js/MochiKit/Color.js
@@ -8,7 +8,7 @@ See <http://mochikit.com/> for documentation, downloads, license, etc.
8 8
9***/ 9***/
10 10
11MochiKit.Base._module('Color', '1.5', ['Base', 'DOM', 'Style']); 11MochiKit.Base.module(MochiKit, 'Color', '1.5', ['Base', 'DOM', 'Style']);
12 12
13/** @id MochiKit.Color.Color */ 13/** @id MochiKit.Color.Color */
14MochiKit.Color.Color = function (red, green, blue, alpha) { 14MochiKit.Color.Color = function (red, green, blue, alpha) {
@@ -112,7 +112,7 @@ MochiKit.Color.Color.prototype = {
112 112
113 /** @id MochiKit.Color.Color.prototype.isLight */ 113 /** @id MochiKit.Color.Color.prototype.isLight */
114 isLight: function () { 114 isLight: function () {
115 return this.asHSL().b > 0.5; 115 return this.asHSL().l > 0.5;
116 }, 116 },
117 117
118 /** @id MochiKit.Color.Color.prototype.isDark */ 118 /** @id MochiKit.Color.Color.prototype.isDark */
@@ -641,19 +641,10 @@ MochiKit.Base.update(MochiKit.Color, {
641 yellow: [1, 1, 0] 641 yellow: [1, 1, 0]
642 }; 642 };
643 643
644 var makeColor = function (name, r, g, b, a) {
645 var rval = this.fromRGB(r, g, b, a);
646 this[name] = function () { return rval; };
647 return rval;
648 };
649
650 for (var k in colors) { 644 for (var k in colors) {
651 var name = k + "Color"; 645 var name = k + "Color";
652 var bindArgs = m.concat( 646 var value = this.Color.fromRGB.apply(this.Color, colors[k]);
653 [makeColor, this.Color, name], 647 this.Color[name] = m.partial(m.operator.identity, value);
654 colors[k]
655 );
656 this.Color[name] = m.bind.apply(null, bindArgs);
657 } 648 }
658 649
659 var isColor = function () { 650 var isColor = function () {
diff --git a/frontend/gamma/js/MochiKit/DOM.js b/frontend/gamma/js/MochiKit/DOM.js
index af5d46f..944ab78 100644
--- a/frontend/gamma/js/MochiKit/DOM.js
+++ b/frontend/gamma/js/MochiKit/DOM.js
@@ -8,7 +8,7 @@ See <http://mochikit.com/> for documentation, downloads, license, etc.
8 8
9***/ 9***/
10 10
11MochiKit.Base._module('DOM', '1.5', ['Base']); 11MochiKit.Base.module(MochiKit, 'DOM', '1.5', ['Base']);
12 12
13MochiKit.Base.update(MochiKit.DOM, { 13MochiKit.Base.update(MochiKit.DOM, {
14 14
@@ -297,11 +297,11 @@ MochiKit.Base.update(MochiKit.DOM, {
297 updateNodeAttributes: function (node, attrs) { 297 updateNodeAttributes: function (node, attrs) {
298 var elem = node; 298 var elem = node;
299 var self = MochiKit.DOM; 299 var self = MochiKit.DOM;
300 var base = MochiKit.Base;
300 if (typeof(node) == 'string') { 301 if (typeof(node) == 'string') {
301 elem = self.getElement(node); 302 elem = self.getElement(node);
302 } 303 }
303 if (attrs) { 304 if (attrs) {
304 var updatetree = MochiKit.Base.updatetree;
305 if (self.attributeArray.compliant) { 305 if (self.attributeArray.compliant) {
306 // not IE, good. 306 // not IE, good.
307 for (var k in attrs) { 307 for (var k in attrs) {
@@ -310,7 +310,7 @@ MochiKit.Base.update(MochiKit.DOM, {
310 if (k == "style" && MochiKit.Style) { 310 if (k == "style" && MochiKit.Style) {
311 MochiKit.Style.setStyle(elem, v); 311 MochiKit.Style.setStyle(elem, v);
312 } else { 312 } else {
313 updatetree(elem[k], v); 313 base.updatetree(elem[k], v);
314 } 314 }
315 } else if (k.substring(0, 2) == "on") { 315 } else if (k.substring(0, 2) == "on") {
316 if (typeof(v) == "string") { 316 if (typeof(v) == "string") {
@@ -320,8 +320,8 @@ MochiKit.Base.update(MochiKit.DOM, {
320 } else { 320 } else {
321 elem.setAttribute(k, v); 321 elem.setAttribute(k, v);
322 } 322 }
323 if (typeof(elem[k]) == "string" && elem[k] != v) { 323 if (base.isValue(elem[k]) && elem[k] != v) {
324 // Also set property for weird attributes (see #302) 324 // Also set property for weird attributes (see #302 & #335)
325 elem[k] = v; 325 elem[k] = v;
326 } 326 }
327 } 327 }
@@ -340,7 +340,7 @@ MochiKit.Base.update(MochiKit.DOM, {
340 if (k == "style" && MochiKit.Style) { 340 if (k == "style" && MochiKit.Style) {
341 MochiKit.Style.setStyle(elem, v); 341 MochiKit.Style.setStyle(elem, v);
342 } else { 342 } else {
343 updatetree(elem[k], v); 343 base.updatetree(elem[k], v);
344 } 344 }
345 } else if (k.substring(0, 2) == "on") { 345 } else if (k.substring(0, 2) == "on") {
346 if (typeof(v) == "string") { 346 if (typeof(v) == "string") {
@@ -350,8 +350,8 @@ MochiKit.Base.update(MochiKit.DOM, {
350 } else { 350 } else {
351 elem.setAttribute(k, v); 351 elem.setAttribute(k, v);
352 } 352 }
353 if (typeof(elem[k]) == "string" && elem[k] != v) { 353 if (base.isValue(elem[k]) && elem[k] != v) {
354 // Also set property for weird attributes (see #302) 354 // Also set property for weird attributes (see #302 & #335)
355 elem[k] = v; 355 elem[k] = v;
356 } 356 }
357 } 357 }
@@ -990,6 +990,7 @@ MochiKit.Base.update(MochiKit.DOM, {
990 "for": "htmlFor", 990 "for": "htmlFor",
991 "readonly": "readOnly", 991 "readonly": "readOnly",
992 "colspan": "colSpan", 992 "colspan": "colSpan",
993 "rowspan": "rowSpan",
993 "bgcolor": "bgColor", 994 "bgcolor": "bgColor",
994 "cellspacing": "cellSpacing", 995 "cellspacing": "cellSpacing",
995 "cellpadding": "cellPadding" 996 "cellpadding": "cellPadding"
@@ -1007,7 +1008,7 @@ MochiKit.Base.update(MochiKit.DOM, {
1007 1008
1008 // Backwards compatibility aliases 1009 // Backwards compatibility aliases
1009 /** @id MochiKit.DOM.computedStyle */ 1010 /** @id MochiKit.DOM.computedStyle */
1010 m._deprecated(this, 'computedStyle', 'MochiKit.Style.getStyle', '1.4'); 1011 m._deprecated(this, 'computedStyle', 'MochiKit.Style.getStyle', '1.4', true);
1011 /** @id MochiKit.DOM.elementDimensions */ 1012 /** @id MochiKit.DOM.elementDimensions */
1012 m._deprecated(this, 'elementDimensions', 'MochiKit.Style.getElementDimensions', '1.4'); 1013 m._deprecated(this, 'elementDimensions', 'MochiKit.Style.getElementDimensions', '1.4');
1013 /** @id MochiKit.DOM.elementPosition */ 1014 /** @id MochiKit.DOM.elementPosition */
@@ -1041,48 +1042,38 @@ MochiKit.Base.update(MochiKit.DOM, {
1041 1042
1042 // shorthand for createDOM syntax 1043 // shorthand for createDOM syntax
1043 var createDOMFunc = this.createDOMFunc; 1044 var createDOMFunc = this.createDOMFunc;
1044 /** @id MochiKit.DOM.UL */
1045 this.UL = createDOMFunc("ul");
1046 /** @id MochiKit.DOM.OL */
1047 this.OL = createDOMFunc("ol");
1048 /** @id MochiKit.DOM.LI */
1049 this.LI = createDOMFunc("li");
1050 /** @id MochiKit.DOM.DL */
1051 this.DL = createDOMFunc("dl");
1052 /** @id MochiKit.DOM.DT */
1053 this.DT = createDOMFunc("dt");
1054 /** @id MochiKit.DOM.DD */
1055 this.DD = createDOMFunc("dd");
1056 /** @id MochiKit.DOM.TD */
1057 this.TD = createDOMFunc("td");
1058 /** @id MochiKit.DOM.TR */
1059 this.TR = createDOMFunc("tr");
1060 /** @id MochiKit.DOM.TBODY */
1061 this.TBODY = createDOMFunc("tbody");
1062 /** @id MochiKit.DOM.THEAD */
1063 this.THEAD = createDOMFunc("thead");
1064 /** @id MochiKit.DOM.TFOOT */
1065 this.TFOOT = createDOMFunc("tfoot");
1066 /** @id MochiKit.DOM.TABLE */
1067 this.TABLE = createDOMFunc("table");
1068 /** @id MochiKit.DOM.TH */
1069 this.TH = createDOMFunc("th");
1070 /** @id MochiKit.DOM.INPUT */
1071 this.INPUT = createDOMFunc("input");
1072 /** @id MochiKit.DOM.SPAN */
1073 this.SPAN = createDOMFunc("span");
1074 /** @id MochiKit.DOM.A */ 1045 /** @id MochiKit.DOM.A */
1075 this.A = createDOMFunc("a"); 1046 this.A = createDOMFunc("a");
1076 /** @id MochiKit.DOM.DIV */ 1047 /** @id MochiKit.DOM.ARTICLE */
1077 this.DIV = createDOMFunc("div"); 1048 this.ARTICLE = createDOMFunc("article");
1078 /** @id MochiKit.DOM.IMG */ 1049 /** @id MochiKit.DOM.ASIDE */
1079 this.IMG = createDOMFunc("img"); 1050 this.ASIDE = createDOMFunc("aside");
1051 /** @id MochiKit.DOM.BR */
1052 this.BR = createDOMFunc("br");
1080 /** @id MochiKit.DOM.BUTTON */ 1053 /** @id MochiKit.DOM.BUTTON */
1081 this.BUTTON = createDOMFunc("button"); 1054 this.BUTTON = createDOMFunc("button");
1082 /** @id MochiKit.DOM.TT */ 1055 /** @id MochiKit.DOM.CANVAS */
1083 this.TT = createDOMFunc("tt"); 1056 this.CANVAS = createDOMFunc("canvas");
1084 /** @id MochiKit.DOM.PRE */ 1057 /** @id MochiKit.DOM.CAPTION */
1085 this.PRE = createDOMFunc("pre"); 1058 this.CAPTION = createDOMFunc("caption");
1059 /** @id MochiKit.DOM.DD */
1060 this.DD = createDOMFunc("dd");
1061 /** @id MochiKit.DOM.DIV */
1062 this.DIV = createDOMFunc("div");
1063 /** @id MochiKit.DOM.DL */
1064 this.DL = createDOMFunc("dl");
1065 /** @id MochiKit.DOM.DT */
1066 this.DT = createDOMFunc("dt");
1067 /** @id MochiKit.DOM.FIELDSET */
1068 this.FIELDSET = createDOMFunc("fieldset");
1069 /** @id MochiKit.DOM.FIGURE */
1070 this.FIGURE = createDOMFunc("figure");
1071 /** @id MochiKit.DOM.FIGCAPTION */
1072 this.FIGCAPTION = createDOMFunc("figcaption");
1073 /** @id MochiKit.DOM.FOOTER */
1074 this.FOOTER = createDOMFunc("footer");
1075 /** @id MochiKit.DOM.FORM */
1076 this.FORM = createDOMFunc("form");
1086 /** @id MochiKit.DOM.H1 */ 1077 /** @id MochiKit.DOM.H1 */
1087 this.H1 = createDOMFunc("h1"); 1078 this.H1 = createDOMFunc("h1");
1088 /** @id MochiKit.DOM.H2 */ 1079 /** @id MochiKit.DOM.H2 */
@@ -1095,38 +1086,82 @@ MochiKit.Base.update(MochiKit.DOM, {
1095 this.H5 = createDOMFunc("h5"); 1086 this.H5 = createDOMFunc("h5");
1096 /** @id MochiKit.DOM.H6 */ 1087 /** @id MochiKit.DOM.H6 */
1097 this.H6 = createDOMFunc("h6"); 1088 this.H6 = createDOMFunc("h6");
1098 /** @id MochiKit.DOM.BR */ 1089 /** @id MochiKit.DOM.HEADER */
1099 this.BR = createDOMFunc("br"); 1090 this.HEADER = createDOMFunc("header");
1091 /** @id MochiKit.DOM.HGROUP */
1092 this.HGROUP = createDOMFunc("hgroup");
1100 /** @id MochiKit.DOM.HR */ 1093 /** @id MochiKit.DOM.HR */
1101 this.HR = createDOMFunc("hr"); 1094 this.HR = createDOMFunc("hr");
1095 /** @id MochiKit.DOM.IFRAME */
1096 this.IFRAME = createDOMFunc("iframe");
1097 /** @id MochiKit.DOM.IMG */
1098 this.IMG = createDOMFunc("img");
1099 /** @id MochiKit.DOM.INPUT */
1100 this.INPUT = createDOMFunc("input");
1102 /** @id MochiKit.DOM.LABEL */ 1101 /** @id MochiKit.DOM.LABEL */
1103 this.LABEL = createDOMFunc("label"); 1102 this.LABEL = createDOMFunc("label");
1104 /** @id MochiKit.DOM.TEXTAREA */ 1103 /** @id MochiKit.DOM.LEGEND */
1105 this.TEXTAREA = createDOMFunc("textarea"); 1104 this.LEGEND = createDOMFunc("legend");
1106 /** @id MochiKit.DOM.FORM */ 1105 /** @id MochiKit.DOM.LI */
1107 this.FORM = createDOMFunc("form"); 1106 this.LI = createDOMFunc("li");
1107 /** @id MochiKit.DOM.LINK */
1108 this.LINK = createDOMFunc("link");
1109 /** @id MochiKit.DOM.MARK */
1110 this.MARK = createDOMFunc("mark");
1111 /** @id MochiKit.DOM.METER */
1112 this.METER = createDOMFunc("meter");
1113 /** @id MochiKit.DOM.NAV */
1114 this.NAV = createDOMFunc("nav");
1115 /** @id MochiKit.DOM.OL */
1116 this.OL = createDOMFunc("ol");
1117 /** @id MochiKit.DOM.OPTGROUP */
1118 this.OPTGROUP = createDOMFunc("optgroup");
1119 /** @id MochiKit.DOM.OPTION */
1120 this.OPTION = createDOMFunc("option");
1108 /** @id MochiKit.DOM.P */ 1121 /** @id MochiKit.DOM.P */
1109 this.P = createDOMFunc("p"); 1122 this.P = createDOMFunc("p");
1123 /** @id MochiKit.DOM.PRE */
1124 this.PRE = createDOMFunc("pre");
1125 /** @id MochiKit.DOM.PROGRESS */
1126 this.PROGRESS = createDOMFunc("progress");
1127 /** @id MochiKit.DOM.SCRIPT */
1128 this.SCRIPT = createDOMFunc("script");
1129 /** @id MochiKit.DOM.SECTION */
1130 this.SECTION = createDOMFunc("section");
1110 /** @id MochiKit.DOM.SELECT */ 1131 /** @id MochiKit.DOM.SELECT */
1111 this.SELECT = createDOMFunc("select"); 1132 this.SELECT = createDOMFunc("select");
1112 /** @id MochiKit.DOM.OPTION */ 1133 /** @id MochiKit.DOM.SPAN */
1113 this.OPTION = createDOMFunc("option"); 1134 this.SPAN = createDOMFunc("span");
1114 /** @id MochiKit.DOM.OPTGROUP */
1115 this.OPTGROUP = createDOMFunc("optgroup");
1116 /** @id MochiKit.DOM.LEGEND */
1117 this.LEGEND = createDOMFunc("legend");
1118 /** @id MochiKit.DOM.FIELDSET */
1119 this.FIELDSET = createDOMFunc("fieldset");
1120 /** @id MochiKit.DOM.STRONG */ 1135 /** @id MochiKit.DOM.STRONG */
1121 this.STRONG = createDOMFunc("strong"); 1136 this.STRONG = createDOMFunc("strong");
1122 /** @id MochiKit.DOM.CANVAS */ 1137 /** @id MochiKit.DOM.STYLE */
1123 this.CANVAS = createDOMFunc("canvas"); 1138 this.STYLE = createDOMFunc("style");
1124 1139 /** @id MochiKit.DOM.TABLE */
1140 this.TABLE = createDOMFunc("table");
1141 /** @id MochiKit.DOM.TBODY */
1142 this.TBODY = createDOMFunc("tbody");
1143 /** @id MochiKit.DOM.TD */
1144 this.TD = createDOMFunc("td");
1145 /** @id MochiKit.DOM.TEXTAREA */
1146 this.TEXTAREA = createDOMFunc("textarea");
1147 /** @id MochiKit.DOM.TFOOT */
1148 this.TFOOT = createDOMFunc("tfoot");
1149 /** @id MochiKit.DOM.TH */
1150 this.TH = createDOMFunc("th");
1151 /** @id MochiKit.DOM.THEAD */
1152 this.THEAD = createDOMFunc("thead");
1153 /** @id MochiKit.DOM.TR */
1154 this.TR = createDOMFunc("tr");
1155 /** @id MochiKit.DOM.TT */
1156 this.TT = createDOMFunc("tt");
1157 /** @id MochiKit.DOM.UL */
1158 this.UL = createDOMFunc("ul");
1159 /** @id MochiKit.DOM.NBSP */
1160 this.NBSP = "\u00a0";
1125 /** @id MochiKit.DOM.$ */ 1161 /** @id MochiKit.DOM.$ */
1126 this.$ = this.getElement; 1162 this.$ = this.getElement;
1127 1163
1128 m.nameFunctions(this); 1164 m.nameFunctions(this);
1129
1130 } 1165 }
1131}); 1166});
1132 1167
diff --git a/frontend/gamma/js/MochiKit/DateTime.js b/frontend/gamma/js/MochiKit/DateTime.js
index c7b2d25..658084c 100644
--- a/frontend/gamma/js/MochiKit/DateTime.js
+++ b/frontend/gamma/js/MochiKit/DateTime.js
@@ -8,7 +8,7 @@ See <http://mochikit.com/> for documentation, downloads, license, etc.
8 8
9***/ 9***/
10 10
11MochiKit.Base._module('DateTime', '1.5', ['Base']); 11MochiKit.Base.module(MochiKit, 'DateTime', '1.5', ['Base']);
12 12
13/** @id MochiKit.DateTime.isoDate */ 13/** @id MochiKit.DateTime.isoDate */
14MochiKit.DateTime.isoDate = function (str) { 14MochiKit.DateTime.isoDate = function (str) {
@@ -20,7 +20,7 @@ MochiKit.DateTime.isoDate = function (str) {
20 if (iso.length === 0) { 20 if (iso.length === 0) {
21 return null; 21 return null;
22 } 22 }
23 var date = new Date(iso[0], iso[1] - 1, iso[2]); 23 var date = new Date(parseInt(iso[0], 10), parseInt(iso[1], 10) - 1, parseInt(iso[2], 10));
24 date.setFullYear(iso[0]); 24 date.setFullYear(iso[0]);
25 date.setMonth(iso[1] - 1); 25 date.setMonth(iso[1] - 1);
26 date.setDate(iso[2]); 26 date.setDate(iso[2]);
@@ -80,15 +80,17 @@ MochiKit.DateTime.toISOTime = function (date, realISO/* = false */) {
80 if (typeof(date) == "undefined" || date === null) { 80 if (typeof(date) == "undefined" || date === null) {
81 return null; 81 return null;
82 } 82 }
83 var hh = date.getHours(); 83 var _padTwo = MochiKit.DateTime._padTwo;
84 var mm = date.getMinutes(); 84 if (realISO) {
85 var ss = date.getSeconds(); 85 // adjust date for UTC timezone
86 date = new Date(date.getTime() + (date.getTimezoneOffset() * 60000));
87 }
86 var lst = [ 88 var lst = [
87 ((realISO && (hh < 10)) ? "0" + hh : hh), 89 (realISO ? _padTwo(date.getHours()) : date.getHours()),
88 ((mm < 10) ? "0" + mm : mm), 90 _padTwo(date.getMinutes()),
89 ((ss < 10) ? "0" + ss : ss) 91 _padTwo(date.getSeconds())
90 ]; 92 ];
91 return lst.join(":"); 93 return lst.join(":") + (realISO ? "Z" : "");
92}; 94};
93 95
94/** @id MochiKit.DateTime.toISOTimeStamp */ 96/** @id MochiKit.DateTime.toISOTimeStamp */
@@ -96,12 +98,13 @@ MochiKit.DateTime.toISOTimestamp = function (date, realISO/* = false*/) {
96 if (typeof(date) == "undefined" || date === null) { 98 if (typeof(date) == "undefined" || date === null) {
97 return null; 99 return null;
98 } 100 }
101 var time = MochiKit.DateTime.toISOTime(date, realISO);
99 var sep = realISO ? "T" : " "; 102 var sep = realISO ? "T" : " ";
100 var foot = realISO ? "Z" : "";
101 if (realISO) { 103 if (realISO) {
104 // adjust date for UTC timezone
102 date = new Date(date.getTime() + (date.getTimezoneOffset() * 60000)); 105 date = new Date(date.getTime() + (date.getTimezoneOffset() * 60000));
103 } 106 }
104 return MochiKit.DateTime.toISODate(date) + sep + MochiKit.DateTime.toISOTime(date, realISO) + foot; 107 return MochiKit.DateTime.toISODate(date) + sep + time;
105}; 108};
106 109
107/** @id MochiKit.DateTime.toISODate */ 110/** @id MochiKit.DateTime.toISODate */
diff --git a/frontend/gamma/js/MochiKit/DragAndDrop.js b/frontend/gamma/js/MochiKit/DragAndDrop.js
index 62777c5..cf84f77 100644
--- a/frontend/gamma/js/MochiKit/DragAndDrop.js
+++ b/frontend/gamma/js/MochiKit/DragAndDrop.js
@@ -8,7 +8,7 @@ Copyright (c) 2005 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
8 8
9***/ 9***/
10 10
11MochiKit.Base._module('DragAndDrop', '1.5', ['Base', 'Iter', 'DOM', 'Signal', 'Visual', 'Position']); 11MochiKit.Base.module(MochiKit, 'DragAndDrop', '1.5', ['Base', 'Iter', 'DOM', 'Signal', 'Visual', 'Position']);
12 12
13MochiKit.DragAndDrop.Droppables = { 13MochiKit.DragAndDrop.Droppables = {
14 /*** 14 /***
@@ -306,8 +306,9 @@ MochiKit.DragAndDrop.Draggables = {
306 var pointer = event.mouse(); 306 var pointer = event.mouse();
307 // Mozilla-based browsers fire successive mousemove events with 307 // Mozilla-based browsers fire successive mousemove events with
308 // the same coordinates, prevent needless redrawing (moz bug?) 308 // the same coordinates, prevent needless redrawing (moz bug?)
309 if (this._lastPointer && (MochiKit.Base.repr(this._lastPointer.page) == 309 if (this._lastPointer &&
310 MochiKit.Base.repr(pointer.page))) { 310 this._lastPointer.page.x == pointer.page.x &&
311 this._lastPointer.page.y == pointer.page.y) {
311 return; 312 return;
312 } 313 }
313 this._lastPointer = pointer; 314 this._lastPointer = pointer;
@@ -442,8 +443,8 @@ MochiKit.DragAndDrop.Draggable.prototype = {
442 currentDelta: function () { 443 currentDelta: function () {
443 var s = MochiKit.Style.getStyle; 444 var s = MochiKit.Style.getStyle;
444 return [ 445 return [
445 parseInt(s(this.element, 'left') || '0'), 446 parseInt(s(this.element, 'left') || '0', 10),
446 parseInt(s(this.element, 'top') || '0')]; 447 parseInt(s(this.element, 'top') || '0', 10)];
447 }, 448 },
448 449
449 /** @id MochiKit.DragAndDrop.initDrag */ 450 /** @id MochiKit.DragAndDrop.initDrag */
@@ -481,8 +482,7 @@ MochiKit.DragAndDrop.Draggable.prototype = {
481 this.options.selectclass); 482 this.options.selectclass);
482 } 483 }
483 if (this.options.zindex) { 484 if (this.options.zindex) {
484 this.originalZ = parseInt(MochiKit.Style.getStyle(this.element, 485 this.originalZ = MochiKit.Style.getStyle(this.element, 'z-index');
485 'z-index') || '0');
486 this.element.style.zIndex = this.options.zindex; 486 this.element.style.zIndex = this.options.zindex;
487 } 487 }
488 488
diff --git a/frontend/gamma/js/MochiKit/Format.js b/frontend/gamma/js/MochiKit/Format.js
index 122845e..58877e7 100644
--- a/frontend/gamma/js/MochiKit/Format.js
+++ b/frontend/gamma/js/MochiKit/Format.js
@@ -8,7 +8,7 @@ See <http://mochikit.com/> for documentation, downloads, license, etc.
8 8
9***/ 9***/
10 10
11MochiKit.Base._module('Format', '1.5', ['Base']); 11MochiKit.Base.module(MochiKit, 'Format', '1.5', ['Base']);
12 12
13MochiKit.Format._numberFormatter = function (placeholder, header, footer, locale, isPercent, precision, leadingZeros, separatorAt, trailingZeros) { 13MochiKit.Format._numberFormatter = function (placeholder, header, footer, locale, isPercent, precision, leadingZeros, separatorAt, trailingZeros) {
14 return function (num) { 14 return function (num) {
@@ -104,7 +104,7 @@ MochiKit.Format.numberFormatter = function (pattern, placeholder/* = "" */, loca
104 return [ 104 return [
105 self.NAME, 105 self.NAME,
106 "(", 106 "(",
107 map(m.repr, args).join(", "), 107 m.map(m.repr, args).join(", "),
108 ")" 108 ")"
109 ].join(""); 109 ].join("");
110 }; 110 };
@@ -142,7 +142,7 @@ MochiKit.Format.twoDigitAverage = function (numerator, denominator) {
142 142
143/** @id MochiKit.Format.twoDigitFloat */ 143/** @id MochiKit.Format.twoDigitFloat */
144MochiKit.Format.twoDigitFloat = function (aNumber) { 144MochiKit.Format.twoDigitFloat = function (aNumber) {
145 var res = roundToFixed(aNumber, 2); 145 var res = MochiKit.Format.roundToFixed(aNumber, 2);
146 if (res.indexOf(".00") > 0) { 146 if (res.indexOf(".00") > 0) {
147 return res.substring(0, res.length - 3); 147 return res.substring(0, res.length - 3);
148 } else if (res.charAt(res.length - 1) == "0") { 148 } else if (res.charAt(res.length - 1) == "0") {
@@ -193,7 +193,7 @@ MochiKit.Format.truncToFixed = function (aNumber, precision) {
193 fixed = MochiKit.Format._shiftNumber(fixed, 0); 193 fixed = MochiKit.Format._shiftNumber(fixed, 0);
194 } 194 }
195 return fixed; 195 return fixed;
196} 196};
197 197
198/** @id MochiKit.Format.roundToFixed */ 198/** @id MochiKit.Format.roundToFixed */
199MochiKit.Format.roundToFixed = function (aNumber, precision) { 199MochiKit.Format.roundToFixed = function (aNumber, precision) {
@@ -205,7 +205,7 @@ MochiKit.Format.roundToFixed = function (aNumber, precision) {
205 fixed = MochiKit.Format._shiftNumber(str, -precision); 205 fixed = MochiKit.Format._shiftNumber(str, -precision);
206 } 206 }
207 return fixed; 207 return fixed;
208} 208};
209 209
210/** 210/**
211 * Converts a number to a fixed format string. This function handles 211 * Converts a number to a fixed format string. This function handles
@@ -221,7 +221,7 @@ MochiKit.Format.roundToFixed = function (aNumber, precision) {
221MochiKit.Format._numberToFixed = function (aNumber, precision) { 221MochiKit.Format._numberToFixed = function (aNumber, precision) {
222 var str = aNumber.toString(); 222 var str = aNumber.toString();
223 var parts = str.split(/[eE]/); 223 var parts = str.split(/[eE]/);
224 var exp = (parts.length === 1) ? 0 : parseInt(parts[1]) || 0; 224 var exp = (parts.length === 1) ? 0 : parseInt(parts[1], 10) || 0;
225 var fixed = MochiKit.Format._shiftNumber(parts[0], exp); 225 var fixed = MochiKit.Format._shiftNumber(parts[0], exp);
226 parts = fixed.split(/\./); 226 parts = fixed.split(/\./);
227 var whole = parts[0]; 227 var whole = parts[0];
@@ -234,7 +234,7 @@ MochiKit.Format._numberToFixed = function (aNumber, precision) {
234 } else { 234 } else {
235 return whole; 235 return whole;
236 } 236 }
237} 237};
238 238
239/** 239/**
240 * Shifts the decimal dot location in a fixed format number string. 240 * Shifts the decimal dot location in a fixed format number string.
@@ -275,7 +275,7 @@ MochiKit.Format._shiftNumber = function (num, exp) {
275 num = "-" + num.substring(2); 275 num = "-" + num.substring(2);
276 } 276 }
277 return num; 277 return num;
278} 278};
279 279
280/** @id MochiKit.Format.percentFormat */ 280/** @id MochiKit.Format.percentFormat */
281MochiKit.Format.percentFormat = function (aNumber) { 281MochiKit.Format.percentFormat = function (aNumber) {
diff --git a/frontend/gamma/js/MochiKit/Iter.js b/frontend/gamma/js/MochiKit/Iter.js
index 524b2bc..77623bc 100644
--- a/frontend/gamma/js/MochiKit/Iter.js
+++ b/frontend/gamma/js/MochiKit/Iter.js
@@ -8,7 +8,7 @@ See <http://mochikit.com/> for documentation, downloads, license, etc.
8 8
9***/ 9***/
10 10
11MochiKit.Base._module('Iter', '1.5', ['Base']); 11MochiKit.Base.module(MochiKit, 'Iter', '1.5', ['Base']);
12 12
13MochiKit.Base.update(MochiKit.Iter, { 13MochiKit.Base.update(MochiKit.Iter, {
14 /** @id MochiKit.Iter.registerIteratorFactory */ 14 /** @id MochiKit.Iter.registerIteratorFactory */
@@ -222,14 +222,15 @@ MochiKit.Base.update(MochiKit.Iter, {
222 }, 222 },
223 toString: m.forwardCall("repr"), 223 toString: m.forwardCall("repr"),
224 next: function () { 224 next: function () {
225 if (start >= stop) {
226 throw self.StopIteration;
227 }
228
225 var rval; 229 var rval;
226 while (i < start) { 230 while (i < start) {
227 rval = seq.next(); 231 rval = seq.next();
228 i++; 232 i++;
229 } 233 }
230 if (start >= stop) {
231 throw self.StopIteration;
232 }
233 start += step; 234 start += step;
234 return rval; 235 return rval;
235 } 236 }
@@ -280,15 +281,12 @@ MochiKit.Base.update(MochiKit.Iter, {
280 next: function () { 281 next: function () {
281 while (argiter.length > 1) { 282 while (argiter.length > 1) {
282 try { 283 try {
283 var result = argiter[0].next(); 284 return argiter[0].next();
284 return result;
285 } catch (e) { 285 } catch (e) {
286 if (e != self.StopIteration) { 286 if (e != self.StopIteration) {
287 throw e; 287 throw e;
288 } 288 }
289 argiter.shift(); 289 argiter.shift();
290 var result = argiter[0].next();
291 return result;
292 } 290 }
293 } 291 }
294 if (argiter.length == 1) { 292 if (argiter.length == 1) {
@@ -413,7 +411,7 @@ MochiKit.Base.update(MochiKit.Iter, {
413 411
414 var self = MochiKit.Iter; 412 var self = MochiKit.Iter;
415 iterable = self.iter(iterable); 413 iterable = self.iter(iterable);
416 var rval = []; 414 rval = [];
417 var a_val; 415 var a_val;
418 try { 416 try {
419 while (true) { 417 while (true) {
diff --git a/frontend/gamma/js/MochiKit/Logging.js b/frontend/gamma/js/MochiKit/Logging.js
index f00996b..8b06e0b 100644
--- a/frontend/gamma/js/MochiKit/Logging.js
+++ b/frontend/gamma/js/MochiKit/Logging.js
@@ -8,7 +8,7 @@ See <http://mochikit.com/> for documentation, downloads, license, etc.
8 8
9***/ 9***/
10 10
11MochiKit.Base._module('Logging', '1.5', ['Base']); 11MochiKit.Base.module(MochiKit, 'Logging', '1.5', ['Base']);
12 12
13 /** @id MochiKit.Logging.LogMessage */ 13 /** @id MochiKit.Logging.LogMessage */
14MochiKit.Logging.LogMessage = function (num, level, info) { 14MochiKit.Logging.LogMessage = function (num, level, info) {
@@ -187,7 +187,7 @@ MochiKit.Logging.Logger.prototype = {
187 } 187 }
188 var messages = this.getMessages(howMany); 188 var messages = this.getMessages(howMany);
189 if (messages.length) { 189 if (messages.length) {
190 var lst = map(function (m) { 190 var lst = MochiKit.Base.map(function (m) {
191 return '\n [' + m.num + '] ' + m.level + ': ' + m.info.join(' '); 191 return '\n [' + m.num + '] ' + m.level + ': ' + m.info.join(' ');
192 }, messages); 192 }, messages);
193 lst.unshift('LAST ' + messages.length + ' MESSAGES:'); 193 lst.unshift('LAST ' + messages.length + ' MESSAGES:');
diff --git a/frontend/gamma/js/MochiKit/LoggingPane.js b/frontend/gamma/js/MochiKit/LoggingPane.js
index c960c21..b7ea120 100644
--- a/frontend/gamma/js/MochiKit/LoggingPane.js
+++ b/frontend/gamma/js/MochiKit/LoggingPane.js
@@ -8,7 +8,7 @@ See <http://mochikit.com/> for documentation, downloads, license, etc.
8 8
9***/ 9***/
10 10
11MochiKit.Base._module('LoggingPane', '1.5', ['Base', 'Logging']); 11MochiKit.Base.module(MochiKit, 'LoggingPane', '1.5', ['Base', 'Logging']);
12 12
13/** @id MochiKit.LoggingPane.createLoggingPane */ 13/** @id MochiKit.LoggingPane.createLoggingPane */
14MochiKit.LoggingPane.createLoggingPane = function (inline/* = false */) { 14MochiKit.LoggingPane.createLoggingPane = function (inline/* = false */) {
@@ -24,7 +24,10 @@ MochiKit.LoggingPane.createLoggingPane = function (inline/* = false */) {
24 return m._loggingPane; 24 return m._loggingPane;
25}; 25};
26 26
27/** @id MochiKit.LoggingPane.LoggingPane */ 27/**
28 * @id MochiKit.LoggingPane.LoggingPane
29 * @constructor
30 */
28MochiKit.LoggingPane.LoggingPane = function (inline/* = false */, logger/* = MochiKit.Logging.logger */) { 31MochiKit.LoggingPane.LoggingPane = function (inline/* = false */, logger/* = MochiKit.Logging.logger */) {
29 32
30 /* Use a div if inline, pop up a window if not */ 33 /* Use a div if inline, pop up a window if not */
@@ -146,7 +149,7 @@ MochiKit.LoggingPane.LoggingPane = function (inline/* = false */, logger/* = Moc
146 infore = new RegExp(infoFilterField.value); 149 infore = new RegExp(infoFilterField.value);
147 } catch(e) { 150 } catch(e) {
148 /* If there was an error with the regexes, do no filtering */ 151 /* If there was an error with the regexes, do no filtering */
149 logDebug("Error in filter regex: " + e.message); 152 MochiKit.Logging.logDebug("Error in filter regex: " + e.message);
150 return null; 153 return null;
151 } 154 }
152 155
@@ -184,7 +187,7 @@ MochiKit.LoggingPane.LoggingPane = function (inline/* = false */, logger/* = Moc
184 try { 187 try {
185 try { 188 try {
186 debugPane.loggingPane = null; 189 debugPane.loggingPane = null;
187 } catch(e) { logFatal("Bookmarklet was closed incorrectly."); } 190 } catch(e) { MochiKit.Logging.logFatal("Bookmarklet was closed incorrectly."); }
188 if (inline) { 191 if (inline) {
189 debugPane.parentNode.removeChild(debugPane); 192 debugPane.parentNode.removeChild(debugPane);
190 } else { 193 } else {
@@ -224,7 +227,7 @@ MochiKit.LoggingPane.LoggingPane = function (inline/* = false */, logger/* = Moc
224 /** @id MochiKit.LoggingPane.filterOnEnter */ 227 /** @id MochiKit.LoggingPane.filterOnEnter */
225 var filterOnEnter = bind(function (event) { 228 var filterOnEnter = bind(function (event) {
226 event = event || window.event; 229 event = event || window.event;
227 key = event.which || event.keyCode; 230 var key = event.which || event.keyCode;
228 if (key == 13) { 231 if (key == 13) {
229 this.buildAndApplyFilter(); 232 this.buildAndApplyFilter();
230 } 233 }
diff --git a/frontend/gamma/js/MochiKit/MochiKit.js b/frontend/gamma/js/MochiKit/MochiKit.js
index 8e5be68..511e075 100644
--- a/frontend/gamma/js/MochiKit/MochiKit.js
+++ b/frontend/gamma/js/MochiKit/MochiKit.js
@@ -8,17 +8,14 @@ See <http://mochikit.com/> for documentation, downloads, license, etc.
8 8
9***/ 9***/
10 10
11if (typeof(MochiKit) == 'undefined') { 11var MochiKit = MochiKit || {};
12 MochiKit = {};
13}
14 12
15if (typeof(MochiKit.MochiKit) == 'undefined') {
16 /** @id MochiKit.MochiKit */ 13 /** @id MochiKit.MochiKit */
17 MochiKit.MochiKit = {}; 14MochiKit.MochiKit = MochiKit.MochiKit || {};
18}
19 15
20MochiKit.MochiKit.NAME = "MochiKit.MochiKit"; 16MochiKit.MochiKit.NAME = "MochiKit.MochiKit";
21MochiKit.MochiKit.VERSION = "1.5"; 17MochiKit.MochiKit.VERSION = "1.5";
18MochiKit.MochiKit.__export__ = false;
22MochiKit.MochiKit.__repr__ = function () { 19MochiKit.MochiKit.__repr__ = function () {
23 return "[" + this.NAME + " " + this.VERSION + "]"; 20 return "[" + this.NAME + " " + this.VERSION + "]";
24}; 21};
diff --git a/frontend/gamma/js/MochiKit/MockDOM.js b/frontend/gamma/js/MochiKit/MockDOM.js
index abdb54a..7e6d60b 100644
--- a/frontend/gamma/js/MochiKit/MockDOM.js
+++ b/frontend/gamma/js/MochiKit/MockDOM.js
@@ -8,16 +8,13 @@ See <http://mochikit.com/> for documentation, downloads, license, etc.
8 8
9***/ 9***/
10 10
11if (typeof(MochiKit) == "undefined") { 11var MochiKit = MochiKit || {};
12 MochiKit = {};
13}
14 12
15if (typeof(MochiKit.MockDOM) == "undefined") { 13MochiKit.MockDOM = MochiKit.MockDOM || {};
16 MochiKit.MockDOM = {};
17}
18 14
19MochiKit.MockDOM.NAME = "MochiKit.MockDOM"; 15MochiKit.MockDOM.NAME = "MochiKit.MockDOM";
20MochiKit.MockDOM.VERSION = "1.5"; 16MochiKit.MockDOM.VERSION = "1.5";
17MochiKit.MockDOM.__export__ = false;
21 18
22MochiKit.MockDOM.__repr__ = function () { 19MochiKit.MockDOM.__repr__ = function () {
23 return "[" + this.NAME + " " + this.VERSION + "]"; 20 return "[" + this.NAME + " " + this.VERSION + "]";
diff --git a/frontend/gamma/js/MochiKit/Position.js b/frontend/gamma/js/MochiKit/Position.js
index 6bc5b39..2680507 100644
--- a/frontend/gamma/js/MochiKit/Position.js
+++ b/frontend/gamma/js/MochiKit/Position.js
@@ -8,7 +8,7 @@ See <http://mochikit.com/> for documentation, downloads, license, etc.
8 8
9***/ 9***/
10 10
11MochiKit.Base._module('Position', '1.5', ['Base', 'DOM', 'Style']); 11MochiKit.Base.module(MochiKit, 'Position', '1.5', ['Base', 'DOM', 'Style']);
12 12
13MochiKit.Base.update(MochiKit.Position, { 13MochiKit.Base.update(MochiKit.Position, {
14 // Don't export from this module 14 // Don't export from this module
diff --git a/frontend/gamma/js/MochiKit/Selector.js b/frontend/gamma/js/MochiKit/Selector.js
index 6aec892..3187fe9 100644
--- a/frontend/gamma/js/MochiKit/Selector.js
+++ b/frontend/gamma/js/MochiKit/Selector.js
@@ -8,7 +8,7 @@ See <http://mochikit.com/> for documentation, downloads, license, etc.
8 8
9***/ 9***/
10 10
11MochiKit.Base._module('Selector', '1.5', ['Base', 'DOM', 'Iter']); 11MochiKit.Base.module(MochiKit, 'Selector', '1.5', ['Base', 'DOM', 'Iter']);
12 12
13MochiKit.Selector.Selector = function (expression) { 13MochiKit.Selector.Selector = function (expression) {
14 this.params = {classNames: [], pseudoClassNames: []}; 14 this.params = {classNames: [], pseudoClassNames: []};
@@ -127,8 +127,8 @@ MochiKit.Selector.Selector.prototype = {
127 a = 2; 127 a = 2;
128 b = 0; 128 b = 0;
129 } else { 129 } else {
130 a = match[2] && parseInt(match) || null; 130 a = match[2] && parseInt(match, 10) || null;
131 b = parseInt(match[3]); 131 b = parseInt(match[3], 10);
132 } 132 }
133 conditions.push('this.nthChild(element,' + a + ',' + b 133 conditions.push('this.nthChild(element,' + a + ',' + b
134 + ',' + !!pseudoClass.match('^nth-last') // Reverse 134 + ',' + !!pseudoClass.match('^nth-last') // Reverse
@@ -167,7 +167,7 @@ MochiKit.Selector.Selector.prototype = {
167 break; 167 break;
168 case 'not': 168 case 'not':
169 var subselector = new MochiKit.Selector.Selector(pseudoClassArgument); 169 var subselector = new MochiKit.Selector.Selector(pseudoClassArgument);
170 conditions.push('!( ' + subselector.buildMatchExpression() + ')') 170 conditions.push('!( ' + subselector.buildMatchExpression() + ')');
171 break; 171 break;
172 } 172 }
173 } 173 }
@@ -177,7 +177,7 @@ MochiKit.Selector.Selector.prototype = {
177 var value = 'MochiKit.DOM.getNodeAttribute(element, ' + repr(attribute.name) + ')'; 177 var value = 'MochiKit.DOM.getNodeAttribute(element, ' + repr(attribute.name) + ')';
178 var splitValueBy = function (delimiter) { 178 var splitValueBy = function (delimiter) {
179 return value + '.split(' + repr(delimiter) + ')'; 179 return value + '.split(' + repr(delimiter) + ')';
180 } 180 };
181 conditions.push(value + ' != null'); 181 conditions.push(value + ' != null');
182 switch (attribute.operator) { 182 switch (attribute.operator) {
183 case '=': 183 case '=':
@@ -352,6 +352,12 @@ MochiKit.Base.update(MochiKit.Selector, {
352 return res; 352 return res;
353 }; 353 };
354 return MochiKit.Base.flattenArray(MochiKit.Base.map(function (expression) { 354 return MochiKit.Base.flattenArray(MochiKit.Base.map(function (expression) {
355 try {
356 var res = element.querySelectorAll(expression);
357 return Array.prototype.slice.call(res, 0);
358 } catch (ignore) {
359 // No querySelectorAll or extended expression syntax used
360 }
355 var nextScope = ""; 361 var nextScope = "";
356 var reducer = function (results, expr) { 362 var reducer = function (results, expr) {
357 var match = expr.match(/^[>+~]$/); 363 var match = expr.match(/^[>+~]$/);
diff --git a/frontend/gamma/js/MochiKit/Signal.js b/frontend/gamma/js/MochiKit/Signal.js
index 7df5619..11590c1 100644
--- a/frontend/gamma/js/MochiKit/Signal.js
+++ b/frontend/gamma/js/MochiKit/Signal.js
@@ -8,7 +8,7 @@ See <http://mochikit.com/> for documentation, downloads, license, etc.
8 8
9***/ 9***/
10 10
11MochiKit.Base._module('Signal', '1.5', ['Base', 'DOM', 'Style']); 11MochiKit.Base.module(MochiKit, 'Signal', '1.5', ['Base', 'DOM']);
12 12
13MochiKit.Signal._observers = []; 13MochiKit.Signal._observers = [];
14 14
@@ -266,16 +266,17 @@ MochiKit.Base.update(MochiKit.Signal.Event.prototype, {
266 266
267 if (this.type() && ( 267 if (this.type() && (
268 this.type().indexOf('mouse') === 0 || 268 this.type().indexOf('mouse') === 0 ||
269 this.type().indexOf('drag') === 0 ||
269 this.type().indexOf('click') != -1 || 270 this.type().indexOf('click') != -1 ||
270 this.type() == 'contextmenu')) { 271 this.type() == 'contextmenu')) {
271 272
272 m.client = new MochiKit.Style.Coordinates(0, 0); 273 m.client = { x: 0, y: 0 };
273 if (e.clientX || e.clientY) { 274 if (e.clientX || e.clientY) {
274 m.client.x = (!e.clientX || e.clientX < 0) ? 0 : e.clientX; 275 m.client.x = (!e.clientX || e.clientX < 0) ? 0 : e.clientX;
275 m.client.y = (!e.clientY || e.clientY < 0) ? 0 : e.clientY; 276 m.client.y = (!e.clientY || e.clientY < 0) ? 0 : e.clientY;
276 } 277 }
277 278
278 m.page = new MochiKit.Style.Coordinates(0, 0); 279 m.page = { x: 0, y: 0 };
279 if (e.pageX || e.pageY) { 280 if (e.pageX || e.pageY) {
280 m.page.x = (!e.pageX || e.pageX < 0) ? 0 : e.pageX; 281 m.page.x = (!e.pageX || e.pageX < 0) ? 0 : e.pageX;
281 m.page.y = (!e.pageY || e.pageY < 0) ? 0 : e.pageY; 282 m.page.y = (!e.pageY || e.pageY < 0) ? 0 : e.pageY;
@@ -337,7 +338,7 @@ MochiKit.Base.update(MochiKit.Signal.Event.prototype, {
337 } 338 }
338 } 339 }
339 if (this.type() == 'mousewheel') { 340 if (this.type() == 'mousewheel') {
340 m.wheel = new MochiKit.Style.Coordinates(0, 0); 341 m.wheel = { x: 0, y: 0 };
341 if (e.wheelDeltaX || e.wheelDeltaY) { 342 if (e.wheelDeltaX || e.wheelDeltaY) {
342 m.wheel.x = e.wheelDeltaX / -40 || 0; 343 m.wheel.x = e.wheelDeltaX / -40 || 0;
343 m.wheel.y = e.wheelDeltaY / -40 || 0; 344 m.wheel.y = e.wheelDeltaY / -40 || 0;
@@ -672,6 +673,18 @@ MochiKit.Base.update(MochiKit.Signal, {
672 return ident; 673 return ident;
673 }, 674 },
674 675
676 /** @id MochiKit.Signal.connectOnce */
677 connectOnce: function (src, sig, objOrFunc/* optional */, funcOrStr) {
678 var self = MochiKit.Signal;
679 var ident1 = self.connect(src, sig, objOrFunc, funcOrStr);
680 var ident2;
681 ident2 = self.connect(src, sig, function() {
682 self.disconnect(ident1);
683 self.disconnect(ident2);
684 });
685 return ident1;
686 },
687
675 _disconnect: function (ident) { 688 _disconnect: function (ident) {
676 // already disconnected 689 // already disconnected
677 if (!ident.connected) { 690 if (!ident.connected) {
@@ -715,7 +728,7 @@ MochiKit.Base.update(MochiKit.Signal, {
715 var o = observers[i]; 728 var o = observers[i];
716 if (o.source === src && o.signal === sig && o.objOrFunc === obj && o.funcOrStr === func) { 729 if (o.source === src && o.signal === sig && o.objOrFunc === obj && o.funcOrStr === func) {
717 self._disconnect(o); 730 self._disconnect(o);
718 if (!self._lock) { 731 if (self._lock === 0) {
719 observers.splice(i, 1); 732 observers.splice(i, 1);
720 } else { 733 } else {
721 self._dirty = true; 734 self._dirty = true;
@@ -727,7 +740,7 @@ MochiKit.Base.update(MochiKit.Signal, {
727 var idx = m.findIdentical(observers, ident); 740 var idx = m.findIdentical(observers, ident);
728 if (idx >= 0) { 741 if (idx >= 0) {
729 self._disconnect(ident); 742 self._disconnect(ident);
730 if (!self._lock) { 743 if (self._lock === 0) {
731 observers.splice(idx, 1); 744 observers.splice(idx, 1);
732 } else { 745 } else {
733 self._dirty = true; 746 self._dirty = true;
@@ -743,7 +756,7 @@ MochiKit.Base.update(MochiKit.Signal, {
743 var self = MochiKit.Signal; 756 var self = MochiKit.Signal;
744 var observers = self._observers; 757 var observers = self._observers;
745 var disconnect = self._disconnect; 758 var disconnect = self._disconnect;
746 var locked = self._lock; 759 var lock = self._lock;
747 var dirty = self._dirty; 760 var dirty = self._dirty;
748 if (typeof(funcOrStr) === 'undefined') { 761 if (typeof(funcOrStr) === 'undefined') {
749 funcOrStr = null; 762 funcOrStr = null;
@@ -753,10 +766,10 @@ MochiKit.Base.update(MochiKit.Signal, {
753 if (ident.objOrFunc === objOrFunc && 766 if (ident.objOrFunc === objOrFunc &&
754 (funcOrStr === null || ident.funcOrStr === funcOrStr)) { 767 (funcOrStr === null || ident.funcOrStr === funcOrStr)) {
755 disconnect(ident); 768 disconnect(ident);
756 if (locked) { 769 if (lock === 0) {
757 dirty = true;
758 } else {
759 observers.splice(i, 1); 770 observers.splice(i, 1);
771 } else {
772 dirty = true;
760 } 773 }
761 } 774 }
762 } 775 }
@@ -774,7 +787,7 @@ MochiKit.Base.update(MochiKit.Signal, {
774 var disconnect = self._disconnect; 787 var disconnect = self._disconnect;
775 var observers = self._observers; 788 var observers = self._observers;
776 var i, ident; 789 var i, ident;
777 var locked = self._lock; 790 var lock = self._lock;
778 var dirty = self._dirty; 791 var dirty = self._dirty;
779 if (signals.length === 0) { 792 if (signals.length === 0) {
780 // disconnect all 793 // disconnect all
@@ -782,7 +795,7 @@ MochiKit.Base.update(MochiKit.Signal, {
782 ident = observers[i]; 795 ident = observers[i];
783 if (ident.source === src) { 796 if (ident.source === src) {
784 disconnect(ident); 797 disconnect(ident);
785 if (!locked) { 798 if (lock === 0) {
786 observers.splice(i, 1); 799 observers.splice(i, 1);
787 } else { 800 } else {
788 dirty = true; 801 dirty = true;
@@ -798,7 +811,7 @@ MochiKit.Base.update(MochiKit.Signal, {
798 ident = observers[i]; 811 ident = observers[i];
799 if (ident.source === src && ident.signal in sigs) { 812 if (ident.source === src && ident.signal in sigs) {
800 disconnect(ident); 813 disconnect(ident);
801 if (!locked) { 814 if (lock === 0) {
802 observers.splice(i, 1); 815 observers.splice(i, 1);
803 } else { 816 } else {
804 dirty = true; 817 dirty = true;
@@ -818,7 +831,7 @@ MochiKit.Base.update(MochiKit.Signal, {
818 } 831 }
819 var args = MochiKit.Base.extend(null, arguments, 2); 832 var args = MochiKit.Base.extend(null, arguments, 2);
820 var errors = []; 833 var errors = [];
821 self._lock = true; 834 self._lock++;
822 for (var i = 0; i < observers.length; i++) { 835 for (var i = 0; i < observers.length; i++) {
823 var ident = observers[i]; 836 var ident = observers[i];
824 if (ident.source === src && ident.signal === sig && 837 if (ident.source === src && ident.signal === sig &&
@@ -837,8 +850,8 @@ MochiKit.Base.update(MochiKit.Signal, {
837 } 850 }
838 } 851 }
839 } 852 }
840 self._lock = false; 853 self._lock--;
841 if (self._dirty) { 854 if (self._lock === 0 && self._dirty) {
842 self._dirty = false; 855 self._dirty = false;
843 for (var i = observers.length - 1; i >= 0; i--) { 856 for (var i = observers.length - 1; i >= 0; i--) {
844 if (!observers[i].connected) { 857 if (!observers[i].connected) {
@@ -861,7 +874,7 @@ MochiKit.Signal.__new__ = function (win) {
861 var m = MochiKit.Base; 874 var m = MochiKit.Base;
862 this._document = document; 875 this._document = document;
863 this._window = win; 876 this._window = win;
864 this._lock = false; 877 this._lock = 0;
865 this._dirty = false; 878 this._dirty = false;
866 879
867 try { 880 try {
diff --git a/frontend/gamma/js/MochiKit/Sortable.js b/frontend/gamma/js/MochiKit/Sortable.js
index 863b506..ca9db21 100644
--- a/frontend/gamma/js/MochiKit/Sortable.js
+++ b/frontend/gamma/js/MochiKit/Sortable.js
@@ -6,7 +6,7 @@ See scriptaculous.js for full license.
6 6
7***/ 7***/
8 8
9MochiKit.Base._module('Sortable', '1.5', ['Base', 'Iter', 'DOM', 'Position', 'DragAndDrop']); 9MochiKit.Base.module(MochiKit, 'Sortable', '1.5', ['Base', 'Iter', 'DOM', 'Position', 'DragAndDrop']);
10 10
11MochiKit.Base.update(MochiKit.Sortable, { 11MochiKit.Base.update(MochiKit.Sortable, {
12 __export__: false, 12 __export__: false,
@@ -179,7 +179,7 @@ MochiKit.Base.update(MochiKit.Sortable, {
179 onhover: self.onHover, 179 onhover: self.onHover,
180 tree: options.tree, 180 tree: options.tree,
181 accept: options.accept 181 accept: options.accept
182 } 182 };
183 183
184 var options_for_tree = { 184 var options_for_tree = {
185 onhover: self.onEmptyHover, 185 onhover: self.onEmptyHover,
@@ -187,7 +187,7 @@ MochiKit.Base.update(MochiKit.Sortable, {
187 containment: options.containment, 187 containment: options.containment,
188 hoverclass: options.hoverclass, 188 hoverclass: options.hoverclass,
189 accept: options.accept 189 accept: options.accept
190 } 190 };
191 191
192 // fix for gecko engine 192 // fix for gecko engine
193 MochiKit.DOM.removeEmptyTextNodes(element); 193 MochiKit.DOM.removeEmptyTextNodes(element);
@@ -430,11 +430,11 @@ MochiKit.Base.update(MochiKit.Sortable, {
430 children: [], 430 children: [],
431 position: parent.children.length, 431 position: parent.children.length,
432 container: self._findChildrenElement(children[i], options.treeTag.toUpperCase()) 432 container: self._findChildrenElement(children[i], options.treeTag.toUpperCase())
433 } 433 };
434 434
435 /* Get the element containing the children and recurse over it */ 435 /* Get the element containing the children and recurse over it */
436 if (child.container) { 436 if (child.container) {
437 self._tree(child.container, options, child) 437 self._tree(child.container, options, child);
438 } 438 }
439 439
440 parent.children.push (child); 440 parent.children.push (child);
@@ -475,7 +475,7 @@ MochiKit.Base.update(MochiKit.Sortable, {
475 children: new Array, 475 children: new Array,
476 container: element, 476 container: element,
477 position: 0 477 position: 0
478 } 478 };
479 479
480 return MochiKit.Sortable._tree(element, options, root); 480 return MochiKit.Sortable._tree(element, options, root);
481 }, 481 },
diff --git a/frontend/gamma/js/MochiKit/Style.js b/frontend/gamma/js/MochiKit/Style.js
index 7f10117..740fd2f 100644
--- a/frontend/gamma/js/MochiKit/Style.js
+++ b/frontend/gamma/js/MochiKit/Style.js
@@ -6,9 +6,12 @@ See <http://mochikit.com/> for documentation, downloads, license, etc.
6 6
7(c) 2005-2006 Bob Ippolito, Beau Hartshorne. All rights Reserved. 7(c) 2005-2006 Bob Ippolito, Beau Hartshorne. All rights Reserved.
8 8
9The MochiKit.Style.getElementPosition function is adapted from
10YAHOO.util.Dom.getXY v0.9.0. which is copyrighted by Yahoo! Inc.
11
9***/ 12***/
10 13
11MochiKit.Base._module('Style', '1.5', ['Base', 'DOM']); 14MochiKit.Base.module(MochiKit, 'Style', '1.5', ['Base', 'DOM']);
12 15
13 16
14/** @id MochiKit.Style.Dimensions */ 17/** @id MochiKit.Style.Dimensions */
@@ -179,7 +182,7 @@ MochiKit.Base.update(MochiKit.Style, {
179 o.nodeType == null && 182 o.nodeType == null &&
180 typeof(o.x) == "number" && 183 typeof(o.x) == "number" &&
181 typeof(o.y) == "number"; 184 typeof(o.y) == "number";
182 } 185 };
183 186
184 if (typeof(elem) == "string") { 187 if (typeof(elem) == "string") {
185 elem = dom.getElement(elem); 188 elem = dom.getElement(elem);
@@ -197,7 +200,7 @@ MochiKit.Base.update(MochiKit.Style, {
197 var de = d.documentElement; 200 var de = d.documentElement;
198 var b = d.body; 201 var b = d.body;
199 202
200 if (!elem.parentNode && elem.x && elem.y) { 203 if (isCoordinates(elem)) {
201 /* it's just a MochiKit.Style.Coordinates object */ 204 /* it's just a MochiKit.Style.Coordinates object */
202 c.x += elem.x || 0; 205 c.x += elem.x || 0;
203 c.y += elem.y || 0; 206 c.y += elem.y || 0;
@@ -228,8 +231,8 @@ MochiKit.Base.update(MochiKit.Style, {
228 231
229 if (parent != elem) { 232 if (parent != elem) {
230 while (parent) { 233 while (parent) {
231 c.x += parseInt(parent.style.borderLeftWidth) || 0; 234 c.x += parseInt(parent.style.borderLeftWidth, 10) || 0;
232 c.y += parseInt(parent.style.borderTopWidth) || 0; 235 c.y += parseInt(parent.style.borderTopWidth, 10) || 0;
233 c.x += parent.offsetLeft; 236 c.x += parent.offsetLeft;
234 c.y += parent.offsetTop; 237 c.y += parent.offsetTop;
235 parent = parent.offsetParent; 238 parent = parent.offsetParent;
@@ -390,7 +393,7 @@ MochiKit.Base.update(MochiKit.Style, {
390 if (contentSize) { 393 if (contentSize) {
391 var tableCell = 'colSpan' in elem && 'rowSpan' in elem; 394 var tableCell = 'colSpan' in elem && 'rowSpan' in elem;
392 var collapse = (tableCell && elem.parentNode && self.getStyle( 395 var collapse = (tableCell && elem.parentNode && self.getStyle(
393 elem.parentNode, 'borderCollapse') == 'collapse') 396 elem.parentNode, 'borderCollapse') == 'collapse');
394 if (collapse) { 397 if (collapse) {
395 if (/MSIE/.test(navigator.userAgent)) { 398 if (/MSIE/.test(navigator.userAgent)) {
396 var borderLeftQuota = elem.previousSibling? 0.5 : 1; 399 var borderLeftQuota = elem.previousSibling? 0.5 : 1;
@@ -543,8 +546,8 @@ MochiKit.Base.update(MochiKit.Style, {
543 } 546 }
544 547
545 // Backwards compatibility aliases 548 // Backwards compatibility aliases
546 m._deprecated(this, 'elementPosition', 'MochiKit.Style.getElementPosition', '1.3'); 549 m._deprecated(this, 'elementPosition', 'MochiKit.Style.getElementPosition', '1.3', true);
547 m._deprecated(this, 'elementDimensions', 'MochiKit.Style.getElementDimensions', '1.3'); 550 m._deprecated(this, 'elementDimensions', 'MochiKit.Style.getElementDimensions', '1.3', true);
548 551
549 this.hideElement = m.partial(this.setDisplayForElement, 'none'); 552 this.hideElement = m.partial(this.setDisplayForElement, 'none');
550 // TODO: showElement could be improved by using getDefaultDisplay. 553 // TODO: showElement could be improved by using getDefaultDisplay.
diff --git a/frontend/gamma/js/MochiKit/Test.js b/frontend/gamma/js/MochiKit/Test.js
index 9520ab2..f29670f 100644
--- a/frontend/gamma/js/MochiKit/Test.js
+++ b/frontend/gamma/js/MochiKit/Test.js
@@ -8,7 +8,7 @@ See <http://mochikit.com/> for documentation, downloads, license, etc.
8 8
9***/ 9***/
10 10
11MochiKit.Base._module('Test', '1.5', ['Base']); 11MochiKit.Base.module(MochiKit, 'Test', '1.5', ['Base']);
12 12
13MochiKit.Test.runTests = function (obj) { 13MochiKit.Test.runTests = function (obj) {
14 if (typeof(obj) == "string") { 14 if (typeof(obj) == "string") {
diff --git a/frontend/gamma/js/MochiKit/Text.js b/frontend/gamma/js/MochiKit/Text.js
index a44f7e4..ff6366d 100644
--- a/frontend/gamma/js/MochiKit/Text.js
+++ b/frontend/gamma/js/MochiKit/Text.js
@@ -8,7 +8,7 @@ See <http://mochikit.com/> for documentation, downloads, license, etc.
8 8
9***/ 9***/
10 10
11MochiKit.Base._module('Text', '1.5', ['Base', 'Format']); 11MochiKit.Base.module(MochiKit, 'Text', '1.5', ['Base', 'Format']);
12 12
13/** 13/**
14 * Checks if a text string starts with the specified substring. If 14 * Checks if a text string starts with the specified substring. If
@@ -22,7 +22,7 @@ MochiKit.Base._module('Text', '1.5', ['Base', 'Format']);
22 */ 22 */
23MochiKit.Text.startsWith = function (substr, str) { 23MochiKit.Text.startsWith = function (substr, str) {
24 return str != null && substr != null && str.indexOf(substr) == 0; 24 return str != null && substr != null && str.indexOf(substr) == 0;
25} 25};
26 26
27/** 27/**
28 * Checks if a text string ends with the specified substring. If 28 * Checks if a text string ends with the specified substring. If
@@ -37,7 +37,7 @@ MochiKit.Text.startsWith = function (substr, str) {
37MochiKit.Text.endsWith = function (substr, str) { 37MochiKit.Text.endsWith = function (substr, str) {
38 return str != null && substr != null && 38 return str != null && substr != null &&
39 str.lastIndexOf(substr) == Math.max(str.length - substr.length, 0); 39 str.lastIndexOf(substr) == Math.max(str.length - substr.length, 0);
40} 40};
41 41
42/** 42/**
43 * Checks if a text string contains the specified substring. If 43 * Checks if a text string contains the specified substring. If
@@ -51,7 +51,7 @@ MochiKit.Text.endsWith = function (substr, str) {
51 */ 51 */
52MochiKit.Text.contains = function (substr, str) { 52MochiKit.Text.contains = function (substr, str) {
53 return str != null && substr != null && str.indexOf(substr) >= 0; 53 return str != null && substr != null && str.indexOf(substr) >= 0;
54} 54};
55 55
56/** 56/**
57 * Adds a character to the left-hand side of a string until it 57 * Adds a character to the left-hand side of a string until it
@@ -71,7 +71,7 @@ MochiKit.Text.padLeft = function (str, minLength, fillChar) {
71 str = fillChar + str; 71 str = fillChar + str;
72 } 72 }
73 return str; 73 return str;
74} 74};
75 75
76/** 76/**
77 * Adds a character to the right-hand side of a string until it 77 * Adds a character to the right-hand side of a string until it
@@ -91,7 +91,7 @@ MochiKit.Text.padRight = function (str, minLength, fillChar) {
91 str += fillChar; 91 str += fillChar;
92 } 92 }
93 return str; 93 return str;
94} 94};
95 95
96/** 96/**
97 * Returns a truncated copy of a string. If the string is shorter 97 * Returns a truncated copy of a string. If the string is shorter
@@ -119,29 +119,55 @@ MochiKit.Text.truncate = function (str, maxLength, tail) {
119 } else { 119 } else {
120 return str.slice(0, maxLength); 120 return str.slice(0, maxLength);
121 } 121 }
122} 122};
123 123
124/** 124/**
125 * Splits a text string, applies a function and joins the results 125 * Splits a text string using separator as the split point
126 * back together again. This is a convenience function for calling 126 * If max is given, at most max splits are done, giving at most
127 * split(), map() and join() separately. It can be used to easily 127 * max + 1 elements in the returned list.
128 * trim each line in a text string (using the strip function), or to
129 * translate a text word-by-word.
130 * 128 *
131 * @param {Function} func the function to apply
132 * @param {String} str the string to split 129 * @param {String} str the string to split
133 * @param {String} [separator] the separator character to use, 130 * @param {String/RegExp} [separator] the separator char or regexp to use,
134 * defaults to newline 131 * defaults to newline
132 * @param {Number} [max] the maximum number of parts to return
133 * @return {Array} an array of parts of the string
134 */
135MochiKit.Text.split = function (str, separator, max) {
136 if (str == null) {
137 return str;
138 }
139 separator = separator || '\n';
140 var bits = str.split(separator);
141 if ((typeof(max) == "undefined") || max >= bits.length - 1) {
142 return bits;
143 }
144 bits.splice(max, bits.length, bits.slice(max, bits.length).join(separator));
145 return bits;
146};
147
148/**
149 * Splits a text string using separator as the split point
150 * If max is given, at most max splits are done,
151 * using splits from the right
135 * 152 *
136 * @return {String} a string with the joined up results 153 * @param {String} str the string to split
154 * @param {String/RegExp} [separator] the separator char or regexp to use,
155 * defaults to newline
156 * @param {Number} [max] the maximum number of parts to return
157 * @return {Array} an array of parts of the string
137 */ 158 */
138MochiKit.Text.splitJoin = function (func, str, separator) { 159MochiKit.Text.rsplit = function (str, separator, max) {
139 if (str == null || str.length == 0) { 160 if (str == null) {
140 return str; 161 return str;
141 } 162 }
142 separator = separator || '\n' 163 separator = separator || '\n';
143 return MochiKit.Base.map(func, str.split(separator)).join(separator); 164 var bits = str.split(separator);
165 if ((typeof(max) == "undefined") || max >= bits.length - 1){
166 return bits;
144} 167}
168 bits.splice(0, bits.length-max, bits.slice(0, bits.length-max).join(separator));
169 return bits;
170};
145 171
146/** 172/**
147 * Creates a formatter function for the specified formatter pattern 173 * Creates a formatter function for the specified formatter pattern
@@ -158,7 +184,7 @@ MochiKit.Text.splitJoin = function (func, str, separator) {
158 * @throws FormatPatternError if the format pattern was invalid 184 * @throws FormatPatternError if the format pattern was invalid
159 */ 185 */
160MochiKit.Text.formatter = function (pattern, locale) { 186MochiKit.Text.formatter = function (pattern, locale) {
161 if (typeof(locale) == "undefined") { 187 if (locale == null) {
162 locale = MochiKit.Format.formatLocale(); 188 locale = MochiKit.Format.formatLocale();
163 } else if (typeof(locale) == "string") { 189 } else if (typeof(locale) == "string") {
164 locale = MochiKit.Format.formatLocale(locale); 190 locale = MochiKit.Format.formatLocale(locale);
@@ -175,8 +201,8 @@ MochiKit.Text.formatter = function (pattern, locale) {
175 } 201 }
176 } 202 }
177 return res.join(""); 203 return res.join("");
178 } 204 };
179} 205};
180 206
181/** 207/**
182 * Formats the specified arguments according to a formatter pattern. 208 * Formats the specified arguments according to a formatter pattern.
@@ -193,7 +219,7 @@ MochiKit.Text.formatter = function (pattern, locale) {
193MochiKit.Text.format = function (pattern/*, ...*/) { 219MochiKit.Text.format = function (pattern/*, ...*/) {
194 var func = MochiKit.Text.formatter(pattern); 220 var func = MochiKit.Text.formatter(pattern);
195 return func.apply(this, MochiKit.Base.extend([], arguments, 1)); 221 return func.apply(this, MochiKit.Base.extend([], arguments, 1));
196} 222};
197 223
198/** 224/**
199 * Format a value with the specified format specifier. 225 * Format a value with the specified format specifier.
@@ -205,24 +231,29 @@ MochiKit.Text.format = function (pattern/*, ...*/) {
205 * LOCALE.en_US 231 * LOCALE.en_US
206 * 232 *
207 * @return {String} the formatted output string 233 * @return {String} the formatted output string
234 *
235 * @throws FormatPatternError if the format specifier was invalid
208 */ 236 */
209MochiKit.Text.formatValue = function (spec, value, locale) { 237MochiKit.Text.formatValue = function (spec, value, locale) {
210 var self = MochiKit.Text; 238 var self = MochiKit.Text;
211 if (typeof(spec) === "string") { 239 if (typeof(spec) === "string") {
212 spec = self._parseFormatFlags(spec, 0, spec.length - 1); 240 spec = self._parseFormatFlags(spec, 0, spec.length);
213 } 241 }
214 for (var i = 0; spec.path != null && i < spec.path.length; i++) { 242 for (var i = 0; spec.path != null && i < spec.path.length; i++) {
215 if (value != null) { 243 if (value != null) {
216 value = value[spec.path[i]]; 244 value = value[spec.path[i]];
217 } 245 }
218 } 246 }
219 if (typeof(locale) == "undefined") { 247 if (locale == null) {
220 locale = MochiKit.Format.formatLocale(); 248 locale = MochiKit.Format.formatLocale();
221 } else if (typeof(locale) == "string") { 249 } else if (typeof(locale) == "string") {
222 locale = MochiKit.Format.formatLocale(locale); 250 locale = MochiKit.Format.formatLocale(locale);
223 } 251 }
224 var str = ""; 252 var str = "";
225 if (spec.numeric) { 253 if (spec.type == "number") {
254 if (value instanceof Number) {
255 value = value.valueOf();
256 }
226 if (typeof(value) != "number" || isNaN(value)) { 257 if (typeof(value) != "number" || isNaN(value)) {
227 str = ""; 258 str = "";
228 } else if (value === Number.POSITIVE_INFINITY) { 259 } else if (value === Number.POSITIVE_INFINITY) {
@@ -230,8 +261,7 @@ MochiKit.Text.formatValue = function (spec, value, locale) {
230 } else if (value === Number.NEGATIVE_INFINITY) { 261 } else if (value === Number.NEGATIVE_INFINITY) {
231 str = "-\u221e"; 262 str = "-\u221e";
232 } else { 263 } else {
233 var sign = (spec.sign === "-") ? "" : spec.sign; 264 var sign = (value < 0) ? "-" : spec.sign;
234 sign = (value < 0) ? "-" : sign;
235 value = Math.abs(value); 265 value = Math.abs(value);
236 if (spec.format === "%") { 266 if (spec.format === "%") {
237 str = self._truncToPercent(value, spec.precision); 267 str = self._truncToPercent(value, spec.precision);
@@ -254,7 +284,7 @@ MochiKit.Text.formatValue = function (spec, value, locale) {
254 } else if (spec.padding == "0") { 284 } else if (spec.padding == "0") {
255 str = self.padLeft(str, spec.width - sign.length, "0"); 285 str = self.padLeft(str, spec.width - sign.length, "0");
256 } 286 }
257 str = self._localizeNumber(str, locale, spec.grouping); 287 str = self._localizeNumber(str, locale, spec.group);
258 str = sign + str; 288 str = sign + str;
259 } 289 }
260 if (str !== "" && spec.format === "%") { 290 if (str !== "" && spec.format === "%") {
@@ -264,7 +294,7 @@ MochiKit.Text.formatValue = function (spec, value, locale) {
264 if (spec.format == "r") { 294 if (spec.format == "r") {
265 str = MochiKit.Base.repr(value); 295 str = MochiKit.Base.repr(value);
266 } else { 296 } else {
267 str = (value == null) ? "null" : value.toString(); 297 str = (value == null) ? "" : value.toString();
268 } 298 }
269 str = self.truncate(str, spec.precision); 299 str = self.truncate(str, spec.precision);
270 } 300 }
@@ -274,7 +304,7 @@ MochiKit.Text.formatValue = function (spec, value, locale) {
274 str = self.padLeft(str, spec.width); 304 str = self.padLeft(str, spec.width);
275 } 305 }
276 return str; 306 return str;
277} 307};
278 308
279/** 309/**
280 * Adjust an already formatted numeric string for locale-specific 310 * Adjust an already formatted numeric string for locale-specific
@@ -284,16 +314,16 @@ MochiKit.Text.formatValue = function (spec, value, locale) {
284 * 314 *
285 * @param {String} num the formatted number string 315 * @param {String} num the formatted number string
286 * @param {Object} locale the formatting locale to use 316 * @param {Object} locale the formatting locale to use
287 * @param {Boolean} grouping the grouping flag 317 * @param {Boolean} group the grouping flag
288 * 318 *
289 * @return {String} the localized number string 319 * @return {String} the localized number string
290 */ 320 */
291MochiKit.Text._localizeNumber = function (num, locale, grouping) { 321MochiKit.Text._localizeNumber = function (num, locale, group) {
292 var parts = num.split(/\./); 322 var parts = num.split(/\./);
293 var whole = parts[0]; 323 var whole = parts[0];
294 var frac = (parts.length == 1) ? "" : parts[1]; 324 var frac = (parts.length == 1) ? "" : parts[1];
295 var res = (frac.length > 0) ? locale.decimal : ""; 325 var res = (frac.length > 0) ? locale.decimal : "";
296 while (grouping && frac.length > 3) { 326 while (group && frac.length > 3) {
297 res = res + frac.substring(0, 3) + locale.separator; 327 res = res + frac.substring(0, 3) + locale.separator;
298 frac = frac.substring(3); 328 frac = frac.substring(3);
299 if (whole.charAt(0) == "0") { 329 if (whole.charAt(0) == "0") {
@@ -301,15 +331,15 @@ MochiKit.Text._localizeNumber = function (num, locale, grouping) {
301 } 331 }
302 } 332 }
303 if (frac.length > 0) { 333 if (frac.length > 0) {
304 res += frac; 334 res = res + frac;
305 } 335 }
306 while (grouping && whole.length > 3) { 336 while (group && whole.length > 3) {
307 var pos = whole.length - 3; 337 var pos = whole.length - 3;
308 res = locale.separator + whole.substring(pos) + res; 338 res = locale.separator + whole.substring(pos) + res;
309 whole = whole.substring((whole.charAt(0) == "0") ? 1 : 0, pos); 339 whole = whole.substring((whole.charAt(0) == "0") ? 1 : 0, pos);
310 } 340 }
311 return whole + res; 341 return whole + res;
312} 342};
313 343
314/** 344/**
315 * Parses a format pattern and returns an array of constant strings 345 * Parses a format pattern and returns an array of constant strings
@@ -324,44 +354,32 @@ MochiKit.Text._localizeNumber = function (num, locale, grouping) {
324MochiKit.Text._parsePattern = function (pattern) { 354MochiKit.Text._parsePattern = function (pattern) {
325 var self = MochiKit.Text; 355 var self = MochiKit.Text;
326 var parts = []; 356 var parts = [];
327 var start = 0; 357 var re = /{[^{}]*}|{{?|}}?/g;
328 var pos = 0; 358 var lastPos = re.lastIndex = 0;
329 for (pos = 0; pos < pattern.length; pos++) { 359 var m;
330 if (pattern.charAt(pos) == "{") { 360 while ((m = re.exec(pattern)) != null) {
331 if (pos + 1 >= pattern.length) { 361 if (lastPos < m.index) {
362 parts.push(pattern.substring(lastPos, m.index))
363 }
364 var str = m[0];
365 lastPos = m.index + str.length;
366 if (self.startsWith("{", str) && self.endsWith("}", str)) {
367 parts.push(self._parseFormat(pattern, m.index + 1, lastPos - 1));
368 } else if (self.startsWith("{{", str) || self.startsWith("}}", str)) {
369 parts.push(str.substring(1));
370 } else if (self.startsWith("{", str)) {
332 var msg = "unescaped { char, should be escaped as {{"; 371 var msg = "unescaped { char, should be escaped as {{";
333 throw new self.FormatPatternError(pattern, pos, msg); 372 throw new self.FormatPatternError(pattern, m.index, msg);
334 } else if (pattern.charAt(pos + 1) == "{") { 373 } else if (self.startsWith("}", str)) {
335 parts.push(pattern.substring(start, pos + 1));
336 start = pos + 2;
337 pos++;
338 } else {
339 if (start < pos) {
340 parts.push(pattern.substring(start, pos));
341 }
342 start = pattern.indexOf("}", pos) + 1;
343 if (start <= 0) {
344 var msg = "unmatched { char, not followed by a } char";
345 throw new self.FormatPatternError(pattern, pos, msg);
346 }
347 parts.push(self._parseFormat(pattern, pos + 1, start - 1));
348 pos = start - 1;
349 }
350 } else if (pattern.charAt(pos) == "}") {
351 if (pos + 1 >= pattern.length || pattern.charAt(pos + 1) != "}") {
352 var msg = "unescaped } char, should be escaped as }}"; 374 var msg = "unescaped } char, should be escaped as }}";
353 throw new self.FormatPatternError(pattern, pos, msg); 375 throw new self.FormatPatternError(pattern, m.index, msg);
354 }
355 parts.push(pattern.substring(start, pos + 1));
356 start = pos + 2;
357 pos++;
358 } 376 }
359 } 377 }
360 if (start < pos) { 378 if (lastPos < pattern.length) {
361 parts.push(pattern.substring(start, pos)); 379 parts.push(pattern.substring(lastPos));
362 } 380 }
363 return parts; 381 return parts;
364} 382};
365 383
366/** 384/**
367 * Parses a format instruction and returns a format info object. 385 * Parses a format instruction and returns a format info object.
@@ -377,40 +395,30 @@ MochiKit.Text._parsePattern = function (pattern) {
377MochiKit.Text._parseFormat = function (pattern, startPos, endPos) { 395MochiKit.Text._parseFormat = function (pattern, startPos, endPos) {
378 var self = MochiKit.Text; 396 var self = MochiKit.Text;
379 var text = pattern.substring(startPos, endPos); 397 var text = pattern.substring(startPos, endPos);
380 var info; 398 var parts = self.split(text, ":", 1);
381 var pos = text.indexOf(":"); 399 var path = parts[0];
382 if (pos == 0) { 400 var flagsPos = startPos + path.length + ((parts.length == 1) ? 0 : 1);
383 info = self._parseFormatFlags(pattern, startPos + 1, endPos); 401 var info = self._parseFormatFlags(pattern, flagsPos, endPos);
384 info.path = [0]; 402 info.path = (path == "") ? [] : path.split(".");
385 } else if (pos > 0) {
386 info = self._parseFormatFlags(pattern, startPos + pos + 1, endPos);
387 info.path = text.substring(0, pos).split(".");
388 } else {
389 info = self._parseFormatFlags(pattern, endPos, endPos);
390 info.path = text.split(".");
391 }
392 var DIGITS = /^\d+$/;
393 for (var i = 0; i < info.path.length; i++) { 403 for (var i = 0; i < info.path.length; i++) {
394 var e = info.path[i]; 404 var v = info.path[i];
395 if (typeof(e) == "string") {
396 // TODO: replace with MochiKit.Format.strip? 405 // TODO: replace with MochiKit.Format.strip?
397 e = e.replace(/^\s+/, "").replace(/\s+$/, ""); 406 v = v.replace(/^\s+/, "").replace(/\s+$/, "");
398 if (e == "" && info.path.length == 1) { 407 if (v == "" && info.path.length == 1) {
399 e = 0; 408 v = 0;
400 } else if (e == "") { 409 } else if (v == "") {
401 var msg = "format value path contains blanks"; 410 var msg = "format value path contains blanks";
402 throw new self.FormatPatternError(pattern, startPos, msg); 411 throw new self.FormatPatternError(pattern, startPos, msg);
403 } else if (DIGITS.test(e)) { 412 } else if (/^\d+$/.test(v)) {
404 e = parseInt(e); 413 v = parseInt(v, 10);
405 }
406 } 414 }
407 info.path[i] = e; 415 info.path[i] = v;
408 } 416 }
409 if (info.path.length < 0 || typeof(info.path[0]) != "number") { 417 if (info.path.length <= 0 || typeof(info.path[0]) != "number") {
410 info.path.unshift(0); 418 info.path.unshift(0);
411 } 419 }
412 return info; 420 return info;
413} 421};
414 422
415/** 423/**
416 * Parses a string with format flags and returns a format info object. 424 * Parses a string with format flags and returns a format info object.
@@ -424,81 +432,52 @@ MochiKit.Text._parseFormat = function (pattern, startPos, endPos) {
424 * @throws FormatPatternError if the format pattern was invalid 432 * @throws FormatPatternError if the format pattern was invalid
425 */ 433 */
426MochiKit.Text._parseFormatFlags = function (pattern, startPos, endPos) { 434MochiKit.Text._parseFormatFlags = function (pattern, startPos, endPos) {
427 var self = MochiKit.Text; 435 var update = MochiKit.Base.update;
428 var info = { numeric: false, format: "s", width: 0, precision: -1, 436 var info = { type: "string", format: "s", width: 0, precision: -1,
429 align: ">", sign: "-", padding: " ", grouping: false }; 437 align: ">", sign: "", padding: " ", group: false };
430 // TODO: replace with MochiKit.Format.rstrip? 438 // TODO: replace with MochiKit.Format.rstrip?
431 var flags = pattern.substring(startPos, endPos).replace(/\s+$/, ""); 439 var text = pattern.substring(startPos, endPos).replace(/\s+$/, "");
432 while (flags.length > 0) { 440 var m = /^([<>+ 0,-]+)?(\d+)?(\.\d*)?([srbdoxXf%])?(.*)$/.exec(text);
433 switch (flags.charAt(0)) { 441 var flags = m[1];
434 case ">": 442 var width = m[2];
435 case "<": 443 var precision = m[3];
436 info.align = flags.charAt(0); 444 var type = m[4];
437 flags = flags.substring(1); 445 var unmatched = m[5];
438 break; 446 for (var i = 0; flags && i < flags.length; i++) {
439 case "+": 447 var chr = flags.charAt(i);
440 case "-": 448 if (chr == "<" || chr == ">") {
441 case " ": 449 info.align = chr;
442 info.sign = flags.charAt(0); 450 } else if (chr == "+" || chr == "-" || chr == " ") {
443 flags = flags.substring(1); 451 info.sign = (chr == "-") ? "" : chr;
444 break; 452 } else if (chr == "0") {
445 case ",": 453 info.padding = chr;
446 info.grouping = true; 454 } else if (chr == ",") {
447 flags = flags.substring(1); 455 info.group = true;
448 break; 456 }
449 case ".": 457 }
450 var chars = /^\d*/.exec(flags.substring(1))[0]; 458 if (width) {
451 info.precision = parseInt(chars); 459 info.width = parseInt(width, 10);
452 flags = flags.substring(1 + chars.length); 460 }
453 break; 461 if (precision && precision.length > 1) {
454 case "0": 462 info.precision = parseInt(precision.substring(1), 10);
455 info.padding = flags.charAt(0); 463 }
456 flags = flags.substring(1); 464 if (type == "s" || type == "r") {
457 break; 465 info.format = type;
458 case "1": 466 } else if (type == "b") {
459 case "2": 467 update(info, { type: "number", format: type, radix: 2 });
460 case "3": 468 } else if (type == "o") {
461 case "4": 469 update(info, { type: "number", format: type, radix: 8 });
462 case "5": 470 } else if (type == "x" || type == "X") {
463 case "6": 471 update(info, { type: "number", format: type, radix: 16 });
464 case "7": 472 } else if (type == "d" || type == "f" || type == "%") {
465 case "8": 473 update(info, { type: "number", format: type, radix: 10 });
466 case "9": 474 }
467 var chars = /^\d*/.exec(flags)[0]; 475 if (unmatched) {
468 info.width = parseInt(chars); 476 var msg = "unsupported format flag: " + unmatched.charAt(0);
469 flags = flags.substring(chars.length); 477 throw new MochiKit.Text.FormatPatternError(pattern, startPos, msg);
470 break;
471 case "s":
472 case "r":
473 info.format = flags.charAt(0);
474 flags = flags.substring(1);
475 break;
476 case "b":
477 case "d":
478 case "o":
479 case "x":
480 case "X":
481 case "f":
482 case "%":
483 info.numeric = true;
484 info.format = flags.charAt(0);
485 info.radix = 10;
486 if (info.format === "b") {
487 info.radix = 2;
488 } else if (info.format === "o") {
489 info.radix = 8;
490 } else if (info.format === "x" || info.format === "X") {
491 info.radix = 16;
492 }
493 flags = flags.substring(1);
494 break;
495 default:
496 var msg = "unsupported format flag: " + flags.charAt(0);
497 throw new self.FormatPatternError(pattern, startPos, msg);
498 }
499 } 478 }
500 return info; 479 return info;
501} 480};
502 481
503/** 482/**
504 * Formats a value as a percentage. This method avoids multiplication 483 * Formats a value as a percentage. This method avoids multiplication
@@ -510,33 +489,23 @@ MochiKit.Text._parseFormatFlags = function (pattern, startPos, endPos) {
510 * @param {Number} precision the number of precision digits 489 * @param {Number} precision the number of precision digits
511 */ 490 */
512MochiKit.Text._truncToPercent = function (value, precision) { 491MochiKit.Text._truncToPercent = function (value, precision) {
513 // TODO: This can be simplified by using the same helper function 492 // TODO: This can be simplified by using MochiKit.Format._shiftNumber
514 // as roundToFixed now does. 493 // as roundToFixed does.
515 var str; 494 var str;
516 if (precision >= 0) { 495 if (precision >= 0) {
517 str = MochiKit.Format.roundToFixed(value, precision + 2); 496 str = MochiKit.Format.roundToFixed(value, precision + 2);
518 } else { 497 } else {
519 str = (value == null) ? "0" : value.toString(); 498 str = (value == null) ? "0" : value.toString();
520 } 499 }
521 var fracPos = str.indexOf("."); 500 var arr = MochiKit.Text.split(str, ".", 2);
522 if (fracPos < 0) { 501 var frac = MochiKit.Text.padRight(arr[1], 2, "0");
523 str = str + "00"; 502 var whole = arr[0] + frac.substring(0, 2);
524 } else if (fracPos + 3 >= str.length) { 503 frac = frac.substring(2);
525 var fraction = str.substring(fracPos + 1); 504 while (/^0[0-9]/.test(whole)) {
526 while (fraction.length < 2) { 505 whole = whole.substring(1);
527 fraction = fraction + "0";
528 }
529 str = str.substring(0, fracPos) + fraction;
530 } else {
531 var fraction = str.substring(fracPos + 1);
532 str = str.substring(0, fracPos) + fraction.substring(0, 2) +
533 "." + fraction.substring(2);
534 }
535 while (str.length > 1 && str.charAt(0) == "0" && str.charAt(1) != ".") {
536 str = str.substring(1);
537 }
538 return str;
539} 506}
507 return (frac.length <= 0) ? whole : whole + "." + frac;
508};
540 509
541/** 510/**
542 * Creates a new format pattern error. 511 * Creates a new format pattern error.
@@ -558,13 +527,13 @@ MochiKit.Text.FormatPatternError = function (pattern, pos, message) {
558 this.pattern = pattern; 527 this.pattern = pattern;
559 this.pos = pos; 528 this.pos = pos;
560 this.message = message; 529 this.message = message;
561} 530};
562MochiKit.Text.FormatPatternError.prototype =
563 new MochiKit.Base.NamedError("MochiKit.Text.FormatPatternError");
564 531
532MochiKit.Text.FormatPatternError.prototype = new MochiKit.Base.NamedError("MochiKit.Text.FormatPatternError");
533MochiKit.Text.FormatPatternError.constructor = MochiKit.Text.FormatPatternError;
565 534
566// 535//
567//XXX: Internet Explorer exception handling blows 536//XXX: Internet Explorer export fix
568// 537//
569if (MochiKit.__export__) { 538if (MochiKit.__export__) {
570 formatter = MochiKit.Text.formatter; 539 formatter = MochiKit.Text.formatter;
diff --git a/frontend/gamma/js/MochiKit/Visual.js b/frontend/gamma/js/MochiKit/Visual.js
index 648d82a..372d99a 100644
--- a/frontend/gamma/js/MochiKit/Visual.js
+++ b/frontend/gamma/js/MochiKit/Visual.js
@@ -8,7 +8,7 @@ See <http://mochikit.com/> for documentation, downloads, license, etc.
8 8
9***/ 9***/
10 10
11MochiKit.Base._module('Visual', '1.5', ['Base', 'DOM', 'Style', 'Color', 'Position']); 11MochiKit.Base.module(MochiKit, 'Visual', '1.5', ['Base', 'DOM', 'Style', 'Color', 'Position']);
12 12
13MochiKit.Visual._RoundCorners = function (e, options) { 13MochiKit.Visual._RoundCorners = function (e, options) {
14 e = MochiKit.DOM.getElement(e); 14 e = MochiKit.DOM.getElement(e);
@@ -469,6 +469,11 @@ MochiKit.Visual.Transitions.parabolic = function (pos) {
469 return pos * pos; 469 return pos * pos;
470}; 470};
471 471
472/** @id MochiKit.Visual.Transitions.spring */
473MochiKit.Visual.Transitions.spring = function (pos) {
474 return 1 - (Math.cos(pos * 2.5 * Math.PI) * Math.exp(-pos * 6));
475};
476
472/** @id MochiKit.Visual.Transitions.none */ 477/** @id MochiKit.Visual.Transitions.none */
473MochiKit.Visual.Transitions.none = function (pos) { 478MochiKit.Visual.Transitions.none = function (pos) {
474 return 0; 479 return 0;
@@ -534,6 +539,11 @@ MochiKit.Base.update(MochiKit.Visual.ScopedQueue.prototype, {
534 e.finalize(); 539 e.finalize();
535 }, this.effects); 540 }, this.effects);
536 break; 541 break;
542 case 'replace':
543 ma(function (e) {
544 e.cancel();
545 }, this.effects);
546 break;
537 } 547 }
538 548
539 effect.startOn += timestamp; 549 effect.startOn += timestamp;
@@ -662,8 +672,12 @@ MochiKit.Visual.Base.prototype = {
662 this.event('afterSetup'); 672 this.event('afterSetup');
663 } 673 }
664 if (this.state == 'running') { 674 if (this.state == 'running') {
665 if (this.options.transition) { 675 var trans = this.options.transition;
666 pos = this.options.transition(pos); 676 if (typeof(trans) == "string") {
677 trans = MochiKit.Visual.Transitions[trans];
678 }
679 if (typeof(trans) == "function") {
680 pos = trans(pos);
667 } 681 }
668 pos *= (this.options.to - this.options.from); 682 pos *= (this.options.to - this.options.from);
669 pos += this.options.from; 683 pos += this.options.from;
@@ -1686,8 +1700,8 @@ MochiKit.Visual.squish = function (element, /* optional */ options) {
1686 var elemClip; 1700 var elemClip;
1687 options = b.update({ 1701 options = b.update({
1688 restoreAfterFinish: true, 1702 restoreAfterFinish: true,
1689 scaleMode: {originalHeight: elementDimensions.w, 1703 scaleMode: {originalHeight: elementDimensions.h,
1690 originalWidth: elementDimensions.h}, 1704 originalWidth: elementDimensions.w},
1691 beforeSetupInternal: function (effect) { 1705 beforeSetupInternal: function (effect) {
1692 elemClip = s.makeClipping(effect.element); 1706 elemClip = s.makeClipping(effect.element);
1693 }, 1707 },
@@ -1958,18 +1972,5 @@ MochiKit.Visual.fold = function (element, /* optional */ options) {
1958}; 1972};
1959 1973
1960 1974
1961/* end of Rico adaptation */ 1975MochiKit.Base.nameFunctions(MochiKit.Visual);
1962
1963MochiKit.Visual.__new__ = function () {
1964 var m = MochiKit.Base;
1965
1966 // Backwards compatibility aliases
1967 m._deprecated(this, 'Color', 'MochiKit.Color.Color', '1.1');
1968 m._deprecated(this, 'getElementsComputedStyle', 'MochiKit.Style.getStyle', '1.1');
1969
1970 m.nameFunctions(this);
1971};
1972
1973MochiKit.Visual.__new__();
1974
1975MochiKit.Base._exportSymbols(this, MochiKit.Visual); 1976MochiKit.Base._exportSymbols(this, MochiKit.Visual);
diff --git a/frontend/gamma/js/MochiKit/__package__.js b/frontend/gamma/js/MochiKit/__package__.js
deleted file mode 100644
index 8d644b1..0000000
--- a/frontend/gamma/js/MochiKit/__package__.js
+++ b/dev/null
@@ -1,18 +0,0 @@
1dojo.kwCompoundRequire({
2 "common": [
3 "MochiKit.Base",
4 "MochiKit.Iter",
5 "MochiKit.Logging",
6 "MochiKit.DateTime",
7 "MochiKit.Format",
8 "MochiKit.Async",
9 "MochiKit.DOM",
10 "MochiKit.Style",
11 "MochiKit.LoggingPane",
12 "MochiKit.Color",
13 "MochiKit.Signal",
14 "MochiKit.Position",
15 "MochiKit.Visual"
16 ]
17});
18dojo.provide("MochiKit.*");
diff --git a/frontend/gamma/js/main.js b/frontend/gamma/js/main.js
index a9fd65e..934b325 100644
--- a/frontend/gamma/js/main.js
+++ b/frontend/gamma/js/main.js
@@ -82,9 +82,9 @@ function run() {
82 Clipperz.PM.RunTime.mainController.run(shouldShowRegistrationForm); 82 Clipperz.PM.RunTime.mainController.run(shouldShowRegistrationForm);
83 83
84//Clipperz.log("HASH: " + window.location.hash); 84//Clipperz.log("HASH: " + window.location.hash);
85if (window.location.hash != "") { 85 //if (window.location.hash != "") {
86 window.location.hash = "" 86 // window.location.hash = ""
87} 87 //}
88//Clipperz.log("HASH cleaned"); 88//Clipperz.log("HASH cleaned");
89 //#credentials=base64encoded({username:'joe', passphrase:'clipperz'}) 89 //#credentials=base64encoded({username:'joe', passphrase:'clipperz'})
90 //MochiKit.Signal.signal(Clipperz.Signal.NotificationCenter, 'doLogin', {username:'joe', passphrase:'clipperz'}); 90 //MochiKit.Signal.signal(Clipperz.Signal.NotificationCenter, 'doLogin', {username:'joe', passphrase:'clipperz'});
diff --git a/frontend/gamma/properties/gamma.properties.json b/frontend/gamma/properties/gamma.properties.json
index 8f2d98e..0a513e8 100644
--- a/frontend/gamma/properties/gamma.properties.json
+++ b/frontend/gamma/properties/gamma.properties.json
@@ -1,8 +1,11 @@
1{ 1{
2 "copyright.values": { 2 "copyright.values": {
3 "mochikit.repository": "http://svn.mochikit.com/mochikit/trunk/", 3 "mochikit.repository": "https://github.com/mochi/mochikit.git",
4 "mochikit.version": "1506" 4 "mochikit.version": "fe8d17bb9ac0a4e5ad4a8d5c2c94a6fac1c92d75"
5 }, 5 },
6
7 "html.template": "index_template.html",
8
6 "js": [ 9 "js": [
7 "MochiKit/Base.js", 10 "MochiKit/Base.js",
8 "MochiKit/Iter.js", 11 "MochiKit/Iter.js",
diff --git a/frontend/gamma/tests/tests/Clipperz/Crypto/AES.html b/frontend/gamma/tests/tests/Clipperz/Crypto/AES.html
index 828ccb8..16f64d0 100644
--- a/frontend/gamma/tests/tests/Clipperz/Crypto/AES.html
+++ b/frontend/gamma/tests/tests/Clipperz/Crypto/AES.html
@@ -28,7 +28,6 @@ refer to http://www.clipperz.com.
28 <title>Clipperz.Crypto.AES_v3 - TEST</title> 28 <title>Clipperz.Crypto.AES_v3 - TEST</title>
29 29
30 <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> 30 <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script>
31 <script type="text/javascript" src="../../../../js/JSLog/jslog.js"></script>
32 <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> 31 <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script>
33 <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> 32 <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css">
34 33
diff --git a/frontend/gamma/tests/tests/Clipperz/Crypto/AES.performance.html b/frontend/gamma/tests/tests/Clipperz/Crypto/AES.performance.html
index 4817096..a90d815 100644
--- a/frontend/gamma/tests/tests/Clipperz/Crypto/AES.performance.html
+++ b/frontend/gamma/tests/tests/Clipperz/Crypto/AES.performance.html
@@ -32,7 +32,6 @@ refer to http://www.clipperz.com.
32 </script> 32 </script>
33 33
34 <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> 34 <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script>
35 <script type="text/javascript" src="../../../../js/JSLog/jslog.js"></script>
36 <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> 35 <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script>
37 <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> 36 <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css">
38 37
diff --git a/frontend/gamma/tests/tests/Clipperz/Crypto/Base.html b/frontend/gamma/tests/tests/Clipperz/Crypto/Base.html
index 0ffcdb8..83f0766 100644
--- a/frontend/gamma/tests/tests/Clipperz/Crypto/Base.html
+++ b/frontend/gamma/tests/tests/Clipperz/Crypto/Base.html
@@ -26,7 +26,6 @@ refer to http://www.clipperz.com.
26<html> 26<html>
27<head> 27<head>
28 <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> 28 <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script>
29 <script type="text/javascript" src="../../../../js/JSLog/jslog.js"></script>
30 <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> 29 <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script>
31 <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> 30 <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css">
32 31
diff --git a/frontend/gamma/tests/tests/Clipperz/Crypto/BigInt.html b/frontend/gamma/tests/tests/Clipperz/Crypto/BigInt.html
index b970a9a..f4db3b7 100644
--- a/frontend/gamma/tests/tests/Clipperz/Crypto/BigInt.html
+++ b/frontend/gamma/tests/tests/Clipperz/Crypto/BigInt.html
@@ -26,7 +26,6 @@ refer to http://www.clipperz.com.
26<html> 26<html>
27<head> 27<head>
28 <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> 28 <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script>
29 <script type="text/javascript" src="../../../../js/JSLog/jslog.js"></script>
30 <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> 29 <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script>
31 <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> 30 <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css">
32 31
diff --git a/frontend/gamma/tests/tests/Clipperz/Crypto/ECC.BinaryField.FiniteField.B283.html b/frontend/gamma/tests/tests/Clipperz/Crypto/ECC.BinaryField.FiniteField.B283.html
index 6024021..93d8695 100644
--- a/frontend/gamma/tests/tests/Clipperz/Crypto/ECC.BinaryField.FiniteField.B283.html
+++ b/frontend/gamma/tests/tests/Clipperz/Crypto/ECC.BinaryField.FiniteField.B283.html
@@ -26,7 +26,6 @@ refer to http://www.clipperz.com.
26<html> 26<html>
27<head> 27<head>
28 <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> 28 <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script>
29 <script type="text/javascript" src="../../../../js/JSLog/jslog.js"></script>
30 <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> 29 <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script>
31 <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> 30 <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css">
32 31
diff --git a/frontend/gamma/tests/tests/Clipperz/Crypto/ECC.BinaryField.FiniteField.html b/frontend/gamma/tests/tests/Clipperz/Crypto/ECC.BinaryField.FiniteField.html
index 5a7a4f7..658c402 100644
--- a/frontend/gamma/tests/tests/Clipperz/Crypto/ECC.BinaryField.FiniteField.html
+++ b/frontend/gamma/tests/tests/Clipperz/Crypto/ECC.BinaryField.FiniteField.html
@@ -26,7 +26,6 @@ refer to http://www.clipperz.com.
26<html> 26<html>
27<head> 27<head>
28 <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> 28 <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script>
29 <script type="text/javascript" src="../../../../js/JSLog/jslog.js"></script>
30 <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> 29 <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script>
31 <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> 30 <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css">
32 31
diff --git a/frontend/gamma/tests/tests/Clipperz/Crypto/ECC.BinaryField.Value.html b/frontend/gamma/tests/tests/Clipperz/Crypto/ECC.BinaryField.Value.html
index c58cf42..0d0903d 100644
--- a/frontend/gamma/tests/tests/Clipperz/Crypto/ECC.BinaryField.Value.html
+++ b/frontend/gamma/tests/tests/Clipperz/Crypto/ECC.BinaryField.Value.html
@@ -26,7 +26,6 @@ refer to http://www.clipperz.com.
26<html> 26<html>
27<head> 27<head>
28 <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> 28 <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script>
29 <script type="text/javascript" src="../../../../js/JSLog/jslog.js"></script>
30 <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> 29 <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script>
31 <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> 30 <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css">
32 31
diff --git a/frontend/gamma/tests/tests/Clipperz/Crypto/PRNG.html b/frontend/gamma/tests/tests/Clipperz/Crypto/PRNG.html
index 438d96f..61aa1c2 100644
--- a/frontend/gamma/tests/tests/Clipperz/Crypto/PRNG.html
+++ b/frontend/gamma/tests/tests/Clipperz/Crypto/PRNG.html
@@ -28,7 +28,6 @@ refer to http://www.clipperz.com.
28 <script> jslog_config_enabled = true; </script> 28 <script> jslog_config_enabled = true; </script>
29 29
30 <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> 30 <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script>
31 <script type="text/javascript" src="../../../../js/JSLog/jslog.js"></script>
32 <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> 31 <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script>
33 <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> 32 <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css">
34 33
diff --git a/frontend/gamma/tests/tests/Clipperz/Crypto/RSA.html b/frontend/gamma/tests/tests/Clipperz/Crypto/RSA.html
index f29f894..4c7fd86 100644
--- a/frontend/gamma/tests/tests/Clipperz/Crypto/RSA.html
+++ b/frontend/gamma/tests/tests/Clipperz/Crypto/RSA.html
@@ -26,7 +26,6 @@ refer to http://www.clipperz.com.
26<html> 26<html>
27<head> 27<head>
28 <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> 28 <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script>
29 <script type="text/javascript" src="../../../../js/JSLog/jslog.js"></script>
30 <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> 29 <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script>
31 <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> 30 <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css">
32 31
diff --git a/frontend/gamma/tests/tests/Clipperz/Crypto/SHA.html b/frontend/gamma/tests/tests/Clipperz/Crypto/SHA.html
index a580491..a2f6c04 100644
--- a/frontend/gamma/tests/tests/Clipperz/Crypto/SHA.html
+++ b/frontend/gamma/tests/tests/Clipperz/Crypto/SHA.html
@@ -63,7 +63,6 @@ refer to http://www.clipperz.com.
63 </script> 63 </script>
64 64
65 <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> 65 <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script>
66 <script type="text/javascript" src="../../../../js/JSLog/jslog.js"></script>
67 <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> 66 <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script>
68 <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> 67 <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css">
69 68
diff --git a/frontend/gamma/tests/tests/Clipperz/Crypto/SRP.html b/frontend/gamma/tests/tests/Clipperz/Crypto/SRP.html
index d0ee153..ba842a9 100644
--- a/frontend/gamma/tests/tests/Clipperz/Crypto/SRP.html
+++ b/frontend/gamma/tests/tests/Clipperz/Crypto/SRP.html
@@ -26,7 +26,6 @@ refer to http://www.clipperz.com.
26<html> 26<html>
27<head> 27<head>
28 <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> 28 <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script>
29 <script type="text/javascript" src="../../../../js/JSLog/jslog.js"></script>
30 <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> 29 <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script>
31 <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> 30 <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css">
32 31
diff --git a/frontend/gamma/tests/tests/Clipperz/Crypto/Usage.html b/frontend/gamma/tests/tests/Clipperz/Crypto/Usage.html
index 8920915..4e7ad3d 100644
--- a/frontend/gamma/tests/tests/Clipperz/Crypto/Usage.html
+++ b/frontend/gamma/tests/tests/Clipperz/Crypto/Usage.html
@@ -28,7 +28,6 @@ refer to http://www.clipperz.com.
28 <title>Clipperz.Crypto.Usage - TEST</title> 28 <title>Clipperz.Crypto.Usage - TEST</title>
29 29
30 <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> 30 <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script>
31 <script type="text/javascript" src="../../../../js/JSLog/jslog.js"></script>
32 <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> 31 <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script>
33 <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> 32 <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css">
34 33
diff --git a/frontend/gamma/tests/tests/Clipperz/PM/Date.html b/frontend/gamma/tests/tests/Clipperz/PM/Date.html
index a606ca4..7b87185 100644
--- a/frontend/gamma/tests/tests/Clipperz/PM/Date.html
+++ b/frontend/gamma/tests/tests/Clipperz/PM/Date.html
@@ -28,7 +28,6 @@ refer to http://www.clipperz.com.
28 <title>Clipperz.PM.Date - test</title> 28 <title>Clipperz.PM.Date - test</title>
29 29
30 <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> 30 <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script>
31 <!-- script type="text/javascript" src="../../../../js/JSLog/jslog.js"></script -->
32 <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> 31 <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script>
33 <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> 32 <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css">
34 33
diff --git a/frontend/gamma/tests/tests/Clipperz/PM/Proxy.html b/frontend/gamma/tests/tests/Clipperz/PM/Proxy.html
index 8dc533f..8177285 100644
--- a/frontend/gamma/tests/tests/Clipperz/PM/Proxy.html
+++ b/frontend/gamma/tests/tests/Clipperz/PM/Proxy.html
@@ -28,7 +28,6 @@ refer to http://www.clipperz.com.
28 <title>Clipperz.PM.Proxy - TEST</title> 28 <title>Clipperz.PM.Proxy - TEST</title>
29 29
30 <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> 30 <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script>
31 <script type="text/javascript" src="../../../../js/JSLog/jslog.js"></script>
32 <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> 31 <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script>
33 <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> 32 <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css">
34 33
diff --git a/frontend/gamma/tests/tests/Clipperz/PM/Toll.html b/frontend/gamma/tests/tests/Clipperz/PM/Toll.html
index 9baf167..6c2e000 100644
--- a/frontend/gamma/tests/tests/Clipperz/PM/Toll.html
+++ b/frontend/gamma/tests/tests/Clipperz/PM/Toll.html
@@ -28,7 +28,6 @@ refer to http://www.clipperz.com.
28 <title>Clipperz.PM.Toll - test</title> 28 <title>Clipperz.PM.Toll - test</title>
29 29
30 <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> 30 <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script>
31 <script type="text/javascript" src="../../../../js/JSLog/jslog.js"></script>
32 <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> 31 <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script>
33 <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> 32 <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css">
34 33
diff --git a/frontend/gamma/tests/tests/Clipperz/PM/UI/Web/Controllers/MainController.html b/frontend/gamma/tests/tests/Clipperz/PM/UI/Web/Controllers/MainController.html
index 04f0e70..1eea01b 100644
--- a/frontend/gamma/tests/tests/Clipperz/PM/UI/Web/Controllers/MainController.html
+++ b/frontend/gamma/tests/tests/Clipperz/PM/UI/Web/Controllers/MainController.html
@@ -28,7 +28,6 @@ refer to http://www.clipperz.com.
28 <title>Clipperz.PM.UI.Web.MainController - test</title> 28 <title>Clipperz.PM.UI.Web.MainController - test</title>
29 29
30 <script type="text/javascript" src="../../../../../../../js/MochiKit/MochiKit.js"></script> 30 <script type="text/javascript" src="../../../../../../../js/MochiKit/MochiKit.js"></script>
31 <script type="text/javascript" src="../../../../../../../js/JSLog/jslog.js"></script>
32 <script type="text/javascript" src="../../../../../../SimpleTest/SimpleTest.js"></script> 31 <script type="text/javascript" src="../../../../../../SimpleTest/SimpleTest.js"></script>
33 <link rel="stylesheet" type="text/css" href="../../../../../../SimpleTest/test.css"> 32 <link rel="stylesheet" type="text/css" href="../../../../../../SimpleTest/test.css">
34 33
diff --git a/frontend/gamma/tests/tests/Clipperz/RoboFormExportProcessor.html b/frontend/gamma/tests/tests/Clipperz/RoboFormExportProcessor.html
index 87cde0f..b4500e3 100644
--- a/frontend/gamma/tests/tests/Clipperz/RoboFormExportProcessor.html
+++ b/frontend/gamma/tests/tests/Clipperz/RoboFormExportProcessor.html
@@ -26,7 +26,6 @@ refer to http://www.clipperz.com.
26<html> 26<html>
27<head> 27<head>
28 <script type="text/javascript" src="../../../js/MochiKit/MochiKit.js"></script> 28 <script type="text/javascript" src="../../../js/MochiKit/MochiKit.js"></script>
29 <script type="text/javascript" src="../../../js/JSLog/jslog.js"></script>
30 <script type="text/javascript" src="../../SimpleTest/SimpleTest.js"></script> 29 <script type="text/javascript" src="../../SimpleTest/SimpleTest.js"></script>
31 <link rel="stylesheet" type="text/css" href="../../SimpleTest/test.css"> 30 <link rel="stylesheet" type="text/css" href="../../SimpleTest/test.css">
32 31
diff --git a/frontend/gamma/tests/tests/Components/CardDialogNew/index.html b/frontend/gamma/tests/tests/Components/CardDialogNew/index.html
index 2d502b4..64f9e4d 100644
--- a/frontend/gamma/tests/tests/Components/CardDialogNew/index.html
+++ b/frontend/gamma/tests/tests/Components/CardDialogNew/index.html
@@ -101,9 +101,7 @@ refer to http://www.clipperz.com.
101Clipperz_IEisBroken = true; 101Clipperz_IEisBroken = true;
102</script><![endif]--> 102</script><![endif]-->
103 103
104 <link rel="stylesheet" type="text/css" href="../../../../css/clipperz/clipperz.css" /> 104 <link rel="stylesheet" type="text/css" href="../../../../css/web.css" />
105 <link rel="stylesheet" type="text/css" href="../../../../css/clipperz/compact.css" />
106 <link rel="stylesheet" type="text/css" href="../../../../css/clipperz/ytheme-clipperz.css" />
107 105
108</head> 106</head>
109<body> 107<body>
diff --git a/frontend/gamma/tests/tests/Components/Tooltips/index.html b/frontend/gamma/tests/tests/Components/Tooltips/index.html
index 02c6c34..3772227 100644
--- a/frontend/gamma/tests/tests/Components/Tooltips/index.html
+++ b/frontend/gamma/tests/tests/Components/Tooltips/index.html
@@ -99,9 +99,7 @@ refer to http://www.clipperz.com.
99Clipperz_IEisBroken = true; 99Clipperz_IEisBroken = true;
100</script><![endif]--> 100</script><![endif]-->
101 101
102 <link rel="stylesheet" type="text/css" href="../../../../css/clipperz/clipperz.css" /> 102 <link rel="stylesheet" type="text/css" href="../../../../css/web.css" />
103 <link rel="stylesheet" type="text/css" href="../../../../css/clipperz/compact.css" />
104 <link rel="stylesheet" type="text/css" href="../../../../css/clipperz/ytheme-clipperz.css" />
105 103
106<style> 104<style>
107 105