Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
origin-web-common
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
Java-于龙
origin-web-common
Commits
8a6a7252
Commit
8a6a7252
authored
May 26, 2017
by
Robb Hamilton
Committed by
GitHub
May 26, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #87 from spadgett/tile-click-prevent
Add `.tile-click-prevent` class
parents
6abfb2b4
cb53b708
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
7 deletions
+7
-7
origin-web-common-ui.js
dist/origin-web-common-ui.js
+2
-2
origin-web-common.js
dist/origin-web-common.js
+2
-2
origin-web-common.min.js
dist/origin-web-common.min.js
+1
-1
tileClick.js
src/components/tile-click/tileClick.js
+2
-2
No files found.
dist/origin-web-common-ui.js
View file @
8a6a7252
...
...
@@ -885,9 +885,9 @@ angular.module('openshiftCommonUI')
restrict
:
'AC'
,
link
:
function
(
$scope
,
element
)
{
$
(
element
).
click
(
function
(
evt
)
{
// Don't trigger tile target if the user clicked directly on a link or button inside the tile.
// Don't trigger tile target if the user clicked directly on a link or button inside the tile
or any child of a .tile-click-prevent element
.
var
t
=
$
(
evt
.
target
);
if
(
t
&&
(
t
.
closest
(
"a"
,
element
).
length
||
t
.
closest
(
"button"
,
element
).
length
))
{
if
(
t
&&
(
t
.
closest
(
"a"
,
element
).
length
||
t
.
closest
(
"button"
,
element
).
length
)
||
t
.
closest
(
".tile-click-prevent"
,
element
).
length
)
{
return
;
}
$
(
'a.tile-target'
,
element
).
trigger
(
"click"
);
...
...
dist/origin-web-common.js
View file @
8a6a7252
...
...
@@ -1056,9 +1056,9 @@ angular.module('openshiftCommonUI')
restrict
:
'AC'
,
link
:
function
(
$scope
,
element
)
{
$
(
element
).
click
(
function
(
evt
)
{
// Don't trigger tile target if the user clicked directly on a link or button inside the tile.
// Don't trigger tile target if the user clicked directly on a link or button inside the tile
or any child of a .tile-click-prevent element
.
var
t
=
$
(
evt
.
target
);
if
(
t
&&
(
t
.
closest
(
"a"
,
element
).
length
||
t
.
closest
(
"button"
,
element
).
length
))
{
if
(
t
&&
(
t
.
closest
(
"a"
,
element
).
length
||
t
.
closest
(
"button"
,
element
).
length
)
||
t
.
closest
(
".tile-click-prevent"
,
element
).
length
)
{
return
;
}
$
(
'a.tile-target'
,
element
).
trigger
(
"click"
);
...
...
dist/origin-web-common.min.js
View file @
8a6a7252
...
...
@@ -339,7 +339,7 @@ restrict:"AC",
link
:
function
(
$scope
,
element
)
{
$
(
element
).
click
(
function
(
evt
)
{
var
t
=
$
(
evt
.
target
);
t
&&
(
t
.
closest
(
"a"
,
element
).
length
||
t
.
closest
(
"button"
,
element
).
length
)
||
$
(
"a.tile-target"
,
element
).
trigger
(
"click"
);
t
&&
(
t
.
closest
(
"a"
,
element
).
length
||
t
.
closest
(
"button"
,
element
).
length
)
||
t
.
closest
(
".tile-click-prevent"
,
element
).
length
||
$
(
"a.tile-target"
,
element
).
trigger
(
"click"
);
});
}
};
...
...
src/components/tile-click/tileClick.js
View file @
8a6a7252
...
...
@@ -6,9 +6,9 @@ angular.module('openshiftCommonUI')
restrict
:
'AC'
,
link
:
function
(
$scope
,
element
)
{
$
(
element
).
click
(
function
(
evt
)
{
// Don't trigger tile target if the user clicked directly on a link or button inside the tile.
// Don't trigger tile target if the user clicked directly on a link or button inside the tile
or any child of a .tile-click-prevent element
.
var
t
=
$
(
evt
.
target
);
if
(
t
&&
(
t
.
closest
(
"a"
,
element
).
length
||
t
.
closest
(
"button"
,
element
).
length
))
{
if
(
t
&&
(
t
.
closest
(
"a"
,
element
).
length
||
t
.
closest
(
"button"
,
element
).
length
)
||
t
.
closest
(
".tile-click-prevent"
,
element
).
length
)
{
return
;
}
$
(
'a.tile-target'
,
element
).
trigger
(
"click"
);
...
...
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