public MobileListViewItemBase() { HtmlAttributes = new RouteValueDictionary(); Content = new HtmlTemplate(); }
public Grid(ViewContext viewContext, IJavaScriptInitializer initializer, IUrlGenerator urlGenerator, IGridHtmlBuilderFactory htmlBuilderFactory) : base(viewContext, initializer) { this.htmlBuilderFactory = htmlBuilderFactory; UrlGenerator = urlGenerator; PrefixUrlParameters = true; RowTemplate = new HtmlTemplate <T>(); DetailTemplate = new HtmlTemplate <T>(); Columns = new List <GridColumnBase <T> >(); DataKeys = new List <IDataKey>(); Pageable = new PageableSettings(); Sortable = new GridSortableSettings(); Scrollable = new GridScrollableSettings(); Navigatable = new GridNavigatableSettings(this); Filterable = new GridFilterableSettings(); ColumnMenu = new GridColumnMenuSettings(); Editable = new GridEditableSettings <T>(this) { PopUp = new Window(viewContext, Initializer) { Modal = true, Draggable = true } }; Grouping = new GridGroupableSettings(); Resizable = new GridResizableSettings(); Reorderable = new GridReorderableSettings(); TableHtmlAttributes = new RouteValueDictionary(); IsEmpty = true; Selectable = new GridSelectableSettings(); ToolBar = new GridToolBarSettings <T>(this); NoRecordsTemplate = new HtmlTemplate(); ValidationMetadata = new Dictionary <string, object>(); AutoGenerateColumns = true; DataSource = new DataSource() { Type = DataSourceType.Server, ServerAggregates = true, ServerFiltering = true, ServerGrouping = true, ServerPaging = true, ServerSorting = true }; DataSource.ModelType(typeof(T)); }
public Editor(ViewContext viewContext, IJavaScriptInitializer initializer, IUrlGenerator urlGenerator) : base(viewContext, initializer) { UrlGenerator = urlGenerator; DefaultToolGroup = new EditorToolGroup(this); Template = new HtmlTemplate(); Messages = new EditorMessages(); SerializationOptions = new EditorSerializationOptions(); StyleSheets = new List <string>(); new EditorToolFactory(DefaultToolGroup) .Formatting() .Bold().Italic().Underline() .JustifyLeft().JustifyCenter().JustifyRight() .InsertUnorderedList().InsertOrderedList() .Outdent().Indent() .CreateLink().Unlink() .InsertImage() .TableEditing(); TagName = "textarea"; ImageBrowserSettings = new EditorImageBrowserSettings(Messages.ImageBrowserMessages); }
public Editor(ViewContext viewContext, IJavaScriptInitializer initializer, IUrlGenerator urlGenerator) : base(viewContext, initializer) { UrlGenerator = urlGenerator; DefaultToolGroup = new EditorToolGroup(this); Template = new HtmlTemplate(); Messages = new EditorMessages(); StyleSheets = new List <string>(); new EditorToolFactory(DefaultToolGroup) .Bold().Italic().Underline().Strikethrough() .FontName() .FontSize() .FontColor().BackColor() .JustifyLeft().JustifyCenter().JustifyRight().JustifyFull() .InsertUnorderedList().InsertOrderedList() .Outdent().Indent() .FormatBlock() .CreateLink().Unlink() .InsertImage(); ImageBrowserSettings = new EditorImageBrowserSettings(Messages.ImageBrowserMessages); }
public Button(ViewContext viewContext, IJavaScriptInitializer initializer) : base(viewContext, initializer) { Enable = true; Tag = "button"; Template = new HtmlTemplate(); }
protected GridColumnBase(Grid <T> grid) { Grid = grid; Settings = new GridColumnSettings(); Visible = true; HeaderTemplate = new HtmlTemplate(); FooterTemplate = new HtmlTemplate <GridAggregateResult>(); }
public SplitterPane() { Scrollable = true; Resizable = true; HtmlAttributes = new RouteValueDictionary(); Template = new HtmlTemplate(); }
public MobileNavBar(ViewContext viewContext, IJavaScriptInitializer initializer, IUrlGenerator urlGenerator) : base(viewContext, initializer) { this.urlGenerator = urlGenerator; Content = new HtmlTemplate(); //>> Initialization //<< Initialization }
public GridCell(GridColumnBase <T> column, T dataItem) { Column = column; Grid = column.Grid; DataItem = dataItem; Template = new HtmlTemplate <T>(); HtmlAttributes = new Dictionary <string, object>(StringComparer.OrdinalIgnoreCase); HtmlAttributes.Merge(column.HtmlAttributes); }
private Action <object, IHtmlNode> MapDetailTemplate(HtmlTemplate <T> detailTemplate) { return((dataItem, container) => { if (detailTemplate != null && detailTemplate.HasValue()) { detailTemplate.Apply((T)dataItem, container); } }); }
protected NavigationItem() { Template = new HtmlTemplate(); HtmlAttributes = new RouteValueDictionary(); ImageHtmlAttributes = new RouteValueDictionary(); LinkHtmlAttributes = new RouteValueDictionary(); RouteValues = new RouteValueDictionary(); ContentHtmlAttributes = new RouteValueDictionary(); Visible = true; Enabled = true; Encoded = true; }
public MobileLayout(ViewContext viewContext, IJavaScriptInitializer initializer, IUrlGenerator urlGenerator) : base(viewContext, initializer) { this.urlGenerator = urlGenerator; Header = new HtmlTemplate(); Footer = new HtmlTemplate(); HeaderHtmlAttributes = new RouteValueDictionary(); FooterHtmlAttributes = new RouteValueDictionary(); //>> Initialization //<< Initialization }
public MobileModalView(ViewContext viewContext, IJavaScriptInitializer initializer, IUrlGenerator urlGenerator) : base(viewContext, initializer) { this.urlGenerator = urlGenerator; Header = new HtmlTemplate(); Content = new HtmlTemplate(); Footer = new HtmlTemplate(); Modal = true; //>> Initialization //<< Initialization }
public MobileSplitViewPane() { //>> Initialization //<< Initialization HtmlAttributes = new RouteValueDictionary(); Content = new HtmlTemplate(); Events = new Dictionary <string, object>(); }
public MobilePopOver(ViewContext viewContext, IJavaScriptInitializer initializer, IUrlGenerator urlGenerator) : base(viewContext, initializer) { this.urlGenerator = urlGenerator; Content = new HtmlTemplate(); //>> Initialization Pane = new MobilePopOverPaneSettings(); Popup = new MobilePopOverPopupSettings(); //<< Initialization }
/// <summary> /// Initializes a new instance of the <see cref="GridBoundColumn{TModel, TValue}"/> class. /// </summary> /// <param name="grid"></param> /// <param name="expression"></param> public GridBoundColumn(Grid <TModel> grid, Expression <Func <TModel, TValue> > expression) : base(grid) { if (typeof(TModel).IsPlainType() && !expression.IsBindable()) { throw new InvalidOperationException(Exceptions.MemberExpressionRequired); } Expression = expression; Member = expression.MemberWithoutInstance(); MemberType = expression.ToMemberExpression().Type(); Func <TModel, TValue> value; var key = expression.ToString(); using (syncLock.ReadAndWrite()) { if (!expressionCache.TryGetValue(key, out value)) { using (syncLock.Write()) { if (!expressionCache.TryGetValue(key, out value)) { expressionCache[key] = value = expression.Compile(); } } } } Value = value; GroupFooterTemplate = new HtmlTemplate <GridAggregateResult>(); GroupHeaderTemplate = new HtmlTemplate <GridGroupAggregateResult>(); if (typeof(TModel).IsPlainType()) { Metadata = ModelMetadata.FromLambdaExpression(expression, new ViewDataDictionary <TModel>()); MemberType = Metadata.ModelType; Title = Metadata.DisplayName; Format = Metadata.DisplayFormatString; Visible = Metadata.ShowForDisplay; } if (string.IsNullOrEmpty(Title)) { Title = Member.AsTitle(); } FilterableSettings = new GridBoundColumnFilterableSettings(); }
public Window(ViewContext viewContext, IJavaScriptInitializer initializer) : base(viewContext, initializer) { Template = new HtmlTemplate(); ResizingSettings = new WindowResizingSettings(); Actions = new WindowButtons(); defaultButtons.Each(button => Actions.Container.Add(button)); Animation = new PopupAnimation(); ContentHtmlAttributes = new RouteValueDictionary(); Scrollable = true; Visible = true; }
protected virtual IGridDataCellBuilder CreateDisplayBuilderCore(IGridHtmlHelper htmlHelper) { var template = new HtmlTemplate <T>(); if (Template != null) { template.CodeBlockTemplate = Template; } if (InlineTemplate != null) { template.InlineTemplate = InlineTemplate; } var builder = new GridTemplateCellBuilder <T>(template); builder.HtmlAttributes.Merge(HtmlAttributes); return(builder); }
public MobileScrollViewItem() { HtmlAttributes = new RouteValueDictionary(); Content = new HtmlTemplate(); }
public GridToolBarSettings(Grid <T> grid) { Commands = new List <GridActionCommandBase>(); Grid = grid; Template = new HtmlTemplate(); }
public GridDetailTemplate() { Template = new HtmlTemplate <TModel>(); }