Merge branch 'dev' into azureauth

This commit is contained in:
Sipke Schoorstra
2016-09-20 22:07:21 +02:00
7 changed files with 21 additions and 8 deletions

View File

@@ -1,4 +1,6 @@
@{
var propertyName = Model.PropertyName != null ? (string)Model.PropertyName : "Text";
var htmlAttributes = new Dictionary<string, object> {
{"class", "text large"}
};
@@ -12,4 +14,4 @@
}
}
@Html.TextBox("Text", (string)Model.Text, htmlAttributes)
@Html.TextBox(propertyName, (string)Model.Text, htmlAttributes)

View File

@@ -1,4 +1,6 @@
@{
var propertyName = Model.PropertyName != null ? (string)Model.PropertyName : "Text";
var htmlAttributes = new Dictionary<string, object> {
{"class", "text small"}
};
@@ -12,4 +14,4 @@
}
}
@Html.TextBox("Text", (string)Model.Text, htmlAttributes)
@Html.TextBox(propertyName, (string)Model.Text, htmlAttributes)

View File

@@ -1,4 +1,6 @@
@{
var propertyName = Model.PropertyName != null ? (string)Model.PropertyName : "Text";
var htmlAttributes = new Dictionary<string, object>();
if (Model.Required == true) {
@@ -14,4 +16,4 @@
}
}
@Html.TextArea("Text", (string)Model.Text, 25, 80, htmlAttributes)
@Html.TextArea(propertyName, (string)Model.Text, 25, 80, htmlAttributes)

View File

@@ -1,4 +1,6 @@
@{
var propertyName = Model.PropertyName != null ? (string)Model.PropertyName : "Text";
var htmlAttributes = new Dictionary<string, object> {
{"class", "text medium"}
};
@@ -12,4 +14,4 @@
}
}
@Html.TextBox("Text", (string)Model.Text, htmlAttributes)
@Html.TextBox(propertyName, (string)Model.Text, htmlAttributes)

View File

@@ -1,5 +1,7 @@
@using Orchard.Utility.Extensions;
@{
var propertyName = Model.PropertyName != null ? (string)Model.PropertyName : "Text";
string editorFlavor = Model.EditorFlavor;
var htmlAttributes = new Dictionary<string, object> {
@@ -19,4 +21,4 @@
}
}
@Html.TextArea("Text", (string)Model.Text, 25, 80, htmlAttributes)
@Html.TextArea(propertyName, (string)Model.Text, 25, 80, htmlAttributes)

View File

@@ -1,6 +1,8 @@
@using Orchard.Environment.Descriptor.Models
@{
var propertyName = Model.PropertyName != null ? (string)Model.PropertyName : "Text";
Script.Require("OrchardMarkdown");
Style.Require("OrchardMarkdown");
@@ -35,7 +37,7 @@
<div class="wmd-innerbox">
<div class="wmd-editor-box">
<div id="wmd-button-bar-@idPostfix" class="wmd-button-bar"></div>
@Html.TextArea("Text", (string)Model.Text, 25, 80, textAreaAttributes)
@Html.TextArea(propertyName, (string)Model.Text, 25, 80, textAreaAttributes)
</div>
<div class="wmd-preview-box">
<div id="wmd-preview-@idPostfix" class="wmd-panel wmd-preview"></div>

View File

@@ -3,6 +3,7 @@
@using Orchard.Localization
@{
var propertyName = Model.PropertyName != null ? (string)Model.PropertyName : "Text";
var shellDescriptor = WorkContext.Resolve<ShellDescriptor>();
}
@@ -11,7 +12,7 @@
var mediaLibraryEnabled = @(shellDescriptor.Features.Any(x => x.Name == "Orchard.MediaLibrary") ? "true" : "false");
var directionality = '@WorkContext.GetTextDirection((IContent)Model.ContentItem)';
var language = '@Model.Language';
var autofocus = "@(Model.AutoFocus == true ? ViewData.TemplateInfo.GetFullHtmlFieldId("Text") : null)";
var autofocus = "@(Model.AutoFocus == true ? ViewData.TemplateInfo.GetFullHtmlFieldId(propertyName) : null)";
</script>
@{
@@ -21,7 +22,7 @@
Style.Require("OrchardTinyMce");
}
@Html.TextArea("Text", (string)Model.Text, 25, 80,
@Html.TextArea(propertyName, (string)Model.Text, 25, 80,
new Dictionary<string,object> {
{"class", "html tinymce"},
{"data-mediapicker-uploadpath",Model.AddMediaPath},