Added option to save books with no nenglish characters
Imporvements on metadata search
This commit is contained in:
@@ -30,7 +30,7 @@ $("#have_read_cb").on("change", function() {
|
||||
$("#flash_danger").remove();
|
||||
if (!jQuery.isEmptyObject(data)) {
|
||||
data.forEach(function (item) {
|
||||
$(".navbar").after('<div class="row-fluid text-center" style="margin-top: -20px;">' +
|
||||
$(".navbar").after('<div class="row-fluid text-center" >' +
|
||||
'<div id="flash_' + item.type + '" class="alert alert-' + item.type + '">' + item.message + '</div>' +
|
||||
'</div>');
|
||||
});
|
||||
|
||||
@@ -82,7 +82,6 @@ $(function () {
|
||||
success: function success(data) {
|
||||
// console.log(data);
|
||||
data.forEach(function(provider) {
|
||||
//$("#metadata_provider").html("<ul id=\"book-list\" class=\"media-list\"></ul>");
|
||||
var checked = "";
|
||||
if (provider.active) {
|
||||
checked = "checked";
|
||||
@@ -94,6 +93,17 @@ $(function () {
|
||||
});
|
||||
}
|
||||
|
||||
$(document).on("change", ".pill", function () {
|
||||
var id = $(this).data("control");
|
||||
var val = $(this).prop('checked');
|
||||
$.ajax({
|
||||
method:"post",
|
||||
contentType: "application/json; charset=utf-8",
|
||||
dataType: "json",
|
||||
url: getPath() + "/metadata/provider",
|
||||
data: JSON.stringify({id : id, value: val}),
|
||||
});
|
||||
});
|
||||
|
||||
$("#meta-search").on("submit", function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
@@ -172,7 +172,7 @@ $("#delete_confirm").click(function() {
|
||||
if (item.format != "") {
|
||||
$("button[data-delete-format='"+item.format+"']").addClass('hidden');
|
||||
}
|
||||
$( ".navbar" ).after( '<div class="row-fluid text-center" style="margin-top: -20px;">' +
|
||||
$( ".navbar" ).after( '<div class="row-fluid text-center" >' +
|
||||
'<div id="flash_'+item.type+'" class="alert alert-'+item.type+'">'+item.message+'</div>' +
|
||||
'</div>');
|
||||
|
||||
@@ -543,7 +543,7 @@ $(function() {
|
||||
function handle_response(data) {
|
||||
if (!jQuery.isEmptyObject(data)) {
|
||||
data.forEach(function (item) {
|
||||
$(".navbar").after('<div class="row-fluid text-center" style="margin-top: -20px;">' +
|
||||
$(".navbar").after('<div class="row-fluid text-center">' +
|
||||
'<div id="flash_' + item.type + '" class="alert alert-' + item.type + '">' + item.message + '</div>' +
|
||||
'</div>');
|
||||
});
|
||||
|
||||
@@ -744,7 +744,7 @@ function handleListServerResponse (data) {
|
||||
$("#flash_danger").remove();
|
||||
if (!jQuery.isEmptyObject(data)) {
|
||||
data.forEach(function(item) {
|
||||
$(".navbar").after('<div class="row-fluid text-center" style="margin-top: -20px;">' +
|
||||
$(".navbar").after('<div class="row-fluid text-center">' +
|
||||
'<div id="flash_' + item.type + '" class="alert alert-' + item.type + '">' + item.message + '</div>' +
|
||||
'</div>');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user