summaryrefslogtreecommitdiff
path: root/javascript/libs
diff options
context:
space:
mode:
authorMax Kremmel <xing@synapse.plus.com>2007-07-09 18:29:26 +0000
committerMax Kremmel <xing@synapse.plus.com>2007-07-09 18:29:26 +0000
commitfe236cdb3836d18e0329a56d79f0440e2cdbf9db (patch)
tree1d705c62212a8691e3d710e9d1408e0b4418023a /javascript/libs
parent0630dd6ddd43085551f88582ec83c145641dec80 (diff)
downloadutil-fe236cdb3836d18e0329a56d79f0440e2cdbf9db.tar.gz
util-fe236cdb3836d18e0329a56d79f0440e2cdbf9db.tar.bz2
util-fe236cdb3836d18e0329a56d79f0440e2cdbf9db.zip
automatically pack some javascript files
Diffstat (limited to 'javascript/libs')
-rw-r--r--javascript/libs/fat.js91
-rw-r--r--javascript/libs/fat_original.js98
-rw-r--r--javascript/libs/multifile.js134
-rw-r--r--javascript/libs/multifile_original.js135
-rw-r--r--javascript/libs/tabpane.js376
-rw-r--r--javascript/libs/tabpane_original.js375
6 files changed, 597 insertions, 612 deletions
diff --git a/javascript/libs/fat.js b/javascript/libs/fat.js
index e0e5e84..4fdf4a9 100644
--- a/javascript/libs/fat.js
+++ b/javascript/libs/fat.js
@@ -1,2 +1,89 @@
-eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('4 v={G:q(r,g,b){r=r.C(16);8(r.p==1)r=\'0\'+r;g=g.C(16);8(g.p==1)g=\'0\'+g;b=b.C(16);8(b.p==1)b=\'0\'+b;V"#"+r+g+b},1h:q(){4 a=F.1d("*");1e(4 i=0;i<a.p;i++){4 o=a[i];4 r=/Z-?(\\w{3,6})?/.12(o.14);8(r){8(!r[1])r[1]="";8(o.k)v.I(o.k,A,A,"#"+r[1])}}},I:q(k,u,t,j,e){8(!u)u=13;8(!t)t=1a;8(!j||j=="#")j="#18";8(!e)e=D.J(k);4 9=x.17(u*(t/15));4 B=t/ 9; 4 y = B; 4 f = 0; 8 (j.p < 7) j += j.m(1,3); 8 (e.p < 7) e += e.m(1,3); 4 K = l(j.m(1,2),16); 4 O = l(j.m(3,2),16); 4 H = l(j.m(5,2),16); 4 M = l(e.m(1,2),16); 4 N = l(e.m(3,2),16); 4 L = l(e.m(5,2),16); 4 r,g,b,h; R (f < 9) { r = x.E(K * ((9-f)/9)+M*(f/9));g=x.E(O*((9-f)/9)+N*(f/9));b=x.E(H*((9-f)/9)+L*(f/9));h=D.G(r,g,b);P("v.z(\'"+k+"\',\'"+h+"\')",y);f++;y=B*f}P("v.z(\'"+k+"\',\'"+e+"\')",y)},z:q(k,c){4 o=F.S(k);o.10.U=c},J:q(k){4 o=F.S(k);R(o){4 c;8(W.X)c=W.X(o,A).1c("Y-1g");8(o.Q)c=o.Q.U;8((c!=""&&c!="T")||o.1i=="1j"){1k}o=o.1f}8(c==1b||c==""||c=="T")c="#19";4 n=c.11(/n\\s*\\(\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*\\)/);8(n)c=D.G(l(n[1]),l(n[2]),l(n[3]));V c}}',62,83,'||||var||||if|frames|||||to|frame||||from|id|parseInt|substr|rgb||length|function|||duration|fps|Fat||Math|delay|set_bgcolor|null|interval|toString|this|floor|document|make_hex|bf|fade_element|get_bgcolor|rf|bt|rt|gt|gf|setTimeout|currentStyle|while|getElementById|transparent|backgroundColor|return|window|getComputedStyle|background|fade|style|match|exec|30|className|1000||round|FFFF33|FFFFFF|3000|undefined|getPropertyValue|getElementsByTagName|for|parentNode|color|fade_all|tagName|BODY|break'.split('|'),0,{}))
-window.onload = function () { Fat.fade_all(); }
+// $Header: /cvsroot/bitweaver/_bit_util/javascript/libs/fat.js,v 1.5 2007/07/09 18:29:25 squareing Exp $
+
+// please modify this file and leave plenty of comments. This file will be
+// compressed automatically. Please make sure you only use comments beginning
+// with '//' and put comments on separate lines otherwise the packer will choke
+
+// @name The Fade Anything Technique
+// @namespace http://www.axentric.com/aside/fat/
+// @version 1.0-RC1
+// @author Adam Michela
+
+var Fat = {
+ make_hex : function (r,g,b) {
+ r = r.toString(16); if (r.length == 1) r = '0' + r;
+ g = g.toString(16); if (g.length == 1) g = '0' + g;
+ b = b.toString(16); if (b.length == 1) b = '0' + b;
+ return "#" + r + g + b;
+ },
+ fade_all : function () {
+ var a = document.getElementsByTagName("*");
+ for (var i = 0; i < a.length; i++)
+ {
+ var o = a[i];
+ var r = /fade-?(\w{3,6})?/.exec(o.className);
+ if (r)
+ {
+ if (!r[1]) r[1] = "";
+ if (o.id) Fat.fade_element(o.id,null,null,"#"+r[1]);
+ }
+ }
+ },
+ fade_element : function (id, fps, duration, from, to) {
+ if (!fps) fps = 30;
+ if (!duration) duration = 3000;
+ if (!from || from=="#") from = "#FFFF33";
+ if (!to) to = this.get_bgcolor(id);
+
+ var frames = Math.round(fps * (duration / 1000));
+ var interval = duration / frames;
+ var delay = interval;
+ var frame = 0;
+
+ if (from.length < 7) from += from.substr(1,3);
+ if (to.length < 7) to += to.substr(1,3);
+
+ var rf = parseInt(from.substr(1,2),16);
+ var gf = parseInt(from.substr(3,2),16);
+ var bf = parseInt(from.substr(5,2),16);
+ var rt = parseInt(to.substr(1,2),16);
+ var gt = parseInt(to.substr(3,2),16);
+ var bt = parseInt(to.substr(5,2),16);
+
+ var r,g,b,h;
+ while (frame < frames) {
+ r = Math.floor(rf * ((frames-frame)/frames) + rt * (frame/frames));
+ g = Math.floor(gf * ((frames-frame)/frames) + gt * (frame/frames));
+ b = Math.floor(bf * ((frames-frame)/frames) + bt * (frame/frames));
+ h = this.make_hex(r,g,b);
+
+ setTimeout("Fat.set_bgcolor('"+id+"','"+h+"')", delay);
+
+ frame++;
+ delay = interval * frame;
+ }
+ setTimeout("Fat.set_bgcolor('"+id+"','"+to+"')", delay);
+ },
+ set_bgcolor : function (id, c) {
+ var o = document.getElementById(id);
+ o.style.backgroundColor = c;
+ },
+ get_bgcolor : function (id) {
+ var o = document.getElementById(id);
+ while(o) {
+ var c;
+ if (window.getComputedStyle) c = window.getComputedStyle(o,null).getPropertyValue("background-color");
+ if (o.currentStyle) c = o.currentStyle.backgroundColor;
+ if ((c != "" && c != "transparent") || o.tagName == "BODY") { break; }
+ o = o.parentNode;
+ }
+ if (c == undefined || c == "" || c == "transparent") c = "#FFFFFF";
+ var rgb = c.match(/rgb\s*\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)/);
+ if (rgb) c = this.make_hex(parseInt(rgb[1]),parseInt(rgb[2]),parseInt(rgb[3]));
+ return c;
+ }
+};
+
+window.onload = function () {
+ Fat.fade_all();
+}
diff --git a/javascript/libs/fat_original.js b/javascript/libs/fat_original.js
deleted file mode 100644
index eacffae..0000000
--- a/javascript/libs/fat_original.js
+++ /dev/null
@@ -1,98 +0,0 @@
-/***************************************************************************\
-* *
-* please modify this file and leave plenty of comments. when done, please *
-* visit http://dean.edwards.name/packer/ to compress this and place the *
-* compressed output in the loaded version of this file *
-* *
-\***************************************************************************/
-
-/***************************************************************************\
-* *
-* please note that the window.onload function has to be on a seperate *
-* line *
-* *
-\***************************************************************************/
-
-// @name The Fade Anything Technique
-// @namespace http://www.axentric.com/aside/fat/
-// @version 1.0-RC1
-// @author Adam Michela
-
-var Fat = {
- make_hex : function (r,g,b) {
- r = r.toString(16); if (r.length == 1) r = '0' + r;
- g = g.toString(16); if (g.length == 1) g = '0' + g;
- b = b.toString(16); if (b.length == 1) b = '0' + b;
- return "#" + r + g + b;
- },
- fade_all : function () {
- var a = document.getElementsByTagName("*");
- for (var i = 0; i < a.length; i++)
- {
- var o = a[i];
- var r = /fade-?(\w{3,6})?/.exec(o.className);
- if (r)
- {
- if (!r[1]) r[1] = "";
- if (o.id) Fat.fade_element(o.id,null,null,"#"+r[1]);
- }
- }
- },
- fade_element : function (id, fps, duration, from, to) {
- if (!fps) fps = 30;
- if (!duration) duration = 3000;
- if (!from || from=="#") from = "#FFFF33";
- if (!to) to = this.get_bgcolor(id);
-
- var frames = Math.round(fps * (duration / 1000));
- var interval = duration / frames;
- var delay = interval;
- var frame = 0;
-
- if (from.length < 7) from += from.substr(1,3);
- if (to.length < 7) to += to.substr(1,3);
-
- var rf = parseInt(from.substr(1,2),16);
- var gf = parseInt(from.substr(3,2),16);
- var bf = parseInt(from.substr(5,2),16);
- var rt = parseInt(to.substr(1,2),16);
- var gt = parseInt(to.substr(3,2),16);
- var bt = parseInt(to.substr(5,2),16);
-
- var r,g,b,h;
- while (frame < frames) {
- r = Math.floor(rf * ((frames-frame)/frames) + rt * (frame/frames));
- g = Math.floor(gf * ((frames-frame)/frames) + gt * (frame/frames));
- b = Math.floor(bf * ((frames-frame)/frames) + bt * (frame/frames));
- h = this.make_hex(r,g,b);
-
- setTimeout("Fat.set_bgcolor('"+id+"','"+h+"')", delay);
-
- frame++;
- delay = interval * frame;
- }
- setTimeout("Fat.set_bgcolor('"+id+"','"+to+"')", delay);
- },
- set_bgcolor : function (id, c) {
- var o = document.getElementById(id);
- o.style.backgroundColor = c;
- },
- get_bgcolor : function (id) {
- var o = document.getElementById(id);
- while(o) {
- var c;
- if (window.getComputedStyle) c = window.getComputedStyle(o,null).getPropertyValue("background-color");
- if (o.currentStyle) c = o.currentStyle.backgroundColor;
- if ((c != "" && c != "transparent") || o.tagName == "BODY") { break; }
- o = o.parentNode;
- }
- if (c == undefined || c == "" || c == "transparent") c = "#FFFFFF";
- var rgb = c.match(/rgb\s*\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)/);
- if (rgb) c = this.make_hex(parseInt(rgb[1]),parseInt(rgb[2]),parseInt(rgb[3]));
- return c;
- }
-}
-
-window.onload = function () {
- Fat.fade_all();
-}
diff --git a/javascript/libs/multifile.js b/javascript/libs/multifile.js
index 7e5d1e0..9b3ce11 100644
--- a/javascript/libs/multifile.js
+++ b/javascript/libs/multifile.js
@@ -1,2 +1,134 @@
-eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('6 1h(i,c){2.i=i;2.l=0;2.u=0;b(c){2.c=c}w{2.c=-1};2.v=H();2.p=H();2.7=\'j\';2.Y=6(3){2.p[3]=3};2.1g=6(7){2.7=7};2.z=0;2.14=6(N){2.z=N};2.y=0;2.16=6(K){2.y=K};2.B=6(3,4){b(4 A 2.v){2.v[4].s=2.u}w{9 f=d.m(\'h\');f.7=\'17\';f.4=4+\'18\';f.s=2.l;2.v[4]=f;2.i.q(f)};b(3.19==\'1a\'&&3.7==\'j\'){3.C=4;3.4=4+\'1b\'+2.u++;3.g=2;3.1c=6(){9 t=d.m(\'h\');t.7=\'j\';2.5.1d(t,2);2.g.B(t,3.C);2.g.G(2,3.4);2.D.P=\'Q\';2.D.R=\'-S\'};b(2.c!=-1&&2.l>=2.c){3.o=F;O(9 n A 2.p){9 e=d.E(n);b(e){e.o=F}}};2.l++;2.L=3}w{T(\'U: V a j h 3\')}};2.X=6(3){2.B(3,\'j\')};2.G=6(3,4){9 8=d.m(2.7);b(2.y){Z.10(8)};8.u=4;9 k=d.m(\'h\');k.7=\'11\';k.s=\'13\';8.3=3;k.15=6(){2.5.3.5.J(2.5.3);2.5.5.J(2.5);2.5.3.g.l--;2.5.3.g.L.o=x;O(9 n A 2.5.3.g.p){9 e=d.E(n);b(e){e.o=x}};W x};8.M=\'<I>\'+3.s+\'</I>\';b(2.z){8.M+="<1e />";9 r=d.m(\'h\');r.7=\'12\';r.4=4+\'1f\';8.q(r)};8.q(k);2.i.q(8)}};',62,80,'||this|element|name|parentNode|function|type|new_row|var||if|max|document|elem|max_element|multi_selector|input|list_target|file|new_row_button|count|createElement|item|disabled|disable_array|appendChild|new_row_text|value|new_element|id|max_elements|else|false|makeDragable|includeText|in|addNamedElement|base_name|style|getElementById|true|addListRow|Array|span|removeChild|drag|current_element|innerHTML|include|for|position|absolute|left|1000px|alert|Error|not|return|addElement|addDisableElement|DragDrop|makeItemDragable|button|text|Remove|setIncludeText|onclick|setMakeDragable|hidden|_max|tagName|INPUT|_|onchange|insertBefore|br|_text|setType|MultiSelector'.split('|'),0,{}))
+// $Header: /cvsroot/bitweaver/_bit_util/javascript/libs/multifile.js,v 1.5 2007/07/09 18:29:25 squareing Exp $
+// please modify this file and leave plenty of comments. This file will be
+// compressed automatically. Please make sure you only use comments beginning
+// with '//' and put comments on separate lines otherwise the packer will choke
+
+// Multiple file selector by Stickman -- http://www.the-stickman.com
+function MultiSelector( list_target, max ){
+ this.list_target = list_target;
+ this.count = 0;
+ this.id = 0;
+ if( max ){
+ this.max = max;
+ } else {
+ this.max = -1;
+ };
+
+// BitMod allow us to know what the maximum for each named item is.
+ this.max_elements = Array();
+
+// BitMod allow us to add elements that are disabled and enabled in unison
+ this.disable_array = Array();
+
+// BitMod Added setType to allow us to add something besides a div.
+ this.type = 'file';
+
+ this.addDisableElement = function(element) {
+ this.disable_array[element] = element;
+ };
+
+ this.setType = function(type) {
+ this.type = type;
+ };
+
+// BitMod Added to allow us to include a title textbox
+ this.includeText = 0;
+ this.setIncludeText = function(include) {
+ this.includeText = include;
+ };
+
+// BitMod Added to allow us to set the new item dragable
+ this.makeDragable = 0;
+ this.setMakeDragable = function(drag) {
+ this.makeDragable = drag;
+ };
+
+// BitMod Added addNamedElement function to allow us to name these.
+// Thus we can have multiple on the same form
+ this.addNamedElement = function(element, name) {
+// BitMod We need a way to tell where the end is to avoid an infinite
+// loop when processing the uploads because ones in the middle may get removed
+// so we can't reliably tell when we hit the end without some magic
+ if(name in this.max_elements) {
+ this.max_elements[name].value = this.id;
+ }
+ else {
+ var max_element = document.createElement('input');
+ max_element.type = 'hidden';
+ max_element.name = name + '_max';
+ max_element.value = this.count;
+ this.max_elements[name] = max_element;
+ this.list_target.appendChild(max_element);
+ };
+ if( element.tagName == 'INPUT' && element.type == 'file' ){
+ element.base_name = name;
+ element.name = name + '_' + this.id++;
+ element.multi_selector = this;
+ element.onchange = function(){
+ var new_element = document.createElement( 'input' );
+ new_element.type = 'file';
+ this.parentNode.insertBefore( new_element, this );
+ this.multi_selector.addNamedElement( new_element, element.base_name);
+ this.multi_selector.addListRow( this , element.name);
+ this.style.position = 'absolute';
+ this.style.left = '-1000px';
+ };
+ if( this.max != -1 && this.count >= this.max ){
+ element.disabled = true;
+ for (var item in this.disable_array) {
+ var elem = document.getElementById(item);
+ if (elem) {
+ elem.disabled = true;
+ }
+ }
+ };
+ this.count++;
+ this.current_element = element;
+ } else {
+ alert( 'Error: not a file input element' );
+ };
+ };
+
+ this.addElement = function( element ){
+ this.addNamedElement(element, 'file');
+ };
+
+ this.addListRow = function( element , name){
+ // BitMod create by type and set id so we can use it
+ // in a drag and drop li.
+ var new_row = document.createElement( this.type );
+ if (this.makeDragable) {
+ DragDrop.makeItemDragable(new_row);
+ };
+ new_row.id = name;
+ var new_row_button = document.createElement( 'input' );
+ new_row_button.type = 'button';
+ new_row_button.value = 'Remove';
+ new_row.element = element;
+ new_row_button.onclick= function(){
+ this.parentNode.element.parentNode.removeChild( this.parentNode.element );
+ this.parentNode.parentNode.removeChild( this.parentNode );
+ this.parentNode.element.multi_selector.count--;
+ this.parentNode.element.multi_selector.current_element.disabled = false;
+ for (var item in this.parentNode.element.multi_selector.disable_array) {
+ var elem = document.getElementById(item);
+ if (elem) {
+ elem.disabled = false;
+ };
+ };
+ return false;
+ };
+ new_row.innerHTML = '<span>'+element.value+'</span>';
+ // BitMod to allow us to add a text box
+ if (this.includeText) {
+ new_row.innerHTML += "<br />";
+ var new_row_text = document.createElement( 'input' );
+ new_row_text.type = 'text';
+ new_row_text.name = name + '_text';
+ new_row.appendChild(new_row_text);
+ };
+ new_row.appendChild( new_row_button );
+ this.list_target.appendChild( new_row );
+ };
+};
diff --git a/javascript/libs/multifile_original.js b/javascript/libs/multifile_original.js
deleted file mode 100644
index 5db76c7..0000000
--- a/javascript/libs/multifile_original.js
+++ /dev/null
@@ -1,135 +0,0 @@
-/***************************************************************************\
-* *
-* please modify this file and leave plenty of comments. when done, please *
-* visit http://dean.edwards.name/packer/ to compress this and place the *
-* compressed output in the loaded version of this file *
-* *
-\***************************************************************************/
-// Multiple file selector by Stickman -- http://www.the-stickman.com
-function MultiSelector( list_target, max ){
- this.list_target = list_target;
- this.count = 0;
- this.id = 0;
- if( max ){
- this.max = max;
- } else {
- this.max = -1;
- };
-
-// BitMod allow us to know what the maximum for each named item is.
- this.max_elements = Array();
-
-// BitMod allow us to add elements that are disabled and enabled in unison
- this.disable_array = Array();
-
-// BitMod Added setType to allow us to add something besides a div.
- this.type = 'file';
-
- this.addDisableElement = function(element) {
- this.disable_array[element] = element;
- };
-
- this.setType = function(type) {
- this.type = type;
- };
-
-// BitMod Added to allow us to include a title textbox
- this.includeText = 0;
- this.setIncludeText = function(include) {
- this.includeText = include;
- };
-
-// BitMod Added to allow us to set the new item dragable
- this.makeDragable = 0;
- this.setMakeDragable = function(drag) {
- this.makeDragable = drag;
- };
-
-// BitMod Added addNamedElement function to allow us to name these.
-// Thus we can have multiple on the same form
- this.addNamedElement = function(element, name) {
-// BitMod We need a way to tell where the end is to avoid an infinite
-// loop when processing the uploads because ones in the middle may get removed
-// so we can't reliably tell when we hit the end without some magic
- if(name in this.max_elements) {
- this.max_elements[name].value = this.id;
- }
- else {
- var max_element = document.createElement('input');
- max_element.type = 'hidden';
- max_element.name = name + '_max';
- max_element.value = this.count;
- this.max_elements[name] = max_element;
- this.list_target.appendChild(max_element);
- };
- if( element.tagName == 'INPUT' && element.type == 'file' ){
- element.base_name = name;
- element.name = name + '_' + this.id++;
- element.multi_selector = this;
- element.onchange = function(){
- var new_element = document.createElement( 'input' );
- new_element.type = 'file';
- this.parentNode.insertBefore( new_element, this );
- this.multi_selector.addNamedElement( new_element, element.base_name);
- this.multi_selector.addListRow( this , element.name);
- this.style.position = 'absolute';
- this.style.left = '-1000px';
- };
- if( this.max != -1 && this.count >= this.max ){
- element.disabled = true;
- for (var item in this.disable_array) {
- var elem = document.getElementById(item);
- if (elem) {
- elem.disabled = true;
- }
- }
- };
- this.count++;
- this.current_element = element;
- } else {
- alert( 'Error: not a file input element' );
- };
- };
-
- this.addElement = function( element ){
- this.addNamedElement(element, 'file');
- };
-
- this.addListRow = function( element , name){
- // BitMod create by type and set id so we can use it
- // in a drag and drop li.
- var new_row = document.createElement( this.type );
- if (this.makeDragable) {
- DragDrop.makeItemDragable(new_row);
- };
- new_row.id = name;
- var new_row_button = document.createElement( 'input' );
- new_row_button.type = 'button';
- new_row_button.value = 'Remove';
- new_row.element = element;
- new_row_button.onclick= function(){
- this.parentNode.element.parentNode.removeChild( this.parentNode.element );
- this.parentNode.parentNode.removeChild( this.parentNode );
- this.parentNode.element.multi_selector.count--;
- this.parentNode.element.multi_selector.current_element.disabled = false;
- for (var item in this.parentNode.element.multi_selector.disable_array) {
- var elem = document.getElementById(item);
- if (elem) {
- elem.disabled = false;
- };
- };
- return false;
- };
- new_row.innerHTML = '<span>'+element.value+'</span>';
- // BitMod to allow us to add a text box
- if (this.includeText) {
- new_row.innerHTML += "<br />";
- var new_row_text = document.createElement( 'input' );
- new_row_text.type = 'text';
- new_row_text.name = name + '_text';
- new_row.appendChild(new_row_text);
- };
- new_row.appendChild( new_row_button );
- this.list_target.appendChild( new_row );
- };
-};
diff --git a/javascript/libs/tabpane.js b/javascript/libs/tabpane.js
index 75b2823..0460a4d 100644
--- a/javascript/libs/tabpane.js
+++ b/javascript/libs/tabpane.js
@@ -1 +1,375 @@
-eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('8 15(1g){4 i=0;7(f.2b){z(i=0;i<1g.12.v;i++){1j=1g.12.1Y(i);B=1X.2k(1j.16);7(B&&B.2E&&B.2C==2f){B.1u();B.1u()}15(1j)}}}8 m(){7(O m.P!="Q"){j m.P}4 1k=/2F 5\\.[2d]/i.K(1V.2c);m.P=(O f.1q!="Q"&&f.1q.2a("2e","1.0")||1k);7(1k){f.1p=f.Y;f.Y=8(1c){7(1c=="*"){j f.y}D{j f.1p(1c)}}}j m.P}8 k(6,1f){7(!m()||6==9){j}2.c=6;2.c.t=2;2.p=[];2.o=9;4 1x=f.29.1o(/[#\\?]/);4 1l=f.28.1s.1o(/[#\\?]/);7(1l[0]!=1x[0]){k.S("1h"+2.c.1a,0)}2.1e=1f!=9?1f:21;2.c.h=2.1r+" "+2.c.h;2.I=f.1n("22");2.I.h="27";6.26(2.I,6.1U);4 N=0;7(2.1e){N=25(k.1v("1h"+2.c.1a));7(23(N)){N=0}}2.o=N;4 q=6.12;4 n;z(4 i=0;i<q.v;i++){7(q[i].1m==1&&q[i].h=="F"){2.1d(q[i])}}}k.u.1r="2z";k.u.1W=8(n){7(2.o!=n){7(2.o!=9&&2.p[2.o]!=9){2.p[2.o].13()}2.o=n;2.p[2.o].17();7(2.1e){k.S("1h"+2.c.1a,n,1)}}};k.u.2A=8(){j 2.o};k.u.1d=8(V){7(!m()){j}7(V.H==2){j V.H}4 n=2.p.v;4 C=2.p[n]=W r(V,2,n);C.t=2;2.I.19(C.b);7(n==2.o){C.17()}D{C.13()}j C};k.u.Z=8(){2.c.t=9;2.c=9;2.I=9;z(4 i=0;i<2.p.v;i++){2.p[i].Z();2.p[i]=9}2.p=9};k.S=8(10,1t,1i){4 11="";7(1i){4 d=W 2o();d.2n(d.2m()+1i*24*1y*1y*2u);11="; 11="+d.2s()}f.1z=10+"="+1t+11+"; 2q="+2p};k.1v=8(10){4 1w=W 2j("(\\;|^)[^;]*("+10+")\\=([^;]*)(;|$)");4 18=1w.2y(f.1z);j 18!=9?18[3]:9};k.2l=8(16){S(16,"",-1)};8 r(6,t,1A){7(!m()||6==9){j}2.c=6;2.c.H=2;2.1S=1A;4 q=6.12;z(4 i=0;i<q.v;i++){7(q[i].1m==1&&q[i].h=="b"){2.b=q[i];2g}}4 a=f.1n("A");2.14=a;a.1s="#";a.X=8(){j 1M};2v(2.b.2i()){a.19(2.b.1U)}2.b.19(a);4 R=2;2.b.X=8(){R.1B()};2.b.1H=8(){r.1E(R)};2.b.1F=8(){r.1Q(R)}}r.u.17=8(){4 6=2.b;4 s=6.h+" b-1T";s=s.U(/ +/g," ");6.h=s;15(2.c);2.c.E.T="1G"};r.u.13=8(){4 6=2.b;4 s=6.h;s=s.U(/ b.1T/g,"");6.h=s;2.c.E.T="1R"};r.u.1B=8(){2.t.1W(2.1S)};r.u.Z=8(){4 1P=/^2w/;7(2.c.E.T=="1R"&&1V.2t==1P){2.c.E.1Z="2x";2.c.E.2D="-2r";2.c.E.T="1G"}2.14.X=9;2.14=9;2.c.H=9;2.b.X=9;2.b.1H=9;2.b.1F=9;2.b=9;2.t=9;2.c=9};r.1E=8(F){4 6=F.b;4 s=6.h+" b-1C";s=s.U(/ +/g," ");6.h=s};r.1Q=8(F){4 6=F.b;4 s=6.h;s=s.U(/ b.1C/g,"");6.h=s};8 M(){7(!m()){j}4 y=f.Y("*");4 l=y.v;4 J=/1J/;4 1D=/F/;4 x,6;4 2B;z(4 i=0;i<l;i++){6=y[i];x=6.h;7(x==""){1O}7(J.K(x)&&!6.t){W k(6)}D 7(1D.K(x)&&!6.H&&J.K(6.1I.h)){6.1I.t.1d(6)}}}8 1K(){7(!m()){j}4 y=f.Y("*");4 l=y.v;4 J=/1J/;4 x,6;4 G=[];z(4 i=0;i<l;i++){6=y[i];x=6.h;7(x==""){1O}7(J.K(x)&&6.t){G[G.v]=6.t}}z(4 i=G.v-1;i>=0;i--){G[i].Z();G[i]=9}}7(O w.1N!="Q"){w.1N("20",M,1M)}D 7(O w.1b!="Q"){w.1b("L",M);w.1b("2h",1K)}D{7(w.L!=9){4 1L=w.L;w.L=8(e){1L(e);M()}}D{w.L=M}}',62,166,'||this||var||el|if|function|null||tab|element|||document||className||return|WebFXTabPane||hasSupport||selectedIndex|pages|cs|WebFXTabPage||tabPane|prototype|length|window|cn|all|for||editor|tp|else|style|tabpage|tabPanes|tabPage|tabRow|tabPaneRe|test|onload|setupAllTabs|tabIndex|typeof|support|undefined|oThis|setCookie|display|replace|oElement|new|onclick|getElementsByTagName|dispose|sName|expires|childNodes|hide|aElement|switchEditors|name|show|res|appendChild|id|attachEvent|sTagName|addTabPage|useCookie|bUseCookie|oNode|webfxtab_|nDays|childNode|ie55|loc|nodeType|createElement|split|_getElementsByTagName|implementation|classNameTag|href|sValue|SwitchEditMode|getCookie|re|ref|60|cookie|nIndex|select|hover|tabPageRe|tabOver|onmouseout|block|onmouseover|parentNode|tabpane|disposeAllTabs|oldOnload|false|addEventListener|continue|safari|tabOut|none|index|active|firstChild|navigator|setSelectedIndex|FCKeditorAPI|item|position|load|true|div|isNaN||Number|insertBefore|tabcontainer|location|referrer|hasFeature|FCKEditorLoaded|userAgent|56789|html|FCK_EDITMODE_WYSIWYG|break|onunload|hasChildNodes|RegExp|GetInstance|removeCookie|getTime|setTime|Date|bitCookiePath|path|10000px|toGMTString|vendor|1000|while|Apple|absolute|exec|tabsystem|getSelectedIndex|parentTabPane|EditMode|left|EditorDocument|msie'.split('|'),0,{}))
+// $Header: /cvsroot/bitweaver/_bit_util/javascript/libs/tabpane.js,v 1.13 2007/07/09 18:29:25 squareing Exp $
+
+//-------------------------------------------------------------------------
+// Tab Pane 1.02
+//-------------------------------------------------------------------------
+// Created by Erik Arvidsson
+// (http://webfx.eae.net/contact.html#erik)
+// For WebFX (http://webfx.eae.net/)
+//-------------------------------------------------------------------------
+// Copyright (c) 1998 - 2003 Erik Arvidsson
+//-------------------------------------------------------------------------
+
+// please modify this file and leave plenty of comments. This file will be
+// compressed automatically. Please make sure you only use comments beginning
+// with '//' and put comments on separate lines otherwise the packer will choke
+
+// Called to cause an FCKEditor to show. This fixes an incompatibility with
+// tab pane and FCKEditor in Gecko browsers where the FCKEditor is created
+// in a hidden tab. The editor fails to get focused without this.
+function switchEditors(oNode) {
+ var i=0;
+ // We use this to avoid the error when this runs BEFORE
+ // FKCEditor has created the API object.
+ if (document.FCKEditorLoaded) {
+ for (i=0;i<oNode.childNodes.length;i++) {
+ childNode = oNode.childNodes.item(i);
+ editor = FCKeditorAPI.GetInstance(childNode.name);
+ if (editor && editor.EditorDocument && editor.EditMode == FCK_EDITMODE_WYSIWYG) {
+ editor.SwitchEditMode();
+ editor.SwitchEditMode();
+ }
+ switchEditors(childNode);
+ }
+ }
+}
+
+// This function is used to define if the browser supports the needed
+// features
+function hasSupport() {
+
+ if (typeof hasSupport.support != "undefined") {
+ return hasSupport.support;
+ }
+
+ var ie55 = /msie 5\.[56789]/i.test( navigator.userAgent );
+
+ hasSupport.support = ( typeof document.implementation != "undefined" && document.implementation.hasFeature( "html", "1.0" ) || ie55 );
+
+ // IE55 has a serious DOM1 bug... Patch it!
+ if ( ie55 ) {
+ document._getElementsByTagName = document.getElementsByTagName;
+ document.getElementsByTagName = function ( sTagName ) {
+ if ( sTagName == "*" ) {
+ return document.all;
+ } else {
+ return document._getElementsByTagName( sTagName );
+ }
+ };
+ }
+
+ return hasSupport.support;
+}
+
+
+// The constructor for tab panes
+// el : HTMLElement The html element used to represent the tab pane
+// bUseCookie : Boolean Optional. Default is true. Used to determine whether to us
+// persistance using cookies or not
+
+function WebFXTabPane( el, bUseCookie ) {
+ if ( !hasSupport() || el == null ) { return; }
+
+ this.element = el;
+ this.element.tabPane = this;
+ this.pages = [];
+ this.selectedIndex = null;
+
+ // <--- quick hack to set persistence only on pages where referrer == location
+ var ref = document.referrer.split( /[#\?]/ );
+ var loc = document.location.href.split( /[#\?]/ );
+ if( loc[0] != ref[0] ) {
+ WebFXTabPane.setCookie( "webfxtab_" + this.element.id, 0 );
+ }
+ // end quick hack - xing --->
+
+ this.useCookie = bUseCookie != null ? bUseCookie : true;
+
+ // add class name tag to class name
+ this.element.className = this.classNameTag + " " + this.element.className;
+
+ // add tab row
+ this.tabRow = document.createElement( "div" );
+ this.tabRow.className = "tabcontainer";
+ el.insertBefore( this.tabRow, el.firstChild );
+
+ var tabIndex = 0;
+ if ( this.useCookie ) {
+ tabIndex = Number( WebFXTabPane.getCookie( "webfxtab_" + this.element.id ) );
+ if ( isNaN( tabIndex ) ) {
+ tabIndex = 0;
+ }
+ }
+ this.selectedIndex = tabIndex;
+
+ // loop through child nodes and add them
+ var cs = el.childNodes;
+ var n;
+ for (var i = 0; i < cs.length; i++) {
+ if (cs[i].nodeType == 1 && cs[i].className == "tabpage") {
+ this.addTabPage( cs[i] );
+ }
+ }
+}
+
+WebFXTabPane.prototype.classNameTag = "tabsystem";
+
+WebFXTabPane.prototype.setSelectedIndex = function ( n ) {
+ if (this.selectedIndex != n) {
+ if (this.selectedIndex != null && this.pages[ this.selectedIndex ] != null ) {
+ this.pages[ this.selectedIndex ].hide();
+ }
+ this.selectedIndex = n;
+ this.pages[ this.selectedIndex ].show();
+
+ if ( this.useCookie ) {
+ WebFXTabPane.setCookie( "webfxtab_" + this.element.id, n, 1 );
+ }
+ }
+};
+
+WebFXTabPane.prototype.getSelectedIndex = function () {
+ return this.selectedIndex;
+};
+
+WebFXTabPane.prototype.addTabPage = function ( oElement ) {
+ if ( !hasSupport() ) { return; }
+
+ if ( oElement.tabPage == this ) {
+ return oElement.tabPage;
+ }
+
+ var n = this.pages.length;
+ var tp = this.pages[n] = new WebFXTabPage( oElement, this, n );
+ tp.tabPane = this;
+
+ // move the tab out of the box
+ this.tabRow.appendChild( tp.tab );
+
+ if ( n == this.selectedIndex ) {
+ tp.show();
+ } else {
+ tp.hide();
+ }
+
+ return tp;
+};
+
+WebFXTabPane.prototype.dispose = function () {
+ this.element.tabPane = null;
+ this.element = null;
+ this.tabRow = null;
+
+ for (var i = 0; i < this.pages.length; i++) {
+ this.pages[i].dispose();
+ this.pages[i] = null;
+ }
+ this.pages = null;
+};
+
+
+
+// Cookie handling
+WebFXTabPane.setCookie = function ( sName, sValue, nDays ) {
+ var expires = "";
+ if ( nDays ) {
+ var d = new Date();
+ d.setTime( d.getTime() + nDays * 24 * 60 * 60 * 1000 );
+ expires = "; expires=" + d.toGMTString();
+ }
+
+ document.cookie = sName + "=" + sValue + expires + "; path="+bitCookiePath;
+};
+
+WebFXTabPane.getCookie = function (sName) {
+ var re = new RegExp( "(\;|^)[^;]*(" + sName + ")\=([^;]*)(;|$)" );
+ var res = re.exec( document.cookie );
+ return res != null ? res[3] : null;
+};
+
+WebFXTabPane.removeCookie = function ( name ) {
+ setCookie( name, "", -1 );
+};
+
+
+// The constructor for tab pages. This one should not be used.
+// Use WebFXTabPage.addTabPage instead
+// el : HTMLElement The html element used to represent the tab pane
+// tabPane : WebFXTabPane The parent tab pane
+// nindex : Number The index of the page in the parent pane page array
+
+function WebFXTabPage( el, tabPane, nIndex ) {
+ if ( !hasSupport() || el == null ) { return; }
+
+ this.element = el;
+ this.element.tabPage = this;
+ this.index = nIndex;
+
+ var cs = el.childNodes;
+ for (var i = 0; i < cs.length; i++) {
+ if (cs[i].nodeType == 1 && cs[i].className == "tab") {
+ this.tab = cs[i];
+ break;
+ }
+ }
+
+ // insert a tag around content to support keyboard navigation
+
+
+ var a = document.createElement( "A" );
+ this.aElement = a;
+ a.href = "#";
+ a.onclick = function () { return false; };
+ while ( this.tab.hasChildNodes() ) {
+ a.appendChild( this.tab.firstChild );
+ }
+ this.tab.appendChild( a );
+
+
+ // hook up events, using DOM0
+ var oThis = this;
+ this.tab.onclick = function () { oThis.select(); };
+ this.tab.onmouseover = function () { WebFXTabPage.tabOver( oThis ); };
+ this.tab.onmouseout = function () { WebFXTabPage.tabOut( oThis ); };
+}
+
+WebFXTabPage.prototype.show = function () {
+ var el = this.tab;
+ var s = el.className + " tab-active";
+ s = s.replace(/ +/g, " ");
+ el.className = s;
+
+ // Fix for FCKEditor focus bug
+ switchEditors(this.element);
+ this.element.style.display = "block";
+};
+
+WebFXTabPage.prototype.hide = function () {
+ var el = this.tab;
+ var s = el.className;
+ // Packer doesn't like \- in regexp for some reason
+ s = s.replace(/ tab.active/g, "");
+ el.className = s;
+
+ this.element.style.display = "none";
+};
+
+WebFXTabPage.prototype.select = function () {
+ this.tabPane.setSelectedIndex( this.index );
+};
+
+WebFXTabPage.prototype.dispose = function () {
+ // Safari only submits inputs which are not display:none
+ // I suspect this is for "security" but that is stupid since we
+ // can still hide it off screen like this.
+ var safari = /^Apple/;
+ if (this.element.style.display == "none" && navigator.vendor == safari) {
+ this.element.style.position = "absolute";
+ this.element.style.left = "-10000px";
+ this.element.style.display = "block";
+ }
+ this.aElement.onclick = null;
+ this.aElement = null;
+ this.element.tabPage = null;
+ this.tab.onclick = null;
+ this.tab.onmouseover = null;
+ this.tab.onmouseout = null;
+ this.tab = null;
+ this.tabPane = null;
+ this.element = null;
+};
+
+WebFXTabPage.tabOver = function ( tabpage ) {
+ var el = tabpage.tab;
+ var s = el.className + " tab-hover";
+ s = s.replace(/ +/g, " ");
+ el.className = s;
+};
+
+WebFXTabPage.tabOut = function ( tabpage ) {
+ var el = tabpage.tab;
+ var s = el.className;
+ // Packer doesn't like \- in regexp for some reason
+ s = s.replace(/ tab.hover/g, "");
+ el.className = s;
+};
+
+
+// This function initializes all uninitialized tab panes and tab pages
+function setupAllTabs() {
+ if ( !hasSupport() ) { return; }
+
+ var all = document.getElementsByTagName( "*" );
+ var l = all.length;
+ var tabPaneRe = /tabpane/;
+ var tabPageRe = /tabpage/;
+ var cn, el;
+ var parentTabPane;
+
+ for ( var i = 0; i < l; i++ ) {
+ el = all[i];
+ cn = el.className;
+
+ // no className
+ if ( cn == "" ) { continue; }
+
+ // uninitiated tab pane
+ if ( tabPaneRe.test( cn ) && !el.tabPane ) {
+ new WebFXTabPane( el );
+ }
+
+ // unitiated tab page wit a valid tab pane parent
+ else if ( tabPageRe.test( cn ) && !el.tabPage && tabPaneRe.test( el.parentNode.className ) ) {
+ el.parentNode.tabPane.addTabPage( el );
+ }
+ }
+}
+
+function disposeAllTabs() {
+ if ( !hasSupport() ) { return; }
+
+ var all = document.getElementsByTagName( "*" );
+ var l = all.length;
+ var tabPaneRe = /tabpane/;
+ var cn, el;
+ var tabPanes = [];
+
+ for ( var i = 0; i < l; i++ ) {
+ el = all[i];
+ cn = el.className;
+
+ // no className
+ if ( cn == "" ) { continue; }
+
+ // tab pane
+ if ( tabPaneRe.test( cn ) && el.tabPane ) {
+ tabPanes[tabPanes.length] = el.tabPane;
+ }
+ }
+
+ for (var i = tabPanes.length - 1; i >= 0; i--) {
+ tabPanes[i].dispose();
+ tabPanes[i] = null;
+ }
+}
+
+
+// initialization hook up
+
+// DOM2
+if ( typeof window.addEventListener != "undefined" ) {
+ window.addEventListener( "load", setupAllTabs, false );
+} else if ( typeof window.attachEvent != "undefined" ) {
+ window.attachEvent( "onload", setupAllTabs );
+ window.attachEvent( "onunload", disposeAllTabs );
+} else {
+ if ( window.onload != null ) {
+ var oldOnload = window.onload;
+ window.onload = function ( e ) {
+ oldOnload( e );
+ setupAllTabs();
+ };
+ } else {
+ window.onload = setupAllTabs;
+ }
+}
diff --git a/javascript/libs/tabpane_original.js b/javascript/libs/tabpane_original.js
deleted file mode 100644
index cc1293a..0000000
--- a/javascript/libs/tabpane_original.js
+++ /dev/null
@@ -1,375 +0,0 @@
-// $Header: /cvsroot/bitweaver/_bit_util/javascript/libs/Attic/tabpane_original.js,v 1.10 2007/07/07 16:18:37 squareing Exp $
-
-//-------------------------------------------------------------------------
-// Tab Pane 1.02
-//-------------------------------------------------------------------------
-// Created by Erik Arvidsson
-// (http://webfx.eae.net/contact.html#erik)
-// For WebFX (http://webfx.eae.net/)
-//-------------------------------------------------------------------------
-// Copyright (c) 1998 - 2003 Erik Arvidsson
-//-------------------------------------------------------------------------
-
-// please modify this file and leave plenty of comments. This file will be
-// compressed automatically. Please make sure you only use comments beginning
-// with '//' and put comments on separate lines otherwise the packer will choke
-
-// Called to cause an FCKEditor to show. This fixes an incompatibility with
-// tab pane and FCKEditor in Gecko browsers where the FCKEditor is created
-// in a hidden tab. The editor fails to get focused without this.
-function switchEditors(oNode) {
- var i=0;
- // We use this to avoid the error when this runs BEFORE
- // FKCEditor has created the API object.
- if (document.FCKEditorLoaded) {
- for (i=0;i<oNode.childNodes.length;i++) {
- childNode = oNode.childNodes.item(i);
- editor = FCKeditorAPI.GetInstance(childNode.name);
- if (editor && editor.EditorDocument && editor.EditMode == FCK_EDITMODE_WYSIWYG) {
- editor.SwitchEditMode();
- editor.SwitchEditMode();
- }
- switchEditors(childNode);
- }
- }
-}
-
-// This function is used to define if the browser supports the needed
-// features
-function hasSupport() {
-
- if (typeof hasSupport.support != "undefined") {
- return hasSupport.support;
- }
-
- var ie55 = /msie 5\.[56789]/i.test( navigator.userAgent );
-
- hasSupport.support = ( typeof document.implementation != "undefined" && document.implementation.hasFeature( "html", "1.0" ) || ie55 );
-
- // IE55 has a serious DOM1 bug... Patch it!
- if ( ie55 ) {
- document._getElementsByTagName = document.getElementsByTagName;
- document.getElementsByTagName = function ( sTagName ) {
- if ( sTagName == "*" ) {
- return document.all;
- } else {
- return document._getElementsByTagName( sTagName );
- }
- };
- }
-
- return hasSupport.support;
-}
-
-
-// The constructor for tab panes
-// el : HTMLElement The html element used to represent the tab pane
-// bUseCookie : Boolean Optional. Default is true. Used to determine whether to us
-// persistance using cookies or not
-
-function WebFXTabPane( el, bUseCookie ) {
- if ( !hasSupport() || el == null ) { return; }
-
- this.element = el;
- this.element.tabPane = this;
- this.pages = [];
- this.selectedIndex = null;
-
- // <--- quick hack to set persistence only on pages where referrer == location
- var ref = document.referrer.split( /[#\?]/ );
- var loc = document.location.href.split( /[#\?]/ );
- if( loc[0] != ref[0] ) {
- WebFXTabPane.setCookie( "webfxtab_" + this.element.id, 0 );
- }
- // end quick hack - xing --->
-
- this.useCookie = bUseCookie != null ? bUseCookie : true;
-
- // add class name tag to class name
- this.element.className = this.classNameTag + " " + this.element.className;
-
- // add tab row
- this.tabRow = document.createElement( "div" );
- this.tabRow.className = "tabcontainer";
- el.insertBefore( this.tabRow, el.firstChild );
-
- var tabIndex = 0;
- if ( this.useCookie ) {
- tabIndex = Number( WebFXTabPane.getCookie( "webfxtab_" + this.element.id ) );
- if ( isNaN( tabIndex ) ) {
- tabIndex = 0;
- }
- }
- this.selectedIndex = tabIndex;
-
- // loop through child nodes and add them
- var cs = el.childNodes;
- var n;
- for (var i = 0; i < cs.length; i++) {
- if (cs[i].nodeType == 1 && cs[i].className == "tabpage") {
- this.addTabPage( cs[i] );
- }
- }
-}
-
-WebFXTabPane.prototype.classNameTag = "tabsystem";
-
-WebFXTabPane.prototype.setSelectedIndex = function ( n ) {
- if (this.selectedIndex != n) {
- if (this.selectedIndex != null && this.pages[ this.selectedIndex ] != null ) {
- this.pages[ this.selectedIndex ].hide();
- }
- this.selectedIndex = n;
- this.pages[ this.selectedIndex ].show();
-
- if ( this.useCookie ) {
- WebFXTabPane.setCookie( "webfxtab_" + this.element.id, n, 1 );
- }
- }
-};
-
-WebFXTabPane.prototype.getSelectedIndex = function () {
- return this.selectedIndex;
-};
-
-WebFXTabPane.prototype.addTabPage = function ( oElement ) {
- if ( !hasSupport() ) { return; }
-
- if ( oElement.tabPage == this ) {
- return oElement.tabPage;
- }
-
- var n = this.pages.length;
- var tp = this.pages[n] = new WebFXTabPage( oElement, this, n );
- tp.tabPane = this;
-
- // move the tab out of the box
- this.tabRow.appendChild( tp.tab );
-
- if ( n == this.selectedIndex ) {
- tp.show();
- } else {
- tp.hide();
- }
-
- return tp;
-};
-
-WebFXTabPane.prototype.dispose = function () {
- this.element.tabPane = null;
- this.element = null;
- this.tabRow = null;
-
- for (var i = 0; i < this.pages.length; i++) {
- this.pages[i].dispose();
- this.pages[i] = null;
- }
- this.pages = null;
-};
-
-
-
-// Cookie handling
-WebFXTabPane.setCookie = function ( sName, sValue, nDays ) {
- var expires = "";
- if ( nDays ) {
- var d = new Date();
- d.setTime( d.getTime() + nDays * 24 * 60 * 60 * 1000 );
- expires = "; expires=" + d.toGMTString();
- }
-
- document.cookie = sName + "=" + sValue + expires + "; path="+bitCookiePath;
-};
-
-WebFXTabPane.getCookie = function (sName) {
- var re = new RegExp( "(\;|^)[^;]*(" + sName + ")\=([^;]*)(;|$)" );
- var res = re.exec( document.cookie );
- return res != null ? res[3] : null;
-};
-
-WebFXTabPane.removeCookie = function ( name ) {
- setCookie( name, "", -1 );
-};
-
-
-// The constructor for tab pages. This one should not be used.
-// Use WebFXTabPage.addTabPage instead
-// el : HTMLElement The html element used to represent the tab pane
-// tabPane : WebFXTabPane The parent tab pane
-// nindex : Number The index of the page in the parent pane page array
-
-function WebFXTabPage( el, tabPane, nIndex ) {
- if ( !hasSupport() || el == null ) { return; }
-
- this.element = el;
- this.element.tabPage = this;
- this.index = nIndex;
-
- var cs = el.childNodes;
- for (var i = 0; i < cs.length; i++) {
- if (cs[i].nodeType == 1 && cs[i].className == "tab") {
- this.tab = cs[i];
- break;
- }
- }
-
- // insert a tag around content to support keyboard navigation
-
-
- var a = document.createElement( "A" );
- this.aElement = a;
- a.href = "#";
- a.onclick = function () { return false; };
- while ( this.tab.hasChildNodes() ) {
- a.appendChild( this.tab.firstChild );
- }
- this.tab.appendChild( a );
-
-
- // hook up events, using DOM0
- var oThis = this;
- this.tab.onclick = function () { oThis.select(); };
- this.tab.onmouseover = function () { WebFXTabPage.tabOver( oThis ); };
- this.tab.onmouseout = function () { WebFXTabPage.tabOut( oThis ); };
-}
-
-WebFXTabPage.prototype.show = function () {
- var el = this.tab;
- var s = el.className + " tab-active";
- s = s.replace(/ +/g, " ");
- el.className = s;
-
- // Fix for FCKEditor focus bug
- switchEditors(this.element);
- this.element.style.display = "block";
-};
-
-WebFXTabPage.prototype.hide = function () {
- var el = this.tab;
- var s = el.className;
- // Packer doesn't like \- in regexp for some reason
- s = s.replace(/ tab.active/g, "");
- el.className = s;
-
- this.element.style.display = "none";
-};
-
-WebFXTabPage.prototype.select = function () {
- this.tabPane.setSelectedIndex( this.index );
-};
-
-WebFXTabPage.prototype.dispose = function () {
- // Safari only submits inputs which are not display:none
- // I suspect this is for "security" but that is stupid since we
- // can still hide it off screen like this.
- var safari = /^Apple/;
- if (this.element.style.display == "none" && navigator.vendor == safari) {
- this.element.style.position = "absolute";
- this.element.style.left = "-10000px";
- this.element.style.display = "block";
- }
- this.aElement.onclick = null;
- this.aElement = null;
- this.element.tabPage = null;
- this.tab.onclick = null;
- this.tab.onmouseover = null;
- this.tab.onmouseout = null;
- this.tab = null;
- this.tabPane = null;
- this.element = null;
-};
-
-WebFXTabPage.tabOver = function ( tabpage ) {
- var el = tabpage.tab;
- var s = el.className + " tab-hover";
- s = s.replace(/ +/g, " ");
- el.className = s;
-};
-
-WebFXTabPage.tabOut = function ( tabpage ) {
- var el = tabpage.tab;
- var s = el.className;
- // Packer doesn't like \- in regexp for some reason
- s = s.replace(/ tab.hover/g, "");
- el.className = s;
-};
-
-
-// This function initializes all uninitialized tab panes and tab pages
-function setupAllTabs() {
- if ( !hasSupport() ) { return; }
-
- var all = document.getElementsByTagName( "*" );
- var l = all.length;
- var tabPaneRe = /tabpane/;
- var tabPageRe = /tabpage/;
- var cn, el;
- var parentTabPane;
-
- for ( var i = 0; i < l; i++ ) {
- el = all[i];
- cn = el.className;
-
- // no className
- if ( cn == "" ) { continue; }
-
- // uninitiated tab pane
- if ( tabPaneRe.test( cn ) && !el.tabPane ) {
- new WebFXTabPane( el );
- }
-
- // unitiated tab page wit a valid tab pane parent
- else if ( tabPageRe.test( cn ) && !el.tabPage && tabPaneRe.test( el.parentNode.className ) ) {
- el.parentNode.tabPane.addTabPage( el );
- }
- }
-}
-
-function disposeAllTabs() {
- if ( !hasSupport() ) { return; }
-
- var all = document.getElementsByTagName( "*" );
- var l = all.length;
- var tabPaneRe = /tabpane/;
- var cn, el;
- var tabPanes = [];
-
- for ( var i = 0; i < l; i++ ) {
- el = all[i];
- cn = el.className;
-
- // no className
- if ( cn == "" ) { continue; }
-
- // tab pane
- if ( tabPaneRe.test( cn ) && el.tabPane ) {
- tabPanes[tabPanes.length] = el.tabPane;
- }
- }
-
- for (var i = tabPanes.length - 1; i >= 0; i--) {
- tabPanes[i].dispose();
- tabPanes[i] = null;
- }
-}
-
-
-// initialization hook up
-
-// DOM2
-if ( typeof window.addEventListener != "undefined" ) {
- window.addEventListener( "load", setupAllTabs, false );
-} else if ( typeof window.attachEvent != "undefined" ) {
- window.attachEvent( "onload", setupAllTabs );
- window.attachEvent( "onunload", disposeAllTabs );
-} else {
- if ( window.onload != null ) {
- var oldOnload = window.onload;
- window.onload = function ( e ) {
- oldOnload( e );
- setupAllTabs();
- };
- } else {
- window.onload = setupAllTabs;
- }
-}