From 1f9e62c56932a61afedb83d213688b1f276a7a8e Mon Sep 17 00:00:00 2001 From: Chris Hallberg <crhallberg@gmail.com> Date: Mon, 17 Mar 2014 12:40:30 -0400 Subject: [PATCH] Checkstyles cleanup. --- module/VuFind/src/VuFind/Cover/Generator.php | 18 ++++++++++++------ themes/bootstrap/js/common.js | 9 ++++----- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/module/VuFind/src/VuFind/Cover/Generator.php b/module/VuFind/src/VuFind/Cover/Generator.php index 474d79255b9..3ee6f9a1167 100644 --- a/module/VuFind/src/VuFind/Cover/Generator.php +++ b/module/VuFind/src/VuFind/Cover/Generator.php @@ -442,12 +442,18 @@ class Generator $q = (integer)($v * (1.0 - $s * $f)); $t = (integer)($v * (1.0 - $s * (1.0 - $f))); switch($i) { - case 0: return imagecolorallocate($im, $v, $t, $p); - case 1: return imagecolorallocate($im, $q, $v, $p); - case 2: return imagecolorallocate($im, $p, $v, $t); - case 3: return imagecolorallocate($im, $p, $q, $v); - case 4: return imagecolorallocate($im, $t, $p, $v); - default: return imagecolorallocate($im, $v, $p, $q); + case 0: + return imagecolorallocate($im, $v, $t, $p); + case 1: + return imagecolorallocate($im, $q, $v, $p); + case 2: + return imagecolorallocate($im, $p, $v, $t); + case 3: + return imagecolorallocate($im, $p, $q, $v); + case 4: + return imagecolorallocate($im, $t, $p, $v); + default: + return imagecolorallocate($im, $v, $p, $q); } return imagecolorallocate($im, $R, $G, $B); } diff --git a/themes/bootstrap/js/common.js b/themes/bootstrap/js/common.js index 6a5e42e394c..3d209115b3e 100644 --- a/themes/bootstrap/js/common.js +++ b/themes/bootstrap/js/common.js @@ -254,7 +254,7 @@ $.fn.typeahead.Constructor.prototype.render = function(items) { i = $(that.options.item).attr('data-value', item); i.find('a').html(that.highlighter(item)); return i[0]; - }) + }); this.$menu.html(items); return this; @@ -264,11 +264,10 @@ $.fn.typeahead.Constructor.prototype.select = function () { var val = this.$menu.find('.active'); if (val.length > 0) { val = val.attr('data-value'); + } else { + val = this.$element.val(); } - else val = this.$element.val(); - this.$element - .val(this.updater(val)) - .change(); + this.$element.val(this.updater(val)).change(); return this.hide(); } -- GitLab