fixes: U4-2942 re-publish all on content root not displaying

This commit is contained in:
Shannon
2013-09-26 13:03:09 +10:00
parent 29d849754c
commit 36ddb872fa
3 changed files with 11 additions and 6 deletions

View File

@@ -65,13 +65,18 @@ namespace Umbraco.Web.Trees.Menu
{
//First try to get a URL/title from the legacy action,
// if that doesn't work, try to get the legacy confirm view
//in some edge cases, item can be null so we'll just convert those to "-1" and "" for id and name since these edge cases don't need that.
Attempt
.Try(LegacyTreeDataConverter.GetUrlAndTitleFromLegacyAction(menuItem.Action, item.Id.ToInvariantString(), nodeType, item.Name, currentSection),
.Try(LegacyTreeDataConverter.GetUrlAndTitleFromLegacyAction(menuItem.Action,
item == null ? "-1" : item.Id.ToInvariantString(),
nodeType,
item == null ? "" : item.Name, currentSection),
action => menuItem.LaunchDialogUrl(action.Url, action.DialogTitle))
.OnFailure(() => LegacyTreeDataConverter.GetLegacyConfirmView(menuItem.Action, currentSection),
view => menuItem.LaunchDialogView(
view,
ui.GetText("defaultdialogs", "confirmdelete") + " '" + item.Name + "' ?"));
view => menuItem.LaunchDialogView(
view,
ui.GetText("defaultdialogs", "confirmdelete") + " '" + item.Name + "' ?"));
}
}
}