This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class AjaxHelperExtensions | |
{ | |
private static string GetLanguage() | |
{ | |
if (HttpContext.Current == null || HttpContext.Current.Request.RequestContext == null) | |
return null; | |
return RequestContextExtension.GetLanguage(HttpContext.Current.Request.RequestContext); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@model FormViewModel | |
@if (Model.Show) | |
{ | |
System.Web.Mvc.Ajax.AjaxOptions options = new AjaxOptions(); | |
options.HttpMethod = "POST"; | |
options.InsertionMode = InsertionMode.ReplaceWith; | |
options.UpdateTargetId = String.Format("form-{0}", Model.Form.Id); | |
options.Url = Model.ActionUrl; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FormViewModelBuilder : IFormViewModelBuilder | |
{ | |
public FormViewModel Build(XForm form, CultureInfo culture) | |
{ | |
FormViewModel viewModel = new FormViewModel(); | |
viewModel.Form = form; | |
viewModel.Show = form != null; | |
if (form != null) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[TemplateDescriptor( | |
Inherited = true, | |
AvailableWithoutTag = true, | |
Default = true, | |
ModelType = typeof(FormBlockType), | |
TemplateTypeCategory = TemplateTypeCategories.MvcPartialController)] | |
public class FormBlockController : BlockController<FormBlockType> | |
{ | |
private readonly IFormViewModelBuilder _viewModelBuilder; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class FormController : Controller | |
{ | |
private readonly IUnknownActionHandler _xFormActionHandler; | |
private readonly IFormViewModelBuilder _viewModelBuilder; | |
public FormController(IUnknownActionHandler xFormActionHandler, IFormViewModelBuilder viewModelBuilder) | |
{ | |
this._xFormActionHandler = xFormActionHandler; | |
this._viewModelBuilder = viewModelBuilder; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[AdministrationSettings( | |
CodeOnly = true, | |
GroupName = VideoLibraryGroupNames.MediaTypeGroupName)] | |
[ContentType( | |
AvailableInEditMode = false, | |
DisplayName = "Video", | |
GUID = "B5AB3691-E7C7-43FE-9B94-799B836B9D58", | |
GroupName = VideoLibraryGroupNames.MediaTypeGroupName, | |
Order = 20)] | |
public class VideoMediaType : MediaData, IPartial |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define([ | |
"dojo/_base/array", | |
"dojo/_base/connect", | |
"dojo/_base/declare", | |
"dojo/_base/lang", | |
"dijit/_CssStateMixin", | |
"dijit/_Widget", | |
"dijit/_TemplatedMixin", | |
"dijit/_WidgetsInTemplateMixin", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[EditorDescriptorRegistration(TargetType = typeof(DateTime?), UIHint = "UTC")] | |
[EditorDescriptorRegistration(TargetType = typeof(DateTime), UIHint = "UTC")] | |
public class UTCDateTimeEditorDescriptor : DateTimeEditorDescriptor | |
{ | |
public override void ModifyMetadata(ExtendedMetadata metadata, IEnumerable<Attribute> attributes) | |
{ | |
ClientEditingClass = "newsevents.widget.UTCDateTimeTextBox"; | |
base.ModifyMetadata(metadata, attributes); | |
} |