This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/controllers/application_controller.js
2013-02-25 08:36:46 +11:00

23 lines
529 B
JavaScript

/*global _gaq:true */
window.Discourse.ApplicationController = Ember.Controller.extend({
needs: ['modal'],
showLogin: function() {
var _ref;
return (_ref = this.get('controllers.modal')) ? _ref.show(Discourse.LoginView.create()) : void 0;
},
routeChanged: function(){
if (window._gaq === undefined) { return; }
if(this.afterFirstHit) {
Em.run.next(function(){
_gaq.push(['_trackPageview']);
});
} else {
this.afterFirstHit = true;
}
}.observes('currentPath')
});