mirror of https://gitee.com/bigwinds/arangodb
added feature for truncating a collection
This commit is contained in:
parent
2e9a4a649a
commit
10368540ad
|
@ -74,6 +74,12 @@
|
||||||
window.modalView.hide();
|
window.modalView.hide();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
truncateCollection: function () {
|
||||||
|
this.model.truncateCollection();
|
||||||
|
this.render();
|
||||||
|
window.modalView.hide();
|
||||||
|
},
|
||||||
|
|
||||||
deleteCollection: function () {
|
deleteCollection: function () {
|
||||||
this.model.destroy(
|
this.model.destroy(
|
||||||
{
|
{
|
||||||
|
@ -249,6 +255,18 @@
|
||||||
"change-collection-status", "Status", this.model.get('status'), ""
|
"change-collection-status", "Status", this.model.get('status'), ""
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
buttons.push(
|
||||||
|
window.modalView.createDeleteButton(
|
||||||
|
"Delete",
|
||||||
|
this.deleteCollection.bind(this)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
buttons.push(
|
||||||
|
window.modalView.createDeleteButton(
|
||||||
|
"Truncate",
|
||||||
|
this.truncateCollection.bind(this)
|
||||||
|
)
|
||||||
|
);
|
||||||
if(collectionIsLoaded) {
|
if(collectionIsLoaded) {
|
||||||
buttons.push(
|
buttons.push(
|
||||||
window.modalView.createNotificationButton(
|
window.modalView.createNotificationButton(
|
||||||
|
@ -265,12 +283,6 @@
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
buttons.push(
|
|
||||||
window.modalView.createDeleteButton(
|
|
||||||
"Delete",
|
|
||||||
this.deleteCollection.bind(this)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
buttons.push(
|
buttons.push(
|
||||||
window.modalView.createSuccessButton(
|
window.modalView.createSuccessButton(
|
||||||
"Save",
|
"Save",
|
||||||
|
|
Loading…
Reference in New Issue