From 9f706d581a7c0d7737c15df36edeb7da5c4f9c9a Mon Sep 17 00:00:00 2001 From: nixa <4dmitr@gmail.com> Date: Tue, 23 Aug 2016 12:11:28 +0300 Subject: [PATCH 1/3] styles(smarttable): fix styles for actions --- src/app/pages/tables/components/smartTables/smartTables.scss | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/app/pages/tables/components/smartTables/smartTables.scss b/src/app/pages/tables/components/smartTables/smartTables.scss index 0ccb087b..bb921325 100644 --- a/src/app/pages/tables/components/smartTables/smartTables.scss +++ b/src/app/pages/tables/components/smartTables/smartTables.scss @@ -27,9 +27,6 @@ .actions { float: none; text-align: center; - a + a { - padding-left: 10px; - } } } @@ -37,6 +34,7 @@ font-size: 14px !important; color: $default-text; padding: 0 5px; + display: inline-block; &.ng2-smart-action-add-add { font-size: 25px !important; From 0f9169fdd06a6af594f435e1ae0b5b10bb374c82 Mon Sep 17 00:00:00 2001 From: nixa <4dmitr@gmail.com> Date: Tue, 23 Aug 2016 12:45:11 +0300 Subject: [PATCH 2/3] styles(smarttable): fix styles for actions, hover --- .../components/smartTables/smartTables.scss | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/app/pages/tables/components/smartTables/smartTables.scss b/src/app/pages/tables/components/smartTables/smartTables.scss index bb921325..68524547 100644 --- a/src/app/pages/tables/components/smartTables/smartTables.scss +++ b/src/app/pages/tables/components/smartTables/smartTables.scss @@ -2,14 +2,21 @@ .ng2-smart-table-container table.ng2-smart-table { th, td { - border: 1px solid $border; + border: 1px solid $border-light !important; line-height: 35px; + vertical-align: middle; } color: $default-text; input { - line-height: 1.5!important; + line-height: 1.5 !important; + } + + tbody { + tr:hover { + background: rgba(0, 0, 0, 0.03); + } } a.ng2-smart-sort-link { @@ -18,6 +25,10 @@ font-weight: $font-bolder; &.sort { font-weight: $font-bolder !important; + + &::after { + border-bottom-color: $default-text !important; + } } } From bfab17bd4357623ada699e8f1c82b6ef1a2397ee Mon Sep 17 00:00:00 2001 From: nixa <4dmitr@gmail.com> Date: Tue, 23 Aug 2016 14:11:25 +0300 Subject: [PATCH 3/3] fix(table): remove search field --- package.json | 2 +- .../smartTables/smartTables.component.ts | 29 ------------------- .../components/smartTables/smartTables.html | 7 ----- 3 files changed, 1 insertion(+), 37 deletions(-) diff --git a/package.json b/package.json index 9c72d9aa..b4dcf6ec 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "ng2-bootstrap": "^1.0.20", "ng2-branchy": "^0.0.2-5", "ng2-ckeditor": "^1.0.4", - "ng2-smart-table": "^0.1.5", + "ng2-smart-table": "^0.1.6", "ng2-uploader": "0.5.6", "normalize.css": "^4.1.1", "rxjs": "5.0.0-beta.6", diff --git a/src/app/pages/tables/components/smartTables/smartTables.component.ts b/src/app/pages/tables/components/smartTables/smartTables.component.ts index 343574a2..35cd3189 100644 --- a/src/app/pages/tables/components/smartTables/smartTables.component.ts +++ b/src/app/pages/tables/components/smartTables/smartTables.component.ts @@ -66,33 +66,4 @@ export class SmartTables { this.source.load(data); }); } - - onSearch(): void { - this.source.setFilter([ - { - field: 'id', - search: this.query - }, - { - field: 'firstName', - search: this.query - }, - { - field: 'lastName', - search: this.query - }, - { - field: 'username', - search: this.query - }, - { - field: 'email', - search: this.query - }, - { - field: 'age', - search: this.query - } - ], false); - } } diff --git a/src/app/pages/tables/components/smartTables/smartTables.html b/src/app/pages/tables/components/smartTables/smartTables.html index 69ac05d4..3f39ef49 100644 --- a/src/app/pages/tables/components/smartTables/smartTables.html +++ b/src/app/pages/tables/components/smartTables/smartTables.html @@ -2,13 +2,6 @@
-
-
- -
- -
-