Opened 11 years ago
Closed 11 years ago
#27451 closed enhancement (fixed)
Widget Customizer: Remove jQuery.liveFilter dependency
Reported by: | ocean90 | Owned by: | ocean90 |
---|---|---|---|
Milestone: | 3.9 | Priority: | normal |
Severity: | normal | Version: | 3.9 |
Component: | Customize | Keywords: | has-patch |
Focuses: | Cc: |
Description
The search should do a better job. First pass attached.
- Moves search to collection
- Searches in description field too
Attachments (2)
Change History (7)
This ticket was mentioned in IRC in #wordpress-dev by ocean90. View the logs.
11 years ago
#3
@
11 years ago
- Owner set to ocean90
- Resolution set to fixed
- Status changed from new to closed
In 27650:
#4
@
11 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Filtering the widget collection turns out to cause some issues with adding multiple widgets of a certain instance, and also for sorting widgets in a widget area. Patch incoming...
@
11 years ago
Update a search_matched
property on the WidgetModel
instead of filtering out widgets from availableWidgets
; otherwise, the incremented multi_number
gets lost, and only one instance of a multi-widget can be added. This also fixes a bug with a widget area losing its sortability after adding a widget via a search. Also, don't equate an empty array with an error when the instance is passed to the update_widget
Ajax request. https://github.com/x-team/wordpress-develop/pull/9/files
@ocean90: I love how the filter now matches against both the widget name and description, and how the order of the terms is irrelevant. Great idea on combining multiple lookahead patterns.
I found two issues:
/ /g
instead of' '
), so only the order of the first two words was not significantHere're my revisions on your patch: https://github.com/x-team/wordpress-develop/commit/95c146a718b72f13419776e6dc41daa09327cbba
Our patches combined: https://github.com/x-team/wordpress-develop/pull/3/files