Commit Graph

124 Commits

Author SHA1 Message Date
Scott Taylor
b964ac0148 Live update the menu item title when the user is editing the "Navigation Label" field.
Props celloexpressions.
See #23076.

Built from https://develop.svn.wordpress.org/trunk@28707


git-svn-id: http://core.svn.wordpress.org/trunk@28523 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-09 18:39:15 +00:00
Andrew Nacin
7ac1f7916f Return some semicolons. fixes #25594.
Built from https://develop.svn.wordpress.org/trunk@26623


git-svn-id: http://core.svn.wordpress.org/trunk@26513 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-04 19:08:10 +00:00
Andrew Nacin
bfc16271ca Nav Menus: Delegate click events for move links.
props ankit.gade.
fixes #25594.

Built from https://develop.svn.wordpress.org/trunk@26613


git-svn-id: http://core.svn.wordpress.org/trunk@26503 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-04 17:10:11 +00:00
Sergey Biryukov
4e28c278a5 Fix replacement regex in wp-admin/js/nav-menu.js.
props rzen, jeremyfelt.
fixes #26047.
Built from https://develop.svn.wordpress.org/trunk@26233


git-svn-id: http://core.svn.wordpress.org/trunk@26140 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-16 07:42:11 +00:00
Andrew Nacin
2c1ccede9d Fix JSHint errors in nav-menu.js.
props atimmer.
fixes #25953.

Built from https://develop.svn.wordpress.org/trunk@26163


git-svn-id: http://core.svn.wordpress.org/trunk@26074 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-14 06:09:11 +00:00
Andrew Nacin
d2f06ecf48 Optimize the accessibility JS on the Menus screen to avoid browser crashes with very large menus.
props atimmer.
fixes #25112.

Built from https://develop.svn.wordpress.org/trunk@25708


git-svn-id: http://core.svn.wordpress.org/trunk@25622 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-07 13:37:08 +00:00
Dominik Schilling
328c4e9a67 Revert [25622]. fixes #25445. see #25122.
Built from https://develop.svn.wordpress.org/trunk@25687


git-svn-id: http://core.svn.wordpress.org/trunk@25603 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-03 09:12:08 +00:00
Andrew Nacin
8896aab690 Only show top-level items when adding pages to a User's First Nav Menu. (This is also the title of Dave's first children's book.)
props lessbloat.
fixes #25122.

Built from https://develop.svn.wordpress.org/trunk@25622


git-svn-id: http://core.svn.wordpress.org/trunk@25539 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-25 16:23:09 +00:00
Dominik Schilling
c2739d12cc Trim leading whitespace from AJAX responses.
This fixes the warning "$(html) HTML strings must start with '<' character" by jQuery Migrate when adding nav menu items, post custom fields or comment replies.

fixes #23681.
Built from https://develop.svn.wordpress.org/trunk@25546


git-svn-id: http://core.svn.wordpress.org/trunk@25466 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-21 10:51:09 +00:00
Helen Hou-Sandí
0da48b8335 Tweaks to the accordion:
* Enqueues JS in `do_accordion_sections()`.
* Top and bottom rounded corners for the nav menu accordion.
* Better RTL and no-JS.

props lessbloat, DrewAPicture, aaroncampbell, helen. fixes #23449.


git-svn-id: http://core.svn.wordpress.org/trunk@24680 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-12 18:16:29 +00:00
Mark Jaquith
19810a259c Move nav menus to a tabbed interface, so that users with a lot of locations can do bulk assignment.
props DrewAPicture, lessbloat. fixes #23770

git-svn-id: http://core.svn.wordpress.org/trunk@23810 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-27 11:46:08 +00:00
Sergey Biryukov
9f26938da3 Use placeholders in menu strings instead of manual concatenation. fixes #14045.
git-svn-id: http://core.svn.wordpress.org/trunk@23761 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-20 05:49:29 +00:00
Sergey Biryukov
f0a60fb9c9 Fix object name. props GaryJ. see #14045.
git-svn-id: http://core.svn.wordpress.org/trunk@23760 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-20 05:46:39 +00:00
Mark Jaquith
9bd740f616 Accessibility revamp for nav menus.
props lessbloat. fixes #14045

git-svn-id: http://core.svn.wordpress.org/trunk@23727 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-16 04:47:19 +00:00
Mark Jaquith
83bb916b81 Turn the Nav Menu meta boxes into an accordion. Less sprawling and overwhelming.
* Registration stays the same — they're meta boxes
* Call `do_accordion_sections()` instead of `do_meta_boxes()` and they render as an accordion

props DrewAPicture, lessbloat, jkudish. fixes #23450. see #23449

git-svn-id: http://core.svn.wordpress.org/trunk@23707 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-15 13:16:38 +00:00
Andrew Nacin
1e555a03a1 Remove message slide-down effect on the nav-menus.php page. props lessbloat, fixes #23714.
git-svn-id: http://core.svn.wordpress.org/trunk@23640 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-07 17:03:15 +00:00
Mark Jaquith
52c46736df Improve the UX of the Nav Menus screen. Kill the tabs, and change to a
dropdown, unless you have zero or one menus (which is the most common),
in which case you jump right into editing your sole menu.

Do assignment to location using checkboxes in the main menu editing
section instead of the backwards menu => location assignment in a
random meta box.

More to come, but this gets us started.

props lessbloat, DrewAPicture, jkudish. see #23119

git-svn-id: http://core.svn.wordpress.org/trunk@23441 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-02-16 04:53:59 +00:00
Andrew Nacin
1acd8b556f New HiDPI spinner. Uses clean <span class="spinner"></span> markup.
Be on the lookout for weirdness.
props lessbloat. see #21456.



git-svn-id: http://core.svn.wordpress.org/trunk@22019 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-26 19:57:44 +00:00
Andrew Nacin
2710bcade1 Switch to .min for compressed JS and CSS files.
* This moves our "development" versions from .dev.js to .js (same for css).
 * The compressed version then moves from .js to .min.js (same for css).

By switching to the standard .min convention, it sets expectations for developers,
and works nicely with existing tools such as ack.

fixes #21633.



git-svn-id: http://core.svn.wordpress.org/trunk@21592 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-23 00:04:18 +00:00
nacin
a14dd3db8b Allow enter to trigger a new custom link on nav-menus.php. props mattwiebe, fixes #18255.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19310 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-11-16 01:45:11 +00:00
azaozz
65f9c441a7 Replace .attr() with .prop() as per jQuery 1.6.1. Also fixes couple places where the JS wasn't working because attr('some', '') does not remove the HTML property now, see #17311
git-svn-id: http://svn.automattic.com/wordpress/trunk@18027 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-05-25 01:04:12 +00:00
azaozz
9e4bee6c26 Add quotes to [value="some"] selectors, see #16426
git-svn-id: http://svn.automattic.com/wordpress/trunk@17777 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-04-30 02:15:08 +00:00
scribu
6e56dce7dd Fix menu box search. Fixes #14335
git-svn-id: http://svn.automattic.com/wordpress/trunk@15709 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-04 14:17:34 +00:00
nacin
975b2cdb6d Horizontal scrolling/resizing fixes for nav menu UI. Also some RTL fixes. props koopersmith, see #13525
git-svn-id: http://svn.automattic.com/wordpress/trunk@15214 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-06-11 05:19:36 +00:00
nacin
dacccec2f7 Prevent 'Enter menu name here' menus, and offer some feedback. props koopersmith, fixes #13703.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15124 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-06-03 03:33:54 +00:00
markjaquith
7aa4551ec7 Do not load window.onbeforeonload event if we are not on an existing nav menu. props filosofo. Reduce opacity on nav menu postboxes if we are not on an existing nav menu, and for JS users, deactivate all links and form elements, to make it obvious that those UI elements are not usable at this stage. fixes #13615
git-svn-id: http://svn.automattic.com/wordpress/trunk@15062 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-29 19:39:40 +00:00
nacin
35d800986f Sanity check menu item parents and fix HTML issues. props filosofo, fixes #13600.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15049 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-28 23:04:00 +00:00
nacin
0d09181552 Don't show double-AYS for deleting a menu. props filosofo, duck_. see #13525.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15046 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-28 20:38:19 +00:00
ryan
70b6f9c478 Nav menu RTL js fixes. Props filosofo. see #13525
git-svn-id: http://svn.automattic.com/wordpress/trunk@15039 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-28 16:57:47 +00:00
nacin
4d5114ff86 Force menu AYS when a menu item is deleted. props ocean90, see #13525.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14973 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-27 02:31:23 +00:00
nacin
da7b990fb5 Move the "Add Home Link" functionality to a checkbox on the View All tab of the Pages metabox. Also makes it work non-JS. props filosofo, fixes #13213.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14971 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-27 02:24:33 +00:00
ryan
1fa281b08c Ajaxify pagination requests in menu boxes. Props filosofo. fixes #13204
git-svn-id: http://svn.automattic.com/wordpress/trunk@14943 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-26 14:49:43 +00:00
nacin
b0e128e69b Don't hide early nav menu instructions until the menu is no longer empty. props koopersmith, see #13525
git-svn-id: http://svn.automattic.com/wordpress/trunk@14917 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-26 00:41:18 +00:00
nacin
7a5d3f2688 First pass on better UX for menu item save. props koopersmith, see #13525.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14852 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-24 19:50:20 +00:00
nacin
f15cdc78cf Menu tweaks. Save menu locations when saving the menu. Also, centralize theme support checks and add them to menu.php. Improve some branching. Remove some old JS vars, add a missing semicolon, etc. props koopersmith. see #13378.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14831 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-24 09:23:56 +00:00
nacin
c84bc2e846 Pixel sanity check. props filosofo, fixes #13470.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14799 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-21 23:35:37 +00:00
nacin
49437c3491 Fix nav menu locations sorting. props jorbin, koopersmith with assists. see #13378.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14772 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-20 22:43:14 +00:00
ryan
2d3d649182 Menu styling fixes for IE. Props filosofo, ocean90. fixes #13388 #13348
git-svn-id: http://svn.automattic.com/wordpress/trunk@14761 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-20 19:33:57 +00:00
nacin
337df6e337 Remove AYS for deleting a menu item. fixes #13330.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14756 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-20 14:55:11 +00:00
markjaquith
31dd323f01 Add AYS notice on unsaved menu changes. see #12472
git-svn-id: http://svn.automattic.com/wordpress/trunk@14741 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-19 09:56:02 +00:00
ryan
bc1bf148e4 Add nonce to menu-locations-save. Props koopersmith. see #13378
git-svn-id: http://svn.automattic.com/wordpress/trunk@14725 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-18 15:16:58 +00:00
nacin
f02fddce86 Save menu locations meta box via ajax. see #13378.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14715 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-17 23:58:56 +00:00
nacin
6c01265794 First pass at fixing search for add menu item boxes. props koopersmith, see #13283.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14686 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-16 05:39:53 +00:00
nacin
3f796315da Only save menu item positions on save. Had implications for draft items otherwise. see #13337, props koopersmith.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14615 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-14 01:32:48 +00:00
nacin
8bd2d0505b Some sortable improvements in the nav menu UI. props koopersmith, see #13220.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14531 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-10 04:51:57 +00:00
nacin
544d3d0f84 Remove old code that breaks menu design rendering. props koopersmith, fixes #13311.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14530 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-10 04:49:52 +00:00
nacin
444f8cc6c4 Allow menu items to be dropped on a parent item in addition to just being dragged to the right. props koopersmith, see #13220.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14520 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-08 21:56:53 +00:00
nacin
0a71b5dc8a Adopt WP's general JS structure. Remove last of trailing commas. Remove dead code. props koopersmith, see #13220.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14475 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-06 17:11:52 +00:00
nacin
494290312a Remove more trailing commas in nav menus JS. props koopersmith and ocean90, see #13220.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14474 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-06 15:40:29 +00:00
nacin
e34150ab5b Revert [14434] et al. Going back to checkboxes in the nav menus, holding drag-drop for future release. see #13247.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14471 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-06 14:09:10 +00:00
nacin
8b27606b04 Only make one ajax call for multiple items. Also move jQuery extensions into their own function. props koopersmith, see #13220.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14468 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-05 21:23:53 +00:00
nacin
2d7f62489d Minor JS var declaration optimizations. props koopersmith, see #13220.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14467 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-05 21:06:43 +00:00
nacin
585ea858af Consolidate nav menu item ajax. Other misc fixes. props koopersmith, see #13204.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14464 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-05 20:29:50 +00:00
nacin
3d76f61923 Use correct field name. fixes menu ordering issues. props filosofo, fixes #13256.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14454 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-04 21:28:31 +00:00
nacin
0891a9dea0 More menu improvements. Add link that adds a menu item to the home page, make empty menu dropzone slightly larger, limit selected items to the active tab. props koopersmith and ptahdunbar. see #13220.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14439 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-04 10:01:15 +00:00
nacin
3a69ab9602 Fix 'Select All' for the new drag/drop code. props koopersmith, see #13220.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14438 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-04 08:54:35 +00:00
nacin
ac7687ee8d Have 'Add to Menu' and multiple-item drag/drop only affect one meta box at a time. props ptahdunbar, with koopersmith. Non-JS will still handle the meta boxes all together as one form. see #13220, see #13219.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14436 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-04 08:31:40 +00:00
nacin
7466fadd24 Add ability to drag objects from meta boxes and drop them into your menu. Includes multiple-select before dragging. Select all is todo. Checkboxes remain non-JS fallback. props koopersmith, see #13247.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14434 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-04 07:24:49 +00:00
nacin
0c2e93aee7 Sliding tabs for the nav menu admin UI. second pass. props koopersmith, see #13215.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14373 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-03 16:59:51 +00:00
nacin
08f650de1a First pass on sliding tabs for the nav menu admin UI. props koopersmith, see #13215.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14368 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-03 10:28:35 +00:00
nacin
c3d2524889 Fix the nav menu ajax spinners (again).
git-svn-id: http://svn.automattic.com/wordpress/trunk@14340 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-02 21:05:55 +00:00
nacin
16f6590bc3 Alot of drag/drop/sortable improvements to nav menu admin UI. props koopersmith, fixes #12675.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14337 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-02 19:09:10 +00:00
nacin
54763a0e76 Clarify menu creation versus save. props duck_, see #13134. Check in scripts for r14332, see #13204.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14333 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-02 18:15:41 +00:00
nacin
7bb32597b7 Fix the ajax loading/processing spinner for nav menu meta boxes. see #13134.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14293 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-29 07:10:54 +00:00
nacin
8787503192 Nav menu UI updates. props koopersmith, see #13134.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14286 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-29 03:43:11 +00:00
nacin
90ea03383f Fix handling of nav menu search, also menu naming conflicts. props filosofo, fixes #13138
git-svn-id: http://svn.automattic.com/wordpress/trunk@14285 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-28 20:44:08 +00:00
nacin
8c9f71bb57 More nav menu fixes. props filosofo. see #13148. fixes #13155, fixes #13157, fixes #13138, see #13134.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14283 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-28 18:30:32 +00:00
ryan
e879a9ab0e New menu UI. Props filosofo. see #12713
git-svn-id: http://svn.automattic.com/wordpress/trunk@14248 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-27 01:05:58 +00:00
nacin
589997d8cb Don't use target="_self" in nav menu links, just omit the attribute. Also fix and run earlier db upgrades. fixes #12808
git-svn-id: http://svn.automattic.com/wordpress/trunk@13974 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-03 22:52:30 +00:00
nacin
9c30277635 Prevent the nav menu walker from walking in circles. Don't allow an object from being a child of itself; if the functionality is desired, a workaround would be custom links. see #11817, see #12566
git-svn-id: http://svn.automattic.com/wordpress/trunk@13803 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-22 22:26:27 +00:00
nacin
ba6f1cba07 Various bug fixes and improvements to menu management. props ptahdunbar, see #11817.
git-svn-id: http://svn.automattic.com/wordpress/trunk@13802 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-22 19:56:16 +00:00
nacin
cea2e6eaa3 Remove JS nav-menu functions that we no longer use. see #11817
git-svn-id: http://svn.automattic.com/wordpress/trunk@13742 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-17 20:44:59 +00:00
markjaquith
6786e3ddb3 Nav Menus: blur/Focus behavior for Create Menu and Add Custom Links. Route "return" presses in each of those areas to proper button press. Better create/save logic on the PHP side.
git-svn-id: http://svn.automattic.com/wordpress/trunk@13739 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-17 19:57:08 +00:00
markjaquith
7cf7df44d1 No need for three separate JS files if they are only ever enqueued together. see #11817
git-svn-id: http://svn.automattic.com/wordpress/trunk@13730 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-17 16:13:16 +00:00