1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2024-12-23 16:26:02 +00:00

Added Scripts section to SiteLayout.

History view RAZORed.
This commit is contained in:
Mark McDowall 2011-04-20 21:20:39 -07:00
parent 3e28862e14
commit 273ab14a78
2 changed files with 23 additions and 23 deletions

View file

@ -1,7 +1,7 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<List<NzbDrone.Web.Models.HistoryModel>>" %> @model List<NzbDrone.Web.Models.HistoryModel>
<%@ Import Namespace="NzbDrone.Web.Models" %> @using NzbDrone.Web.Models
<asp:Content ID="Content1" ContentPlaceHolderID="Scripts" runat="server"> @section Scripts{
<script type="text/javascript"> <script type="text/javascript">
function onRowDataBound(e) { function onRowDataBound(e) {
@ -20,24 +20,22 @@
//e.row.style.color = 'blue'; //e.row.style.color = 'blue';
} }
</script> </script>
</asp:Content> }
<asp:Content ID="Content2" ContentPlaceHolderID="TitleContent" runat="server">
@section TitleContent{
History History
</asp:Content> }
<asp:Content ID="Menu" ContentPlaceHolderID="ActionMenu" runat="server">
<% @section ActionMenu{
Html.Telerik().Menu().Name("historyMenu").Items(items => @{Html.Telerik().Menu().Name("historyMenu").Items(items =>
{ {
items.Add().Text("Trim History").Action("Trim", items.Add().Text("Trim History").Action("Trim", "History");
"History"); items.Add().Text("Purge History").Action("Purge", "History");
items.Add().Text("Purge History").Action("Purge", }).Render();}
"History"); }
}).Render();
%> @section MainContent{
</asp:Content> @{Html.Telerik().Grid<HistoryModel>().Name("history")
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
<%
Html.Telerik().Grid<HistoryModel>().Name("history")
.Columns(columns => .Columns(columns =>
{ {
columns.Bound(c => c.SeriesTitle).Title("Series Name").Width(120); columns.Bound(c => c.SeriesTitle).Title("Series Name").Width(120);
@ -61,6 +59,5 @@
c.PageSize(50).Position(GridPagerPosition.Bottom).Style(GridPagerStyles.NextPrevious)) c.PageSize(50).Position(GridPagerPosition.Bottom).Style(GridPagerStyles.NextPrevious))
//.Filterable() //.Filterable()
//.ClientEvents(c => c.OnRowDataBound("onRowDataBound")) //.ClientEvents(c => c.OnRowDataBound("onRowDataBound"))
.Render(); .Render();}
%> }
</asp:Content>

View file

@ -47,6 +47,9 @@
</div> </div>
</div> </div>
</body> </body>
@RenderSection("Scripts", required: false)
@{Html.Telerik().ScriptRegistrar().Scripts( @{Html.Telerik().ScriptRegistrar().Scripts(
c => c.Add("jquery-ui-1.8.8.min.js") c => c.Add("jquery-ui-1.8.8.min.js")
.Add("jquery.form.js") .Add("jquery.form.js")