bootstrap-combobox 1.2.5 → 1.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,6 @@
|
|
1
1
|
module Bootstrap
|
2
2
|
module Combobox
|
3
3
|
# This version is a little arbitrary; at time of this writing source fork is at 1.1-WIP?
|
4
|
-
|
5
|
-
VERSION = "1.2.5"
|
4
|
+
VERSION = "1.2.6"
|
6
5
|
end
|
7
6
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* =============================================================
|
2
|
-
* bootstrap-combobox.js v1.
|
2
|
+
* bootstrap-combobox.js v1.1.3
|
3
3
|
* =============================================================
|
4
4
|
* Copyright 2012 Daniel Farrell
|
5
5
|
*
|
@@ -29,7 +29,6 @@
|
|
29
29
|
this.$button = this.$container.find('.dropdown-toggle')
|
30
30
|
this.$menu = $(this.options.menu).appendTo('body')
|
31
31
|
this.matcher = this.options.matcher || this.matcher
|
32
|
-
this.updater = this.options.updater || this.updater
|
33
32
|
this.sorter = this.options.sorter || this.sorter
|
34
33
|
this.highlighter = this.options.highlighter || this.highlighter
|
35
34
|
this.shown = false
|
@@ -129,15 +128,9 @@
|
|
129
128
|
// modified typeahead function adding container and target handling
|
130
129
|
, select: function () {
|
131
130
|
var val = this.$menu.find('.active').attr('data-value')
|
132
|
-
var mapped_val = this.map[val]
|
133
|
-
if (!this.options.force_match && this.query != '' && !this.matcher(val)) {
|
134
|
-
val = this.query
|
135
|
-
this.$menu.find('.active').removeClass('active')
|
136
|
-
mapped_val = val
|
137
|
-
}
|
138
131
|
this.$element.val(this.updater(val)).trigger('change')
|
139
|
-
this.$source.val(
|
140
|
-
this.$target.val(
|
132
|
+
this.$source.val(this.map[val]).trigger('change')
|
133
|
+
this.$target.val(this.map[val]).trigger('change')
|
141
134
|
this.$container.addClass('combobox-selected')
|
142
135
|
this.selected = true
|
143
136
|
return this.hide()
|
@@ -209,14 +202,10 @@
|
|
209
202
|
var that = this
|
210
203
|
this.focused = false
|
211
204
|
var val = this.$element.val()
|
212
|
-
if (
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
this.$target.val('').trigger('change')
|
217
|
-
}
|
218
|
-
} else {
|
219
|
-
this.select();
|
205
|
+
if (!this.selected && val !== '' ) {
|
206
|
+
this.$element.val('')
|
207
|
+
this.$source.val('').trigger('change')
|
208
|
+
this.$target.val('').trigger('change')
|
220
209
|
}
|
221
210
|
if (!this.mousedover && this.shown) setTimeout(function () { that.hide() }, 200)
|
222
211
|
}
|
@@ -244,7 +233,6 @@
|
|
244
233
|
template: '<div class="combobox-container"><input type="hidden" /><input type="text" autocomplete="off" /><span class="add-on btn dropdown-toggle" data-dropdown="dropdown"><span class="caret"/><span class="combobox-clear"><i class="icon-remove"/></span></span></div>'
|
245
234
|
, menu: '<ul class="typeahead typeahead-long dropdown-menu"></ul>'
|
246
235
|
, item: '<li><a href="#"></a></li>'
|
247
|
-
, force_match: true
|
248
236
|
}
|
249
237
|
|
250
238
|
$.fn.combobox.Constructor = Combobox
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bootstrap-combobox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,24 +10,8 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
14
|
-
dependencies:
|
15
|
-
- !ruby/object:Gem::Dependency
|
16
|
-
name: railties
|
17
|
-
requirement: !ruby/object:Gem::Requirement
|
18
|
-
none: false
|
19
|
-
requirements:
|
20
|
-
- - ~>
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: '3.1'
|
23
|
-
type: :runtime
|
24
|
-
prerelease: false
|
25
|
-
version_requirements: !ruby/object:Gem::Requirement
|
26
|
-
none: false
|
27
|
-
requirements:
|
28
|
-
- - ~>
|
29
|
-
- !ruby/object:Gem::Version
|
30
|
-
version: '3.1'
|
13
|
+
date: 2014-02-18 00:00:00.000000000 Z
|
14
|
+
dependencies: []
|
31
15
|
description: Combobox for Bootstrap, based on Bootstrap typeahead
|
32
16
|
email:
|
33
17
|
- danielfarrell76@gmail.com
|
@@ -62,7 +46,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
62
46
|
version: '0'
|
63
47
|
requirements: []
|
64
48
|
rubyforge_project:
|
65
|
-
rubygems_version: 1.8.
|
49
|
+
rubygems_version: 1.8.23
|
66
50
|
signing_key:
|
67
51
|
specification_version: 3
|
68
52
|
summary: Combobox for Bootstrap, based on Bootstrap typeahead
|