summaryrefslogtreecommitdiff
path: root/Makefile.d/bootstrap-typeahead.js.patch
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-07-14 15:04:01 -0600
committerLuke Shumaker <lukeshu@parabola.nu>2018-01-15 14:24:06 -0500
commit71266bc59f341b1b7c711dd081785ad58db6bf36 (patch)
tree8f53e813c50ea2de4f8102d9c6b410eec9ba99de /Makefile.d/bootstrap-typeahead.js.patch
parent0877631826d3037b02b2c8a75c493b17385a219a (diff)
Add Makefiles to download .js files, and generate .min.js files.lukeshu/to-upstream/master
Add a Makefile to generate all of the 3rd party or minimized Javascript. The goal here is to generate the files *exactly* as they are currently in the repository, which sometimes means using a specific version of a minifier or other weird things. Get the correct versions of UglifyJS and Closure Compiler. Also, generate the RSS icons. closure-compiler.googlecode.com is gone; use the Wayback Machine.
Diffstat (limited to 'Makefile.d/bootstrap-typeahead.js.patch')
-rw-r--r--Makefile.d/bootstrap-typeahead.js.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/Makefile.d/bootstrap-typeahead.js.patch b/Makefile.d/bootstrap-typeahead.js.patch
new file mode 100644
index 00000000..dfbab80b
--- /dev/null
+++ b/Makefile.d/bootstrap-typeahead.js.patch
@@ -0,0 +1,38 @@
+commit f3e23371fa0473c82c28932e85570d94e5fc232a
+Author: Dan McGee <dan@archlinux.org>
+Date: Mon Sep 24 20:21:15 2012 -0500
+
+ Don't auto-select the first item in typeahead
+
+ This assumption was baked into the Twitter bootstrap JS; kill it so it
+ is still easy to do a freeform search if wanted.
+
+ Signed-off-by: Dan McGee <dan@archlinux.org>
+
+diff --git a/sitestatic/bootstrap-typeahead.js b/sitestatic/bootstrap-typeahead.js
+index c2ccdea..3d355ae 100644
+--- a/sitestatic/bootstrap-typeahead.js
++++ b/sitestatic/bootstrap-typeahead.js
+@@ -45,9 +45,11 @@
+
+ , select: function () {
+ var val = this.$menu.find('.active').attr('data-value')
+- this.$element
+- .val(this.updater(val))
+- .change()
++ if (val) {
++ this.$element
++ .val(this.updater(val))
++ .change()
++ }
+ return this.hide()
+ }
+
+@@ -141,7 +143,6 @@
+ return i[0]
+ })
+
+- items.first().addClass('active')
+ this.$menu.html(items)
+ return this
+ }