fixed includeJS causing jQuery to be included twice and breaking plugins

This commit is contained in:
Ralf Becker
2021-06-08 15:11:37 +02:00
parent 304dbb95ab
commit 8fa2bb466b
6 changed files with 14 additions and 10 deletions

View File

@@ -5,6 +5,8 @@
// Full source at https://github.com/harvesthq/chosen
// Copyright (c) 2011 Harvest http://getharvest.com
import 'jquery';
// MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
// This file is generated by `grunt build`, do not edit it by hand.
(function() {
@@ -113,7 +115,7 @@
this.SelectParser = SelectParser;
}).call(this);
}).call(window);
(function() {
var AbstractChosen, root;
@@ -458,9 +460,9 @@
root.AbstractChosen = AbstractChosen;
}).call(this);
}).call(window);
(function() {
(function(jQuery) {
var $, Chosen, root, _ref,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
@@ -802,7 +804,7 @@
chosen: this
});
var windowHeight = $(window).height(),
dropdownTop = this.container.offset().top + this.container.height() - $(window).scrollTop()
dropdownTop = this.container.offset().top + this.container.height() - $(window).scrollTop(),
totalHeight = this.dropdown.height() + dropdownTop
this.dropdown.toggleClass('chzn-above', totalHeight > windowHeight);
@@ -1211,4 +1213,4 @@
root.Chosen = Chosen;
}).call(this);
}).call(window, jQuery);