_showSaveSongsSimpleMenu: function(songs) { var songActions = new SongActions(); var offset = this.$el.offset(); var playlists = this.model.get('signInManager').get('signedInUser').get('playlists'); songActions.showSaveMenu(songs, offset.top, offset.left, playlists); }
onClick: function() { var songActions = new SongActions(); var offset = this.$el.offset(); var playlists = this.signInManager.get('signedInUser').get('playlists'); songActions.showSaveMenu(this.song, offset.top, offset.left, playlists); },
_showSaveSelectedSimpleMenu: function() { var canSave = this._canSave(); if (canSave) { var songActions = new SongActions(); var songs = this.collection.pluck('song'); var offset = this.ui.saveAllButton.offset(); var playlists = this.signInManager.get('signedInUser').get('playlists'); songActions.showSaveMenu(songs, offset.top, offset.left, playlists); } },
_onClickSaveButton: function() { var canSave = this.model.get('canSave'); if (canSave) { var songActions = new SongActions(); var songs = this.model.get('activeCollection').getSelectedSongs(); var offset = this.ui.saveButton.offset(); var playlists = this.model.get('signInManager').get('signedInUser').get('playlists'); songActions.showSaveMenu(songs, offset.top, offset.left, playlists); // Don't deselect collections immediately when the button is clicked because more actions are needed. // If the user decides to not use the simple menu then don't de-select, either. this.listenTo(StreamusFG.channels.simpleMenu.vent, 'clicked:item', this._onSimpleMenuClickedItem); this.listenTo(StreamusFG.channels.simpleMenu.vent, 'hidden', this._onSimpleMenuHidden); } },