author | Dan |
Sun, 21 Oct 2007 01:45:00 -0400 | |
changeset 188 | 63fddf1335d9 |
parent 174 | d74ff822acc9 |
permissions | -rw-r--r-- |
1 | 1 |
/* |
2 |
* Enano - an open source wiki-like CMS |
|
3 |
* Copyright (C) 2006-2007 Dan Fuhry |
|
4 |
* Javascript client library |
|
5 |
* |
|
6 |
* This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. |
|
8 |
* |
|
9 |
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied |
|
10 |
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. |
|
11 |
* |
|
86
c162ca39db8f
Finished pagination code (was incomplete in previous revision) and added a few hacks for an upcoming theme
Dan
parents:
85
diff
changeset
|
12 |
* For more information about Enano, please visit http://enanocms.org/. |
1 | 13 |
* All of the code in these script files may be used freely so long as the above license block is displayed and your |
14 |
* modified code is distributed under the GPL. See the page Special:About_Enano on this website for more information. |
|
15 |
*/ |
|
16 |
||
17 |
if(typeof title != 'string') |
|
18 |
{ |
|
19 |
alert('Uh-oh! The required dynamic (PHP-generated) Javascript variables don\'t seem to be available. Javascript is going to be seriously broken.'); |
|
20 |
} |
|
21 |
||
22 |
// Run-time variables |
|
23 |
||
24 |
var detect = navigator.userAgent.toLowerCase(); |
|
25 |
var IE; |
|
21
663fcf528726
Updated all version numbers back to Banshee; a few preliminary steps towards full UTF-8 support in page URLs
Dan
parents:
1
diff
changeset
|
26 |
var is_Safari; |
1 | 27 |
|
28 |
// Detect whether the user is running the Evil One or not... |
|
29 |
||
30 |
function checkIt(string) { |
|
31 |
place = detect.indexOf(string) + 1; |
|
32 |
thestring = string; |
|
33 |
return place; |
|
34 |
} |
|
35 |
if (checkIt('msie')) IE = true; |
|
36 |
else IE = false; |
|
37 |
||
117
7cfdbb2fd17a
Bugfix in Special:AllPages; fixed tinyMCE under Opera (finally!)
Dan
parents:
86
diff
changeset
|
38 |
var is_Opera = ( checkIt('opera') ) ? true : false; |
7cfdbb2fd17a
Bugfix in Special:AllPages; fixed tinyMCE under Opera (finally!)
Dan
parents:
86
diff
changeset
|
39 |
|
57
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
parents:
40
diff
changeset
|
40 |
var KILL_SWITCH = false; |
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
parents:
40
diff
changeset
|
41 |
|
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
parents:
40
diff
changeset
|
42 |
if ( IE ) |
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
parents:
40
diff
changeset
|
43 |
{ |
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
parents:
40
diff
changeset
|
44 |
var version = window.navigator.appVersion; |
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
parents:
40
diff
changeset
|
45 |
version = version.substr( ( version.indexOf('MSIE') + 5 ) ); |
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
parents:
40
diff
changeset
|
46 |
var rawversion = ''; |
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
parents:
40
diff
changeset
|
47 |
for ( var i = 0; i < version.length; i++ ) |
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
parents:
40
diff
changeset
|
48 |
{ |
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
parents:
40
diff
changeset
|
49 |
var chr = version.substr(i, 1); |
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
parents:
40
diff
changeset
|
50 |
if ( !chr.match(/[0-9\.]/) ) |
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
parents:
40
diff
changeset
|
51 |
{ |
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
parents:
40
diff
changeset
|
52 |
break; |
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
parents:
40
diff
changeset
|
53 |
} |
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
parents:
40
diff
changeset
|
54 |
rawversion += chr; |
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
parents:
40
diff
changeset
|
55 |
} |
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
parents:
40
diff
changeset
|
56 |
rawversion = parseInt(rawversion); |
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
parents:
40
diff
changeset
|
57 |
if ( rawversion < 6 ) |
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
parents:
40
diff
changeset
|
58 |
{ |
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
parents:
40
diff
changeset
|
59 |
KILL_SWITCH = true; |
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
parents:
40
diff
changeset
|
60 |
} |
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
parents:
40
diff
changeset
|
61 |
} |
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
parents:
40
diff
changeset
|
62 |
|
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
parents:
40
diff
changeset
|
63 |
// dummy tinyMCE object |
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
parents:
40
diff
changeset
|
64 |
var tinyMCE = new Object(); |
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
parents:
40
diff
changeset
|
65 |
|
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
parents:
40
diff
changeset
|
66 |
// Obsolete JSON kill switch |
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
parents:
40
diff
changeset
|
67 |
function disableJSONExts() { }; |
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
parents:
40
diff
changeset
|
68 |
|
21
663fcf528726
Updated all version numbers back to Banshee; a few preliminary steps towards full UTF-8 support in page URLs
Dan
parents:
1
diff
changeset
|
69 |
is_Safari = checkIt('safari') ? true : false; |
663fcf528726
Updated all version numbers back to Banshee; a few preliminary steps towards full UTF-8 support in page URLs
Dan
parents:
1
diff
changeset
|
70 |
|
1 | 71 |
var cmt_open; |
72 |
var list; |
|
73 |
var edit_open = false; |
|
74 |
var catlist = new Array(); |
|
75 |
var arrDiff1Buttons = new Array(); |
|
76 |
var arrDiff2Buttons = new Array(); |
|
77 |
var arrTimeIdList = new Array(); |
|
78 |
var list; |
|
79 |
var unObj; |
|
80 |
var unSelectMenuOn = false; |
|
81 |
var unObjDivCurrentId = false; |
|
82 |
var unObjCurrentSelection = false; |
|
83 |
var userlist = new Array(); |
|
84 |
var submitAuthorized = true; |
|
85 |
var rDnsObj; |
|
86 |
var rDnsBannerObj; |
|
87 |
var ns4 = document.layers; |
|
88 |
var op5 = (navigator.userAgent.indexOf("Opera 5")!=-1) ||(navigator.userAgent.indexOf("Opera/5")!=-1); |
|
89 |
var op6 = (navigator.userAgent.indexOf("Opera 6")!=-1) ||(navigator.userAgent.indexOf("Opera/6")!=-1); |
|
90 |
var agt=navigator.userAgent.toLowerCase(); |
|
91 |
var mac = (agt.indexOf("mac")!=-1); |
|
92 |
var ie = (agt.indexOf("msie") != -1); |
|
93 |
var mac_ie = mac && ie; |
|
94 |
var mouseX = 0; |
|
95 |
var mouseY = 0; |
|
96 |
var menuheight; |
|
97 |
var inertiabase = 1; |
|
98 |
var inertiainc = 1; |
|
99 |
var slideintervalinc = 20; |
|
100 |
var inertiabaseoriginal = inertiabase; |
|
101 |
var heightnow; |
|
102 |
var targetheight; |
|
103 |
var block; |
|
104 |
var slideinterval; |
|
105 |
var divheights = new Array(); |
|
106 |
var __menutimeout = false; |
|
107 |
var startmouseX = false; |
|
108 |
var startmouseY = false; |
|
109 |
var startScroll = false; |
|
110 |
var is_dragging = false; |
|
111 |
var current_ta = false; |
|
112 |
var startwidth = false; |
|
113 |
var startheight = false; |
|
114 |
var do_width = false; |
|
188
63fddf1335d9
Nothing real special. The AJAX loading icon can be changed using the Javascript variable ajax_load_icon in header.tpl.
Dan
parents:
174
diff
changeset
|
115 |
var ajax_load_icon = scriptPath + '/images/loading.gif'; |
1 | 116 |
|
117 |
// You have an NSIS coder in your midst... |
|
118 |
var MB_OK = 1; |
|
119 |
var MB_OKCANCEL = 2; |
|
120 |
var MB_YESNO = 4; |
|
121 |
var MB_YESNOCANCEL = 8; |
|
122 |
var MB_ABORTRETRYIGNORE = 16; |
|
123 |
var MB_ICONINFORMATION = 32; |
|
124 |
var MB_ICONEXCLAMATION = 64; |
|
125 |
var MB_ICONSTOP = 128; |
|
126 |
var MB_ICONQUESTION = 256; |
|
127 |
var MB_ICONLOCK = 512; |
|
128 |
||
129 |
// Syntax: |
|
130 |
// messagebox(MB_OK|MB_ICONINFORMATION, 'Title', 'Text'); |
|
131 |
// :-D |
|
132 |
||
133 |
var main_css = document.getElementById('mdgCss').href; |
|
134 |
if(main_css.indexOf('?') > -1) { |
|
135 |
sep = '&'; |
|
136 |
} else sep = '?'; |
|
137 |
var _css = false; |
|
138 |
var print_css = main_css + sep + 'printable'; |
|
139 |
||
140 |
var shift; |
|
141 |
||
142 |
function makeUrl(page, query, html_friendly) |
|
143 |
{ |
|
144 |
url = contentPath+page; |
|
145 |
if(url.indexOf('?') > 0) sep = '&'; |
|
146 |
else sep = '?'; |
|
147 |
if(query) |
|
148 |
{ |
|
149 |
url = url + sep + query; |
|
150 |
} |
|
151 |
if(html_friendly) |
|
152 |
{ |
|
153 |
url = url.replace('&', '&'); |
|
154 |
url = url.replace('<', '<'); |
|
155 |
url = url.replace('>', '>'); |
|
156 |
} |
|
157 |
return url; |
|
158 |
} |
|
159 |
||
160 |
function makeUrlNS(namespace, page, query, html_friendly) |
|
161 |
{ |
|
162 |
var url = contentPath+namespace_list[namespace]+(page.replace(/ /g, '_')); |
|
163 |
if(url.indexOf('?') > 0) sep = '&'; |
|
164 |
else sep = '?'; |
|
165 |
if(query) |
|
166 |
{ |
|
167 |
url = url + sep + query; |
|
168 |
} |
|
169 |
if(html_friendly) |
|
170 |
{ |
|
171 |
url = url.replace('&', '&'); |
|
172 |
url = url.replace('<', '<'); |
|
173 |
url = url.replace('>', '>'); |
|
174 |
} |
|
175 |
return append_sid(url); |
|
176 |
} |
|
177 |
||
178 |
function strToPageID(string) |
|
179 |
{ |
|
180 |
// Convert Special:UploadFile to ['UploadFile', 'Special'], but convert 'Image:Enano.png' to ['Enano.png', 'File'] |
|
181 |
for(var i in namespace_list) |
|
182 |
if(namespace_list[i] != '') |
|
183 |
if(namespace_list[i] == string.substr(0, namespace_list[i].length)) |
|
184 |
return [string.substr(namespace_list[i].length), i]; |
|
185 |
return [string, 'Article']; |
|
186 |
} |
|
187 |
||
188 |
function append_sid(url) |
|
189 |
{ |
|
190 |
sep = ( url.indexOf('?') > 0 ) ? '&' : '?'; |
|
191 |
if(ENANO_SID.length > 10) |
|
192 |
{ |
|
193 |
url = url + sep + 'auth=' + ENANO_SID; |
|
194 |
sep = '&'; |
|
195 |
} |
|
196 |
if ( pagepass.length > 0 ) |
|
197 |
{ |
|
198 |
url = url + sep + 'pagepass=' + pagepass; |
|
199 |
} |
|
200 |
return url; |
|
201 |
} |
|
202 |
||
203 |
var stdAjaxPrefix = append_sid(scriptPath+'/ajax.php?title='+title); |
|
204 |
||
205 |
var $_REQUEST = new Object(); |
|
206 |
if ( window.location.hash ) |
|
207 |
{ |
|
208 |
var hash = String(window.location.hash); |
|
209 |
hash = hash.substr(1); |
|
210 |
var reqobj = hash.split(';'); |
|
211 |
var a, b; |
|
212 |
for ( var i = 0; i < reqobj.length; i++ ) |
|
213 |
{ |
|
214 |
a = reqobj[i].substr(0, reqobj[i].indexOf(':')); |
|
215 |
b = reqobj[i].substr( ( reqobj[i].indexOf(':') + 1 ) ); |
|
216 |
$_REQUEST[a] = b; |
|
217 |
} |
|
218 |
} |
|
219 |
||
117
7cfdbb2fd17a
Bugfix in Special:AllPages; fixed tinyMCE under Opera (finally!)
Dan
parents:
86
diff
changeset
|
220 |
var onload_hooks = new Array(); |
7cfdbb2fd17a
Bugfix in Special:AllPages; fixed tinyMCE under Opera (finally!)
Dan
parents:
86
diff
changeset
|
221 |
|
7cfdbb2fd17a
Bugfix in Special:AllPages; fixed tinyMCE under Opera (finally!)
Dan
parents:
86
diff
changeset
|
222 |
function addOnloadHook(func) |
7cfdbb2fd17a
Bugfix in Special:AllPages; fixed tinyMCE under Opera (finally!)
Dan
parents:
86
diff
changeset
|
223 |
{ |
7cfdbb2fd17a
Bugfix in Special:AllPages; fixed tinyMCE under Opera (finally!)
Dan
parents:
86
diff
changeset
|
224 |
if ( typeof ( func ) == 'function' ) |
7cfdbb2fd17a
Bugfix in Special:AllPages; fixed tinyMCE under Opera (finally!)
Dan
parents:
86
diff
changeset
|
225 |
{ |
7cfdbb2fd17a
Bugfix in Special:AllPages; fixed tinyMCE under Opera (finally!)
Dan
parents:
86
diff
changeset
|
226 |
if ( typeof(onload_hooks.push) == 'function' ) |
7cfdbb2fd17a
Bugfix in Special:AllPages; fixed tinyMCE under Opera (finally!)
Dan
parents:
86
diff
changeset
|
227 |
{ |
7cfdbb2fd17a
Bugfix in Special:AllPages; fixed tinyMCE under Opera (finally!)
Dan
parents:
86
diff
changeset
|
228 |
onload_hooks.push(func); |
7cfdbb2fd17a
Bugfix in Special:AllPages; fixed tinyMCE under Opera (finally!)
Dan
parents:
86
diff
changeset
|
229 |
} |
7cfdbb2fd17a
Bugfix in Special:AllPages; fixed tinyMCE under Opera (finally!)
Dan
parents:
86
diff
changeset
|
230 |
else |
7cfdbb2fd17a
Bugfix in Special:AllPages; fixed tinyMCE under Opera (finally!)
Dan
parents:
86
diff
changeset
|
231 |
{ |
7cfdbb2fd17a
Bugfix in Special:AllPages; fixed tinyMCE under Opera (finally!)
Dan
parents:
86
diff
changeset
|
232 |
onload_hooks[onload_hooks.length] = func; |
7cfdbb2fd17a
Bugfix in Special:AllPages; fixed tinyMCE under Opera (finally!)
Dan
parents:
86
diff
changeset
|
233 |
} |
7cfdbb2fd17a
Bugfix in Special:AllPages; fixed tinyMCE under Opera (finally!)
Dan
parents:
86
diff
changeset
|
234 |
} |
7cfdbb2fd17a
Bugfix in Special:AllPages; fixed tinyMCE under Opera (finally!)
Dan
parents:
86
diff
changeset
|
235 |
} |
7cfdbb2fd17a
Bugfix in Special:AllPages; fixed tinyMCE under Opera (finally!)
Dan
parents:
86
diff
changeset
|
236 |
|
7cfdbb2fd17a
Bugfix in Special:AllPages; fixed tinyMCE under Opera (finally!)
Dan
parents:
86
diff
changeset
|
237 |
function runOnloadHooks(e) |
7cfdbb2fd17a
Bugfix in Special:AllPages; fixed tinyMCE under Opera (finally!)
Dan
parents:
86
diff
changeset
|
238 |
{ |
7cfdbb2fd17a
Bugfix in Special:AllPages; fixed tinyMCE under Opera (finally!)
Dan
parents:
86
diff
changeset
|
239 |
var _errorTrapper = 0; |
7cfdbb2fd17a
Bugfix in Special:AllPages; fixed tinyMCE under Opera (finally!)
Dan
parents:
86
diff
changeset
|
240 |
for ( var _oLc = 0; _oLc < onload_hooks.length; _oLc++ ) |
7cfdbb2fd17a
Bugfix in Special:AllPages; fixed tinyMCE under Opera (finally!)
Dan
parents:
86
diff
changeset
|
241 |
{ |
7cfdbb2fd17a
Bugfix in Special:AllPages; fixed tinyMCE under Opera (finally!)
Dan
parents:
86
diff
changeset
|
242 |
_errorTrapper++; |
7cfdbb2fd17a
Bugfix in Special:AllPages; fixed tinyMCE under Opera (finally!)
Dan
parents:
86
diff
changeset
|
243 |
if ( _errorTrapper >= 1000 ) |
7cfdbb2fd17a
Bugfix in Special:AllPages; fixed tinyMCE under Opera (finally!)
Dan
parents:
86
diff
changeset
|
244 |
break; |
7cfdbb2fd17a
Bugfix in Special:AllPages; fixed tinyMCE under Opera (finally!)
Dan
parents:
86
diff
changeset
|
245 |
var _f = onload_hooks[_oLc]; |
7cfdbb2fd17a
Bugfix in Special:AllPages; fixed tinyMCE under Opera (finally!)
Dan
parents:
86
diff
changeset
|
246 |
if ( typeof(_f) == 'function' ) |
7cfdbb2fd17a
Bugfix in Special:AllPages; fixed tinyMCE under Opera (finally!)
Dan
parents:
86
diff
changeset
|
247 |
{ |
7cfdbb2fd17a
Bugfix in Special:AllPages; fixed tinyMCE under Opera (finally!)
Dan
parents:
86
diff
changeset
|
248 |
_f(e); |
7cfdbb2fd17a
Bugfix in Special:AllPages; fixed tinyMCE under Opera (finally!)
Dan
parents:
86
diff
changeset
|
249 |
} |
7cfdbb2fd17a
Bugfix in Special:AllPages; fixed tinyMCE under Opera (finally!)
Dan
parents:
86
diff
changeset
|
250 |
} |
7cfdbb2fd17a
Bugfix in Special:AllPages; fixed tinyMCE under Opera (finally!)
Dan
parents:
86
diff
changeset
|
251 |
} |
7cfdbb2fd17a
Bugfix in Special:AllPages; fixed tinyMCE under Opera (finally!)
Dan
parents:
86
diff
changeset
|
252 |
|
1 | 253 |
var head = document.getElementsByTagName('head')[0]; |
57
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
parents:
40
diff
changeset
|
254 |
if ( !KILL_SWITCH ) |
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
parents:
40
diff
changeset
|
255 |
{ |
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
parents:
40
diff
changeset
|
256 |
var script = document.createElement('script'); |
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
parents:
40
diff
changeset
|
257 |
script.type="text/javascript"; |
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
parents:
40
diff
changeset
|
258 |
script.src=scriptPath+"/includes/clientside/tinymce/tiny_mce_src.js"; |
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
parents:
40
diff
changeset
|
259 |
head.appendChild(script); |
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
parents:
40
diff
changeset
|
260 |
} |
1 | 261 |
|
262 |
// Start loading files |
|
263 |
var thefiles = [ |
|
264 |
'misc.js', |
|
265 |
'admin-menu.js', |
|
266 |
'ajax.js', |
|
267 |
'autocomplete.js', |
|
174
d74ff822acc9
Replaced autocompleting username with a much more efficient algorithm and caching system
Dan
parents:
170
diff
changeset
|
268 |
'autofill.js', |
1 | 269 |
'base64.js', |
270 |
'dropdown.js', |
|
271 |
'faders.js', |
|
272 |
'fat.js', |
|
273 |
'grippy.js', |
|
274 |
'json.js', |
|
275 |
'md5.js', |
|
276 |
'sliders.js', |
|
277 |
'toolbar.js', |
|
278 |
'windows.js', |
|
279 |
'rijndael.js', |
|
280 |
'template-compiler.js', |
|
281 |
'acl.js', |
|
282 |
'comments.js', |
|
283 |
'editor.js', |
|
284 |
'dynano.js', |
|
285 |
'flyin.js', |
|
85
7c68a18a27be
AJAX comments are now paginated; plugin manager can now show system plugins; typo in installer corrected; links in oxygen/stpatty/admin footers changed to "About Enano" page; 1.0.1 release candidate
Dan
parents:
59
diff
changeset
|
286 |
'paginate.js', |
133
af0f6ec48de3
Fully implemented password complexity enforcement; added encryption for passwords on registration form; some baby steps taken towards supporting international usernames - this is not working very well, we might need a hackish fix; TODO: implement password strength meter into installer UI and get international usernames 100% working
Dan
parents:
117
diff
changeset
|
287 |
'pwstrength.js', |
170
4c5c2b66a34d
SECURITY: remove debug message in session manager; implemented alternate MediaWiki syntax for template embedding; added Adobe Spry for "shake" effect on unsuccessful login
Dan
parents:
133
diff
changeset
|
288 |
'SpryEffects.js', |
1 | 289 |
'loader.js' |
290 |
]; |
|
291 |
||
292 |
var problem_scripts = { |
|
57
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
parents:
40
diff
changeset
|
293 |
'json.js' : true, |
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
parents:
40
diff
changeset
|
294 |
'template-compiler.js' : true |
1 | 295 |
}; |
296 |
||
297 |
for(var f in thefiles) |
|
298 |
{ |
|
299 |
if ( typeof(thefiles[f]) != 'string' ) |
|
300 |
continue; |
|
301 |
var script = document.createElement('script'); |
|
302 |
script.type="text/javascript"; |
|
57
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
parents:
40
diff
changeset
|
303 |
if ( problem_scripts[thefiles[f]] && KILL_SWITCH ) |
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
parents:
40
diff
changeset
|
304 |
{ |
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
parents:
40
diff
changeset
|
305 |
// alert('kill switch and problem script'); |
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
parents:
40
diff
changeset
|
306 |
continue; |
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
parents:
40
diff
changeset
|
307 |
} |
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
parents:
40
diff
changeset
|
308 |
script.src=scriptPath+"/includes/clientside/static/"+thefiles[f]; |
1 | 309 |
head.appendChild(script); |
310 |
} |
|
311 |
||
312 |
addOnloadHook(function() { |
|
313 |
if ( $_REQUEST['do'] ) |
|
314 |
{ |
|
315 |
var act = $_REQUEST['do']; |
|
316 |
switch(act) |
|
317 |
{ |
|
318 |
case 'comments': |
|
319 |
ajaxComments(); |
|
320 |
break; |
|
321 |
case 'edit': |
|
322 |
ajaxEditor(); |
|
323 |
break; |
|
324 |
case 'login': |
|
325 |
ajaxStartLogin(); |
|
326 |
break; |
|
327 |
case 'history': |
|
328 |
ajaxHistory(); |
|
329 |
break; |
|
330 |
case 'catedit': |
|
331 |
ajaxCatEdit(); |
|
332 |
break; |
|
333 |
} |
|
334 |
} |
|
335 |
}); |
|
336 |
||
337 |
||
338 |
//*/ |