Skip to content
Permalink
bcc30efe3c
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
67 lines (57 sloc) 1.8 KB
// This controller will hold logic for the employee Portal homepage (Order List, Logout), Customer Info, Media Center, and Reports
angular.module('routerApp').controller('adminController', function ($scope, $http, $log, $timeout, $cookies, urlService, $anchorScroll, $location, $q, $state, $rootScope) {
/* Retrieve Url */
var url = urlService.web;
$cookies.put('PAGE', 'Admin');
/* Functions Defined */
// Logging out
$scope.logout = function () {
$cookies.remove('userid');
$state.go('home');
}
/* BEGIN LOGIC */
$scope.showMediaOptions = true;
$scope.showTrackFields = false;
$scope.showAlbumFields = false;
$scope.showArtistFields = false;
$scope.showGenreFields = false;
$scope.showMediaTypeFields = false;
$scope.back = function () {
$scope.showMediaOptions = true;
$scope.showTrackFields = false;
$scope.showAlbumFields = false;
$scope.showArtistFields = false;
$scope.showGenreFields = false;
$scope.showMediaTypeFields = false;
}
$scope.toCreateTrack = function () {
$scope.showMediaOptions = false;
$scope.showTrackFields = true;
};
$scope.toCreateAlbum = function () {
$scope.showMediaOptions = false;
};
$scope.toCreateArtist = function () {
$scope.showMediaOptions = false;
};
$scope.toCreateGenre = function () {
$scope.showMediaOptions = false;
};
$scope.toCreateMediaType = function () {
$scope.showMediaOptions = false;
};
$scope.playlists = [
{
"playlistId": "1",
"name": "test1"
},
{
"playlistId": "2",
"name": "test2"
},
{
"playlistId": "3",
"name": "test3"
}
];
});