Skip to content

Commit

Permalink
Merge pull request #318 from EsupPortail/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
ptitloup authored Sep 7, 2020
2 parents 63e6a36 + 0317444 commit 13b83fb
Show file tree
Hide file tree
Showing 62 changed files with 6,694 additions and 3,640 deletions.
13 changes: 13 additions & 0 deletions pod/authentication/rest_views.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from django.contrib.auth.models import User, Group
from django.contrib.sites.models import Site
from .models import Owner
from rest_framework import serializers, viewsets

Expand Down Expand Up @@ -27,6 +28,13 @@ class Meta:
model = Group
fields = ('url', 'name')


class SiteSerializer(serializers.HyperlinkedModelSerializer):

class Meta:
model = Site
fields = ('url', 'name', 'domain')

# ViewSets define the view behavior.


Expand All @@ -43,3 +51,8 @@ class UserViewSet(viewsets.ModelViewSet):
class GroupViewSet(viewsets.ModelViewSet):
queryset = Group.objects.all()
serializer_class = GroupSerializer


class SiteViewSet(viewsets.ModelViewSet):
queryset = Site.objects.all()
serializer_class = SiteSerializer
2 changes: 1 addition & 1 deletion pod/chapter/static/js/videojs-chapters.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
var MenuButton = videojs.getComponent('MenuButton');
var ChapterMenuButton = videojs.extend(MenuButton, {
constructor: function(player, options){
constructor: function(player, options){
options.label = gettext('Chapters');
MenuButton.call(this, player, options);
this.el().setAttribute('aria-label', gettext('Chapters'));
Expand Down
5 changes: 1 addition & 4 deletions pod/completion/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,12 @@ def __init__(self, *args, **kwargs):
self.fields['video'].widget = HiddenInput()
self.fields[myField].widget.attrs[
'placeholder'] = self.fields[myField].label
self.fields[myField].widget.attrs['class'] = 'form-control'
if self.fields[myField].required:
self.fields[myField].widget.attrs[
'class'] = 'form-control required'
label_unicode = u'{0}'.format(self.fields[myField].label)
self.fields[myField].label = mark_safe(
'{0} <span class="special_class">*</span>'.format(
label_unicode))
else:
self.fields[myField].widget.attrs['class'] = 'form-control'
self.fields['role'].widget.attrs['class'] = 'custom-select'

class Meta(object):
Expand Down
75 changes: 43 additions & 32 deletions pod/completion/static/css/caption_maker.css
Original file line number Diff line number Diff line change
Expand Up @@ -43,46 +43,57 @@
textarea {
line-height: 16px;
font-size: 14px;
resize: none;
border: 1px solid #ccc;
border-radius: 4px;
}

/* the list of captions */

#display {
border: solid 1px #999;
height: 442px;
overflow: auto;
}

#display div {
cursor: pointer;
padding: 2px 0 3px 0;
white-space: nowrap;
overflow: hidden;
}

#display div:nth-child(odd) {
background-color: #5BC2EC;
.gray_no_video{
display: flex;
flex-wrap: wrap;
}

#display div:nth-child(even) {
background-color: #bef;
.caption_content .caption_title{
display: flex;
position: relative;
}

#display div:hover {
background-color: #ECA809;
.caption_content svg{
width: 20px;
color: var(--secondary);
margin-left: 4px;
}

#display div span {
margin-left: 1em;
display: inline-block;
vertical-align: top;
.caption_content .caption_title svg:hover + .help_text{
display: block;
}

#display div span:nth-child(3) {
font-style: italic;
.caption_content .help_text{
display: none;
position: absolute;
background: var(--primary);
color: #fff;
width: calc(100% - 110px);
right: 0;
padding: .4em .8em;
border-radius: 4px;
box-shadow: 4px 4px 10px #ccc;
font-size: 15px;
line-height: 1.4;
}


#captionmakerModal.save > .modal-dialog {
max-width: 1000px;
}
}
@media only screen and (max-width: 800px){
.gray_no_video{
display: flex;
flex-direction: column;
}
.gray_no_video > div{
width: 100% !important;
}
.gray_no_video div:first-child{
overflow: hidden;
margin: 0;
margin-bottom: 1em;
min-height: unset !important;
}
}
Loading

0 comments on commit 13b83fb

Please sign in to comment.