Nav menu cleanups. Props nbachiyski. see #11817

git-svn-id: https://develop.svn.wordpress.org/trunk@13375 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2010-02-24 18:52:54 +00:00
parent 83e6b0d16a
commit e52fa727be
10 changed files with 189 additions and 273 deletions
@@ -115,7 +115,7 @@ function updatepostdata()
jQuery(this).find('dl > dt > span > #remove' + j).attr('onClick', 'removeitem(' + i + ')');
jQuery(this).find('dl > dt > span > #remove' + j).attr('id','remove' + i);
jQuery('#licount').attr('value',i);
jQuery('#li-count').attr('value',i);
});
@@ -142,16 +142,16 @@ function appendToList(templatedir,additemtype,itemtext,itemurl,itemid,itemparent
var inputdescription = '';
var inputicon = '';
if (additemtype == 'Custom')
if (additemtype == navMenuL10n.custom)
{
inputvaluevarname = document.getElementById('custom_menu_item_name').value;
inputvaluevarurl = document.getElementById('custom_menu_item_url').value;
inputvaluevarname = document.getElementById('custom-menu-item-name').value;
inputvaluevarurl = document.getElementById('custom-menu-item-url').value;
inputitemid = '';
inputparentid = '';
inputlinktype = 'custom';
inputdescription = document.getElementById('custom_menu_item_description').value;
inputdescription = '';
}
else if (additemtype == 'Page')
else if (additemtype == navMenuL10n.page)
{
inputvaluevarname = htmlentities(itemtext.toString());
inputvaluevarurl = itemurl.toString();
@@ -161,7 +161,7 @@ function appendToList(templatedir,additemtype,itemtext,itemurl,itemid,itemparent
inputdescription = htmlentities(itemdescription.toString());
}
else if (additemtype == 'Category')
else if (additemtype == navMenuL10n.category)
{
inputvaluevarname = htmlentities(itemtext.toString());
inputvaluevarurl = itemurl.toString();
File diff suppressed because one or more lines are too long