Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modified the converter, so that it also convert aspx-imports to razor…
…-usings.
- Loading branch information
1 parent
25bee59
commit 17b56bb
Showing
13 changed files
with
131 additions
and
15 deletions.
There are no files selected for viewing
This file contains 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
3 changes: 2 additions & 1 deletion
3
Telerik.RazorConverter.Tests.Integration/TestCases/TestCase09.cshtml
This file contains 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
42 changes: 42 additions & 0 deletions
42
Telerik.RazorConverter.Tests.Integration/TestCases/TestCase25.aspx.txt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<IEnumerable<OrderDto>>" %> | ||
<%@ Import Namespace="Project.Namespace.To.Models" %> | ||
|
||
<asp:content contentplaceholderid="maincontent" runat="server"> | ||
<% using (Html.Configurator("The grid should...") | ||
.PostTo("FirstLook", "Grid") | ||
.Begin()) | ||
{ %> | ||
<ul> | ||
<li><%= Html.CheckBox("ajax", true, "make <strong>AJAX</strong> requests")%></li> | ||
<li><%= Html.CheckBox("grouping", true, "allow <strong>grouping</strong> of data")%></li> | ||
<li><%= Html.CheckBox("filtering", true, "allow <strong>filtering</strong> of data")%></li> | ||
<li><%= Html.CheckBox("paging", true, "have <strong>pages</strong> with 10 items")%></li> | ||
<li><%= Html.CheckBox("scrolling", true, "show a <strong>scrollbar</strong> when there are many items")%></li> | ||
<li><%= Html.CheckBox("sorting", true, "allow <strong>sorting</strong> of data")%></li> | ||
<li><%= Html.CheckBox("showFooter", true, "show footer")%></li> | ||
</ul> | ||
<button class="t-button t-state-default" type="submit">Apply</button> | ||
<% } %> | ||
|
||
<%= Html.Telerik().Grid(Model) | ||
.Name("Grid") | ||
.Columns(columns => | ||
{ | ||
columns.Bound(o => o.OrderID).Width(100); | ||
columns.Bound(o => o.ContactName).Width(200); | ||
columns.Bound(o => o.ShipAddress); | ||
columns.Bound(o => o.OrderDate).Format("{0:MM/dd/yyyy}").Width(120); | ||
}) | ||
.DataBinding(dataBinding => | ||
{ | ||
dataBinding.Server().Select("FirstLook", "Grid", new { ajax = ViewData["ajax"] }); | ||
dataBinding.Ajax().Select("_FirstLook", "Grid").Enabled((bool)ViewData["ajax"]); | ||
}) | ||
.Scrollable(scrolling => scrolling.Enabled((bool)ViewData["scrolling"])) | ||
.Sortable(sorting => sorting.Enabled((bool)ViewData["sorting"])) | ||
.Pageable(paging => paging.Enabled((bool)ViewData["paging"])) | ||
.Filterable(filtering => filtering.Enabled((bool)ViewData["filtering"])) | ||
.Groupable(grouping => grouping.Enabled((bool)ViewData["grouping"])) | ||
.Footer((bool)ViewData["showFooter"]) | ||
%> | ||
</asp:content> |
38 changes: 38 additions & 0 deletions
38
Telerik.RazorConverter.Tests.Integration/TestCases/TestCase25.cshtml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
@model IEnumerable<OrderDto> | ||
@using Project.Namespace.To.Models | ||
@using (Html.Configurator("The grid should...") | ||
.PostTo("FirstLook", "Grid") | ||
.Begin()) | ||
{ | ||
<ul> | ||
<li>@Html.CheckBox("ajax", true, "make <strong>AJAX</strong> requests")</li> | ||
<li>@Html.CheckBox("grouping", true, "allow <strong>grouping</strong> of data")</li> | ||
<li>@Html.CheckBox("filtering", true, "allow <strong>filtering</strong> of data")</li> | ||
<li>@Html.CheckBox("paging", true, "have <strong>pages</strong> with 10 items")</li> | ||
<li>@Html.CheckBox("scrolling", true, "show a <strong>scrollbar</strong> when there are many items")</li> | ||
<li>@Html.CheckBox("sorting", true, "allow <strong>sorting</strong> of data")</li> | ||
<li>@Html.CheckBox("showFooter", true, "show footer")</li> | ||
</ul> | ||
<button class="t-button t-state-default" type="submit">Apply</button> | ||
} | ||
@(Html.Telerik().Grid(Model) | ||
.Name("Grid") | ||
.Columns(columns => | ||
{ | ||
columns.Bound(o => o.OrderID).Width(100); | ||
columns.Bound(o => o.ContactName).Width(200); | ||
columns.Bound(o => o.ShipAddress); | ||
columns.Bound(o => o.OrderDate).Format("{0:MM/dd/yyyy}").Width(120); | ||
}) | ||
.DataBinding(dataBinding => | ||
{ | ||
dataBinding.Server().Select("FirstLook", "Grid", new { ajax = ViewData["ajax"] }); | ||
dataBinding.Ajax().Select("_FirstLook", "Grid").Enabled((bool)ViewData["ajax"]); | ||
}) | ||
.Scrollable(scrolling => scrolling.Enabled((bool)ViewData["scrolling"])) | ||
.Sortable(sorting => sorting.Enabled((bool)ViewData["sorting"])) | ||
.Pageable(paging => paging.Enabled((bool)ViewData["paging"])) | ||
.Filterable(filtering => filtering.Enabled((bool)ViewData["filtering"])) | ||
.Groupable(grouping => grouping.Enabled((bool)ViewData["grouping"])) | ||
.Footer((bool)ViewData["showFooter"]) | ||
) |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ public enum DirectiveType | |
{ | ||
Page, | ||
Control, | ||
Import, | ||
Unknown | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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