Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
709faa47
Commit
709faa47
authored
May 15, 2012
by
Galen Frechette
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
makes the sequence nav more semantic and replaces js hover with css
parent
1b8ea444
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
111 additions
and
111 deletions
+111
-111
static/css/application.css
+18
-14
templates/courseware.html
+0
-4
templates/sass/courseware/_sequence-nav.scss
+84
-84
templates/seq_module.js
+9
-9
No files found.
static/css/application.css
View file @
709faa47
...
...
@@ -3617,6 +3617,7 @@ nav.sequence-nav ol li a {
display
:
block
;
height
:
17px
;
padding
:
15px
0
14px
;
position
:
relative
;
-webkit-transition-property
:
all
;
-moz-transition-property
:
all
;
-ms-transition-property
:
all
;
...
...
@@ -3665,25 +3666,27 @@ nav.sequence-nav ol li a.seq_vertical_visited, nav.sequence-nav ol li a.seq_prob
nav
.sequence-nav
ol
li
a
.seq_vertical_active
,
nav
.sequence-nav
ol
li
a
.seq_problem_active
{
background-image
:
url("/static/images/sequence-nav/list-icon-current.png")
;
background-position
:
center
;
}
nav
.sequence-nav
ol
li
p
{
nav
.sequence-nav
ol
li
a
p
{
background
:
#333
;
color
:
#fff
;
display
:
none
;
line-height
:
22.652px
;
margin
:
0px
0
0
-5
px
;
left
:
0
px
;
opacity
:
0
;
padding
:
6px
;
position
:
absolute
;
top
:
48px
;
text-shadow
:
0
-1px
0
black
;
-webkit-transition-property
:
all
;
-moz-transition-property
:
all
;
-ms-transition-property
:
all
;
-o-transition-property
:
all
;
transition-property
:
all
;
-webkit-transition-duration
:
0.
6
s
;
-moz-transition-duration
:
0.
6
s
;
-ms-transition-duration
:
0.
6
s
;
-o-transition-duration
:
0.
6
s
;
transition-duration
:
0.
6
s
;
-webkit-transition-duration
:
0.
1
s
;
-moz-transition-duration
:
0.
1
s
;
-ms-transition-duration
:
0.
1
s
;
-o-transition-duration
:
0.
1
s
;
transition-duration
:
0.
1
s
;
-webkit-transition-timing-function
:
cubic-bezier
(
0.77
,
0
,
0.175
,
1
);
-moz-transition-timing-function
:
cubic-bezier
(
0.77
,
0
,
0.175
,
1
);
-ms-transition-timing-function
:
cubic-bezier
(
0.77
,
0
,
0.175
,
1
);
...
...
@@ -3694,16 +3697,13 @@ nav.sequence-nav ol li p {
-ms-transition-delay
:
0
;
-o-transition-delay
:
0
;
transition-delay
:
0
;
white-space
:
pre
-wrap
;
white-space
:
pre
;
z-index
:
99
;
}
nav
.sequence-nav
ol
li
p
.shown
{
margin-top
:
4px
;
opacity
:
1
;
}
nav
.sequence-nav
ol
li
p
:empty
{
nav
.sequence-nav
ol
li
a
p
:empty
{
background
:
none
;
}
nav
.sequence-nav
ol
li
p
:empty::after
{
nav
.sequence-nav
ol
li
a
p
:empty::after
{
display
:
none
;
}
nav
.sequence-nav
ol
li
p
::after
{
nav
.sequence-nav
ol
li
a
p
::after
{
background
:
#333
;
content
:
" "
;
display
:
block
;
...
...
@@ -3717,6 +3717,10 @@ nav.sequence-nav ol li p::after {
-o-transform
:
rotate
(
45deg
);
transform
:
rotate
(
45deg
);
width
:
10px
;
}
nav
.sequence-nav
ol
li
a
:hover
p
{
display
:
block
;
margin-top
:
4px
;
opacity
:
1
;
}
nav
.sequence-nav
ul
{
margin-right
:
1px
;
list-style
:
none
!important
;
...
...
templates/courseware.html
View file @
709faa47
...
...
@@ -12,10 +12,6 @@
<script
type=
"text/javascript"
>
$
(
function
()
{
$
{
init
}
$
(
".sequence-nav li a"
).
hover
(
function
(){
$
(
this
).
siblings
().
toggleClass
(
"shown"
);
});
});
</script>
</
%
block>
...
...
templates/sass/courseware/_sequence-nav.scss
View file @
709faa47
...
...
@@ -63,109 +63,109 @@ nav.sequence-nav {
display
:
block
;
height
:
17px
;
padding
:
15px
0
14px
;
position
:
relative
;
@include
transition
(
all
,
.4s
,
$ease-in-out-quad
);
width
:
100%
;
// @media screen and (max-width: 800px) {
// padding: 12px 8px;
// }
//video
&
.seq_video_inactive
{
@extend
.inactive
;
background-image
:
url('/static/images/sequence-nav/video-icon-normal.png')
;
background-position
:
center
;
}
&
.seq_video_visited
{
@extend
.visited
;
background-image
:
url('/static/images/sequence-nav/video-icon-visited.png')
;
background-position
:
center
;
}
//video
&
.seq_video_inactive
{
@extend
.inactive
;
background-image
:
url('/static/images/sequence-nav/video-icon-normal.png')
;
background-position
:
center
;
}
&
.seq_video_active
{
@extend
.active
;
background-image
:
url('/static/images/sequence-nav/video-icon-current
.png')
;
background-position
:
center
;
}
&
.seq_video_visited
{
@extend
.visited
;
background-image
:
url('/static/images/sequence-nav/video-icon-visited
.png')
;
background-position
:
center
;
}
//other
&
.seq_other_inactive
{
@extend
.inactive
;
background-image
:
url('/static/images/sequence-nav/document-icon-normal.png')
;
background-position
:
center
;
}
&
.seq_video_active
{
@extend
.active
;
background-image
:
url('/static/images/sequence-nav/video-icon-current.png')
;
background-position
:
center
;
}
&
.seq_other_visited
{
@extend
.visited
;
background-image
:
url('/static/images/sequence-nav/document-icon-visited.png')
;
background-position
:
center
;
}
//other
&
.seq_other_inactive
{
@extend
.inactive
;
background-image
:
url('/static/images/sequence-nav/document-icon-normal.png')
;
background-position
:
center
;
}
&
.seq_other_active
{
@extend
.active
;
background-image
:
url('/static/images/sequence-nav/document-icon-current
.png')
;
background-position
:
center
;
}
&
.seq_other_visited
{
@extend
.visited
;
background-image
:
url('/static/images/sequence-nav/document-icon-visited
.png')
;
background-position
:
center
;
}
//vertical & problems
&
.seq_vertical_inactive
,
&
.seq_problem_inactive
{
@extend
.inactive
;
background-image
:
url('/static/images/sequence-nav/list-icon-normal.png')
;
background-position
:
center
;
}
&
.seq_other_active
{
@extend
.active
;
background-image
:
url('/static/images/sequence-nav/document-icon-current.png')
;
background-position
:
center
;
}
&
.seq_vertical_visited
,
&
.seq_problem_visited
{
@extend
.visited
;
background-image
:
url('/static/images/sequence-nav/list-icon-visited.png')
;
background-position
:
center
;
}
//vertical & problems
&
.seq_vertical_inactive
,
&
.seq_problem_inactive
{
@extend
.inactive
;
background-image
:
url('/static/images/sequence-nav/list-icon-normal.png')
;
background-position
:
center
;
}
&
.seq_vertical_active
,
&
.seq_problem_active
{
@extend
.active
;
background-image
:
url('/static/images/sequence-nav/list-icon-current.png')
;
background-position
:
center
;
}
&
.seq_vertical_visited
,
&
.seq_problem_visited
{
@extend
.visited
;
background-image
:
url('/static/images/sequence-nav/list-icon-visited.png')
;
background-position
:
center
;
}
p
{
// display: none;
// visibility: hidden;
background
:
#333
;
color
:
#fff
;
line-height
:
lh
();
margin
:
0px
0
0
-5px
;
opacity
:
0
;
padding
:
6px
;
position
:
absolute
;
text-shadow
:
0
-1px
0
#000
;
@include
transition
(
all
,
.6s
,
$ease-in-out-quart
);
white-space
:
pre-wrap
;
z-index
:
99
;
&
.shown
{
margin-top
:
4px
;
opacity
:
1
;
&
.seq_vertical_active
,
&
.seq_problem_active
{
@extend
.active
;
background-image
:
url('/static/images/sequence-nav/list-icon-current.png')
;
background-position
:
center
;
}
&
:empty
{
background
:
none
;
p
{
background
:
#333
;
color
:
#fff
;
display
:
none
;
line-height
:
lh
();
left
:
0px
;
opacity
:
0
;
padding
:
6px
;
position
:
absolute
;
top
:
48px
;
text-shadow
:
0
-1px
0
#000
;
@include
transition
(
all
,
.1s
,
$ease-in-out-quart
);
white-space
:
pre
;
z-index
:
99
;
&
:empty
{
background
:
none
;
&
:
:
after
{
display
:
none
;
}
}
&
:
:
after
{
display
:
none
;
background
:
#333
;
content
:
" "
;
display
:
block
;
height
:
10px
;
left
:
18px
;
position
:
absolute
;
top
:
-5px
;
@include
transform
(
rotate
(
45deg
));
width
:
10px
;
}
}
&
:
:
after
{
background
:
#333
;
content
:
" "
;
display
:
block
;
height
:
10px
;
left
:
18px
;
position
:
absolute
;
top
:
-5px
;
@include
transform
(
rotate
(
45deg
));
width
:
10px
;
&
:hover
{
p
{
display
:
block
;
margin-top
:
4px
;
opacity
:
1
;
}
}
}
}
...
...
templates/seq_module.js
View file @
709faa47
...
...
@@ -2,7 +2,7 @@
var
$
{
id
}
contents
=
[
""
,
%
for
t
in
items
:
$
{
t
[
'content'
]}
,
$
{
t
[
'content'
]}
,
%
endfor
""
];
...
...
@@ -16,7 +16,7 @@ var ${ id }types=["",
var
$
{
id
}
init_functions
=
[
""
,
%
for
t
in
items
:
function
(){
$
{
t
[
'init_js'
]}
},
function
(){
$
{
t
[
'init_js'
]}
},
%
endfor
""
];
...
...
@@ -24,12 +24,12 @@ var ${ id }titles=${titles};
var
$
{
id
}
destroy_functions
=
[
""
,
%
for
t
in
items
:
function
(){
$
{
t
[
'destroy_js'
]}
},
function
(){
$
{
t
[
'destroy_js'
]}
},
%
endfor
""
];
var
$
{
id
}
loc
=
-
1
;
function
disablePrev
()
{
function
disablePrev
()
{
var
i
=
$
{
id
}
loc
-
1
;
log_event
(
"seq_prev"
,
{
'old'
:
$
{
id
}
loc
,
'new'
:
i
,
'id'
:
'${id}'
});
if
(
i
<
1
)
{
...
...
@@ -39,7 +39,7 @@ function disablePrev() {
};
}
function
disableNext
()
{
function
disableNext
()
{
var
i
=
$
{
id
}
loc
+
1
;
log_event
(
"seq_next"
,
{
'old'
:
$
{
id
}
loc
,
'new'
:
i
,
'id'
:
'${id}'
});
...
...
@@ -77,11 +77,11 @@ function ${ id }goto(i) {
function
$
{
id
}
setup_click
(
i
)
{
$
(
'#tt_'
+
i
).
click
(
function
(
eo
)
{
$
{
id
}
goto
(
i
);});
$
(
'#tt_'
+
i
).
addClass
(
"seq_"
+
$
{
id
}
types
[
i
]
+
"_inactive"
);
$
(
'#tt_'
+
i
).
parent
().
append
(
"<p>"
+
$
{
id
}
titles
[
i
-
1
]
+
"</p>"
);
$
(
'#tt_'
+
i
).
append
(
"<p>"
+
$
{
id
}
titles
[
i
-
1
]
+
"</p>"
);
}
function
$
{
id
}
next
()
{
function
$
{
id
}
next
()
{
var
i
=
$
{
id
}
loc
+
1
;
log_event
(
"seq_next"
,
{
'old'
:
$
{
id
}
loc
,
'new'
:
i
,
'id'
:
'${id}'
});
if
(
i
>
$
{
len
(
items
)
}
)
{
...
...
@@ -92,7 +92,7 @@ function ${ id }next() {
}
function
$
{
id
}
prev
()
{
function
$
{
id
}
prev
()
{
var
i
=
$
{
id
}
loc
-
1
;
log_event
(
"seq_prev"
,
{
'old'
:
$
{
id
}
loc
,
'new'
:
i
,
'id'
:
'${id}'
});
if
(
i
<
1
)
{
...
...
@@ -105,7 +105,7 @@ function ${ id }prev() {
$
(
function
()
{
var
i
;
var
i
;
for
(
i
=
1
;
i
<
$
{
len
(
items
)
+
1
};
i
++
)
{
$
{
id
}
setup_click
(
i
);
}
...
...
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