Commit b7ae1a3c authored by Marcel Rieger's avatar Marcel Rieger
Browse files

Fix workspace connection and center view.

parent 47365bf9
......@@ -330,7 +330,7 @@ define(["jquery", "emitter", "vispa/messenger"], function($, Emitter, Messenger)
// actual managing functions
attach: function(instance, tabElement, contentElement, // required arguments
instanceToReplace, originatingInstance, focusIndex) { // optional arguments
console.log(arguments);
if (!(instance instanceof UIElement)) throw "Instance needs to be an UIElement";
if (!tabElement) throw "No tab element given";
......
define([ "jquery", "vispa/extensions" ], function($, Ext) {
define(["jquery", "vispa/extensions", "async"], function($, Ext, async) {
// ExtensionView Base class for "center" window instances
var CenterView = Ext.ExtensionView._extend({
......@@ -103,7 +103,7 @@ define([ "jquery", "vispa/extensions" ], function($, Ext) {
});
};
// get all templates, then call _fillMenu
var tasks = ["menuentry.html", "submenu.html"].forEach(function(path) {
var tasks = ["menuentry.html", "submenu.html"].map(function(path) {
return function(callback) {
vispa.getTemplate("html/index/" + path, callback);
};
......@@ -284,7 +284,7 @@ define([ "jquery", "vispa/extensions" ], function($, Ext) {
});
});
sync.parallel(tasks, function(err) {
async.parallel(tasks, function(err) {
// set instance nodes
self._nodes = nodes;
// finally attach & render
......@@ -493,7 +493,7 @@ define([ "jquery", "vispa/extensions" ], function($, Ext) {
self._fastMenuToggleDfd = $.Deferred();
// before looping over the entries, make sure the templates are loaded
var tasks = ["entry", "basicmenu", "splitmenu", "group"].forEach(function(name) {
var tasks = ["entry", "basicmenu", "splitmenu", "group"].map(function(name) {
return function(callback) {
vispa.getTemplate("html/index/fastmenu/" + name + ".html", callback);
};
......
......@@ -773,7 +773,7 @@ define([
});
// task 3
tasks.push(function() {
tasks.push(function(callback) {
vispa.getTemplate("html/index/workspace.html", function(err, tmpl) {
if (err) {
return callback(err);
......@@ -823,6 +823,7 @@ define([
});
// finally, execute all tasks
async.series(tasks, function(err) {
if (err) {
self.varData.loadingUI = false;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment