|
|
@ -29,10 +29,17 @@ module.exports = Marionette.Layout.extend({
|
|
|
|
|
|
|
|
|
|
|
|
onClick : function(event) {
|
|
|
|
onClick : function(event) {
|
|
|
|
var target = $(event.target);
|
|
|
|
var target = $(event.target);
|
|
|
|
|
|
|
|
var linkElement = target;
|
|
|
|
//look down for <a/>
|
|
|
|
//look down for <a/>
|
|
|
|
var href = event.target.getAttribute('href');
|
|
|
|
var href = event.target.getAttribute('href');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!href && target.closest('a') && target.closest('a')[0]) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
linkElement = target.closest('a')[0];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
href = linkElement.getAttribute('href');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (href && href.startsWith("http")) {
|
|
|
|
if (href && href.startsWith("http")) {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -40,15 +47,7 @@ module.exports = Marionette.Layout.extend({
|
|
|
|
event.preventDefault();
|
|
|
|
event.preventDefault();
|
|
|
|
|
|
|
|
|
|
|
|
//if couldn't find it look up'
|
|
|
|
//if couldn't find it look up'
|
|
|
|
if (!href && target.closest('a') && target.closest('a')[0]) {
|
|
|
|
this.setActive(linkElement);
|
|
|
|
|
|
|
|
|
|
|
|
var linkElement = target.closest('a')[0];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
href = linkElement.getAttribute('href');
|
|
|
|
|
|
|
|
this.setActive(linkElement);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.setActive(event.target);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($(window).width() < 768) {
|
|
|
|
if ($(window).width() < 768) {
|
|
|
|
this.ui.collapse.collapse('hide');
|
|
|
|
this.ui.collapse.collapse('hide');
|
|
|
|