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
7d320f7e
Commit
7d320f7e
authored
8 years ago
by
Qubad786
Committed by
M. Rehan
8 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove unnecessary bookmark screen readers
parent
eca90ddc
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
0 additions
and
12 deletions
+0
-12
lms/static/js/bookmarks/views/bookmark_button.js
+0
-4
lms/static/js/fixtures/bookmarks/bookmark_button.html
+0
-1
lms/static/js/spec/courseware/bookmark_button_view_spec.js
+0
-2
lms/static/sass/views/_bookmarks.scss
+0
-4
lms/templates/bookmark_button.html
+0
-1
No files found.
lms/static/js/bookmarks/views/bookmark_button.js
View file @
7d320f7e
...
...
@@ -5,9 +5,7 @@
return
Backbone
.
View
.
extend
({
errorMessage
:
gettext
(
'An error has occurred. Please try again.'
),
srAddBookmarkText
:
gettext
(
'Click to add'
),
bookmarkText
:
gettext
(
'Bookmark this page'
),
srRemoveBookmarkText
:
gettext
(
'Click to remove'
),
bookmarkedText
:
gettext
(
'Bookmarked'
),
events
:
{
...
...
@@ -88,12 +86,10 @@
this
.
$el
.
addClass
(
'bookmarked'
);
this
.
$el
.
attr
(
'aria-pressed'
,
'true'
);
this
.
$el
.
find
(
'.bookmark-text'
).
text
(
this
.
bookmarkedText
);
this
.
$el
.
find
(
'.bookmark-sr'
).
text
(
this
.
srRemoveBookmarkText
);
}
else
{
this
.
$el
.
removeClass
(
'bookmarked'
);
this
.
$el
.
attr
(
'aria-pressed'
,
'false'
);
this
.
$el
.
find
(
'.bookmark-text'
).
text
(
this
.
bookmarkText
);
this
.
$el
.
find
(
'.bookmark-sr'
).
text
(
this
.
srAddBookmarkText
);
}
},
...
...
This diff is collapsed.
Click to expand it.
lms/static/js/fixtures/bookmarks/bookmark_button.html
View file @
7d320f7e
...
...
@@ -6,7 +6,6 @@
<button
class=
"btn bookmark-button"
aria-pressed=
"false"
data-bookmark-id=
"bilbo,usage_1"
>
<span
class=
"sr bookmark-sr"
></span>
<span
class=
"bookmark-text"
>
Bookmark this page
</span>
</button>
</div>
...
...
This diff is collapsed.
Click to expand it.
lms/static/js/spec/courseware/bookmark_button_view_spec.js
View file @
7d320f7e
...
...
@@ -39,11 +39,9 @@ define(['backbone', 'jquery', 'underscore', 'edx-ui-toolkit/js/utils/spec-helper
if
(
bookmarked
)
{
expect
(
view
.
$el
).
toHaveAttr
(
'aria-pressed'
,
'true'
);
expect
(
view
.
$el
).
toHaveClass
(
'bookmarked'
);
expect
(
view
.
$el
.
find
(
'.bookmark-sr'
).
text
()).
toBe
(
'Click to remove'
);
}
else
{
expect
(
view
.
$el
).
toHaveAttr
(
'aria-pressed'
,
'false'
);
expect
(
view
.
$el
).
not
.
toHaveClass
(
'bookmarked'
);
expect
(
view
.
$el
.
find
(
'.bookmark-sr'
).
text
()).
toBe
(
'Click to add'
);
}
expect
(
view
.
$el
.
data
(
'bookmarkId'
)).
toBe
(
'bilbo,usage_1'
);
};
...
...
This diff is collapsed.
Click to expand it.
lms/static/sass/views/_bookmarks.scss
View file @
7d320f7e
...
...
@@ -162,8 +162,4 @@ $bookmarked-icon: "\f02e"; // .fa-bookmark
}
.bookmark-sr
{
@include
margin-right
(
$baseline
/
4
);
}
}
This diff is collapsed.
Click to expand it.
lms/templates/bookmark_button.html
View file @
7d320f7e
...
...
@@ -5,7 +5,6 @@
<button
class=
"btn btn-link bookmark-button ${"
bookmarked
"
if
is_bookmarked
else
""}"
aria-pressed=
"${"
true
"
if
is_bookmarked
else
"
false
"}"
data-bookmark-id=
"${bookmark_id}"
>
<span
class=
"sr bookmark-sr"
>
${_("Click to remove") if is_bookmarked else _("Click to add")}
</span>
<span
class=
"bookmark-text"
>
${_("Bookmarked") if is_bookmarked else _("Bookmark this page")}
</span>
</button>
</div>
This diff is collapsed.
Click to expand it.
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