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
0665e6d0
Commit
0665e6d0
authored
May 24, 2017
by
Samuel Padgett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't trigger tile-click target if user clicks a button inside the tile
parent
4e6c2e4b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
4 deletions
+7
-4
origin-web-common-ui.js
dist/origin-web-common-ui.js
+2
-1
origin-web-common.js
dist/origin-web-common.js
+2
-1
origin-web-common.min.js
dist/origin-web-common.min.js
+1
-1
tileClick.js
src/components/tile-click/tileClick.js
+2
-1
No files found.
dist/origin-web-common-ui.js
View file @
0665e6d0
...
...
@@ -885,8 +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.
var
t
=
$
(
evt
.
target
);
if
(
t
&&
t
.
closest
(
"a"
,
element
).
length
)
{
if
(
t
&&
(
t
.
closest
(
"a"
,
element
).
length
||
t
.
closest
(
"button"
,
element
).
length
)
)
{
return
;
}
$
(
'a.tile-target'
,
element
).
trigger
(
"click"
);
...
...
dist/origin-web-common.js
View file @
0665e6d0
...
...
@@ -1056,8 +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.
var
t
=
$
(
evt
.
target
);
if
(
t
&&
t
.
closest
(
"a"
,
element
).
length
)
{
if
(
t
&&
(
t
.
closest
(
"a"
,
element
).
length
||
t
.
closest
(
"button"
,
element
).
length
)
)
{
return
;
}
$
(
'a.tile-target'
,
element
).
trigger
(
"click"
);
...
...
dist/origin-web-common.min.js
View file @
0665e6d0
...
...
@@ -339,7 +339,7 @@ restrict:"AC",
link
:
function
(
$scope
,
element
)
{
$
(
element
).
click
(
function
(
evt
)
{
var
t
=
$
(
evt
.
target
);
t
&&
t
.
closest
(
"a"
,
element
).
length
||
$
(
"a.tile-target"
,
element
).
trigger
(
"click"
);
t
&&
(
t
.
closest
(
"a"
,
element
).
length
||
t
.
closest
(
"button"
,
element
).
length
)
||
$
(
"a.tile-target"
,
element
).
trigger
(
"click"
);
});
}
};
...
...
src/components/tile-click/tileClick.js
View file @
0665e6d0
...
...
@@ -6,8 +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.
var
t
=
$
(
evt
.
target
);
if
(
t
&&
t
.
closest
(
"a"
,
element
).
length
)
{
if
(
t
&&
(
t
.
closest
(
"a"
,
element
).
length
||
t
.
closest
(
"button"
,
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