remove pdf import options
This commit is contained in:
parent
d544caf4a7
commit
9cb04422d8
@ -2500,18 +2500,9 @@ var SpacedeckSections = {
|
|||||||
this.opened_dialog = "none";
|
this.opened_dialog = "none";
|
||||||
|
|
||||||
if (files && files.length) {
|
if (files && files.length) {
|
||||||
console.log("file: ",files[0]);
|
|
||||||
|
|
||||||
for (var i=0; i<files.length; i++) {
|
for (var i=0; i<files.length; i++) {
|
||||||
var file = files[i];
|
var file = files[i];
|
||||||
if (file.type === "application/pdf") {
|
this.create_artifact_via_upload(null, file, true);
|
||||||
var point = {x: 100, y: 100}; //fixme, center upload?
|
|
||||||
this.dropped_point = point;
|
|
||||||
this.pending_pdf_file = file;
|
|
||||||
this.activate_modal('pdfoptions');
|
|
||||||
} else {
|
|
||||||
this.create_artifact_via_upload(null, file, true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -2855,32 +2846,6 @@ var SpacedeckSections = {
|
|||||||
}.bind(this),500);
|
}.bind(this),500);
|
||||||
},
|
},
|
||||||
|
|
||||||
approve_pdf_upload: function(evt,approve_pdf_upload, mode){
|
|
||||||
this.close_modal();
|
|
||||||
|
|
||||||
if(mode == "classic"){
|
|
||||||
this.create_artifact_via_upload(evt, this.pending_pdf_file, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(mode == "grid") {
|
|
||||||
this.global_spinner = true;
|
|
||||||
save_pdf_file(this.active_space, this.dropped_point, this.pending_pdf_file, approve_pdf_upload, function(createdArtifacts){
|
|
||||||
|
|
||||||
this.global_spinner = false;
|
|
||||||
|
|
||||||
_.each(createdArtifacts, function(new_artifact){
|
|
||||||
this.update_board_artifact_viewmodel(new_artifact);
|
|
||||||
this.active_space_artifacts.push(new_artifact)
|
|
||||||
}.bind(this));
|
|
||||||
|
|
||||||
}.bind(this), function(xhr) {
|
|
||||||
this.global_spinner = false;
|
|
||||||
alert("Error PDF ("+xhr.status+")");
|
|
||||||
}.bind(this));
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
handle_data_drop: function(evt) {
|
handle_data_drop: function(evt) {
|
||||||
if (this.active_space_role=="viewer") {
|
if (this.active_space_role=="viewer") {
|
||||||
return false;
|
return false;
|
||||||
@ -2893,17 +2858,8 @@ var SpacedeckSections = {
|
|||||||
if (files && files.length) {
|
if (files && files.length) {
|
||||||
for (var i=0; i<files.length; i++) {
|
for (var i=0; i<files.length; i++) {
|
||||||
var file = files[i];
|
var file = files[i];
|
||||||
if (file.type === "application/pdf") {
|
this.create_artifact_via_upload(evt, file, (files.length>1));
|
||||||
var point = this.cursor_point_to_space(evt);
|
|
||||||
this.dropped_point = point;
|
|
||||||
this.pending_pdf_file = file;
|
|
||||||
this.activate_modal('pdfoptions');
|
|
||||||
|
|
||||||
} else {
|
|
||||||
this.create_artifact_via_upload(evt, file, (files.length>1));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
var json = evt.dataTransfer.getData('application/json');
|
var json = evt.dataTransfer.getData('application/json');
|
||||||
|
|
||||||
|
@ -145,11 +145,6 @@
|
|||||||
<source v-for="rep in a.payload_alternatives" v-bind:src="rep.payload_uri" v-bind:type="rep.mime" />
|
<source v-for="rep in a.payload_alternatives" v-bind:src="rep.payload_uri" v-bind:type="rep.mime" />
|
||||||
</video>
|
</video>
|
||||||
|
|
||||||
<a class="btn btn-md btn-icon btn-round btn-primary edit"
|
|
||||||
v-show="a.mime == 'application/pdf'"
|
|
||||||
v-bind:href="a.payload_uri" target="_blank"
|
|
||||||
><span class="icon icon-link"></span></a>
|
|
||||||
|
|
||||||
<span v-if="a.view.link.length>0" class="link-wrapper">
|
<span v-if="a.view.link.length>0" class="link-wrapper">
|
||||||
<a class="link btn btn-round btn-primary btn-sm" v-if="a.view.link" v-bind:href="a.view.link" target="_blank">{{a.view.link_caption}}</a>
|
<a class="link btn btn-round btn-primary btn-sm" v-if="a.view.link" v-bind:href="a.view.link" target="_blank">{{a.view.link_caption}}</a>
|
||||||
</span>
|
</span>
|
||||||
|
Loading…
Reference in New Issue
Block a user