Skip to content

Commit

Permalink
Merge pull request #293 from EsupPortail/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
ptitloup authored Jun 26, 2020
2 parents de9ec91 + 6f198e8 commit 80a0d07
Show file tree
Hide file tree
Showing 22 changed files with 1,442 additions and 346 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ log/
media/
pod/*/migrations/
pod/custom/*
!pod/custom/settings_local.py.example
settings_local.py
## Others
pod/static/
Expand Down
20 changes: 18 additions & 2 deletions pod/authentication/populatedCASbackend.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,26 @@ def populateUser(tree):
populate_user_from_entry(user, owner, entry)


def get_server():
if isinstance(LDAP_SERVER['url'], str):
server = Server(LDAP_SERVER['url'], port=LDAP_SERVER[
'port'], use_ssl=LDAP_SERVER[
'use_ssl'], get_info=ALL)
elif isinstance(LDAP_SERVER['url'], tuple):
hosts = []
for server in LDAP_SERVER['url']:
if not (server == LDAP_SERVER['url'][0]):
hosts.append(server)
server = Server(LDAP_SERVER['url'][0], port=LDAP_SERVER[
'port'], use_ssl=LDAP_SERVER[
'use_ssl'], get_info=ALL,
allowed_referral_hosts=hosts)
return server


def get_ldap_conn():
try:
server = Server(LDAP_SERVER['url'], port=LDAP_SERVER[
'port'], use_ssl=LDAP_SERVER['use_ssl'], get_info=ALL)
server = get_server()
conn = Connection(
server, AUTH_LDAP_BIND_DN, AUTH_LDAP_BIND_PASSWORD, auto_bind=True)
return conn
Expand Down
11 changes: 7 additions & 4 deletions pod/chapter/static/css/videojs-chapters.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
right: 0;
top: 0;
height: 100%;
width: 10%;
width: 20%;
background-color: rgba(43,51,63,0.7);
overflow-y: auto;
border: 2px solid black;
/*border: 2px solid black;*/
cursor: default;
}
.chapters-list.inactive {
Expand All @@ -31,13 +31,15 @@
position: relative;
margin: 0;
padding: 0;
padding-bottom: 30px;
}
.chapters-list ol li {
display: list-item;
list-style-type: none;
text-align: -webkit-match-parent;
background-color: rgba(0, 0, 0, 0.8);
margin: 3px;
/*background-color: rgba(0, 0, 0, 0.8);*/
margin: 0 3px;
border-top:1px solid rgba(0, 0, 0, 0.8);
}
.chapters-list ol li a:hover,
.chapters-list ol li a.current {
Expand All @@ -51,6 +53,7 @@
transition: .3s;
color: #fff;
text-align: left;
font-size:1.3em;
}

#chapters {
Expand Down
6 changes: 3 additions & 3 deletions pod/chapter/static/js/videojs-chapters.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
var MenuButton = videojs.getComponent('MenuButton');
var ChapterMenuButton = videojs.extend(MenuButton, {
constructor: function(player, options){
options.label = 'Chapters';
options.label = gettext('Chapters');
MenuButton.call(this, player, options);
this.el().setAttribute('aria-label', 'Chapters');
this.el().setAttribute('aria-label', gettext('Chapters'));
videojs.dom.addClass(this.el(), 'vjs-chapters-button');
this.controlText('Chapters');
this.controlText(gettext('Chapters'));

var span = document.createElement('span');
videojs.dom.addClass(span, 'vjs-chapters-icon');
Expand Down
Loading

0 comments on commit 80a0d07

Please sign in to comment.