mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-20 21:33:15 -07:00
UI changes to consume actor searching API
This commit is contained in:
parent
9380ba3e45
commit
0aa00fd888
5 changed files with 173 additions and 72 deletions
35
Ombi.UI/Content/requests.js
vendored
35
Ombi.UI/Content/requests.js
vendored
|
@ -95,7 +95,10 @@ $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
|
|||
//if ($tvl.mixItUp('isLoaded')) $tvl.mixItUp('destroy');
|
||||
//$tvl.mixItUp(mixItUpConfig(activeState)); // init or reinit
|
||||
}
|
||||
if (target === "#MoviesTab") {
|
||||
if (target === "#MoviesTab" || target === "#ActorsTab") {
|
||||
if (target === "#ActorsTab") {
|
||||
actorLoad();
|
||||
}
|
||||
$('#approveMovies,#deleteMovies').show();
|
||||
if ($tvl.mixItUp('isLoaded')) {
|
||||
activeState = $tvl.mixItUp('getState');
|
||||
|
@ -733,6 +736,36 @@ function initLoad() {
|
|||
|
||||
}
|
||||
|
||||
|
||||
function actorLoad() {
|
||||
var $ml = $('#actorMovieList');
|
||||
if ($ml.mixItUp('isLoaded')) {
|
||||
activeState = $ml.mixItUp('getState');
|
||||
$ml.mixItUp('destroy');
|
||||
}
|
||||
$ml.html("");
|
||||
|
||||
var url = createBaseUrl(base, '/requests/actor');
|
||||
$.ajax(url).success(function (results) {
|
||||
if (results.length > 0) {
|
||||
results.forEach(function (result) {
|
||||
var context = buildRequestContext(result, "movie");
|
||||
var html = searchTemplate(context);
|
||||
$ml.append(html);
|
||||
});
|
||||
|
||||
|
||||
$('.customTooltip').tooltipster({
|
||||
contentCloning: true
|
||||
});
|
||||
}
|
||||
else {
|
||||
$ml.html(noResultsHtml.format("movie"));
|
||||
}
|
||||
$ml.mixItUp(mixItUpConfig());
|
||||
});
|
||||
};
|
||||
|
||||
function movieLoad() {
|
||||
var $ml = $('#movieList');
|
||||
if ($ml.mixItUp('isLoaded')) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue