Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iena-course-format
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
iena
iena-course-format
Commits
9ffe7276
Commit
9ffe7276
authored
1 year ago
by
DELARUELLE Myriam
Browse files
Options
Downloads
Patches
Plain Diff
fix css description sections et header
parent
d9c71425
No related branches found
No related tags found
Loading
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
format.js
+26
-1
26 additions, 1 deletion
format.js
styles.css
+24
-3
24 additions, 3 deletions
styles.css
templates/courseformat/content/section/content.mustache
+12
-3
12 additions, 3 deletions
templates/courseformat/content/section/content.mustache
with
62 additions
and
7 deletions
format.js
+
26
−
1
View file @
9ffe7276
...
@@ -73,10 +73,35 @@ M.course.format.process_sections = function(Y, sectionlist, response, sectionfro
...
@@ -73,10 +73,35 @@ M.course.format.process_sections = function(Y, sectionlist, response, sectionfro
};
};
(
function
()
{
(
function
()
{
$
(
"
.description-inner
"
).
each
(
function
(
index
){
if
(
parseInt
(
$
(
this
).
css
(
'
height
'
))
<=
144
){
$
(
this
).
parent
().
next
().
hide
();
}
})
//Gère les animations sur les descriptions des sections pour agrandir/rétrecir les infos
$
(
'
.section
'
).
find
(
'
a[href="#"].voir-plus
'
).
on
(
'
click
'
,
function
(
e
)
{
$
(
'
.section
'
).
find
(
'
a[href="#"].voir-plus
'
).
on
(
'
click
'
,
function
(
e
)
{
e
.
preventDefault
();
e
.
preventDefault
();
this
.
expand
=
!
this
.
expand
;
this
.
expand
=
!
this
.
expand
;
$
(
this
).
text
(
this
.
expand
?
"
Réduire la description
"
:
"
Voir la description complète
"
);
$
(
this
).
text
(
this
.
expand
?
"
Réduire la description
"
:
"
Voir la description complète
"
);
$
(
this
).
closest
(
'
.section
'
).
find
(
'
.small, .big
'
).
toggleClass
(
'
small big
'
);
//$(this).closest('.section').find('.small, .big').toggleClass('small big');
//
if
(
$
(
this
).
prev
().
hasClass
(
'
small
'
)){
$
(
this
).
prev
().
toggleClass
(
'
small big
'
);
var
height
=
$
(
this
).
prev
().
find
(
"
.description-inner
"
).
css
(
"
height
"
);
$
(
this
).
prev
().
animate
({
"
max-height
"
:
height
},
"
slow
"
);
}
else
if
(
$
(
this
).
prev
().
hasClass
(
'
big
'
)){
$
(
this
).
prev
().
toggleClass
(
'
small big
'
);
$
(
this
).
prev
().
animate
({
"
max-height
"
:
'
144px
'
},
"
slow
"
);
}
else
{
$
(
this
).
prev
().
addClass
(
"
big
"
);
var
height
=
$
(
this
).
prev
().
find
(
"
.description-inner
"
).
css
(
"
height
"
);
$
(
this
).
prev
().
animate
({
"
max-height
"
:
height
},
"
slow
"
);
}
});
});
}(
jQuery
));
}(
jQuery
));
\ No newline at end of file
This diff is collapsed.
Click to expand it.
styles.css
+
24
−
3
View file @
9ffe7276
...
@@ -55,6 +55,12 @@ ul.iena-editing .voir-plus {
...
@@ -55,6 +55,12 @@ ul.iena-editing .voir-plus {
border-bottom-right-radius
:
7px
;
border-bottom-right-radius
:
7px
;
}
}
.voir-plus
{
margin-left
:
3%
;
margin-top
:
14px
;
}
.iena-section
.instancename
{
.iena-section
.instancename
{
font-size
:
1rem
;
font-size
:
1rem
;
}
}
...
@@ -272,13 +278,28 @@ ul.nav.navbar-nav.ml-auto {
...
@@ -272,13 +278,28 @@ ul.nav.navbar-nav.ml-auto {
}
}
.iena-description
{
.iena-description
{
background
:
#EEE
;
color
:
#323232
;
color
:
#323232
;
padding
:
1rem
;
padding
:
1rem
;
clear
:
both
;
clear
:
both
;
margin-bottom
:
0.5rem
;
display
:
flex
;
align-items
:
baseline
;
flex-wrap
:
wrap
;
border-top
:
1px
solid
#dee2e6
;
}
}
.iena-description
i
{
color
:
#2a657d
;
flex-basis
:
3%
;
}
.course-description-item.summarytext
{
flex-basis
:
97%
;
overflow
:
hidden
;
max-height
:
144px
;
}
/* iENA course format header with progression */
/* iENA course format header with progression */
...
@@ -354,7 +375,7 @@ ul.nav.navbar-nav.ml-auto {
...
@@ -354,7 +375,7 @@ ul.nav.navbar-nav.ml-auto {
.iena-course-header
>
.iena-course-header-bottom
{
.iena-course-header
>
.iena-course-header-bottom
{
margin-bottom
:
40px
;
margin-bottom
:
40px
;
background
:
#eaeaea
;
background
:
#eaeaea
;
padding
:
1
5px
;
padding
:
1
.5rem
;
border-radius
:
10px
;
border-radius
:
10px
;
}
}
...
...
This diff is collapsed.
Click to expand it.
templates/courseformat/content/section/content.mustache
+
12
−
3
View file @
9ffe7276
...
@@ -130,9 +130,18 @@
...
@@ -130,9 +130,18 @@
{{/
iscoursedisplaymultipage
}}
"
>
{{/
iscoursedisplaymultipage
}}
"
>
<div
class=
"
{{#
hasavailability
}}
description
{{/
hasavailability
}}
my-3"
data-for=
"sectioninfo"
>
<div
class=
"
{{#
hasavailability
}}
description
{{/
hasavailability
}}
my-3"
data-for=
"sectioninfo"
>
{{#
summary
}}
{{#
summary
}}
{{
$
core_courseformat
/
local
/
content
/
section
/
summary
}}
{{#
summarytext
}}
{{>
core_courseformat
/
local
/
content
/
section
/
summary
}}
<div
class=
"iena-summary"
>
{{/
core_courseformat
/
local
/
content
/
section
/
summary
}}
<div
class=
"iena-description"
>
<i
class=
"fa fa-info-circle"
aria-hidden=
"true"
></i>
{{
$
core_courseformat
/
local
/
content
/
section
/
summary
}}
{{>
core_courseformat
/
local
/
content
/
section
/
summary
}}
{{/
core_courseformat
/
local
/
content
/
section
/
summary
}}
<a
href=
"#"
class=
"voir-plus"
>
Voir la description complète
</a>
</div>
</div>
{{/
summarytext
}}
{{/
summary
}}
{{/
summary
}}
{{#
availability
}}
{{#
availability
}}
{{
$
core_courseformat
/
local
/
content
/
section
/
availability
}}
{{
$
core_courseformat
/
local
/
content
/
section
/
availability
}}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment