Commit e98ae4d5 by Jeffrey Phillips Committed by GitHub

Merge pull request #75 from rhamilto/tileClick

Migrating tileClick directive from console so it can also be used in …
parents eb8c2167 49181729
.tile-click {
cursor: pointer;
position: relative;
&:hover {
.tile-target {
color: @link-hover-color;
&:hover {
text-decoration: none;
}
}
}
}
......@@ -7,5 +7,6 @@
@import "_guided-tour.less";
@import "_mixins.less";
@import "_notifications.less";
@import "_tile-click.less";
@import "_ui-select.less";
@import "_variables.less";
......@@ -872,6 +872,23 @@ angular.module('openshiftCommonUI')
;'use strict';
angular.module('openshiftCommonUI')
.directive('tileClick', function() {
return {
restrict: 'AC',
link: function($scope, element) {
$(element).click(function (evt) {
var t = $(evt.target);
if (t && t.closest("a", element).length) {
return;
}
$('a.tile-target', element).trigger("click");
});
}
};
});
;'use strict';
angular.module('openshiftCommonUI')
.directive('toastNotifications', function(NotificationsService, $timeout) {
return {
restrict: 'E',
......
......@@ -282,6 +282,16 @@ div.hopscotch-bubble .hopscotch-nav-button.prev {
margin-bottom: 5px;
width: 100%;
}
.tile-click {
cursor: pointer;
position: relative;
}
.tile-click:hover .tile-target {
color: #00659c;
}
.tile-click:hover .tile-target:hover {
text-decoration: none;
}
/* Fix some styles with the angular-ui-select bootstrap theme that isn't right when combined with all of our styles */
.ui-select-bootstrap {
/* Fixes ui-select's input box extending to 100% page width if the page has been resized after page-load
......
......@@ -1043,6 +1043,23 @@ angular.module('openshiftCommonUI')
;'use strict';
angular.module('openshiftCommonUI')
.directive('tileClick', function() {
return {
restrict: 'AC',
link: function($scope, element) {
$(element).click(function (evt) {
var t = $(evt.target);
if (t && t.closest("a", element).length) {
return;
}
$('a.tile-target', element).trigger("click");
});
}
};
});
;'use strict';
angular.module('openshiftCommonUI')
.directive('toastNotifications', ["NotificationsService", "$timeout", function(NotificationsService, $timeout) {
return {
restrict: 'E',
......
......@@ -333,7 +333,17 @@ $(element).focus();
}, 300);
}
};
} ]), angular.module("openshiftCommonUI").directive("toastNotifications", [ "NotificationsService", "$timeout", function(NotificationsService, $timeout) {
} ]), angular.module("openshiftCommonUI").directive("tileClick", function() {
return {
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");
});
}
};
}), angular.module("openshiftCommonUI").directive("toastNotifications", [ "NotificationsService", "$timeout", function(NotificationsService, $timeout) {
return {
restrict:"E",
scope:{},
......
'use strict';
angular.module('openshiftCommonUI')
.directive('tileClick', function() {
return {
restrict: 'AC',
link: function($scope, element) {
$(element).click(function (evt) {
var t = $(evt.target);
if (t && t.closest("a", element).length) {
return;
}
$('a.tile-target', element).trigger("click");
});
}
};
});
.tile-click {
cursor: pointer;
position: relative;
&:hover {
.tile-target {
color: @link-hover-color;
&:hover {
text-decoration: none;
}
}
}
}
......@@ -7,5 +7,6 @@
@import "_guided-tour.less";
@import "_mixins.less";
@import "_notifications.less";
@import "_tile-click.less";
@import "_ui-select.less";
@import "_variables.less";
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment