Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Wolfgang Knopki
Spacedeck-open-SAML
Commits
9cb04422
Commit
9cb04422
authored
Apr 09, 2020
by
mntmn
Browse files
remove pdf import options
parent
d544caf4
Changes
2
Hide whitespace changes
Inline
Side-by-side
public/javascripts/spacedeck_sections.js
View file @
9cb04422
...
...
@@ -2500,18 +2500,9 @@ var SpacedeckSections = {
this
.
opened_dialog
=
"
none
"
;
if
(
files
&&
files
.
length
)
{
console
.
log
(
"
file:
"
,
files
[
0
]);
for
(
var
i
=
0
;
i
<
files
.
length
;
i
++
)
{
var
file
=
files
[
i
];
if
(
file
.
type
===
"
application/pdf
"
)
{
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
);
}
this
.
create_artifact_via_upload
(
null
,
file
,
true
);
}
}
},
...
...
@@ -2855,32 +2846,6 @@ var SpacedeckSections = {
}.
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
)
{
if
(
this
.
active_space_role
==
"
viewer
"
)
{
return
false
;
...
...
@@ -2893,17 +2858,8 @@ var SpacedeckSections = {
if
(
files
&&
files
.
length
)
{
for
(
var
i
=
0
;
i
<
files
.
length
;
i
++
)
{
var
file
=
files
[
i
];
if
(
file
.
type
===
"
application/pdf
"
)
{
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
));
}
this
.
create_artifact_via_upload
(
evt
,
file
,
(
files
.
length
>
1
));
}
}
else
{
var
json
=
evt
.
dataTransfer
.
getData
(
'
application/json
'
);
...
...
views/partials/space.html
View file @
9cb04422
...
...
@@ -145,11 +145,6 @@
<source
v-for=
"rep in a.payload_alternatives"
v-bind:src=
"rep.payload_uri"
v-bind:type=
"rep.mime"
/>
</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"
>
<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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment