Merge remote-tracking branch 'remove_usage_local_var_undeclared'

Code cosmetics
This commit is contained in:
Ozzieisaacs 2020-04-24 21:05:56 +02:00
commit 063ee5e855
3 changed files with 10 additions and 14 deletions

View File

@ -73,9 +73,9 @@ $(function () {
if (showFlag === 1) { if (showFlag === 1) {
$("#meta-info").html("<ul id=\"book-list\" class=\"media-list\"></ul>"); $("#meta-info").html("<ul id=\"book-list\" class=\"media-list\"></ul>");
} }
if ((ggDone == 3 || (ggDone == 1 && ggResults.length === 0)) && if ((ggDone === 3 || (ggDone === 1 && ggResults.length === 0)) &&
(dbDone == 3 || (ggDone == 1 && dbResults.length === 0)) && (dbDone === 3 || (ggDone === 1 && dbResults.length === 0)) &&
(cvDone == 3 || (ggDone == 1 && cvResults.length === 0))) { (cvDone === 3 || (ggDone === 1 && cvResults.length === 0))) {
$("#meta-info").html("<p class=\"text-danger\">" + msg.no_result + "</p>"); $("#meta-info").html("<p class=\"text-danger\">" + msg.no_result + "</p>");
return; return;
} }
@ -191,7 +191,7 @@ $(function () {
var dateFomers = ""; var dateFomers = "";
if (result.store_date) { if (result.store_date) {
dateFomers = result.store_date.split("-"); dateFomers = result.store_date.split("-");
}else{ } else {
dateFomers = result.date_added.split("-"); dateFomers = result.date_added.split("-");
} }
var publishedYear = parseInt(dateFomers[0]); var publishedYear = parseInt(dateFomers[0]);
@ -202,12 +202,12 @@ $(function () {
var book = { var book = {
id: result.id, id: result.id,
title: seriesTitle + ' #' +('00' + result.issue_number).slice(-3) + ' - ' + result.name, title: seriesTitle + " #" + ("00" + result.issue_number).slice(-3) + " - " + result.name,
authors: result.author || [], authors: result.author || [],
description: result.description, description: result.description,
publisher: "", publisher: "",
publishedDate: publishedDate || "", publishedDate: publishedDate || "",
tags: ['Comics', seriesTitle], tags: ["Comics", seriesTitle],
rating: 0, rating: 0,
series: seriesTitle || "", series: seriesTitle || "",
cover: result.image.original_url, cover: result.image.original_url,

View File

@ -211,8 +211,7 @@ $(function() {
data: {"parameter":2}, data: {"parameter":2},
success: function success(data) { success: function success(data) {
$("#spinner2").hide(); $("#spinner2").hide();
ResultText = data.text; $("#DialogContent").html(data.text);
$("#DialogContent").html(ResultText);
$("#DialogFinished").removeClass("hidden"); $("#DialogFinished").removeClass("hidden");
} }
}); });
@ -298,7 +297,7 @@ $(function() {
$(".discover .row").isotope("layout"); $(".discover .row").isotope("layout");
}); });
$('#import_ldap_users').click(function() { $("#import_ldap_users").click(function() {
$("#DialogHeader").addClass("hidden"); $("#DialogHeader").addClass("hidden");
$("#DialogFinished").addClass("hidden"); $("#DialogFinished").addClass("hidden");
$("#DialogContent").html(""); $("#DialogContent").html("");
@ -311,8 +310,7 @@ $(function() {
url: path + "/../../import_ldap_users", url: path + "/../../import_ldap_users",
success: function success(data) { success: function success(data) {
$("#spinner2").hide(); $("#spinner2").hide();
ResultText = data.text; $("#DialogContent").html(data.text);
$("#DialogContent").html(ResultText);
$("#DialogFinished").removeClass("hidden"); $("#DialogFinished").removeClass("hidden");
} }
}); });

View File

@ -149,12 +149,10 @@ $(function() {
$.ajax({ $.ajax({
url: path + "/../../ajax/editrestriction/" + type, url: path + "/../../ajax/editrestriction/" + type,
type: "Post", type: "Post",
data: row //$(this).closest("form").serialize() + "&" + $(this)[0].name + "=", data: row
}); });
}); });
$("[id^=submit_]").click(function(event) { $("[id^=submit_]").click(function(event) {
// event.stopPropagation();
// event.preventDefault();
$(this)[0].blur(); $(this)[0].blur();
$.ajax({ $.ajax({
url: path + "/../../ajax/addrestriction/" + type, url: path + "/../../ajax/addrestriction/" + type,