From 4bfdf68b5c4c54e19bcc122c9f92df9852c1d6ea Mon Sep 17 00:00:00 2001 From: Michael Hackstein Date: Fri, 12 Apr 2013 10:58:54 +0200 Subject: [PATCH] GraphViewer: Toolbox now created correctly --- .../specGraphViewer/graphViewerUISpec.js | 1 + .../js/graphViewer/ui/eventDispatcherControls.js | 2 +- html/admin/js/graphViewer/ui/graphViewerUI.js | 16 +++++++--------- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/html/admin/js/graphViewer/jasmine_test/specGraphViewer/graphViewerUISpec.js b/html/admin/js/graphViewer/jasmine_test/specGraphViewer/graphViewerUISpec.js index aa50a41f2d..4ab48448f5 100644 --- a/html/admin/js/graphViewer/jasmine_test/specGraphViewer/graphViewerUISpec.js +++ b/html/admin/js/graphViewer/jasmine_test/specGraphViewer/graphViewerUISpec.js @@ -148,6 +148,7 @@ expect(group.children.length).toEqual(2); // Correctness of buttons is checked in eventDispatcherUISpec. }); + return true; } }); }); diff --git a/html/admin/js/graphViewer/ui/eventDispatcherControls.js b/html/admin/js/graphViewer/ui/eventDispatcherControls.js index 726c6381e4..9246c36327 100644 --- a/html/admin/js/graphViewer/ui/eventDispatcherControls.js +++ b/html/admin/js/graphViewer/ui/eventDispatcherControls.js @@ -136,7 +136,7 @@ function EventDispatcherControls(list, nodeShaper, edgeShaper, dispatcherConfig) rebindNodes({click: nodeCallback}); rebindEdges({click: edgeCallback}); }; - createIcon("edit", "edit", callback); + createIcon("pencil", "edit", callback); }; this.addControlExpand = function() { diff --git a/html/admin/js/graphViewer/ui/graphViewerUI.js b/html/admin/js/graphViewer/ui/graphViewerUI.js index 9306677dd5..4865f00a16 100644 --- a/html/admin/js/graphViewer/ui/graphViewerUI.js +++ b/html/admin/js/graphViewer/ui/graphViewerUI.js @@ -74,17 +74,15 @@ function GraphViewerUI(container, adapterConfig) { }, createToolbox = function() { var toolbox = document.createElement("div"), - toollist = document.createElement("ul"), - dispatcherUI = new EventDispatcherControls( - toollist, - graphViewer.nodeShaper, - graphViewer.edgeShaper, - graphViewer.dispatcherConfig - ); + dispatcherUI = new EventDispatcherControls( + toolbox, + graphViewer.nodeShaper, + graphViewer.edgeShaper, + graphViewer.dispatcherConfig + ); toolbox.id = "toolbox"; - toolbox.className = "toolbox pull-left"; + toolbox.className = "btn-group btn-group-vertical pull-left toolbox"; container.appendChild(toolbox); - toolbox.appendChild(toollist); dispatcherUI.addAll(); }, createMenu = function() {