mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 02:26:55 -07:00
Working on the beta releases page and also the user management
This commit is contained in:
parent
fb19ffe9e7
commit
185abcb1a5
11 changed files with 657 additions and 20 deletions
51
PlexRequests.UI/Content/app/requests/requestsController.js
Normal file
51
PlexRequests.UI/Content/app/requests/requestsController.js
Normal file
|
@ -0,0 +1,51 @@
|
|||
(function () {
|
||||
var controller = function($scope, requestsService) {
|
||||
|
||||
$scope.requests = [];
|
||||
$scope.selectedTab = {};
|
||||
$scope.currentPage = 1;
|
||||
$scope.tabs = [];
|
||||
|
||||
$scope.plexSettings = {};
|
||||
$scope.requestSettings = {};
|
||||
|
||||
// Search
|
||||
$scope.searchTerm = "";
|
||||
|
||||
|
||||
// Called on page load
|
||||
$scope.init = function() {
|
||||
// Get the settings
|
||||
$scope.plexSettings = requestsService.getPlexRequestSettings(getBaseUrl());
|
||||
$scope.requestSettings = requestsService.getRequestSettings(getBaseUrl());
|
||||
|
||||
if ($scope.plexSettings.SearchForMovies) {
|
||||
$scope.selectedTab = "movies";
|
||||
|
||||
// Load the movie Requests
|
||||
$scope.requests = requestsService.getRequests("movie", getBaseUrl());
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
$scope.changeTab = function(tab) {
|
||||
// load the data from the tab
|
||||
switch (tab) {
|
||||
// Set the selected tab and load the appropriate data
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
$scope.search = function() {
|
||||
$scope.requests = requestsService.getRequests
|
||||
};
|
||||
|
||||
function getBaseUrl() {
|
||||
return $('#baseUrl').val();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
angular.module('PlexRequests').controller('requestsController', ["$scope", "requestsService", controller]);
|
||||
}());
|
Loading…
Add table
Add a link
Reference in a new issue