From 2569453a94071bb8910ad258d3aa3965a8f7abfb Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Fri, 21 Oct 2016 12:52:18 +0200 Subject: [PATCH] fix grafici minori, inizio pagina articoli da convertire... --- StockManMVC/Content/Site.css | 3 +++ StockManMVC/Content/Site.less | 4 ++++ StockManMVC/Content/Site.min.css | 2 +- .../Controllers/LocationsController.cs | 2 +- StockManMVC/Views/Items/Index.cshtml | 4 ++++ .../Views/Locations/_ListByType.cshtml | 20 +++++++++++-------- 6 files changed, 25 insertions(+), 10 deletions(-) diff --git a/StockManMVC/Content/Site.css b/StockManMVC/Content/Site.css index bd20d84..2fd9b71 100644 --- a/StockManMVC/Content/Site.css +++ b/StockManMVC/Content/Site.css @@ -53,6 +53,9 @@ textarea { .pagination { margin: 5px 0; } +.pageSelDD { + width: 6em; +} /*------------------------------------------------------------------ [ Shortcuts / .shortcuts ] */ diff --git a/StockManMVC/Content/Site.less b/StockManMVC/Content/Site.less index 83b0116..7cfd747 100644 --- a/StockManMVC/Content/Site.less +++ b/StockManMVC/Content/Site.less @@ -65,6 +65,10 @@ textarea { { margin: 5px 0; } +.pageSelDD +{ + width: 6em; +} /*------------------------------------------------------------------ [ Shortcuts / .shortcuts ] */ diff --git a/StockManMVC/Content/Site.min.css b/StockManMVC/Content/Site.min.css index a07b0a8..2b20bd6 100644 --- a/StockManMVC/Content/Site.min.css +++ b/StockManMVC/Content/Site.min.css @@ -1 +1 @@ -body{padding-top:50px;padding-bottom:20px;}.body-content{padding-left:15px;padding-right:15px;}.dl-horizontal dt{white-space:normal;}input,select,textarea{max-width:280px;}.deleted{text-decoration:line-through;}.padZL{padding-left:.2em;}.padZR{padding-right:.2em;}.padZRL{padding-left:.2em;padding-right:.2em;}.colAlt{color:#c93;}.fontBig{font-size:2em;}.tNote{color:#8a8a8a;font-style:italic;}.tNoWrap{white-space:nowrap;}.navbar{min-height:0;color:#696969;}.pagination{margin:5px 0;}.shortcuts{text-align:center;}.shortcuts .shortcut{min-width:180px;min-height:100px;display:inline-block;padding:13.33333333px 0;margin:0 2px 1em;vertical-align:top;text-decoration:none;background:#f3f3f3;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fff),to(#eee));background-image:-webkit-linear-gradient(top,#fff,0%,#eee,100%);background-image:-moz-linear-gradient(top,#fff 0%,#eee 100%);background-image:linear-gradient(to bottom,#fff 0%,#eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffeeeeee',GradientType=0);border:1px solid #ddd;box-sizing:border-box;border-radius:10px;}.shortcuts .shortcut-sm{min-width:90px;min-height:60px;display:inline-block;padding:5px 0;margin:0 2px 1em;vertical-align:top;text-decoration:none;background:#f3f3f3;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fff),to(#eee));background-image:-webkit-linear-gradient(top,#fff,0%,#eee,100%);background-image:-moz-linear-gradient(top,#fff 0%,#eee 100%);background-image:linear-gradient(to bottom,#fff 0%,#eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffeeeeee',GradientType=0);border:1px solid #ddd;box-sizing:border-box;border-radius:10px;}.shortcuts .shortcut .shortcut-icon{width:100%;margin-top:0;margin-bottom:0;font-size:40px;color:#333;}.shortcuts .shortcut-sm .shortcut-icon{width:100%;margin-top:0;margin-bottom:0;font-size:40px;color:#333;}.shortcuts .shortcut:hover{background:#e8e8e8;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fafafa),to(#e1e1e1));background-image:-webkit-linear-gradient(top,#fafafa,0%,#e1e1e1,100%);background-image:-moz-linear-gradient(top,#fafafa 0%,#e1e1e1 100%);background-image:linear-gradient(to bottom,#fafafa 0%,#e1e1e1 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa',endColorstr='#ffe1e1e1',GradientType=0);}.shortcuts .shortcut-sm:hover{background:#e8e8e8;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fafafa),to(#e1e1e1));background-image:-webkit-linear-gradient(top,#fafafa,0%,#e1e1e1,100%);background-image:-moz-linear-gradient(top,#fafafa 0%,#e1e1e1 100%);background-image:linear-gradient(to bottom,#fafafa 0%,#e1e1e1 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa',endColorstr='#ffe1e1e1',GradientType=0);}.shortcuts .shortcut:active{box-shadow:inset 0 3px 5px rgba(0,0,0,.125);}.shortcuts .shortcut-sm:active{box-shadow:inset 0 3px 5px rgba(0,0,0,.125);}.shortcuts .shortcut:hover .shortcut-icon{color:#c93;}.shortcuts .shortcut-sm:hover .shortcut-icon{color:#666;}.shortcuts .shortcut-label{display:block;margin-top:.75em;font-weight:400;color:#666;} \ No newline at end of file +body{padding-top:50px;padding-bottom:20px;}.body-content{padding-left:15px;padding-right:15px;}.dl-horizontal dt{white-space:normal;}input,select,textarea{max-width:280px;}.deleted{text-decoration:line-through;}.padZL{padding-left:.2em;}.padZR{padding-right:.2em;}.padZRL{padding-left:.2em;padding-right:.2em;}.colAlt{color:#c93;}.fontBig{font-size:2em;}.tNote{color:#8a8a8a;font-style:italic;}.tNoWrap{white-space:nowrap;}.navbar{min-height:0;color:#696969;}.pagination{margin:5px 0;}.pageSelDD{width:6em;}.shortcuts{text-align:center;}.shortcuts .shortcut{min-width:180px;min-height:100px;display:inline-block;padding:13.33333333px 0;margin:0 2px 1em;vertical-align:top;text-decoration:none;background:#f3f3f3;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fff),to(#eee));background-image:-webkit-linear-gradient(top,#fff,0%,#eee,100%);background-image:-moz-linear-gradient(top,#fff 0%,#eee 100%);background-image:linear-gradient(to bottom,#fff 0%,#eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffeeeeee',GradientType=0);border:1px solid #ddd;box-sizing:border-box;border-radius:10px;}.shortcuts .shortcut-sm{min-width:90px;min-height:60px;display:inline-block;padding:5px 0;margin:0 2px 1em;vertical-align:top;text-decoration:none;background:#f3f3f3;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fff),to(#eee));background-image:-webkit-linear-gradient(top,#fff,0%,#eee,100%);background-image:-moz-linear-gradient(top,#fff 0%,#eee 100%);background-image:linear-gradient(to bottom,#fff 0%,#eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffeeeeee',GradientType=0);border:1px solid #ddd;box-sizing:border-box;border-radius:10px;}.shortcuts .shortcut .shortcut-icon{width:100%;margin-top:0;margin-bottom:0;font-size:40px;color:#333;}.shortcuts .shortcut-sm .shortcut-icon{width:100%;margin-top:0;margin-bottom:0;font-size:40px;color:#333;}.shortcuts .shortcut:hover{background:#e8e8e8;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fafafa),to(#e1e1e1));background-image:-webkit-linear-gradient(top,#fafafa,0%,#e1e1e1,100%);background-image:-moz-linear-gradient(top,#fafafa 0%,#e1e1e1 100%);background-image:linear-gradient(to bottom,#fafafa 0%,#e1e1e1 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa',endColorstr='#ffe1e1e1',GradientType=0);}.shortcuts .shortcut-sm:hover{background:#e8e8e8;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fafafa),to(#e1e1e1));background-image:-webkit-linear-gradient(top,#fafafa,0%,#e1e1e1,100%);background-image:-moz-linear-gradient(top,#fafafa 0%,#e1e1e1 100%);background-image:linear-gradient(to bottom,#fafafa 0%,#e1e1e1 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa',endColorstr='#ffe1e1e1',GradientType=0);}.shortcuts .shortcut:active{box-shadow:inset 0 3px 5px rgba(0,0,0,.125);}.shortcuts .shortcut-sm:active{box-shadow:inset 0 3px 5px rgba(0,0,0,.125);}.shortcuts .shortcut:hover .shortcut-icon{color:#c93;}.shortcuts .shortcut-sm:hover .shortcut-icon{color:#666;}.shortcuts .shortcut-label{display:block;margin-top:.75em;font-weight:400;color:#666;} \ No newline at end of file diff --git a/StockManMVC/Controllers/LocationsController.cs b/StockManMVC/Controllers/LocationsController.cs index 040e10f..2e1140e 100644 --- a/StockManMVC/Controllers/LocationsController.cs +++ b/StockManMVC/Controllers/LocationsController.cs @@ -55,7 +55,7 @@ namespace StockManMVC.Controllers ViewBag.LocTypeSortParm = SortOrd == "LocType" ? "LocType_desc" : "LocType"; // gestione selettore dim pagina ViewBag.pageSize = pageSize; - var pageOptions = new[] { "5", "10", "15", "25", "50", "100" }; + var pageOptions = new[] { "5", "10", "25", "50", "100" }; ViewBag.PageSizeDD = new SelectList(pageOptions, pageSize.ToString()); var CurrLocations = db.Location.Where(s => s.ID != ""); if (LocTypeID.ToString() != "") diff --git a/StockManMVC/Views/Items/Index.cshtml b/StockManMVC/Views/Items/Index.cshtml index b99d2ce..c28c145 100644 --- a/StockManMVC/Views/Items/Index.cshtml +++ b/StockManMVC/Views/Items/Index.cshtml @@ -21,6 +21,10 @@
+ @*Nuova pagina!*@ + + + @Html.Partial("_MVCGridToolbar", new StockManMVC.Models.MVCGridToolbarModel() { MVCGridName = "ItemsGrid", diff --git a/StockManMVC/Views/Locations/_ListByType.cshtml b/StockManMVC/Views/Locations/_ListByType.cshtml index 4699d0c..0f74daf 100644 --- a/StockManMVC/Views/Locations/_ListByType.cshtml +++ b/StockManMVC/Views/Locations/_ListByType.cshtml @@ -1,6 +1,6 @@ @model IEnumerable -@using X.PagedList.Mvc; -@using X.PagedList; +@using X.PagedList.Mvc; +@using X.PagedList;
@@ -8,11 +8,11 @@ @*Html.DisplayNameFor(model => model.Descr).ToString(),*@ - @Html.ActionLink("Descrizione", "Index", new { LocTypeID = ViewBag.LocTypeID, SearchVal = ViewBag.SearchVal, SortOrd = ViewBag.DescrSortParm, page = 1, pageSize = ViewBag.pageSize }) + @Html.ActionLink(Html.DisplayNameFor(model => model.Descr).ToString(), "Index", new { LocTypeID = ViewBag.LocTypeID, SearchVal = ViewBag.SearchVal, SortOrd = ViewBag.DescrSortParm, page = 1, pageSize = ViewBag.pageSize }) @*Html.DisplayNameFor(model => model.LocType.Descr).ToString()*@ - @Html.ActionLink("Tipo", "Index", new { LocTypeID = ViewBag.LocTypeID, SearchVal = ViewBag.SearchVal, SortOrd = ViewBag.LocTypeSortParm, page = 1, pageSize = ViewBag.pageSize }) + @Html.ActionLink(Html.DisplayNameFor(model => model.LocType.Descr).ToString(), "Index", new { LocTypeID = ViewBag.LocTypeID, SearchVal = ViewBag.SearchVal, SortOrd = ViewBag.LocTypeSortParm, page = 1, pageSize = ViewBag.pageSize }) @@ -39,14 +39,18 @@
-
- @Html.PagedListPager( (IPagedList)Model, page => Url.Action("Index", new { LocTypeID = ViewBag.LocTypeID, SearchVal = ViewBag.SearchVal, SortOrd = ViewBag.SortOrd, pageSize = ViewBag.pageSize, page })) +
+ @Html.DropDownList("PageSizeDD", null, htmlAttributes: new { @class = "form-control pageSelDD" })
- +