582
+ − 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
*
+ − 12
* For more information about Enano, please visit http://enanocms.org/.
+ − 13
* Unless otherwise noted, all of the code in these script files may be used freely so long as the above license block
+ − 14
* is displayed and your modified code is distributed in compliance with the GPL. See the special page "About Enano" on
+ − 15
* this website for more information.
+ − 16
*/
+ − 17
586
234ddd896555
Made encryption work in form-based logon again; modified load_component() to fetch compressed versions when possible
Dan
diff
changeset
+ − 18
if ( typeof(title) != 'string')
582
+ − 19
{
+ − 20
alert('There was a problem loading the PHP-generated Javascript variables that control parameters for AJAX applets. Most on-page functionality will be very badly broken.\n\nTheme developers, ensure that you are using {JS_DYNAMIC_VARS} *before* you include jsres.php.');
+ − 21
}
+ − 22
588
+ − 23
// placeholder for window.console - used if firebug isn't present
+ − 24
// http://getfirebug.com/firebug/firebugx.js
+ − 25
if (!window.console || !console.firebug)
+ − 26
{
+ − 27
var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml",
+ − 28
"group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
+ − 29
+ − 30
window.console = {};
+ − 31
for (var i = 0; i < names.length; ++i)
+ − 32
window.console[names[i]] = function() {}
+ − 33
}
+ − 34
+ − 35
console.info('Enano::JS runtime: starting system init');
+ − 36
586
234ddd896555
Made encryption work in form-based logon again; modified load_component() to fetch compressed versions when possible
Dan
diff
changeset
+ − 37
if ( typeof(ENANO_JSRES_COMPRESSED) == undefined )
234ddd896555
Made encryption work in form-based logon again; modified load_component() to fetch compressed versions when possible
Dan
diff
changeset
+ − 38
{
234ddd896555
Made encryption work in form-based logon again; modified load_component() to fetch compressed versions when possible
Dan
diff
changeset
+ − 39
var ENANO_JSRES_COMPRESSED = false;
234ddd896555
Made encryption work in form-based logon again; modified load_component() to fetch compressed versions when possible
Dan
diff
changeset
+ − 40
}
234ddd896555
Made encryption work in form-based logon again; modified load_component() to fetch compressed versions when possible
Dan
diff
changeset
+ − 41
582
+ − 42
// Run-time variables
+ − 43
+ − 44
var detect = navigator.userAgent.toLowerCase();
+ − 45
var IE;
+ − 46
var is_Safari;
+ − 47
+ − 48
// Detect whether the user is running the Evil One or not...
+ − 49
+ − 50
function checkIt(string) {
+ − 51
place = detect.indexOf(string) + 1;
+ − 52
thestring = string;
+ − 53
return place;
+ − 54
}
+ − 55
if (checkIt('msie')) IE = true;
+ − 56
else IE = false;
+ − 57
+ − 58
var is_Opera = ( checkIt('opera') ) ? true : false;
+ − 59
var is_iPhone = ( checkIt('iphone') || checkIt('ipod') ) ? true : false;
+ − 60
var is_firefox2 = ( checkIt('firefox/2.') ) ? true : false;
+ − 61
+ − 62
var KILL_SWITCH = false;
+ − 63
+ − 64
if ( IE )
+ − 65
{
+ − 66
var version = window.navigator.appVersion;
+ − 67
version = version.substr( ( version.indexOf('MSIE') + 5 ) );
+ − 68
var rawversion = '';
+ − 69
for ( var i = 0; i < version.length; i++ )
+ − 70
{
+ − 71
var chr = version.substr(i, 1);
+ − 72
if ( !chr.match(/[0-9\.]/) )
+ − 73
{
+ − 74
break;
+ − 75
}
+ − 76
rawversion += chr;
+ − 77
}
+ − 78
rawversion = parseInt(rawversion);
+ − 79
if ( rawversion < 6 )
+ − 80
{
+ − 81
KILL_SWITCH = true;
+ − 82
}
+ − 83
}
+ − 84
588
+ − 85
var tinymce_initted = false;
582
+ − 86
+ − 87
if ( typeof(DISABLE_MCE) == undefined )
+ − 88
{
+ − 89
var DISABLE_MCE = false;
+ − 90
}
+ − 91
+ − 92
is_Safari = checkIt('safari') ? true : false;
+ − 93
+ − 94
var cmt_open;
+ − 95
var editor_open = false;
+ − 96
var list;
+ − 97
var edit_open = false;
+ − 98
var catlist = new Array();
+ − 99
var arrDiff1Buttons = new Array();
+ − 100
var arrDiff2Buttons = new Array();
+ − 101
var arrTimeIdList = new Array();
+ − 102
var list;
+ − 103
var unObj;
+ − 104
var unSelectMenuOn = false;
+ − 105
var unObjDivCurrentId = false;
+ − 106
var unObjCurrentSelection = false;
+ − 107
var userlist = new Array();
+ − 108
var submitAuthorized = true;
+ − 109
var timelist = [];
+ − 110
var rDnsObj;
+ − 111
var rDnsBannerObj;
+ − 112
var ns4 = document.layers;
+ − 113
var op5 = (navigator.userAgent.indexOf("Opera 5")!=-1) ||(navigator.userAgent.indexOf("Opera/5")!=-1);
+ − 114
var op6 = (navigator.userAgent.indexOf("Opera 6")!=-1) ||(navigator.userAgent.indexOf("Opera/6")!=-1);
+ − 115
var agt=navigator.userAgent.toLowerCase();
+ − 116
var mac = (agt.indexOf("mac")!=-1);
+ − 117
var ie = (agt.indexOf("msie") != -1);
+ − 118
var mac_ie = mac && ie;
+ − 119
var mouseX = 0;
+ − 120
var mouseY = 0;
+ − 121
var menuheight;
+ − 122
var inertiabase = 1;
+ − 123
var inertiainc = 1;
+ − 124
var slideintervalinc = 20;
+ − 125
var inertiabaseoriginal = inertiabase;
+ − 126
var heightnow;
+ − 127
var targetheight;
+ − 128
var block;
+ − 129
var slideinterval;
+ − 130
var divheights = new Array();
+ − 131
var __menutimeout = false;
+ − 132
var startmouseX = false;
+ − 133
var startmouseY = false;
+ − 134
var startScroll = false;
+ − 135
var is_dragging = false;
+ − 136
var current_ta = false;
+ − 137
var startwidth = false;
+ − 138
var startheight = false;
+ − 139
var do_width = false;
650
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 140
var ajax_load_icon = cdnPath + '/images/loading.gif';
582
+ − 141
var editor_use_modal_window = false;
+ − 142
+ − 143
// You have an NSIS coder in your midst...
+ − 144
var MB_OK = 1;
+ − 145
var MB_OKCANCEL = 2;
+ − 146
var MB_YESNO = 4;
+ − 147
var MB_YESNOCANCEL = 8;
+ − 148
var MB_ABORTRETRYIGNORE = 16;
+ − 149
var MB_ICONINFORMATION = 32;
+ − 150
var MB_ICONEXCLAMATION = 64;
+ − 151
var MB_ICONSTOP = 128;
+ − 152
var MB_ICONQUESTION = 256;
+ − 153
var MB_ICONLOCK = 512;
+ − 154
+ − 155
// Can be set to true by slow themes (St. Patty)
+ − 156
if ( typeof(pref_disable_js_fx) != 'boolean' )
+ − 157
{
+ − 158
var pref_disable_js_fx = false;
+ − 159
}
+ − 160
var aclDisableTransitionFX = ( is_firefox2 || pref_disable_js_fx ) ? true : false;
+ − 161
+ − 162
// Syntax:
+ − 163
// messagebox(MB_OK|MB_ICONINFORMATION, 'Title', 'Text');
+ − 164
// :-D
+ − 165
+ − 166
var $_REQUEST = new Object();
+ − 167
if ( window.location.hash )
+ − 168
{
+ − 169
var hash = String(window.location.hash);
+ − 170
hash = hash.substr(1);
+ − 171
var reqobj = hash.split(';');
+ − 172
var a, b;
+ − 173
for ( var i = 0; i < reqobj.length; i++ )
+ − 174
{
+ − 175
a = reqobj[i].substr(0, reqobj[i].indexOf(':'));
+ − 176
b = reqobj[i].substr( ( reqobj[i].indexOf(':') + 1 ) );
+ − 177
$_REQUEST[a] = b;
+ − 178
}
+ − 179
}
+ − 180
+ − 181
if ( !onload_hooks )
+ − 182
var onload_hooks = new Array();
+ − 183
+ − 184
function addOnloadHook(func)
+ − 185
{
+ − 186
if ( typeof ( func ) == 'function' )
+ − 187
{
+ − 188
if ( typeof(onload_hooks.push) == 'function' )
+ − 189
{
+ − 190
onload_hooks.push(func);
+ − 191
}
+ − 192
else
+ − 193
{
+ − 194
onload_hooks[onload_hooks.length] = func;
+ − 195
}
+ − 196
}
+ − 197
}
+ − 198
+ − 199
function runOnloadHooks(e)
+ − 200
{
+ − 201
var _errorTrapper = 0;
+ − 202
for ( var _oLc = 0; _oLc < onload_hooks.length; _oLc++ )
+ − 203
{
+ − 204
_errorTrapper++;
+ − 205
if ( _errorTrapper >= 1000 )
+ − 206
break;
+ − 207
var _f = onload_hooks[_oLc];
+ − 208
if ( typeof(_f) == 'function' )
+ − 209
{
+ − 210
_f(e);
+ − 211
}
+ − 212
}
+ − 213
}
+ − 214
840
+ − 215
var enano_hooks = {};
+ − 216
function setHook(hook_name)
+ − 217
{
+ − 218
if ( enano_hooks[hook_name] )
+ − 219
{
+ − 220
return enano_hooks[hook_name];
+ − 221
}
+ − 222
return 'void(0);';
+ − 223
}
+ − 224
+ − 225
function attachHook(hook_name, code)
+ − 226
{
+ − 227
if ( !enano_hooks[hook_name] )
+ − 228
enano_hooks[hook_name] = '';
+ − 229
+ − 230
enano_hooks[hook_name] += code;
+ − 231
}
+ − 232
582
+ − 233
var loaded_components = {};
586
234ddd896555
Made encryption work in form-based logon again; modified load_component() to fetch compressed versions when possible
Dan
diff
changeset
+ − 234
var _load_component_running = false;
582
+ − 235
function load_component(file)
+ − 236
{
779
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 237
var multiple = false;
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 238
if ( typeof(file) == 'object' )
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 239
{
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 240
if ( ENANO_JSRES_COMPRESSED )
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 241
{
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 242
multiple = true;
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 243
for ( var i = 0; i < file.length; i++ )
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 244
{
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 245
file[i] = (file[i].replace(/\.js$/, '')) + '.js';
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 246
if ( loaded_components[file[i]] )
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 247
{
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 248
file[i] = false;
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 249
}
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 250
}
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 251
var file2 = [];
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 252
for ( var i = 0; i < file.length; i++ )
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 253
{
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 254
if ( file[i] )
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 255
file2.push(file[i]);
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 256
}
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 257
file = file2;
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 258
delete(file2);
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 259
if ( file.length < 1 )
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 260
{
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 261
return true;
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 262
}
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 263
var file_flat = implode(',', file);
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 264
}
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 265
else
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 266
{
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 267
for ( var i = 0; i < file.length; i++ )
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 268
{
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 269
load_component(file[i]);
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 270
}
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 271
return true;
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 272
}
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 273
}
586
234ddd896555
Made encryption work in form-based logon again; modified load_component() to fetch compressed versions when possible
Dan
diff
changeset
+ − 274
_load_component_running = true;
779
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 275
if ( !multiple )
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 276
{
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 277
file = file.replace(/\.js$/, '');
582
+ − 278
779
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 279
if ( loaded_components[file + '.js'] )
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 280
{
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 281
// already loaded
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 282
return true;
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 283
}
582
+ − 284
}
+ − 285
779
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 286
console.info('Loading component %s via AJAX', ( multiple ? file_flat : file ));
650
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 287
779
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 288
load_show_win(( multiple ? file_flat : file ));
582
+ − 289
+ − 290
// get an XHR instance
+ − 291
var ajax = ajaxMakeXHR();
+ − 292
779
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 293
if ( !multiple )
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 294
file = file + '.js';
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 295
var uri = ( ENANO_JSRES_COMPRESSED ) ? scriptPath + '/includes/clientside/jsres.php?f=' + (multiple ? file_flat : file ) : scriptPath + '/includes/clientside/static/' + file;
677
2a263b598a2b
Improved miniPrompt and fadefilter to properly overlap parent modal windows. MessageBox() is next. Fixed pref_disable_js_fx not working due to wrong type (number instead of boolean).
Dan
diff
changeset
+ − 296
try
582
+ − 297
{
677
2a263b598a2b
Improved miniPrompt and fadefilter to properly overlap parent modal windows. MessageBox() is next. Fixed pref_disable_js_fx not working due to wrong type (number instead of boolean).
Dan
diff
changeset
+ − 298
ajax.open('GET', uri, false);
2a263b598a2b
Improved miniPrompt and fadefilter to properly overlap parent modal windows. MessageBox() is next. Fixed pref_disable_js_fx not working due to wrong type (number instead of boolean).
Dan
diff
changeset
+ − 299
ajax.onreadystatechange = function()
2a263b598a2b
Improved miniPrompt and fadefilter to properly overlap parent modal windows. MessageBox() is next. Fixed pref_disable_js_fx not working due to wrong type (number instead of boolean).
Dan
diff
changeset
+ − 300
{
2a263b598a2b
Improved miniPrompt and fadefilter to properly overlap parent modal windows. MessageBox() is next. Fixed pref_disable_js_fx not working due to wrong type (number instead of boolean).
Dan
diff
changeset
+ − 301
if ( this.readyState == 4 && this.status != 200 )
2a263b598a2b
Improved miniPrompt and fadefilter to properly overlap parent modal windows. MessageBox() is next. Fixed pref_disable_js_fx not working due to wrong type (number instead of boolean).
Dan
diff
changeset
+ − 302
{
2a263b598a2b
Improved miniPrompt and fadefilter to properly overlap parent modal windows. MessageBox() is next. Fixed pref_disable_js_fx not working due to wrong type (number instead of boolean).
Dan
diff
changeset
+ − 303
alert('There was a problem loading a script from the server. Please check your network connection.');
2a263b598a2b
Improved miniPrompt and fadefilter to properly overlap parent modal windows. MessageBox() is next. Fixed pref_disable_js_fx not working due to wrong type (number instead of boolean).
Dan
diff
changeset
+ − 304
load_hide_win();
2a263b598a2b
Improved miniPrompt and fadefilter to properly overlap parent modal windows. MessageBox() is next. Fixed pref_disable_js_fx not working due to wrong type (number instead of boolean).
Dan
diff
changeset
+ − 305
throw('load_component(): XHR for component ' + file + ' failed');
2a263b598a2b
Improved miniPrompt and fadefilter to properly overlap parent modal windows. MessageBox() is next. Fixed pref_disable_js_fx not working due to wrong type (number instead of boolean).
Dan
diff
changeset
+ − 306
}
2a263b598a2b
Improved miniPrompt and fadefilter to properly overlap parent modal windows. MessageBox() is next. Fixed pref_disable_js_fx not working due to wrong type (number instead of boolean).
Dan
diff
changeset
+ − 307
}
2a263b598a2b
Improved miniPrompt and fadefilter to properly overlap parent modal windows. MessageBox() is next. Fixed pref_disable_js_fx not working due to wrong type (number instead of boolean).
Dan
diff
changeset
+ − 308
ajax.send(null);
2a263b598a2b
Improved miniPrompt and fadefilter to properly overlap parent modal windows. MessageBox() is next. Fixed pref_disable_js_fx not working due to wrong type (number instead of boolean).
Dan
diff
changeset
+ − 309
// async request, so if status != 200 at this point then we're screwed
2a263b598a2b
Improved miniPrompt and fadefilter to properly overlap parent modal windows. MessageBox() is next. Fixed pref_disable_js_fx not working due to wrong type (number instead of boolean).
Dan
diff
changeset
+ − 310
if ( ajax.readyState == 4 && ajax.status == 200 )
2a263b598a2b
Improved miniPrompt and fadefilter to properly overlap parent modal windows. MessageBox() is next. Fixed pref_disable_js_fx not working due to wrong type (number instead of boolean).
Dan
diff
changeset
+ − 311
{
752
+ − 312
if ( onload_complete )
+ − 313
onload_hooks = new Array();
677
2a263b598a2b
Improved miniPrompt and fadefilter to properly overlap parent modal windows. MessageBox() is next. Fixed pref_disable_js_fx not working due to wrong type (number instead of boolean).
Dan
diff
changeset
+ − 314
eval_global(ajax.responseText);
889
7e933a5c860b
Made aclDisableTransitionFX also switch on jQuery.fx.off; made theme switcher work with said jQuery switch
Dan
diff
changeset
+ − 315
if ( window.jQuery && aclDisableTransitionFX )
7e933a5c860b
Made aclDisableTransitionFX also switch on jQuery.fx.off; made theme switcher work with said jQuery switch
Dan
diff
changeset
+ − 316
if ( window.jQuery.fx )
7e933a5c860b
Made aclDisableTransitionFX also switch on jQuery.fx.off; made theme switcher work with said jQuery switch
Dan
diff
changeset
+ − 317
window.jQuery.fx.off = true;
677
2a263b598a2b
Improved miniPrompt and fadefilter to properly overlap parent modal windows. MessageBox() is next. Fixed pref_disable_js_fx not working due to wrong type (number instead of boolean).
Dan
diff
changeset
+ − 318
load_hide_win();
752
+ − 319
if ( onload_complete )
+ − 320
runOnloadHooks();
677
2a263b598a2b
Improved miniPrompt and fadefilter to properly overlap parent modal windows. MessageBox() is next. Fixed pref_disable_js_fx not working due to wrong type (number instead of boolean).
Dan
diff
changeset
+ − 321
}
2a263b598a2b
Improved miniPrompt and fadefilter to properly overlap parent modal windows. MessageBox() is next. Fixed pref_disable_js_fx not working due to wrong type (number instead of boolean).
Dan
diff
changeset
+ − 322
}
2a263b598a2b
Improved miniPrompt and fadefilter to properly overlap parent modal windows. MessageBox() is next. Fixed pref_disable_js_fx not working due to wrong type (number instead of boolean).
Dan
diff
changeset
+ − 323
catch(e)
2a263b598a2b
Improved miniPrompt and fadefilter to properly overlap parent modal windows. MessageBox() is next. Fixed pref_disable_js_fx not working due to wrong type (number instead of boolean).
Dan
diff
changeset
+ − 324
{
2a263b598a2b
Improved miniPrompt and fadefilter to properly overlap parent modal windows. MessageBox() is next. Fixed pref_disable_js_fx not working due to wrong type (number instead of boolean).
Dan
diff
changeset
+ − 325
alert('There was a problem loading a script from the server. Please check your network connection.');
582
+ − 326
load_hide_win();
677
2a263b598a2b
Improved miniPrompt and fadefilter to properly overlap parent modal windows. MessageBox() is next. Fixed pref_disable_js_fx not working due to wrong type (number instead of boolean).
Dan
diff
changeset
+ − 327
console.info("Component loader exception is shown below.");
2a263b598a2b
Improved miniPrompt and fadefilter to properly overlap parent modal windows. MessageBox() is next. Fixed pref_disable_js_fx not working due to wrong type (number instead of boolean).
Dan
diff
changeset
+ − 328
console.debug(e);
2a263b598a2b
Improved miniPrompt and fadefilter to properly overlap parent modal windows. MessageBox() is next. Fixed pref_disable_js_fx not working due to wrong type (number instead of boolean).
Dan
diff
changeset
+ − 329
throw('load_component(): XHR for component ' + file + ' failed');
582
+ − 330
}
+ − 331
779
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 332
if ( !multiple )
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 333
{
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 334
loaded_components[file] = true;
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 335
}
586
234ddd896555
Made encryption work in form-based logon again; modified load_component() to fetch compressed versions when possible
Dan
diff
changeset
+ − 336
_load_component_running = false;
582
+ − 337
return true;
+ − 338
}
+ − 339
+ − 340
function load_show_win(file)
+ − 341
{
650
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 342
var img = '<img style="margin-right: 5px" src="' + cdnPath + '/images/loading.gif" />';
582
+ − 343
if ( document.getElementById('_js_load_component') )
+ − 344
{
+ − 345
document.getElementById('_js_load_component').innerHTML = img + msg_loading_component.replace('%component%', file);
+ − 346
return;
+ − 347
}
779
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 348
file = file.replace(/\.js$/, '').replace(/\.js,/g, ', ');
582
+ − 349
var ld = document.createElement('div');
+ − 350
ld.style.padding = '10px';
+ − 351
ld.style.height = '12px';
+ − 352
ld.style.position = 'fixed';
+ − 353
ld.style.right = '5px';
+ − 354
ld.style.bottom = '0px';
+ − 355
ld.innerHTML = img + msg_loading_component.replace('%component%', file);
+ − 356
ld.id = '_js_load_component';
+ − 357
650
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 358
// FYI: The base64 encoded image is a 70% opacity 1x1px white PNG.
582
+ − 359
ld.style.backgroundImage = 'url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAAA1JREFUCNdj+P///xkACcgDypG+nnEAAAAASUVORK5CYII=)';
+ − 360
+ − 361
document.body.appendChild(ld);
738
+ − 362
document.body.style.cursor = 'wait';
582
+ − 363
}
+ − 364
+ − 365
function load_hide_win()
+ − 366
{
+ − 367
var ld = document.getElementById('_js_load_component');
588
+ − 368
if ( !ld )
+ − 369
return false;
582
+ − 370
ld.parentNode.removeChild(ld);
738
+ − 371
document.body.style.cursor = 'default';
582
+ − 372
}
+ − 373
+ − 374
// evaluate a snippet of code in the global context, used for dynamic component loading
+ − 375
// from: http://dean.edwards.name/weblog/2006/11/sandbox/
+ − 376
function eval_global(_jsString)
+ − 377
{
+ − 378
if (typeof _jsString != "string")
+ − 379
{
+ − 380
return false;
+ − 381
}
+ − 382
+ − 383
// Check whether window.eval executes code in the global scope.
+ − 384
window.eval("var __INCLUDE_TEST_1__ = true;");
+ − 385
if (typeof window.__INCLUDE_TEST_1__ != "undefined")
+ − 386
{
+ − 387
delete window.__INCLUDE_TEST_1__;
+ − 388
window.eval(_jsString);
+ − 389
}
+ − 390
else if (typeof window.execScript != "undefined") // IE only
+ − 391
{
+ − 392
window.execScript(_jsString);
+ − 393
}
+ − 394
else
+ − 395
{
+ − 396
// Test effectiveness of creating a new SCRIPT element and adding it to the document.
+ − 397
this._insertScriptTag = function (_jsCode) {
+ − 398
var _script = document.createElement("script");
+ − 399
_script.type = "text/javascript";
+ − 400
_script.defer = false;
+ − 401
_script.text = _jsCode;
+ − 402
var _headNodeSet = document.getElementsByTagName("head");
+ − 403
if (_headNodeSet.length)
+ − 404
{
+ − 405
_script = _headNodeSet.item(0).appendChild(_script);
+ − 406
}
+ − 407
else
+ − 408
{
+ − 409
var _head = document.createElement("head");
+ − 410
_head = document.documentElement.appendChild(_head);
+ − 411
_script = _head.appendChild(_script);
+ − 412
}
+ − 413
return _script;
+ − 414
}
+ − 415
var _testScript = this._insertScriptTag("var __INCLUDE_TEST_2__ = true;");
+ − 416
if (typeof window.__INCLUDE_TEST_2__ == "boolean")
+ − 417
{
+ − 418
_testScript.parentNode.removeChild(_testScript);
+ − 419
this._insertScriptTag(_jsString);
+ − 420
}
+ − 421
else
+ − 422
{
+ − 423
// Check whether window.setTimeout works in real time.
+ − 424
window.setTimeout("var __INCLUDE_TEST_3__ = true;", 0);
+ − 425
if (typeof window.__INCLUDE_TEST_3__ != "undefined")
+ − 426
{
+ − 427
delete window.__INCLUDE_TEST_3__;
+ − 428
window.setTimeout(_jsString, 0);
+ − 429
}
+ − 430
}
+ − 431
}
+ − 432
+ − 433
return true;
+ − 434
}
+ − 435
650
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 436
var autofill_check = function()
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 437
{
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 438
var inputs = document.getElementsByTagName('input');
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 439
for ( var i = 0; i < inputs.length; i++ )
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 440
{
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 441
if ( inputs[i].className )
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 442
{
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 443
if ( inputs[i].className.match(/^autofill/) )
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 444
{
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 445
load_component('autofill');
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 446
return;
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 447
}
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 448
}
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 449
}
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 450
}
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 451
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 452
addOnloadHook(autofill_check);
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 453
582
+ − 454
var head = document.getElementsByTagName('head')[0];
+ − 455
+ − 456
// safari has window.console but not the .debug() method
+ − 457
if ( is_Safari && !window.console.debug )
+ − 458
{
+ − 459
window.console.debug = function() {};
+ − 460
}
+ − 461
+ − 462
// Do not remove the following comments, they are used by jsres.php.
+ − 463
/*!START_INCLUDER*/
+ − 464
+ − 465
// Start loading files
+ − 466
// The string from the [ to the ] needs to be valid JSON, it's parsed by jsres.php.
+ − 467
var thefiles = [
+ − 468
'dynano.js',
+ − 469
'functions.js',
+ − 470
'dropdown.js',
+ − 471
'json.js',
+ − 472
'sliders.js',
588
+ − 473
'tinymce-init.js',
582
+ − 474
'loader.js'
+ − 475
];
+ − 476
+ − 477
for(var f in thefiles)
+ − 478
{
+ − 479
if ( typeof(thefiles[f]) != 'string' )
+ − 480
continue;
+ − 481
var script = document.createElement('script');
+ − 482
script.type="text/javascript";
586
234ddd896555
Made encryption work in form-based logon again; modified load_component() to fetch compressed versions when possible
Dan
diff
changeset
+ − 483
if ( thefiles[f] == 'json.js' && KILL_SWITCH )
582
+ − 484
{
+ − 485
// alert('kill switch and problem script');
+ − 486
continue;
+ − 487
}
650
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 488
script.src=cdnPath+"/includes/clientside/static/"+thefiles[f];
582
+ − 489
head.appendChild(script);
+ − 490
}
+ − 491
+ − 492
// Do not remove the following comment, it is used by jsres.php.
+ − 493
/*!END_INCLUDER*/
+ − 494
+ − 495
addOnloadHook(function() {
824
28d9fbcd4f0d
Login: reauth: window.location.hash is now updated to include the new SID so that page reloads will use it
Dan
diff
changeset
+ − 496
if ( $_REQUEST['auth'] )
28d9fbcd4f0d
Login: reauth: window.location.hash is now updated to include the new SID so that page reloads will use it
Dan
diff
changeset
+ − 497
{
28d9fbcd4f0d
Login: reauth: window.location.hash is now updated to include the new SID so that page reloads will use it
Dan
diff
changeset
+ − 498
var key = $_REQUEST['auth'];
28d9fbcd4f0d
Login: reauth: window.location.hash is now updated to include the new SID so that page reloads will use it
Dan
diff
changeset
+ − 499
var loc = String(window.location);
28d9fbcd4f0d
Login: reauth: window.location.hash is now updated to include the new SID so that page reloads will use it
Dan
diff
changeset
+ − 500
loc = loc.replace(/#.+$/, '').replace(/&auth=[0-9a-f]+/, '').replace(/\?auth=[0-9a-f]+(&)?/, '$1');
28d9fbcd4f0d
Login: reauth: window.location.hash is now updated to include the new SID so that page reloads will use it
Dan
diff
changeset
+ − 501
if ( key != 'false' )
28d9fbcd4f0d
Login: reauth: window.location.hash is now updated to include the new SID so that page reloads will use it
Dan
diff
changeset
+ − 502
{
28d9fbcd4f0d
Login: reauth: window.location.hash is now updated to include the new SID so that page reloads will use it
Dan
diff
changeset
+ − 503
var sep = loc.indexOf('?') != -1 ? '&' : '?';
28d9fbcd4f0d
Login: reauth: window.location.hash is now updated to include the new SID so that page reloads will use it
Dan
diff
changeset
+ − 504
loc = loc + sep + 'auth=' + key;
28d9fbcd4f0d
Login: reauth: window.location.hash is now updated to include the new SID so that page reloads will use it
Dan
diff
changeset
+ − 505
}
28d9fbcd4f0d
Login: reauth: window.location.hash is now updated to include the new SID so that page reloads will use it
Dan
diff
changeset
+ − 506
console.debug(loc);
28d9fbcd4f0d
Login: reauth: window.location.hash is now updated to include the new SID so that page reloads will use it
Dan
diff
changeset
+ − 507
window.location = loc;
28d9fbcd4f0d
Login: reauth: window.location.hash is now updated to include the new SID so that page reloads will use it
Dan
diff
changeset
+ − 508
}
582
+ − 509
if ( $_REQUEST['do'] )
+ − 510
{
+ − 511
var act = $_REQUEST['do'];
+ − 512
switch(act)
+ − 513
{
+ − 514
case 'comments':
+ − 515
ajaxComments();
+ − 516
break;
+ − 517
case 'edit':
909
94c1ff984286
Finished core of log display interface including filter management. There is still a bit of a to-do list, especially regarding rollbacks and reuploads.
Dan
diff
changeset
+ − 518
var revid = ( $_REQUEST['rev'] ) ? parseInt($_REQUEST['rev']) : false;
94c1ff984286
Finished core of log display interface including filter management. There is still a bit of a to-do list, especially regarding rollbacks and reuploads.
Dan
diff
changeset
+ − 519
ajaxEditor(revid);
582
+ − 520
break;
+ − 521
case 'login':
+ − 522
ajaxStartLogin();
+ − 523
break;
+ − 524
case 'history':
+ − 525
ajaxHistory();
+ − 526
break;
+ − 527
case 'catedit':
+ − 528
ajaxCatEdit();
+ − 529
break;
+ − 530
case 'rename':
+ − 531
ajaxRename();
+ − 532
break;
729
+ − 533
case 'aclmanager':
+ − 534
ajaxOpenACLManager();
+ − 535
break;
582
+ − 536
}
+ − 537
}
+ − 538
});
+ − 539
+ − 540
function Placeholder(funcname, filename)
+ − 541
{
+ − 542
this.filename = filename;
+ − 543
this.funcname = funcname;
+ − 544
this.go = function()
+ − 545
{
+ − 546
window[funcname] = null;
+ − 547
load_component(filename);
+ − 548
var arglist = [];
+ − 549
for ( var i = 0; i < arguments.length; i++ )
+ − 550
{
+ − 551
arglist[arglist.length] = 'arguments['+i+']';
+ − 552
}
+ − 553
arglist = implode(', ', arglist);
585
+ − 554
return eval(funcname + '(' + arglist + ');');
582
+ − 555
}
+ − 556
}
+ − 557
+ − 558
// list of public functions that need placeholders that fetch the component
+ − 559
var placeholder_list = {
+ − 560
ajaxReset: 'ajax.js',
+ − 561
ajaxComments: 'comments.js',
+ − 562
ajaxEditor: 'editor.js',
+ − 563
ajaxHistory: 'ajax.js',
+ − 564
ajaxRename: 'ajax.js',
+ − 565
ajaxDelVote: 'ajax.js',
+ − 566
ajaxProtect: 'ajax.js',
+ − 567
ajaxClearLogs: 'ajax.js',
912
+ − 568
ajaxRollback: 'ajax.js',
582
+ − 569
ajaxResetDelVotes: 'ajax.js',
+ − 570
ajaxDeletePage: 'ajax.js',
+ − 571
ajaxSetPassword: 'ajax.js',
+ − 572
ajaxChangeStyle: 'ajax.js',
664
+ − 573
ajaxCatToTag: 'ajax.js',
701
dd80cde96a6c
Autocomplete further stabilized. Made Special:PasswordReset and Special:Register prevent use if logged in.
Dan
diff
changeset
+ − 574
ajaxCatEdit: 'ajax.js',
785
+ − 575
ajaxReverseDNS: 'ajax.js',
582
+ − 576
ajaxOpenACLManager: 'acl.js',
694
43367c66d869
Couple of fixes (hacks) for Opera and the aftermath of that z-index change to darken() and enlighten() fadefilters; added ajaxOpenDirectACLRule() to placeholder list
Dan
diff
changeset
+ − 577
ajaxOpenDirectACLRule: 'acl.js',
582
+ − 578
ajaxAdminPage: 'login.js',
+ − 579
ajaxInitLogout: 'login.js',
+ − 580
ajaxStartLogin: 'login.js',
+ − 581
ajaxStartAdminLogin: 'login.js',
586
234ddd896555
Made encryption work in form-based logon again; modified load_component() to fetch compressed versions when possible
Dan
diff
changeset
+ − 582
ajaxLoginNavTo: 'login.js',
591
2529833a7731
Made $session->private_key protected and added pk_{en,de}crypt methods for encrypting and decrypting data using the private key
Dan
diff
changeset
+ − 583
ajaxLogonToElev: 'login.js',
582
+ − 584
ajaxAdminPage: 'login.js',
664
+ − 585
ajaxAdminUser: 'login.js',
582
+ − 586
mb_logout: 'login.js',
+ − 587
selectButtonMajor: 'toolbar.js',
+ − 588
selectButtonMinor: 'toolbar.js',
+ − 589
unselectAllButtonsMajor: 'toolbar.js',
+ − 590
unselectAllButtonsMinor: 'toolbar.js',
+ − 591
darken: 'fadefilter.js',
+ − 592
enlighten: 'fadefilter.js',
585
+ − 593
autofill_onload: 'autofill.js',
586
234ddd896555
Made encryption work in form-based logon again; modified load_component() to fetch compressed versions when possible
Dan
diff
changeset
+ − 594
password_score: 'pwstrength.js',
590
03a60844c7c5
Several optimization changes including getting rid of a few eval()s. Added placeholder functions for the theme manager, which should be working now
Dan
diff
changeset
+ − 595
password_score_field: 'pwstrength.js',
03a60844c7c5
Several optimization changes including getting rid of a few eval()s. Added placeholder functions for the theme manager, which should be working now
Dan
diff
changeset
+ − 596
ajaxEditTheme: 'theme-manager.js',
03a60844c7c5
Several optimization changes including getting rid of a few eval()s. Added placeholder functions for the theme manager, which should be working now
Dan
diff
changeset
+ − 597
ajaxToggleSystemThemes: 'theme-manager.js',
03a60844c7c5
Several optimization changes including getting rid of a few eval()s. Added placeholder functions for the theme manager, which should be working now
Dan
diff
changeset
+ − 598
ajaxInstallTheme: 'theme-manager.js',
628
+ − 599
ajaxInitRankEdit: 'rank-manager.js',
701
dd80cde96a6c
Autocomplete further stabilized. Made Special:PasswordReset and Special:Register prevent use if logged in.
Dan
diff
changeset
+ − 600
ajaxInitRankCreate: 'rank-manager.js',
dd80cde96a6c
Autocomplete further stabilized. Made Special:PasswordReset and Special:Register prevent use if logged in.
Dan
diff
changeset
+ − 601
autofill_init_element: 'autofill.js',
789
4a8fc835ba02
Added paginator_goto() to function reverse map; fixed some missing component loads in pagination code
Dan
diff
changeset
+ − 602
autofill_onload: 'autofill.js',
4a8fc835ba02
Added paginator_goto() to function reverse map; fixed some missing component loads in pagination code
Dan
diff
changeset
+ − 603
paginator_goto: 'paginate.js'
589
+ − 604
};
582
+ − 605
701
dd80cde96a6c
Autocomplete further stabilized. Made Special:PasswordReset and Special:Register prevent use if logged in.
Dan
diff
changeset
+ − 606
function AutofillUsername(el, p)
dd80cde96a6c
Autocomplete further stabilized. Made Special:PasswordReset and Special:Register prevent use if logged in.
Dan
diff
changeset
+ − 607
{
dd80cde96a6c
Autocomplete further stabilized. Made Special:PasswordReset and Special:Register prevent use if logged in.
Dan
diff
changeset
+ − 608
p = p || {};
dd80cde96a6c
Autocomplete further stabilized. Made Special:PasswordReset and Special:Register prevent use if logged in.
Dan
diff
changeset
+ − 609
el.className = 'autofill username';
dd80cde96a6c
Autocomplete further stabilized. Made Special:PasswordReset and Special:Register prevent use if logged in.
Dan
diff
changeset
+ − 610
el.onkeyup = null;
dd80cde96a6c
Autocomplete further stabilized. Made Special:PasswordReset and Special:Register prevent use if logged in.
Dan
diff
changeset
+ − 611
autofill_init_element(el, p);
dd80cde96a6c
Autocomplete further stabilized. Made Special:PasswordReset and Special:Register prevent use if logged in.
Dan
diff
changeset
+ − 612
}
dd80cde96a6c
Autocomplete further stabilized. Made Special:PasswordReset and Special:Register prevent use if logged in.
Dan
diff
changeset
+ − 613
dd80cde96a6c
Autocomplete further stabilized. Made Special:PasswordReset and Special:Register prevent use if logged in.
Dan
diff
changeset
+ − 614
function AutofillPage(el, p)
dd80cde96a6c
Autocomplete further stabilized. Made Special:PasswordReset and Special:Register prevent use if logged in.
Dan
diff
changeset
+ − 615
{
dd80cde96a6c
Autocomplete further stabilized. Made Special:PasswordReset and Special:Register prevent use if logged in.
Dan
diff
changeset
+ − 616
p = p || {};
dd80cde96a6c
Autocomplete further stabilized. Made Special:PasswordReset and Special:Register prevent use if logged in.
Dan
diff
changeset
+ − 617
el.className = 'autofill page';
dd80cde96a6c
Autocomplete further stabilized. Made Special:PasswordReset and Special:Register prevent use if logged in.
Dan
diff
changeset
+ − 618
el.onkeyup = null;
dd80cde96a6c
Autocomplete further stabilized. Made Special:PasswordReset and Special:Register prevent use if logged in.
Dan
diff
changeset
+ − 619
autofill_init_element(el, p);
dd80cde96a6c
Autocomplete further stabilized. Made Special:PasswordReset and Special:Register prevent use if logged in.
Dan
diff
changeset
+ − 620
}
dd80cde96a6c
Autocomplete further stabilized. Made Special:PasswordReset and Special:Register prevent use if logged in.
Dan
diff
changeset
+ − 621
582
+ − 622
var placeholder_instances = {};
+ − 623
+ − 624
for ( var i in placeholder_list )
+ − 625
{
+ − 626
var file = placeholder_list[i];
+ − 627
placeholder_instances[i] = new Placeholder(i, file);
+ − 628
window[i] = placeholder_instances[i].go;
+ − 629
}
+ − 630
583
+ − 631
$lang = {
+ − 632
get: function(a, b)
+ − 633
{
+ − 634
load_component('l10n');
+ − 635
return $lang.get(a, b);
+ − 636
}
+ − 637
}
+ − 638
582
+ − 639
//*/