Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Websites UFRPE
Wagtail Videos
Commits
fa8916ec
Commit
fa8916ec
authored
Oct 24, 2022
by
Seb
Browse files
fixup feature detection redirect + listing change
parent
cc49cd6d
Changes
4
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
fa8916ec
...
@@ -8,3 +8,4 @@ venv/
...
@@ -8,3 +8,4 @@ venv/
tests.sqlite3
tests.sqlite3
.tox
.tox
build/
build/
.prettierignore
\ No newline at end of file
wagtailvideos/static/wagtailvideos/js/add-multiple.js
View file @
fa8916ec
$
(
function
()
{
$
(
function
()
{
// Redirect users that don't support filereader
if
(
!
$
(
'
html
'
).
hasClass
(
'
filereader
'
))
{
document
.
location
.
href
=
window
.
fileupload_opts
.
simple_upload_url
;
return
false
;
}
// prevents browser default drag/drop
// prevents browser default drag/drop
$
(
document
).
bind
(
'
drop dragover
'
,
function
(
e
)
{
$
(
document
).
bind
(
'
drop dragover
'
,
function
(
e
)
{
e
.
preventDefault
();
e
.
preventDefault
();
...
...
wagtailvideos/templates/wagtailvideos/multiple/add.html
View file @
fa8916ec
{% extends "wagtailadmin/base.html" %}
{% extends "wagtailadmin/base.html" %}
{% load i18n static %}
{% load i18n static
wagtailadmin_tags
%}
{% block titletag %}{% trans "Add multiple videos" %}{% endblock %}
{% block titletag %}{% trans "Add multiple videos" %}{% endblock %}
{% block extra_css %}
{% block extra_css %}
{{ block.super }}
{{ block.super }}
<!-- it's cheating but we're just going to use wagtailimages css since they should look identical anyways -->
<link
rel=
"stylesheet"
href=
"{% static 'wagtailimages/css/add-multiple.css' %}"
type=
"text/css"
/>
{% endblock %}
{% endblock %}
{% block content %}
{% block content %}
...
@@ -67,10 +66,14 @@
...
@@ -67,10 +66,14 @@
{{ block.super }}
{{ block.super }}
<!-- this exact order of plugins is vital -->
<!-- this exact order of plugins is vital -->
<script
src=
"{% static 'wagtailadmin/js/vendor/jquery.iframe-transport.js' %}"
></script>
<script
src=
"{% versioned_static 'wagtailimages/js/vendor/load-image.min.js' %}"
></script>
<script
src=
"{% static 'wagtailadmin/js/vendor/jquery.fileupload.js' %}"
></script>
<script
src=
"{% versioned_static 'wagtailimages/js/vendor/canvas-to-blob.min.js' %}"
></script>
<script
src=
"{% static 'wagtailadmin/js/vendor/jquery.fileupload-process.js' %}"
></script>
<script
src=
"{% versioned_static 'wagtailadmin/js/vendor/jquery.iframe-transport.js' %}"
></script>
<script
src=
"{% static 'wagtailadmin/js/vendor/tag-it.js' %}"
></script>
<script
src=
"{% versioned_static 'wagtailadmin/js/vendor/jquery.fileupload.js' %}"
></script>
<script
src=
"{% versioned_static 'wagtailadmin/js/vendor/jquery.fileupload-process.js' %}"
></script>
<script
src=
"{% versioned_static 'wagtailimages/js/vendor/jquery.fileupload-image.js' %}"
></script>
<script
src=
"{% versioned_static 'wagtailimages/js/vendor/jquery.fileupload-validate.js' %}"
></script>
<script
src=
"{% versioned_static 'wagtailadmin/js/vendor/tag-it.js' %}"
></script>
<!-- Main script -->
<!-- Main script -->
<script
src=
"{% static 'wagtailvideos/js/add-multiple.js' %}"
></script>
<script
src=
"{% static 'wagtailvideos/js/add-multiple.js' %}"
></script>
...
...
wagtailvideos/templates/wagtailvideos/videos/results.html
View file @
fa8916ec
...
@@ -19,12 +19,12 @@
...
@@ -19,12 +19,12 @@
{% for video in videos %}
{% for video in videos %}
<li>
<li>
<a
class=
"image-choice"
href=
"{% url 'wagtailvideos:edit' video.id %}"
>
<a
class=
"image-choice"
href=
"{% url 'wagtailvideos:edit' video.id %}"
>
<
div
class=
"image"
>
<
figure
>
{% if video.thumbnail %}
{% if video.thumbnail %}
<img
src=
"{{ video.thumbnail.url }}"
height=
"165"
width=
"165"
class=
"show-transparency"
alt=
"{% trans 'Video thumbnail' %}"
/>
<img
src=
"{{ video.thumbnail.url }}"
height=
"165"
width=
"165"
class=
"show-transparency"
alt=
"{% trans 'Video thumbnail' %}"
/>
{% endif %}
{% endif %}
</div
>
<figcaption>
{{ video.title|ellipsistrim:60 }}
</figcaption
>
<
h3>
{{ video.title|ellipsistrim:60 }}
</h3
>
<
/figure
>
</a>
</a>
</li>
</li>
{% endfor %}
{% endfor %}
...
...
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