1
0
Fork 0

Merge branch 'devel' of https://github.com/triAGENS/ArangoDB into devel

This commit is contained in:
Jan Steemann 2014-01-31 11:23:38 +01:00
commit bd7c5d4113
14 changed files with 69 additions and 51 deletions

View File

@ -40,6 +40,7 @@ ul.headerButtonList > li {
a.headerButton {
float: left;
cursor: pointer;
margin-top: 0px;
margin-left: 5px;
margin-right: 5px;

View File

@ -1,11 +1,3 @@
svg.graphViewer {
background-color: white;
border-width: 1px;
border-style: solid;
border-color: rgba(0,0,0,0.125);
margin-left: 74px;
}
.gv_manageButtonContainer {
margin-top: 10px;
}

View File

@ -1,3 +1,18 @@
svg.graphViewer {
position: absolute;
left: 74px;
background-color: white;
border-width: 1px;
border-style: solid;
border-color: rgba(0,0,0,0.125);
z-index: 0;
}
div.gv_background {
position: relative;
height: 685px;
}
img.searchSubmit {
height: 16px;
margin-left: -18px;
@ -22,9 +37,9 @@ img.searchSubmit {
}
.toolbox {
margin-left: 5px;
position: absolute;
left: 5px;
margin-right: 5px;
margin-bottom: -340px;
border-radius: 0px !important;
-webkit-border-radius: 0px !important;
-moz-border-radius: 0px !important;
@ -177,12 +192,14 @@ button.gv-icon-btn.trash{
background-image:url("../img/gv_trash.png");
}
div.gv_zoom_widget {
position: relative;
position: absolute;
z-index: 1;
left: 95px;
top: 20px;
width: 40px;
height: 300px;
margin-bottom: -322px;
}
div.gv_zoom_slider {
margin: 0px 17px;
width: 4px;
@ -343,14 +360,14 @@ span.gv_caret {
}
div.gv_colour_list {
position: relative;
position: absolute;
right: 26px;
top: 20px;
text-align: right;
height: 680px;
max-height: 680px;
overflow: auto;
margin-bottom: -100%;
float: right;
z-index: 1;
}
div.gv_colour_list li {

View File

@ -29,8 +29,9 @@
////////////////////////////////////////////////////////////////////////////////
function ArangoAdapter(nodes, edges, viewer, config) {
"use strict";
if (nodes === undefined) {
throw "The nodes have to be given.";
}

View File

@ -133,6 +133,7 @@ function EventDispatcher(nodeShaper, edgeShaper, config) {
bindSVGEvents = function() {
svgObj = svgObj || $("svg");
svgObj.unbind();
_.each(svgBase, function(fs, ev) {
svgObj.bind(ev, function(trigger) {
_.each(fs, function(f) {

View File

@ -1,6 +1,5 @@
/*jslint indent: 2, nomen: true, maxlen: 100, sloppy: true, vars: true, white: true, plusplus: true */
/*global _*/
/* global eventLibrary */
////////////////////////////////////////////////////////////////////////////////
/// @brief Graph functionality
@ -119,7 +118,7 @@ function EventLibrary() {
this.InsertNode = function (config) {
self.checkNodeEditorConfig(config);
var adapter = config.adapter,
nodeShaper = config.shaper;
nodeShaper = config.shaper;
return function(data, callback, x, y) {
var cb, d;

View File

@ -53,7 +53,9 @@ function ContextMenu(id) {
},
bindMenu = function($objects) {
menu = $.contextMenu.create(jqId, {shadow: false});
menu = $.contextMenu.create(jqId, {
shadow: false
});
$objects.each(function() {
$(this).bind('contextmenu', function(e){
menu.show(this,e);
@ -64,13 +66,14 @@ function ContextMenu(id) {
divFactory = function() {
div = document.getElementById(id);
if (!div) {
div = document.createElement("div");
div.id = id;
ul = document.createElement("ul");
document.body.appendChild(div);
div.appendChild(ul);
if (div) {
div.parentElement.removeChild(div);
}
div = document.createElement("div");
div.id = id;
ul = document.createElement("ul");
document.body.appendChild(div);
div.appendChild(ul);
ul = div.firstChild;
return div;
};

View File

@ -433,7 +433,7 @@ function GraphViewerUI(container, adapterConfig, optWidth, optHeight, viewerConf
};
container.appendChild(menubar);
container.appendChild(background);
background.className = "thumbnails";
background.className = "thumbnails gv_background ";
background.id = "background";
viewerConfig = viewerConfig || {};

View File

@ -334,10 +334,12 @@
this.foxxList.fetch({
async: false
});
var installAppView = new window.foxxMountView({
model: this.foxxList.findWhere({_key: appkey})
});
installAppView.render();
if (!this.installAppView) {
this.installAppView = new window.foxxMountView({
collection: this.foxxList
});
}
this.installAppView.render(appkey);
},
appDocumentation: function(key) {

View File

@ -8,6 +8,6 @@
<strong>Version:</strong>&nbsp;<%=attributes.version %><br />
<!--Git: <a href=<%=attributes.git %>>Repository</a>-->
</p>
<button id="install" class="btn btn-success pull-right">Install</button>
<button class="btn btn-success pull-right install">Install</button>
</div>
</small>

View File

@ -34,6 +34,6 @@
</div>
<div id="colFooter" class="modal-footer">
<button id="cancel" class="btn btn-danger pull-left">Cancel</button>
<button id="install" class="btn btn-success pull-right">Install</button>
<button class="btn btn-success pull-right installFoxx">Install</button>
</div>
</div>

View File

@ -9,7 +9,7 @@
template: templateEngine.createTemplate("foxxInstalledView.ejs"),
events: {
'click #install': 'installFoxx'
'click .install': 'installFoxx'
},
initialize: function(){

View File

@ -2,28 +2,28 @@
/*global alert, Backbone, EJS, $, window, templateEngine */
window.foxxMountView = Backbone.View.extend({
el: '#modalPlaceholder',
m: {},
initialize: function () {
this.m = this.model.attributes;
},
template: templateEngine.createTemplate("foxxMountView.ejs"),
render: function() {
$(this.el).html(this.template.render(this.model));
events: {
"hidden #install-foxx" : "hidden",
"click #cancel" : "hideModal",
"click .installFoxx" : "install"
},
render: function(key) {
var m = this.collection.findWhere({_key: key});
this.m = m;
$(this.el).html(this.template.render(m));
$('#install-foxx').modal('show');
$('.modalTooltips').tooltip({
placement: "left"
});
return this;
},
events: {
"hidden #install-foxx" : "hidden",
"click #cancel" : "hideModal",
"click #install" : "install"
},
hidden: function () {
window.App.navigate("applications", {trigger: true});
},
@ -35,12 +35,10 @@ window.foxxMountView = Backbone.View.extend({
alert("Sorry, you have to give a valid mount point, e.g.: /myPath");
return false;
}
var self = this;
(new window.FoxxCollection()).create({
this.collection.create({
mount: mountPoint,
name: self.m.name,
version: self.m.version
name: this.m.get("name"),
version: this.m.get("version")
});
this.hideModal();
},
@ -48,4 +46,5 @@ window.foxxMountView = Backbone.View.extend({
hideModal: function () {
$('#install-foxx').modal('hide');
}
});

View File

@ -65,6 +65,9 @@ exports.Foxxes = function () {
};
this.install = function (name, mount, version) {
if (version) {
name = "app:" + name + ":" + version;
}
return foxxmanager.mount(name, mount, { setup: true });
};