1
0
Fork 0

Fixed the graphviewer to new header bar layout

This commit is contained in:
Michael Hackstein 2014-01-27 09:17:53 +01:00
parent cd40fe8328
commit a214f057e1
1 changed files with 21 additions and 71 deletions

View File

@ -208,36 +208,38 @@ function GraphViewerUI(container, adapterConfig, optWidth, optHeight, viewerConf
makeConfigure = function (div, idConf, idFilter) {
var ul, liConf, aConf, spanConf, liFilter, aFilter, spanFilter, lists;
div.className = "pagination pagination-small pagination-right btn-group";
div.className = "headerButtonBar pull-right";
ul = document.createElement("ul");
liConf = document.createElement("li");
liConf.className = "enabled";
aConf = document.createElement("a");
aConf.id = idConf;
aConf.className = "arangoHeaderA";
spanConf = document.createElement("span");
spanConf.className = "glyphicon glyphicon-cog";
$(spanConf).attr("data-original-title", "Configure");
ul.className = "headerButtonList";
div.appendChild(ul);
liFilter = document.createElement("li");
liFilter.className = "enabled";
aFilter = document.createElement("a");
aFilter.id = idFilter;
aFilter.className = "arangoHeaderA";
aFilter.className = "headerButton";
spanFilter = document.createElement("span");
spanFilter.className = "glyphicon glyphicon-filter";
$(spanFilter).attr("data-original-title", "Filter");
spanFilter.className = "icon_arangodb_filter";
$(spanFilter).attr("title", "Filter");
div.appendChild(ul);
ul.appendChild(liFilter);
liFilter.appendChild(aFilter);
aFilter.appendChild(spanFilter);
liConf = document.createElement("li");
liConf.className = "enabled";
aConf = document.createElement("a");
aConf.id = idConf;
aConf.className = "headerButton";
spanConf = document.createElement("span");
spanConf.className = "icon_arangodb_settings2";
$(spanConf).attr("title", "Configure");
ul.appendChild(liConf);
liConf.appendChild(aConf);
aConf.appendChild(spanConf);
ul.appendChild(liFilter);
liFilter.appendChild(aFilter);
aFilter.appendChild(spanFilter);
lists = makeConfigureDiv();
lists.filter = makeFilterDiv();
aConf.onclick = function () {
@ -363,58 +365,12 @@ function GraphViewerUI(container, adapterConfig, optWidth, optHeight, viewerConf
createMenu = function() {
var transparentHeader = document.createElement("div"),
buttons = document.createElement("div"),
configureDropDown = document.createElement("div"),
configureLists = makeConfigure(
configureDropDown,
buttons,
"configuredropdown",
"filterdropdown"
);
/*
nodeShaperDropDown = document.createElement("div"),
nodeShaperList = makeBootstrapDropdown(
nodeShaperDropDown,
"nodeshaperdropdown",
"Nodes"
),
edgeShaperDropDown = document.createElement("div"),
edgeShaperList = makeBootstrapDropdown(
edgeShaperDropDown,
"edgeshaperdropdown",
"Edges"
),
adapterDropDown = document.createElement("div"),
adapterList = makeBootstrapDropdown(
adapterDropDown,
"adapterdropdown",
"Connection"
),
layouterDropDown = document.createElement("div"),
layouterList = makeBootstrapDropdown(
layouterDropDown,
"layouterdropdown",
"Layout"
),
nodeShaperUI = new NodeShaperControls(
nodeShaperList,
graphViewer.nodeShaper
),
edgeShaperUI = new EdgeShaperControls(
edgeShaperList,
graphViewer.edgeShaper
),
layouterUI = new LayouterControls(
layouterList,
graphViewer.layouter
),
adapterUI = new ArangoAdapterControls(
adapterList,
graphViewer.adapter
),
*/
nodeShaperUI = new NodeShaperControls(
configureLists.nodes,
graphViewer.nodeShaper
@ -427,11 +383,9 @@ function GraphViewerUI(container, adapterConfig, optWidth, optHeight, viewerConf
menubar.id = "menubar";
menubar.className = "thumbnails2";
transparentHeader.id = "transparentHeader";
transparentHeader.className = "headerBar"
buttons.id = "modifiers";
buttons.className = "pull-right";
/*
nodeShaperDropDown.id = "nodeshapermenu";
@ -439,16 +393,12 @@ function GraphViewerUI(container, adapterConfig, optWidth, optHeight, viewerConf
layouterDropDown.id = "layoutermenu";
adapterDropDown.id = "adaptermenu";
*/
configureDropDown.id = "configuremenu";
menubar.appendChild(transparentHeader);
menubar.appendChild(configureLists.configure);
menubar.appendChild(configureLists.filter);
transparentHeader.appendChild(buttons);
buttons.appendChild(configureDropDown);
adapterUI.addControlChangeCollections(function() {
updateAttributeExamples();
graphViewer.start();