Remove hard code url

This commit is contained in:
Nicolas Le Goff
2014-02-28 17:11:50 +01:00
parent c03f654725
commit b354b063ee
2 changed files with 16 additions and 10 deletions

View File

@@ -50,6 +50,19 @@ define([
})
};
var create = function() {
AdminApp.LeftView = new LeftPanel({
el: AdminApp.$leftView,
eventManager: AdminApp.eventManager,
treeUrl: AdminApp.$leftView.data("tree-url")
});
AdminApp.RightView = new RightPanel({
el: AdminApp.$rightView,
eventManager: AdminApp.eventManager
});
}
var initialize = function (options) {
if (false === "wsurl" in options) {
throw "You must define a websocket url";
@@ -59,15 +72,7 @@ define([
WSConnection.connect(options.wsurl);
}
AdminApp.LeftView = new LeftPanel({
el: AdminApp.$leftView,
eventManager: AdminApp.eventManager
});
AdminApp.RightView = new RightPanel({
el: AdminApp.$rightView,
eventManager: AdminApp.eventManager
});
create();
AdminApp.LeftView.activeTree();
AdminApp.LeftView.clickSelected();
@@ -76,6 +81,7 @@ define([
};
return {
create: create,
initialize: initialize
};
});