this.listeners[eventName].push(callback);
return this;
}
-};
-window.Events = new EventManager();
+}
+window.Events = new EventManager();
-var services = require('./services')(ngApp, window.Events);
-var directives = require('./directives')(ngApp, window.Events);
-var controllers = require('./controllers')(ngApp, window.Events);
+// Load in angular specific items
+import Services from './services';
+import Directives from './directives';
+import Controllers from './controllers';
+Services(ngApp, window.Events);
+Directives(ngApp, window.Events);
+Controllers(ngApp, window.Events);
//Global jQuery Config & Extensions
$('.popup-close').click(function() {
$(this).closest('.overlay').fadeOut(240);
});
-
$('.overlay').click(function(event) {
if (!$(event.target).hasClass('overlay')) return;
$(this).fadeOut(240);
});
+ // Prevent markdown display link click redirect
$('.markdown-display').on('click', 'a', function(event) {
event.preventDefault();
window.open($(this).attr('href'));
});
+ // Detect IE for css
+ if(navigator.userAgent.indexOf('MSIE')!==-1
+ || navigator.appVersion.indexOf('Trident/') > 0
+ || navigator.userAgent.indexOf('Safari') !== -1){
+ $('body').addClass('flexbox-support');
+ }
+
});
// Page specific items