From 2f4aecaf9b3cfb3dcdff1deb3c4e0e7aa906c423 Mon Sep 17 00:00:00 2001 From: Fergal Moran Date: Sat, 22 Jun 2013 19:37:25 +0100 Subject: [PATCH] Fixed login only on home page --- static/js/app/views/header.coffee | 14 +------------- static/js/app/views/header.js | 17 +---------------- 2 files changed, 2 insertions(+), 29 deletions(-) diff --git a/static/js/app/views/header.coffee b/static/js/app/views/header.coffee index fa32ff0..1e36159 100755 --- a/static/js/app/views/header.coffee +++ b/static/js/app/views/header.coffee @@ -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 \ No newline at end of file diff --git a/static/js/app/views/header.js b/static/js/app/views/header.js index 603f41c..0a8a4ce 100755 --- a/static/js/app/views/header.js +++ b/static/js/app/views/header.js @@ -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);