2013-04-05 17:44:10 +00:00
|
|
|
// Use specific customization for production
|
|
|
|
var custoPath = 'dev/custo';
|
|
|
|
if(location.hostname == "benweet.github.com") {
|
|
|
|
custoPath = 'prod/custo';
|
|
|
|
}
|
|
|
|
|
|
|
|
// RequireJS configuration
|
2013-04-02 18:42:47 +00:00
|
|
|
requirejs.config({
|
|
|
|
paths: {
|
2013-04-05 17:44:10 +00:00
|
|
|
'custo': custoPath
|
2013-04-02 18:42:47 +00:00
|
|
|
},
|
|
|
|
shim: {
|
|
|
|
'jquery-ui': ['jquery'],
|
|
|
|
'bootstrap': ['jquery'],
|
|
|
|
'jgrowl': ['jquery'],
|
|
|
|
'layout': ['jquery-ui'],
|
|
|
|
'Markdown.Sanitizer': ['Markdown.Converter'],
|
|
|
|
'Markdown.Editor': ['Markdown.Sanitizer']
|
|
|
|
}
|
|
|
|
});
|
2013-04-05 17:44:10 +00:00
|
|
|
|
2013-04-02 18:42:47 +00:00
|
|
|
require(["jquery", "core", "file-manager", "config", "custo"], function($, core, fileManager) {
|
2013-03-24 19:42:15 +00:00
|
|
|
$(function() {
|
2013-04-04 20:10:49 +00:00
|
|
|
|
2013-04-05 17:44:10 +00:00
|
|
|
// If browser detected a new application cache.
|
2013-04-04 22:13:48 +00:00
|
|
|
if (window.applicationCache
|
|
|
|
&& window.applicationCache.status == window.applicationCache.UPDATEREADY) {
|
2013-04-04 20:10:49 +00:00
|
|
|
window.applicationCache.swapCache();
|
|
|
|
window.location.reload();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2013-03-27 15:28:31 +00:00
|
|
|
core.init();
|
2013-04-01 23:12:28 +00:00
|
|
|
fileManager.init();
|
2013-03-24 19:42:15 +00:00
|
|
|
});
|
2013-04-02 18:42:47 +00:00
|
|
|
});
|