all: intial code import
This commit is contained in:
0
ContactBook.package/WAContact.class/README.md
Normal file
0
ContactBook.package/WAContact.class/README.md
Normal file
@@ -0,0 +1,5 @@
|
||||
operations
|
||||
editContact: aContact
|
||||
^ self new
|
||||
setContact: aContact;
|
||||
yourself
|
3
ContactBook.package/WAContact.class/instance/contact.st
Normal file
3
ContactBook.package/WAContact.class/instance/contact.st
Normal file
@@ -0,0 +1,3 @@
|
||||
accessing
|
||||
contact
|
||||
^ contact
|
@@ -0,0 +1,4 @@
|
||||
initialize
|
||||
initialize
|
||||
super initialize.
|
||||
contact := Contact new.
|
@@ -0,0 +1,9 @@
|
||||
rendering
|
||||
renderButtonsOn: html
|
||||
html tbsFormGroup: [
|
||||
html tbsButtonGroup: [
|
||||
self
|
||||
renderSubmitButtonOn: html;
|
||||
renderCancelButtonOn: html
|
||||
]
|
||||
]
|
@@ -0,0 +1,6 @@
|
||||
rendering
|
||||
renderCancelButtonOn: html
|
||||
html tbsButton
|
||||
beDanger;
|
||||
cancelCallback: [ self answer: nil ];
|
||||
with: 'Cancel'
|
@@ -0,0 +1,9 @@
|
||||
rendering
|
||||
renderContentOn: html
|
||||
html tbsContainer: [
|
||||
html heading with: 'Contact Editing'.
|
||||
html tbsForm with: [
|
||||
self renderFieldsOn: html.
|
||||
self renderButtonsOn: html
|
||||
]
|
||||
]
|
@@ -0,0 +1,10 @@
|
||||
rendering
|
||||
renderEmailFieldOn: html
|
||||
html tbsFormGroup: [
|
||||
html label: 'Email'.
|
||||
html emailInput
|
||||
tbsFormControl;
|
||||
placeholder: 'your@email.eu';
|
||||
callback: [ :email | self contact email: email address ];
|
||||
value: (self contact email ifNil: '')
|
||||
]
|
@@ -0,0 +1,4 @@
|
||||
rendering
|
||||
renderFieldsOn: html
|
||||
self renderFullnameFieldOn: html.
|
||||
self renderEmailFieldOn: html
|
@@ -0,0 +1,10 @@
|
||||
rendering
|
||||
renderFullnameFieldOn: html
|
||||
html tbsFormGroup: [
|
||||
html label: 'Fullname'.
|
||||
html textInput
|
||||
tbsFormControl;
|
||||
placeholder: 'fullname';
|
||||
callback: [ :value | self contact fullname: value ];
|
||||
value: (self contact fullname ifNil: '')
|
||||
]
|
@@ -0,0 +1,7 @@
|
||||
rendering
|
||||
renderSubmitButtonOn: html
|
||||
html tbsSubmitButton
|
||||
beSuccess;
|
||||
bePrimary;
|
||||
callback: [ self answer: self contact ];
|
||||
with: 'Save'
|
@@ -0,0 +1,3 @@
|
||||
accessing
|
||||
setContact: aContact
|
||||
contact := aContact
|
14
ContactBook.package/WAContact.class/properties.json
Normal file
14
ContactBook.package/WAContact.class/properties.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"category" : "ContactBook",
|
||||
"classinstvars" : [
|
||||
],
|
||||
"classvars" : [
|
||||
],
|
||||
"commentStamp" : "",
|
||||
"instvars" : [
|
||||
"contact" ],
|
||||
"name" : "WAContact",
|
||||
"pools" : [
|
||||
],
|
||||
"super" : "WAComponent",
|
||||
"type" : "normal" }
|
Reference in New Issue
Block a user