Fix Subsonic tab toggling behaviour
Previously clicking on an already-selected tab would hide its contents.
This commit is contained in:
parent
590dfee57a
commit
5842c0615a
1 changed files with 9 additions and 21 deletions
|
@ -129,35 +129,23 @@ angular.module('jamstash.subsonic.controller', [
|
||||||
|
|
||||||
$rootScope.showIndex = false;
|
$rootScope.showIndex = false;
|
||||||
$scope.toggleIndex = function () {
|
$scope.toggleIndex = function () {
|
||||||
if ($rootScope.showIndex) {
|
|
||||||
$rootScope.showIndex = false;
|
|
||||||
} else {
|
|
||||||
$rootScope.showIndex = true;
|
$rootScope.showIndex = true;
|
||||||
$scope.showPlaylist = false;
|
$scope.showPlaylist = false;
|
||||||
$scope.showPodcast = false;
|
$scope.showPodcast = false;
|
||||||
}
|
|
||||||
$scope.saveDefaultSection('index');
|
$scope.saveDefaultSection('index');
|
||||||
};
|
};
|
||||||
$scope.showPlaylist = false;
|
$scope.showPlaylist = false;
|
||||||
$scope.togglePlaylist = function () {
|
$scope.togglePlaylist = function () {
|
||||||
if ($scope.showPlaylist) {
|
|
||||||
$scope.showPlaylist = false;
|
|
||||||
} else {
|
|
||||||
$scope.showPlaylist = true;
|
|
||||||
$rootScope.showIndex = false;
|
$rootScope.showIndex = false;
|
||||||
|
$scope.showPlaylist = true;
|
||||||
$scope.showPodcast = false;
|
$scope.showPodcast = false;
|
||||||
}
|
|
||||||
$scope.saveDefaultSection('playlist');
|
$scope.saveDefaultSection('playlist');
|
||||||
};
|
};
|
||||||
$scope.showPodcast = false;
|
$scope.showPodcast = false;
|
||||||
$scope.togglePodcast = function () {
|
$scope.togglePodcast = function () {
|
||||||
if ($scope.showPodcast) {
|
|
||||||
$scope.showPodcast = false;
|
|
||||||
} else {
|
|
||||||
$scope.showPodcast = true;
|
|
||||||
$scope.showPlaylist = false;
|
|
||||||
$rootScope.showIndex = false;
|
$rootScope.showIndex = false;
|
||||||
}
|
$scope.showPlaylist = false;
|
||||||
|
$scope.showPodcast = true;
|
||||||
$scope.saveDefaultSection('podcast');
|
$scope.saveDefaultSection('podcast');
|
||||||
};
|
};
|
||||||
$scope.saveDefaultSection = function (val) {
|
$scope.saveDefaultSection = function (val) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue