mirror of https://gitee.com/bigwinds/arangodb
disabled login, css for import
This commit is contained in:
parent
644002c50e
commit
0999b59dbf
|
@ -319,3 +319,26 @@ table.dataTable thead th {
|
|||
.span3 .deleted div {
|
||||
border-bottom: 16px solid red;
|
||||
}
|
||||
|
||||
#documentsUploadDiv {
|
||||
position: absolute;
|
||||
right: 90px;
|
||||
height: 24px;
|
||||
width: 70px;
|
||||
margin: 0px !important;
|
||||
}
|
||||
|
||||
#documentsUpload {
|
||||
width: 70px;
|
||||
}
|
||||
|
||||
#documentsUploadDiv input {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
height: 30px !important;
|
||||
opacity: 0;
|
||||
width: 1;
|
||||
}
|
||||
|
|
|
@ -86,7 +86,7 @@ $(document).ready(function() {
|
|||
}
|
||||
},
|
||||
login: function () {
|
||||
if (!this.aboutView) {
|
||||
if (!this.loginView) {
|
||||
this.loginView = new window.loginView({
|
||||
collection: window.activeSession
|
||||
});
|
||||
|
@ -97,10 +97,11 @@ $(document).ready(function() {
|
|||
collections: function() {
|
||||
var naviView = this.naviView;
|
||||
|
||||
var currentSession = this.checkSession();
|
||||
if (currentSession === false) {
|
||||
return;
|
||||
}
|
||||
//DEV
|
||||
//var currentSession = this.checkSession();
|
||||
//if (currentSession === false) {
|
||||
// return;
|
||||
//}
|
||||
|
||||
window.arangoCollectionsStore.fetch({
|
||||
success: function () {
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
<ul class="thumbnails2">
|
||||
<div id="transparentHeader">
|
||||
<div id="documentsToolbar" class="pagination pagination-small pagination-right">
|
||||
<div id="documentsInputDiv">
|
||||
<input id="documentsUpload" name="Datei" type="file">
|
||||
|
||||
<div id="documentsUploadDiv" class="btn btn-primary btn-success btn-block">
|
||||
<input id="documentsUpload" name="docImport" id="docImport" type="file">Import
|
||||
</div>
|
||||
|
||||
<ul>
|
||||
<li class="enabled"><a id="collectionPrev"><i class="icon icon-white icon-chevron-left"></i></a></li>
|
||||
<li class="enabled"><a id="collectionNext"><i class="icon icon-white icon-chevron-right"></i></a></li>
|
||||
|
|
|
@ -54,8 +54,6 @@ var documentsView = Backbone.View.extend({
|
|||
uploadSetup: function () {
|
||||
var self = this;
|
||||
var file;
|
||||
var type = "documents"
|
||||
var create = false;
|
||||
var filetype;
|
||||
|
||||
$('#documentsUpload').bind("change", function(e) {
|
||||
|
@ -69,17 +67,19 @@ var documentsView = Backbone.View.extend({
|
|||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
beforeSend: function(request) {
|
||||
},
|
||||
url: '/_api/import?type='+type+'&collection='+encodeURIComponent(self.colid)+'&createCollection='+create,
|
||||
async: false,
|
||||
url: '/_api/import?type=documents&collection='+encodeURIComponent(self.colid)+'&createCollection=false',
|
||||
data: file,
|
||||
processData: false,
|
||||
contentType: file.type,
|
||||
dataType: file.type,
|
||||
success: function(data) {
|
||||
arangoHelper.arangoNotification("Upload successful");
|
||||
},
|
||||
error: function(data) {
|
||||
contentType: 'json',
|
||||
dataType: 'json',
|
||||
complete: function(xhr) {
|
||||
if (xhr.readyState == 4) {
|
||||
if (xhr.status == 201) {
|
||||
arangoHelper.arangoNotification("Upload successful");
|
||||
return;
|
||||
}
|
||||
}
|
||||
arangoHelper.arangoNotification("Upload error");
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue