diff -r 35e91d16ecf5 -r 234ddd896555 includes/clientside/static/enano-lib-basic.js --- a/includes/clientside/static/enano-lib-basic.js Thu Jun 26 17:31:33 2008 -0400 +++ b/includes/clientside/static/enano-lib-basic.js Thu Jun 26 18:03:04 2008 -0400 @@ -15,11 +15,16 @@ * this website for more information. */ -if(typeof title != 'string') +if ( typeof(title) != 'string') { 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.'); } +if ( typeof(ENANO_JSRES_COMPRESSED) == undefined ) +{ + var ENANO_JSRES_COMPRESSED = false; +} + // Run-time variables var detect = navigator.userAgent.toLowerCase(); @@ -196,8 +201,10 @@ } var loaded_components = {}; +var _load_component_running = false; function load_component(file) { + _load_component_running = true; file = file.replace(/\.js$/, ''); console.info('Loading component %s via AJAX', file); @@ -214,7 +221,7 @@ var ajax = ajaxMakeXHR(); file = file + '.js'; - var uri = scriptPath + '/includes/clientside/static/' + file; + var uri = ( ENANO_JSRES_COMPRESSED ) ? scriptPath + '/includes/clientside/jsres.php?f=' + file : scriptPath + '/includes/clientside/static/' + file; ajax.open('GET', uri, false); ajax.send(null); if ( ajax.readyState == 4 && ajax.status == 200 ) @@ -226,6 +233,7 @@ } loaded_components[file] = true; + _load_component_running = false; return true; } @@ -351,22 +359,16 @@ 'dropdown.js', 'json.js', 'sliders.js', - 'pwstrength.js', 'loader.js' ]; -var problem_scripts = { - 'json.js' : true, - 'template-compiler.js' : true -}; - for(var f in thefiles) { if ( typeof(thefiles[f]) != 'string' ) continue; var script = document.createElement('script'); script.type="text/javascript"; - if ( problem_scripts[thefiles[f]] && KILL_SWITCH ) + if ( thefiles[f] == 'json.js' && KILL_SWITCH ) { // alert('kill switch and problem script'); continue; @@ -443,6 +445,7 @@ ajaxInitLogout: 'login.js', ajaxStartLogin: 'login.js', ajaxStartAdminLogin: 'login.js', + ajaxLoginNavTo: 'login.js', ajaxAdminPage: 'login.js', mb_logout: 'login.js', selectButtonMajor: 'toolbar.js', @@ -452,6 +455,8 @@ darken: 'fadefilter.js', enlighten: 'fadefilter.js', autofill_onload: 'autofill.js', + password_score: 'pwstrength.js', + password_score_field: 'pwstrength.js', } var placeholder_instances = {};