1
0
Fork 0

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

This commit is contained in:
Jan Steemann 2013-07-24 17:37:27 +02:00
commit f652ee5536
4 changed files with 51 additions and 4 deletions

View File

@ -339,3 +339,8 @@ input[type="radio"]:checked + label span {
.falseClass {
color: red;
}
#applyReplicationTable {
width: 100% !important;
}

View File

@ -377,3 +377,24 @@ table.dataTable thead th {
#documentsUploadDiv:hover, #documentsUpload:hover {
cursor: pointer !important;
}
#filterHeader button {
float: right;
margin-left: 10px !important;
}
#addFilterItem {
margin-left: 5px;
}
#addFilterItem i {
margin-top: -5px !important;
}
#filterHeader input, #filterHeader select, #filterHeader button {
}
#filterHeader select {
margin-left: 10px !important;
margin-right: 10px !important;
}

View File

@ -24,9 +24,10 @@
<option value="&gt;">&gt;</option>
<option value="&gt;=">&gt;=</option>
</select><input id="attribute_value0" type="text" placeholder="Attribute value" class="filterValue">
<a id="addFilterItem"><i class="icon icon-white icon-plus"></i></a>
<button id="filterSend" class="btn btn-primary btn-success">Filter</button>
<a id="addFilterItem"><i class="icon-white icon-plus"></i></a>
<button id="importModal" class="btn btn-primary btn-success">Import</button>
<button id="resetView" class="btn btn-primary btn-success">Reset</button>
<button id="filterSend" class="btn btn-primary btn-success">Filter</button>
</div>
</div>

View File

@ -41,6 +41,7 @@ var documentsView = Backbone.View.extend({
"keyup" : "returnPressedHandler",
"keydown .filterValue" : "filterValueKeydown",
"click #importModal" : "showImportModal",
"click #resetView" : "resetView",
"click #confirmDocImport" : "startUpload"
},
@ -78,6 +79,16 @@ var documentsView = Backbone.View.extend({
}
},
resetView: function () {
//clear all input/select - fields
$('input').val('');
$('select').val('==');
this.removeAllFilterItems();
this.clearTable();
window.arangoDocumentsStore.getDocuments(this.collectionID, 1);
},
startUpload: function () {
var self = this;
if (self.allowUpload === true) {
@ -99,8 +110,7 @@ var documentsView = Backbone.View.extend({
arangoHelper.arangoNotification("Upload successful");
self.hideSpinner();
self.hideImportModal();
self.clearTable();
window.arangoDocumentsStore.getDocuments(self.collectionID, 1);
self.resetView();
return;
}
}
@ -240,6 +250,16 @@ var documentsView = Backbone.View.extend({
$(button.parentElement).remove();
},
removeAllFilterItems : function () {
var childrenLength = $('#filterHeader').children().length;
var i;
for (i = 1; i <= childrenLength; i++) {
$('#removeFilter'+i).parent().remove();
}
this.filters = { "0" : true };
this.filterId = 0;
},
addDocument: function () {
var collid = window.location.hash.split("/")[1];
var doctype = arangoHelper.collectionApiType(collid);