Fixed login only on home page

This commit is contained in:
Fergal Moran
2013-06-22 19:37:25 +01:00
parent 04b3f5d4dd
commit 2f4aecaf9b
2 changed files with 2 additions and 29 deletions

View File

@@ -21,7 +21,7 @@ define ["underscore", "backbone", "vent", "utils", "text!/tpl/HeaderView"],
@listenTo vent, "mix:pause", @trackPaused
login: ->
utils.modal "dlg/LoginView"
utils.modal "/dlg/LoginView"
logout: ->
utils.showAlert "Success", "You are now logged out"
@@ -45,16 +45,4 @@ define ["underscore", "backbone", "vent", "utils", "text!/tpl/HeaderView"],
playLive: ->
vent.trigger('live:play')
togglePlayState: ->
button = $(@el).find("#header-play-pause-button")
mode = button.data("mode")
if mode is "play"
dssSoundHandler.resumeSound()
_eventAggregator.trigger "track_playing"
button.data "mode", "pause"
else
dssSoundHandler.pauseSound()
_eventAggregator.trigger "track_paused"
button.data "mode", "play"
HeaderView

View File

@@ -39,7 +39,7 @@ Code provided under the BSD License:
};
HeaderView.prototype.login = function() {
return utils.modal("dlg/LoginView");
return utils.modal("/dlg/LoginView");
};
HeaderView.prototype.logout = function() {
@@ -70,21 +70,6 @@ Code provided under the BSD License:
return vent.trigger('live:play');
};
HeaderView.prototype.togglePlayState = function() {
var button, mode;
button = $(this.el).find("#header-play-pause-button");
mode = button.data("mode");
if (mode === "play") {
dssSoundHandler.resumeSound();
_eventAggregator.trigger("track_playing");
return button.data("mode", "pause");
} else {
dssSoundHandler.pauseSound();
_eventAggregator.trigger("track_paused");
return button.data("mode", "play");
}
};
return HeaderView;
})(Backbone.View);