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
03d85761
Commit
03d85761
authored
Apr 17, 2014
by
Adam
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3383 from edx/adam/ui-disabled-fix
change .ui-disabled to .is-disabled
parents
79fea620
6d356a45
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
common/static/js/spec/CSS3_workarounds_spec.js
+9
-9
common/static/js/src/CSS3_workarounds.js
+1
-1
No files found.
common/static/js/spec/CSS3_workarounds_spec.js
View file @
03d85761
describe
(
"CSS3 workarounds"
,
function
()
{
describe
(
"pointer-events"
,
function
()
{
beforeEach
(
function
()
{
var
html
=
"<a href='#' class='
ui
-disabled'>What wondrous life in this I lead</a>"
;
var
html
=
"<a href='#' class='
is
-disabled'>What wondrous life in this I lead</a>"
;
setFixtures
(
html
);
});
...
...
@@ -14,10 +14,10 @@ describe("CSS3 workarounds", function() {
mockBodyStyle
[
"pointerEvents"
]
=
""
;
};
pointerEventsNone
(
".
ui
-disabled"
,
mockBodyStyle
);
spyOnEvent
(
".
ui
-disabled"
,
"click"
);
$
(
".
ui
-disabled"
).
click
();
expect
(
"click"
).
not
.
toHaveBeenPreventedOn
(
".
ui
-disabled"
);
pointerEventsNone
(
".
is
-disabled"
,
mockBodyStyle
);
spyOnEvent
(
".
is
-disabled"
,
"click"
);
$
(
".
is
-disabled"
).
click
();
expect
(
"click"
).
not
.
toHaveBeenPreventedOn
(
".
is
-disabled"
);
});
it
(
"should prevent default when pointerEvents is not Supported"
,
function
()
{
...
...
@@ -31,10 +31,10 @@ describe("CSS3 workarounds", function() {
};
};
pointerEventsNone
(
".
ui
-disabled"
,
mockBodyStyle
);
spyOnEvent
(
".
ui
-disabled"
,
"click"
);
$
(
".
ui
-disabled"
).
click
();
expect
(
"click"
).
toHaveBeenPreventedOn
(
".
ui
-disabled"
);
pointerEventsNone
(
".
is
-disabled"
,
mockBodyStyle
);
spyOnEvent
(
".
is
-disabled"
,
"click"
);
$
(
".
is
-disabled"
).
click
();
expect
(
"click"
).
toHaveBeenPreventedOn
(
".
is
-disabled"
);
});
});
});
common/static/js/src/CSS3_workarounds.js
View file @
03d85761
...
...
@@ -13,5 +13,5 @@ var pointerEventsNone = function (selector, supportedStyles) {
};
$
(
function
()
{
pointerEventsNone
(
'.
ui
-disabled'
,
document
.
body
.
styles
);
pointerEventsNone
(
'.
is
-disabled'
,
document
.
body
.
styles
);
});
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