mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-04 14:47:02 +00:00
Prevent 'Enter menu name here' menus, and offer some feedback. props koopersmith, fixes #13703.
git-svn-id: https://develop.svn.wordpress.org/trunk@15124 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -529,6 +529,14 @@ body.js .item-order {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.major-publishing-actions .form-invalid {
|
||||
border-radius: 4px;
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
-khtml-border-radius: 4px;
|
||||
padding-left: 4px;
|
||||
margin-left: -4px;
|
||||
}
|
||||
|
||||
/* Clearfix */
|
||||
#menu-item-name-wrap:after,
|
||||
|
||||
@@ -806,7 +806,14 @@ var wpNavMenu;
|
||||
},
|
||||
|
||||
eventOnClickMenuSave : function(clickedEl) {
|
||||
var locs = '';
|
||||
var locs = '',
|
||||
menuName = $('#menu-name'),
|
||||
menuNameVal = menuName.val();
|
||||
// Cancel and warn if invalid menu name
|
||||
if( !menuNameVal || menuNameVal == menuName.attr('title') || !menuNameVal.replace(/\s+/, '') ) {
|
||||
menuName.parent().addClass('form-invalid');
|
||||
return false;
|
||||
}
|
||||
// Copy menu theme locations
|
||||
$('#nav-menu-theme-locations select').each(function() {
|
||||
locs += '<input type="hidden" name="' + this.name + '" value="' + $(this).val() + '" />';
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user