author | Dan |
Mon, 28 Dec 2009 16:53:19 -0500 | |
changeset 1198 | 3ec9ac297045 |
parent 1125 | 367768040a61 |
child 1227 | bdac73ed481e |
permissions | -rw-r--r-- |
1 | 1 |
// Make an HTML element fly in from the top or bottom. |
2 |
// Includes inertia! |
|
3 |
||
4 |
// vB, don't even try. It's GPL like the rest of Enano. I know you're jealous. >:) |
|
5 |
||
6 |
var fly_in_cache = new Object(); |
|
7 |
var FI_TOP = 1; |
|
8 |
var FI_BOTTOM = 2; |
|
9 |
var FI_IN = 1; |
|
10 |
var FI_OUT = 2; |
|
11 |
var FI_UP = 1; |
|
12 |
var FI_DOWN = 2; |
|
1125
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
parents:
420
diff
changeset
|
13 |
// increase to slow down transitions (for debug) |
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
parents:
420
diff
changeset
|
14 |
var FI_MULTIPLIER = 1; |
1 | 15 |
|
39
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
16 |
/** |
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
17 |
* You can thank Robert Penner for the math used here. Ported from an ActionScript class. |
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
18 |
* License: Modified BSD license <http://www.robertpenner.com/easing_terms_of_use.html> |
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
19 |
*/ |
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
20 |
|
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
21 |
// Effects code - don't bother changing these formulas |
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
22 |
var Back = { |
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
23 |
easeOut: function(t, b, c, d, s) |
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
24 |
{ |
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
25 |
if (s == undefined) s = 1.70158; |
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
26 |
return c * ( ( t=t/d-1 ) * t * ( ( s + 1 ) * t + s) + 1) + b; |
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
27 |
}, |
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
28 |
easeIn: function (t, b, c, d, s) |
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
29 |
{ |
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
30 |
if (s == undefined) s = 1.70158; |
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
31 |
return c * ( t/=d ) * t * ( ( s + 1 ) * t - s) + b; |
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
32 |
}, |
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
33 |
easeInOut: function (t, b, c, d, s) |
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
34 |
{ |
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
35 |
if (s == undefined) s = 1.70158; |
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
36 |
if ((t /= d/2) < 1) |
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
37 |
{ |
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
38 |
return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; |
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
39 |
} |
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
40 |
return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; |
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
41 |
} |
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
42 |
} |
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
43 |
|
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
44 |
// This should be set to the class name of the effect you want. |
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
45 |
var GlideEffect = Back; |
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
46 |
|
1 | 47 |
// Placeholder functions, to make organization a little easier :-) |
48 |
||
49 |
function fly_in_top(element, nofade, height_taken_care_of) |
|
50 |
{ |
|
51 |
return fly_core(element, nofade, FI_TOP, FI_IN, height_taken_care_of); |
|
52 |
} |
|
53 |
||
54 |
function fly_in_bottom(element, nofade, height_taken_care_of) |
|
55 |
{ |
|
56 |
return fly_core(element, nofade, FI_BOTTOM, FI_IN, height_taken_care_of); |
|
57 |
} |
|
58 |
||
59 |
function fly_out_top(element, nofade, height_taken_care_of) |
|
60 |
{ |
|
61 |
return fly_core(element, nofade, FI_TOP, FI_OUT, height_taken_care_of); |
|
62 |
} |
|
63 |
||
64 |
function fly_out_bottom(element, nofade, height_taken_care_of) |
|
65 |
{ |
|
66 |
return fly_core(element, nofade, FI_BOTTOM, FI_OUT, height_taken_care_of); |
|
67 |
} |
|
68 |
||
69 |
function fly_core(element, nofade, origin, direction, height_taken_care_of) |
|
70 |
{ |
|
71 |
if ( !element || typeof(element) != 'object' ) |
|
72 |
return false; |
|
1125
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
parents:
420
diff
changeset
|
73 |
|
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
parents:
420
diff
changeset
|
74 |
// force to array |
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
parents:
420
diff
changeset
|
75 |
if ( !element.length ) |
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
parents:
420
diff
changeset
|
76 |
element = [ element ]; |
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
parents:
420
diff
changeset
|
77 |
|
1 | 78 |
// target dimensions |
79 |
var top, left; |
|
80 |
// initial dimensions |
|
81 |
var topi, lefti; |
|
82 |
// current dimensions |
|
83 |
var topc, leftc; |
|
84 |
// screen dimensions |
|
85 |
var w = getWidth(); |
|
86 |
var h = getHeight(); |
|
87 |
var y = parseInt ( getScrollOffset() ); |
|
88 |
// temp vars |
|
89 |
var dim, off, diff, dist, ratio, opac_factor; |
|
90 |
// setup element |
|
1125
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
parents:
420
diff
changeset
|
91 |
for ( var i = 0; i < element.length; i++ ) |
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
parents:
420
diff
changeset
|
92 |
element[i].style.position = 'absolute'; |
1 | 93 |
|
1125
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
parents:
420
diff
changeset
|
94 |
dim = [ $dynano(element[0]).Height(), $dynano(element[0]).Width() ]; |
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
parents:
420
diff
changeset
|
95 |
off = [ $dynano(element[0]).Top(), $dynano(element[0]).Left() ]; |
1 | 96 |
|
97 |
if ( height_taken_care_of ) |
|
98 |
{ |
|
99 |
top = off[0]; |
|
100 |
left = off[1]; |
|
101 |
} |
|
102 |
else |
|
103 |
{ |
|
104 |
top = Math.round(( h / 2 ) - ( dim[0] / 2 )) + y; // - ( h / 4 )); |
|
105 |
left = Math.round(( w / 2 ) - ( dim[1] / 2 )); |
|
106 |
} |
|
107 |
||
108 |
// you can change this around to get it to fly in from corners or be on the left/right side |
|
109 |
lefti = left; |
|
110 |
||
111 |
// calculate first frame Y position |
|
112 |
if ( origin == FI_TOP && direction == FI_IN ) |
|
113 |
{ |
|
114 |
topi = 0 - dim[0] + y; |
|
115 |
} |
|
116 |
else if ( origin == FI_TOP && direction == FI_OUT ) |
|
117 |
{ |
|
118 |
topi = top; |
|
119 |
top = 0 - dim[0] + y; |
|
120 |
} |
|
121 |
else if ( origin == FI_BOTTOM && direction == FI_IN ) |
|
122 |
{ |
|
123 |
topi = h + y; |
|
124 |
} |
|
125 |
else if ( origin == FI_BOTTOM && direction == FI_OUT ) |
|
126 |
{ |
|
127 |
topi = top; |
|
128 |
top = h + y; |
|
129 |
} |
|
130 |
||
131 |
var abs_dir = ( ( origin == FI_TOP && direction == FI_IN ) || ( origin == FI_BOTTOM && direction == FI_OUT ) ) ? FI_DOWN : FI_UP; |
|
132 |
||
39
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
133 |
var diff_top = top - topi; |
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
134 |
var diff_left = left - lefti; |
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
135 |
|
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
136 |
var frames = 100; |
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
137 |
var timeout = 0; |
1125
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
parents:
420
diff
changeset
|
138 |
var timerstep = 8 * FI_MULTIPLIER; |
39
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
139 |
|
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
140 |
// cache element so it can be changed from within setTimeout() |
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
141 |
var rand_seed = Math.floor(Math.random() * 1000000); |
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
142 |
fly_in_cache[rand_seed] = element; |
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
143 |
|
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
144 |
for ( var i = 0; i < frames; i++ ) |
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
145 |
{ |
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
146 |
topc = GlideEffect.easeInOut(i, topi, diff_top, frames); |
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
147 |
leftc = GlideEffect.easeInOut(i, lefti, diff_left, frames); |
1125
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
parents:
420
diff
changeset
|
148 |
|
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
parents:
420
diff
changeset
|
149 |
var code = 'var element = fly_in_cache[' + rand_seed + '];' + "\n"; |
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
parents:
420
diff
changeset
|
150 |
code += 'for ( var i = 0; i < element.length; i++ )' + "\n"; |
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
parents:
420
diff
changeset
|
151 |
code += '{' + "\n"; |
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
parents:
420
diff
changeset
|
152 |
code += ' element[i].style.top = "' + topc + 'px";' + "\n"; |
74
68469a95658d
Various bugfixes and cleanups, too much to remember... see the diffs for what got changed :-)
Dan
parents:
39
diff
changeset
|
153 |
if ( !height_taken_care_of ) |
1125
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
parents:
420
diff
changeset
|
154 |
code += ' element[i].style.left = "' + leftc + 'px";' + "\n"; |
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
parents:
420
diff
changeset
|
155 |
code += '}'; |
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
parents:
420
diff
changeset
|
156 |
|
74
68469a95658d
Various bugfixes and cleanups, too much to remember... see the diffs for what got changed :-)
Dan
parents:
39
diff
changeset
|
157 |
setTimeout(code, timeout); |
1125
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
parents:
420
diff
changeset
|
158 |
|
39
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
159 |
timeout += timerstep; |
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
160 |
|
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
161 |
var ratio = i / frames; |
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
162 |
|
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
163 |
if ( !nofade ) |
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
164 |
{ |
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
165 |
// handle fade |
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
166 |
var opac_factor = ratio * 100; |
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
167 |
if ( direction == FI_OUT ) |
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
168 |
opac_factor = 100 - opac_factor; |
1125
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
parents:
420
diff
changeset
|
169 |
|
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
parents:
420
diff
changeset
|
170 |
var code = 'var element = fly_in_cache[' + rand_seed + '];' + "\n"; |
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
parents:
420
diff
changeset
|
171 |
code += 'for ( var i = 0; i < element.length; i++ )' + "\n"; |
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
parents:
420
diff
changeset
|
172 |
code += '{' + "\n"; |
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
parents:
420
diff
changeset
|
173 |
code += ' domObjChangeOpac(' + opac_factor + ', element[i]);' + "\n"; |
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
parents:
420
diff
changeset
|
174 |
code += '}'; |
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
parents:
420
diff
changeset
|
175 |
|
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
parents:
420
diff
changeset
|
176 |
setTimeout(code, timeout); |
39
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
177 |
} |
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
178 |
|
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
179 |
} |
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
180 |
|
81
d7fc25acd3f3
Replaced the menu in the admin theme with something much more visually pleasureable; minor fix in Special:UploadFile; finished patching a couple of XSS problems from Banshee; finished Admin:PageGroups; removed unneeded code in flyin.js; finished tag system (except tag cloud); 1.0.1 release candidate
Dan
parents:
74
diff
changeset
|
181 |
// old framestepper code removed from here in Loch Ness |
1 | 182 |
|
39
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
183 |
timeout += timerstep; |
c83ff194977a
Changed animation on flying message boxes; bugfix for "Array" response in theme changer; added diff CSS to enano-shared; allowed spaces in username during install
Dan
parents:
1
diff
changeset
|
184 |
return timeout; |
1 | 185 |
} |
186 |
||
187 |
function abs(i) |
|
188 |
{ |
|
189 |
if ( isNaN(i) ) |
|
190 |
return i; |
|
191 |
return ( i < 0 ) ? ( 0 - i ) : i; |
|
192 |
} |
|
193 |