Remove trailing spaces

This commit is contained in:
Sébastien Lucas 2014-02-16 09:36:26 +01:00
parent 7f9cf87cb6
commit ba18c1ad76
1 changed files with 13 additions and 13 deletions

26
util.js
View File

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