moovui 0.1.2 → 0.1.3
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.
- checksums.yaml +4 -4
- data/app/assets/javascripts/chosen.jquery.js +111 -66
- data/app/assets/javascripts/foundation.tooltips.custom.js +10 -3
- data/app/assets/javascripts/jquery.placeholder.js +185 -0
- data/app/assets/javascripts/shBrushSass.js +4 -3
- data/app/assets/javascripts/shCore.custom.js +6 -0
- data/app/assets/stylesheets/bourbon/_bourbon-deprecated-upcoming.scss +1 -1
- data/app/assets/stylesheets/globals/_base.scss +4 -3
- data/app/assets/stylesheets/globals/_entypo.scss +4 -6
- data/app/assets/stylesheets/globals/_header.scss +8 -14
- data/app/assets/stylesheets/globals/_mixins.scss +7 -4
- data/app/assets/stylesheets/globals/_vars.scss +9 -9
- data/app/assets/stylesheets/modules/_accordion.scss +5 -6
- data/app/assets/stylesheets/modules/_actions.scss +3 -0
- data/app/assets/stylesheets/modules/{_notice.scss → _alert.scss} +32 -22
- data/app/assets/stylesheets/modules/_btn.scss +147 -37
- data/app/assets/stylesheets/modules/_btnbar.scss +16 -12
- data/app/assets/stylesheets/modules/_code.scss +15 -1
- data/app/assets/stylesheets/modules/_copy.scss +4 -1
- data/app/assets/stylesheets/modules/_definition.scss +15 -6
- data/app/assets/stylesheets/modules/_disabled.scss +12 -0
- data/app/assets/stylesheets/modules/_docs.scss +3 -79
- data/app/assets/stylesheets/modules/_dropdown.scss +2 -2
- data/app/assets/stylesheets/modules/_flex.scss +26 -18
- data/app/assets/stylesheets/modules/_grid.scss +14 -15
- data/app/assets/stylesheets/modules/_input.scss +21 -7
- data/app/assets/stylesheets/modules/_label.scss +29 -1
- data/app/assets/stylesheets/modules/_list.scss +2 -3
- data/app/assets/stylesheets/modules/_modal.scss +15 -11
- data/app/assets/stylesheets/modules/_pane.scss +58 -5
- data/app/assets/stylesheets/modules/_select.scss +96 -28
- data/app/assets/stylesheets/modules/_sidebar.scss +10 -10
- data/app/assets/stylesheets/modules/_syntax-highlighter.scss +12 -2
- data/app/assets/stylesheets/modules/_table.scss +117 -44
- data/app/assets/stylesheets/modules/_tabs.scss +56 -0
- data/app/assets/stylesheets/modules/_toggle.scss +121 -0
- data/app/assets/stylesheets/modules/_tooltip.scss +34 -17
- data/app/assets/stylesheets/moovui.scss +12 -3
- data/lib/moovui/version.rb +1 -1
- metadata +14 -11
- data/app/assets/stylesheets/fonts/TSTARPRO-BoldWeb.eot +0 -0
- data/app/assets/stylesheets/fonts/TSTARPRO-BoldWeb.woff +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5c78599a8a92c4926354260420ab46e610c32e5b
|
|
4
|
+
data.tar.gz: a60a6cf1ce2a7cf81c890d19f31e087d7cbdecbf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 53074d06701548a5348c9ba25ebe09cef2b084f1c1131204f6105c19490435718336e5966687df52f823fa845063d7fb785ab98fa81e5db876d3852a9acd5cb9
|
|
7
|
+
data.tar.gz: 7cf522f87ecb3ae81bbd131aa9bd6fa17a3263a154cd15f057cdd08e925d59d26da52a938a2ae5841487660abe5c81e0a51c61046c4c465cc8d6a89a54afc088
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
/*!
|
|
2
|
+
Chosen, a Select Box Enhancer for jQuery and Prototype
|
|
3
|
+
by Patrick Filler for Harvest, http://getharvest.com
|
|
4
|
+
|
|
5
|
+
Version 1.1.0
|
|
6
|
+
Full source at https://github.com/harvesthq/chosen
|
|
7
|
+
Copyright (c) 2011 Harvest http://getharvest.com
|
|
8
|
+
|
|
9
|
+
MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
|
|
10
|
+
This file is generated by `grunt build`, do not edit it by hand.
|
|
11
|
+
*/
|
|
12
|
+
|
|
10
13
|
(function() {
|
|
11
14
|
var $, AbstractChosen, Chosen, SelectParser, _ref,
|
|
12
15
|
__hasProp = {}.hasOwnProperty,
|
|
@@ -28,7 +31,6 @@
|
|
|
28
31
|
|
|
29
32
|
SelectParser.prototype.add_group = function(group) {
|
|
30
33
|
var group_position, option, _i, _len, _ref, _results;
|
|
31
|
-
|
|
32
34
|
group_position = this.parsed.length;
|
|
33
35
|
this.parsed.push({
|
|
34
36
|
array_index: group_position,
|
|
@@ -77,7 +79,6 @@
|
|
|
77
79
|
|
|
78
80
|
SelectParser.prototype.escapeExpression = function(text) {
|
|
79
81
|
var map, unsafe_chars;
|
|
80
|
-
|
|
81
82
|
if ((text == null) || text === false) {
|
|
82
83
|
return "";
|
|
83
84
|
}
|
|
@@ -103,7 +104,6 @@
|
|
|
103
104
|
|
|
104
105
|
SelectParser.select_to_array = function(select) {
|
|
105
106
|
var child, parser, _i, _len, _ref;
|
|
106
|
-
|
|
107
107
|
parser = new SelectParser();
|
|
108
108
|
_ref = select.childNodes;
|
|
109
109
|
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
|
@@ -130,7 +130,6 @@
|
|
|
130
130
|
|
|
131
131
|
AbstractChosen.prototype.set_default_values = function() {
|
|
132
132
|
var _this = this;
|
|
133
|
-
|
|
134
133
|
this.click_test_action = function(evt) {
|
|
135
134
|
return _this.test_active_click(evt);
|
|
136
135
|
};
|
|
@@ -141,7 +140,6 @@
|
|
|
141
140
|
this.mouse_on_container = false;
|
|
142
141
|
this.results_showing = false;
|
|
143
142
|
this.result_highlighted = null;
|
|
144
|
-
this.result_single_selected = null;
|
|
145
143
|
this.allow_single_deselect = (this.options.allow_single_deselect != null) && (this.form_field.options[0] != null) && this.form_field.options[0].text === "" ? this.options.allow_single_deselect : false;
|
|
146
144
|
this.disable_search_threshold = this.options.disable_search_threshold || 0;
|
|
147
145
|
this.disable_search = this.options.disable_search || false;
|
|
@@ -176,7 +174,6 @@
|
|
|
176
174
|
|
|
177
175
|
AbstractChosen.prototype.input_focus = function(evt) {
|
|
178
176
|
var _this = this;
|
|
179
|
-
|
|
180
177
|
if (this.is_multiple) {
|
|
181
178
|
if (!this.active_field) {
|
|
182
179
|
return setTimeout((function() {
|
|
@@ -192,7 +189,6 @@
|
|
|
192
189
|
|
|
193
190
|
AbstractChosen.prototype.input_blur = function(evt) {
|
|
194
191
|
var _this = this;
|
|
195
|
-
|
|
196
192
|
if (!this.mouse_on_container) {
|
|
197
193
|
this.active_field = false;
|
|
198
194
|
return setTimeout((function() {
|
|
@@ -203,7 +199,6 @@
|
|
|
203
199
|
|
|
204
200
|
AbstractChosen.prototype.results_option_build = function(options) {
|
|
205
201
|
var content, data, _i, _len, _ref;
|
|
206
|
-
|
|
207
202
|
content = '';
|
|
208
203
|
_ref = this.results_data;
|
|
209
204
|
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
|
@@ -225,8 +220,7 @@
|
|
|
225
220
|
};
|
|
226
221
|
|
|
227
222
|
AbstractChosen.prototype.result_add_option = function(option) {
|
|
228
|
-
var classes,
|
|
229
|
-
|
|
223
|
+
var classes, option_el;
|
|
230
224
|
if (!option.search_match) {
|
|
231
225
|
return '';
|
|
232
226
|
}
|
|
@@ -249,18 +243,26 @@
|
|
|
249
243
|
if (option.classes !== "") {
|
|
250
244
|
classes.push(option.classes);
|
|
251
245
|
}
|
|
252
|
-
|
|
253
|
-
|
|
246
|
+
option_el = document.createElement("li");
|
|
247
|
+
option_el.className = classes.join(" ");
|
|
248
|
+
option_el.style.cssText = option.style;
|
|
249
|
+
option_el.setAttribute("data-option-array-index", option.array_index);
|
|
250
|
+
option_el.innerHTML = option.search_text;
|
|
251
|
+
return this.outerHTML(option_el);
|
|
254
252
|
};
|
|
255
253
|
|
|
256
254
|
AbstractChosen.prototype.result_add_group = function(group) {
|
|
255
|
+
var group_el;
|
|
257
256
|
if (!(group.search_match || group.group_match)) {
|
|
258
257
|
return '';
|
|
259
258
|
}
|
|
260
259
|
if (!(group.active_options > 0)) {
|
|
261
260
|
return '';
|
|
262
261
|
}
|
|
263
|
-
|
|
262
|
+
group_el = document.createElement("li");
|
|
263
|
+
group_el.className = "group-result";
|
|
264
|
+
group_el.innerHTML = group.search_text;
|
|
265
|
+
return this.outerHTML(group_el);
|
|
264
266
|
};
|
|
265
267
|
|
|
266
268
|
AbstractChosen.prototype.results_update_field = function() {
|
|
@@ -269,13 +271,27 @@
|
|
|
269
271
|
this.results_reset_cleanup();
|
|
270
272
|
}
|
|
271
273
|
this.result_clear_highlight();
|
|
272
|
-
this.result_single_selected = null;
|
|
273
274
|
this.results_build();
|
|
274
275
|
if (this.results_showing) {
|
|
275
276
|
return this.winnow_results();
|
|
276
277
|
}
|
|
277
278
|
};
|
|
278
279
|
|
|
280
|
+
AbstractChosen.prototype.reset_single_select_options = function() {
|
|
281
|
+
var result, _i, _len, _ref, _results;
|
|
282
|
+
_ref = this.results_data;
|
|
283
|
+
_results = [];
|
|
284
|
+
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
|
285
|
+
result = _ref[_i];
|
|
286
|
+
if (result.selected) {
|
|
287
|
+
_results.push(result.selected = false);
|
|
288
|
+
} else {
|
|
289
|
+
_results.push(void 0);
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
return _results;
|
|
293
|
+
};
|
|
294
|
+
|
|
279
295
|
AbstractChosen.prototype.results_toggle = function() {
|
|
280
296
|
if (this.results_showing) {
|
|
281
297
|
return this.results_hide();
|
|
@@ -294,7 +310,6 @@
|
|
|
294
310
|
|
|
295
311
|
AbstractChosen.prototype.winnow_results = function() {
|
|
296
312
|
var escapedSearchText, option, regex, regexAnchor, results, results_group, searchText, startpos, text, zregex, _i, _len, _ref;
|
|
297
|
-
|
|
298
313
|
this.no_results_clear();
|
|
299
314
|
results = 0;
|
|
300
315
|
searchText = this.get_search_text();
|
|
@@ -352,7 +367,6 @@
|
|
|
352
367
|
|
|
353
368
|
AbstractChosen.prototype.search_string_match = function(search_string, regex) {
|
|
354
369
|
var part, parts, _i, _len;
|
|
355
|
-
|
|
356
370
|
if (regex.test(search_string)) {
|
|
357
371
|
return true;
|
|
358
372
|
} else if (this.enable_split_word_search && (search_string.indexOf(" ") >= 0 || search_string.indexOf("[") === 0)) {
|
|
@@ -370,7 +384,6 @@
|
|
|
370
384
|
|
|
371
385
|
AbstractChosen.prototype.choices_count = function() {
|
|
372
386
|
var option, _i, _len, _ref;
|
|
373
|
-
|
|
374
387
|
if (this.selected_option_count != null) {
|
|
375
388
|
return this.selected_option_count;
|
|
376
389
|
}
|
|
@@ -394,7 +407,6 @@
|
|
|
394
407
|
|
|
395
408
|
AbstractChosen.prototype.keyup_checker = function(evt) {
|
|
396
409
|
var stroke, _ref;
|
|
397
|
-
|
|
398
410
|
stroke = (_ref = evt.which) != null ? _ref : evt.keyCode;
|
|
399
411
|
this.search_field_scale();
|
|
400
412
|
switch (stroke) {
|
|
@@ -429,6 +441,13 @@
|
|
|
429
441
|
}
|
|
430
442
|
};
|
|
431
443
|
|
|
444
|
+
AbstractChosen.prototype.clipboard_event_checker = function(evt) {
|
|
445
|
+
var _this = this;
|
|
446
|
+
return setTimeout((function() {
|
|
447
|
+
return _this.results_search();
|
|
448
|
+
}), 50);
|
|
449
|
+
};
|
|
450
|
+
|
|
432
451
|
AbstractChosen.prototype.container_width = function() {
|
|
433
452
|
if (this.options.width != null) {
|
|
434
453
|
return this.options.width;
|
|
@@ -450,6 +469,32 @@
|
|
|
450
469
|
return true;
|
|
451
470
|
};
|
|
452
471
|
|
|
472
|
+
AbstractChosen.prototype.search_results_touchstart = function(evt) {
|
|
473
|
+
this.touch_started = true;
|
|
474
|
+
return this.search_results_mouseover(evt);
|
|
475
|
+
};
|
|
476
|
+
|
|
477
|
+
AbstractChosen.prototype.search_results_touchmove = function(evt) {
|
|
478
|
+
this.touch_started = false;
|
|
479
|
+
return this.search_results_mouseout(evt);
|
|
480
|
+
};
|
|
481
|
+
|
|
482
|
+
AbstractChosen.prototype.search_results_touchend = function(evt) {
|
|
483
|
+
if (this.touch_started) {
|
|
484
|
+
return this.search_results_mouseup(evt);
|
|
485
|
+
}
|
|
486
|
+
};
|
|
487
|
+
|
|
488
|
+
AbstractChosen.prototype.outerHTML = function(element) {
|
|
489
|
+
var tmp;
|
|
490
|
+
if (element.outerHTML) {
|
|
491
|
+
return element.outerHTML;
|
|
492
|
+
}
|
|
493
|
+
tmp = document.createElement("div");
|
|
494
|
+
tmp.appendChild(element);
|
|
495
|
+
return tmp.innerHTML;
|
|
496
|
+
};
|
|
497
|
+
|
|
453
498
|
AbstractChosen.browser_is_supported = function() {
|
|
454
499
|
if (window.navigator.appName === "Microsoft Internet Explorer") {
|
|
455
500
|
return document.documentMode >= 8;
|
|
@@ -484,7 +529,6 @@
|
|
|
484
529
|
}
|
|
485
530
|
return this.each(function(input_field) {
|
|
486
531
|
var $this, chosen;
|
|
487
|
-
|
|
488
532
|
$this = $(this);
|
|
489
533
|
chosen = $this.data('chosen');
|
|
490
534
|
if (options === 'destroy' && chosen) {
|
|
@@ -512,7 +556,6 @@
|
|
|
512
556
|
|
|
513
557
|
Chosen.prototype.set_up_html = function() {
|
|
514
558
|
var container_classes, container_props;
|
|
515
|
-
|
|
516
559
|
container_classes = ["chosen-container"];
|
|
517
560
|
container_classes.push("chosen-container-" + (this.is_multiple ? "multi" : "single"));
|
|
518
561
|
if (this.inherit_select_classes && this.form_field.className) {
|
|
@@ -558,7 +601,6 @@
|
|
|
558
601
|
|
|
559
602
|
Chosen.prototype.register_observers = function() {
|
|
560
603
|
var _this = this;
|
|
561
|
-
|
|
562
604
|
this.container.bind('mousedown.chosen', function(evt) {
|
|
563
605
|
_this.container_mousedown(evt);
|
|
564
606
|
});
|
|
@@ -583,6 +625,15 @@
|
|
|
583
625
|
this.search_results.bind('mousewheel.chosen DOMMouseScroll.chosen', function(evt) {
|
|
584
626
|
_this.search_results_mousewheel(evt);
|
|
585
627
|
});
|
|
628
|
+
this.search_results.bind('touchstart.chosen', function(evt) {
|
|
629
|
+
_this.search_results_touchstart(evt);
|
|
630
|
+
});
|
|
631
|
+
this.search_results.bind('touchmove.chosen', function(evt) {
|
|
632
|
+
_this.search_results_touchmove(evt);
|
|
633
|
+
});
|
|
634
|
+
this.search_results.bind('touchend.chosen', function(evt) {
|
|
635
|
+
_this.search_results_touchend(evt);
|
|
636
|
+
});
|
|
586
637
|
this.form_field_jq.bind("chosen:updated.chosen", function(evt) {
|
|
587
638
|
_this.results_update_field(evt);
|
|
588
639
|
});
|
|
@@ -592,6 +643,9 @@
|
|
|
592
643
|
this.form_field_jq.bind("chosen:open.chosen", function(evt) {
|
|
593
644
|
_this.container_mousedown(evt);
|
|
594
645
|
});
|
|
646
|
+
this.form_field_jq.bind("chosen:close.chosen", function(evt) {
|
|
647
|
+
_this.input_blur(evt);
|
|
648
|
+
});
|
|
595
649
|
this.search_field.bind('blur.chosen', function(evt) {
|
|
596
650
|
_this.input_blur(evt);
|
|
597
651
|
});
|
|
@@ -604,6 +658,12 @@
|
|
|
604
658
|
this.search_field.bind('focus.chosen', function(evt) {
|
|
605
659
|
_this.input_focus(evt);
|
|
606
660
|
});
|
|
661
|
+
this.search_field.bind('cut.chosen', function(evt) {
|
|
662
|
+
_this.clipboard_event_checker(evt);
|
|
663
|
+
});
|
|
664
|
+
this.search_field.bind('paste.chosen', function(evt) {
|
|
665
|
+
_this.clipboard_event_checker(evt);
|
|
666
|
+
});
|
|
607
667
|
if (this.is_multiple) {
|
|
608
668
|
return this.search_choices.bind('click.chosen', function(evt) {
|
|
609
669
|
_this.choices_click(evt);
|
|
@@ -616,7 +676,7 @@
|
|
|
616
676
|
};
|
|
617
677
|
|
|
618
678
|
Chosen.prototype.destroy = function() {
|
|
619
|
-
$(
|
|
679
|
+
$(this.container[0].ownerDocument).unbind("click.chosen", this.click_test_action);
|
|
620
680
|
if (this.search_field[0].tabIndex) {
|
|
621
681
|
this.form_field_jq[0].tabIndex = this.search_field[0].tabIndex;
|
|
622
682
|
}
|
|
@@ -653,7 +713,7 @@
|
|
|
653
713
|
if (this.is_multiple) {
|
|
654
714
|
this.search_field.val("");
|
|
655
715
|
}
|
|
656
|
-
$(
|
|
716
|
+
$(this.container[0].ownerDocument).bind('click.chosen', this.click_test_action);
|
|
657
717
|
this.results_show();
|
|
658
718
|
} else if (!this.is_multiple && evt && (($(evt.target)[0] === this.selected_item[0]) || $(evt.target).parents("a.chosen-single").length)) {
|
|
659
719
|
evt.preventDefault();
|
|
@@ -671,9 +731,10 @@
|
|
|
671
731
|
};
|
|
672
732
|
|
|
673
733
|
Chosen.prototype.search_results_mousewheel = function(evt) {
|
|
674
|
-
var delta
|
|
675
|
-
|
|
676
|
-
|
|
734
|
+
var delta;
|
|
735
|
+
if (evt.originalEvent) {
|
|
736
|
+
delta = -evt.originalEvent.wheelDelta || evt.originalEvent.detail;
|
|
737
|
+
}
|
|
677
738
|
if (delta != null) {
|
|
678
739
|
evt.preventDefault();
|
|
679
740
|
if (evt.type === 'DOMMouseScroll') {
|
|
@@ -690,7 +751,7 @@
|
|
|
690
751
|
};
|
|
691
752
|
|
|
692
753
|
Chosen.prototype.close_field = function() {
|
|
693
|
-
$(
|
|
754
|
+
$(this.container[0].ownerDocument).unbind("click.chosen", this.click_test_action);
|
|
694
755
|
this.active_field = false;
|
|
695
756
|
this.results_hide();
|
|
696
757
|
this.container.removeClass("chosen-container-active");
|
|
@@ -707,7 +768,9 @@
|
|
|
707
768
|
};
|
|
708
769
|
|
|
709
770
|
Chosen.prototype.test_active_click = function(evt) {
|
|
710
|
-
|
|
771
|
+
var active_container;
|
|
772
|
+
active_container = $(evt.target).closest('.chosen-container');
|
|
773
|
+
if (active_container.length && this.container[0] === active_container[0]) {
|
|
711
774
|
return this.active_field = true;
|
|
712
775
|
} else {
|
|
713
776
|
return this.close_field();
|
|
@@ -741,7 +804,6 @@
|
|
|
741
804
|
|
|
742
805
|
Chosen.prototype.result_do_highlight = function(el) {
|
|
743
806
|
var high_bottom, high_top, maxHeight, visible_bottom, visible_top;
|
|
744
|
-
|
|
745
807
|
if (el.length) {
|
|
746
808
|
this.result_clear_highlight();
|
|
747
809
|
this.result_highlight = el;
|
|
@@ -774,13 +836,13 @@
|
|
|
774
836
|
return false;
|
|
775
837
|
}
|
|
776
838
|
this.container.addClass("chosen-with-drop");
|
|
777
|
-
this.form_field_jq.trigger("chosen:showing_dropdown", {
|
|
778
|
-
chosen: this
|
|
779
|
-
});
|
|
780
839
|
this.results_showing = true;
|
|
781
840
|
this.search_field.focus();
|
|
782
841
|
this.search_field.val(this.search_field.val());
|
|
783
|
-
|
|
842
|
+
this.winnow_results();
|
|
843
|
+
return this.form_field_jq.trigger("chosen:showing_dropdown", {
|
|
844
|
+
chosen: this
|
|
845
|
+
});
|
|
784
846
|
};
|
|
785
847
|
|
|
786
848
|
Chosen.prototype.update_results_content = function(content) {
|
|
@@ -800,7 +862,6 @@
|
|
|
800
862
|
|
|
801
863
|
Chosen.prototype.set_tab_index = function(el) {
|
|
802
864
|
var ti;
|
|
803
|
-
|
|
804
865
|
if (this.form_field.tabIndex) {
|
|
805
866
|
ti = this.form_field.tabIndex;
|
|
806
867
|
this.form_field.tabIndex = -1;
|
|
@@ -810,7 +871,6 @@
|
|
|
810
871
|
|
|
811
872
|
Chosen.prototype.set_label_behavior = function() {
|
|
812
873
|
var _this = this;
|
|
813
|
-
|
|
814
874
|
this.form_field_label = this.form_field_jq.parents("label");
|
|
815
875
|
if (!this.form_field_label.length && this.form_field.id.length) {
|
|
816
876
|
this.form_field_label = $("label[for='" + this.form_field.id + "']");
|
|
@@ -838,7 +898,6 @@
|
|
|
838
898
|
|
|
839
899
|
Chosen.prototype.search_results_mouseup = function(evt) {
|
|
840
900
|
var target;
|
|
841
|
-
|
|
842
901
|
target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
|
|
843
902
|
if (target.length) {
|
|
844
903
|
this.result_highlight = target;
|
|
@@ -849,7 +908,6 @@
|
|
|
849
908
|
|
|
850
909
|
Chosen.prototype.search_results_mouseover = function(evt) {
|
|
851
910
|
var target;
|
|
852
|
-
|
|
853
911
|
target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
|
|
854
912
|
if (target) {
|
|
855
913
|
return this.result_do_highlight(target);
|
|
@@ -865,7 +923,6 @@
|
|
|
865
923
|
Chosen.prototype.choice_build = function(item) {
|
|
866
924
|
var choice, close_link,
|
|
867
925
|
_this = this;
|
|
868
|
-
|
|
869
926
|
choice = $('<li />', {
|
|
870
927
|
"class": "search-choice"
|
|
871
928
|
}).html("<span>" + item.html + "</span>");
|
|
@@ -904,8 +961,8 @@
|
|
|
904
961
|
};
|
|
905
962
|
|
|
906
963
|
Chosen.prototype.results_reset = function() {
|
|
964
|
+
this.reset_single_select_options();
|
|
907
965
|
this.form_field.options[0].selected = true;
|
|
908
|
-
this.selected_option_count = null;
|
|
909
966
|
this.single_set_selected_text();
|
|
910
967
|
this.show_search_field_default();
|
|
911
968
|
this.results_reset_cleanup();
|
|
@@ -921,8 +978,7 @@
|
|
|
921
978
|
};
|
|
922
979
|
|
|
923
980
|
Chosen.prototype.result_select = function(evt) {
|
|
924
|
-
var high, item
|
|
925
|
-
|
|
981
|
+
var high, item;
|
|
926
982
|
if (this.result_highlight) {
|
|
927
983
|
high = this.result_highlight;
|
|
928
984
|
this.result_clear_highlight();
|
|
@@ -935,14 +991,8 @@
|
|
|
935
991
|
if (this.is_multiple) {
|
|
936
992
|
high.removeClass("active-result");
|
|
937
993
|
} else {
|
|
938
|
-
|
|
939
|
-
this.result_single_selected.removeClass("result-selected");
|
|
940
|
-
selected_index = this.result_single_selected[0].getAttribute('data-option-array-index');
|
|
941
|
-
this.results_data[selected_index].selected = false;
|
|
942
|
-
}
|
|
943
|
-
this.result_single_selected = high;
|
|
994
|
+
this.reset_single_select_options();
|
|
944
995
|
}
|
|
945
|
-
high.addClass("result-selected");
|
|
946
996
|
item = this.results_data[high[0].getAttribute("data-option-array-index")];
|
|
947
997
|
item.selected = true;
|
|
948
998
|
this.form_field.options[item.options_index].selected = true;
|
|
@@ -981,7 +1031,6 @@
|
|
|
981
1031
|
|
|
982
1032
|
Chosen.prototype.result_deselect = function(pos) {
|
|
983
1033
|
var result_data;
|
|
984
|
-
|
|
985
1034
|
result_data = this.results_data[pos];
|
|
986
1035
|
if (!this.form_field.options[result_data.options_index].disabled) {
|
|
987
1036
|
result_data.selected = false;
|
|
@@ -1021,7 +1070,6 @@
|
|
|
1021
1070
|
|
|
1022
1071
|
Chosen.prototype.winnow_results_set_highlight = function() {
|
|
1023
1072
|
var do_high, selected_results;
|
|
1024
|
-
|
|
1025
1073
|
selected_results = !this.is_multiple ? this.search_results.find(".result-selected.active-result") : [];
|
|
1026
1074
|
do_high = selected_results.length ? selected_results.first() : this.search_results.find(".active-result").first();
|
|
1027
1075
|
if (do_high != null) {
|
|
@@ -1031,10 +1079,12 @@
|
|
|
1031
1079
|
|
|
1032
1080
|
Chosen.prototype.no_results = function(terms) {
|
|
1033
1081
|
var no_results_html;
|
|
1034
|
-
|
|
1035
1082
|
no_results_html = $('<li class="no-results">' + this.results_none_found + ' "<span></span>"</li>');
|
|
1036
1083
|
no_results_html.find("span").first().html(terms);
|
|
1037
|
-
|
|
1084
|
+
this.search_results.append(no_results_html);
|
|
1085
|
+
return this.form_field_jq.trigger("chosen:no_results", {
|
|
1086
|
+
chosen: this
|
|
1087
|
+
});
|
|
1038
1088
|
};
|
|
1039
1089
|
|
|
1040
1090
|
Chosen.prototype.no_results_clear = function() {
|
|
@@ -1043,7 +1093,6 @@
|
|
|
1043
1093
|
|
|
1044
1094
|
Chosen.prototype.keydown_arrow = function() {
|
|
1045
1095
|
var next_sib;
|
|
1046
|
-
|
|
1047
1096
|
if (this.results_showing && this.result_highlight) {
|
|
1048
1097
|
next_sib = this.result_highlight.nextAll("li.active-result").first();
|
|
1049
1098
|
if (next_sib) {
|
|
@@ -1056,7 +1105,6 @@
|
|
|
1056
1105
|
|
|
1057
1106
|
Chosen.prototype.keyup_arrow = function() {
|
|
1058
1107
|
var prev_sibs;
|
|
1059
|
-
|
|
1060
1108
|
if (!this.results_showing && !this.is_multiple) {
|
|
1061
1109
|
return this.results_show();
|
|
1062
1110
|
} else if (this.result_highlight) {
|
|
@@ -1074,7 +1122,6 @@
|
|
|
1074
1122
|
|
|
1075
1123
|
Chosen.prototype.keydown_backstroke = function() {
|
|
1076
1124
|
var next_available_destroy;
|
|
1077
|
-
|
|
1078
1125
|
if (this.pending_backstroke) {
|
|
1079
1126
|
this.choice_destroy(this.pending_backstroke.find("a").first());
|
|
1080
1127
|
return this.clear_backstroke();
|
|
@@ -1100,7 +1147,6 @@
|
|
|
1100
1147
|
|
|
1101
1148
|
Chosen.prototype.keydown_checker = function(evt) {
|
|
1102
1149
|
var stroke, _ref1;
|
|
1103
|
-
|
|
1104
1150
|
stroke = (_ref1 = evt.which) != null ? _ref1 : evt.keyCode;
|
|
1105
1151
|
this.search_field_scale();
|
|
1106
1152
|
if (stroke !== 8 && this.pending_backstroke) {
|
|
@@ -1132,7 +1178,6 @@
|
|
|
1132
1178
|
|
|
1133
1179
|
Chosen.prototype.search_field_scale = function() {
|
|
1134
1180
|
var div, f_width, h, style, style_block, styles, w, _i, _len;
|
|
1135
|
-
|
|
1136
1181
|
if (this.is_multiple) {
|
|
1137
1182
|
h = 0;
|
|
1138
1183
|
w = 0;
|
|
@@ -59,9 +59,16 @@
|
|
|
59
59
|
self.showOrCreateTip($this);
|
|
60
60
|
} else if (e.type === 'mouseout' || e.type === 'mouseleave') {
|
|
61
61
|
// PATCH to hover over actual tooltip
|
|
62
|
-
self.getTip($this)
|
|
62
|
+
var tip = self.getTip($this);
|
|
63
|
+
if (tip.has("a")[0]) {
|
|
64
|
+
clearTimeout(tip.data("_timeout"));
|
|
65
|
+
tip.data("_timeout", setTimeout(function() {
|
|
66
|
+
self.hide($this);
|
|
67
|
+
tip.removeData("_timeout");
|
|
68
|
+
}, 100));
|
|
69
|
+
}
|
|
70
|
+
else
|
|
63
71
|
self.hide($this);
|
|
64
|
-
}, 100));
|
|
65
72
|
}
|
|
66
73
|
});
|
|
67
74
|
}
|
|
@@ -114,7 +121,7 @@
|
|
|
114
121
|
var self = this;
|
|
115
122
|
$tip.on('mouseenter.fndtn.tooltip mouseleave.fndtn.tooltip', function (e) {
|
|
116
123
|
if (/enter|over/i.test(e.type))
|
|
117
|
-
clearTimeout($tip.data("
|
|
124
|
+
clearTimeout($tip.data("_timeout"));
|
|
118
125
|
else if (e.type === 'mouseout' || e.type === 'mouseleave')
|
|
119
126
|
self.hide($(this));
|
|
120
127
|
});
|