Skip to content

Commit

Permalink
Merge pull request #215 from EsupPortail/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
ptitloup authored Feb 19, 2020
2 parents 3583768 + 9755088 commit 5cc445c
Show file tree
Hide file tree
Showing 36 changed files with 496 additions and 264 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ pod/static/
# IDE Files #
#############
.idea
.vscode

# Certificates #
################
Expand Down
6 changes: 4 additions & 2 deletions pod/authentication/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,14 @@ def get_fields(self, request, obj=None):
class Media:
css = {
"all": (
'css/podfile.css',
'bootstrap-4/css/bootstrap.min.css',
'bootstrap-4/css/bootstrap-grid.css',
'css/pod.css'
)
}
js = (
'js/filewidget.js',
'podfile/js/filewidget.js',
'js/main.js',
'feather-icons/feather.min.js',
'bootstrap-4/js/bootstrap.min.js')

Expand Down
3 changes: 2 additions & 1 deletion pod/chapter/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@

from pod.video.models import Video
from pod.main.models import get_nextautoincrement
from select2 import fields as select2_fields


class Chapter(models.Model):
video = models.ForeignKey(Video, verbose_name=_('video'))
video = select2_fields.ForeignKey(Video, verbose_name=_('video'))
title = models.CharField(_('title'), max_length=100)
slug = models.SlugField(
_('slug'),
Expand Down
12 changes: 8 additions & 4 deletions pod/completion/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,14 @@ class DocumentAdmin(admin.ModelAdmin):
class Media:
css = {
"all": (
'css/podfile.css',
'bootstrap-4/css/bootstrap.min.css',
'bootstrap-4/css/bootstrap-grid.css',
'css/pod.css'
)
}
js = (
'js/filewidget.js',
'podfile/js/filewidget.js',
'js/main.js',
'feather-icons/feather.min.js',
'bootstrap-4/js/bootstrap.min.js')

Expand Down Expand Up @@ -85,12 +87,14 @@ class TrackAdmin(admin.ModelAdmin):
class Media:
css = {
"all": (
'css/podfile.css',
'bootstrap-4/css/bootstrap.min.css',
'bootstrap-4/css/bootstrap-grid.css',
'css/pod.css'
)
}
js = (
'js/filewidget.js',
'js/main.js',
'podfile/js/filewidget.js',
'feather-icons/feather.min.js',
'bootstrap-4/js/bootstrap.min.js')

Expand Down
9 changes: 5 additions & 4 deletions pod/completion/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from ckeditor.fields import RichTextField
from pod.video.models import Video
from pod.main.models import get_nextautoincrement
from select2 import fields as select2_fields

if getattr(settings, 'USE_PODFILE', False):
FILEPICKER = True
Expand Down Expand Up @@ -47,7 +48,7 @@

class Contributor(models.Model):

video = models.ForeignKey(Video, verbose_name=_('video'))
video = select2_fields.ForeignKey(Video, verbose_name=_('video'))
name = models.CharField(_('lastname / firstname'), max_length=200)
email_address = models.EmailField(
_('mail'), null=True, blank=True, default='')
Expand Down Expand Up @@ -110,7 +111,7 @@ def get_noscript_mail(self):


class Document(models.Model):
video = models.ForeignKey(Video, verbose_name=_('Video'))
video = select2_fields.ForeignKey(Video, verbose_name=_('Video'))
document = models.ForeignKey(
CustomFileModel,
null=True,
Expand Down Expand Up @@ -161,7 +162,7 @@ def __str__(self):

class Track(models.Model):

video = models.ForeignKey(Video, verbose_name=_('Video'))
video = select2_fields.ForeignKey(Video, verbose_name=_('Video'))
kind = models.CharField(
_('Kind'),
max_length=10,
Expand Down Expand Up @@ -238,7 +239,7 @@ class Overlay(models.Model):
('left', _(u'left')),
)

video = models.ForeignKey(Video, verbose_name=_('Video'))
video = select2_fields.ForeignKey(Video, verbose_name=_('Video'))
title = models.CharField(_('Title'), max_length=100)
slug = models.SlugField(
_('Slug'),
Expand Down
4 changes: 3 additions & 1 deletion pod/completion/static/js/caption_maker.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ $(document).on('click', '#modal-btn-new, #modal-btn-override', function() {
$("#saveCaptionsModal").modal('hide');
if (this.id == 'modal-btn-override') {
$('#form_save_captions').find('input[name="file_id"]').val(file_loaded_id);
send_form_save_captions($('#fileinput_id_src').find('strong').html());
//alert($('#fileinput_id_src').find('strong').find('a').html());
//alert($('#fileinput_id_src').text().trim());
send_form_save_captions($('#fileinput_id_src').text().trim());
}
else if (this.id == 'modal-btn-new') {
$('#form_save_captions').find('input[name="file_id"]').val("");
Expand Down
12 changes: 8 additions & 4 deletions pod/enrichment/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@ class EnrichmentAdmin(admin.ModelAdmin):
class Media:
css = {
"all": (
'css/podfile.css',
'bootstrap-4/css/bootstrap.min.css',
'bootstrap-4/css/bootstrap-grid.css',
'css/pod.css'
)
}
js = (
'js/filewidget.js',
'js/main.js',
'podfile/js/filewidget.js',
'feather-icons/feather.min.js',
'bootstrap-4/js/bootstrap.min.js')

Expand Down Expand Up @@ -59,12 +61,14 @@ def get_file_name(self, obj):
class Media:
css = {
"all": (
'css/podfile.css',
'bootstrap-4/css/bootstrap.min.css',
'bootstrap-4/css/bootstrap-grid.css',
'css/pod.css'
)
}
js = (
'js/filewidget.js',
'js/main.js',
'podfile/js/filewidget.js',
'feather-icons/feather.min.js',
'bootstrap-4/js/bootstrap.min.js')

Expand Down
11 changes: 6 additions & 5 deletions pod/enrichment/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

from pod.video.models import Video
from pod.main.models import get_nextautoincrement
from select2 import fields as select2_fields

import os
import datetime
Expand Down Expand Up @@ -110,7 +111,7 @@ class Enrichment(models.Model):
('embed', _("embed")),
)

video = models.ForeignKey(Video, verbose_name=_('video'))
video = select2_fields.ForeignKey(Video, verbose_name=_('video'))
title = models.CharField(_('title'), max_length=100)
slug = models.SlugField(
_('slug'),
Expand Down Expand Up @@ -305,10 +306,10 @@ def verify_attributs(self):


class EnrichmentGroup(models.Model):
video = models.OneToOneField(Video, verbose_name=_('Video'),
# editable=False, null=True,
on_delete=models.CASCADE)
groups = models.ManyToManyField(
video = select2_fields.OneToOneField(Video, verbose_name=_('Video'),
# editable=False, null=True,
on_delete=models.CASCADE)
groups = select2_fields.ManyToManyField(
Group, blank=True, verbose_name=_('Groups'),
help_text=_('Select one or more groups who'
' can access to the'
Expand Down
12 changes: 8 additions & 4 deletions pod/live/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@ class BuildingAdmin(admin.ModelAdmin):
class Media:
css = {
"all": (
'css/podfile.css',
'bootstrap-4/css/bootstrap.min.css',
'bootstrap-4/css/bootstrap-grid.css',
'css/pod.css'
)
}
js = (
'js/filewidget.js',
'js/main.js',
'podfile/js/filewidget.js',
'feather-icons/feather.min.js',
'bootstrap-4/js/bootstrap.min.js')

Expand All @@ -35,12 +37,14 @@ class BroadcasterAdmin(admin.ModelAdmin):
class Media:
css = {
"all": (
'css/podfile.css',
'bootstrap-4/css/bootstrap.min.css',
'bootstrap-4/css/bootstrap-grid.css',
'css/pod.css'
)
}
js = (
'js/filewidget.js',
'js/main.js',
'podfile/js/filewidget.js',
'feather-icons/feather.min.js',
'bootstrap-4/js/bootstrap.min.js')

Expand Down
3 changes: 2 additions & 1 deletion pod/live/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from ckeditor.fields import RichTextField
from django.template.defaultfilters import slugify
from pod.video.models import Video
from select2 import fields as select2_fields

if getattr(settings, 'USE_PODFILE', False):
from pod.podfile.models import CustomImageModel
Expand Down Expand Up @@ -60,7 +61,7 @@ class Broadcaster(models.Model):
verbose_name=_('Poster'))
url = models.URLField(_('URL'), help_text=_(
'Url of the stream'), unique=True)
video_on_hold = models.ForeignKey(Video, help_text=_(
video_on_hold = select2_fields.ForeignKey(Video, help_text=_(
'This video will be displayed when there is no live stream.'),
blank=True,
null=True,
Expand Down
Binary file modified pod/locale/fr/LC_MESSAGES/django.mo
Binary file not shown.
Loading

0 comments on commit 5cc445c

Please sign in to comment.