aboutsummaryrefslogtreecommitdiffstats
path: root/ui/widget.js
Commit message (Collapse)AuthorAgeFilesLines
* Docs: Change a few most common domains from HTTP to HTTPSMichał Gołębiowski-Owczarek2024-04-261-4/+4
| | | | | Also, update a few stale URLs to what they redirect now to. Closes gh-2244
* All: Update JS Foundation mentions to OpenJS FoundationMichał Gołębiowski-Owczarek2022-07-191-1/+1
| | | Closes gh-2104
* Widget: Optimize attachment of the _untrackClassesElement listenerMichał Gołębiowski-Owczarek2022-01-151-3/+7
| | | | | | | | | | | | | | | jQuery UI 1.13.0 changed the logic attaching the `_untrackClassesElement` listener in the `_classes` widget method; one of the side effects was calling `this._on` for each node that needed the listener. That caused a severe performance degradation for large comboboxes as each `_on` jQuery UI call causes a jQuery `add` call that calls Sizzle's `uniqueSort` underneath. Instead, collect the nodes that need the listener and then, outside of the loop, create a jQuery object out of them and attach the listener once. That's still slower than the jQuery 1.12 version but only slightly: 936 ms to 1.03s on a very large list on a recent MacBook Pro, compared to ~30 seconds before this patch. Fixes gh-2014 Closes gh-2037
* Widget: Make contextless widget construction workMichał Gołębiowski-Owczarek2021-11-191-1/+1
| | | | | | | | | | | | | | Due to the fact the widget factory code is now in strict mode, the check for being called without using the `new` keyword started breaking if you save the widget constructor to a variable before calling it: ```js var customWidget = $.custom.customWidget; customWidget( {}, elem ); ``` as then `this` is undefined and checking for `this._createWidget` crashes. Account for that with an additional check. Fixes gh-2015 Closes gh-2019
* Build: Migrate from JSHint & JSCS to ESLintMichał Gołębiowski-Owczarek2021-06-071-2/+5
| | | | | Fixes #15393 Closes gh-1958
* Widget: Fix boolean option when under use strictHrvoje Novosel2020-10-061-0/+2
| | | | | | | | | | | | | | Fix for `options === true` when using jQuery UI under `use strict`, which throws: ``` Uncaught TypeError: Cannot create property 'complete' on boolean 'true' ``` on line: ```js options.complete = callback; ``` Closes gh-1931
* All: Migrate away from deprecated/removed Core APIsMichał Gołębiowski-Owczarek2019-12-081-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary of the changes: * Build: Add jQuery 3.2.0-3.4.1 to versions UI can be tested against * Build: Load jQuery & Migrate via HTTPS * Build: Add package-lock.json to .gitignore * Build: Update jQuery Migrate from 3.0.0 to 3.1.0 * Build: Allow to run tests against jQuery 3.x-git * Build: Fix formatting according to JSCS rules * Build: Disable JSCS for the inlined jQuery Color * All: Switch from $.isArray to Array.isArray (jQuery.isArray will be removed in jQuery 4.0) * All: Switch from `$.isFunction( x )` to `typeof x === "function"` (jQuery.isFunction will be removed in jQuery 4.0) * All: Inline jQuery.isWindow as it'll be removed in jQuery 4.0 * Effects: Fix a timing issue in a variable declaration. Previously, a jQuery object was created, chained & assigned to a variable that was then accessed in a callback used inside of this chained definition. Due to a timing difference in when the callback fired for the first time in latest jQuery master, it was being called before the variable was defined. * Tests: Make dialog & draggable unit tests less strict (newest jQuery returns fractional results in some cases, making comparisons fail when there's a tiny difference) * All: Migrate from $.trim to bare String.prototype.trim (jQuery.trim will be deprecated in jQuery 3.5) Closes gh-1901
* Core: Fix JQMIGRATE warning about `jQuery.expr[":"]`Eirik Sletteberg2017-05-021-2/+2
| | | | | | | This commit polyfills `jQuery.expr.pseudos` for old versions of jQuery. Fixes #15185 Closes gh-1773
* Widget: Handle `Object.create(null)` for options objectsScott González2017-04-241-1/+2
| | | | | Fixes #15179 Closes gh-1809
* Widget: Improve `remove` event bindings for `classes` optionsScott González2017-04-191-5/+21
| | | | | | | | | Fixes #15078 Fixes #15082 Fixes #15095 Fixes #15136 Fixes #15152 Closes gh-1769
* Widget: Don't swallow errors in `remove` eventsScott González2017-02-281-9/+5
| | | | | | | The try/catch was only there to support jQuery <1.6.3, which we no longer support. Ref jquery/jquery#3554
* Widget: Untrack classes elements when they are removed from the DOMAlexander Schmitz2016-09-131-0/+13
| | | | | Fixes #15043 Closes gh-1744
* Widget: `instance()` should return `undefined` for empty setsScott González2016-08-041-24/+31
| | | | Fixes #15019
* Widget: Fix line length issuesAlexander Schmitz2016-04-131-2/+4
| | | | Ref gh-1690
* All: Fix manifest issues for categories and CSS dependenciesJörn Zaefferer2015-10-231-1/+1
| | | | | | | Collapses "UI Core" and "Core" into just "Core". Fixes bad paths for CSS dependencies. Regressed when moving widgets into the widgets subfolder.
* Widget: Call `._setOptionDisabled()` on init if the widget is disabledScott González2015-09-251-7/+16
| | | | | Fixes #9151 Ref gh-1599
* All: Delegate to base `_getCreateOptions()`.Scott González2015-09-171-1/+3
| | | | | | | Ensures that any extensions to the base widget will be handled properly by individual widgets. Closes gh-1598
* Widget: Style updatesScott González2015-09-161-47/+73
| | | | Closes gh-1597
* Widget: Update to use camelCase identifiersAlexander Schmitz2015-09-111-5/+5
|
* Widget: Style updatesAlexander Schmitz2015-08-211-24/+41
| | | | | Ref #14246 Ref gh-1588
* Core: Move version and creation of the ui namespace into its own moduleAlexander Schmitz2015-08-081-1/+1
| | | | Ref #9647
* Widget: Remove core event/alias and deprecated module dependenciesAlexander Schmitz2015-05-201-6/+6
|
* Widget: Support mixinsScott González2015-05-141-0/+4
| | | | | Fixes #12601 Closes gh-1554
* Widget: Fix style issuesJörn Zaefferer2015-03-181-38/+38
| | | | Closes gh-1500
* Widget: Add classes option and _add/_remove/_toggleClass methodsAlexander Schmitz2015-03-111-14/+107
| | | | | Fixes #7053 Closes gh-1411
* All: Drop support for jQuery 1.6.xJörn Zaefferer2015-01-131-4/+1
| | | | | | | | | | | Affects core, effects, position and widget. Only position has unit tests that fail with jQuery 1.6 without the workaround. Drops the 1.6.x copies jQuery of jQuery and removes them from the select in the testsuites. Fixes #10723 Closes gh-1422
* Build: Remove dates from copyright noticeAnne-Gaelle Colom2015-01-021-1/+1
| | | | Closes gh-1403
* Widget: Improve readability in `$.widget.bridge()`Giovanni Giacobbi2014-12-311-5/+6
| | | | Closes gh-1409
* Build: Remove manifest files; move metadata to source filesScott González2014-11-101-2/+7
| | | | Closes gh-1379
* Widget: Ensure window and document are defined in _getCreateOptions()Alexander Schmitz2014-08-271-4/+5
| | | | Closes gh-1320
* Widget: Avoid memory leaks when unbinding events with `._off()`Scott González2014-08-211-1/+7
| | | | | Ref #10056 Ref gh-1319
* Build: Update jscs and fix some code style issuesJörn Zaefferer2014-08-141-1/+1
| | | | | | Disables the checks for casing and line length, since those need a lot more effort to address. For variable naming the fix isn't obvious to me. There's way too many lines over 100 chars.
* Widget: Improve performance of cleanData methodFrederik Elvhage2014-07-241-2/+9
| | | | | Fixes #9546 Closes gh-1291
* Widget: Remove misleading commentScott González2014-05-141-1/+0
|
* All: Updating copyright year to 2014TJ VanToll2014-01-281-1/+1
|
* All: Rename all files, removing the "jquery.ui." prefix;Rafael Xavier de Souza2014-01-241-0/+544
- By executing https://gist.github.com/jzaefferer/893fcf70b7eebc1dc271; Fixes #9464 Closes gh-1029