Fix merge conflicts caused by min version
This commit is contained in:
parent
57fcc576c3
commit
1d6df98c4e
6 changed files with 30 additions and 30 deletions
|
@ -95,8 +95,8 @@
|
|||
return this.set_tab_index();
|
||||
};
|
||||
Chosen.prototype.register_observers = function() {
|
||||
this.container.click(__bind(function(evt) {
|
||||
return this.container_click(evt);
|
||||
this.container.mousedown(__bind(function(evt) {
|
||||
return this.container_mousedown(evt);
|
||||
}, this));
|
||||
this.container.mouseenter(__bind(function(evt) {
|
||||
return this.mouse_enter(evt);
|
||||
|
@ -104,8 +104,8 @@
|
|||
this.container.mouseleave(__bind(function(evt) {
|
||||
return this.mouse_leave(evt);
|
||||
}, this));
|
||||
this.search_results.click(__bind(function(evt) {
|
||||
return this.search_results_click(evt);
|
||||
this.search_results.mouseup(__bind(function(evt) {
|
||||
return this.search_results_mouseup(evt);
|
||||
}, this));
|
||||
this.search_results.mouseover(__bind(function(evt) {
|
||||
return this.search_results_mouseover(evt);
|
||||
|
@ -138,8 +138,8 @@
|
|||
}, this));
|
||||
}
|
||||
};
|
||||
Chosen.prototype.container_click = function(evt) {
|
||||
if (evt && evt.type === "click") {
|
||||
Chosen.prototype.container_mousedown = function(evt) {
|
||||
if (evt && evt.type === "mousedown") {
|
||||
evt.stopPropagation();
|
||||
}
|
||||
if (!this.pending_destroy_click) {
|
||||
|
@ -167,7 +167,7 @@
|
|||
Chosen.prototype.input_focus = function(evt) {
|
||||
if (!this.active_field) {
|
||||
return setTimeout((__bind(function() {
|
||||
return this.container_click();
|
||||
return this.container_mousedown();
|
||||
}, this)), 50);
|
||||
}
|
||||
};
|
||||
|
@ -356,7 +356,7 @@
|
|||
return this.search_field.removeClass("default");
|
||||
}
|
||||
};
|
||||
Chosen.prototype.search_results_click = function(evt) {
|
||||
Chosen.prototype.search_results_mouseup = function(evt) {
|
||||
var target;
|
||||
target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
|
||||
if (target.length) {
|
||||
|
|
2
chosen/chosen.jquery.min.js
vendored
2
chosen/chosen.jquery.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -86,8 +86,8 @@
|
|||
return this.set_tab_index();
|
||||
};
|
||||
Chosen.prototype.register_observers = function() {
|
||||
this.container.observe("click", __bind(function(evt) {
|
||||
return this.container_click(evt);
|
||||
this.container.observe("mousedown", __bind(function(evt) {
|
||||
return this.container_mousedown(evt);
|
||||
}, this));
|
||||
this.container.observe("mouseenter", __bind(function(evt) {
|
||||
return this.mouse_enter(evt);
|
||||
|
@ -95,8 +95,8 @@
|
|||
this.container.observe("mouseleave", __bind(function(evt) {
|
||||
return this.mouse_leave(evt);
|
||||
}, this));
|
||||
this.search_results.observe("click", __bind(function(evt) {
|
||||
return this.search_results_click(evt);
|
||||
this.search_results.observe("mouseup", __bind(function(evt) {
|
||||
return this.search_results_mouseup(evt);
|
||||
}, this));
|
||||
this.search_results.observe("mouseover", __bind(function(evt) {
|
||||
return this.search_results_mouseover(evt);
|
||||
|
@ -129,8 +129,8 @@
|
|||
}, this));
|
||||
}
|
||||
};
|
||||
Chosen.prototype.container_click = function(evt) {
|
||||
if (evt && evt.type === "click") {
|
||||
Chosen.prototype.container_mousedown = function(evt) {
|
||||
if (evt && evt.type === "mousedown") {
|
||||
evt.stop();
|
||||
}
|
||||
if (!this.pending_destroy_click) {
|
||||
|
@ -156,7 +156,7 @@
|
|||
};
|
||||
Chosen.prototype.input_focus = function(evt) {
|
||||
if (!this.active_field) {
|
||||
return setTimeout(this.container_click.bind(this), 50);
|
||||
return setTimeout(this.container_mousedown.bind(this), 50);
|
||||
}
|
||||
};
|
||||
Chosen.prototype.input_blur = function(evt) {
|
||||
|
@ -340,7 +340,7 @@
|
|||
return this.search_field.removeClassName("default");
|
||||
}
|
||||
};
|
||||
Chosen.prototype.search_results_click = function(evt) {
|
||||
Chosen.prototype.search_results_mouseup = function(evt) {
|
||||
var target;
|
||||
target = evt.target.hasClassName("active-result") ? evt.target : evt.target.up(".active-result");
|
||||
if (target) {
|
||||
|
|
2
chosen/chosen.proto.min.js
vendored
2
chosen/chosen.proto.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -89,11 +89,11 @@ class Chosen
|
|||
|
||||
|
||||
register_observers: ->
|
||||
@container.click (evt) => this.container_click(evt)
|
||||
@container.mousedown (evt) => this.container_mousedown(evt)
|
||||
@container.mouseenter (evt) => this.mouse_enter(evt)
|
||||
@container.mouseleave (evt) => this.mouse_leave(evt)
|
||||
|
||||
@search_results.click (evt) => this.search_results_click(evt)
|
||||
@search_results.mouseup (evt) => this.search_results_mouseup(evt)
|
||||
@search_results.mouseover (evt) => this.search_results_mouseover(evt)
|
||||
@search_results.mouseout (evt) => this.search_results_mouseout(evt)
|
||||
|
||||
|
@ -109,8 +109,8 @@ class Chosen
|
|||
else
|
||||
@selected_item.focus (evt) => this.activate_field(evt)
|
||||
|
||||
container_click: (evt) ->
|
||||
if evt and evt.type is "click"
|
||||
container_mousedown: (evt) ->
|
||||
if evt and evt.type is "mousedown"
|
||||
evt.stopPropagation()
|
||||
if not @pending_destroy_click
|
||||
if not @active_field
|
||||
|
@ -129,7 +129,7 @@ class Chosen
|
|||
mouse_leave: -> @mouse_on_container = false
|
||||
|
||||
input_focus: (evt) ->
|
||||
setTimeout (=> this.container_click()), 50 unless @active_field
|
||||
setTimeout (=> this.container_mousedown()), 50 unless @active_field
|
||||
|
||||
input_blur: (evt) ->
|
||||
if not @mouse_on_container
|
||||
|
@ -297,7 +297,7 @@ class Chosen
|
|||
@search_field.val("")
|
||||
@search_field.removeClass "default"
|
||||
|
||||
search_results_click: (evt) ->
|
||||
search_results_mouseup: (evt) ->
|
||||
target = if $(evt.target).hasClass "active-result" then $(evt.target) else $(evt.target).parents(".active-result").first()
|
||||
if target.length
|
||||
@result_highlight = target
|
||||
|
|
|
@ -81,11 +81,11 @@ class Chosen
|
|||
|
||||
|
||||
register_observers: ->
|
||||
@container.observe "click", (evt) => this.container_click(evt)
|
||||
@container.observe "mousedown", (evt) => this.container_mousedown(evt)
|
||||
@container.observe "mouseenter", (evt) => this.mouse_enter(evt)
|
||||
@container.observe "mouseleave", (evt) => this.mouse_leave(evt)
|
||||
|
||||
@search_results.observe "click", (evt) => this.search_results_click(evt)
|
||||
@search_results.observe "mouseup", (evt) => this.search_results_mouseup(evt)
|
||||
@search_results.observe "mouseover", (evt) => this.search_results_mouseover(evt)
|
||||
@search_results.observe "mouseout", (evt) => this.search_results_mouseout(evt)
|
||||
|
||||
|
@ -102,8 +102,8 @@ class Chosen
|
|||
@selected_item.observe "focus", (evt) => this.activate_field(evt)
|
||||
|
||||
|
||||
container_click: (evt) ->
|
||||
if evt and evt.type is "click"
|
||||
container_mousedown: (evt) ->
|
||||
if evt and evt.type is "mousedown"
|
||||
evt.stop()
|
||||
if not @pending_destroy_click
|
||||
if not @active_field
|
||||
|
@ -121,7 +121,7 @@ class Chosen
|
|||
mouse_leave: -> @mouse_on_container = false
|
||||
|
||||
input_focus: (evt) ->
|
||||
setTimeout this.container_click.bind(this), 50 unless @active_field
|
||||
setTimeout this.container_mousedown.bind(this), 50 unless @active_field
|
||||
|
||||
input_blur: (evt) ->
|
||||
if not @mouse_on_container
|
||||
|
@ -288,7 +288,7 @@ class Chosen
|
|||
@search_field.value = ""
|
||||
@search_field.removeClassName "default"
|
||||
|
||||
search_results_click: (evt) ->
|
||||
search_results_mouseup: (evt) ->
|
||||
target = if evt.target.hasClassName("active-result") then evt.target else evt.target.up(".active-result")
|
||||
if target
|
||||
@result_highlight = target
|
||||
|
|
Loading…
Reference in a new issue