Merge remote-tracking branch 'origin/1.9.3' into 1.10

Conflicts:
	src/Orchard.Web/Modules/Orchard.MediaLibrary/Views/Parts/MediaLibrary.Navigation.cshtml
This commit is contained in:
Lombiq 2016-03-01 22:02:06 +01:00 committed by Benedek Farkas
commit 6c93bf4d69
5 changed files with 12 additions and 11 deletions
src/Orchard.Web/Modules
Orchard.Azure.MediaServices/Views/EditorTemplates
Orchard.CustomForms/Views/Item
Orchard.MediaLibrary

View File

@ -30,7 +30,7 @@
<section class="preset-custom-section" data-bind="visible: isExpanded">
<label>@T("Custom encoding preset XML")</label>
<textarea data-bind="value: customXml, attr: { id: 'EncodingSettings_WamsEncodingPresets_' + $index().CustomXml, name: 'EncodingSettings.WamsEncodingPresets[' + $index() + '].CustomXml'}"></textarea>
<p class="hint">@T("Leave empty if this is standard preset (in which case the name must match a standard Microsoft Azure Media Services encoding preset name.")</p>
<p class="hint">@T("Leave empty if this is a standard preset (in which case the name must match a standard Microsoft Azure Media Services encoding preset name).")</p>
</section>
</td>
<td>

View File

@ -1,8 +1,11 @@
@using Orchard.ContentManagement
@using Orchard.Utility.Extensions
@using Orchard.ContentManagement.Aspects;
@{
ContentItem customForm = Model.ContentItem;
string returnUrl = Model.ReturnUrl;
var metadata = customForm.ContentManager.GetItemMetadata(customForm);
var displayText = metadata != null ? MvcHtmlString.Create(metadata.DisplayText) : null;
Html.AddPageClassNames("edit-" + customForm.ContentType.HtmlClassify());
@ -12,7 +15,7 @@
var submitButtonText = String.IsNullOrEmpty(Model.ContentItem.CustomFormPart.SubmitButtonText) ? T("Submit").Text : Model.ContentItem.CustomFormPart.SubmitButtonText;
}
@Display(New.Parts_Title().Title(Html.ItemDisplayText(customForm)))
@Display(New.Parts_Title().Title(displayText))
@using (Html.BeginFormAntiForgeryPost(returnUrl)) {
@Html.ValidationSummary()

View File

@ -165,7 +165,7 @@ namespace Orchard.MediaLibrary.Controllers {
foreach (var media in Services.ContentManager.Query().ForPart<MediaPart>().ForContentItems(mediaItemIds).List()) {
// don't try to rename the file if there is no associated media file
if (!String.IsNullOrEmpty(media.FileName)) {
if (!string.IsNullOrEmpty(media.FileName)) {
var uniqueFilename = _mediaLibraryService.GetUniqueFilename(folderPath, media.FileName);
_mediaLibraryService.MoveFile(media.FolderPath, media.FileName, folderPath, uniqueFilename);
media.FileName = uniqueFilename;
@ -179,7 +179,10 @@ namespace Orchard.MediaLibrary.Controllers {
private bool IsRootFolder(string folderPath) {
var rootMediaFolder = _mediaLibraryService.GetRootMediaFolder();
return String.Equals(rootMediaFolder.MediaPath, folderPath, StringComparison.OrdinalIgnoreCase);
return rootMediaFolder == null ?
string.IsNullOrEmpty(folderPath) :
string.Equals(rootMediaFolder.MediaPath, folderPath, StringComparison.OrdinalIgnoreCase);
}
}
}

View File

@ -56,7 +56,7 @@
<button type="submit" class="fa fa-download">@T("Preview")</button>
</div>
<div id="query">
<input name="url" type="text" autofocus=autofocus autofocus=autofocus placeholder="@T("media url")" value="@Model.Url" />
<input name="url" type="text" autofocus placeholder="@T("media url")" value="@Model.Url" />
</div>
</fieldset>
<fieldset>

View File

@ -1,6 +1 @@
@using Orchard.MediaLibrary.ViewModels
@{
MediaManagerIndexViewModel viewModel = Model.MediaManagerIndexViewModel;
}
<li><a href="#" data-bind="click: selectRecent, css: { selected: !displayed() }" id="button-recent"><i class="fa fa-clock-o"></i>@T("Recent")</a>
<li><a href="#" data-bind="click: selectRecent, css: { selected: !displayed() }" id="button-recent"><i class="fa fa-clock-o"></i>@T("Recent")</a>