From 01425ac0dac57d496bcbd1e050e87767dc095b73 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Tue, 28 Jun 2011 21:51:30 -0700 Subject: [PATCH 1/2] Removed grid loading overlays. --- NzbDrone.Web/NzbDrone.Web.csproj | 1 - NzbDrone.Web/Scripts/gridLoad.js | 11 -------- NzbDrone.Web/Views/History/Index.cshtml | 6 ----- NzbDrone.Web/Views/Series/Details.cshtml | 16 ------------ NzbDrone.Web/Views/Series/Index.cshtml | 18 +++++-------- NzbDrone.Web/Views/Shared/_Layout.cshtml | 1 - .../Views/System/PendingProcessing.cshtml | 6 ----- NzbDrone.Web/Views/Upcoming/Index.cshtml | 25 +------------------ 8 files changed, 7 insertions(+), 77 deletions(-) delete mode 100644 NzbDrone.Web/Scripts/gridLoad.js diff --git a/NzbDrone.Web/NzbDrone.Web.csproj b/NzbDrone.Web/NzbDrone.Web.csproj index a30124448..1658f4f76 100644 --- a/NzbDrone.Web/NzbDrone.Web.csproj +++ b/NzbDrone.Web/NzbDrone.Web.csproj @@ -578,7 +578,6 @@ - diff --git a/NzbDrone.Web/Scripts/gridLoad.js b/NzbDrone.Web/Scripts/gridLoad.js deleted file mode 100644 index 1fe5c40c5..000000000 --- a/NzbDrone.Web/Scripts/gridLoad.js +++ /dev/null @@ -1,11 +0,0 @@ -function grid_bind(args) { - var id = this.attributes[0].textContent; - var parent = $('#' + id).parent(); - parent.children('.grid-loader').stop().css("top", "0px").fadeIn('slow'); -} - -function grid_bound(args) { - var id = this.attributes[0].textContent; - var parent = $('#' + id).parent(); - $('.grid-container').children('.grid-loader').stop().fadeOut('slow'); -} \ No newline at end of file diff --git a/NzbDrone.Web/Views/History/Index.cshtml b/NzbDrone.Web/Views/History/Index.cshtml index 9e26274a9..360180511 100644 --- a/NzbDrone.Web/Views/History/Index.cshtml +++ b/NzbDrone.Web/Views/History/Index.cshtml @@ -39,12 +39,6 @@ History .Pageable( c => c.PageSize(20).Position(GridPagerPosition.Bottom).Style(GridPagerStyles.NextPrevious)) - .ClientEvents(clientEvents => - { - clientEvents.OnDataBinding("grid_bind"); - clientEvents.OnDataBound("grid_bound"); - }) .Render();} - Loading Loading... } diff --git a/NzbDrone.Web/Views/Series/Details.cshtml b/NzbDrone.Web/Views/Series/Details.cshtml index d2a4552ca..76b412db7 100644 --- a/NzbDrone.Web/Views/Series/Details.cshtml +++ b/NzbDrone.Web/Views/Series/Details.cshtml @@ -68,11 +68,6 @@ "'); return false;\">Rename"); }) .DetailView(detailView => detailView.ClientTemplate("
<#= Overview #>
<#= Path #>
")) - .ClientEvents(clientEvents => - { - clientEvents.OnDataBinding("grid_bind"); - clientEvents.OnDataBound("grid_bound"); - }) .Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.EpisodeNumber).Descending()).Enabled(true)) .Footer(true) .DataBinding( @@ -84,9 +79,6 @@ c.Custom().Text("Rename Season").Action("RenameSeason", "Series", new { seasonId = season }) .ButtonType(GridButtonType.Text)) .Render();} - - Loading - Loading... } @if (Model.Seasons.Any(s => s == 0)) @@ -114,11 +106,6 @@ columns.Bound(c => c.Status).Width(10); }) .DetailView(detailView => detailView.ClientTemplate("
<#= Overview #>
<#= Path #>
")) - .ClientEvents(clientEvents => - { - clientEvents.OnDataBinding("grid_bind"); - clientEvents.OnDataBound("grid_bound"); - }) .Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.EpisodeNumber).Descending()).Enabled(true)) .Footer(true) .DataBinding( @@ -126,9 +113,6 @@ d.Ajax().Select("_AjaxSeasonGrid", "Series", new RouteValueDictionary { { "seriesId", Model.SeriesId }, { "seasonNumber", 0 } } )).Render(); } - - Loading - Loading... } } diff --git a/NzbDrone.Web/Views/Series/Index.cshtml b/NzbDrone.Web/Views/Series/Index.cshtml index 5289c08e2..16b9f4ca8 100644 --- a/NzbDrone.Web/Views/Series/Index.cshtml +++ b/NzbDrone.Web/Views/Series/Index.cshtml @@ -55,12 +55,6 @@ Series .Delete("_DeleteAjaxSeriesEditing", "Series")) .Columns(columns => { - columns.Command(commands => - { - commands.Edit().ButtonType(GridButtonType.Image); - commands.Delete().ButtonType(GridButtonType.Image); - }).Title("Actions").Width(80); - columns.Bound(o => o.Title) .ClientTemplate("" + "" + ""); + columns.Command(commands => + { + commands.Edit().ButtonType(GridButtonType.Image); + commands.Delete().ButtonType(GridButtonType.Image); + }).Title("Actions").Width(80); }) .Editable(editor => editor.Mode(GridEditMode.PopUp)) @@ -85,14 +84,9 @@ Series { clientEvents.OnEdit("grid_edit"); clientEvents.OnSave("grid_save"); - clientEvents.OnDataBinding("grid_bind"); - clientEvents.OnDataBound("grid_bound"); clientEvents.OnRowDataBound("grid_rowBound"); }) .Render();} - - Loading - Loading... } @@ -147,7 +141,7 @@ Series $("#progressbar_" + seriesId).episodeProgress(episodeFileCount, episodeCount); } - + @{Html.RenderPartial(ViewData["viewName"].ToString());} } + +@section Scripts{ + +} \ No newline at end of file diff --git a/NzbDrone.Web/Views/Settings/Indexers.cshtml b/NzbDrone.Web/Views/Settings/Indexers.cshtml index 44aca26e2..d1b58a6dd 100644 --- a/NzbDrone.Web/Views/Settings/Indexers.cshtml +++ b/NzbDrone.Web/Views/Settings/Indexers.cshtml @@ -170,32 +170,4 @@ } -
- - -@section Scripts{ - - -} \ No newline at end of file +
\ No newline at end of file diff --git a/NzbDrone.Web/Views/Settings/Quality.cshtml b/NzbDrone.Web/Views/Settings/Quality.cshtml index 96bb92aa6..7b98e773c 100644 --- a/NzbDrone.Web/Views/Settings/Quality.cshtml +++ b/NzbDrone.Web/Views/Settings/Quality.cshtml @@ -1,5 +1,19 @@ @using NzbDrone.Web.Helpers; @model NzbDrone.Web.Models.QualityModel + +@section HeaderContent{ + +} + +@section TitleContent{ + Settings +} + +@section ActionMenu{ + @{Html.RenderPartial("SubMenu");} +} + +@section MainContent{ @using (Html.BeginForm("SaveQuality", "Settings", FormMethod.Post, new { id = "form", name = "form" })) {
@@ -31,36 +45,19 @@ } -
}
+} + @section Scripts{ + + + } diff --git a/NzbDrone.Web/Views/Settings/Sabnzbd.cshtml b/NzbDrone.Web/Views/Settings/Sabnzbd.cshtml index d637b704c..a0e5a0ec5 100644 --- a/NzbDrone.Web/Views/Settings/Sabnzbd.cshtml +++ b/NzbDrone.Web/Views/Settings/Sabnzbd.cshtml @@ -1,105 +1,82 @@ @using NzbDrone.Web.Helpers; @model NzbDrone.Web.Models.SabnzbdSettingsModel -@using (Html.BeginForm("SaveSabnzbd", "Settings", FormMethod.Post, new { id = "form", name = "form" })) -{ -
- SABnzbd - -
-
-
@Html.LabelFor(m => m.SabHost)
-
@Html.TextBoxFor(m => m.SabHost)
-
-
-
@Html.ValidationMessageFor(m => m.SabHost)
-
@Html.DescriptionFor(m => m.SabHost)
-
-
-
-
-
@Html.LabelFor(m => m.SabPort)
-
@Html.TextBoxFor(m => m.SabPort)
-
-
-
@Html.ValidationMessageFor(m => m.SabPort)
-
@Html.DescriptionFor(m => m.SabPort)
-
-
-
-
-
@Html.LabelFor(m => m.SabApiKey)
-
@Html.TextBoxFor(m => m.SabApiKey)
-
-
-
@Html.ValidationMessageFor(m => m.SabApiKey)
-
@Html.DescriptionFor(m => m.SabApiKey)
-
-
-
-
-
@Html.LabelFor(m => m.SabUsername)
-
@Html.TextBoxFor(m => m.SabUsername)
-
-
-
@Html.ValidationMessageFor(m => m.SabUsername)
-
@Html.DescriptionFor(m => m.SabUsername)
-
-
-
-
-
@Html.LabelFor(m => m.SabPassword)
-
@Html.TextBoxFor(m => m.SabPassword)
-
-
-
@Html.ValidationMessageFor(m => m.SabPassword)
-
@Html.DescriptionFor(m => m.SabPassword)
-
-
-
-
-
@Html.LabelFor(m => m.SabTvCategory)
-
@Html.TextBoxFor(m => m.SabTvCategory)
-
-
-
@Html.ValidationMessageFor(m => m.SabTvCategory)
-
@Html.DescriptionFor(m => m.SabTvCategory)
-
-
-
-
-
@Html.LabelFor(m => m.SabTvPriority)
-
@Html.DropDownListFor(m => m.SabTvPriority, Model.PrioritySelectList)
-
-
-
@Html.ValidationMessageFor(m => m.SabTvPriority)
-
@Html.DescriptionFor(m => m.SabTvPriority)
-
-
-
-
-
@Html.LabelFor(m => m.SabDropDirectory)
-
- @{Html.Telerik().ComboBoxFor(m => m.SabDropDirectory) - .BindTo(Model.SabDropDirectorySelectList) - .DataBinding(binding => binding.Ajax().Select("_autoCompletePath", "Directory").Delay(400).Cache(false)) - .Filterable(f => f.FilterMode(AutoCompleteFilterMode.StartsWith)) - .HighlightFirstMatch(true) - .HtmlAttributes(new { style = "margin-left: -2px; width: 220px;" }) - .Render();} -
-
-
-
@Html.ValidationMessageFor(m => m.SabDropDirectory)
-
@Html.DescriptionFor(m => m.SabDropDirectory)
-
-
- -
+ +@section HeaderContent{ + } -
-
+ +@section TitleContent{ + Settings +} + +@section ActionMenu{ + @{Html.RenderPartial("SubMenu");} +} + +@section MainContent{ +
+ + @using (Html.BeginForm("SaveSabnzbd", "Settings", FormMethod.Post, new { id = "form", name = "form", @class = "settingsForm" })) + { +

SABnzbd

+

+ + + + + + @Html.TextBoxFor(m => m.SabHost) + + + @Html.TextBoxFor(m => m.SabPort) + + + @Html.TextBoxFor(m => m.SabApiKey) + + + @Html.TextBoxFor(m => m.SabUsername) + + + @Html.TextBoxFor(m => m.SabPassword) + + + @Html.TextBoxFor(m => m.SabTvCategory) + + + @Html.DropDownListFor(m => m.SabTvPriority, Model.PrioritySelectList) + + + @Html.TextBoxFor(m => m.SabDropDirectory) + + Loader + } +
+ +
+} + @section Scripts{ + + + } diff --git a/NzbDrone.Web/Views/Settings/Test.cshtml b/NzbDrone.Web/Views/Settings/Test.cshtml index 9349f7ef8..27792a291 100644 --- a/NzbDrone.Web/Views/Settings/Test.cshtml +++ b/NzbDrone.Web/Views/Settings/Test.cshtml @@ -1,136 +1,94 @@ - - - - - -
-
-
- -
-
+
+
+
+

Sign-up form

+

This is the basic look of my form without table

-
-
-
- -
-
+ + - \ No newline at end of file + +
+
+
+
\ No newline at end of file