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
5db315be
Commit
5db315be
authored
May 17, 2016
by
clrux
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #12371 from edx/clrux/ac-405
AC-405 calculator image to icon
parents
f0b33e33
cb19cdd2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
10 deletions
+16
-10
lms/static/coffee/src/calculator.coffee
+8
-0
lms/static/sass/course/modules/_calculator.scss
+7
-10
lms/templates/calculator/toggle_calculator.html
+1
-0
No files found.
lms/static/coffee/src/calculator.coffee
View file @
5db315be
...
@@ -51,6 +51,7 @@ class @Calculator
...
@@ -51,6 +51,7 @@ class @Calculator
$calcWrapper
=
$
(
'#calculator_wrapper'
)
$calcWrapper
=
$
(
'#calculator_wrapper'
)
text
=
gettext
(
'Open Calculator'
)
text
=
gettext
(
'Open Calculator'
)
isExpanded
=
false
isExpanded
=
false
icon
=
'fa-calculator'
$
(
'div.calc-main'
).
toggleClass
'open'
$
(
'div.calc-main'
).
toggleClass
'open'
if
$calc
.
hasClass
(
'closed'
)
if
$calc
.
hasClass
(
'closed'
)
...
@@ -59,6 +60,7 @@ class @Calculator
...
@@ -59,6 +60,7 @@ class @Calculator
.
attr
'tabindex'
,
-
1
.
attr
'tabindex'
,
-
1
else
else
text
=
gettext
(
'Close Calculator'
)
text
=
gettext
(
'Close Calculator'
)
icon
=
'fa-close'
isExpanded
=
true
isExpanded
=
true
$calcWrapper
$calcWrapper
...
@@ -74,6 +76,12 @@ class @Calculator
...
@@ -74,6 +76,12 @@ class @Calculator
'title'
:
text
'title'
:
text
'aria-expanded'
:
isExpanded
'aria-expanded'
:
isExpanded
.
find
(
'.utility-control-label'
).
text
text
.
find
(
'.utility-control-label'
).
text
text
$calc
.
find
(
'.icon'
)
.
removeClass
(
'fa-calculator'
)
.
removeClass
(
'fa-close'
)
.
addClass
(
icon
)
$calc
.
toggleClass
'closed'
$calc
.
toggleClass
'closed'
...
...
lms/static/sass/course/modules/_calculator.scss
View file @
5db315be
...
@@ -17,23 +17,20 @@
...
@@ -17,23 +17,20 @@
.calc
{
.calc
{
@include
transition
(
background-color
$tmg-f2
ease-in-out
0s
);
@include
transition
(
background-color
$tmg-f2
ease-in-out
0s
);
background
:
url("
#{
$static-path
}
/images/calc-icon.png")
$black-t1
no-repeat
center
;
@include
float
(
right
);
border-bottom
:
0
;
@include
right
(
$baseline
*.
75
);
color
:
$white
;
float
:
right
;
height
:
$baseline
;
margin-right
:
(
$baseline
*
0
.75
);
padding
:
$baseline
;
position
:
relative
;
position
:
relative
;
top
:
-42px
;
top
:
-42px
;
width
:
(
$baseline
*
0
.75
);
border-bottom
:
0
;
padding
:
(
$baseline
/
1
.5
);
background
:
$black-t1
;
color
:
$white
;
&
:hover
,
&
:focus
{
&
:hover
,
&
:focus
{
background
:
url("
#{
$static-path
}
/images/calc-icon.png")
$gray-d1
no-repeat
center
;
background
:
$gray-d1
;
}
}
&
.closed
{
&
.closed
{
background-image
:
url("
#{
$static-path
}
/images/close-calc-icon.png")
;
background-color
:
$black
;
background-color
:
$black
;
top
:
-36px
;
top
:
-36px
;
}
}
...
...
lms/templates/calculator/toggle_calculator.html
View file @
5db315be
...
@@ -5,6 +5,7 @@ from django.core.urlresolvers import reverse
...
@@ -5,6 +5,7 @@ from django.core.urlresolvers import reverse
<div
class=
"calc-main"
>
<div
class=
"calc-main"
>
<button
title=
"${_('Open Calculator')}"
aria-controls=
"calculator_wrapper"
aria-expanded=
"false"
class=
"calc utility-control-button"
>
<button
title=
"${_('Open Calculator')}"
aria-controls=
"calculator_wrapper"
aria-expanded=
"false"
class=
"calc utility-control-button"
>
<span
class=
"icon fa fa-calculator"
aria-hidden=
"true"
></span>
<span
class=
"utility-control-label sr"
>
${_("Open Calculator")}
</span>
<span
class=
"utility-control-label sr"
>
${_("Open Calculator")}
</span>
</button>
</button>
...
...
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