c9-core/plugins/c9.vfs.standalone/views/standalone.html.ejs

145 wiersze
5.3 KiB
Plaintext
Czysty Zwykły widok Historia

2015-02-10 19:41:24 +00:00
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Cloud9</title>
<script>
// For node-webkit
var nRequire = window.require;
window.nativeRequire = function(path){
var oldRequire = window.require;
window.require = nRequire;
var obj = window.require(path);
window.require = oldRequire;
return obj;
}
window.isLocalVersion = nRequire ? true : false;
window.require = undefined;
</script>
2015-11-19 10:47:02 +00:00
<link rel="stylesheet" type="text/css" href="/static/plugins/c9.ide.layout.classic/loading.css" />
2015-02-10 19:41:24 +00:00
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
<link rel="icon" type="image/x-icon" href="favicon.ico" />
</head>
<body>
2015-11-19 10:47:02 +00:00
<div id="loadingide">
<div id="content" class="loading-progress">
<div id="progress-msg">
Loading your workspace <span id="dots"></span>
</div>
<div class="loading-seperator"></div>
<div class="loading-msg">It will be just as you left it</div>
<div class="ui-progress-bar ui-container" id="progress_bar">
<div class="ui-progress" style="width: 7%;">
<span class="ui-label" style="display:none;"></span>
</div>
</div>
</div>
<div class="footer">
<a href="https://docs.c9.io">Documentation</a> |
<a href="http://status.c9.io">Server Status</a> |
<a href="http://support.c9.io">Support</a>
</div>
</div>
<script type="text/javascript">
var dots = document.getElementById("dots");
var cnt = 0;
window.dotsAnim = setInterval(function () {
dots.textContent = "...".slice(0, (++cnt)%4);
}, 500);
</script>
2015-02-10 19:41:24 +00:00
<% if (packed) { %>
<script src="/static/<%=version%>/config/<%=configName%>.js"></script>
<% } else { %>
<script src="/static/mini_require.js"></script>
2015-02-10 19:41:24 +00:00
<script src="/configs/require_config.js"></script>
<% } %>
<script>
var plugins = <%-: architectConfig | JSONToJS %>;
2015-11-19 10:47:02 +00:00
var start = Date.now();
2015-02-10 19:41:24 +00:00
<% if (packed) { %>
require.MODULE_LOAD_URL = "/static/standalone/modules"
<% } %>
if (isLocalVersion)
nativeRequire("nw.gui").Window.get().show();
require(["lib/architect/architect"], function (architect) {
plugins.push({
consumes: [],
provides: ["auth.bootstrap"],
setup: function(options, imports, register) {
register(null, {
"auth.bootstrap": {
login: function(callback) { callback(); }
}
});
}
});
architect.resolveConfig(plugins, function (err, config) {
if (err) throw err;
var errored;
var app = architect.createApp(config, function(err, app){
if (err) {
errored = true;
console.error(err.stack);
alert(err);
}
});
app.lut = {};
app.on("error", function(err){
console.error(err.stack);
if (!errored)
alert(err);
});
app.on("service", function(name, plugin, options){
2015-04-20 23:51:50 +00:00
if (name == "plugin.loader" || name == "plugin.installer"
|| name == "plugin.debug" || name == "plugin.manager"
|| name == "plugin.test")
2015-02-10 19:41:24 +00:00
plugin.architect = app;
if (!plugin.name)
plugin.name = name;
if (options)
app.lut[(options.packagePath || "").replace(/^.*\/home\/.c9\//, "")] = options;
});
app.on("ready", function(){
if (app.services.configure)
app.services.configure.services = app.services;
window.app = app.services;
window.app.__defineGetter__("_ace", function(){
return this.tabManager.focussedTab.editor.ace;
});
Object.keys(window.app).forEach(function(n) {
if (/[^\w]/.test(n))
window.app[n.replace(/[^\w]/, "_") + "_"] = window.app[n];
});
done();
});
// For Development only
function done(){
clearInterval(window.dotsAnim); // stop the dots animation
var loader = document.getElementById("loadingide");
loader.parentNode.removeChild(loader);
app.services.c9.ready();
app.services.c9.totalLoadTime = Date.now() - start;
console.warn("Total Load Time: ", Date.now() - start);
}
});
});
</script>
</body>
</html>