includes/clientside/static/loader.js
author Dan Fuhry <dan@enanocms.org>
Mon, 15 Nov 2010 19:21:40 -0500
changeset 1311 a228f7e8fb15
parent 1227 bdac73ed481e
permissions -rw-r--r--
Added a new "hide-with-mce" CSS class in Dynano; all elements which have it will be hidden when TinyMCE is activated, and re-shown when it is destroyed.

// Some final stuff - loader routines, etc.

var onload_complete = false;

function mdgInnerLoader(e)
{
	window.onkeydown = isKeyPressed;
	window.onkeyup = function(e) { isKeyPressed(e); };
	
	if ( typeof(dbx_set_key) == 'function')
	{
		dbx_set_key();
	}
	
	runOnloadHooks(e);
}

// Enano's main init function.
function enano_init(e)
{
	mdgInnerLoader(e);
	
	// we're loaded; set flags to true
	console.info('Enano::JS runtime: system init complete');
	onload_complete = true;
}

// don't init the page if less than IE6
if ( typeof(KILL_SWITCH) == 'boolean' && !KILL_SWITCH )
{
	window.onload = enano_init;
}