mirror of https://gitee.com/bigwinds/arangodb
issue: #1161 fixed
This commit is contained in:
parent
7cf115f321
commit
e855e0faeb
|
@ -67,7 +67,7 @@
|
||||||
<div id="importHeader" class="dropdownImport">
|
<div id="importHeader" class="dropdownImport">
|
||||||
<div class="queryline">
|
<div class="queryline">
|
||||||
<input id="importDocuments" name="importDocuments" type="file" accept="application/json" />
|
<input id="importDocuments" name="importDocuments" type="file" accept="application/json" />
|
||||||
<button id="confirmDocImport" class="button-success btn-old-padding" style="float:right">
|
<button id="confirmDocImport" class="button-success btn-old-padding" style="float:right" disabled>
|
||||||
<img id="uploadIndicator" class="upload-indicator" src="img/ajax-loader.gif"/>Import JSON
|
<img id="uploadIndicator" class="upload-indicator" src="img/ajax-loader.gif"/>Import JSON
|
||||||
</button>
|
</button>
|
||||||
<div title='Example input data:</br></br> I. Line-wise: </br> { "_key": "key1", ... } { "_key": "key2", ... } or </br></br> II. JSON documents embedded into a list: </br> [ </br> { "_key": "key1", ... }, </br> { "_key": "key2", ... }, </br> ... </br> ]' class="upload-info" style="float:left; margin-top:7px; margin-right: 10px;"><i style="font-size: 13pt;" class="fa fa-info-circle"></i></div>
|
<div title='Example input data:</br></br> I. Line-wise: </br> { "_key": "key1", ... } { "_key": "key2", ... } or </br></br> II. JSON documents embedded into a list: </br> [ </br> { "_key": "key1", ... }, </br> { "_key": "key2", ... }, </br> ... </br> ]' class="upload-info" style="float:left; margin-top:7px; margin-right: 10px;"><i style="font-size: 13pt;" class="fa fa-info-circle"></i></div>
|
||||||
|
|
|
@ -167,6 +167,13 @@
|
||||||
this.collection.resetFilter();
|
this.collection.resetFilter();
|
||||||
this.collection.loadTotal();
|
this.collection.loadTotal();
|
||||||
this.restoredFilters = [];
|
this.restoredFilters = [];
|
||||||
|
|
||||||
|
//for resetting json upload
|
||||||
|
this.allowUpload = false;
|
||||||
|
this.files = undefined;
|
||||||
|
this.file = undefined;
|
||||||
|
$('#confirmDocImport').attr("disabled", true);
|
||||||
|
|
||||||
this.markFilterToggle();
|
this.markFilterToggle();
|
||||||
this.collection.getDocuments(this.getDocsCallback.bind(this));
|
this.collection.getDocuments(this.getDocsCallback.bind(this));
|
||||||
},
|
},
|
||||||
|
@ -208,6 +215,7 @@
|
||||||
$('#importDocuments').change(function(e) {
|
$('#importDocuments').change(function(e) {
|
||||||
self.files = e.target.files || e.dataTransfer.files;
|
self.files = e.target.files || e.dataTransfer.files;
|
||||||
self.file = self.files[0];
|
self.file = self.files[0];
|
||||||
|
$('#confirmDocImport').attr("disabled", false);
|
||||||
|
|
||||||
self.allowUpload = true;
|
self.allowUpload = true;
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue