Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-analytics-dashboard
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-analytics-dashboard
Commits
5f5f65fb
Commit
5f5f65fb
authored
Aug 16, 2016
by
Anjali Pal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace a href=# elements with buttons
parent
b85a61bc
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
55 additions
and
13 deletions
+55
-13
acceptance_tests/mixins.py
+1
-1
analytics_dashboard/courses/templates/courses/home.html
+1
-1
analytics_dashboard/static/apps/learners/roster/templates/search.underscore
+4
-4
analytics_dashboard/static/apps/learners/roster/views/search.js
+10
-1
analytics_dashboard/static/apps/learners/roster/views/spec/roster-spec.js
+1
-1
analytics_dashboard/static/sass/_developer.scss
+34
-1
analytics_dashboard/templates/header.html
+2
-2
analytics_dashboard/templates/lens-navigation.html
+2
-2
No files found.
acceptance_tests/mixins.py
View file @
5f5f65fb
...
@@ -156,7 +156,7 @@ class PrimaryNavMixin(CourseApiMixin):
...
@@ -156,7 +156,7 @@ class PrimaryNavMixin(CourseApiMixin):
"""
"""
Verify the user menu functions properly.
Verify the user menu functions properly.
"""
"""
element
=
self
.
page
.
q
(
css
=
'
a
.active-user.dropdown-toggle'
)
element
=
self
.
page
.
q
(
css
=
'
button
.active-user.dropdown-toggle'
)
self
.
assertTrue
(
element
.
present
)
self
.
assertTrue
(
element
.
present
)
self
.
assertEqual
(
element
.
attrs
(
'aria-expanded'
)[
0
],
'false'
)
self
.
assertEqual
(
element
.
attrs
(
'aria-expanded'
)[
0
],
'false'
)
...
...
analytics_dashboard/courses/templates/courses/home.html
View file @
5f5f65fb
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
<div
class=
"container "
>
<div
class=
"container "
>
<ul
class=
"nav navbar-nav"
>
<ul
class=
"nav navbar-nav"
>
<li
class=
"active nav-section"
>
<li
class=
"active nav-section"
>
<
a
href=
"#"
><span
class=
"link-label"
>
{% trans "Course Home" %}
</span></a
>
<
div
class=
"course-label"
>
{% trans "Course Home" %}
</div
>
<span
class=
"sr-only"
>
({% trans "Active" %})
</span>
<span
class=
"sr-only"
>
({% trans "Active" %})
</span>
</li>
</li>
...
...
analytics_dashboard/static/apps/learners/roster/templates/search.underscore
View file @
5f5f65fb
...
@@ -8,15 +8,15 @@
...
@@ -8,15 +8,15 @@
name="<%- name %>"
name="<%- name %>"
<% if (value) { %> value="<%- value %>" <% } %>
<% if (value) { %> value="<%- value %>" <% } %>
/>
/>
<
a href="#"
type="button" class="clear btn" data-backgrid-action="clear">
<
button
type="button" class="clear btn" data-backgrid-action="clear">
<span class="fa fa-times" aria-hidden="true"></span>
<span class="fa fa-times" aria-hidden="true"></span>
<span class="sr-only"><%- clearSearchText %></span>
<span class="sr-only"><%- clearSearchText %></span>
</
a
>
</
button
>
</div>
</div>
<span class="input-group-btn">
<span class="input-group-btn">
<
a href="#"
type="button" class="search btn btn-primary">
<
button
type="button" class="search btn btn-primary">
<span class="fa fa-search" aria-hidden="true"></span>
<span class="fa fa-search" aria-hidden="true"></span>
<span class="sr-only"><%- executeSearchText %></span>
<span class="sr-only"><%- executeSearchText %></span>
</
a
>
</
button
>
</span>
</span>
</div>
</div>
analytics_dashboard/static/apps/learners/roster/views/search.js
View file @
5f5f65fb
...
@@ -26,7 +26,11 @@ define(function(require) {
...
@@ -26,7 +26,11 @@ define(function(require) {
},
},
events
:
function
()
{
events
:
function
()
{
return
_
.
extend
(
Backgrid
.
Extension
.
ServerSideFilter
.
prototype
.
events
,
{
'click .search'
:
'search'
});
return
_
.
extend
(
Backgrid
.
Extension
.
ServerSideFilter
.
prototype
.
events
,
{
'click .search'
:
'search'
,
'click .clear.btn'
:
'clear'
});
},
},
template
:
_
.
template
(
learnerSearchTemplate
,
null
,
{
variable
:
null
}),
template
:
_
.
template
(
learnerSearchTemplate
,
null
,
{
variable
:
null
}),
...
@@ -37,6 +41,10 @@ define(function(require) {
...
@@ -37,6 +41,10 @@ define(function(require) {
Backgrid
.
Extension
.
ServerSideFilter
.
prototype
.
initialize
.
call
(
this
,
options
);
Backgrid
.
Extension
.
ServerSideFilter
.
prototype
.
initialize
.
call
(
this
,
options
);
},
},
clearButton
:
function
()
{
return
this
.
$el
.
find
(
'button[data-backgrid-action=clear]'
);
},
render
:
function
()
{
render
:
function
()
{
this
.
value
=
this
.
options
.
collection
.
getSearchString
();
this
.
value
=
this
.
options
.
collection
.
getSearchString
();
this
.
$el
.
empty
().
append
(
this
.
template
({
this
.
$el
.
empty
().
append
(
this
.
template
({
...
@@ -69,6 +77,7 @@ define(function(require) {
...
@@ -69,6 +77,7 @@ define(function(require) {
clear
:
function
(
event
)
{
clear
:
function
(
event
)
{
event
.
preventDefault
();
event
.
preventDefault
();
this
.
collection
.
unsetSearchString
();
this
.
collection
.
unsetSearchString
();
this
.
searchBox
().
val
(
''
);
this
.
execute
();
this
.
execute
();
},
},
...
...
analytics_dashboard/static/apps/learners/roster/views/spec/roster-spec.js
View file @
5f5f65fb
...
@@ -560,7 +560,7 @@ define(function(require) {
...
@@ -560,7 +560,7 @@ define(function(require) {
executeSearch
(
searchString
);
executeSearch
(
searchString
);
expectSearchedFor
(
searchString
);
expectSearchedFor
(
searchString
);
getLastRequest
().
respond
(
200
,
{},
JSON
.
stringify
(
getResponseBody
(
1
,
1
)));
getLastRequest
().
respond
(
200
,
{},
JSON
.
stringify
(
getResponseBody
(
1
,
1
)));
$
(
'
a
.clear'
).
click
();
$
(
'
button
.clear'
).
click
();
expect
(
getLastRequestParams
().
text_search
).
toBeUndefined
();
expect
(
getLastRequestParams
().
text_search
).
toBeUndefined
();
});
});
...
...
analytics_dashboard/static/sass/_developer.scss
View file @
5f5f65fb
...
@@ -22,12 +22,30 @@
...
@@ -22,12 +22,30 @@
}
}
}
}
#main-nav
.navbar-nav
li
>
button
{
padding-top
:
30px
;
padding-bottom
:
30px
;
}
button
.chart-info
{
button
.chart-info
{
padding-left
:
0
;
padding-left
:
0
;
padding-top
:
0
;
padding-top
:
0
;
border
:
none
;
border
:
none
;
}
}
.clear.btn
{
background
:
transparent
;
}
.course-label
{
padding-top
:
18px
;
padding-bottom
:
0px
;
padding-left
:
15px
;
padding-right
:
15px
;
min-height
:
55px
;
}
.chart-tooltip
{
.chart-tooltip
{
float
:
right
;
float
:
right
;
padding-right
:
$padding-small-horizontal
;
padding-right
:
$padding-small-horizontal
;
...
@@ -155,6 +173,16 @@ button.chart-info {
...
@@ -155,6 +173,16 @@ button.chart-info {
.nav-section
{
.nav-section
{
@include
a-background
(
transparent
);
@include
a-background
(
transparent
);
}
}
li
>
button
{
line-height
:
20px
;
border
:
none
;
background
:
transparent
;
}
li
>
button
:focus
{
outline
:
dotted
1px
#000
;
}
}
}
// lens navigation consists of a drop down and the lens sections in a navigation
// lens navigation consists of a drop down and the lens sections in a navigation
...
@@ -182,7 +210,8 @@ $lens-box-model: border-box;
...
@@ -182,7 +210,8 @@ $lens-box-model: border-box;
.dropdown
{
.dropdown
{
padding-right
:
10px
;
padding-right
:
10px
;
a
{
a
,
button
{
background
:
transparent
;
text-transform
:
uppercase
;
text-transform
:
uppercase
;
color
:
$navbar-default-link-active-color
;
color
:
$navbar-default-link-active-color
;
}
}
...
@@ -206,6 +235,10 @@ $lens-box-model: border-box;
...
@@ -206,6 +235,10 @@ $lens-box-model: border-box;
padding-bottom
:
0px
;
padding-bottom
:
0px
;
}
}
li
>
button
{
min-height
:
$lens-nav-height
;
}
.nav-section
{
.nav-section
{
@include
a-background
(
transparent
);
@include
a-background
(
transparent
);
}
}
...
...
analytics_dashboard/templates/header.html
View file @
5f5f65fb
...
@@ -34,12 +34,12 @@ Partial: App-wide header element
...
@@ -34,12 +34,12 @@ Partial: App-wide header element
</li>
</li>
{% endif %}
{% endif %}
<li
class=
"dropdown"
>
<li
class=
"dropdown"
>
<
a
href=
"#"
class=
"dropdown-toggle active-user navbar-link"
data-toggle=
"dropdown"
role=
"button"
<
button
class=
"dropdown-toggle active-user navbar-link"
data-toggle=
"dropdown"
role=
"button"
id=
"userMenu"
>
id=
"userMenu"
>
<span
class=
"ico-user fa fa-graduation-cap"
aria-hidden=
"true"
></span>
<span
class=
"ico-user fa fa-graduation-cap"
aria-hidden=
"true"
></span>
<span
class=
"active-user-name"
>
{{ request.user.username }}
</span>
<span
class=
"active-user-name"
>
{{ request.user.username }}
</span>
<span
class=
"ico ico-indicator fa fa-caret-down"
aria-hidden=
"true"
></span>
<span
class=
"ico ico-indicator fa fa-caret-down"
aria-hidden=
"true"
></span>
</
a
>
</
button
>
<ul
class=
"dropdown-menu active-user-nav"
role=
"menu"
aria-labelledby=
"userMenu"
>
<ul
class=
"dropdown-menu active-user-nav"
role=
"menu"
aria-labelledby=
"userMenu"
>
<li>
<li>
...
...
analytics_dashboard/templates/lens-navigation.html
View file @
5f5f65fb
...
@@ -9,14 +9,14 @@ Partial for displaying the lens navigation and the sections within the lenses.
...
@@ -9,14 +9,14 @@ Partial for displaying the lens navigation and the sections within the lenses.
<div
class=
"container "
>
<div
class=
"container "
>
<ul
class=
"nav navbar-nav"
>
<ul
class=
"nav navbar-nav"
>
<li
class=
"dropdown"
>
<li
class=
"dropdown"
>
<
a
href=
"#"
class=
"dropdown-toggle navbar-link"
data-toggle=
"dropdown"
role=
"button"
id=
"lensPrimaryMenu"
>
<
button
class=
"dropdown-toggle navbar-link"
data-toggle=
"dropdown"
role=
"button"
id=
"lensPrimaryMenu"
>
<span
class=
"link-label"
>
<span
class=
"link-label"
>
<span
class=
"ico fa {{ primary_nav_item.icon }}"
aria-hidden=
"true"
></span>
<span
class=
"ico fa {{ primary_nav_item.icon }}"
aria-hidden=
"true"
></span>
{{ primary_nav_item.label }}
{{ primary_nav_item.label }}
{# Translators: This refers to the active tab/navigation item. #}
{# Translators: This refers to the active tab/navigation item. #}
<span
class=
"sr-only"
>
({% trans "Active" %})
</span>
<span
class=
"sr-only"
>
({% trans "Active" %})
</span>
<span
class=
"ico ico-indicator fa fa-caret-down"
aria-hidden=
"true"
></span></span>
<span
class=
"ico ico-indicator fa fa-caret-down"
aria-hidden=
"true"
></span></span>
</
a
>
</
button
>
<ul
class=
"dropdown-menu"
role=
"menu"
aria-labelledby=
"lensPrimaryMenu"
>
<ul
class=
"dropdown-menu"
role=
"menu"
aria-labelledby=
"lensPrimaryMenu"
>
{% for item in primary_nav_items %}
{% for item in primary_nav_items %}
...
...
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