From 44a2517ca0f153e63a75bfdef5e624ac24acaa28 Mon Sep 17 00:00:00 2001 From: geireann <60007097+geireann@users.noreply.github.com> Date: Tue, 24 Aug 2021 08:19:42 -0400 Subject: icon updates --- src/client/util/CurrentUserUtils.ts | 2 +- src/client/views/nodes/button/FontIconBox.scss | 13 +++++++++++ src/client/views/nodes/button/FontIconBox.tsx | 30 ++++++++++++-------------- 3 files changed, 28 insertions(+), 17 deletions(-) (limited to 'src') diff --git a/src/client/util/CurrentUserUtils.ts b/src/client/util/CurrentUserUtils.ts index c7aa57ff0..c305a495c 100644 --- a/src/client/util/CurrentUserUtils.ts +++ b/src/client/util/CurrentUserUtils.ts @@ -989,7 +989,7 @@ export class CurrentUserUtils { { title: "Back", toolTip: "Go back", btnType: ButtonType.ClickButton, icon: "arrow-left", click: 'webBack()' }, { title: "Forward", toolTip: "Go forward", btnType: ButtonType.ClickButton, icon: "arrow-right", click: 'webForward()' }, { title: "Reload", toolTip: "Reload webpage", btnType: ButtonType.ClickButton, icon: "redo-alt", click: 'webReload()' }, - { title: "URL", toolTip: "URL", width: 150, btnType: ButtonType.EditableText, icon: "lock", script: 'webSetURL' }, + { title: "URL", toolTip: "URL", width: 150, btnType: ButtonType.EditableText, icon: "lock", ignoreClick: true, script: 'webSetURL' }, ]; return tools; diff --git a/src/client/views/nodes/button/FontIconBox.scss b/src/client/views/nodes/button/FontIconBox.scss index c1f5282d0..b6aa2ba60 100644 --- a/src/client/views/nodes/button/FontIconBox.scss +++ b/src/client/views/nodes/button/FontIconBox.scss @@ -209,6 +209,19 @@ } } + &.editableTxt { + cursor: pointer; + background: transparent; + width: 100%; + height: 100%; + + &:hover { + background-color: $close-red; + } + + + } + &.drpDownBtn { cursor: pointer; background: transparent; diff --git a/src/client/views/nodes/button/FontIconBox.tsx b/src/client/views/nodes/button/FontIconBox.tsx index 46d92cd6e..054e55c56 100644 --- a/src/client/views/nodes/button/FontIconBox.tsx +++ b/src/client/views/nodes/button/FontIconBox.tsx @@ -152,7 +152,6 @@ export class FontIconBox extends DocComponent(Fon let noviceList: string[] = []; let text: string | undefined; let dropdown = true; - let show = true; let icon: IconProp = "caret-down"; @@ -164,6 +163,8 @@ export class FontIconBox extends DocComponent(Fon dropdown = false; text = StrCast(selected.Document.type); icon = Doc.toIcon(selected.Document); + } else { + text = "None selected"; } noviceList = [CollectionViewType.Freeform, CollectionViewType.Schema, CollectionViewType.Stacking]; } else if (script === 'changeFont') { @@ -175,8 +176,6 @@ export class FontIconBox extends DocComponent(Fon } noviceList = ["Roboto", "Times New Roman", "Arial", "Georgia", "Comic Sans MS", "Tahoma", "Impact", "Crimson Text"]; - } else { - show = false; } const items = this.buttonList.map((value) => { @@ -206,7 +205,7 @@ export class FontIconBox extends DocComponent(Fon return (
this.rootDoc.dropDownOpen = !this.rootDoc.dropDownOpen : undefined}>
{text && text[0].toUpperCase() + text.slice(1)} @@ -269,7 +268,7 @@ export class FontIconBox extends DocComponent(Fon }; return (
this.rootDoc.dropDownOpen = !this.rootDoc.dropDownOpen} onPointerDown={e => e.stopPropagation()}> @@ -315,9 +314,16 @@ export class FontIconBox extends DocComponent(Fon
{this.label}
; - + console.log("switchToggle"); return ( - switchToggle ? + !switchToggle ? +
+ + {label} +
:
- : -
- - {label} -
); } @@ -365,7 +363,7 @@ export class FontIconBox extends DocComponent(Fon }; return
- TEST + ""} SetValue={setValue} contents="...">
; -- cgit v1.2.3-70-g09d2