From 38ec9cda2f63c5dcef4444f5914a3c7f6a86b0f5 Mon Sep 17 00:00:00 2001 From: Sebastian Stehle Date: Thu, 15 Nov 2018 17:31:09 +0100 Subject: [PATCH] drag handle to languages and form array. --- .../shared/array-editor.component.html | 3 ++- .../content/shared/array-item.component.html | 12 ++++++--- .../content/shared/array-item.component.scss | 4 +++ .../content/shared/array-item.component.ts | 3 +++ .../pages/languages/language.component.html | 9 ++++--- .../pages/languages/language.component.scss | 24 ++++++++---------- .../settings/pages/roles/role.component.scss | 4 --- .../app/framework/angular/sorted.directive.ts | 7 ++++- src/Squidex/app/theme/_common.scss | 8 ++++++ src/Squidex/app/theme/icomoon/demo.html | 18 ++++++++++++- .../app/theme/icomoon/fonts/icomoon.eot | Bin 25928 -> 25972 bytes .../app/theme/icomoon/fonts/icomoon.svg | 1 + .../app/theme/icomoon/fonts/icomoon.ttf | Bin 25764 -> 25808 bytes .../app/theme/icomoon/fonts/icomoon.woff | Bin 25840 -> 25884 bytes src/Squidex/app/theme/icomoon/selection.json | 2 +- src/Squidex/app/theme/icomoon/style.css | 13 ++++++---- 16 files changed, 75 insertions(+), 33 deletions(-) diff --git a/src/Squidex/app/features/content/shared/array-editor.component.html b/src/Squidex/app/features/content/shared/array-editor.component.html index f84369b5c..76a4018d2 100644 --- a/src/Squidex/app/features/content/shared/array-editor.component.html +++ b/src/Squidex/app/features/content/shared/array-editor.component.html @@ -1,8 +1,9 @@ -
+
- +
+ + + Item #{{index + 1}} + + +
{{language.iso2Code}}
-
+
{{language.englishName}}
@@ -38,9 +38,12 @@
-
+
-
+
+
+ +
{{language.englishName}}
diff --git a/src/Squidex/app/features/settings/pages/languages/language.component.scss b/src/Squidex/app/features/settings/pages/languages/language.component.scss index abe8b7227..34f17d602 100644 --- a/src/Squidex/app/features/settings/pages/languages/language.component.scss +++ b/src/Squidex/app/features/settings/pages/languages/language.component.scss @@ -17,23 +17,19 @@ $field-header: #e7ebef; &-languages { @include border-radius; background: $color-border; - border: 0; - padding: .5rem; + border-top: .5rem solid $color-border; + border-bottom: 1px solid $color-border; + padding: 0 .5rem; } &-language { - & { - @include border-radius(2px); - padding: .5rem; - background: $color-dark-foreground; - border: 0; - margin-bottom: .5rem; - line-height: 2rem; - } - - &:last-child { - margin: 0; - } + @include border-radius(2px); + padding: .5rem; + background: $color-dark-foreground; + border: 0; + margin: 0; + margin-bottom: .5rem; + line-height: 2rem; } &-label { diff --git a/src/Squidex/app/features/settings/pages/roles/role.component.scss b/src/Squidex/app/features/settings/pages/roles/role.component.scss index e21dec6c8..61e623d93 100644 --- a/src/Squidex/app/features/settings/pages/roles/role.component.scss +++ b/src/Squidex/app/features/settings/pages/roles/role.component.scss @@ -15,10 +15,6 @@ @include truncate; } -.text-decent { - color: $color-text-decent; -} - .text-force { color: $color-text; } diff --git a/src/Squidex/app/framework/angular/sorted.directive.ts b/src/Squidex/app/framework/angular/sorted.directive.ts index f7ba12b5d..80d7c56ff 100644 --- a/src/Squidex/app/framework/angular/sorted.directive.ts +++ b/src/Squidex/app/framework/angular/sorted.directive.ts @@ -15,6 +15,9 @@ import Sortable = require('sortablejs'); export class SortedDirective implements OnDestroy, OnInit { private sortable: Sortable; + @Input() + public dragHandle: string; + @Input('sqxSortModel') public sortModel: any[]; @@ -46,7 +49,9 @@ export class SortedDirective implements OnDestroy, OnInit { this.sorted.emit(newModel); } - } + }, + + handle: this.dragHandle }); } } \ No newline at end of file diff --git a/src/Squidex/app/theme/_common.scss b/src/Squidex/app/theme/_common.scss index 91130bd89..106f87ae5 100644 --- a/src/Squidex/app/theme/_common.scss +++ b/src/Squidex/app/theme/_common.scss @@ -21,6 +21,14 @@ body { font-size: .8rem; } +.text-decent { + color: $color-text-decent; +} + +.drag-handle { + cursor: move; +} + // Rich editor icon. Must be placed here, because element is not created by angular. .mce-i-assets { & { diff --git a/src/Squidex/app/theme/icomoon/demo.html b/src/Squidex/app/theme/icomoon/demo.html index f5232ed42..ddaa0218e 100644 --- a/src/Squidex/app/theme/icomoon/demo.html +++ b/src/Squidex/app/theme/icomoon/demo.html @@ -9,10 +9,26 @@
-

Font Name: icomoon (Glyphs: 100)

+

Font Name: icomoon (Glyphs: 101)

Grid Size: 24

+
+
+ + + + icon-drag2 +
+
+ + +
+
+ liga: + +
+
diff --git a/src/Squidex/app/theme/icomoon/fonts/icomoon.eot b/src/Squidex/app/theme/icomoon/fonts/icomoon.eot index c541be6f78b019d2711969ca3fc14a7f6b91e93f..9b248387b6f8b141299da2579e0214076421012c 100644 GIT binary patch delta 321 zcmX?cit)=SM%I#428Ih0S~Ff%*{NB t(-|38OpAP)#Od1cMkzEd$eJ!&KqTi<6f!0s!iVR@(po delta 278 zcmexzit)rLMplnh28JaQS_0+sLp)tO}g1vr^lGl6^;AYUaTx1^%kQ%n!Y&j9LKkdvRB zc-3YPP;U|kQ2tVGVnqQ%J!2G*e+S4{$V<#ko$1B-8_53yRNq#RUtGe#43uF=X#vSI zFf%iro}9wi&6qIx1EVtQY=Id5d7CAe{G&Jb#|ARXJd%!-kLS1f%D~M6(!_9s-)Ihu zp8O}loH1jwN#b)= + diff --git a/src/Squidex/app/theme/icomoon/fonts/icomoon.ttf b/src/Squidex/app/theme/icomoon/fonts/icomoon.ttf index ce1384746e51507bee6251ab69faff94c5df06e8..05f1693ef32269165b2fb0f78ca2f7fdc4a28e9c 100644 GIT binary patch delta 342 zcmZ2-lJUYx#(D-u1_lOhh6V;^1_S?KeItG$-u*z4JwTk0oSRs1+ve791_nkMAU`KP zvA6(83jp~YK$;^xr!tLocApoJKY@WEZb?RJVv0!1jr%~YCO~oyea3wdfqJW`+F^Yj9nFGjI$V<#ko$191 zbU?BOP(xcmesKu{Gf;*hWdlf_ftmTt!~@-oiIaU8m09Nq#PZMIT*Bxdt+I+yn>mb0 z8>p6@fkD_*QB+V=(R3Bln!h28+F@ag3}Imm44e1Igfh!m=*8TR=ePOFz|8_Om*Ix6 zmp+W1Y>;5in7KJ4VLBt@s>y#6Z%F8_(F@Y&(+>iNS|(!zgBVy7)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