|
|
@@ -5776,9 +5776,12 @@ function overseerrActions(id, action, type = null, extra = null){
|
|
|
organizrAPI2(method,apiUrl,data).success(function(data) {
|
|
|
try {
|
|
|
let response = data.response;
|
|
|
+ if(action == 'add'){
|
|
|
+ addTempRequest();
|
|
|
+ }
|
|
|
messageSingle(response.message,'',activeInfo.settings.notifications.position,"#FFF","success","5000");
|
|
|
homepageRequests('overseerr');
|
|
|
- swal.close();
|
|
|
+ cleanCloseSwal();
|
|
|
ajaxloader();
|
|
|
}catch(e) {
|
|
|
organizrCatchError(e,data);
|
|
|
@@ -5824,6 +5827,9 @@ function ombiActions(id, action, type, extra = null){
|
|
|
organizrAPI2(method,apiUrl,data).success(function(data) {
|
|
|
try {
|
|
|
let response = data.response;
|
|
|
+ if(action == 'add'){
|
|
|
+ addTempRequest();
|
|
|
+ }
|
|
|
messageSingle(response.message,'',activeInfo.settings.notifications.position,"#FFF","success","5000");
|
|
|
homepageRequests('ombi');
|
|
|
ajaxloader();
|
|
|
@@ -5835,6 +5841,32 @@ function ombiActions(id, action, type, extra = null){
|
|
|
OrganizrApiError(xhr, 'Ombi Error');
|
|
|
});
|
|
|
}
|
|
|
+
|
|
|
+function addTempRequest(){
|
|
|
+ let service = activeInfo.settings.homepage.requests.service;
|
|
|
+ let html = `
|
|
|
+ <div class="item lazyload recent-poster request-item request-adding mouse" data-src="">
|
|
|
+ <div class="outside-request-div">
|
|
|
+ <div class="inside-over-request-div bg-danger"></div>
|
|
|
+ <div class="inside-request-div bg-info"></div>
|
|
|
+ </div>
|
|
|
+ <div class="hover-homepage-item"></div>
|
|
|
+ <span class="elip request-title-tv"><i class="fa fa-tv"></i></span>
|
|
|
+ <span class="elip recent-title">Adding Request</span>
|
|
|
+ </div>
|
|
|
+ `;
|
|
|
+ $('.request-items-' + service).trigger('add.owl', [html, 0]).trigger('refresh.owl');
|
|
|
+ setTimeout(function(){
|
|
|
+ ajaxloader('.request-adding', 'in');
|
|
|
+ }, 100
|
|
|
+ );
|
|
|
+}
|
|
|
+function cleanCloseSwal(){
|
|
|
+ let state = swal.getState().isOpen;
|
|
|
+ if(state === true){
|
|
|
+ swal.close();
|
|
|
+ }
|
|
|
+}
|
|
|
function doneTyping () {
|
|
|
let title = $('#request-input').val();
|
|
|
if(title == ''){
|
|
|
@@ -11185,4 +11217,4 @@ function launch(){
|
|
|
orgErrorAlert('<h3>Webserver Error:</h3>' + xhr.responseText);
|
|
|
}
|
|
|
});
|
|
|
-}
|
|
|
+}
|