From f9b05e7315f68414f3abf22bef28ecfb27b79b4b Mon Sep 17 00:00:00 2001 From: Sebastian Date: Sun, 11 Dec 2016 19:13:54 +0100 Subject: [PATCH] Temp --- .../app-libs/icomoon/fonts/icomoon.eot | Bin 3908 -> 3976 bytes .../app-libs/icomoon/fonts/icomoon.svg | 1 + .../app-libs/icomoon/fonts/icomoon.ttf | Bin 3744 -> 3812 bytes .../app-libs/icomoon/fonts/icomoon.woff | Bin 3820 -> 3888 bytes src/Squidex/app-libs/icomoon/selection.json | 153 ++++++++++-------- src/Squidex/app-libs/icomoon/style.css | 19 ++- .../app/settings/client.component.html | 6 +- .../app/settings/client.component.scss | 8 + .../internal/app/settings/client.component.ts | 20 ++- .../app/settings/clients-page.component.html | 2 +- src/Squidex/app/features/settings/module.ts | 0 src/Squidex/app/features/settings/routes.ts | 0 .../framework/angular/drag-model.directive.ts | 2 +- .../angular/focus-on-change.directive.ts | 10 +- .../angular/focus-on-init.directive.ts | 7 +- src/Squidex/app/theme/_bootstrap.scss | 6 + src/Squidex/app/theme/_layout.scss | 3 +- 17 files changed, 154 insertions(+), 83 deletions(-) create mode 100644 src/Squidex/app/features/settings/module.ts create mode 100644 src/Squidex/app/features/settings/routes.ts diff --git a/src/Squidex/app-libs/icomoon/fonts/icomoon.eot b/src/Squidex/app-libs/icomoon/fonts/icomoon.eot index 6fe1bc9ce957c1c5e4faa13e2e9ed6a62cb26779..f513f08c53703e4b91adb8dd277d12b7f802e672 100644 GIT binary patch delta 442 zcmXw!ze_?<6vw~!z9-MjUm0FQq$DK4AZY0|h*X0_Q$PNId}w9hD?uZxAsPx-c}qsn zVp~ICG&Mv>OGFJN5!DdY5;#aLwRALudpY;>{c`U4o=SJV$CP&fZv~SouYA-W3nQzW zX#i(*V{u(e7cQeZzTDI6!#f1t{6Ix4py-xh4?+%X`13uf=W;gsvcDe)oS6^;ltAo06cH2@RU=@F3}Bc|vlQFo;7h#3AEcO6l3j9M Yu9|3NS_W|88cMU3Q`pY(f$fm}0W4;6F#rGn delta 373 zcmeB>KO)EK!q334U?QtI%f_3Z-%q~CD>5-8xjv79fng62CnV=47F3#73NkP-$^iLm z(i4jdfV2RRe*#Ezq~}zosfgcL59D89VBm7eNKH)PDX#p>z`!E{lsC%&3UD~F1OfRz zK)y;wZb^mJ0VbeXJRoyia`KZC1)qrg0P?qh + diff --git a/src/Squidex/app-libs/icomoon/fonts/icomoon.ttf b/src/Squidex/app-libs/icomoon/fonts/icomoon.ttf index 9de11c264325f7ab72368e9385df0558376d494d..8dcd5aa35ba2d53aa8c03fcf5a373fd0803f2558 100644 GIT binary patch delta 436 zcmZ1=`$V>$fsuiMft#U$ftkU;KUm+0Ux>W`D6$8L6OwZi3nm_O%Vl6-lmYU$q$d`G z(WLfhPbcZcPJXguqUa%^B|w2MKmoPf#EJq2DTeb547?x<74i~uQ)hZ{{s!`G zfR?lssK_J^PYzavq~JJ4hvvH#vt< zK~BnCoK>7j?3dURv3p{7#ZHSI5UUc)6iX4^1~idz@g?*~>gM9+%v$f>*}xFfOc)C&w3&xVfJ^4qr)Q<{{5D@1xLH6JGh8Xw zegvZ@Tkx2R3PHrdl0cU-0Nu-QZE^#ToeF~mV-RBw<18iyraY!4OgESln3u2!v2?Ip TV+DE~=qCmSq0RSr4lx1%IL2*_ delta 374 zcmaDNyFj*{fsuiMft#U$ftkU;KUm+0Ux+;qD6$8L6OwZi3o6Yk1sNC^Wq|xO>50V! zKw1FEKLMmU(sL@)RK#zr2l6j4FmSnKq$Z~D6j%ObVBiq}%9~{X1vs2of`EJtLhf{ZweIHTB4vBzR} z#qNlm65B6UDV8CYEV>nF2IJ(7j0%%4FuHH{X5!_NdH?z5#&~|4uMFHEGZ+}IWJw)> z(UVJf%moD@;vg{w1|}e$e1OMJi_wBHh_Qk38B+*T7t=mwH|8$pA1rw+dsvmg;VQ^* RmVq6j18AM_W_#YHi~vGnR3iWY diff --git a/src/Squidex/app-libs/icomoon/fonts/icomoon.woff b/src/Squidex/app-libs/icomoon/fonts/icomoon.woff index b0fae125c5cad8efa25f0e19785a540b7fb37cf3..2c3e789968e38d8fa4c752a65f814d2a7d0f10d2 100644 GIT binary patch delta 472 zcmaDOyFpH@+~3WOfsp|S_zf7iK{VeJ2FA%3`NSsb2-g=R=Oz{~Ffe8S#kYX)#A9x` z>50WaF(w%xp96{o(sL@)fMO~P3|ti;%qNj7pOKoF!oa{Y2dKsjgn3%$IA#C^fnryH ze4tte6%Hqs;Edc7pdOwdK)weE+Z|x~l#`zfROiR*02ELIVbMcEOL7w{fEM$D9HRin zQVi$w5_405VjVz7wt?_WFV5cu`Nbtb{|LaU`dJv5fc{o^ zdiEvb_A}Tm delta 416 zcmdlW_eNH%+~3WOfsp|S_}(yZgXskfjFTCe#3t$p*XJeYCKfO-FlGQH)_`!Od8J@_ zVlhyRNd(B}fMS94oXRwym<$60mkS81h~HSBk(!voz`&CLRAUChJjIoNGk}6Xu^B+V z3J7yJu>@u0mQ(=6_5k@ny$mi^2bg4X@{@t;{CI(Uh(f_9B0q8yD}WaBf;1|Cu_VL! zyu{p8pcqgiV;cz1^y2(okY8K^^v@Z%I%Xh?nfc{p9>!|H31CqL1{NUA$e{3&aq>P! zX;vVIL1FS9Mg2?uy+JJ0-SXtWqpPELn6b12Z^SWF`wRu}+p{a@#ze ziI+>}{pXt-;V_>+FC3OHsPd>n7E+_~Q2Z;g02Z$&0@Y*RbS}+DNHZVS8 h3SsJE+Q;n1+{OHZC68qfs}j&n3=D#s^LP(20syP1RJZ^D diff --git a/src/Squidex/app-libs/icomoon/selection.json b/src/Squidex/app-libs/icomoon/selection.json index 20e4ef22c..418c6007d 100644 --- a/src/Squidex/app-libs/icomoon/selection.json +++ b/src/Squidex/app-libs/icomoon/selection.json @@ -1,6 +1,62 @@ { "IcoMoonType": "selection", "icons": [ + { + "icon": { + "paths": [ + "M810 274l-238 238 238 238-60 60-238-238-238 238-60-60 238-238-238-238 60-60 238 238 238-238z" + ], + "attrs": [], + "isMulticolor": false, + "isMulticolor2": false, + "tags": [ + "close" + ], + "defaultCode": 58829, + "grid": 24 + }, + "attrs": [], + "properties": { + "order": 16, + "ligatures": "clear, close", + "id": 157, + "prevSize": 24, + "code": 58829, + "name": "close" + }, + "setIdx": 0, + "setId": 2, + "iconIdx": 157 + }, + { + "icon": { + "paths": [ + "M810 554h-256v256h-84v-256h-256v-84h256v-256h84v256h256v84z" + ], + "attrs": [ + {} + ], + "isMulticolor": false, + "isMulticolor2": false, + "tags": [ + "add" + ], + "grid": 24 + }, + "attrs": [ + {} + ], + "properties": { + "order": 1, + "id": 0, + "prevSize": 24, + "code": 59649, + "name": "plus" + }, + "setIdx": 1, + "setId": 1, + "iconIdx": 11 + }, { "icon": { "paths": [ @@ -26,9 +82,9 @@ "prevSize": 32, "code": 59653 }, - "setIdx": 0, - "setId": 2, - "iconIdx": 5 + "setIdx": 1, + "setId": 1, + "iconIdx": 0 }, { "icon": { @@ -59,9 +115,9 @@ "prevSize": 32, "code": 59662 }, - "setIdx": 0, - "setId": 2, - "iconIdx": 14 + "setIdx": 1, + "setId": 1, + "iconIdx": 1 }, { "icon": { @@ -91,9 +147,9 @@ "prevSize": 32, "code": 59685 }, - "setIdx": 0, - "setId": 2, - "iconIdx": 37 + "setIdx": 1, + "setId": 1, + "iconIdx": 2 }, { "icon": { @@ -123,9 +179,9 @@ "prevSize": 32, "code": 59692 }, - "setIdx": 0, - "setId": 2, - "iconIdx": 44 + "setIdx": 1, + "setId": 1, + "iconIdx": 3 }, { "icon": { @@ -151,9 +207,9 @@ "prevSize": 32, "code": 59694 }, - "setIdx": 0, - "setId": 2, - "iconIdx": 46 + "setIdx": 1, + "setId": 1, + "iconIdx": 4 }, { "icon": { @@ -180,9 +236,9 @@ "prevSize": 32, "code": 59713 }, - "setIdx": 0, - "setId": 2, - "iconIdx": 65 + "setIdx": 1, + "setId": 1, + "iconIdx": 5 }, { "icon": { @@ -211,9 +267,9 @@ "prevSize": 32, "code": 59725 }, - "setIdx": 0, - "setId": 2, - "iconIdx": 77 + "setIdx": 1, + "setId": 1, + "iconIdx": 6 }, { "icon": { @@ -244,9 +300,9 @@ "prevSize": 32, "code": 59796 }, - "setIdx": 0, - "setId": 2, - "iconIdx": 148 + "setIdx": 1, + "setId": 1, + "iconIdx": 7 }, { "icon": { @@ -275,9 +331,9 @@ "prevSize": 32, "code": 59814 }, - "setIdx": 0, - "setId": 2, - "iconIdx": 166 + "setIdx": 1, + "setId": 1, + "iconIdx": 8 }, { "icon": { @@ -308,9 +364,9 @@ "prevSize": 32, "code": 59820 }, - "setIdx": 0, - "setId": 2, - "iconIdx": 172 + "setIdx": 1, + "setId": 1, + "iconIdx": 9 }, { "icon": { @@ -336,38 +392,9 @@ "prevSize": 32, "code": 59995 }, - "setIdx": 0, - "setId": 2, - "iconIdx": 347 - }, - { - "icon": { - "paths": [ - "M810 554h-256v256h-84v-256h-256v-84h256v-256h84v256h256v84z" - ], - "attrs": [ - {} - ], - "isMulticolor": false, - "isMulticolor2": false, - "tags": [ - "add" - ], - "grid": 24 - }, - "attrs": [ - {} - ], - "properties": { - "order": 1, - "id": 0, - "prevSize": 24, - "code": 59649, - "name": "plus" - }, "setIdx": 1, "setId": 1, - "iconIdx": 0 + "iconIdx": 10 }, { "icon": { @@ -398,9 +425,9 @@ "prevSize": 32, "code": 59648 }, - "setIdx": 2, - "setId": 0, - "iconIdx": 0 + "setIdx": 1, + "setId": 1, + "iconIdx": 12 } ], "height": 1024, diff --git a/src/Squidex/app-libs/icomoon/style.css b/src/Squidex/app-libs/icomoon/style.css index bbc2f8a4e..9ecdcec48 100644 --- a/src/Squidex/app-libs/icomoon/style.css +++ b/src/Squidex/app-libs/icomoon/style.css @@ -1,10 +1,10 @@ @font-face { font-family: 'icomoon'; - src: url('fonts/icomoon.eot?qb9mo3'); - src: url('fonts/icomoon.eot?qb9mo3#iefix') format('embedded-opentype'), - url('fonts/icomoon.ttf?qb9mo3') format('truetype'), - url('fonts/icomoon.woff?qb9mo3') format('woff'), - url('fonts/icomoon.svg?qb9mo3#icomoon') format('svg'); + src: url('fonts/icomoon.eot?sylov9'); + src: url('fonts/icomoon.eot?sylov9#iefix') format('embedded-opentype'), + url('fonts/icomoon.ttf?sylov9') format('truetype'), + url('fonts/icomoon.woff?sylov9') format('woff'), + url('fonts/icomoon.svg?sylov9#icomoon') format('svg'); font-weight: normal; font-style: normal; } @@ -24,6 +24,12 @@ -moz-osx-font-smoothing: grayscale; } +.icon-close:before { + content: "\e5cd"; +} +.icon-plus:before { + content: "\e901"; +} .icon-pencil:before { content: "\e905"; } @@ -57,9 +63,6 @@ .icon-filter:before { content: "\ea5b"; } -.icon-plus:before { - content: "\e901"; -} .icon-logo:before { content: "\e900"; } diff --git a/src/Squidex/app/components/internal/app/settings/client.component.html b/src/Squidex/app/components/internal/app/settings/client.component.html index 4df97a61b..0cd164fd6 100644 --- a/src/Squidex/app/components/internal/app/settings/client.component.html +++ b/src/Squidex/app/components/internal/app/settings/client.component.html @@ -15,12 +15,14 @@
- +
- Cancel + + +

diff --git a/src/Squidex/app/components/internal/app/settings/client.component.scss b/src/Squidex/app/components/internal/app/settings/client.component.scss index ff2f1c01c..fcd6b9f69 100644 --- a/src/Squidex/app/components/internal/app/settings/client.component.scss +++ b/src/Squidex/app/components/internal/app/settings/client.component.scss @@ -34,6 +34,14 @@ display: inline-block; } } + + h3 { + font-size: 1.6rem; + } + + .form-control { + width: 250px; + } } } diff --git a/src/Squidex/app/components/internal/app/settings/client.component.ts b/src/Squidex/app/components/internal/app/settings/client.component.ts index 484e69216..d04342255 100644 --- a/src/Squidex/app/components/internal/app/settings/client.component.ts +++ b/src/Squidex/app/components/internal/app/settings/client.component.ts @@ -15,6 +15,8 @@ import { ModalView } from 'shared'; +const ESCAPE_KEY = 27; + @Ng2.Component({ selector: 'sqx-client', styles, @@ -23,7 +25,7 @@ import { fadeAnimation ] }) -export class ClientComponent implements Ng2.OnChanges { +export class ClientComponent { public isRenaming = false; public appClientToken: AccessTokenDto; @@ -61,7 +63,7 @@ export class ClientComponent implements Ng2.OnChanges { ) { } - public ngOnChanges() { + public resetForm() { this.renameForm.controls['name'].setValue(this.clientName); } @@ -70,12 +72,24 @@ export class ClientComponent implements Ng2.OnChanges { } public startRename() { + this.resetForm(); + this.isRenaming = true; } + public onKeyDown(keyCode: number) { + if (keyCode === ESCAPE_KEY) { + this.cancelRename(); + } + } + public rename() { try { - this.renamed.emit(this.renameForm.controls['name'].value); + const newName = this.renameForm.controls['name'].value; + + if (newName !== this.clientName) { + this.renamed.emit(); + } } finally { this.isRenaming = false; } diff --git a/src/Squidex/app/components/internal/app/settings/clients-page.component.html b/src/Squidex/app/components/internal/app/settings/clients-page.component.html index 2f9cb4dbf..96013d091 100644 --- a/src/Squidex/app/components/internal/app/settings/clients-page.component.html +++ b/src/Squidex/app/components/internal/app/settings/clients-page.component.html @@ -36,7 +36,7 @@

- +
diff --git a/src/Squidex/app/features/settings/module.ts b/src/Squidex/app/features/settings/module.ts new file mode 100644 index 000000000..e69de29bb diff --git a/src/Squidex/app/features/settings/routes.ts b/src/Squidex/app/features/settings/routes.ts new file mode 100644 index 000000000..e69de29bb diff --git a/src/Squidex/app/framework/angular/drag-model.directive.ts b/src/Squidex/app/framework/angular/drag-model.directive.ts index 88bba4001..27746ceb5 100644 --- a/src/Squidex/app/framework/angular/drag-model.directive.ts +++ b/src/Squidex/app/framework/angular/drag-model.directive.ts @@ -20,7 +20,7 @@ export class DragModelDirective { private mouseUpSubscription: Function | null; private clonedElement: HTMLElement | null; - @Ng2.Input('gpDragMsqxDragModelodel') + @Ng2.Input('sqxDragModel') public model: any; constructor( diff --git a/src/Squidex/app/framework/angular/focus-on-change.directive.ts b/src/Squidex/app/framework/angular/focus-on-change.directive.ts index 5a2f54aa5..9c4cedd42 100644 --- a/src/Squidex/app/framework/angular/focus-on-change.directive.ts +++ b/src/Squidex/app/framework/angular/focus-on-change.directive.ts @@ -12,7 +12,10 @@ import * as Ng2 from '@angular/core'; }) export class FocusOnChangeDirective implements Ng2.OnChanges { @Ng2.Input() - public gpFocusOnChange: any; + public sqxFocusOnChange: any; + + @Ng2.Input() + public select: boolean; constructor( private readonly elementRef: Ng2.ElementRef, @@ -23,7 +26,10 @@ export class FocusOnChangeDirective implements Ng2.OnChanges { public ngOnChanges(changes: { [key: string]: Ng2.SimpleChange }) { setTimeout(() => { this.renderer.invokeElementMethod(this.elementRef.nativeElement, 'focus', []); - this.renderer.invokeElementMethod(this.elementRef.nativeElement, 'select', []); + + if (this.select) { + this.renderer.invokeElementMethod(this.elementRef.nativeElement, 'select', []); + } }, 100); } } \ No newline at end of file diff --git a/src/Squidex/app/framework/angular/focus-on-init.directive.ts b/src/Squidex/app/framework/angular/focus-on-init.directive.ts index 3e5c1876d..de08ecba8 100644 --- a/src/Squidex/app/framework/angular/focus-on-init.directive.ts +++ b/src/Squidex/app/framework/angular/focus-on-init.directive.ts @@ -12,7 +12,7 @@ import * as Ng2 from '@angular/core'; }) export class FocusOnInitDirective implements Ng2.OnInit { @Ng2.Input() - public gpFocusOnChange: any; + public select: boolean; constructor( private readonly elementRef: Ng2.ElementRef, @@ -23,7 +23,10 @@ export class FocusOnInitDirective implements Ng2.OnInit { public ngOnInit() { setTimeout(() => { this.renderer.invokeElementMethod(this.elementRef.nativeElement, 'focus', []); - this.renderer.invokeElementMethod(this.elementRef.nativeElement, 'select', []); + + if (this.select) { + this.renderer.invokeElementMethod(this.elementRef.nativeElement, 'select', []); + } }); } } \ No newline at end of file diff --git a/src/Squidex/app/theme/_bootstrap.scss b/src/Squidex/app/theme/_bootstrap.scss index 583021046..7bc88767e 100644 --- a/src/Squidex/app/theme/_bootstrap.scss +++ b/src/Squidex/app/theme/_bootstrap.scss @@ -211,6 +211,12 @@ } } +.btn-cancel { + padding: .2rem; + font-size: 1.5rem; + font-weight: normal; +} + .btn-link { &.btn-danger { @include link-button($color-theme-error); diff --git a/src/Squidex/app/theme/_layout.scss b/src/Squidex/app/theme/_layout.scss index 9245413ae..224871668 100644 --- a/src/Squidex/app/theme/_layout.scss +++ b/src/Squidex/app/theme/_layout.scss @@ -43,7 +43,8 @@ h1 { &-right { background: $sidebar-color; position: relative; - width: 220px; + min-width: 220px; + max-width: 220px; } &-right {