From ce6feec4849bad88e05b325da4c50ffe35ff9f09 Mon Sep 17 00:00:00 2001 From: Gustau Navarro Date: Sun, 21 Nov 2021 20:57:38 +0100 Subject: [PATCH] New location for ChangePageSize (https://github.com/gustavnavar/Grid.Blazor/issues/318) --- GridBlazor/Pages/GridComponent.razor | 10 -- GridBlazor/Pages/GridComponent.razor.cs | 20 ++-- GridBlazor/Pages/GridPagerComponent.razor | 111 +++++++++++-------- GridBlazor/Pages/GridPagerComponent.razor.cs | 21 ++++ GridBlazor/Resources/Strings.Designer.cs | 13 ++- GridBlazor/Resources/Strings.bg.resx | 3 + GridBlazor/Resources/Strings.ca-ES.resx | 3 + GridBlazor/Resources/Strings.cs.resx | 3 + GridBlazor/Resources/Strings.de.resx | 3 + GridBlazor/Resources/Strings.es.resx | 3 + GridBlazor/Resources/Strings.eu-ES.resx | 3 + GridBlazor/Resources/Strings.fa-IR.resx | 3 + GridBlazor/Resources/Strings.fr.resx | 3 + GridBlazor/Resources/Strings.gl-ES.resx | 3 + GridBlazor/Resources/Strings.hr.resx | 3 + GridBlazor/Resources/Strings.it.resx | 3 + GridBlazor/Resources/Strings.nb-NO.resx | 3 + GridBlazor/Resources/Strings.nl.resx | 3 + GridBlazor/Resources/Strings.pt-BR.resx | 3 + GridBlazor/Resources/Strings.resx | 3 + GridBlazor/Resources/Strings.ru.resx | 3 + GridBlazor/Resources/Strings.se.resx | 3 + GridBlazor/Resources/Strings.sl.resx | 3 + GridBlazor/Resources/Strings.sr-Cyrl-BA.resx | 3 + GridBlazor/Resources/Strings.sr-Cyrl-RS.resx | 3 + GridBlazor/Resources/Strings.sr-Latn-BA.resx | 3 + GridBlazor/Resources/Strings.sr-Latn-RS.resx | 3 + GridBlazor/Resources/Strings.tr.resx | 3 + GridBlazor/Resources/Strings.uk.resx | 3 + GridBlazor/wwwroot/css/gridblazor.css | 43 +++---- GridBlazor/wwwroot/css/gridblazor.min.css | 2 +- GridCore/GridCore.csproj.user | 5 + GridCore/Resources/Strings.Designer.cs | 11 +- GridCore/Resources/Strings.bg.resx | 3 + GridCore/Resources/Strings.ca-ES.resx | 3 + GridCore/Resources/Strings.cs.resx | 3 + GridCore/Resources/Strings.de.resx | 3 + GridCore/Resources/Strings.es.resx | 3 + GridCore/Resources/Strings.eu-ES.resx | 3 + GridCore/Resources/Strings.fa-IR.resx | 3 + GridCore/Resources/Strings.fr.resx | 3 + GridCore/Resources/Strings.gl-ES.resx | 3 + GridCore/Resources/Strings.hr.resx | 3 + GridCore/Resources/Strings.it.resx | 3 + GridCore/Resources/Strings.nb-NO.resx | 3 + GridCore/Resources/Strings.nl.resx | 3 + GridCore/Resources/Strings.pt-BR.resx | 3 + GridCore/Resources/Strings.resx | 3 + GridCore/Resources/Strings.ru.resx | 3 + GridCore/Resources/Strings.se.resx | 3 + GridCore/Resources/Strings.sl.resx | 3 + GridCore/Resources/Strings.sr.resx | 3 + GridCore/Resources/Strings.tr.resx | 3 + GridCore/Resources/Strings.uk.resx | 3 + GridMvc/Resources/css/gridmvc.css | 16 +-- GridMvc/Resources/css/gridmvc.min.css | 2 +- GridMvc/Resources/js/gridmvc-ajax.js | 23 +++- GridMvc/Resources/js/gridmvc-ajax.min.js | 2 +- GridMvc/Resources/js/gridmvc.js | 57 +++++++++- GridMvc/Resources/js/gridmvc.min.js | 2 +- GridMvc/Views/Shared/_AjaxGridPager.cshtml | 99 +++++++++++------ GridMvc/Views/Shared/_Grid.cshtml | 20 ++-- GridMvc/Views/Shared/_GridPager.cshtml | 99 +++++++++++------ 63 files changed, 498 insertions(+), 193 deletions(-) diff --git a/GridBlazor/Pages/GridComponent.razor b/GridBlazor/Pages/GridComponent.razor index 5816900a..f381bf04 100644 --- a/GridBlazor/Pages/GridComponent.razor +++ b/GridBlazor/Pages/GridComponent.razor @@ -169,16 +169,6 @@ } } - @if (Grid.EnablePaging && Grid.Pager.ChangePageSize) - { -
- -
- -
- -
- } @if (Grid.SearchingEnabled) { diff --git a/GridBlazor/Pages/GridComponent.razor.cs b/GridBlazor/Pages/GridComponent.razor.cs index 179b9893..8c309071 100644 --- a/GridBlazor/Pages/GridComponent.razor.cs +++ b/GridBlazor/Pages/GridComponent.razor.cs @@ -31,8 +31,8 @@ public partial class GridComponent internal bool RequiredTotalsColumn = false; private string gridTableHead = Guid.NewGuid().ToString("N"); private string gridTableBody = Guid.NewGuid().ToString("N"); - protected string _changePageSizeUrl; - protected int _pageSize; + internal string ChangePageSizeUrl; + internal int PageSize; internal bool[] IsSubGridVisible; internal bool[] InitSubGrid; protected IQueryDictionary _filterComponents; @@ -103,7 +103,7 @@ public partial class GridComponent public QueryDictionary> HeaderComponents { get; private set; } - public ElementReference PageSizeInput { get; private set; } + public ElementReference PageSizeInput { get; internal set; } public GridSearchComponent SearchComponent { get; private set; } @@ -253,8 +253,8 @@ protected override void OnParametersSet() var queryBuilder = new CustomQueryStringBuilder(Grid.Settings.SearchSettings.Query); var exceptQueryParameters = new List { GridPager.DefaultPageSizeQueryParameter }; - _changePageSizeUrl = queryBuilder.GetQueryStringExcept(exceptQueryParameters); - _pageSize = Grid.Pager.ChangePageSize && Grid.Pager.QueryPageSize > 0 ? Grid.Pager.QueryPageSize : Grid.Pager.PageSize; + ChangePageSizeUrl = queryBuilder.GetQueryStringExcept(exceptQueryParameters); + PageSize = Grid.Pager.ChangePageSize && Grid.Pager.QueryPageSize > 0 ? Grid.Pager.QueryPageSize : Grid.Pager.PageSize; _shouldRender = true; } @@ -1445,16 +1445,16 @@ public async Task InputPageSizeKeyup(KeyboardEventArgs e) public async Task InputPageSizeBlur() { - if (_pageSize > 0) + if (PageSize > 0) { - Grid.Pager.PageSize = _pageSize; - Grid.AddQueryParameter(GridPager.DefaultPageSizeQueryParameter, _pageSize.ToString()); + Grid.Pager.PageSize = PageSize; + Grid.AddQueryParameter(GridPager.DefaultPageSizeQueryParameter, PageSize.ToString()); await UpdateGrid(); await OnPagerChanged(); } else { - _pageSize = Grid.Pager.PageSize; + PageSize = Grid.Pager.PageSize; _shouldRender = true; StateHasChanged(); } @@ -1464,7 +1464,7 @@ public async Task ChangePageSize(int pageSize) { if (pageSize > 0) { - _pageSize = pageSize; + PageSize = pageSize; Grid.Pager.PageSize = pageSize; Grid.AddQueryParameter(GridPager.DefaultPageSizeQueryParameter, pageSize.ToString()); await UpdateGrid(); diff --git a/GridBlazor/Pages/GridPagerComponent.razor b/GridBlazor/Pages/GridPagerComponent.razor index acd7be62..5665864c 100644 --- a/GridBlazor/Pages/GridPagerComponent.razor +++ b/GridBlazor/Pages/GridPagerComponent.razor @@ -1,61 +1,82 @@ -@typeparam T +@using GridBlazor.Resources +@typeparam T -@if (GridPager != null && GridPager.PageCount > 1) -{ - + +
+ +
+ +
+
+ } + + @if (GridComponent.Grid.EnablePaging && GridComponent.Grid.Pager.ChangePageSize) + { +
+ +
+ +
+ +
+ } + diff --git a/GridBlazor/Pages/GridPagerComponent.razor.cs b/GridBlazor/Pages/GridPagerComponent.razor.cs index 9b17c05a..288b5232 100644 --- a/GridBlazor/Pages/GridPagerComponent.razor.cs +++ b/GridBlazor/Pages/GridPagerComponent.razor.cs @@ -1,20 +1,41 @@ using GridBlazor.Pagination; using Microsoft.AspNetCore.Components; +using Microsoft.AspNetCore.Components.Web; using System.Threading.Tasks; namespace GridBlazor.Pages { public partial class GridPagerComponent { + private int _currentPage; + [CascadingParameter (Name = "GridComponent")] private GridComponent GridComponent { get; set; } [Parameter] public GridPager GridPager { get; set; } + protected override void OnParametersSet() + { + _currentPage = GridPager.CurrentPage; + } + protected async Task PagerButtonClicked(int page) { await GridComponent.GoTo(page); } + + public async Task GoToKeyup(KeyboardEventArgs e) + { + if (e.Key == "Enter") + { + await GoToBlur(); + } + } + + public async Task GoToBlur() + { + await GridComponent.GoTo(_currentPage); + } } } diff --git a/GridBlazor/Resources/Strings.Designer.cs b/GridBlazor/Resources/Strings.Designer.cs index 998c185d..cec16d99 100644 --- a/GridBlazor/Resources/Strings.Designer.cs +++ b/GridBlazor/Resources/Strings.Designer.cs @@ -19,13 +19,13 @@ namespace GridBlazor.Resources { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] public class Strings { private static global::System.Resources.ResourceManager resourceMan; - + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal Strings() { } @@ -296,6 +296,15 @@ public static string FilterValueLabel { } } + /// + /// Looks up a localized string similar to Go to. + /// + public static string Goto { + get { + return ResourceManager.GetString("Goto", System.Globalization.CultureInfo.CurrentCulture); + } + } + /// /// Looks up a localized string similar to Greater than. /// diff --git a/GridBlazor/Resources/Strings.bg.resx b/GridBlazor/Resources/Strings.bg.resx index f1cbde47..d6ee93ff 100644 --- a/GridBlazor/Resources/Strings.bg.resx +++ b/GridBlazor/Resources/Strings.bg.resx @@ -279,4 +279,7 @@ Кода и кода за потвърждение трябва да са равни за да изтриете успешно + + Отидете на + \ No newline at end of file diff --git a/GridBlazor/Resources/Strings.ca-ES.resx b/GridBlazor/Resources/Strings.ca-ES.resx index 5c97d471..afb59523 100644 --- a/GridBlazor/Resources/Strings.ca-ES.resx +++ b/GridBlazor/Resources/Strings.ca-ES.resx @@ -279,4 +279,7 @@ El codi i el codi de confirmació han de ser els mateixos per eliminar aquest element + + Anar a + \ No newline at end of file diff --git a/GridBlazor/Resources/Strings.cs.resx b/GridBlazor/Resources/Strings.cs.resx index b39504e0..67bed742 100644 --- a/GridBlazor/Resources/Strings.cs.resx +++ b/GridBlazor/Resources/Strings.cs.resx @@ -279,4 +279,7 @@ Kód a potvrzovací kód se musí rovnat odstranění této položky. + + Jít do + \ No newline at end of file diff --git a/GridBlazor/Resources/Strings.de.resx b/GridBlazor/Resources/Strings.de.resx index a755793a..84122c37 100644 --- a/GridBlazor/Resources/Strings.de.resx +++ b/GridBlazor/Resources/Strings.de.resx @@ -279,4 +279,7 @@ Code und Bestätigungscode müssen gleich sein, um dieses Element zu löschen + + Gehe zu + \ No newline at end of file diff --git a/GridBlazor/Resources/Strings.es.resx b/GridBlazor/Resources/Strings.es.resx index 657e185c..b1fd0157 100644 --- a/GridBlazor/Resources/Strings.es.resx +++ b/GridBlazor/Resources/Strings.es.resx @@ -279,4 +279,7 @@ El código y el código de confirmación deben ser iguales para eliminar este elemento + + Ir a + \ No newline at end of file diff --git a/GridBlazor/Resources/Strings.eu-ES.resx b/GridBlazor/Resources/Strings.eu-ES.resx index 9624c0a0..0cfc6ca0 100644 --- a/GridBlazor/Resources/Strings.eu-ES.resx +++ b/GridBlazor/Resources/Strings.eu-ES.resx @@ -279,4 +279,7 @@ Kodeak eta berrespen-kodeak berdinak izan behar dute elementu hau kentzeko + + Joan + \ No newline at end of file diff --git a/GridBlazor/Resources/Strings.fa-IR.resx b/GridBlazor/Resources/Strings.fa-IR.resx index 65ce9830..a72b1e04 100644 --- a/GridBlazor/Resources/Strings.fa-IR.resx +++ b/GridBlazor/Resources/Strings.fa-IR.resx @@ -279,4 +279,7 @@ کد و کد تایید باید برابر با حذف این مورد باشد + + برو به + \ No newline at end of file diff --git a/GridBlazor/Resources/Strings.fr.resx b/GridBlazor/Resources/Strings.fr.resx index 464b596f..59eb9006 100644 --- a/GridBlazor/Resources/Strings.fr.resx +++ b/GridBlazor/Resources/Strings.fr.resx @@ -279,4 +279,7 @@ Le code et le code de confirmation doivent être égaux pour supprimer cet élément + + Aller à + \ No newline at end of file diff --git a/GridBlazor/Resources/Strings.gl-ES.resx b/GridBlazor/Resources/Strings.gl-ES.resx index c89bde50..7c51f879 100644 --- a/GridBlazor/Resources/Strings.gl-ES.resx +++ b/GridBlazor/Resources/Strings.gl-ES.resx @@ -279,4 +279,7 @@ O código e o código de confirmación deben ser os mesmos para eliminar este elemento + + Ir a + \ No newline at end of file diff --git a/GridBlazor/Resources/Strings.hr.resx b/GridBlazor/Resources/Strings.hr.resx index d9e68c82..8f65d245 100644 --- a/GridBlazor/Resources/Strings.hr.resx +++ b/GridBlazor/Resources/Strings.hr.resx @@ -279,4 +279,7 @@ Šifra i kôd potvrde moraju biti jednaki za brisanje ove stavke + + Menj + \ No newline at end of file diff --git a/GridBlazor/Resources/Strings.it.resx b/GridBlazor/Resources/Strings.it.resx index 2179dc5c..821966ac 100644 --- a/GridBlazor/Resources/Strings.it.resx +++ b/GridBlazor/Resources/Strings.it.resx @@ -279,4 +279,7 @@ Il codice e il codice di conferma devono essere uguali per eliminare questo elemento + + Vai a + \ No newline at end of file diff --git a/GridBlazor/Resources/Strings.nb-NO.resx b/GridBlazor/Resources/Strings.nb-NO.resx index f7c2dc50..d134398a 100644 --- a/GridBlazor/Resources/Strings.nb-NO.resx +++ b/GridBlazor/Resources/Strings.nb-NO.resx @@ -279,4 +279,7 @@ Kode og bekreftelseskode må være lik for å slette dette elementet + + Gå til + \ No newline at end of file diff --git a/GridBlazor/Resources/Strings.nl.resx b/GridBlazor/Resources/Strings.nl.resx index e5fca8f1..75c8b2b4 100644 --- a/GridBlazor/Resources/Strings.nl.resx +++ b/GridBlazor/Resources/Strings.nl.resx @@ -279,4 +279,7 @@ Code en bevestigingscode moeten gelijk zijn om dit item te verwijderen + + Ga naar + \ No newline at end of file diff --git a/GridBlazor/Resources/Strings.pt-BR.resx b/GridBlazor/Resources/Strings.pt-BR.resx index 3c5c0661..a28080da 100644 --- a/GridBlazor/Resources/Strings.pt-BR.resx +++ b/GridBlazor/Resources/Strings.pt-BR.resx @@ -279,4 +279,7 @@ O código e o código de confirmação devem ser iguais para que o item possa ser excluído + + Vamos para + \ No newline at end of file diff --git a/GridBlazor/Resources/Strings.resx b/GridBlazor/Resources/Strings.resx index 56f7826f..e59c3835 100644 --- a/GridBlazor/Resources/Strings.resx +++ b/GridBlazor/Resources/Strings.resx @@ -279,4 +279,7 @@ Code and confirmation code must be equal to delete this item + + Go to + \ No newline at end of file diff --git a/GridBlazor/Resources/Strings.ru.resx b/GridBlazor/Resources/Strings.ru.resx index 6f287fd2..4115be67 100644 --- a/GridBlazor/Resources/Strings.ru.resx +++ b/GridBlazor/Resources/Strings.ru.resx @@ -279,4 +279,7 @@ Код кода и код подтверждения должны быть равны для удаления этого элемента + + Перейти к + \ No newline at end of file diff --git a/GridBlazor/Resources/Strings.se.resx b/GridBlazor/Resources/Strings.se.resx index 4c539d5d..a832af70 100644 --- a/GridBlazor/Resources/Strings.se.resx +++ b/GridBlazor/Resources/Strings.se.resx @@ -201,6 +201,9 @@ Värde + + Gå till + Större än diff --git a/GridBlazor/Resources/Strings.sl.resx b/GridBlazor/Resources/Strings.sl.resx index 4389f961..7f6d2c19 100644 --- a/GridBlazor/Resources/Strings.sl.resx +++ b/GridBlazor/Resources/Strings.sl.resx @@ -270,4 +270,7 @@ Koda in potrditvena koda morata biti enaki za brisanje tega artikla + + Pojdi do + \ No newline at end of file diff --git a/GridBlazor/Resources/Strings.sr-Cyrl-BA.resx b/GridBlazor/Resources/Strings.sr-Cyrl-BA.resx index fd3f0e0c..cd2b2acf 100644 --- a/GridBlazor/Resources/Strings.sr-Cyrl-BA.resx +++ b/GridBlazor/Resources/Strings.sr-Cyrl-BA.resx @@ -279,4 +279,7 @@ Шифра и шифра потврде морају бити једнаке за брисање овог артикла + + Иди на + \ No newline at end of file diff --git a/GridBlazor/Resources/Strings.sr-Cyrl-RS.resx b/GridBlazor/Resources/Strings.sr-Cyrl-RS.resx index 8fcca180..d4346ee9 100644 --- a/GridBlazor/Resources/Strings.sr-Cyrl-RS.resx +++ b/GridBlazor/Resources/Strings.sr-Cyrl-RS.resx @@ -279,4 +279,7 @@ Шифра и шифра потврде морају бити једнаке за брисање овог артикла + + Иди на + \ No newline at end of file diff --git a/GridBlazor/Resources/Strings.sr-Latn-BA.resx b/GridBlazor/Resources/Strings.sr-Latn-BA.resx index 44794a5d..cbb72f7a 100644 --- a/GridBlazor/Resources/Strings.sr-Latn-BA.resx +++ b/GridBlazor/Resources/Strings.sr-Latn-BA.resx @@ -279,4 +279,7 @@ Šifra i šifra potvrde moraju biti jednake za brisanje ovog artikla + + Pođi do + \ No newline at end of file diff --git a/GridBlazor/Resources/Strings.sr-Latn-RS.resx b/GridBlazor/Resources/Strings.sr-Latn-RS.resx index e6483afc..a47eb4f3 100644 --- a/GridBlazor/Resources/Strings.sr-Latn-RS.resx +++ b/GridBlazor/Resources/Strings.sr-Latn-RS.resx @@ -303,4 +303,7 @@ Prazno Šifra i šifra potvrde moraju biti jednake za brisanje ovog artikla + + Pođi do + \ No newline at end of file diff --git a/GridBlazor/Resources/Strings.tr.resx b/GridBlazor/Resources/Strings.tr.resx index c18722c4..09c54d34 100644 --- a/GridBlazor/Resources/Strings.tr.resx +++ b/GridBlazor/Resources/Strings.tr.resx @@ -282,4 +282,7 @@ Kod ve onay kodu bu öğeyi silmek için eşit olmalıdır + + Git + \ No newline at end of file diff --git a/GridBlazor/Resources/Strings.uk.resx b/GridBlazor/Resources/Strings.uk.resx index 1d88df7c..7423e8c2 100644 --- a/GridBlazor/Resources/Strings.uk.resx +++ b/GridBlazor/Resources/Strings.uk.resx @@ -279,4 +279,7 @@ Код і код підтвердження повинні бути однаковими, щоб видалити цей елемент + + Йти до + \ No newline at end of file diff --git a/GridBlazor/wwwroot/css/gridblazor.css b/GridBlazor/wwwroot/css/gridblazor.css index d7263353..3e8596ae 100644 --- a/GridBlazor/wwwroot/css/gridblazor.css +++ b/GridBlazor/wwwroot/css/gridblazor.css @@ -20,18 +20,9 @@ table.grid-table { margin: 0; } table.grid-table .grid-header > .grid-header-group > .grid-header-title > button:focus { outline: 0; } /* Grid header drag over */ - table.grid-table .grid-header.grid-header-drag-over { - border: 1px solid lightblue; - border-radius: 16px; - } - - table.grid-table .grid-header.grid-header-drag-over * { - pointer-events: none; - } - - table.grid-table .grid-header > .grid-header-group .grid-column-rearrange-insert-placeholder { - margin-left: -12px; - } + table.grid-table .grid-header.grid-header-drag-over { border: 1px solid lightblue; border-radius: 16px; } + table.grid-table .grid-header.grid-header-drag-over * { pointer-events: none; } + table.grid-table .grid-header > .grid-header-group .grid-column-rearrange-insert-placeholder { margin-left: -12px; } /* Grid body */ table.grid-table tr.grid-row-selected td { background: #4888C2 !important; color: white; } @@ -80,10 +71,10 @@ div[dir="rtl"] .grid-dropdown-arrow { left: 255px; } div[dir="rtl"] .grid-dropdown input.grid-filter-list { margin: 5px 20px 5px 10px; } /*Grid footer*/ -.grid-footer { display: inline-flex; width: 100%; justify-content: space-between; } -.grid-itemscount { display: inline-flex; margin-top: 10px; } +.grid-footer { display: inline-flex; width: 100%; margin-top: 10px; justify-content: space-between; } +.grid-itemscount { display: inline-flex; margin-top: 6px; } .grid-itemscount-label, .grid-itemscount-caption { margin-left: 5px; margin-right: 5px; } -.grid-pager { margin-top: 20px; } +.grid-pager-sizer { display: inline-flex; } .grid-pager ul { padding: 0; } .page-link:focus { box-shadow: none; } .page-item:first-child .page-link { border-radius: 4px 0 0 4px; } @@ -119,9 +110,11 @@ div[dir="rtl"] button.grid-search-clear { border-radius: 4px 0 0 4px;} input.grid-search-input {height: 34px; border-color: #ccc; } /* Grid change page size */ -.grid-change-page-size { display:inline-flex; width: 250px; margin: 10px 20px; } -.grid-change-page-size label { margin: 6px 10px; } -.grid-change-page-size-input { display:inline; width: 60px; margin-left:5px; margin-right:5px; } +.grid-change-page-size, .grid-goto-page { display:inline-flex; margin: 0px 20px; } +.grid-change-page-size { width: 250px; } +.grid-goto-page { width: 150px; } +.grid-change-page-size label, .grid-goto-page label { margin: 6px 10px; } +.grid-change-page-size-input, .grid-goto-page-input { display:inline; width: 60px; margin-left:5px; margin-right:5px; } /* Grid extended sorting */ .grid-extsort-droppable { height: 42px; width: 100%; margin-bottom:10px; border: 1px solid #ccc; border-radius: 4px; } @@ -215,20 +208,10 @@ div[dir="rtl"] button.grid-button-component { margin-left: 5px; margin-right: 0; .grid-header-checkbox-input { opacity: 0; } .grid-header-checkbox-input ~ .null-checkbox::before { position: absolute; top: 1rem; display: block; width: .9rem; height: .9rem; pointer-events: none; content: ""; border: 0.5px solid #666; border-radius: 3px; background-color: #ccc; } -div[dir="rtl"] label { - display: flex; -} +div[dir="rtl"] label { display: flex; } /* The switch - the box around the slider */ -.grid-switch { - position: relative; - display: inline-block; - width: 50px; - height: 24px; - margin-left: 16px; - margin-right: 16px; - margin-bottom: -8px; -} +.grid-switch { position: relative; display: inline-block; width: 50px; height: 24px; margin-left: 16px; margin-right: 16px; margin-bottom: -8px; } /* Hide default HTML checkbox */ .grid-switch input { display: none; } diff --git a/GridBlazor/wwwroot/css/gridblazor.min.css b/GridBlazor/wwwroot/css/gridblazor.min.css index d84b271c..86c01df5 100644 --- a/GridBlazor/wwwroot/css/gridblazor.min.css +++ b/GridBlazor/wwwroot/css/gridblazor.min.css @@ -1 +1 @@ -.grid-mvc:focus{outline:none}.grid-table-wrap{overflow:auto}.grid-table-head{overflow:hidden}.grid-table-body{overflow:auto}.grid-error{color:#f00}table.grid-table{margin:0}table.grid-table .grid-wrap{padding:0;position:relative}table.grid-table .grid-empty-text{color:#666}table.grid-table .grid-header{position:relative;vertical-align:top}table.grid-table .grid-header .sorted-asc .grid-sort-arrow::after{content:" ↑"}table.grid-table .grid-header .sorted-desc .grid-sort-arrow::after{content:" ↓"}table.grid-table .grid-header>.grid-header-group{display:flex}table.grid-table .grid-header>.grid-header-group>.grid-header-title{width:100%;margin-right:15px;white-space:nowrap}div[dir="rtl"] table.grid-table .grid-header>.grid-header-group>.grid-header-title{margin-left:15px;margin-right:0}table.grid-table .grid-header>.grid-header-group>.grid-header-title>button{font-weight:bold;color:#007bff;background-color:#fff;border:none}table.grid-table .grid-header>.grid-header-group>.grid-header-title>button:hover{color:#0056b3;text-decoration:underline}table.grid-table .grid-header>.grid-header-group>.grid-header-title>button:focus{outline:0}table.grid-table .grid-header.grid-header-drag-over{border:1px solid #add8e6;border-radius:16px}table.grid-table .grid-header.grid-header-drag-over *{pointer-events:none}table.grid-table .grid-header>.grid-header-group .grid-column-rearrange-insert-placeholder{margin-left:-12px}table.grid-table tr.grid-row-selected td{background:#4888c2 !important;color:#fff}table.grid-table tr.grid-row-selected a{color:#fff}table.striped>tbody>tr.grid-row:nth-of-type(odd){background-color:#f9f9f9}table.substriped>tbody>tr.grid-row:nth-of-type(4n+1){background-color:#f9f9f9}table.grid-table tr.grid-totals-row td{border-color:#aaa;background:#eee !important}input.grid-filter-input{padding:4px}table.grid-table .grid-filter{position:relative;margin-top:2px;margin-bottom:10px;float:right;width:10px}table.grid-table .grid-filter-btn{cursor:pointer;display:block;width:10px;height:12px;background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAMCAYAAABbayygAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAJFJREFUKFNjkJSU/E8MZvj//78DMRhkoj+6bizYH2SiiIeHx2FjY+P/2DBIDqSGAQSOHTtmYWZm9hldEUgMJAdWBAJAHSzt7e056ApBYiA5qDIIAAoIhIaGroYpArFBYlBpVLB3715DmEIQGyqMCUDWwBRiWIkOYAqhXNwApMjX13c7lIsbgBQBrdWAcqGAgQEAdOGTrvsYKXIAAAAASUVORK5CYII=') no-repeat}table.grid-table .grid-filter-btn.filtered{background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAMCAYAAABbayygAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAJNJREFUKFNjYGj//58o/P//fwdiMIOkpKQ/VhOQMFgNULWIh4fHYWNj4//YMEgOpIYBBI4dO2ZhZmb2GV0RSAwkB1YEAkAdLO3t7TnoCkFiIDmoMggACgiEhoauhikCsUFiUGlUsHfvXkOYQhAbKowJQNbAFGJYiQ5gCqFc3ACkyNfXdzuUixuAFAGt1YByoYCBAQAUDanUpFB4UQAAAABJRU5ErkJggg==') no-repeat}table.grid-table .grid-filter-buttons{padding:0}table.grid-table .grid-filter-buttons button{margin-right:5px}div[dir="rtl"] table.grid-table .grid-filter-buttons button{margin-right:0;margin-left:5px}table.grid-table .grid-filter-buttons button:last-child{margin-right:0}div[dir="rtl"] table.grid-table .grid-filter-buttons button:last-child{margin-left:0}table.grid-table .grid-filter-datepicker table td{padding:1px!important}table.grid-table .grid-filter-datepicker .ui-datepicker{width:auto}table.grid-table .grid-dropdown-inner ul.menu-list li a.grid-filter-clear{white-space:nowrap;padding-left:23px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAMCAYAAABbayygAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAARpJREFUKFNjYGj//58o/P//fwdiMIOkpKQ/VhOQMFgNULWIh4fHYWNj4//YMEgOpIYBBI4dO2axOC/396GinP/O+vpwRVbGxl92+vluXm1kuASsEKiD5VB99aG3eTH/HxjL/A/RUPsfrqb6f7e21uutlhbRYEUwAFQskOLmun2+lND/0xxM/7dycXzd6OxoCpVGBduWLjXv4+f/v5WF+f9RbtYvfeysqlApBKhhY2Hcxsy0+xAL038nbe3/m8W4ss/Jcx2GSiPAal6uvGtczP9TFOXBHgGJ7RHlmLGOjy0UrAAGzgT7rn7urP/P3NDgv6+v73aQWAMzM+dqTtbJYAUwsNzeyuhImE8GSBHQYxpQYYYJQCcxMDAwAAB7/bt5uWh9FAAAAABJRU5ErkJggg==');background-position:3px center;background-repeat:no-repeat}div[dir="rtl"] table.grid-table .grid-dropdown-inner ul.menu-list li a.grid-filter-clear{padding-left:0;padding-right:23px;background-position:right}table.grid-table .grid-filter-choose.choose-selected{background-color:#fff!important;cursor:default;color:#999}table.grid-table .grid-popup-additional{padding:3px 0 0 0}.grid-tooltip{position:relative;margin-top:0}.grid-tooltip-dropdown{font-weight:normal;left:-102px;top:16px!important;margin-top:-5px;min-width:300px}div[dir="rtl"] .grid-tooltip-dropdown{left:0;right:-102px}.grid-dropdown{font-weight:normal;left:-102px;top:16px!important;min-width:360px}div[dir="rtl"] .grid-dropdown{left:-258px}.grid-dropdown-arrow{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAICAYAAADJEc7MAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwgAADsIBFShKgAAAABp0RVh0U29mdHdhcmUAUGFpbnQuTkVUIHYzLjUuMTAw9HKhAAAAl0lEQVQoU42PMQuFMAyE6xN5gpOjjsIb/P9/o3O3zh27dY25kIPq8DBwmLT35WoQkUEVOmGec84CaW2q7+N+AdCD6M9SisQYTei1jsfyCeCu+vjFVGs1AN++94DRfUOfuNLoKUiyRC5y2F5I8NdaM4P/l0EswvBorQTnfxBhLMRih+2pklIy+eEtjQPu6MNZwIBNbwteMBd5X4ZGHcwL3QAAAABJRU5ErkJggg==") no-repeat;height:8px;left:99px;position:absolute;top:-8px;width:14px}div[dir="rtl"] .grid-dropdown-arrow{left:255px}.grid-dropdown-inner{padding:5px 7px}.grid-dropdown ul.menu-list{list-style-type:none;margin:3px 0 0 0;padding:0}.grid-dropdown ul.menu-list li a{text-decoration:none;background-position:6px center;background-repeat:no-repeat;display:flex;padding:4px 5px}.grid-dropdown ul.menu-list li a:hover{background-color:#eee;text-decoration:none}.grid-dropdown input.grid-filter-input{width:100%}.grid-dropdown select.grid-filter-type{width:100%}.grid-dropdown input.grid-filter-list{margin:5px 10px 5px 20px}div[dir="rtl"] .grid-dropdown input.grid-filter-list{margin:5px 20px 5px 10px}.grid-footer{display:inline-flex;width:100%;justify-content:space-between}.grid-itemscount{display:inline-flex;margin-top:10px}.grid-itemscount-label,.grid-itemscount-caption{margin-left:5px;margin-right:5px}.grid-pager{margin-top:20px}.grid-pager ul{padding:0}.page-link:focus{box-shadow:none}.page-item:first-child .page-link{border-radius:4px 0 0 4px}div[dir="rtl"] .page-item:first-child .page-link{border-radius:0 4px 4px 0}.page-item:last-child .page-link{border-radius:0 4px 4px 0}div[dir="rtl"] .page-item:last-child .page-link{border-radius:4px 0 0 4px}.subgrid-caret{cursor:pointer;user-select:none}.subgrid-caret::after{content:"▷"}div[dir="rtl"] .subgrid-caret::after{content:"◁"}.subgrid-caret-down{cursor:pointer;user-select:none}.subgrid-caret-down::after{content:"◢"}div[dir="rtl"] .subgrid-caret-down::after{content:"◣"}.grid-button{background-color:#333}.grid-button:hover{border-color:#666}.grid-buttons{display:inline-flex;width:100%;justify-content:space-between}.grid-header-buttons{display:inline-flex}.grid-search{margin-top:10px;margin-bottom:10px}button.grid-button{height:34px;color:#333;border:1px solid #aaa;border-radius:4px}button.grid-search-apply{padding-left:20px;border-radius:4px 0 0 4px;background-repeat:no-repeat,no-repeat;background-position-x:8px,0;background-position-y:8px,0;background-image:url('data:image/svg+xml;utf8,'),linear-gradient(#ddd,#eee)}div[dir="rtl"] button.grid-search-apply{border-radius:0 4px 4px 0}button.grid-search-clear{padding-left:22px;border-radius:0 4px 4px 0;background-repeat:no-repeat,no-repeat;background-position-x:8px,0;background-position-y:8px,0;background-image:url('data:image/svg+xml;utf8,'),linear-gradient(#ddd,#eee)}div[dir="rtl"] button.grid-search-clear{border-radius:4px 0 0 4px}input.grid-search-input{height:34px;border-color:#ccc}.grid-change-page-size{display:inline-flex;width:250px;margin:10px 20px}.grid-change-page-size label{margin:6px 10px}.grid-change-page-size-input{display:inline;width:60px;margin-left:5px;margin-right:5px}.grid-extsort-droppable{height:42px;width:100%;margin-bottom:10px;border:1px solid #ccc;border-radius:4px}.grid-extsort-column{height:28px;display:inline-block;margin:6px 0 6px 20px;padding:5px;background-color:#efefef;border:1px solid #ccc;border-radius:4px}div[dir="rtl"] .grid-extsort-column{margin:6px 20px 6px 0}.grid-extsort-column .sorted-asc .grid-sort-arrow::after{content:" ↑"}.grid-extsort-column .sorted-desc .grid-sort-arrow::after{content:" ↓"}.grid-extsort-column a{font-weight:700}.grid-extsort-column>a{margin-left:10px;margin-right:5px}div[dir="rtl"] .grid-extsort-column>a{margin-left:5px;margin-right:10px}.grid-extsort-column button{border:none;padding:0;font-size:14px;font-weight:700}.grid-extsort-column>button{margin-left:10px;margin-right:5px}div[dir="rtl"] .grid-extsort-column>button{margin-left:5px;margin-right:10px}.grid-extsort-empty{font-size:14px;height:20px;margin:10px;color:#aaa}.grid-group-caret{margin-right:10px;cursor:pointer;user-select:none}div[dir="rtl"] .grid-group-caret{margin-left:10px;margin-right:0}.grid-group-caret::after{content:"▷"}.grid-group-caret-down{margin-right:10px;cursor:pointer;user-select:none}div[dir="rtl"] .grid-group-caret-down{margin-left:10px;margin-right:0}.grid-group-caret-down::after{content:"◢"}.grid-group-tab{margin-left:20px}div[dir="rtl"] .grid-group-tab{margin-left:0;margin-right:20px}.grid-group-row{background:#eee}.grid-crud{margin-top:10px;margin-bottom:10px;margin-left:0;margin-right:5px}div[dir="rtl"] .grid-crud{margin-left:5px;margin-right:0}.grid-crud:first-child{margin-left:0}div[dir="rtl"] .grid-crud:first-child{margin-right:0}button.grid-button-add{width:32px;margin-right:5px;background-repeat:no-repeat,no-repeat;background-position-x:7px,0;background-position-y:8px,0;background-image:url('data:image/svg+xml;utf8,'),linear-gradient(#ddd,#eee)}div[dir="rtl"] button.grid-button-add{margin-left:5px;margin-right:0}button.grid-button-view{width:30px;height:30px;margin-right:5px;background-repeat:no-repeat,no-repeat;background-position-x:7px,0;background-position-y:7px,0;background-image:url('data:image/svg+xml;utf8,'),linear-gradient(#ddd,#eee)}div[dir="rtl"] button.grid-button-view{margin-left:5px;margin-right:0}button.grid-button-edit{width:30px;height:30px;margin-right:5px;background-repeat:no-repeat,no-repeat;background-position-x:7px,0;background-position-y:7px,0;background-image:url('data:image/svg+xml;utf8,'),linear-gradient(#ddd,#eee)}div[dir="rtl"] button.grid-button-edit{margin-left:5px;margin-right:0}button.grid-button-delete{width:30px;height:30px;margin-right:5px;background-repeat:no-repeat,no-repeat;background-position-x:7px,0;background-position-y:7px,0;background-image:url('data:image/svg+xml;utf8,'),linear-gradient(#ddd,#eee)}div[dir="rtl"] button.grid-button-delete{margin-left:5px;margin-right:0}button.grid-button-header-view{width:34px;height:34px;margin-right:5px;background-repeat:no-repeat,no-repeat;background-position-x:8px,0;background-position-y:8px,0;background-image:url('data:image/svg+xml;utf8,'),linear-gradient(#ddd,#eee)}div[dir="rtl"] button.grid-button-header-view{margin-left:5px;margin-right:0}button.grid-button-header-edit{width:34px;height:34px;margin-right:5px;background-repeat:no-repeat,no-repeat;background-position-x:8px,0;background-position-y:8px,0;background-image:url('data:image/svg+xml;utf8,'),linear-gradient(#ddd,#eee)}div[dir="rtl"] button.grid-button-header-edit{margin-left:5px;margin-right:0}button.grid-button-header-delete{width:34px;height:34px;margin-right:5px;background-repeat:no-repeat,no-repeat;background-position-x:9px,0;background-position-y:8px,0;background-image:url('data:image/svg+xml;utf8,'),linear-gradient(#ddd,#eee)}div[dir="rtl"] button.grid-button-header-delete{margin-left:5px;margin-right:0}button.grid-button-label-add{height:34px;margin-right:5px}div[dir="rtl"] button.grid-button-label-add{margin-left:5px;margin-right:0}button.grid-button-label-view{height:30px;margin-right:5px}div[dir="rtl"] button.grid-button-label-view{margin-left:5px;margin-right:0}button.grid-button-label-edit{height:30px;margin-right:5px}div[dir="rtl"] button.grid-button-label-edit{margin-left:5px;margin-right:0}button.grid-button-label-delete{height:30px;margin-right:5px}div[dir="rtl"] button.grid-button-label-delete{margin-left:5px;margin-right:0}button.grid-button-header-label-view{height:34px;margin-right:5px}div[dir="rtl"] button.grid-button-header-label-view{margin-left:5px;margin-right:0}button.grid-button-header-label-edit{height:34px;margin-right:5px}div[dir="rtl"] button.grid-button-header-label-edit{margin-left:5px;margin-right:0}button.grid-button-header-label-delete{height:34px;margin-right:5px}div[dir="rtl"] button.grid-button-header-label-delete{margin-left:5px;margin-right:0}td.grid-button-cell{padding:5px 0 5px 0;width:34px}.input-validation-error{border:1px solid #f00}.field-validation-error{color:#f00}button.grid-button-input-file{border-radius:0 4px 4px 0;background-image:linear-gradient(#ddd,#eee);font-weight:bold}div[dir="rtl"] button.grid-button-input-file{border-radius:4px 0 0 4px}.grid-crud-header{font-size:2rem;margin:1rem 0 1rem 0}.grid-all-filters-clear{margin-top:10px;margin-bottom:10px;margin-left:15px;margin-right:5px}.grid-all-filters-clear:first-child{margin-left:0}div[dir="rtl"] .grid-all-filters-clear:first-child{margin-right:0}button.grid-button-all-filters-clear{width:32px;margin-right:5px;background-repeat:no-repeat,no-repeat;background-position-x:10px,0;background-position-y:10px,0;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAMCAYAAABbayygAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAARpJREFUKFNjYGj//58o/P//fwdiMIOkpKQ/VhOQMFgNULWIh4fHYWNj4//YMEgOpIYBBI4dO2axOC/396GinP/O+vpwRVbGxl92+vluXm1kuASsEKiD5VB99aG3eTH/HxjL/A/RUPsfrqb6f7e21uutlhbRYEUwAFQskOLmun2+lND/0xxM/7dycXzd6OxoCpVGBduWLjXv4+f/v5WF+f9RbtYvfeysqlApBKhhY2Hcxsy0+xAL038nbe3/m8W4ss/Jcx2GSiPAal6uvGtczP9TFOXBHgGJ7RHlmLGOjy0UrAAGzgT7rn7urP/P3NDgv6+v73aQWAMzM+dqTtbJYAUwsNzeyuhImE8GSBHQYxpQYYYJQCcxMDAwAAB7/bt5uWh9FAAAAABJRU5ErkJggg=='),linear-gradient(#ddd,#eee)}div[dir="rtl"] button.grid-button-all-filters-clear{margin-left:5px;margin-right:0}.grid-excel{margin-top:10px;margin-bottom:10px;margin-left:15px;margin-right:5px}.grid-excel:first-child{margin-left:0}div[dir="rtl"] .grid-excel:first-child{margin-right:0}button.grid-button-excel{width:32px;margin-right:5px;background-repeat:no-repeat,no-repeat;background-position-x:7px,0;background-position-y:8px,0;background-image:url('data:image/svg+xml;utf8,'),linear-gradient(#ddd,#eee)}div[dir="rtl"] button.grid-button-excel{margin-left:5px;margin-right:0}.grid-button-components{margin-top:10px;margin-bottom:10px;margin-left:0;margin-right:5px}div[dir="rtl"] .grid-button-components{margin-left:5px;margin-right:0}.grid-button-components:first-child{margin-left:0}div[dir="rtl"] .grid-button-components:first-child{margin-right:0}button.grid-button-component{min-width:32px;margin-right:5px;background:-o-linear-gradient(top,#ddd 0%,#eee 100%);background:-moz-linear-gradient(top,#ddd 0%,#eee 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#ddd),color-stop(1,#eee))}div[dir="rtl"] button.grid-button-component{margin-left:5px;margin-right:0}.grid-header-checkbox-input{opacity:0}.grid-header-checkbox-input~.null-checkbox::before{position:absolute;top:1rem;display:block;width:.9rem;height:.9rem;pointer-events:none;content:"";border:.5px solid #666;border-radius:3px;background-color:#ccc}div[dir="rtl"] label{display:flex}.grid-switch{position:relative;display:inline-block;width:50px;height:24px;margin-left:16px;margin-right:16px;margin-bottom:-8px}.grid-switch input{display:none}.grid-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.4s;transition:.4s}.grid-slider:before{position:absolute;content:"";height:16px;width:16px;left:4px;bottom:4px;background-color:#fff;-webkit-transition:.4s;transition:.4s}input:checked+.grid-slider{background-color:#ccc}input:focus+.grid-slider{box-shadow:0 0 1px #ccc}input:checked+.grid-slider:before{-webkit-transform:translateX(26px);-ms-transform:translateX(26px);transform:translateX(26px)}.grid-slider.round{border-radius:24px}.grid-slider.round:before{border-radius:50%}.grid-spinner{margin:170px auto;border:6px solid #f3f3f3;border-top:6px solid #455a64;border-radius:50%;width:60px;height:60px;animation:spin 2s linear infinite}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@-moz-keyframes spin{from{-moz-transform:rotate(0deg)}to{-moz-transform:rotate(360deg)}} \ No newline at end of file +.grid-mvc:focus{outline:none}.grid-table-wrap{overflow:auto}.grid-table-head{overflow:hidden}.grid-table-body{overflow:auto}.grid-error{color:#f00}table.grid-table{margin:0}table.grid-table .grid-wrap{padding:0;position:relative}table.grid-table .grid-empty-text{color:#666}table.grid-table .grid-header{position:relative;vertical-align:top}table.grid-table .grid-header .sorted-asc .grid-sort-arrow::after{content:" ↑"}table.grid-table .grid-header .sorted-desc .grid-sort-arrow::after{content:" ↓"}table.grid-table .grid-header>.grid-header-group{display:flex}table.grid-table .grid-header>.grid-header-group>.grid-header-title{width:100%;margin-right:15px;white-space:nowrap}div[dir="rtl"] table.grid-table .grid-header>.grid-header-group>.grid-header-title{margin-left:15px;margin-right:0}table.grid-table .grid-header>.grid-header-group>.grid-header-title>button{font-weight:bold;color:#007bff;background-color:#fff;border:none}table.grid-table .grid-header>.grid-header-group>.grid-header-title>button:hover{color:#0056b3;text-decoration:underline}table.grid-table .grid-header>.grid-header-group>.grid-header-title>button:focus{outline:0}table.grid-table .grid-header.grid-header-drag-over{border:1px solid #add8e6;border-radius:16px}table.grid-table .grid-header.grid-header-drag-over *{pointer-events:none}table.grid-table .grid-header>.grid-header-group .grid-column-rearrange-insert-placeholder{margin-left:-12px}table.grid-table tr.grid-row-selected td{background:#4888c2 !important;color:#fff}table.grid-table tr.grid-row-selected a{color:#fff}table.striped>tbody>tr.grid-row:nth-of-type(odd){background-color:#f9f9f9}table.substriped>tbody>tr.grid-row:nth-of-type(4n+1){background-color:#f9f9f9}table.grid-table tr.grid-totals-row td{border-color:#aaa;background:#eee !important}input.grid-filter-input{padding:4px}table.grid-table .grid-filter{position:relative;margin-top:2px;margin-bottom:10px;float:right;width:10px}table.grid-table .grid-filter-btn{cursor:pointer;display:block;width:10px;height:12px;background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAMCAYAAABbayygAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAJFJREFUKFNjkJSU/E8MZvj//78DMRhkoj+6bizYH2SiiIeHx2FjY+P/2DBIDqSGAQSOHTtmYWZm9hldEUgMJAdWBAJAHSzt7e056ApBYiA5qDIIAAoIhIaGroYpArFBYlBpVLB3715DmEIQGyqMCUDWwBRiWIkOYAqhXNwApMjX13c7lIsbgBQBrdWAcqGAgQEAdOGTrvsYKXIAAAAASUVORK5CYII=') no-repeat}table.grid-table .grid-filter-btn.filtered{background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAMCAYAAABbayygAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAJNJREFUKFNjYGj//58o/P//fwdiMIOkpKQ/VhOQMFgNULWIh4fHYWNj4//YMEgOpIYBBI4dO2ZhZmb2GV0RSAwkB1YEAkAdLO3t7TnoCkFiIDmoMggACgiEhoauhikCsUFiUGlUsHfvXkOYQhAbKowJQNbAFGJYiQ5gCqFc3ACkyNfXdzuUixuAFAGt1YByoYCBAQAUDanUpFB4UQAAAABJRU5ErkJggg==') no-repeat}table.grid-table .grid-filter-buttons{padding:0}table.grid-table .grid-filter-buttons button{margin-right:5px}div[dir="rtl"] table.grid-table .grid-filter-buttons button{margin-right:0;margin-left:5px}table.grid-table .grid-filter-buttons button:last-child{margin-right:0}div[dir="rtl"] table.grid-table .grid-filter-buttons button:last-child{margin-left:0}table.grid-table .grid-filter-datepicker table td{padding:1px!important}table.grid-table .grid-filter-datepicker .ui-datepicker{width:auto}table.grid-table .grid-dropdown-inner ul.menu-list li a.grid-filter-clear{white-space:nowrap;padding-left:23px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAMCAYAAABbayygAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAARpJREFUKFNjYGj//58o/P//fwdiMIOkpKQ/VhOQMFgNULWIh4fHYWNj4//YMEgOpIYBBI4dO2axOC/396GinP/O+vpwRVbGxl92+vluXm1kuASsEKiD5VB99aG3eTH/HxjL/A/RUPsfrqb6f7e21uutlhbRYEUwAFQskOLmun2+lND/0xxM/7dycXzd6OxoCpVGBduWLjXv4+f/v5WF+f9RbtYvfeysqlApBKhhY2Hcxsy0+xAL038nbe3/m8W4ss/Jcx2GSiPAal6uvGtczP9TFOXBHgGJ7RHlmLGOjy0UrAAGzgT7rn7urP/P3NDgv6+v73aQWAMzM+dqTtbJYAUwsNzeyuhImE8GSBHQYxpQYYYJQCcxMDAwAAB7/bt5uWh9FAAAAABJRU5ErkJggg==');background-position:3px center;background-repeat:no-repeat}div[dir="rtl"] table.grid-table .grid-dropdown-inner ul.menu-list li a.grid-filter-clear{padding-left:0;padding-right:23px;background-position:right}table.grid-table .grid-filter-choose.choose-selected{background-color:#fff!important;cursor:default;color:#999}table.grid-table .grid-popup-additional{padding:3px 0 0 0}.grid-tooltip{position:relative;margin-top:0}.grid-tooltip-dropdown{font-weight:normal;left:-102px;top:16px!important;margin-top:-5px;min-width:300px}div[dir="rtl"] .grid-tooltip-dropdown{left:0;right:-102px}.grid-dropdown{font-weight:normal;left:-102px;top:16px!important;min-width:360px}div[dir="rtl"] .grid-dropdown{left:-258px}.grid-dropdown-arrow{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAICAYAAADJEc7MAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwgAADsIBFShKgAAAABp0RVh0U29mdHdhcmUAUGFpbnQuTkVUIHYzLjUuMTAw9HKhAAAAl0lEQVQoU42PMQuFMAyE6xN5gpOjjsIb/P9/o3O3zh27dY25kIPq8DBwmLT35WoQkUEVOmGec84CaW2q7+N+AdCD6M9SisQYTei1jsfyCeCu+vjFVGs1AN++94DRfUOfuNLoKUiyRC5y2F5I8NdaM4P/l0EswvBorQTnfxBhLMRih+2pklIy+eEtjQPu6MNZwIBNbwteMBd5X4ZGHcwL3QAAAABJRU5ErkJggg==") no-repeat;height:8px;left:99px;position:absolute;top:-8px;width:14px}div[dir="rtl"] .grid-dropdown-arrow{left:255px}.grid-dropdown-inner{padding:5px 7px}.grid-dropdown ul.menu-list{list-style-type:none;margin:3px 0 0 0;padding:0}.grid-dropdown ul.menu-list li a{text-decoration:none;background-position:6px center;background-repeat:no-repeat;display:flex;padding:4px 5px}.grid-dropdown ul.menu-list li a:hover{background-color:#eee;text-decoration:none}.grid-dropdown input.grid-filter-input{width:100%}.grid-dropdown select.grid-filter-type{width:100%}.grid-dropdown input.grid-filter-list{margin:5px 10px 5px 20px}div[dir="rtl"] .grid-dropdown input.grid-filter-list{margin:5px 20px 5px 10px}.grid-footer{display:inline-flex;width:100%;margin-top:10px;justify-content:space-between}.grid-itemscount{display:inline-flex;margin-top:6px}.grid-itemscount-label,.grid-itemscount-caption{margin-left:5px;margin-right:5px}.grid-pager-sizer{display:inline-flex}.grid-pager ul{padding:0}.page-link:focus{box-shadow:none}.page-item:first-child .page-link{border-radius:4px 0 0 4px}div[dir="rtl"] .page-item:first-child .page-link{border-radius:0 4px 4px 0}.page-item:last-child .page-link{border-radius:0 4px 4px 0}div[dir="rtl"] .page-item:last-child .page-link{border-radius:4px 0 0 4px}.subgrid-caret{cursor:pointer;user-select:none}.subgrid-caret::after{content:"▷"}div[dir="rtl"] .subgrid-caret::after{content:"◁"}.subgrid-caret-down{cursor:pointer;user-select:none}.subgrid-caret-down::after{content:"◢"}div[dir="rtl"] .subgrid-caret-down::after{content:"◣"}.grid-button{background-color:#333}.grid-button:hover{border-color:#666}.grid-buttons{display:inline-flex;width:100%;justify-content:space-between}.grid-header-buttons{display:inline-flex}.grid-search{margin-top:10px;margin-bottom:10px}button.grid-button{height:34px;color:#333;border:1px solid #aaa;border-radius:4px}button.grid-search-apply{padding-left:20px;border-radius:4px 0 0 4px;background-repeat:no-repeat,no-repeat;background-position-x:8px,0;background-position-y:8px,0;background-image:url('data:image/svg+xml;utf8,'),linear-gradient(#ddd,#eee)}div[dir="rtl"] button.grid-search-apply{border-radius:0 4px 4px 0}button.grid-search-clear{padding-left:22px;border-radius:0 4px 4px 0;background-repeat:no-repeat,no-repeat;background-position-x:8px,0;background-position-y:8px,0;background-image:url('data:image/svg+xml;utf8,'),linear-gradient(#ddd,#eee)}div[dir="rtl"] button.grid-search-clear{border-radius:4px 0 0 4px}input.grid-search-input{height:34px;border-color:#ccc}.grid-change-page-size,.grid-goto-page{display:inline-flex;margin:0 20px}.grid-change-page-size{width:250px}.grid-goto-page{width:150px}.grid-change-page-size label,.grid-goto-page label{margin:6px 10px}.grid-change-page-size-input,.grid-goto-page-input{display:inline;width:60px;margin-left:5px;margin-right:5px}.grid-extsort-droppable{height:42px;width:100%;margin-bottom:10px;border:1px solid #ccc;border-radius:4px}.grid-extsort-column{height:28px;display:inline-block;margin:6px 0 6px 20px;padding:5px;background-color:#efefef;border:1px solid #ccc;border-radius:4px}div[dir="rtl"] .grid-extsort-column{margin:6px 20px 6px 0}.grid-extsort-column .sorted-asc .grid-sort-arrow::after{content:" ↑"}.grid-extsort-column .sorted-desc .grid-sort-arrow::after{content:" ↓"}.grid-extsort-column a{font-weight:700}.grid-extsort-column>a{margin-left:10px;margin-right:5px}div[dir="rtl"] .grid-extsort-column>a{margin-left:5px;margin-right:10px}.grid-extsort-column button{border:none;padding:0;font-size:14px;font-weight:700}.grid-extsort-column>button{margin-left:10px;margin-right:5px}div[dir="rtl"] .grid-extsort-column>button{margin-left:5px;margin-right:10px}.grid-extsort-empty{font-size:14px;height:20px;margin:10px;color:#aaa}.grid-group-caret{margin-right:10px;cursor:pointer;user-select:none}div[dir="rtl"] .grid-group-caret{margin-left:10px;margin-right:0}.grid-group-caret::after{content:"▷"}.grid-group-caret-down{margin-right:10px;cursor:pointer;user-select:none}div[dir="rtl"] .grid-group-caret-down{margin-left:10px;margin-right:0}.grid-group-caret-down::after{content:"◢"}.grid-group-tab{margin-left:20px}div[dir="rtl"] .grid-group-tab{margin-left:0;margin-right:20px}.grid-group-row{background:#eee}.grid-crud{margin-top:10px;margin-bottom:10px;margin-left:0;margin-right:5px}div[dir="rtl"] .grid-crud{margin-left:5px;margin-right:0}.grid-crud:first-child{margin-left:0}div[dir="rtl"] .grid-crud:first-child{margin-right:0}button.grid-button-add{width:32px;margin-right:5px;background-repeat:no-repeat,no-repeat;background-position-x:7px,0;background-position-y:8px,0;background-image:url('data:image/svg+xml;utf8,'),linear-gradient(#ddd,#eee)}div[dir="rtl"] button.grid-button-add{margin-left:5px;margin-right:0}button.grid-button-view{width:30px;height:30px;margin-right:5px;background-repeat:no-repeat,no-repeat;background-position-x:7px,0;background-position-y:7px,0;background-image:url('data:image/svg+xml;utf8,'),linear-gradient(#ddd,#eee)}div[dir="rtl"] button.grid-button-view{margin-left:5px;margin-right:0}button.grid-button-edit{width:30px;height:30px;margin-right:5px;background-repeat:no-repeat,no-repeat;background-position-x:7px,0;background-position-y:7px,0;background-image:url('data:image/svg+xml;utf8,'),linear-gradient(#ddd,#eee)}div[dir="rtl"] button.grid-button-edit{margin-left:5px;margin-right:0}button.grid-button-delete{width:30px;height:30px;margin-right:5px;background-repeat:no-repeat,no-repeat;background-position-x:7px,0;background-position-y:7px,0;background-image:url('data:image/svg+xml;utf8,'),linear-gradient(#ddd,#eee)}div[dir="rtl"] button.grid-button-delete{margin-left:5px;margin-right:0}button.grid-button-header-view{width:34px;height:34px;margin-right:5px;background-repeat:no-repeat,no-repeat;background-position-x:8px,0;background-position-y:8px,0;background-image:url('data:image/svg+xml;utf8,'),linear-gradient(#ddd,#eee)}div[dir="rtl"] button.grid-button-header-view{margin-left:5px;margin-right:0}button.grid-button-header-edit{width:34px;height:34px;margin-right:5px;background-repeat:no-repeat,no-repeat;background-position-x:8px,0;background-position-y:8px,0;background-image:url('data:image/svg+xml;utf8,'),linear-gradient(#ddd,#eee)}div[dir="rtl"] button.grid-button-header-edit{margin-left:5px;margin-right:0}button.grid-button-header-delete{width:34px;height:34px;margin-right:5px;background-repeat:no-repeat,no-repeat;background-position-x:9px,0;background-position-y:8px,0;background-image:url('data:image/svg+xml;utf8,'),linear-gradient(#ddd,#eee)}div[dir="rtl"] button.grid-button-header-delete{margin-left:5px;margin-right:0}button.grid-button-label-add{height:34px;margin-right:5px}div[dir="rtl"] button.grid-button-label-add{margin-left:5px;margin-right:0}button.grid-button-label-view{height:30px;margin-right:5px}div[dir="rtl"] button.grid-button-label-view{margin-left:5px;margin-right:0}button.grid-button-label-edit{height:30px;margin-right:5px}div[dir="rtl"] button.grid-button-label-edit{margin-left:5px;margin-right:0}button.grid-button-label-delete{height:30px;margin-right:5px}div[dir="rtl"] button.grid-button-label-delete{margin-left:5px;margin-right:0}button.grid-button-header-label-view{height:34px;margin-right:5px}div[dir="rtl"] button.grid-button-header-label-view{margin-left:5px;margin-right:0}button.grid-button-header-label-edit{height:34px;margin-right:5px}div[dir="rtl"] button.grid-button-header-label-edit{margin-left:5px;margin-right:0}button.grid-button-header-label-delete{height:34px;margin-right:5px}div[dir="rtl"] button.grid-button-header-label-delete{margin-left:5px;margin-right:0}td.grid-button-cell{padding:5px 0 5px 0;width:34px}.input-validation-error{border:1px solid #f00}.field-validation-error{color:#f00}button.grid-button-input-file{border-radius:0 4px 4px 0;background-image:linear-gradient(#ddd,#eee);font-weight:bold}div[dir="rtl"] button.grid-button-input-file{border-radius:4px 0 0 4px}.grid-crud-header{font-size:2rem;margin:1rem 0 1rem 0}.grid-all-filters-clear{margin-top:10px;margin-bottom:10px;margin-left:15px;margin-right:5px}.grid-all-filters-clear:first-child{margin-left:0}div[dir="rtl"] .grid-all-filters-clear:first-child{margin-right:0}button.grid-button-all-filters-clear{width:32px;margin-right:5px;background-repeat:no-repeat,no-repeat;background-position-x:10px,0;background-position-y:10px,0;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAMCAYAAABbayygAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAARpJREFUKFNjYGj//58o/P//fwdiMIOkpKQ/VhOQMFgNULWIh4fHYWNj4//YMEgOpIYBBI4dO2axOC/396GinP/O+vpwRVbGxl92+vluXm1kuASsEKiD5VB99aG3eTH/HxjL/A/RUPsfrqb6f7e21uutlhbRYEUwAFQskOLmun2+lND/0xxM/7dycXzd6OxoCpVGBduWLjXv4+f/v5WF+f9RbtYvfeysqlApBKhhY2Hcxsy0+xAL038nbe3/m8W4ss/Jcx2GSiPAal6uvGtczP9TFOXBHgGJ7RHlmLGOjy0UrAAGzgT7rn7urP/P3NDgv6+v73aQWAMzM+dqTtbJYAUwsNzeyuhImE8GSBHQYxpQYYYJQCcxMDAwAAB7/bt5uWh9FAAAAABJRU5ErkJggg=='),linear-gradient(#ddd,#eee)}div[dir="rtl"] button.grid-button-all-filters-clear{margin-left:5px;margin-right:0}.grid-excel{margin-top:10px;margin-bottom:10px;margin-left:15px;margin-right:5px}.grid-excel:first-child{margin-left:0}div[dir="rtl"] .grid-excel:first-child{margin-right:0}button.grid-button-excel{width:32px;margin-right:5px;background-repeat:no-repeat,no-repeat;background-position-x:7px,0;background-position-y:8px,0;background-image:url('data:image/svg+xml;utf8,'),linear-gradient(#ddd,#eee)}div[dir="rtl"] button.grid-button-excel{margin-left:5px;margin-right:0}.grid-button-components{margin-top:10px;margin-bottom:10px;margin-left:0;margin-right:5px}div[dir="rtl"] .grid-button-components{margin-left:5px;margin-right:0}.grid-button-components:first-child{margin-left:0}div[dir="rtl"] .grid-button-components:first-child{margin-right:0}button.grid-button-component{min-width:32px;margin-right:5px;background:-o-linear-gradient(top,#ddd 0%,#eee 100%);background:-moz-linear-gradient(top,#ddd 0%,#eee 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#ddd),color-stop(1,#eee))}div[dir="rtl"] button.grid-button-component{margin-left:5px;margin-right:0}.grid-header-checkbox-input{opacity:0}.grid-header-checkbox-input~.null-checkbox::before{position:absolute;top:1rem;display:block;width:.9rem;height:.9rem;pointer-events:none;content:"";border:.5px solid #666;border-radius:3px;background-color:#ccc}div[dir="rtl"] label{display:flex}.grid-switch{position:relative;display:inline-block;width:50px;height:24px;margin-left:16px;margin-right:16px;margin-bottom:-8px}.grid-switch input{display:none}.grid-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.4s;transition:.4s}.grid-slider:before{position:absolute;content:"";height:16px;width:16px;left:4px;bottom:4px;background-color:#fff;-webkit-transition:.4s;transition:.4s}input:checked+.grid-slider{background-color:#ccc}input:focus+.grid-slider{box-shadow:0 0 1px #ccc}input:checked+.grid-slider:before{-webkit-transform:translateX(26px);-ms-transform:translateX(26px);transform:translateX(26px)}.grid-slider.round{border-radius:24px}.grid-slider.round:before{border-radius:50%}.grid-spinner{margin:170px auto;border:6px solid #f3f3f3;border-top:6px solid #455a64;border-radius:50%;width:60px;height:60px;animation:spin 2s linear infinite}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@-moz-keyframes spin{from{-moz-transform:rotate(0deg)}to{-moz-transform:rotate(360deg)}} \ No newline at end of file diff --git a/GridCore/GridCore.csproj.user b/GridCore/GridCore.csproj.user index c2789373..927a23d4 100644 --- a/GridCore/GridCore.csproj.user +++ b/GridCore/GridCore.csproj.user @@ -4,4 +4,9 @@ false <_LastSelectedProfileId>C:\Users\GustauNavarro\source\repos\Grid.Blazor\GridCore\Properties\PublishProfiles\FolderProfile.pubxml + + + Designer + + \ No newline at end of file diff --git a/GridCore/Resources/Strings.Designer.cs b/GridCore/Resources/Strings.Designer.cs index f6c3aa37..48c9c8fe 100644 --- a/GridCore/Resources/Strings.Designer.cs +++ b/GridCore/Resources/Strings.Designer.cs @@ -19,7 +19,7 @@ namespace GridCore.Resources { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] public class Strings { @@ -141,6 +141,15 @@ public static string FilterButtonTooltipText { } } + /// + /// Looks up a localized string similar to Go to. + /// + public static string Goto { + get { + return ResourceManager.GetString("Goto", resourceCulture); + } + } + /// /// Looks up a localized string similar to Drop columns here for column grouping. /// diff --git a/GridCore/Resources/Strings.bg.resx b/GridCore/Resources/Strings.bg.resx index 522e1fe6..da85c3a1 100644 --- a/GridCore/Resources/Strings.bg.resx +++ b/GridCore/Resources/Strings.bg.resx @@ -174,4 +174,7 @@ Да + + Отидете на + \ No newline at end of file diff --git a/GridCore/Resources/Strings.ca-ES.resx b/GridCore/Resources/Strings.ca-ES.resx index 3b4fa181..3b786506 100644 --- a/GridCore/Resources/Strings.ca-ES.resx +++ b/GridCore/Resources/Strings.ca-ES.resx @@ -174,4 +174,7 @@ + + Anar a + \ No newline at end of file diff --git a/GridCore/Resources/Strings.cs.resx b/GridCore/Resources/Strings.cs.resx index a9491f34..2527ad31 100644 --- a/GridCore/Resources/Strings.cs.resx +++ b/GridCore/Resources/Strings.cs.resx @@ -174,4 +174,7 @@ Ano + + Jít do + \ No newline at end of file diff --git a/GridCore/Resources/Strings.de.resx b/GridCore/Resources/Strings.de.resx index d5db50a3..56d4ce82 100644 --- a/GridCore/Resources/Strings.de.resx +++ b/GridCore/Resources/Strings.de.resx @@ -174,4 +174,7 @@ Ja + + Gehe zu + \ No newline at end of file diff --git a/GridCore/Resources/Strings.es.resx b/GridCore/Resources/Strings.es.resx index 5ef17cd4..17d097d6 100644 --- a/GridCore/Resources/Strings.es.resx +++ b/GridCore/Resources/Strings.es.resx @@ -174,4 +174,7 @@ + + Ir a + \ No newline at end of file diff --git a/GridCore/Resources/Strings.eu-ES.resx b/GridCore/Resources/Strings.eu-ES.resx index 8abf8dec..f4a88286 100644 --- a/GridCore/Resources/Strings.eu-ES.resx +++ b/GridCore/Resources/Strings.eu-ES.resx @@ -174,4 +174,7 @@ Bai + + Joan + \ No newline at end of file diff --git a/GridCore/Resources/Strings.fa-IR.resx b/GridCore/Resources/Strings.fa-IR.resx index a14e90cb..e745a16f 100644 --- a/GridCore/Resources/Strings.fa-IR.resx +++ b/GridCore/Resources/Strings.fa-IR.resx @@ -144,6 +144,9 @@ فیلتر کردن این ستون + + برو به + برای دسته بندی، ستون را اینجا بیاندازید diff --git a/GridCore/Resources/Strings.fr.resx b/GridCore/Resources/Strings.fr.resx index af619b69..92d8d57e 100644 --- a/GridCore/Resources/Strings.fr.resx +++ b/GridCore/Resources/Strings.fr.resx @@ -174,4 +174,7 @@ Oui + + Aller à + \ No newline at end of file diff --git a/GridCore/Resources/Strings.gl-ES.resx b/GridCore/Resources/Strings.gl-ES.resx index 96b199dc..be4587d5 100644 --- a/GridCore/Resources/Strings.gl-ES.resx +++ b/GridCore/Resources/Strings.gl-ES.resx @@ -174,4 +174,7 @@ Si + + Ir a + \ No newline at end of file diff --git a/GridCore/Resources/Strings.hr.resx b/GridCore/Resources/Strings.hr.resx index 420d47dc..a6fc1885 100644 --- a/GridCore/Resources/Strings.hr.resx +++ b/GridCore/Resources/Strings.hr.resx @@ -144,6 +144,9 @@ Filtriraj ovu kolonu + + Menj + Povucite ovdje kolone za grupiranje diff --git a/GridCore/Resources/Strings.it.resx b/GridCore/Resources/Strings.it.resx index f668e755..88d0bd82 100644 --- a/GridCore/Resources/Strings.it.resx +++ b/GridCore/Resources/Strings.it.resx @@ -174,4 +174,7 @@ + + Vai a + \ No newline at end of file diff --git a/GridCore/Resources/Strings.nb-NO.resx b/GridCore/Resources/Strings.nb-NO.resx index 3d9f7e05..c64f3985 100644 --- a/GridCore/Resources/Strings.nb-NO.resx +++ b/GridCore/Resources/Strings.nb-NO.resx @@ -174,4 +174,7 @@ Ja + + Gå til + \ No newline at end of file diff --git a/GridCore/Resources/Strings.nl.resx b/GridCore/Resources/Strings.nl.resx index 495097ee..b5a7d70b 100644 --- a/GridCore/Resources/Strings.nl.resx +++ b/GridCore/Resources/Strings.nl.resx @@ -144,6 +144,9 @@ Filter deze kolom + + Ga naar + Zet kolommen hier neer voor kolomgroepering diff --git a/GridCore/Resources/Strings.pt-BR.resx b/GridCore/Resources/Strings.pt-BR.resx index babdc3f1..0ee022a1 100644 --- a/GridCore/Resources/Strings.pt-BR.resx +++ b/GridCore/Resources/Strings.pt-BR.resx @@ -174,4 +174,7 @@ Sim + + Vamos para + \ No newline at end of file diff --git a/GridCore/Resources/Strings.resx b/GridCore/Resources/Strings.resx index 1df31a52..1f179f08 100644 --- a/GridCore/Resources/Strings.resx +++ b/GridCore/Resources/Strings.resx @@ -144,6 +144,9 @@ Filter this column + + Go to + Drop columns here for column grouping diff --git a/GridCore/Resources/Strings.ru.resx b/GridCore/Resources/Strings.ru.resx index 1a7c80a8..cfcc8975 100644 --- a/GridCore/Resources/Strings.ru.resx +++ b/GridCore/Resources/Strings.ru.resx @@ -174,4 +174,7 @@ Да + + Перейти к + \ No newline at end of file diff --git a/GridCore/Resources/Strings.se.resx b/GridCore/Resources/Strings.se.resx index e2bf8032..32493be1 100644 --- a/GridCore/Resources/Strings.se.resx +++ b/GridCore/Resources/Strings.se.resx @@ -174,4 +174,7 @@ Ja + + Gå till + \ No newline at end of file diff --git a/GridCore/Resources/Strings.sl.resx b/GridCore/Resources/Strings.sl.resx index a641a164..7e2840a7 100644 --- a/GridCore/Resources/Strings.sl.resx +++ b/GridCore/Resources/Strings.sl.resx @@ -174,4 +174,7 @@ Da + + Pojdi do + \ No newline at end of file diff --git a/GridCore/Resources/Strings.sr.resx b/GridCore/Resources/Strings.sr.resx index e3d61ccc..e7ed7fc8 100644 --- a/GridCore/Resources/Strings.sr.resx +++ b/GridCore/Resources/Strings.sr.resx @@ -144,6 +144,9 @@ Филтрирај ову колону + + Иди на + Превуците овде колоне за груписање diff --git a/GridCore/Resources/Strings.tr.resx b/GridCore/Resources/Strings.tr.resx index 23ae3760..9ad8ceee 100644 --- a/GridCore/Resources/Strings.tr.resx +++ b/GridCore/Resources/Strings.tr.resx @@ -144,6 +144,9 @@ Bu sütuna göre filtrele + + Git + Gruplamak için sütunları buraya bırakın diff --git a/GridCore/Resources/Strings.uk.resx b/GridCore/Resources/Strings.uk.resx index e575b04c..21bf3eaf 100644 --- a/GridCore/Resources/Strings.uk.resx +++ b/GridCore/Resources/Strings.uk.resx @@ -174,4 +174,7 @@ Так + + Йти до + \ No newline at end of file diff --git a/GridMvc/Resources/css/gridmvc.css b/GridMvc/Resources/css/gridmvc.css index 3384e49a..5b24bb57 100644 --- a/GridMvc/Resources/css/gridmvc.css +++ b/GridMvc/Resources/css/gridmvc.css @@ -18,7 +18,7 @@ table.grid-table { margin: 0; } table.grid-table .grid-header > .grid-header-group > .grid-header-title > button { font-weight: bold; color: #007bff; background-color: white; border: none } table.grid-table .grid-header > .grid-header-group > .grid-header-title > button:hover { color: #0056b3; text-decoration: underline } table.grid-table .grid-header > .grid-header-group > .grid-header-title > button:focus { outline: 0; } - + /* Grid body */ table.grid-table tr.grid-row-selected td { background: #4888C2 !important; color: white; } table.grid-table tr.grid-row-selected a { color: white; } @@ -66,10 +66,10 @@ div[dir="rtl"] .grid-dropdown-arrow { left: 255px; } div[dir="rtl"] .grid-dropdown input.grid-filter-list { margin: 5px 20px 5px 10px; } /*Grid footer*/ -.grid-footer { display: inline-flex; width: 100%; justify-content: space-between; } -.grid-itemscount { display: inline-flex; margin-top: 10px; } +.grid-footer { display: inline-flex; width: 100%; margin-top: 10px; justify-content: space-between; } +.grid-itemscount { display: inline-flex; margin-top: 6px; } .grid-itemscount-label, .grid-itemscount-caption { margin-left: 5px; margin-right: 5px; } -.grid-pager { margin-top: 20px; } +.grid-pager-sizer { display: inline-flex; } .grid-pager ul { padding: 0; } .page-link:focus { box-shadow: none; } .page-item:first-child .page-link { border-radius: 4px 0 0 4px; } @@ -105,9 +105,11 @@ div[dir="rtl"] button.grid-search-clear { border-radius: 4px 0 0 4px;} input.grid-search-input {height: 34px; border-color: #ccc; } /* Grid change page size */ -.grid-change-page-size { display:inline-flex; width: 250px; margin: 10px 20px; } -.grid-change-page-size label { margin: 6px 10px; } -.grid-change-page-size-input { display:inline; width: 60px; margin-left:5px; margin-right:5px; } +.grid-change-page-size, .grid-goto-page { display:inline-flex; margin: 0px 20px; } +.grid-change-page-size { width: 250px; } +.grid-goto-page { width: 150px; } +.grid-change-page-size label, .grid-goto-page label { margin: 6px 10px; } +.grid-change-page-size-input, .grid-goto-page-input { display:inline; width: 60px; margin-left:5px; margin-right:5px; } /* Grid extended sorting */ .grid-extsort-droppable { height: 42px; width: 100%; margin-bottom:10px; border: 1px solid #ccc; border-radius: 4px; } diff --git a/GridMvc/Resources/css/gridmvc.min.css b/GridMvc/Resources/css/gridmvc.min.css index 3ef66a15..884d5e6b 100644 --- a/GridMvc/Resources/css/gridmvc.min.css +++ b/GridMvc/Resources/css/gridmvc.min.css @@ -1 +1 @@ -.grid-mvc:focus{outline:none}.grid-table-wrap{overflow:auto}.grid-table-head{overflow:hidden}.grid-table-body{overflow:auto}.grid-error{color:#f00}table.grid-table{margin:0}table.grid-table .grid-wrap{padding:0;position:relative}table.grid-table .grid-empty-text{color:#666}table.grid-table .grid-header{position:relative;vertical-align:top}table.grid-table .grid-header .sorted-asc .grid-sort-arrow::after{content:" ↑"}table.grid-table .grid-header .sorted-desc .grid-sort-arrow::after{content:" ↓"}table.grid-table .grid-header>.grid-header-group{display:flex}table.grid-table .grid-header>.grid-header-group>.grid-header-title{width:100%;margin-right:15px;white-space:nowrap}div[dir="rtl"] table.grid-table .grid-header>.grid-header-group>.grid-header-title{margin-left:15px;margin-right:0}table.grid-table .grid-header>.grid-header-group>.grid-header-title>button{font-weight:bold;color:#007bff;background-color:#fff;border:none}table.grid-table .grid-header>.grid-header-group>.grid-header-title>button:hover{color:#0056b3;text-decoration:underline}table.grid-table .grid-header>.grid-header-group>.grid-header-title>button:focus{outline:0}table.grid-table tr.grid-row-selected td{background:#4888c2 !important;color:#fff}table.grid-table tr.grid-row-selected a{color:#fff}table.striped>tbody>tr.grid-row:nth-of-type(odd){background-color:#f9f9f9}table.substriped>tbody>tr.grid-row:nth-of-type(4n+1){background-color:#f9f9f9}table.grid-table tr.grid-totals-row td{border-color:#aaa;background:#eee !important}input.grid-filter-input{padding:4px}table.grid-table .grid-filter{position:relative;margin-top:2px;margin-bottom:10px;float:right;width:10px}table.grid-table .grid-filter-btn{cursor:pointer;display:block;width:10px;height:12px;background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAMCAYAAABbayygAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAJFJREFUKFNjkJSU/E8MZvj//78DMRhkoj+6bizYH2SiiIeHx2FjY+P/2DBIDqSGAQSOHTtmYWZm9hldEUgMJAdWBAJAHSzt7e056ApBYiA5qDIIAAoIhIaGroYpArFBYlBpVLB3715DmEIQGyqMCUDWwBRiWIkOYAqhXNwApMjX13c7lIsbgBQBrdWAcqGAgQEAdOGTrvsYKXIAAAAASUVORK5CYII=') no-repeat}table.grid-table .grid-filter-btn.filtered{background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAMCAYAAABbayygAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAJNJREFUKFNjYGj//58o/P//fwdiMIOkpKQ/VhOQMFgNULWIh4fHYWNj4//YMEgOpIYBBI4dO2ZhZmb2GV0RSAwkB1YEAkAdLO3t7TnoCkFiIDmoMggACgiEhoauhikCsUFiUGlUsHfvXkOYQhAbKowJQNbAFGJYiQ5gCqFc3ACkyNfXdzuUixuAFAGt1YByoYCBAQAUDanUpFB4UQAAAABJRU5ErkJggg==') no-repeat}table.grid-table .grid-filter-buttons{padding:0}table.grid-table .grid-filter-buttons button{margin-right:5px}div[dir="rtl"] table.grid-table .grid-filter-buttons button{margin-right:0;margin-left:5px}table.grid-table .grid-filter-buttons button:last-child{margin-right:0}div[dir="rtl"] table.grid-table .grid-filter-buttons button:last-child{margin-left:0}table.grid-table .grid-filter-datepicker table td{padding:1px!important}table.grid-table .grid-filter-datepicker .ui-datepicker{width:auto}table.grid-table .grid-dropdown-inner ul.menu-list li a.grid-filter-clear{white-space:nowrap;padding-left:23px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAMCAYAAABbayygAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAARpJREFUKFNjYGj//58o/P//fwdiMIOkpKQ/VhOQMFgNULWIh4fHYWNj4//YMEgOpIYBBI4dO2axOC/396GinP/O+vpwRVbGxl92+vluXm1kuASsEKiD5VB99aG3eTH/HxjL/A/RUPsfrqb6f7e21uutlhbRYEUwAFQskOLmun2+lND/0xxM/7dycXzd6OxoCpVGBduWLjXv4+f/v5WF+f9RbtYvfeysqlApBKhhY2Hcxsy0+xAL038nbe3/m8W4ss/Jcx2GSiPAal6uvGtczP9TFOXBHgGJ7RHlmLGOjy0UrAAGzgT7rn7urP/P3NDgv6+v73aQWAMzM+dqTtbJYAUwsNzeyuhImE8GSBHQYxpQYYYJQCcxMDAwAAB7/bt5uWh9FAAAAABJRU5ErkJggg==');background-position:3px center;background-repeat:no-repeat}div[dir="rtl"] table.grid-table .grid-dropdown-inner ul.menu-list li a.grid-filter-clear{padding-left:0;padding-right:23px;background-position:right}table.grid-table .grid-filter-choose.choose-selected{background-color:#fff!important;cursor:default;color:#999}table.grid-table .grid-popup-additional{padding:3px 0 0 0}.grid-tooltip{position:relative;margin-top:0}.grid-tooltip-dropdown{font-weight:normal;left:-102px;top:16px!important;margin-top:-5px;min-width:300px}div[dir="rtl"] .grid-tooltip-dropdown{left:0;right:-102px}.grid-dropdown{font-weight:normal;left:-102px;top:16px!important;min-width:360px}div[dir="rtl"] .grid-dropdown{left:-258px}.grid-dropdown-arrow{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAICAYAAADJEc7MAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwgAADsIBFShKgAAAABp0RVh0U29mdHdhcmUAUGFpbnQuTkVUIHYzLjUuMTAw9HKhAAAAl0lEQVQoU42PMQuFMAyE6xN5gpOjjsIb/P9/o3O3zh27dY25kIPq8DBwmLT35WoQkUEVOmGec84CaW2q7+N+AdCD6M9SisQYTei1jsfyCeCu+vjFVGs1AN++94DRfUOfuNLoKUiyRC5y2F5I8NdaM4P/l0EswvBorQTnfxBhLMRih+2pklIy+eEtjQPu6MNZwIBNbwteMBd5X4ZGHcwL3QAAAABJRU5ErkJggg==") no-repeat;height:8px;left:99px;position:absolute;top:-8px;width:14px}div[dir="rtl"] .grid-dropdown-arrow{left:255px}.grid-dropdown-inner{padding:5px 7px}.grid-dropdown ul.menu-list{list-style-type:none;margin:3px 0 0 0;padding:0}.grid-dropdown ul.menu-list li a{text-decoration:none;background-position:6px center;background-repeat:no-repeat;display:flex;padding:4px 5px}.grid-dropdown ul.menu-list li a:hover{background-color:#eee;text-decoration:none}.grid-dropdown input.grid-filter-input{width:100%}.grid-dropdown select.grid-filter-type{width:100%}.grid-dropdown input.grid-filter-list{margin:5px 10px 5px 20px}div[dir="rtl"] .grid-dropdown input.grid-filter-list{margin:5px 20px 5px 10px}.grid-footer{display:inline-flex;width:100%;justify-content:space-between}.grid-itemscount{display:inline-flex;margin-top:10px}.grid-itemscount-label,.grid-itemscount-caption{margin-left:5px;margin-right:5px}.grid-pager{margin-top:20px}.grid-pager ul{padding:0}.page-link:focus{box-shadow:none}.page-item:first-child .page-link{border-radius:4px 0 0 4px}div[dir="rtl"] .page-item:first-child .page-link{border-radius:0 4px 4px 0}.page-item:last-child .page-link{border-radius:0 4px 4px 0}div[dir="rtl"] .page-item:last-child .page-link{border-radius:4px 0 0 4px}.subgrid-caret{cursor:pointer;user-select:none}.subgrid-caret::after{content:"▷"}div[dir="rtl"] .subgrid-caret::after{content:"◁"}.subgrid-caret-down{cursor:pointer;user-select:none}.subgrid-caret-down::after{content:"◢"}div[dir="rtl"] .subgrid-caret-down::after{content:"◣"}.grid-button{background-color:#333}.grid-button:hover{border-color:#666}.grid-buttons{display:inline-flex;width:100%;justify-content:space-between}.grid-header-buttons{display:inline-flex}.grid-search{margin-top:10px;margin-bottom:10px}button.grid-button{height:34px;color:#333;border:1px solid #aaa;border-radius:4px}button.grid-search-apply{padding-left:20px;border-radius:4px 0 0 4px;background-repeat:no-repeat,no-repeat;background-position-x:8px,0;background-position-y:8px,0;background-image:url('data:image/svg+xml;utf8,'),linear-gradient(#ddd,#eee)}div[dir="rtl"] button.grid-search-apply{border-radius:0 4px 4px 0}button.grid-search-clear{padding-left:22px;border-radius:0 4px 4px 0;background-repeat:no-repeat,no-repeat;background-position-x:8px,0;background-position-y:8px,0;background-image:url('data:image/svg+xml;utf8,'),linear-gradient(#ddd,#eee)}div[dir="rtl"] button.grid-search-clear{border-radius:4px 0 0 4px}input.grid-search-input{height:34px;border-color:#ccc}.grid-change-page-size{display:inline-flex;width:250px;margin:10px 20px}.grid-change-page-size label{margin:6px 10px}.grid-change-page-size-input{display:inline;width:60px;margin-left:5px;margin-right:5px}.grid-extsort-droppable{height:42px;width:100%;margin-bottom:10px;border:1px solid #ccc;border-radius:4px}.grid-extsort-column{height:28px;display:inline-block;margin:6px 0 6px 20px;padding:5px;background-color:#efefef;border:1px solid #ccc;border-radius:4px}div[dir="rtl"] .grid-extsort-column{margin:6px 20px 6px 0}.grid-extsort-column .sorted-asc .grid-sort-arrow::after{content:" ↑"}.grid-extsort-column .sorted-desc .grid-sort-arrow::after{content:" ↓"}.grid-extsort-column a{font-weight:700}.grid-extsort-column>a{margin-left:10px;margin-right:5px}div[dir="rtl"] .grid-extsort-column>a{margin-left:5px;margin-right:10px}.grid-extsort-column button{border:none;padding:0;font-size:14px;font-weight:700}.grid-extsort-column>button{margin-left:10px;margin-right:5px}div[dir="rtl"] .grid-extsort-column>button{margin-left:5px;margin-right:10px}.grid-extsort-empty{font-size:14px;height:20px;margin:10px;color:#aaa}.grid-group-caret{margin-right:10px;cursor:pointer;user-select:none}div[dir="rtl"] .grid-group-caret{margin-left:10px;margin-right:0}.grid-group-caret::after{content:"▷"}.grid-group-caret-down{margin-right:10px;cursor:pointer;user-select:none}div[dir="rtl"] .grid-group-caret-down{margin-left:10px;margin-right:0}.grid-group-caret-down::after{content:"◢"}.grid-group-tab{margin-left:20px}div[dir="rtl"] .grid-group-tab{margin-left:0;margin-right:20px}.grid-group-row{background:#eee}.grid-crud{margin-top:10px;margin-bottom:10px;margin-left:0;margin-right:5px}div[dir="rtl"] .grid-crud{margin-left:5px;margin-right:0}.grid-crud:first-child{margin-left:0}div[dir="rtl"] .grid-crud:first-child{margin-right:0}button.grid-button-add{width:32px;margin-right:5px;background-repeat:no-repeat,no-repeat;background-position-x:7px,0;background-position-y:8px,0;background-image:url('data:image/svg+xml;utf8,'),linear-gradient(#ddd,#eee)}div[dir="rtl"] button.grid-button-add{margin-left:5px;margin-right:0}button.grid-button-view{width:30px;height:30px;margin-right:5px;background-repeat:no-repeat,no-repeat;background-position-x:7px,0;background-position-y:7px,0;background-image:url('data:image/svg+xml;utf8,'),linear-gradient(#ddd,#eee)}div[dir="rtl"] button.grid-button-view{margin-left:5px;margin-right:0}button.grid-button-edit{width:30px;height:30px;margin-right:5px;background-repeat:no-repeat,no-repeat;background-position-x:7px,0;background-position-y:7px,0;background-image:url('data:image/svg+xml;utf8,'),linear-gradient(#ddd,#eee)}div[dir="rtl"] button.grid-button-edit{margin-left:5px;margin-right:0}button.grid-button-delete{width:30px;height:30px;margin-right:5px;background-repeat:no-repeat,no-repeat;background-position-x:7px,0;background-position-y:7px,0;background-image:url('data:image/svg+xml;utf8,'),linear-gradient(#ddd,#eee)}div[dir="rtl"] button.grid-button-delete{margin-left:5px;margin-right:0}button.grid-button-header-view{width:34px;height:34px;margin-right:5px;background-repeat:no-repeat,no-repeat;background-position-x:8px,0;background-position-y:8px,0;background-image:url('data:image/svg+xml;utf8,'),linear-gradient(#ddd,#eee)}div[dir="rtl"] button.grid-button-header-view{margin-left:5px;margin-right:0}button.grid-button-header-edit{width:34px;height:34px;margin-right:5px;background-repeat:no-repeat,no-repeat;background-position-x:8px,0;background-position-y:8px,0;background-image:url('data:image/svg+xml;utf8,'),linear-gradient(#ddd,#eee)}div[dir="rtl"] button.grid-button-header-edit{margin-left:5px;margin-right:0}button.grid-button-header-delete{width:34px;height:34px;margin-right:5px;background-repeat:no-repeat,no-repeat;background-position-x:9px,0;background-position-y:8px,0;background-image:url('data:image/svg+xml;utf8,'),linear-gradient(#ddd,#eee)}div[dir="rtl"] button.grid-button-header-delete{margin-left:5px;margin-right:0}button.grid-button-label-add{height:34px;margin-right:5px}div[dir="rtl"] button.grid-button-label-add{margin-left:5px;margin-right:0}button.grid-button-label-view{height:30px;margin-right:5px}div[dir="rtl"] button.grid-button-label-view{margin-left:5px;margin-right:0}button.grid-button-label-edit{height:30px;margin-right:5px}div[dir="rtl"] button.grid-button-label-edit{margin-left:5px;margin-right:0}button.grid-button-label-delete{height:30px;margin-right:5px}div[dir="rtl"] button.grid-button-label-delete{margin-left:5px;margin-right:0}button.grid-button-header-label-view{height:34px;margin-right:5px}div[dir="rtl"] button.grid-button-header-label-view{margin-left:5px;margin-right:0}button.grid-button-header-label-edit{height:34px;margin-right:5px}div[dir="rtl"] button.grid-button-header-label-edit{margin-left:5px;margin-right:0}button.grid-button-header-label-delete{height:34px;margin-right:5px}div[dir="rtl"] button.grid-button-header-label-delete{margin-left:5px;margin-right:0}td.grid-button-cell{padding:5px 0 5px 0;width:34px}.input-validation-error{border:1px solid #f00}.field-validation-error{color:#f00}button.grid-button-input-file{border-radius:0 4px 4px 0;background-image:linear-gradient(#ddd,#eee);font-weight:bold}div[dir="rtl"] button.grid-button-input-file{border-radius:4px 0 0 4px}.grid-crud-header{font-size:2rem;margin:1rem 0 1rem 0}.grid-all-filters-clear{margin-top:10px;margin-bottom:10px;margin-left:15px;margin-right:5px}.grid-all-filters-clear:first-child{margin-left:0}div[dir="rtl"] .grid-all-filters-clear:first-child{margin-right:0}button.grid-button-all-filters-clear{width:32px;margin-right:5px;background-repeat:no-repeat,no-repeat;background-position-x:10px,0;background-position-y:10px,0;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAMCAYAAABbayygAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAARpJREFUKFNjYGj//58o/P//fwdiMIOkpKQ/VhOQMFgNULWIh4fHYWNj4//YMEgOpIYBBI4dO2axOC/396GinP/O+vpwRVbGxl92+vluXm1kuASsEKiD5VB99aG3eTH/HxjL/A/RUPsfrqb6f7e21uutlhbRYEUwAFQskOLmun2+lND/0xxM/7dycXzd6OxoCpVGBduWLjXv4+f/v5WF+f9RbtYvfeysqlApBKhhY2Hcxsy0+xAL038nbe3/m8W4ss/Jcx2GSiPAal6uvGtczP9TFOXBHgGJ7RHlmLGOjy0UrAAGzgT7rn7urP/P3NDgv6+v73aQWAMzM+dqTtbJYAUwsNzeyuhImE8GSBHQYxpQYYYJQCcxMDAwAAB7/bt5uWh9FAAAAABJRU5ErkJggg=='),linear-gradient(#ddd,#eee)}div[dir="rtl"] button.grid-button-all-filters-clear{margin-left:5px;margin-right:0}.grid-excel{margin-top:10px;margin-bottom:10px;margin-left:15px;margin-right:5px}.grid-excel:first-child{margin-left:0}div[dir="rtl"] .grid-excel:first-child{margin-right:0}button.grid-button-excel{width:32px;margin-right:5px;background-repeat:no-repeat,no-repeat;background-position-x:7px,0;background-position-y:8px,0;background-image:url('data:image/svg+xml;utf8,'),linear-gradient(#ddd,#eee)}div[dir="rtl"] button.grid-button-excel{margin-left:5px;margin-right:0}.grid-button-components{margin-top:10px;margin-bottom:10px;margin-left:0;margin-right:5px}div[dir="rtl"] .grid-button-components{margin-left:5px;margin-right:0}.grid-button-components:first-child{margin-left:0}div[dir="rtl"] .grid-button-components:first-child{margin-right:0}button.grid-button-component{min-width:32px;margin-right:5px;background:-o-linear-gradient(top,#ddd 0%,#eee 100%);background:-moz-linear-gradient(top,#ddd 0%,#eee 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#ddd),color-stop(1,#eee))}div[dir="rtl"] button.grid-button-component{margin-left:5px;margin-right:0}.grid-header-checkbox-input{opacity:0}.grid-header-checkbox-input~.null-checkbox::before{position:absolute;top:1rem;display:block;width:.9rem;height:.9rem;pointer-events:none;content:"";border:.5px solid #666;border-radius:3px;background-color:#ccc}div[dir="rtl"] label{display:flex}.grid-switch{position:relative;display:inline-block;width:50px;height:24px;margin-left:16px;margin-right:16px;margin-bottom:-8px}.grid-switch input{display:none}.grid-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.4s;transition:.4s}.grid-slider:before{position:absolute;content:"";height:16px;width:16px;left:4px;bottom:4px;background-color:#fff;-webkit-transition:.4s;transition:.4s}input:checked+.grid-slider{background-color:#ccc}input:focus+.grid-slider{box-shadow:0 0 1px #ccc}input:checked+.grid-slider:before{-webkit-transform:translateX(26px);-ms-transform:translateX(26px);transform:translateX(26px)}.grid-slider.round{border-radius:24px}.grid-slider.round:before{border-radius:50%} \ No newline at end of file +.grid-mvc:focus{outline:none}.grid-table-wrap{overflow:auto}.grid-table-head{overflow:hidden}.grid-table-body{overflow:auto}.grid-error{color:#f00}table.grid-table{margin:0}table.grid-table .grid-wrap{padding:0;position:relative}table.grid-table .grid-empty-text{color:#666}table.grid-table .grid-header{position:relative;vertical-align:top}table.grid-table .grid-header .sorted-asc .grid-sort-arrow::after{content:" ↑"}table.grid-table .grid-header .sorted-desc .grid-sort-arrow::after{content:" ↓"}table.grid-table .grid-header>.grid-header-group{display:flex}table.grid-table .grid-header>.grid-header-group>.grid-header-title{width:100%;margin-right:15px;white-space:nowrap}div[dir="rtl"] table.grid-table .grid-header>.grid-header-group>.grid-header-title{margin-left:15px;margin-right:0}table.grid-table .grid-header>.grid-header-group>.grid-header-title>button{font-weight:bold;color:#007bff;background-color:#fff;border:none}table.grid-table .grid-header>.grid-header-group>.grid-header-title>button:hover{color:#0056b3;text-decoration:underline}table.grid-table .grid-header>.grid-header-group>.grid-header-title>button:focus{outline:0}table.grid-table tr.grid-row-selected td{background:#4888c2 !important;color:#fff}table.grid-table tr.grid-row-selected a{color:#fff}table.striped>tbody>tr.grid-row:nth-of-type(odd){background-color:#f9f9f9}table.substriped>tbody>tr.grid-row:nth-of-type(4n+1){background-color:#f9f9f9}table.grid-table tr.grid-totals-row td{border-color:#aaa;background:#eee !important}input.grid-filter-input{padding:4px}table.grid-table .grid-filter{position:relative;margin-top:2px;margin-bottom:10px;float:right;width:10px}table.grid-table .grid-filter-btn{cursor:pointer;display:block;width:10px;height:12px;background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAMCAYAAABbayygAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAJFJREFUKFNjkJSU/E8MZvj//78DMRhkoj+6bizYH2SiiIeHx2FjY+P/2DBIDqSGAQSOHTtmYWZm9hldEUgMJAdWBAJAHSzt7e056ApBYiA5qDIIAAoIhIaGroYpArFBYlBpVLB3715DmEIQGyqMCUDWwBRiWIkOYAqhXNwApMjX13c7lIsbgBQBrdWAcqGAgQEAdOGTrvsYKXIAAAAASUVORK5CYII=') no-repeat}table.grid-table .grid-filter-btn.filtered{background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAMCAYAAABbayygAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAJNJREFUKFNjYGj//58o/P//fwdiMIOkpKQ/VhOQMFgNULWIh4fHYWNj4//YMEgOpIYBBI4dO2ZhZmb2GV0RSAwkB1YEAkAdLO3t7TnoCkFiIDmoMggACgiEhoauhikCsUFiUGlUsHfvXkOYQhAbKowJQNbAFGJYiQ5gCqFc3ACkyNfXdzuUixuAFAGt1YByoYCBAQAUDanUpFB4UQAAAABJRU5ErkJggg==') no-repeat}table.grid-table .grid-filter-buttons{padding:0}table.grid-table .grid-filter-buttons button{margin-right:5px}div[dir="rtl"] table.grid-table .grid-filter-buttons button{margin-right:0;margin-left:5px}table.grid-table .grid-filter-buttons button:last-child{margin-right:0}div[dir="rtl"] table.grid-table .grid-filter-buttons button:last-child{margin-left:0}table.grid-table .grid-filter-datepicker table td{padding:1px!important}table.grid-table .grid-filter-datepicker .ui-datepicker{width:auto}table.grid-table .grid-dropdown-inner ul.menu-list li a.grid-filter-clear{white-space:nowrap;padding-left:23px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAMCAYAAABbayygAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAARpJREFUKFNjYGj//58o/P//fwdiMIOkpKQ/VhOQMFgNULWIh4fHYWNj4//YMEgOpIYBBI4dO2axOC/396GinP/O+vpwRVbGxl92+vluXm1kuASsEKiD5VB99aG3eTH/HxjL/A/RUPsfrqb6f7e21uutlhbRYEUwAFQskOLmun2+lND/0xxM/7dycXzd6OxoCpVGBduWLjXv4+f/v5WF+f9RbtYvfeysqlApBKhhY2Hcxsy0+xAL038nbe3/m8W4ss/Jcx2GSiPAal6uvGtczP9TFOXBHgGJ7RHlmLGOjy0UrAAGzgT7rn7urP/P3NDgv6+v73aQWAMzM+dqTtbJYAUwsNzeyuhImE8GSBHQYxpQYYYJQCcxMDAwAAB7/bt5uWh9FAAAAABJRU5ErkJggg==');background-position:3px center;background-repeat:no-repeat}div[dir="rtl"] table.grid-table .grid-dropdown-inner ul.menu-list li a.grid-filter-clear{padding-left:0;padding-right:23px;background-position:right}table.grid-table .grid-filter-choose.choose-selected{background-color:#fff!important;cursor:default;color:#999}table.grid-table .grid-popup-additional{padding:3px 0 0 0}.grid-tooltip{position:relative;margin-top:0}.grid-tooltip-dropdown{font-weight:normal;left:-102px;top:16px!important;margin-top:-5px;min-width:300px}div[dir="rtl"] .grid-tooltip-dropdown{left:0;right:-102px}.grid-dropdown{font-weight:normal;left:-102px;top:16px!important;min-width:360px}div[dir="rtl"] .grid-dropdown{left:-258px}.grid-dropdown-arrow{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAICAYAAADJEc7MAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwgAADsIBFShKgAAAABp0RVh0U29mdHdhcmUAUGFpbnQuTkVUIHYzLjUuMTAw9HKhAAAAl0lEQVQoU42PMQuFMAyE6xN5gpOjjsIb/P9/o3O3zh27dY25kIPq8DBwmLT35WoQkUEVOmGec84CaW2q7+N+AdCD6M9SisQYTei1jsfyCeCu+vjFVGs1AN++94DRfUOfuNLoKUiyRC5y2F5I8NdaM4P/l0EswvBorQTnfxBhLMRih+2pklIy+eEtjQPu6MNZwIBNbwteMBd5X4ZGHcwL3QAAAABJRU5ErkJggg==") no-repeat;height:8px;left:99px;position:absolute;top:-8px;width:14px}div[dir="rtl"] .grid-dropdown-arrow{left:255px}.grid-dropdown-inner{padding:5px 7px}.grid-dropdown ul.menu-list{list-style-type:none;margin:3px 0 0 0;padding:0}.grid-dropdown ul.menu-list li a{text-decoration:none;background-position:6px center;background-repeat:no-repeat;display:flex;padding:4px 5px}.grid-dropdown ul.menu-list li a:hover{background-color:#eee;text-decoration:none}.grid-dropdown input.grid-filter-input{width:100%}.grid-dropdown select.grid-filter-type{width:100%}.grid-dropdown input.grid-filter-list{margin:5px 10px 5px 20px}div[dir="rtl"] .grid-dropdown input.grid-filter-list{margin:5px 20px 5px 10px}.grid-footer{display:inline-flex;width:100%;margin-top:10px;justify-content:space-between}.grid-itemscount{display:inline-flex;margin-top:6px}.grid-itemscount-label,.grid-itemscount-caption{margin-left:5px;margin-right:5px}.grid-pager-sizer{display:inline-flex}.grid-pager ul{padding:0}.page-link:focus{box-shadow:none}.page-item:first-child .page-link{border-radius:4px 0 0 4px}div[dir="rtl"] .page-item:first-child .page-link{border-radius:0 4px 4px 0}.page-item:last-child .page-link{border-radius:0 4px 4px 0}div[dir="rtl"] .page-item:last-child .page-link{border-radius:4px 0 0 4px}.subgrid-caret{cursor:pointer;user-select:none}.subgrid-caret::after{content:"▷"}div[dir="rtl"] .subgrid-caret::after{content:"◁"}.subgrid-caret-down{cursor:pointer;user-select:none}.subgrid-caret-down::after{content:"◢"}div[dir="rtl"] .subgrid-caret-down::after{content:"◣"}.grid-button{background-color:#333}.grid-button:hover{border-color:#666}.grid-buttons{display:inline-flex;width:100%;justify-content:space-between}.grid-header-buttons{display:inline-flex}.grid-search{margin-top:10px;margin-bottom:10px}button.grid-button{height:34px;color:#333;border:1px solid #aaa;border-radius:4px}button.grid-search-apply{padding-left:20px;border-radius:4px 0 0 4px;background-repeat:no-repeat,no-repeat;background-position-x:8px,0;background-position-y:8px,0;background-image:url('data:image/svg+xml;utf8,'),linear-gradient(#ddd,#eee)}div[dir="rtl"] button.grid-search-apply{border-radius:0 4px 4px 0}button.grid-search-clear{padding-left:22px;border-radius:0 4px 4px 0;background-repeat:no-repeat,no-repeat;background-position-x:8px,0;background-position-y:8px,0;background-image:url('data:image/svg+xml;utf8,'),linear-gradient(#ddd,#eee)}div[dir="rtl"] button.grid-search-clear{border-radius:4px 0 0 4px}input.grid-search-input{height:34px;border-color:#ccc}.grid-change-page-size,.grid-goto-page{display:inline-flex;margin:0 20px}.grid-change-page-size{width:250px}.grid-goto-page{width:150px}.grid-change-page-size label,.grid-goto-page label{margin:6px 10px}.grid-change-page-size-input,.grid-goto-page-input{display:inline;width:60px;margin-left:5px;margin-right:5px}.grid-extsort-droppable{height:42px;width:100%;margin-bottom:10px;border:1px solid #ccc;border-radius:4px}.grid-extsort-column{height:28px;display:inline-block;margin:6px 0 6px 20px;padding:5px;background-color:#efefef;border:1px solid #ccc;border-radius:4px}div[dir="rtl"] .grid-extsort-column{margin:6px 20px 6px 0}.grid-extsort-column .sorted-asc .grid-sort-arrow::after{content:" ↑"}.grid-extsort-column .sorted-desc .grid-sort-arrow::after{content:" ↓"}.grid-extsort-column a{font-weight:700}.grid-extsort-column>a{margin-left:10px;margin-right:5px}div[dir="rtl"] .grid-extsort-column>a{margin-left:5px;margin-right:10px}.grid-extsort-column button{border:none;padding:0;font-size:14px;font-weight:700}.grid-extsort-column>button{margin-left:10px;margin-right:5px}div[dir="rtl"] .grid-extsort-column>button{margin-left:5px;margin-right:10px}.grid-extsort-empty{font-size:14px;height:20px;margin:10px;color:#aaa}.grid-group-caret{margin-right:10px;cursor:pointer;user-select:none}div[dir="rtl"] .grid-group-caret{margin-left:10px;margin-right:0}.grid-group-caret::after{content:"▷"}.grid-group-caret-down{margin-right:10px;cursor:pointer;user-select:none}div[dir="rtl"] .grid-group-caret-down{margin-left:10px;margin-right:0}.grid-group-caret-down::after{content:"◢"}.grid-group-tab{margin-left:20px}div[dir="rtl"] .grid-group-tab{margin-left:0;margin-right:20px}.grid-group-row{background:#eee}.grid-crud{margin-top:10px;margin-bottom:10px;margin-left:0;margin-right:5px}div[dir="rtl"] .grid-crud{margin-left:5px;margin-right:0}.grid-crud:first-child{margin-left:0}div[dir="rtl"] .grid-crud:first-child{margin-right:0}button.grid-button-add{width:32px;margin-right:5px;background-repeat:no-repeat,no-repeat;background-position-x:7px,0;background-position-y:8px,0;background-image:url('data:image/svg+xml;utf8,'),linear-gradient(#ddd,#eee)}div[dir="rtl"] button.grid-button-add{margin-left:5px;margin-right:0}button.grid-button-view{width:30px;height:30px;margin-right:5px;background-repeat:no-repeat,no-repeat;background-position-x:7px,0;background-position-y:7px,0;background-image:url('data:image/svg+xml;utf8,'),linear-gradient(#ddd,#eee)}div[dir="rtl"] button.grid-button-view{margin-left:5px;margin-right:0}button.grid-button-edit{width:30px;height:30px;margin-right:5px;background-repeat:no-repeat,no-repeat;background-position-x:7px,0;background-position-y:7px,0;background-image:url('data:image/svg+xml;utf8,'),linear-gradient(#ddd,#eee)}div[dir="rtl"] button.grid-button-edit{margin-left:5px;margin-right:0}button.grid-button-delete{width:30px;height:30px;margin-right:5px;background-repeat:no-repeat,no-repeat;background-position-x:7px,0;background-position-y:7px,0;background-image:url('data:image/svg+xml;utf8,'),linear-gradient(#ddd,#eee)}div[dir="rtl"] button.grid-button-delete{margin-left:5px;margin-right:0}button.grid-button-header-view{width:34px;height:34px;margin-right:5px;background-repeat:no-repeat,no-repeat;background-position-x:8px,0;background-position-y:8px,0;background-image:url('data:image/svg+xml;utf8,'),linear-gradient(#ddd,#eee)}div[dir="rtl"] button.grid-button-header-view{margin-left:5px;margin-right:0}button.grid-button-header-edit{width:34px;height:34px;margin-right:5px;background-repeat:no-repeat,no-repeat;background-position-x:8px,0;background-position-y:8px,0;background-image:url('data:image/svg+xml;utf8,'),linear-gradient(#ddd,#eee)}div[dir="rtl"] button.grid-button-header-edit{margin-left:5px;margin-right:0}button.grid-button-header-delete{width:34px;height:34px;margin-right:5px;background-repeat:no-repeat,no-repeat;background-position-x:9px,0;background-position-y:8px,0;background-image:url('data:image/svg+xml;utf8,'),linear-gradient(#ddd,#eee)}div[dir="rtl"] button.grid-button-header-delete{margin-left:5px;margin-right:0}button.grid-button-label-add{height:34px;margin-right:5px}div[dir="rtl"] button.grid-button-label-add{margin-left:5px;margin-right:0}button.grid-button-label-view{height:30px;margin-right:5px}div[dir="rtl"] button.grid-button-label-view{margin-left:5px;margin-right:0}button.grid-button-label-edit{height:30px;margin-right:5px}div[dir="rtl"] button.grid-button-label-edit{margin-left:5px;margin-right:0}button.grid-button-label-delete{height:30px;margin-right:5px}div[dir="rtl"] button.grid-button-label-delete{margin-left:5px;margin-right:0}button.grid-button-header-label-view{height:34px;margin-right:5px}div[dir="rtl"] button.grid-button-header-label-view{margin-left:5px;margin-right:0}button.grid-button-header-label-edit{height:34px;margin-right:5px}div[dir="rtl"] button.grid-button-header-label-edit{margin-left:5px;margin-right:0}button.grid-button-header-label-delete{height:34px;margin-right:5px}div[dir="rtl"] button.grid-button-header-label-delete{margin-left:5px;margin-right:0}td.grid-button-cell{padding:5px 0 5px 0;width:34px}.input-validation-error{border:1px solid #f00}.field-validation-error{color:#f00}button.grid-button-input-file{border-radius:0 4px 4px 0;background-image:linear-gradient(#ddd,#eee);font-weight:bold}div[dir="rtl"] button.grid-button-input-file{border-radius:4px 0 0 4px}.grid-crud-header{font-size:2rem;margin:1rem 0 1rem 0}.grid-all-filters-clear{margin-top:10px;margin-bottom:10px;margin-left:15px;margin-right:5px}.grid-all-filters-clear:first-child{margin-left:0}div[dir="rtl"] .grid-all-filters-clear:first-child{margin-right:0}button.grid-button-all-filters-clear{width:32px;margin-right:5px;background-repeat:no-repeat,no-repeat;background-position-x:10px,0;background-position-y:10px,0;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAMCAYAAABbayygAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAARpJREFUKFNjYGj//58o/P//fwdiMIOkpKQ/VhOQMFgNULWIh4fHYWNj4//YMEgOpIYBBI4dO2axOC/396GinP/O+vpwRVbGxl92+vluXm1kuASsEKiD5VB99aG3eTH/HxjL/A/RUPsfrqb6f7e21uutlhbRYEUwAFQskOLmun2+lND/0xxM/7dycXzd6OxoCpVGBduWLjXv4+f/v5WF+f9RbtYvfeysqlApBKhhY2Hcxsy0+xAL038nbe3/m8W4ss/Jcx2GSiPAal6uvGtczP9TFOXBHgGJ7RHlmLGOjy0UrAAGzgT7rn7urP/P3NDgv6+v73aQWAMzM+dqTtbJYAUwsNzeyuhImE8GSBHQYxpQYYYJQCcxMDAwAAB7/bt5uWh9FAAAAABJRU5ErkJggg=='),linear-gradient(#ddd,#eee)}div[dir="rtl"] button.grid-button-all-filters-clear{margin-left:5px;margin-right:0}.grid-excel{margin-top:10px;margin-bottom:10px;margin-left:15px;margin-right:5px}.grid-excel:first-child{margin-left:0}div[dir="rtl"] .grid-excel:first-child{margin-right:0}button.grid-button-excel{width:32px;margin-right:5px;background-repeat:no-repeat,no-repeat;background-position-x:7px,0;background-position-y:8px,0;background-image:url('data:image/svg+xml;utf8,'),linear-gradient(#ddd,#eee)}div[dir="rtl"] button.grid-button-excel{margin-left:5px;margin-right:0}.grid-button-components{margin-top:10px;margin-bottom:10px;margin-left:0;margin-right:5px}div[dir="rtl"] .grid-button-components{margin-left:5px;margin-right:0}.grid-button-components:first-child{margin-left:0}div[dir="rtl"] .grid-button-components:first-child{margin-right:0}button.grid-button-component{min-width:32px;margin-right:5px;background:-o-linear-gradient(top,#ddd 0%,#eee 100%);background:-moz-linear-gradient(top,#ddd 0%,#eee 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#ddd),color-stop(1,#eee))}div[dir="rtl"] button.grid-button-component{margin-left:5px;margin-right:0}.grid-header-checkbox-input{opacity:0}.grid-header-checkbox-input~.null-checkbox::before{position:absolute;top:1rem;display:block;width:.9rem;height:.9rem;pointer-events:none;content:"";border:.5px solid #666;border-radius:3px;background-color:#ccc}div[dir="rtl"] label{display:flex}.grid-switch{position:relative;display:inline-block;width:50px;height:24px;margin-left:16px;margin-right:16px;margin-bottom:-8px}.grid-switch input{display:none}.grid-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.4s;transition:.4s}.grid-slider:before{position:absolute;content:"";height:16px;width:16px;left:4px;bottom:4px;background-color:#fff;-webkit-transition:.4s;transition:.4s}input:checked+.grid-slider{background-color:#ccc}input:focus+.grid-slider{box-shadow:0 0 1px #ccc}input:checked+.grid-slider:before{-webkit-transform:translateX(26px);-ms-transform:translateX(26px);transform:translateX(26px)}.grid-slider.round{border-radius:24px}.grid-slider.round:before{border-radius:50%} \ No newline at end of file diff --git a/GridMvc/Resources/js/gridmvc-ajax.js b/GridMvc/Resources/js/gridmvc-ajax.js index 5465bec7..3e73d667 100644 --- a/GridMvc/Resources/js/gridmvc-ajax.js +++ b/GridMvc/Resources/js/gridmvc-ajax.js @@ -90,6 +90,11 @@ self.pageSize = this.getPageSizeQueryData(pageSize); self.loadPage(); }, + gotoPage: function (page) { + var self = this; + self.currentPage = page; + self.loadPage(); + }, removeAllFilters: function () { var self = this; self.gridColumnFilters = null; @@ -464,6 +469,22 @@ }); }); + self.jqContainer.find(".grid-goto-page-input").each(function () { + $(this).keydown(function (e) { + if (e.keyCode === 9 || e.keyCode === 13) { + e.preventDefault(); + var page = $(this).val(); + var x = parseInt(page, 10); + if (x > 0) { + self.gotoPage(page); + } + else { + $(this).val(this.defaultValue); + } + } + }); + }); + self.jqContainer.find(".grid-button-all-filters-clear").each(function () { $(this).click(function (e) { e.preventDefault(); @@ -733,7 +754,7 @@ self.setupPagerLinkEvents(); self.initFilters(); self.initSearch(); - self.initChangePageSize(); + self.initChangePageSize();; self.initExtSort(); self.initSubGrids(); }, diff --git a/GridMvc/Resources/js/gridmvc-ajax.min.js b/GridMvc/Resources/js/gridmvc-ajax.min.js index 1e75beed..851ea476 100644 --- a/GridMvc/Resources/js/gridmvc-ajax.min.js +++ b/GridMvc/Resources/js/gridmvc-ajax.min.js @@ -1 +1 @@ -(function(n){var t=GridMvc.prototype,r={};for(var i in t)typeof t[i]=="function"&&(r[i]=t[i]);n.extend(!0,t,{parseFilterValues:function(t){for(var r=n.parseJSON(t),u=[],i=0;i0&&(s+="&"),f.gridColumnFilters="",u||(f.gridColumnFilters+=this.getFilterQueryData(i,r)),this.options.multiplefilters){for(e=0;e0&&(f.gridColumnFilters+="&");f.gridColumnFilters+=this.getFilterQueryData(n(o[e]).attr("data-name"),l)}else continue;f.initialFilters.includes(i)&&!f.clearInitialFilters.includes(i)&&f.clearInitialFilters.push(i)}else for(h=0;h0&&(s+="&"+f.gridColumnFilters);c=s;c.indexOf("?")===-1&&(c="?"+c);f.gridColumnFilters=c;f.currentPage=this.options.currentPage?this.options.currentPage:"1";f.loadPage()},applySearchValues:function(n,t){var i=this;i.gridSearch=t?"":this.getSearchQueryData(n);i.loadPage()},changePageSize:function(n){var t=this;t.pageSize=this.getPageSizeQueryData(n);t.loadPage()},removeAllFilters:function(){var n=this;n.gridColumnFilters=null;n.clearInitialFilters=[];n.loadPage()},parseExtSortValues:function(t){var i=n.parseJSON(t);return{columnName:this.urldecode(i.ColumnName),direction:i.Direction,id:i.Id}},applyExtSortValues:function(t,i,r){var u=this,e,o,f;if(u.gridExtSort=null,e=u.jqContainer.find(".grid-extsort-column"),u.gridExtSort="",this.options.extsortable)for(f=0;f0&&(u.gridExtSort+="&"),u.gridExtSort+=this.getExtSortQueryData(t,i,o.id)):(o=this.parseExtSortValues(n(e[f]).attr("data-extsortdata")),u.gridExtSort.length>0&&(u.gridExtSort+="&"),u.gridExtSort+=this.getExtSortQueryData(o.columnName,o.direction,o.id));if(r===1){var h="grid-sorting="+t,c=new RegExp(h,"g"),s=u.gridExtSort.match(c);s||(s=u.gridExtSort.match(/grid-sorting=/g),u.gridExtSort.length>0&&(u.gridExtSort+="&"),s=s?s.length+1:1,u.gridExtSort+=this.getExtSortQueryData(t,i,s))}u.gridExtSort.indexOf("?")===-1&&(u.gridExtSort="?"+u.gridExtSort);u.loadPage()},ajaxify:function(t){var i=this,r,u,f;i.currentPage=this.options.currentPage?this.options.currentPage:"1";i.pagedDataAction=t.getPagedData;i.subGridDataAction=t.getSubGridData;i.data=t.data;i.token=t.token;i.gridSort=i.jqContainer.find("div.sorted a").attr("href");i.gridColumnFilters="";i.gridSearch="";i.pageSize="";i.gridExtSort="";r=n('[data-gridname="'+i.jqContainer.data("gridname")+'"]');i.jqContainer=r.length===1?r:i.jqContainer;i.gridSort&&(i.gridSort=i.gridSort.indexOf("grid-dir=0")!==-1?i.gridSort.replace("grid-dir=0","grid-dir=1"):i.gridSort.replace("grid-dir=1","grid-dir=0"));u=i.jqContainer.attr("data-initfilters");i.initialFilters=null;i.initialFilters=u?u.split(","):[];f=i.jqContainer.find(".grid-filter").attr("data-clearinitfilter");i.clearInitialFilters=null;i.clearInitialFilters=f?f.split(","):[];i.uint6ToB64=function(n){return n<26?n+65:n<52?n+71:n<62?n-4:n===62?43:n===63?47:65};i.base64EncArr=function(n){for(var f=(3-n.length%3)%3,u="",e,o=n.length,t=0,r=0;r>>e&24),(e===2||n.length-r==1)&&(u+=String.fromCharCode(i.uint6ToB64(t>>>18&63),i.uint6ToB64(t>>>12&63),i.uint6ToB64(t>>>6&63),i.uint6ToB64(t&63)),t=0);return f===0?u:u.substring(0,u.length-f)+(f===1?"=":"==")};i.strToUTF8Arr=function(n){for(var r,e,i,t,o=n.length,u=0,f=0;f>>6),i[r++]=128+(t&63)):t<65536?(i[r++]=224+(t>>>12),i[r++]=128+(t>>>6&63),i[r++]=128+(t&63)):t<2097152?(i[r++]=240+(t>>>18),i[r++]=128+(t>>>12&63),i[r++]=128+(t>>>6&63),i[r++]=128+(t&63)):t<67108864?(i[r++]=248+(t>>>24),i[r++]=128+(t>>>18&63),i[r++]=128+(t>>>12&63),i[r++]=128+(t>>>6&63),i[r++]=128+(t&63)):(i[r++]=252+(t>>>30),i[r++]=128+(t>>>24&63),i[r++]=128+(t>>>18&63),i[r++]=128+(t>>>12&63),i[r++]=128+(t>>>6&63),i[r++]=128+(t&63));return i};i.getState=function(){var n={},e=URI.parseQuery(i.gridColumnFilters)["grid-filter"],r,u,f,o;n["grid-filter"]=Array.isArray(e)?e.join("|"):e;r=URI.parseQuery(i.gridExtSort)["grid-sorting"];n["grid-sorting"]=Array.isArray(r)?r.join("|"):r;u=URI.parseQuery(i.gridSearch)["grid-search"];n["grid-search"]=Array.isArray(u)?u.join("|"):u;f=URI.parseQuery(i.pageSize)["grid-pagesize"];n["grid-pagesize"]=Array.isArray(f)?f.join("|"):f;i.gridSort&&(o=URI.parseQuery(i.gridSort),n["grid-column"]=o["grid-column"],n["grid-dir"]=o["grid-dir"]);i.clearInitialFilters&&(n["grid-clearinitfilter"]=i.clearInitialFilters.join("|"));n["grid-page"]=i.currentPage;var s=JSON.stringify(n),h=i.strToUTF8Arr(s),t=i.base64EncArr(h);return t=t.replace("+","."),t=t.replace("/","_"),t.replace("=","-")};i.getGridUrl=function(n,t,r,u,f){var e=URI(n),a=URI.parseQuery(u),s,h,c,l,o;if(a["grid-search"]&&e.addSearch("grid-search",a["grid-search"]),s=URI.parseQuery(f),s["grid-pagesize"]&&e.addSearch("grid-pagesize",s["grid-pagesize"]),h=URI.parseQuery(t),h["grid-filter"]&&e.addSearch("grid-filter",h["grid-filter"]),c=URI.parseQuery(r),c["grid-sorting"]&&e.addSearch("grid-sorting",c["grid-sorting"]),i.gridSort&&(l=URI.parseQuery(i.gridSort),e.addSearch("grid-column",l["grid-column"]),e.addSearch("grid-dir",l["grid-dir"])),i.clearInitialFilters)for(o=0;o a").each(function(){n(this).click(function(t){i.gridSort="";t.preventDefault();var r=n(this).attr("href"),u=r.match(/grid-column=\w+/);u&&(i.gridSort=r.substr(u.index));i.loadPage()})});i.jqContainer.find(".grid-filter").each(function(){n(this).click(function(){return i.openFilterPopup.call(this,i,i.filterMenuHtml())})});i.jqContainer.find(".grid-search-apply").each(function(){n(this).click(function(n){n.preventDefault();var t=i.jqContainer.find(".grid-search-input").first().val();return i.applySearchValues(t,!1)})});i.jqContainer.find(".grid-search-input").each(function(){n(this).keyup(function(t){if(t.keyCode===13){t.preventDefault();var r=n(this).val();i.applySearchValues(r,!1)}})});i.jqContainer.find(".grid-search-clear").each(function(){n(this).click(function(n){return n.preventDefault(),i.applySearchValues("",!0)})});i.jqContainer.find(".grid-change-page-size-input").each(function(){n(this).keydown(function(t){if(t.keyCode===9||t.keyCode===13){t.preventDefault();var r=n(this).val(),u=parseInt(r,10);u>0?i.changePageSize(r):n(this).val(this.defaultValue)}})});i.jqContainer.find(".grid-button-all-filters-clear").each(function(){n(this).click(function(n){n.preventDefault();i.removeAllFilters()})});i.jqContainer.find(".grid-extsort-draggable").each(function(){n(this).on("dragstart",function(n){n.originalEvent.dataTransfer.setData("text",n.target.text);n.originalEvent.dataTransfer.setData("column",n.target.dataset.column);n.target.dataset.sorted&&n.originalEvent.dataTransfer.setData("sorted",n.target.dataset.sorted)})});i.jqContainer.find(".grid-extsort-droppable").each(function(){n(this).on("dragenter",function(t){t.preventDefault();t.stopPropagation();n(this).addClass("folderDragOver")});n(this).on("dragover",function(n){n.preventDefault();n.stopPropagation();n.originalEvent.dataTransfer.dropEffect="move"});n(this).on("dragleave",function(){n(this).removeClass("folderDragOver")});n(this).on("drop",function(t){n(this).removeClass("folderDragOver");t.preventDefault();t.stopPropagation();t.stopImmediatePropagation();var r=t.originalEvent.dataTransfer.getData("column"),u=t.originalEvent.dataTransfer.getData("sorted")==="desc"?1:0;r&&r!=="undefined"&&i.applyExtSortValues(r,u,1)})});i.jqContainer.find(".grid-extsort-column > span.sorted-asc > a").each(function(){n(this).click(function(t){t.preventDefault();var r=n(this).attr("data-column");r&&i.applyExtSortValues(r,1,2)})});i.jqContainer.find(".grid-extsort-column > span.sorted-desc > a").each(function(){n(this).click(function(t){t.preventDefault();var r=n(this).attr("data-column");r&&i.applyExtSortValues(r,0,2)})});i.jqContainer.find(".grid-extsort-column > a").each(function(){n(this).click(function(t){t.preventDefault();var r=n(this).attr("data-column");r&&i.applyExtSortValues(r,0,0)})})};i.setupPagerLinkEvents=function(){i.jqContainer.find(".grid-page-link").each(function(){n(this).click(function(t){t.preventDefault();var r=n(this).attr("data-page");i.currentPage=r;i.loadPage()})})};i.loadPage=function(){var t=new n.Deferred,r=i.getGridUrl(i.pagedDataAction,i.gridColumnFilters,i.gridExtSort,i.gridSearch,i.pageSize);return n.ajax({url:r,type:"POST",contentType:"application/json; charset=utf-8",data:i.data,headers:{RequestVerificationToken:i.token}}).done(function(t){i.jqContainer.hide();i.jqContainer.html(t);i.jqContainer.html(i.jqContainer.children().first().html());i.setupGridHeaderEvents();i.setupPagerLinkEvents();i.initFilters();i.initSearch();i.initChangePageSize();i.initExtSort();i.initGroup();i.initSubGrids();i.jqContainer.show();i.notifyOnGridLoaded(t,n.Event("GridLoaded"))}).fail(function(){i.notifyOnGridError(null,n.Event("GridError"))}).always(function(n){t.resolve(n)}),t.promise()};i.loadSubGridPage=function(t,r,u,f){var e=new n.Deferred,o=i.getSubGridUrl(i.subGridDataAction,i.keys,t);return n.ajax({url:o,type:"POST",contentType:"application/json; charset=utf-8",headers:{RequestVerificationToken:i.token}}).done(function(n){r.html("<\/td>"+n+"<\/td>");var t=r.find(".grid-mvc");t.gridmvc();window.pageGrids[t.attr("data-gridname")].ajaxify({getPagedData:o,token:i.token});u.attr("data-is-rendered","true")}).always(function(n){e.resolve(n)}),e.promise()};i.initFilters=function(){var u,f,t,e,r;if(i.gridColumnFilters=null,u=i.jqContainer.find(".grid-filter"),f=URI("").normalizeSearch().search(),i.gridColumnFilters="",this.options.multiplefilters)for(t=0;t0&&(i.gridColumnFilters+="&"),i.gridColumnFilters+=this.getFilterQueryData(n(u[t]).attr("data-name"),e));i.gridColumnFilters.length>0&&(f+="&"+i.gridColumnFilters);r=f;r.indexOf("?")===-1&&(r="?"+r);i.gridColumnFilters=r};i.initSearch=function(){i.gridSearch=null;var n=i.jqContainer.find(".grid-search-input").first().val();i.gridSearch=this.getSearchQueryData(n)};i.initChangePageSize=function(){i.pageSize=null;var n=i.jqContainer.find(".grid-change-page-size-input").first().val();i.pageSize=this.getPageSizeQueryData(n)};i.initExtSort=function(){var u,t,r;if(i.gridExtSort=null,u=i.jqContainer.find(".grid-extsort-column"),i.gridExtSort="",this.options.extsortable)for(t=0;t0&&(i.gridExtSort+="&"),i.gridExtSort+=this.getExtSortQueryData(r.columnName,r.direction,r.id);i.gridExtSort.indexOf("?")===-1&&(i.gridExtSort="?"+i.gridExtSort)};i.initSubGrids=function(){i.keys=[];var t=this.jqContainer.attr("data-keys");t&&(i.keys=t.split(","));this.jqContainer.find(".grid-subgrid").each(function(){n(this).click(function(t){var c,r,f,e,o,u,s,h;t.stopPropagation();c=n(this).parent().children().length;r=n(this).parent().next();r&&r.hasClass("subgrid-row")&&(f=n(this).attr("data-is-visible"),f&&f==="true"?(r.hide(),n(this).attr("data-is-visible","false"),e=n(this).find(".subgrid-caret-down"),e.removeClass("subgrid-caret-down"),e.addClass("subgrid-caret")):(o=n(this).attr("data-is-rendered"),o&&o==="false"&&(u=[],s=n(this).attr("data-values"),s&&(u=s.split(",")),i.keys&&i.keys.length===u.length&&i.loadSubGridPage(u,r,n(this),c-1)),n(this).parent().next().show(),n(this).attr("data-is-visible","true"),h=n(this).find(".subgrid-caret"),h.removeClass("subgrid-caret"),h.addClass("subgrid-caret-down")))})})};i.setupGridHeaderEvents();i.setupPagerLinkEvents();i.initFilters();i.initSearch();i.initChangePageSize();i.initExtSort();i.initSubGrids()},onGridLoaded:function(n){this.events.push({name:"onGridLoaded",callback:n})},notifyOnGridLoaded:function(n,t){t.data=n;this.notifyEvent("onGridLoaded",t)},onGridError:function(n){this.events.push({name:"onGridError",callback:n})},notifyOnGridError:function(n,t){t.data=n;this.notifyEvent("onGridError",t)}})})(jQuery); \ No newline at end of file +(function(n){var t=GridMvc.prototype,r={};for(var i in t)typeof t[i]=="function"&&(r[i]=t[i]);n.extend(!0,t,{parseFilterValues:function(t){for(var r=n.parseJSON(t),u=[],i=0;i0&&(s+="&"),f.gridColumnFilters="",u||(f.gridColumnFilters+=this.getFilterQueryData(i,r)),this.options.multiplefilters){for(e=0;e0&&(f.gridColumnFilters+="&");f.gridColumnFilters+=this.getFilterQueryData(n(o[e]).attr("data-name"),l)}else continue;f.initialFilters.includes(i)&&!f.clearInitialFilters.includes(i)&&f.clearInitialFilters.push(i)}else for(h=0;h0&&(s+="&"+f.gridColumnFilters);c=s;c.indexOf("?")===-1&&(c="?"+c);f.gridColumnFilters=c;f.currentPage=this.options.currentPage?this.options.currentPage:"1";f.loadPage()},applySearchValues:function(n,t){var i=this;i.gridSearch=t?"":this.getSearchQueryData(n);i.loadPage()},changePageSize:function(n){var t=this;t.pageSize=this.getPageSizeQueryData(n);t.loadPage()},gotoPage:function(n){var t=this;t.currentPage=n;t.loadPage()},removeAllFilters:function(){var n=this;n.gridColumnFilters=null;n.clearInitialFilters=[];n.loadPage()},parseExtSortValues:function(t){var i=n.parseJSON(t);return{columnName:this.urldecode(i.ColumnName),direction:i.Direction,id:i.Id}},applyExtSortValues:function(t,i,r){var u=this,e,o,f;if(u.gridExtSort=null,e=u.jqContainer.find(".grid-extsort-column"),u.gridExtSort="",this.options.extsortable)for(f=0;f0&&(u.gridExtSort+="&"),u.gridExtSort+=this.getExtSortQueryData(t,i,o.id)):(o=this.parseExtSortValues(n(e[f]).attr("data-extsortdata")),u.gridExtSort.length>0&&(u.gridExtSort+="&"),u.gridExtSort+=this.getExtSortQueryData(o.columnName,o.direction,o.id));if(r===1){var h="grid-sorting="+t,c=new RegExp(h,"g"),s=u.gridExtSort.match(c);s||(s=u.gridExtSort.match(/grid-sorting=/g),u.gridExtSort.length>0&&(u.gridExtSort+="&"),s=s?s.length+1:1,u.gridExtSort+=this.getExtSortQueryData(t,i,s))}u.gridExtSort.indexOf("?")===-1&&(u.gridExtSort="?"+u.gridExtSort);u.loadPage()},ajaxify:function(t){var i=this,r,u,f;i.currentPage=this.options.currentPage?this.options.currentPage:"1";i.pagedDataAction=t.getPagedData;i.subGridDataAction=t.getSubGridData;i.data=t.data;i.token=t.token;i.gridSort=i.jqContainer.find("div.sorted a").attr("href");i.gridColumnFilters="";i.gridSearch="";i.pageSize="";i.gridExtSort="";r=n('[data-gridname="'+i.jqContainer.data("gridname")+'"]');i.jqContainer=r.length===1?r:i.jqContainer;i.gridSort&&(i.gridSort=i.gridSort.indexOf("grid-dir=0")!==-1?i.gridSort.replace("grid-dir=0","grid-dir=1"):i.gridSort.replace("grid-dir=1","grid-dir=0"));u=i.jqContainer.attr("data-initfilters");i.initialFilters=null;i.initialFilters=u?u.split(","):[];f=i.jqContainer.find(".grid-filter").attr("data-clearinitfilter");i.clearInitialFilters=null;i.clearInitialFilters=f?f.split(","):[];i.uint6ToB64=function(n){return n<26?n+65:n<52?n+71:n<62?n-4:n===62?43:n===63?47:65};i.base64EncArr=function(n){for(var f=(3-n.length%3)%3,u="",e,o=n.length,t=0,r=0;r>>e&24),(e===2||n.length-r==1)&&(u+=String.fromCharCode(i.uint6ToB64(t>>>18&63),i.uint6ToB64(t>>>12&63),i.uint6ToB64(t>>>6&63),i.uint6ToB64(t&63)),t=0);return f===0?u:u.substring(0,u.length-f)+(f===1?"=":"==")};i.strToUTF8Arr=function(n){for(var r,e,i,t,o=n.length,u=0,f=0;f>>6),i[r++]=128+(t&63)):t<65536?(i[r++]=224+(t>>>12),i[r++]=128+(t>>>6&63),i[r++]=128+(t&63)):t<2097152?(i[r++]=240+(t>>>18),i[r++]=128+(t>>>12&63),i[r++]=128+(t>>>6&63),i[r++]=128+(t&63)):t<67108864?(i[r++]=248+(t>>>24),i[r++]=128+(t>>>18&63),i[r++]=128+(t>>>12&63),i[r++]=128+(t>>>6&63),i[r++]=128+(t&63)):(i[r++]=252+(t>>>30),i[r++]=128+(t>>>24&63),i[r++]=128+(t>>>18&63),i[r++]=128+(t>>>12&63),i[r++]=128+(t>>>6&63),i[r++]=128+(t&63));return i};i.getState=function(){var n={},e=URI.parseQuery(i.gridColumnFilters)["grid-filter"],r,u,f,o;n["grid-filter"]=Array.isArray(e)?e.join("|"):e;r=URI.parseQuery(i.gridExtSort)["grid-sorting"];n["grid-sorting"]=Array.isArray(r)?r.join("|"):r;u=URI.parseQuery(i.gridSearch)["grid-search"];n["grid-search"]=Array.isArray(u)?u.join("|"):u;f=URI.parseQuery(i.pageSize)["grid-pagesize"];n["grid-pagesize"]=Array.isArray(f)?f.join("|"):f;i.gridSort&&(o=URI.parseQuery(i.gridSort),n["grid-column"]=o["grid-column"],n["grid-dir"]=o["grid-dir"]);i.clearInitialFilters&&(n["grid-clearinitfilter"]=i.clearInitialFilters.join("|"));n["grid-page"]=i.currentPage;var s=JSON.stringify(n),h=i.strToUTF8Arr(s),t=i.base64EncArr(h);return t=t.replace("+","."),t=t.replace("/","_"),t.replace("=","-")};i.getGridUrl=function(n,t,r,u,f){var e=URI(n),a=URI.parseQuery(u),s,h,c,l,o;if(a["grid-search"]&&e.addSearch("grid-search",a["grid-search"]),s=URI.parseQuery(f),s["grid-pagesize"]&&e.addSearch("grid-pagesize",s["grid-pagesize"]),h=URI.parseQuery(t),h["grid-filter"]&&e.addSearch("grid-filter",h["grid-filter"]),c=URI.parseQuery(r),c["grid-sorting"]&&e.addSearch("grid-sorting",c["grid-sorting"]),i.gridSort&&(l=URI.parseQuery(i.gridSort),e.addSearch("grid-column",l["grid-column"]),e.addSearch("grid-dir",l["grid-dir"])),i.clearInitialFilters)for(o=0;o a").each(function(){n(this).click(function(t){i.gridSort="";t.preventDefault();var r=n(this).attr("href"),u=r.match(/grid-column=\w+/);u&&(i.gridSort=r.substr(u.index));i.loadPage()})});i.jqContainer.find(".grid-filter").each(function(){n(this).click(function(){return i.openFilterPopup.call(this,i,i.filterMenuHtml())})});i.jqContainer.find(".grid-search-apply").each(function(){n(this).click(function(n){n.preventDefault();var t=i.jqContainer.find(".grid-search-input").first().val();return i.applySearchValues(t,!1)})});i.jqContainer.find(".grid-search-input").each(function(){n(this).keyup(function(t){if(t.keyCode===13){t.preventDefault();var r=n(this).val();i.applySearchValues(r,!1)}})});i.jqContainer.find(".grid-search-clear").each(function(){n(this).click(function(n){return n.preventDefault(),i.applySearchValues("",!0)})});i.jqContainer.find(".grid-change-page-size-input").each(function(){n(this).keydown(function(t){if(t.keyCode===9||t.keyCode===13){t.preventDefault();var r=n(this).val(),u=parseInt(r,10);u>0?i.changePageSize(r):n(this).val(this.defaultValue)}})});i.jqContainer.find(".grid-goto-page-input").each(function(){n(this).keydown(function(t){if(t.keyCode===9||t.keyCode===13){t.preventDefault();var r=n(this).val(),u=parseInt(r,10);u>0?i.gotoPage(r):n(this).val(this.defaultValue)}})});i.jqContainer.find(".grid-button-all-filters-clear").each(function(){n(this).click(function(n){n.preventDefault();i.removeAllFilters()})});i.jqContainer.find(".grid-extsort-draggable").each(function(){n(this).on("dragstart",function(n){n.originalEvent.dataTransfer.setData("text",n.target.text);n.originalEvent.dataTransfer.setData("column",n.target.dataset.column);n.target.dataset.sorted&&n.originalEvent.dataTransfer.setData("sorted",n.target.dataset.sorted)})});i.jqContainer.find(".grid-extsort-droppable").each(function(){n(this).on("dragenter",function(t){t.preventDefault();t.stopPropagation();n(this).addClass("folderDragOver")});n(this).on("dragover",function(n){n.preventDefault();n.stopPropagation();n.originalEvent.dataTransfer.dropEffect="move"});n(this).on("dragleave",function(){n(this).removeClass("folderDragOver")});n(this).on("drop",function(t){n(this).removeClass("folderDragOver");t.preventDefault();t.stopPropagation();t.stopImmediatePropagation();var r=t.originalEvent.dataTransfer.getData("column"),u=t.originalEvent.dataTransfer.getData("sorted")==="desc"?1:0;r&&r!=="undefined"&&i.applyExtSortValues(r,u,1)})});i.jqContainer.find(".grid-extsort-column > span.sorted-asc > a").each(function(){n(this).click(function(t){t.preventDefault();var r=n(this).attr("data-column");r&&i.applyExtSortValues(r,1,2)})});i.jqContainer.find(".grid-extsort-column > span.sorted-desc > a").each(function(){n(this).click(function(t){t.preventDefault();var r=n(this).attr("data-column");r&&i.applyExtSortValues(r,0,2)})});i.jqContainer.find(".grid-extsort-column > a").each(function(){n(this).click(function(t){t.preventDefault();var r=n(this).attr("data-column");r&&i.applyExtSortValues(r,0,0)})})};i.setupPagerLinkEvents=function(){i.jqContainer.find(".grid-page-link").each(function(){n(this).click(function(t){t.preventDefault();var r=n(this).attr("data-page");i.currentPage=r;i.loadPage()})})};i.loadPage=function(){var t=new n.Deferred,r=i.getGridUrl(i.pagedDataAction,i.gridColumnFilters,i.gridExtSort,i.gridSearch,i.pageSize);return n.ajax({url:r,type:"POST",contentType:"application/json; charset=utf-8",data:i.data,headers:{RequestVerificationToken:i.token}}).done(function(t){i.jqContainer.hide();i.jqContainer.html(t);i.jqContainer.html(i.jqContainer.children().first().html());i.setupGridHeaderEvents();i.setupPagerLinkEvents();i.initFilters();i.initSearch();i.initChangePageSize();i.initExtSort();i.initGroup();i.initSubGrids();i.jqContainer.show();i.notifyOnGridLoaded(t,n.Event("GridLoaded"))}).fail(function(){i.notifyOnGridError(null,n.Event("GridError"))}).always(function(n){t.resolve(n)}),t.promise()};i.loadSubGridPage=function(t,r,u,f){var e=new n.Deferred,o=i.getSubGridUrl(i.subGridDataAction,i.keys,t);return n.ajax({url:o,type:"POST",contentType:"application/json; charset=utf-8",headers:{RequestVerificationToken:i.token}}).done(function(n){r.html("<\/td>"+n+"<\/td>");var t=r.find(".grid-mvc");t.gridmvc();window.pageGrids[t.attr("data-gridname")].ajaxify({getPagedData:o,token:i.token});u.attr("data-is-rendered","true")}).always(function(n){e.resolve(n)}),e.promise()};i.initFilters=function(){var u,f,t,e,r;if(i.gridColumnFilters=null,u=i.jqContainer.find(".grid-filter"),f=URI("").normalizeSearch().search(),i.gridColumnFilters="",this.options.multiplefilters)for(t=0;t0&&(i.gridColumnFilters+="&"),i.gridColumnFilters+=this.getFilterQueryData(n(u[t]).attr("data-name"),e));i.gridColumnFilters.length>0&&(f+="&"+i.gridColumnFilters);r=f;r.indexOf("?")===-1&&(r="?"+r);i.gridColumnFilters=r};i.initSearch=function(){i.gridSearch=null;var n=i.jqContainer.find(".grid-search-input").first().val();i.gridSearch=this.getSearchQueryData(n)};i.initChangePageSize=function(){i.pageSize=null;var n=i.jqContainer.find(".grid-change-page-size-input").first().val();i.pageSize=this.getPageSizeQueryData(n)};i.initExtSort=function(){var u,t,r;if(i.gridExtSort=null,u=i.jqContainer.find(".grid-extsort-column"),i.gridExtSort="",this.options.extsortable)for(t=0;t0&&(i.gridExtSort+="&"),i.gridExtSort+=this.getExtSortQueryData(r.columnName,r.direction,r.id);i.gridExtSort.indexOf("?")===-1&&(i.gridExtSort="?"+i.gridExtSort)};i.initSubGrids=function(){i.keys=[];var t=this.jqContainer.attr("data-keys");t&&(i.keys=t.split(","));this.jqContainer.find(".grid-subgrid").each(function(){n(this).click(function(t){var c,r,f,e,o,u,s,h;t.stopPropagation();c=n(this).parent().children().length;r=n(this).parent().next();r&&r.hasClass("subgrid-row")&&(f=n(this).attr("data-is-visible"),f&&f==="true"?(r.hide(),n(this).attr("data-is-visible","false"),e=n(this).find(".subgrid-caret-down"),e.removeClass("subgrid-caret-down"),e.addClass("subgrid-caret")):(o=n(this).attr("data-is-rendered"),o&&o==="false"&&(u=[],s=n(this).attr("data-values"),s&&(u=s.split(",")),i.keys&&i.keys.length===u.length&&i.loadSubGridPage(u,r,n(this),c-1)),n(this).parent().next().show(),n(this).attr("data-is-visible","true"),h=n(this).find(".subgrid-caret"),h.removeClass("subgrid-caret"),h.addClass("subgrid-caret-down")))})})};i.setupGridHeaderEvents();i.setupPagerLinkEvents();i.initFilters();i.initSearch();i.initChangePageSize();i.initExtSort();i.initSubGrids()},onGridLoaded:function(n){this.events.push({name:"onGridLoaded",callback:n})},notifyOnGridLoaded:function(n,t){t.data=n;this.notifyEvent("onGridLoaded",t)},onGridError:function(n){this.events.push({name:"onGridError",callback:n})},notifyOnGridError:function(n,t){t.data=n;this.notifyEvent("onGridError",t)}})})(jQuery); \ No newline at end of file diff --git a/GridMvc/Resources/js/gridmvc.js b/GridMvc/Resources/js/gridmvc.js index 3b3fb9e4..2d5f7f6f 100644 --- a/GridMvc/Resources/js/gridmvc.js +++ b/GridMvc/Resources/js/gridmvc.js @@ -59,6 +59,7 @@ GridMvc = (function ($) { this.initExtSort(); this.initGroup(); this.initChangePageSize(); + this.initGotoPage(); this.initRemoveAllFilters(); }; // @@ -650,7 +651,7 @@ GridMvc = (function ($) { * Methods that provides functionality for changing page size */ /*** - * Method search all search buttons and register 'onclick' event handlers: + * Method search all grid-change-page-size input elements and register 'keydown' event handlers: */ gridMvc.prototype.initChangePageSize = function () { var self = this; @@ -699,6 +700,60 @@ GridMvc = (function ($) { return url; }; + /*** + * ============= GO TO PAGE ============= + * Methods that provides functionality for going to a page + */ + /*** + * Method search all grid-goto-page-input input elements and register 'keydown' event handlers: + */ + gridMvc.prototype.initGotoPage = function () { + var self = this; + this.jqContainer.find(".grid-goto-page-input").each(function () { + $(this).keydown(function (e) { + if (e.keyCode === 9 || e.keyCode === 13) { + var page = $(this).val(); + var x = parseInt(page, 10); + if (x > 0) { + self.goTo(page); + } + else { + $(this).val(this.defaultValue); + } + } + }); + }); + }; + + // + // Applies selected page number by redirecting to another url: + // + gridMvc.prototype.goTo = function (page) { + var x = parseInt(page, 10); + if (x <= 0) { + return; + } + var url = ""; + var gridGotoPage = this.jqContainer.find(".grid-goto-page").first(); + if (gridGotoPage) { + url = gridGotoPage.attr("data-goto-page-url") || ""; + } + + if (url.length > 0) + url += "&"; + url += this.getGotoPageQueryData(page); + + window.location.search = url; + }; + + gridMvc.prototype.getGotoPageQueryData = function (page) { + var url = ""; + if (page) { + url += "grid-page=" + encodeURIComponent(page); + } + return url; + }; + /*** * ============= REMOVE ALL FILTERS ============= * Methods that provides functionality for removing all filters diff --git a/GridMvc/Resources/js/gridmvc.min.js b/GridMvc/Resources/js/gridmvc.min.js index daecee56..4b6343dc 100644 --- a/GridMvc/Resources/js/gridmvc.min.js +++ b/GridMvc/Resources/js/gridmvc.min.js @@ -1 +1 @@ -window.pageGrids=window.pageGrids||{};$.fn.extend({gridmvc:function(){var n=[];return($(this).each(function(){if($(this).data("gridmvc"))n.push($(this).data("gridmvc"));else{var i={lang:$(this).attr("data-lang"),selectable:$(this).attr("data-selectable")==="true",extsortable:$(this).attr("data-extsortable")==="true",multiplefilters:$(this).attr("data-multiplefilters")==="true",currentPage:$(this).find(".grid-pager").first().attr("data-currentpage"),dir:$(this).attr("dir")},t=new GridMvc(this,i),r=$(this).attr("data-gridname");r.length>0&&(window.pageGrids[$(this).attr("data-gridname")]=t);n.push(t);$(this).data("gridmvc",t)}}),n.length===1)?n[0]:n}});GridMvc=function(n){function t(t,i){this.jqContainer=n(t);i=i||{};this.options=n.extend({},this.defaults(),i);this.init()}return t.prototype.init=function(){this.lang=GridMvc.lang[this.options.lang];typeof this.lang=="undefined"&&(this.lang=GridMvc.lang.en);this.events=[];this.options.selectable&&this.initGridRowsEvents();this.filterWidgets=[];this.addFilterWidget(new TextFilterWidget);this.addFilterWidget(new NumberFilterWidget);this.addFilterWidget(new DateTimeFilterWidget);this.addFilterWidget(new BooleanFilterWidget);this.addFilterWidget(new ListFilterWidget);this.openedMenuBtn=null;this.initFilters();this.initSearch();this.initExtSort();this.initGroup();this.initChangePageSize();this.initRemoveAllFilters()},t.prototype.initGridRowsEvents=function(){var n=this;this.jqContainer.on("click",".grid-row",function(){n.rowClicked.call(this,n)})},t.prototype.rowClicked=function(t){var i,r,u;t.options.selectable&&((i=n(this).closest(".grid-row"),i.length<=0)||(r={},i.find(".grid-cell").each(function(){var t=n(this).attr("data-name");t.length>0&&(r[t]=n(this).text())}),u=n.Event("RowClicked"),t.notifyOnRowSelect(r,u),u.isDefaultPrevented()||t.markRowSelected(i)))},t.prototype.markRowSelected=function(n){this.jqContainer.find(".grid-row.grid-row-selected").removeClass("grid-row-selected");n.addClass("grid-row-selected")},t.prototype.defaults=function(){return{selectable:!0,multiplefilters:!1,lang:"en"}},t.prototype.onRowSelect=function(n){this.events.push({name:"onRowSelect",callback:n})},t.prototype.notifyOnRowSelect=function(n,t){t.row=n;this.notifyEvent("onRowSelect",t)},t.prototype.notifyEvent=function(n,t){for(var i=0;i