Skip to content

Commit

Permalink
fix for tab switching
Browse files Browse the repository at this point in the history
  • Loading branch information
ravibail committed Aug 25, 2017
1 parent 25bf345 commit 5ef3145
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions config/env/all.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ module.exports = {
audioRegex: /(mp3|m4a|mp4a|aac)$/i,
imageRegex: /(jpg|jpeg|png|gif|bmp)$/i,
htmlRegex: /\.html$/,
noticeRegex: /\.html$/,
zipfileRegex: /(.zip|.gz|.bz2)$/i,
repofileRegex: /\.repo$/i,
liveStreamRegex: /\.tv$/i,
Expand Down
5 changes: 5 additions & 0 deletions public/app/js/controllers/playlists.js
Original file line number Diff line number Diff line change
Expand Up @@ -396,13 +396,18 @@ angular.module('piPlaylists.controllers', [])
return !(file.match(piConstants.audioRegex) ||
file.match(piConstants.liveStreamRegex) || file.match(piConstants.CORSLink));
})


$scope.modal = $modal.open({
templateUrl: '/app/templates/linkfile-popup.html',
scope: $scope
});
}

$scope.changeTab = function(index) {
$scope.tabIndex = index;
}

$scope.linkFileSave = function(file){
$scope.selectedAsset[$scope.selectedZone] = file;
$scope.saveData();
Expand Down
4 changes: 2 additions & 2 deletions public/app/templates/linkfile-popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ <h4>File to be played in the {{selectedZone}} zone
<div class="modal-body">
<div class="panel-body">
<tabset>
<tab index="0" heading="Assets" active="tabIndex == 0">
<tab index="0" heading="Assets" active="tabIndex == 0" ng-click="changeTab($index)">
<ul class="list-group">
<li class="list-group-item list-group-item-info">
<input type="text" placeholder="Filter by Name" ng-model="search" class="form-control"/>
Expand Down Expand Up @@ -37,7 +37,7 @@ <h4 class="media-heading">&nbsp;{{file.fileDetails.name}}</h4>
</li>
</ul>
</tab>
<tab index="1" heading="Playlists(needs 1.7.0)" active="tabIndex == 1">
<tab index="1" heading="Playlists(needs 1.7.0)" active="tabIndex == 1" ng-click="changeTab($index)">
<ul class="list-group">
<li class="list-group-item list-group-item-info">
<input type="text" placeholder="{{'Filter by Name' }}" ng-model="search" class="form-control"/>
Expand Down
4 changes: 2 additions & 2 deletions public/app/templates/linkfile-popup.jade
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
.modal-body
.panel-body
tabset
tab(index="0",heading='Assets',active="tabIndex == 0")
tab(index="0",heading='Assets',active="tabIndex == 0",ng-click="changeTab($index)")
ul.list-group
li.list-group-item.list-group-item-info
input.form-control(type="text",placeholder="Filter by Name",ng-model="search")
Expand Down Expand Up @@ -43,7 +43,7 @@



tab(index="1",heading='Playlists(needs 1.7.0)',active="tabIndex == 1")
tab(index="1",heading='Playlists(needs 1.7.0)',active="tabIndex == 1",ng-click="changeTab($index)")
ul.list-group
li.list-group-item.list-group-item-info
input.form-control(type="text",placeholder="{{'Filter by Name' }}",ng-model="search")
Expand Down

0 comments on commit 5ef3145

Please sign in to comment.