includes/clientside/static/loader.js
author Dan
Sun, 22 Jun 2008 18:13:59 -0400
changeset 581 5e8fd89c02ea
parent 520 4c16e87cfeae
child 582 a38876c0793c
permissions -rw-r--r--
Initial progress towards converting auto-completion framework to Spry. Not currently in a very working state.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
fe660c52c48f Adding /includes
dan@scribus.fuhry.local.fuhry.local
parents:
diff changeset
     1
// Some final stuff - loader routines, etc.
fe660c52c48f Adding /includes
dan@scribus.fuhry.local.fuhry.local
parents:
diff changeset
     2
581
5e8fd89c02ea Initial progress towards converting auto-completion framework to Spry. Not currently in a very working state.
Dan
parents: 520
diff changeset
     3
var onload_complete = false;
5e8fd89c02ea Initial progress towards converting auto-completion framework to Spry. Not currently in a very working state.
Dan
parents: 520
diff changeset
     4
1
fe660c52c48f Adding /includes
dan@scribus.fuhry.local.fuhry.local
parents:
diff changeset
     5
function mdgInnerLoader(e)
fe660c52c48f Adding /includes
dan@scribus.fuhry.local.fuhry.local
parents:
diff changeset
     6
{
581
5e8fd89c02ea Initial progress towards converting auto-completion framework to Spry. Not currently in a very working state.
Dan
parents: 520
diff changeset
     7
  window.onkeydown = isKeyPressed;
5e8fd89c02ea Initial progress towards converting auto-completion framework to Spry. Not currently in a very working state.
Dan
parents: 520
diff changeset
     8
  window.onkeyup = function(e) { isKeyPressed(e); };
1
fe660c52c48f Adding /includes
dan@scribus.fuhry.local.fuhry.local
parents:
diff changeset
     9
  Fat.fade_all();
fe660c52c48f Adding /includes
dan@scribus.fuhry.local.fuhry.local
parents:
diff changeset
    10
  fadeInfoBoxes();
fe660c52c48f Adding /includes
dan@scribus.fuhry.local.fuhry.local
parents:
diff changeset
    11
  jBoxInit();
fe660c52c48f Adding /includes
dan@scribus.fuhry.local.fuhry.local
parents:
diff changeset
    12
  if(typeof (dbx_set_key) == 'function')
fe660c52c48f Adding /includes
dan@scribus.fuhry.local.fuhry.local
parents:
diff changeset
    13
  {
fe660c52c48f Adding /includes
dan@scribus.fuhry.local.fuhry.local
parents:
diff changeset
    14
    dbx_set_key();
fe660c52c48f Adding /includes
dan@scribus.fuhry.local.fuhry.local
parents:
diff changeset
    15
  }
189
fd0e9c7a7b28 Automatic set of state on Oxygen sidebar portlets should work now; reimplemented parts of the template parser (again) to workaround some PHP/PCRE issues and add support for parser plugins
Dan
parents: 57
diff changeset
    16
  initSliders();
1
fe660c52c48f Adding /includes
dan@scribus.fuhry.local.fuhry.local
parents:
diff changeset
    17
  runOnloadHooks(e);
fe660c52c48f Adding /includes
dan@scribus.fuhry.local.fuhry.local
parents:
diff changeset
    18
}
581
5e8fd89c02ea Initial progress towards converting auto-completion framework to Spry. Not currently in a very working state.
Dan
parents: 520
diff changeset
    19
5e8fd89c02ea Initial progress towards converting auto-completion framework to Spry. Not currently in a very working state.
Dan
parents: 520
diff changeset
    20
// if some dumb plugin set an onload function, preserve it 
420
301f546688d1 Re-enabled, debugged, and optimized Javascript compression code
Dan
parents: 189
diff changeset
    21
var ld;
581
5e8fd89c02ea Initial progress towards converting auto-completion framework to Spry. Not currently in a very working state.
Dan
parents: 520
diff changeset
    22
if ( window.onload)
5e8fd89c02ea Initial progress towards converting auto-completion framework to Spry. Not currently in a very working state.
Dan
parents: 520
diff changeset
    23
{
5e8fd89c02ea Initial progress towards converting auto-completion framework to Spry. Not currently in a very working state.
Dan
parents: 520
diff changeset
    24
  ld = window.onload;
5e8fd89c02ea Initial progress towards converting auto-completion framework to Spry. Not currently in a very working state.
Dan
parents: 520
diff changeset
    25
}
5e8fd89c02ea Initial progress towards converting auto-completion framework to Spry. Not currently in a very working state.
Dan
parents: 520
diff changeset
    26
else
5e8fd89c02ea Initial progress towards converting auto-completion framework to Spry. Not currently in a very working state.
Dan
parents: 520
diff changeset
    27
{
5e8fd89c02ea Initial progress towards converting auto-completion framework to Spry. Not currently in a very working state.
Dan
parents: 520
diff changeset
    28
  ld = function() {return;};
5e8fd89c02ea Initial progress towards converting auto-completion framework to Spry. Not currently in a very working state.
Dan
parents: 520
diff changeset
    29
}
5e8fd89c02ea Initial progress towards converting auto-completion framework to Spry. Not currently in a very working state.
Dan
parents: 520
diff changeset
    30
5e8fd89c02ea Initial progress towards converting auto-completion framework to Spry. Not currently in a very working state.
Dan
parents: 520
diff changeset
    31
// Enano's main init function.
5e8fd89c02ea Initial progress towards converting auto-completion framework to Spry. Not currently in a very working state.
Dan
parents: 520
diff changeset
    32
function enano_init(e)
5e8fd89c02ea Initial progress towards converting auto-completion framework to Spry. Not currently in a very working state.
Dan
parents: 520
diff changeset
    33
{
420
301f546688d1 Re-enabled, debugged, and optimized Javascript compression code
Dan
parents: 189
diff changeset
    34
  if ( typeof(ld) == 'function' )
301f546688d1 Re-enabled, debugged, and optimized Javascript compression code
Dan
parents: 189
diff changeset
    35
  {
301f546688d1 Re-enabled, debugged, and optimized Javascript compression code
Dan
parents: 189
diff changeset
    36
    ld(e);
301f546688d1 Re-enabled, debugged, and optimized Javascript compression code
Dan
parents: 189
diff changeset
    37
  }
1
fe660c52c48f Adding /includes
dan@scribus.fuhry.local.fuhry.local
parents:
diff changeset
    38
  mdgInnerLoader(e);
581
5e8fd89c02ea Initial progress towards converting auto-completion framework to Spry. Not currently in a very working state.
Dan
parents: 520
diff changeset
    39
  
5e8fd89c02ea Initial progress towards converting auto-completion framework to Spry. Not currently in a very working state.
Dan
parents: 520
diff changeset
    40
  // we're loaded; set flags to true
5e8fd89c02ea Initial progress towards converting auto-completion framework to Spry. Not currently in a very working state.
Dan
parents: 520
diff changeset
    41
  onload_complete = true;
1
fe660c52c48f Adding /includes
dan@scribus.fuhry.local.fuhry.local
parents:
diff changeset
    42
}
fe660c52c48f Adding /includes
dan@scribus.fuhry.local.fuhry.local
parents:
diff changeset
    43
581
5e8fd89c02ea Initial progress towards converting auto-completion framework to Spry. Not currently in a very working state.
Dan
parents: 520
diff changeset
    44
// don't init the page if less than IE6
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: 1
diff changeset
    45
if ( typeof(KILL_SWITCH) == 'boolean' && !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: 1
diff changeset
    46
{
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: 1
diff changeset
    47
  window.onload = enano_init;
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: 1
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: 1
diff changeset
    49