-
Notifications
You must be signed in to change notification settings - Fork 49
/
Copy pathatc.js
23 lines (21 loc) · 956 Bytes
/
atc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Generated by CoffeeScript 1.3.3
(function() {
define(['jquery', 'underscore', 'backbone', 'marionette', 'aloha', 'atc/auth', 'atc/controller', 'css!atc'], function(jQuery, _, Backbone, Marionette, Aloha, Auth, Controller) {
Controller.start();
this.jQuery = this.$ = function() {
console.warn('You should add "jquery" to your dependencies in define() instead of using the global jQuery!');
return jQuery.apply(this, arguments);
};
jQuery.extend(this.jQuery, jQuery);
jQuery.curCSS = jQuery.css;
return jQuery(document).on('click', 'a:not([data-bypass])', function(evt) {
var href;
evt.preventDefault();
href = $(this).attr('href');
console.warn("User clicked on an internal link. Use the atc/controller module instead of the URL " + href);
if ((href != null) && !/^javascript:/.test(href)) {
return Backbone.history.navigate(href, true);
}
});
});
}).call(this);