mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'devel' of github.com:triAGENS/ArangoDB into devel
This commit is contained in:
commit
2f7bd44d45
|
@ -149,6 +149,7 @@ window.arangoCollections = Backbone.Collection.extend({
|
|||
async: false,
|
||||
success: function(data) {
|
||||
returnobj.status = true;
|
||||
returnobj.data = data;
|
||||
},
|
||||
error: function(data) {
|
||||
returnobj.status = false;
|
||||
|
|
|
@ -131,7 +131,7 @@ var collectionView = Backbone.View.extend({
|
|||
},
|
||||
deleteCollection: function () {
|
||||
var self = this;
|
||||
var collName = $('#change-collection-name').val();
|
||||
var collName = self.myCollection.name;
|
||||
var returnval = window.arangoCollectionsStore.deleteCollection(collName);
|
||||
if (returnval === true) {
|
||||
self.hideModal();
|
||||
|
|
|
@ -20,11 +20,11 @@ window.CollectionListItemView = Backbone.View.extend({
|
|||
|
||||
editProperties: function (event) {
|
||||
event.stopPropagation();
|
||||
window.App.navigate("#collection/" + this.model.get("id"), {trigger: true});
|
||||
window.App.navigate("collection/" + encodeURIComponent(this.model.get("id")), {trigger: true});
|
||||
},
|
||||
|
||||
selectCollection: function() {
|
||||
window.App.navigate("collection/" + this.model.get("name") + "/documents/1", {trigger: true});
|
||||
window.App.navigate("collection/" + encodeURIComponent(this.model.get("name")) + "/documents/1", {trigger: true});
|
||||
},
|
||||
|
||||
noop: function(event) {
|
||||
|
|
|
@ -40,13 +40,13 @@ var documentsView = Backbone.View.extend({
|
|||
},
|
||||
|
||||
buildCollectionLink : function (collection) {
|
||||
return "#collection/" + encodeURIComponent(collection.get('name')) + '/documents/1';
|
||||
return "collection/" + encodeURIComponent(collection.get('name')) + '/documents/1';
|
||||
},
|
||||
|
||||
prevCollection : function () {
|
||||
if (this.collectionContext.prev !== null) {
|
||||
$('#collectionPrev').parent().removeClass('disabledPag');
|
||||
window.location.hash = this.buildCollectionLink(this.collectionContext.prev);
|
||||
window.App.navigate(this.buildCollectionLink(this.collectionContext.prev));
|
||||
}
|
||||
else {
|
||||
$('#collectionPrev').parent().addClass('disabledPag');
|
||||
|
@ -56,7 +56,7 @@ var documentsView = Backbone.View.extend({
|
|||
nextCollection : function () {
|
||||
if (this.collectionContext.next !== null) {
|
||||
$('#collectionNext').parent().removeClass('disabledPag');
|
||||
window.location.hash = this.buildCollectionLink(this.collectionContext.next);
|
||||
window.App.navigate(this.buildCollectionLink(this.collectionContext.next));
|
||||
}
|
||||
else {
|
||||
$('#collectionNext').parent().addClass('disabledPag');
|
||||
|
@ -76,7 +76,7 @@ var documentsView = Backbone.View.extend({
|
|||
var result = window.arangoDocumentStore.createTypeDocument(collid);
|
||||
//Success
|
||||
if (result !== false) {
|
||||
window.location.hash = "collection/"+result;
|
||||
window.location.hash = "collection/" + result;
|
||||
arangoHelper.arangoNotification('Document created');
|
||||
}
|
||||
//Error
|
||||
|
|
|
@ -38,7 +38,6 @@ var newCollectionView = Backbone.View.extend({
|
|||
},
|
||||
|
||||
hidden: function () {
|
||||
window.App.navigate("#");
|
||||
},
|
||||
|
||||
saveNewCollection: function() {
|
||||
|
@ -74,17 +73,15 @@ var newCollectionView = Backbone.View.extend({
|
|||
self.hidden();
|
||||
$("#add-collection").modal('hide');
|
||||
arangoHelper.arangoNotification("Collection created");
|
||||
|
||||
window.App.navigate("collection/" + collName + "/documents/1", {trigger: true});
|
||||
}
|
||||
else {
|
||||
self.hidden();
|
||||
$("#add-collection").modal('hide');
|
||||
arangoHelper.arangoError(returnobj.errorMessage);
|
||||
window.App.navigate("#");
|
||||
}
|
||||
window.arangoCollectionsStore.fetch({
|
||||
success: function () {
|
||||
window.collectionsView.render();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue