src/js/main.js
author veltr
Wed, 18 Apr 2012 18:58:44 +0200
branchnew-model
changeset 870 2c025db10a10
parent 868 a525cc2214e7
child 875 43629caa77bc
permissions -rw-r--r--
Migrated playerWidget and started annotationsListWidget

/* main file */
// Why is it called main ? It only loads the libs !

if(window.IriSP === undefined && window.__IriSP === undefined) {
    /**
     @class
     the object under which everything goes.
     */
    IriSP = {};

    /** Alias to IriSP for backward compatibility */
    __IriSP = IriSP;
}

/* underscore comes bundled with the player and we need
 it ASAP, so load it that way
 */

IriSP._ = window._.noConflict();
IriSP.underscore = IriSP._;

IriSP.getLib = function(lib) {
    return (
        IriSP.libFiles.useCdn && typeof IriSP.libFiles.cdn[lib] == "string"
        ? IriSP.libFiles.cdn[lib]
        : (
            typeof IriSP.libFiles.locations[lib] == "string"
            ? IriSP.libFiles.locations[lib]
            : (
                typeof IriSP.libFiles.inDefaultDir[lib] == "string"
                ? IriSP.libFiles.defaultDir + IriSP.libFiles.inDefaultDir[lib]
                : null
            )
        )
    )
}