1
0
Fork 0

Merge branch 'devel' into multiple_databases

This commit is contained in:
a-brandt 2013-06-06 12:54:58 +02:00
commit e4096900cc
14 changed files with 8193 additions and 29 deletions

8125
Makefile Normal file

File diff suppressed because it is too large Load Diff

View File

@ -195,14 +195,6 @@ static uint64_t HashElement (TRI_hash_array_t* array,
/// @{
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/// @brief size of a cache line, in bytes
/// the memory acquired for the hash table is aligned to a multiple of this
/// value
////////////////////////////////////////////////////////////////////////////////
#define CACHE_LINE_SIZE (64)
////////////////////////////////////////////////////////////////////////////////
/// @brief initial preallocation size of the hash table when the table is
/// first created
@ -273,7 +265,7 @@ static int AllocateTable (TRI_hash_array_t* array, size_t numElements) {
TRI_hash_index_element_t* table;
table = TRI_Allocate(TRI_UNKNOWN_MEM_ZONE,
CACHE_LINE_SIZE + (sizeof(TRI_hash_index_element_t) * numElements),
sizeof(TRI_hash_index_element_t) * numElements,
true);
if (table == NULL) {

View File

@ -1,3 +1,5 @@
/*jslint indent: 2, nomen: true, maxlen: 100, sloppy: true, vars: true, white: true, plusplus: true */
/*global window, Backbone */
window.FoxxCollection = Backbone.Collection.extend({
model: window.Foxx,

View File

@ -1,5 +1,5 @@
/*jslint indent: 2, nomen: true, maxlen: 100, sloppy: true, vars: true, white: true, plusplus: true */
/*global require, exports, Backbone, EJS, $*/
/*global require, exports, Backbone, EJS, window, SwaggerUi, hljs, document, $*/
window.AppDocumentationView = Backbone.View.extend({
@ -15,7 +15,7 @@ window.AppDocumentationView = Backbone.View.extend({
supportHeaderParams: true,
supportedSubmitMethods: ['get', 'post', 'put', 'delete', 'patch', 'head'],
onComplete: function(swaggerApi, swaggerUi){
$('pre code').each(function(i, e) {hljs.highlightBlock(e)});
$('pre code').each(function(i, e) {hljs.highlightBlock(e);});
},
onFailure: function(data) {
var div = document.createElement("div"),

View File

@ -87,6 +87,7 @@ var documentSourceView = Backbone.View.extend({
});
var editor = ace.edit("sourceEditor");
editor.setValue(arangoHelper.FormatJSON(data));
editor.clearSelection();
},
stateReplace: function (value) {
var inString = false;

View File

@ -35,7 +35,7 @@ var documentsView = Backbone.View.extend({
returnPressedHandler: function(event) {
if (event.keyCode === 13) {
if (!!$("#confirmDeleteBtn").attr("disabled") === false) {
if ($("#confirmDeleteBtn").attr("disabled") === false) {
this.confirmDelete();
}
}
@ -143,13 +143,19 @@ var documentsView = Backbone.View.extend({
},
confirmDelete: function () {
$("#confirmDeleteBtn").attr("disabled", true);
var hash = window.location.hash.split("/");
var check = hash[3];
//todo - find wrong event handler
if (check !== 'source') {
this.reallyDelete();
}
},
reallyDelete: function () {
var self = this;
var row = $(self.target).closest("tr").get(0);
var hash = window.location.hash.split("/");
var page = hash[3];
var deleted = false;
this.docid = $(self.idelement).next().text();

View File

@ -1,3 +1,6 @@
/*jslint indent: 2, nomen: true, maxlen: 100, sloppy: true, vars: true, white: true, plusplus: true */
/*global Backbone, EJS, $, window, _ */
var FoxxActiveListView = Backbone.View.extend({
el: '#content',
template: new EJS({url: 'js/templates/foxxListView.ejs'}),

View File

@ -1,3 +1,6 @@
/*jslint indent: 2, nomen: true, maxlen: 100, sloppy: true, vars: true, white: true, plusplus: true */
/*global Backbone, $, window, EJS, _ */
window.FoxxActiveView = Backbone.View.extend({
tagName: 'li',
className: "span3",
@ -14,12 +17,22 @@ window.FoxxActiveView = Backbone.View.extend({
editFoxx: function(event) {
event.stopPropagation();
window.App.navigate("application/installed/" + encodeURIComponent(this.model.get("_key")), {trigger: true});
window.App.navigate(
"application/installed/" + encodeURIComponent(this.model.get("_key")),
{
trigger: true
}
);
},
showDocu: function(event) {
event.stopPropagation();
window.App.navigate("application/documentation/" + encodeURIComponent(this.model.get("_key")), {trigger: true});
window.App.navigate(
"application/documentation/" + encodeURIComponent(this.model.get("_key")),
{
trigger: true
}
);
},
render: function(){

View File

@ -1,3 +1,6 @@
/*jslint indent: 2, nomen: true, maxlen: 100, sloppy: true, vars: true, white: true, plusplus: true */
/*global Backbone, EJS, $, window, _ */
window.foxxEditView = Backbone.View.extend({
el: '#modalPlaceholder',
initialize: function () {

View File

@ -1,3 +1,6 @@
/*jslint indent: 2, nomen: true, maxlen: 100, sloppy: true, vars: true, white: true, plusplus: true */
/*global Backbone, EJS, $, window, _ */
var FoxxInstalledListView = Backbone.View.extend({
el: '#content',
template: new EJS({url: 'js/templates/foxxListView.ejs'}),

View File

@ -1,3 +1,6 @@
/*jslint indent: 2, nomen: true, maxlen: 100, sloppy: true, vars: true, white: true, plusplus: true */
/*global Backbone, EJS, $, window, _ */
window.FoxxInstalledView = Backbone.View.extend({
tagName: 'li',
className: "span3",
@ -13,7 +16,12 @@ window.FoxxInstalledView = Backbone.View.extend({
installFoxx: function(event) {
event.stopPropagation();
window.App.navigate("application/available/" + encodeURIComponent(this.model.get("_key")), {trigger: true});
window.App.navigate(
"application/available/" + encodeURIComponent(this.model.get("_key")),
{
trigger: true
}
);
},
render: function(){

View File

@ -1,10 +1,12 @@
/*jslint indent: 2, nomen: true, maxlen: 100, sloppy: true, vars: true, white: true, plusplus: true, forin: true, regexp: true */
/*global alert, Backbone, EJS, $, window */
window.foxxMountView = Backbone.View.extend({
el: '#modalPlaceholder',
m: {},
initialize: function () {
this.m = this.model.attributes;
console.log(this.m);
},
template: new EJS({url: 'js/templates/foxxMountView.ejs'}),

View File

@ -1,3 +1,6 @@
/*jslint indent: 2, nomen: true, maxlen: 100, sloppy: true, vars: true, white: true, plusplus: true, forin: true */
/*global Backbone, $, window, EJS, GraphViewerUI */
window.graphView = Backbone.View.extend({
el: '#content',
@ -38,11 +41,11 @@ window.graphView = Backbone.View.extend({
nodeShaper: {
label: label
}
}
};
}
$("#background").remove();
ui = new GraphViewerUI(document.getElementById("content"), aaconfig, 940, 680, config);
var ui = new GraphViewerUI($("#content"), aaconfig, 940, 680, config);
},

View File

@ -49,6 +49,9 @@ JAVASCRIPT_JSLINT = \
`find @srcdir@/js/client/modules -name "*.js"` \
`find @srcdir@/js/server/modules -name "*.js"` \
`find @srcdir@/html/admin/js/models -name "*.js"` \
`find @srcdir@/html/admin/js/views -name "*.js"` \
`find @srcdir@/html/admin/js/collections -name "*.js"` \
`find @srcdir@/html/admin/js/routers -name "*.js"` \
\
@srcdir@/js/client/client.js \
@srcdir@/js/server/server.js \