Creating a confirmation button in importer UI.
This commit is contained in:
parent
bd7fa11363
commit
3fffd37e8f
@ -31,20 +31,28 @@ LeMiniDocsImport >> createDropdownExpandedHandleButton [
|
||||
|
||||
{ #category : #accessing }
|
||||
LeMiniDocsImport >> createURLeditable [
|
||||
| base editable |
|
||||
| base editable button |
|
||||
base := BlElement new
|
||||
background: (Color white);
|
||||
size: 200 @ 30;
|
||||
background: Color white;
|
||||
size: 300 @55;
|
||||
margin: (BlInsets all: 10);
|
||||
yourself.
|
||||
editable := BrEditableLabel new
|
||||
aptitude: BrGlamorousEditableLabelAptitude new glamorousRegularFontAndSize;
|
||||
text: 'Document link';
|
||||
fitContent;
|
||||
switchToEditor.
|
||||
editable when: BrEditorAcceptWish do: [ :aWish |
|
||||
self importDocumentFrom: aWish text asString.
|
||||
].
|
||||
editable
|
||||
when: BrEditorAcceptWish
|
||||
do: [ :aWish | self importDocumentFrom: aWish text asString ].
|
||||
button := BrButton new
|
||||
label: 'ok';
|
||||
aptitude: BrGlamorousButtonWithLabelAptitude;
|
||||
fitContent;
|
||||
relocate: 0 @ 30.
|
||||
button action: [ :aButton | editable acceptEdition ].
|
||||
base addChild: editable.
|
||||
base addChild: button.
|
||||
^ base
|
||||
]
|
||||
|
||||
@ -71,11 +79,9 @@ LeMiniDocsImport >> initialize [
|
||||
icon: BrGlamorousVectorIcons downwards;
|
||||
label: 'Add MiniDocs';
|
||||
aptitude: BrGlamorousButtonWithIconAndLabelAptitude.
|
||||
self addAptitude: (BrGlamorousWithDropdownAptitude
|
||||
self addAptitude: (BrGlamorousWithExplicitDropdownAptitude
|
||||
handle: [ self createDropdownExpandedHandleButton ]
|
||||
content: [ self createURLeditable ]).
|
||||
|
||||
self aptitude - BrGlamorousButtonExteriorAptitude.
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
|
Loading…
Reference in New Issue
Block a user