diff --git a/TeamDBAwesome/TeamDBAwesome/TeamDBAwesome.csproj b/TeamDBAwesome/TeamDBAwesome/TeamDBAwesome.csproj
index 45e4189..9df521e 100644
--- a/TeamDBAwesome/TeamDBAwesome/TeamDBAwesome.csproj
+++ b/TeamDBAwesome/TeamDBAwesome/TeamDBAwesome.csproj
@@ -234,7 +234,6 @@
-
diff --git a/TeamDBAwesome/TeamDBAwesome/js/adminController.js b/TeamDBAwesome/TeamDBAwesome/js/adminController.js
index 7dc6286..eac3e7a 100644
--- a/TeamDBAwesome/TeamDBAwesome/js/adminController.js
+++ b/TeamDBAwesome/TeamDBAwesome/js/adminController.js
@@ -39,6 +39,7 @@ angular.module('routerApp').controller('adminController', function ($scope, $htt
$scope.toCreateTrack = function () {
$scope.showMediaOptions = false;
$scope.showTrackFields = true;
+ window.alert("CAUTION: Make sure that the Artist, Album, and Genre fields already exist in the database before creating the track")
};
$scope.toCreateAlbum = function () {
$scope.showMediaOptions = false;
@@ -72,27 +73,12 @@ angular.module('routerApp').controller('adminController', function ($scope, $htt
]
}
- $scope.custInfoGridOptions.data = [
- {
- "Fname": "Test",
- "Lname": "Test",
- "Address": "Test",
- "City": "Test",
- "State": "Test",
- "Post": "Test",
- "Country": "Test",
- "Phone": "Test",
- "Fax": "Test",
- "Email": "Test",
- "Company": "Test"
-
- }
- ]
//End Customer Demographics
//Playlist Editor
$scope.editing = false;
$scope.currentPlaylist = 0;
+ $scope.addingTrack = false;
$scope.addPlaylist = function () {
var name = prompt("Enter the name of the playlist");
@@ -146,6 +132,15 @@ angular.module('routerApp').controller('adminController', function ($scope, $htt
}
+ $scope.addTrack = function (trackID) {
+ console.log(trackID);
+ $http.get("http://localhost:50031/api/AddTrackPlaylist?PlaylistID=" + $scope.currentPlaylist + "&TrackID=" + trackID)
+ .success(function (response) {
+ console.log(response);
+ })
+ $scope.getPlaylistTracks($scope.currentPlaylist);
+ }
+
$scope.deleteTrack = function (trackID) {
if (confirm("Are you sure you want to delete this track from this playlist? \nPress OK to confirm") == true) {
$scope.dropTrack(trackID);
@@ -159,6 +154,47 @@ angular.module('routerApp').controller('adminController', function ($scope, $htt
})
}
+
+ $scope.searchGridOptions = {
+ enableSorting: true,
+ columnDefs: [
+ { field: 'TrackId', displayName: ' ', width: "30%", cellTemplate: '
+ ' },
+ { field: 'TrackName', displayName: ' Track Name', width: "20%" },
+ { field: 'artist', displayName: ' Artist Name', width: "20%" },
+ { field: 'AlbumTitle', displayName: ' Album ', width: "15%" },
+ { field: 'MediaType', displayName: ' Media ', width: "10%" },
+ { field: 'Genre', displayName: ' Genre ', width: "10%" },
+ { field: 'Clip', displayName: ' Clip ', width: "10%" },
+ { field: 'UnitPrice', displayName: ' Price ', width: "10%" }
+ ]
+ };
+
+ $scope.search = function (token, category) {
+ console.log(token);
+ console.log(category);
+ console.log($scope.data);
+ $http.get("http://localhost:50031/api/Search?search=" + token)
+ .success(function (response) {
+ $scope.data = angular.copy(response);
+ console.log(response);
+ if (category == "Track") {
+ $scope.searchGridOptions.data = $scope.data.Track;
+ }
+ else if (category == "Artist") {
+ $scope.searchGridOptions.data = $scope.data.Artist;
+ }
+ else if (category == "Composer") {
+ $scope.searchGridOptions.data = $scope.data.Composer;
+ }
+ else if (category == "Genre") {
+ $scope.searchGridOptions.data = $scope.data.Genre;
+ }
+ else if (category == "Media") {
+ $scope.searchGridOptions.data = $scope.data.Media;
+ }
+ });
+ }
+
//End Playlist Editor
//Reports
diff --git a/TeamDBAwesome/TeamDBAwesome/pages/admin-delete-playlist.html b/TeamDBAwesome/TeamDBAwesome/pages/admin-delete-playlist.html
deleted file mode 100644
index 2899fc1..0000000
--- a/TeamDBAwesome/TeamDBAwesome/pages/admin-delete-playlist.html
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/TeamDBAwesome/TeamDBAwesome/pages/admin-playlist-manager.html b/TeamDBAwesome/TeamDBAwesome/pages/admin-playlist-manager.html
index f75441d..bcb4ec4 100644
--- a/TeamDBAwesome/TeamDBAwesome/pages/admin-playlist-manager.html
+++ b/TeamDBAwesome/TeamDBAwesome/pages/admin-playlist-manager.html
@@ -21,7 +21,40 @@