|
|
|
@ -23,6 +23,8 @@ $("body.uiconfig").addClass("admin");
|
|
|
|
|
$("body.advsearch").addClass("advanced_search");
|
|
|
|
|
$("body.newuser").addClass("admin");
|
|
|
|
|
$("body.mailset").addClass("admin");
|
|
|
|
|
$("body > div.container-fluid > div > div.col-sm-10 > div.filterheader").attr("style","margin: 40px 0 !important; padding: 0 10px 0 40px !important;");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Back button
|
|
|
|
|
curHref = window.location.href.split("/");
|
|
|
|
@ -106,15 +108,15 @@ if ( $("body.book").length > 0 ) {
|
|
|
|
|
if (description.context != undefined) {
|
|
|
|
|
newdesc = description.text()
|
|
|
|
|
.replace(/^(?=\n)$|^\s*|\s*$|\n\n+/gm, "").split(/\n/);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
} else {
|
|
|
|
|
newdesc = description.text();
|
|
|
|
|
}
|
|
|
|
|
doc = nlp(newdesc.toString());
|
|
|
|
|
sentences = doc.map((m) => m.out("text"));
|
|
|
|
|
sentences[0] = sentences[0].replace(",", "");
|
|
|
|
|
$(".comments p").remove();
|
|
|
|
|
let size = 3; let sentenceChunks = [];
|
|
|
|
|
let size = 3;
|
|
|
|
|
let sentenceChunks = [];
|
|
|
|
|
for (var i = 0; i < sentences.length; i += size) {
|
|
|
|
|
sentenceChunks.push(sentences.slice(i, i + size));
|
|
|
|
|
}
|
|
|
|
@ -127,8 +129,7 @@ if ( $("body.book").length > 0 ) {
|
|
|
|
|
output += "<p>" + preOutput + "</p>";
|
|
|
|
|
});
|
|
|
|
|
$("div.comments").append(output);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
} else {
|
|
|
|
|
$.each(description, function (i, val) {
|
|
|
|
|
// $( description[i].outerHTML ).appendTo( ".comments" );
|
|
|
|
|
$("div.comments :empty").remove();
|
|
|
|
@ -304,6 +305,7 @@ if ( $("body.book").length > 0 ) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dropdownToggle();
|
|
|
|
|
|
|
|
|
|
$(window).on("resize", function () {
|
|
|
|
@ -335,13 +337,10 @@ $(document).mouseup(function (e) {
|
|
|
|
|
if (!$(value).is(e.target) // if the target of the click isn't the container...
|
|
|
|
|
&& $(value).has(e.target).length === 0) // ... nor a descendant of the container
|
|
|
|
|
{
|
|
|
|
|
if ( $(value).hasClass("dropdown-menu") )
|
|
|
|
|
{
|
|
|
|
|
if ($(value).hasClass("dropdown-menu")) {
|
|
|
|
|
$(value).hide();
|
|
|
|
|
} else
|
|
|
|
|
{
|
|
|
|
|
if ( $(value).hasClass("collapse") )
|
|
|
|
|
{
|
|
|
|
|
} else {
|
|
|
|
|
if ($(value).hasClass("collapse")) {
|
|
|
|
|
$(value).collapse("toggle");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -510,19 +509,22 @@ if ( $( "body.shelf" ).length > 0 ) {
|
|
|
|
|
$(".delete-shelf-btn").attr({
|
|
|
|
|
"data-toggle-two": "tooltip",
|
|
|
|
|
"title": $(".delete-shelf-btn").text(), // "Delete Shelf"
|
|
|
|
|
"data-placement": "bottom" })
|
|
|
|
|
"data-placement": "bottom"
|
|
|
|
|
})
|
|
|
|
|
.addClass("delete-btn-tooltip");
|
|
|
|
|
|
|
|
|
|
$(".edit-shelf-btn").attr({
|
|
|
|
|
"data-toggle-two": "tooltip",
|
|
|
|
|
"title": $(".edit-shelf-btn").text(), // "Edit Shelf"
|
|
|
|
|
"data-placement": "bottom" })
|
|
|
|
|
"data-placement": "bottom"
|
|
|
|
|
})
|
|
|
|
|
.addClass("edit-btn-tooltip");
|
|
|
|
|
|
|
|
|
|
$(".order-shelf-btn").attr({
|
|
|
|
|
"data-toggle-two": "tooltip",
|
|
|
|
|
"title": $(".order-shelf-btn").text(), //"Reorder Shelf"
|
|
|
|
|
"data-placement": "bottom" })
|
|
|
|
|
"data-placement": "bottom"
|
|
|
|
|
})
|
|
|
|
|
.addClass("order-btn-tooltip");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -530,83 +532,95 @@ if ( $( "body.shelf" ).length > 0 ) {
|
|
|
|
|
$(".home-btn > a").attr({
|
|
|
|
|
"data-toggle": "tooltip",
|
|
|
|
|
"title": $(document.body).attr("data-text"), // Home
|
|
|
|
|
"data-placement": "bottom" })
|
|
|
|
|
"data-placement": "bottom"
|
|
|
|
|
})
|
|
|
|
|
.addClass("home-btn-tooltip");
|
|
|
|
|
|
|
|
|
|
$(".plexBack > a").attr({
|
|
|
|
|
"data-toggle": "tooltip",
|
|
|
|
|
"title": $(document.body).attr("data-textback"), // Back
|
|
|
|
|
"data-placement": "bottom" })
|
|
|
|
|
"data-placement": "bottom"
|
|
|
|
|
})
|
|
|
|
|
.addClass("back-btn-tooltip");
|
|
|
|
|
|
|
|
|
|
$("#top_tasks").attr({
|
|
|
|
|
"data-toggle": "tooltip",
|
|
|
|
|
"title": $("#top_tasks").text(), // "Tasks"
|
|
|
|
|
"data-placement": "bottom",
|
|
|
|
|
"data-viewport": "#main-nav" })
|
|
|
|
|
"data-viewport": "#main-nav"
|
|
|
|
|
})
|
|
|
|
|
.addClass("tasks-btn-tooltip");
|
|
|
|
|
|
|
|
|
|
$("#top_admin").attr({
|
|
|
|
|
"data-toggle": "tooltip",
|
|
|
|
|
"title": $("#top_admin").attr("data-text"), // Settings
|
|
|
|
|
"data-placement": "bottom",
|
|
|
|
|
"data-viewport": "#main-nav" })
|
|
|
|
|
"data-viewport": "#main-nav"
|
|
|
|
|
})
|
|
|
|
|
.addClass("admin-btn-tooltip");
|
|
|
|
|
|
|
|
|
|
$(".profileDrop").attr({
|
|
|
|
|
"title": $("#top_user").attr("data-text"), //Account
|
|
|
|
|
"data-placement": "bottom",
|
|
|
|
|
"data-toggle-two": "tooltip",
|
|
|
|
|
"data-viewport": "#main-nav" })
|
|
|
|
|
"data-viewport": "#main-nav"
|
|
|
|
|
})
|
|
|
|
|
.addClass("send-btn-tooltip dropdown");
|
|
|
|
|
|
|
|
|
|
$("#btn-upload").attr({
|
|
|
|
|
"data-toggle": "tooltip",
|
|
|
|
|
"title": $("#btn-upload").parent().text(), // "Upload"
|
|
|
|
|
"data-placement": "bottom",
|
|
|
|
|
"data-viewport": "#main-nav" })
|
|
|
|
|
"data-viewport": "#main-nav"
|
|
|
|
|
})
|
|
|
|
|
.addClass("upload-btn-tooltip");
|
|
|
|
|
|
|
|
|
|
$("#add-to-shelf").attr({
|
|
|
|
|
"data-toggle-two": "tooltip",
|
|
|
|
|
"title": $("#add-to-shelf").text(), // "Add to Shelf"
|
|
|
|
|
"data-placement": "bottom",
|
|
|
|
|
"data-viewport": ".btn-toolbar" })
|
|
|
|
|
"data-viewport": ".btn-toolbar"
|
|
|
|
|
})
|
|
|
|
|
.addClass("addtoshelf-btn-tooltip");
|
|
|
|
|
|
|
|
|
|
$("#have_read_cb").attr({
|
|
|
|
|
"data-toggle": "tooltip",
|
|
|
|
|
"title": $("#have_read_cb").attr("data-unchecked"),
|
|
|
|
|
"data-placement": "bottom",
|
|
|
|
|
"data-viewport": ".btn-toolbar" })
|
|
|
|
|
"data-viewport": ".btn-toolbar"
|
|
|
|
|
})
|
|
|
|
|
.addClass("readunread-btn-tooltip");
|
|
|
|
|
|
|
|
|
|
$("#have_read_cb:checked").attr({
|
|
|
|
|
"data-toggle": "tooltip",
|
|
|
|
|
"title": $("#have_read_cb").attr("data-checked"),
|
|
|
|
|
"data-placement": "bottom",
|
|
|
|
|
"data-viewport": ".btn-toolbar" })
|
|
|
|
|
"data-viewport": ".btn-toolbar"
|
|
|
|
|
})
|
|
|
|
|
.addClass("readunread-btn-tooltip");
|
|
|
|
|
|
|
|
|
|
$("#archived_cb").attr({
|
|
|
|
|
"data-toggle": "tooltip",
|
|
|
|
|
"title": $("#archived_cb").attr("data-unchecked"),
|
|
|
|
|
"data-placement": "bottom",
|
|
|
|
|
"data-viewport": ".btn-toolbar" })
|
|
|
|
|
"data-viewport": ".btn-toolbar"
|
|
|
|
|
})
|
|
|
|
|
.addClass("readunread-btn-tooltip");
|
|
|
|
|
|
|
|
|
|
$("#archived_cb:checked").attr({
|
|
|
|
|
"data-toggle": "tooltip",
|
|
|
|
|
"title": $("#archived_cb").attr("data-checked"),
|
|
|
|
|
"data-placement": "bottom",
|
|
|
|
|
"data-viewport": ".btn-toolbar" })
|
|
|
|
|
"data-viewport": ".btn-toolbar"
|
|
|
|
|
})
|
|
|
|
|
.addClass("readunread-btn-tooltip");
|
|
|
|
|
|
|
|
|
|
$("button#delete").attr({
|
|
|
|
|
"data-toggle-two": "tooltip",
|
|
|
|
|
"title": $("button#delete").text(), //"Delete"
|
|
|
|
|
"data-placement": "bottom",
|
|
|
|
|
"data-viewport": ".btn-toolbar" })
|
|
|
|
|
"data-viewport": ".btn-toolbar"
|
|
|
|
|
})
|
|
|
|
|
.addClass("delete-book-btn-tooltip");
|
|
|
|
|
|
|
|
|
|
$("#have_read_cb").click(function () {
|
|
|
|
@ -629,35 +643,40 @@ $('.btn-group[aria-label="Edit/Delete book"] a').attr({
|
|
|
|
|
"data-toggle": "tooltip",
|
|
|
|
|
"title": $("#edit_book").text(), // "Edit"
|
|
|
|
|
"data-placement": "bottom",
|
|
|
|
|
"data-viewport": ".btn-toolbar" })
|
|
|
|
|
"data-viewport": ".btn-toolbar"
|
|
|
|
|
})
|
|
|
|
|
.addClass("edit-btn-tooltip");
|
|
|
|
|
|
|
|
|
|
$("#sendbtn").attr({
|
|
|
|
|
"data-toggle": "tooltip",
|
|
|
|
|
"title": $("#sendbtn").attr("data-text"),
|
|
|
|
|
"data-placement": "bottom",
|
|
|
|
|
"data-viewport": ".btn-toolbar" })
|
|
|
|
|
"data-viewport": ".btn-toolbar"
|
|
|
|
|
})
|
|
|
|
|
.addClass("send-btn-tooltip");
|
|
|
|
|
|
|
|
|
|
$("#sendbtn2").attr({
|
|
|
|
|
"data-toggle-two": "tooltip",
|
|
|
|
|
"title": $("#sendbtn2").text(), // "Send to Kindle",
|
|
|
|
|
"data-placement": "bottom",
|
|
|
|
|
"data-viewport": ".btn-toolbar" })
|
|
|
|
|
"data-viewport": ".btn-toolbar"
|
|
|
|
|
})
|
|
|
|
|
.addClass("send-btn-tooltip");
|
|
|
|
|
|
|
|
|
|
$("#read-in-browser").attr({
|
|
|
|
|
"data-toggle-two": "tooltip",
|
|
|
|
|
"title": $("#read-in-browser").text(),
|
|
|
|
|
"data-placement": "bottom",
|
|
|
|
|
"data-viewport": ".btn-toolbar"})
|
|
|
|
|
"data-viewport": ".btn-toolbar"
|
|
|
|
|
})
|
|
|
|
|
.addClass("send-btn-tooltip");
|
|
|
|
|
|
|
|
|
|
$("#btnGroupDrop1").attr({
|
|
|
|
|
"data-toggle-two": "tooltip",
|
|
|
|
|
"title": $("#btnGroupDrop1").text(),
|
|
|
|
|
"data-placement": "bottom",
|
|
|
|
|
"data-viewport": ".btn-toolbar" });
|
|
|
|
|
"data-viewport": ".btn-toolbar"
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
if ($("body.epub").length === 0) {
|
|
|
|
|
$(document).ready(function () {
|
|
|
|
@ -736,7 +755,9 @@ $.each(deleteButtons, function(i, val) {
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// Turn off bootstrap animations
|
|
|
|
|
$(function() { $.support.transition = false; })
|
|
|
|
|
$(function () {
|
|
|
|
|
$.support.transition = false;
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
mobileSupport();
|
|
|
|
|
|
|
|
|
@ -747,3 +768,4 @@ $(window).on("resize",function() {
|
|
|
|
|
// id = setTimeout(mobileSupport, 500);
|
|
|
|
|
mobileSupport();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|