Some code cosmetics
This commit is contained in:
@@ -677,7 +677,7 @@ $(".navbar-collapse.collapse.in").before('<div class="sidebar-backdrop"></div>')
|
||||
// Get rid of leading white space
|
||||
recentlyAdded = $("#nav_new a:contains('Recently')").text().trim();
|
||||
$("#nav_new a:contains('Recently')").contents().filter(function () {
|
||||
return this.nodeType == 3
|
||||
return this.nodeType === 3
|
||||
}).each(function () {
|
||||
this.textContent = this.textContent.replace(" Recently Added", recentlyAdded);
|
||||
});
|
||||
|
||||
@@ -88,7 +88,7 @@ $("#desc").click(function() {
|
||||
// Find count of middle element
|
||||
var count = $(".row:visible").length;
|
||||
if (count > 20) {
|
||||
middle = parseInt(count / 2) + (count % 2);
|
||||
middle = parseInt(count / 2, 10) + (count % 2);
|
||||
|
||||
//var middle = parseInt(count / 2) + (count % 2);
|
||||
// search for the middle of all visible elements
|
||||
@@ -135,7 +135,7 @@ $("#asc").click(function() {
|
||||
// Find count of middle element
|
||||
var count = $(".row:visible").length;
|
||||
if (count > 20) {
|
||||
var middle = parseInt(count / 2) + (count % 2);
|
||||
var middle = parseInt(count / 2, 10) + (count % 2);
|
||||
|
||||
//var middle = parseInt(count / 2) + (count % 2);
|
||||
// search for the middle of all visible elements
|
||||
|
||||
@@ -38,10 +38,10 @@ $(document).on("change", "input[type=\"checkbox\"][data-control]", function () {
|
||||
$(document).on("change", "select[data-control]", function() {
|
||||
var $this = $(this);
|
||||
var name = $this.data("control");
|
||||
var showOrHide = parseInt($this.val());
|
||||
var showOrHide = parseInt($this.val(), 10);
|
||||
// var showOrHideLast = $("#" + name + " option:last").val()
|
||||
for (var i = 0; i < $(this)[0].length; i++) {
|
||||
var element = parseInt($(this)[0][i].value);
|
||||
var element = parseInt($(this)[0][i].value, 10);
|
||||
if (element === showOrHide) {
|
||||
$("[data-related^=" + name + "][data-related*=-" + element + "]").show();
|
||||
} else {
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
|
||||
/* exported TableActions, RestrictionActions, EbookActions, responseHandler */
|
||||
/* global getPath, ConfirmDialog */
|
||||
|
||||
var selections = [];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user