Remove trailing spaces
This commit is contained in:
parent
7f9cf87cb6
commit
ba18c1ad76
26
util.js
26
util.js
|
@ -149,7 +149,7 @@ function getTagList () {
|
||||||
|
|
||||||
function updateFilters () {
|
function updateFilters () {
|
||||||
var tagList = getTagList ();
|
var tagList = getTagList ();
|
||||||
|
|
||||||
// If there is already some filters then let's prepare to update the list
|
// If there is already some filters then let's prepare to update the list
|
||||||
$("#filter ul li").each (function () {
|
$("#filter ul li").each (function () {
|
||||||
var text = $(this).text ();
|
var text = $(this).text ();
|
||||||
|
@ -159,7 +159,7 @@ function updateFilters () {
|
||||||
tagList [text] = -1;
|
tagList [text] = -1;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Update the filter -1 to remove, 1 to add, 0 already there
|
// Update the filter -1 to remove, 1 to add, 0 already there
|
||||||
for (var tag in tagList) {
|
for (var tag in tagList) {
|
||||||
var tagValue = tagList [tag];
|
var tagValue = tagList [tag];
|
||||||
|
@ -170,9 +170,9 @@ function updateFilters () {
|
||||||
$("#filter ul").append ("<li>" + tag + "</li>");
|
$("#filter ul").append ("<li>" + tag + "</li>");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#filter ul").append ("<li>_CLEAR_</li>");
|
$("#filter ul").append ("<li>_CLEAR_</li>");
|
||||||
|
|
||||||
// Sort the list alphabetically
|
// Sort the list alphabetically
|
||||||
$('#filter ul li').sortElements(function(a, b){
|
$('#filter ul li').sortElements(function(a, b){
|
||||||
return $(a).text() > $(b).text() ? 1 : -1;
|
return $(a).text() > $(b).text() ? 1 : -1;
|
||||||
|
@ -185,7 +185,7 @@ function doFilter () {
|
||||||
updateFilters ();
|
updateFilters ();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$(".se").each (function(){
|
$(".se").each (function(){
|
||||||
var taglist = ", " + $(this).text() + ", ";
|
var taglist = ", " + $(this).text() + ", ";
|
||||||
var toBeFiltered = false;
|
var toBeFiltered = false;
|
||||||
|
@ -205,7 +205,7 @@ function doFilter () {
|
||||||
}
|
}
|
||||||
if (toBeFiltered) { $(this).parents (".books").addClass ("filtered"); }
|
if (toBeFiltered) { $(this).parents (".books").addClass ("filtered"); }
|
||||||
});
|
});
|
||||||
|
|
||||||
// Handle the books with no tags
|
// Handle the books with no tags
|
||||||
var atLeastOneTagSelected = false;
|
var atLeastOneTagSelected = false;
|
||||||
for (var filter in filterList) {
|
for (var filter in filterList) {
|
||||||
|
@ -216,7 +216,7 @@ function doFilter () {
|
||||||
if (atLeastOneTagSelected) {
|
if (atLeastOneTagSelected) {
|
||||||
$(".books").not (":has(span.se)").addClass ("filtered");
|
$(".books").not (":has(span.se)").addClass ("filtered");
|
||||||
}
|
}
|
||||||
|
|
||||||
updateFilters ();
|
updateFilters ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -273,9 +273,9 @@ updatePage = function (data) {
|
||||||
document.title = data.title;
|
document.title = data.title;
|
||||||
currentData = data;
|
currentData = data;
|
||||||
setTimeout( function() { $("input[name=query]").focus(); }, 500 );
|
setTimeout( function() { $("input[name=query]").focus(); }, 500 );
|
||||||
|
|
||||||
debug_log (elapsed ());
|
debug_log (elapsed ());
|
||||||
|
|
||||||
if ($.cookie('toolbar') === '1') { $("#tool").show (); }
|
if ($.cookie('toolbar') === '1') { $("#tool").show (); }
|
||||||
if (currentData.containsBook === 1) {
|
if (currentData.containsBook === 1) {
|
||||||
$("#sortForm").show ();
|
$("#sortForm").show ();
|
||||||
|
@ -307,7 +307,7 @@ updatePage = function (data) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$('input[name=query]').bind('typeahead:selected', function(obj, datum) {
|
$('input[name=query]').bind('typeahead:selected', function(obj, datum) {
|
||||||
if (isPushStateEnabled) {
|
if (isPushStateEnabled) {
|
||||||
navigateTo (datum.navlink);
|
navigateTo (datum.navlink);
|
||||||
|
@ -342,12 +342,12 @@ function link_Clicked (event) {
|
||||||
}
|
}
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
var url = currentLink.attr('href');
|
var url = currentLink.attr('href');
|
||||||
|
|
||||||
if ($(".mfp-ready").length)
|
if ($(".mfp-ready").length)
|
||||||
{
|
{
|
||||||
$.magnificPopup.close();
|
$.magnificPopup.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
// The bookdetail / about should be displayed in a lightbox
|
// The bookdetail / about should be displayed in a lightbox
|
||||||
if (getCurrentOption ("use_fancyapps") === "1" &&
|
if (getCurrentOption ("use_fancyapps") === "1" &&
|
||||||
(currentLink.hasClass ("fancydetail") || currentLink.hasClass ("fancyabout"))) {
|
(currentLink.hasClass ("fancydetail") || currentLink.hasClass ("fancyabout"))) {
|
||||||
|
@ -398,7 +398,7 @@ function handleLinks () {
|
||||||
return $(a).find ("." + $("#sortchoice").val()).text() > $(b).find ("." + $("#sortchoice").val()).text() ? test : -test;
|
return $(a).find ("." + $("#sortchoice").val()).text() > $(b).find ("." + $("#sortchoice").val()).text() ? test : -test;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$("body").on ("click", ".headright", function(){
|
$("body").on ("click", ".headright", function(){
|
||||||
if ($("#tool").is(":hidden")) {
|
if ($("#tool").is(":hidden")) {
|
||||||
$("#tool").slideDown("slow");
|
$("#tool").slideDown("slow");
|
||||||
|
|
Loading…
Reference in a new issue