[frontend] jHueRowSelector should publish an open.link event on Hue 4
(function ($, window, document, undefined) {
var pluginName = "jHueRowSelector",
- defaults = {
- };
+ defaults = {};
function Plugin(element, options) {
this.element = element;
if (!$(e.target).is("a")) {
var href = $.trim($(_this.element).attr("href"));
if (href != "" && href != "#" && href.indexOf("void(0)") == -1) {
+ if (IS_HUE_4) {
+ huePubSub.publish('open.link', $(_this.element).attr("href"));
+ }
+ else {
location.href = $(_this.element).attr("href");
}
+ }
else {
$(_this.element).click();
}
