|
@@ -35,8 +35,6 @@ export class PlaylistEditCtrl {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
filterFoundPlaylistItems() {
|
|
filterFoundPlaylistItems() {
|
|
|
- console.log('filter !');
|
|
|
|
|
- console.log(this.dashboardresult);
|
|
|
|
|
this.filteredDashboards = _.reject(this.dashboardresult, (playlistItem) => {
|
|
this.filteredDashboards = _.reject(this.dashboardresult, (playlistItem) => {
|
|
|
return _.findWhere(this.playlistItems, (listPlaylistItem) => {
|
|
return _.findWhere(this.playlistItems, (listPlaylistItem) => {
|
|
|
return parseInt(listPlaylistItem.value) === playlistItem.id;
|
|
return parseInt(listPlaylistItem.value) === playlistItem.id;
|
|
@@ -56,8 +54,6 @@ export class PlaylistEditCtrl {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
addTagPlaylistItem(tag) {
|
|
addTagPlaylistItem(tag) {
|
|
|
- console.log(tag);
|
|
|
|
|
-
|
|
|
|
|
var playlistItem: any = {
|
|
var playlistItem: any = {
|
|
|
value: tag.term,
|
|
value: tag.term,
|
|
|
type: 'dashboard_by_tag',
|
|
type: 'dashboard_by_tag',
|
|
@@ -102,26 +98,12 @@ export class PlaylistEditCtrl {
|
|
|
return !this.playlistItems.length;
|
|
return !this.playlistItems.length;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- isSearchResultsEmpty() {
|
|
|
|
|
- return !this.dashboardresult.length;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- isSearchQueryEmpty() {
|
|
|
|
|
- return this.searchQuery === '';
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
backToList() {
|
|
backToList() {
|
|
|
this.$location.path('/playlists');
|
|
this.$location.path('/playlists');
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- isLoading() {
|
|
|
|
|
- return this.loading;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
searchStarted(promise) {
|
|
searchStarted(promise) {
|
|
|
promise.then((data) => {
|
|
promise.then((data) => {
|
|
|
- console.log('searchStarted: ', data);
|
|
|
|
|
-
|
|
|
|
|
this.dashboardresult = data.dashboardResult;
|
|
this.dashboardresult = data.dashboardResult;
|
|
|
this.tagresult = data.tagResult;
|
|
this.tagresult = data.tagResult;
|
|
|
this.filterFoundPlaylistItems();
|
|
this.filterFoundPlaylistItems();
|