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 { a.headerButton {
float: left; float: left;
cursor: pointer;
margin-top: 0px; margin-top: 0px;
margin-left: 5px; margin-left: 5px;
margin-right: 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 { .gv_manageButtonContainer {
margin-top: 10px; 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 { img.searchSubmit {
height: 16px; height: 16px;
margin-left: -18px; margin-left: -18px;
@ -22,9 +37,9 @@ img.searchSubmit {
} }
.toolbox { .toolbox {
margin-left: 5px; position: absolute;
left: 5px;
margin-right: 5px; margin-right: 5px;
margin-bottom: -340px;
border-radius: 0px !important; border-radius: 0px !important;
-webkit-border-radius: 0px !important; -webkit-border-radius: 0px !important;
-moz-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"); background-image:url("../img/gv_trash.png");
} }
div.gv_zoom_widget { div.gv_zoom_widget {
position: relative; position: absolute;
z-index: 1;
left: 95px; left: 95px;
top: 20px;
width: 40px; width: 40px;
height: 300px; height: 300px;
margin-bottom: -322px;
} }
div.gv_zoom_slider { div.gv_zoom_slider {
margin: 0px 17px; margin: 0px 17px;
width: 4px; width: 4px;
@ -343,14 +360,14 @@ span.gv_caret {
} }
div.gv_colour_list { div.gv_colour_list {
position: relative; position: absolute;
right: 26px; right: 26px;
top: 20px; top: 20px;
text-align: right; text-align: right;
height: 680px; max-height: 680px;
overflow: auto; overflow: auto;
margin-bottom: -100%;
float: right; float: right;
z-index: 1;
} }
div.gv_colour_list li { div.gv_colour_list li {

View File

@ -29,6 +29,7 @@
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
function ArangoAdapter(nodes, edges, viewer, config) { function ArangoAdapter(nodes, edges, viewer, config) {
"use strict"; "use strict";
if (nodes === undefined) { if (nodes === undefined) {

View File

@ -133,6 +133,7 @@ function EventDispatcher(nodeShaper, edgeShaper, config) {
bindSVGEvents = function() { bindSVGEvents = function() {
svgObj = svgObj || $("svg"); svgObj = svgObj || $("svg");
svgObj.unbind();
_.each(svgBase, function(fs, ev) { _.each(svgBase, function(fs, ev) {
svgObj.bind(ev, function(trigger) { svgObj.bind(ev, function(trigger) {
_.each(fs, function(f) { _.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 */ /*jslint indent: 2, nomen: true, maxlen: 100, sloppy: true, vars: true, white: true, plusplus: true */
/*global _*/ /*global _*/
/* global eventLibrary */
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// @brief Graph functionality /// @brief Graph functionality

View File

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

View File

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

View File

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

View File

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

View File

@ -34,6 +34,6 @@
</div> </div>
<div id="colFooter" class="modal-footer"> <div id="colFooter" class="modal-footer">
<button id="cancel" class="btn btn-danger pull-left">Cancel</button> <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>
</div> </div>

View File

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

View File

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

View File

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