Skip to content

Instantly share code, notes, and snippets.

@tayfunoziserikan
Created December 26, 2011 12:32
Show Gist options
  • Save tayfunoziserikan/1521071 to your computer and use it in GitHub Desktop.
Save tayfunoziserikan/1521071 to your computer and use it in GitHub Desktop.
Kebab and bootstrap
/* -----------------------------------------------------------------------------
Kebab Project 2.x (Kebab Revolution) - Web OS Client Platform for Ext JS 4.x
http://kebab-project.com
Copyright (c) 2011-2012 lab2023 - internet technologies TURKEY Inc.
http://www.lab2023.com
----------------------------------------------------------------------------- */
/**
* Prepare environment, enable loader an boot kebab automatically
*
* @class Kebab
* @singleton
*/
(function() {
/**
* Kebab base variables
*/
var global = this, // DOM root
environment = 'development', // Kebab environment
root = 'http://static.kebab.local'; // Kebab root path
// Enable loader
document.write(
'<div id="loader-mask">',
'<p><span>Loading please wait</span></p>', // TODO: i18n
'</div>'
);
// Kebab is not defined!
if (typeof Kebab === 'undefined') {
/**
* Kebab global object
*/
global.Kebab = {
/**
* Kebab boot loader
*/
boot: function() {
var me = this;
/**
* Ext loader configuration
*/
Ext.Loader.setConfig({
enabled: true,
paths: {
'Kebab': me.getRoot() + '/kebab'
}
});
// Require for Kebab.Kernel
Ext.require('Kebab.Kernel');
console.log('Kebab booting was started...');
},
/**
* Get kebab environment
*/
getEnvironment: function() {
return environment;
},
/**
* Get kebab root path
*/
getRoot: function() {
return root;
}
};
// Boot kebab
Kebab.boot();
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment