Commit e7f984366b6fa43eae416614ca2fbcffae0ef737
1 parent
27e8cf1c
add specialized HTML elements like:
phone number with possibility to initiate call, email with mailto link
Showing
1 changed file
with
55 additions
and
0 deletions
Show diff stats
| 1 | +/* | ||
| 2 | + * Created by PyramIDE. | ||
| 3 | + * User: フランスのトトロ aka (David RENÉ) | ||
| 4 | + * Date: 01/06/2017 | ||
| 5 | + * Time: 12:03 | ||
| 6 | + * © Calexium | ||
| 7 | + */ | ||
| 8 | + | ||
| 9 | +read calexium_lib/web/CXM_making_a_web_site.anubis | ||
| 10 | + | ||
| 11 | +public define HTML_Off_Form | ||
| 12 | + phone | ||
| 13 | + ( | ||
| 14 | + List(CoreAttrs) attrs, | ||
| 15 | + String phone_number | ||
| 16 | + )= | ||
| 17 | + if phone_number = "" then empty | ||
| 18 | + else | ||
| 19 | + with _attrs = [data("phone-number", phone_number), event(onclick, "hk_phone_call(this)"), class("phone_click") . attrs], | ||
| 20 | + div([ | ||
| 21 | + image(_attrs, "/icons/16x16/phone.png"), | ||
| 22 | + text(_attrs, phone_number) | ||
| 23 | + ]) | ||
| 24 | +. | ||
| 25 | + | ||
| 26 | +public define HTML_Off_Form | ||
| 27 | + phone | ||
| 28 | + ( | ||
| 29 | + String phone_number | ||
| 30 | + )= | ||
| 31 | + phone([], phone_number) | ||
| 32 | +. | ||
| 33 | + | ||
| 34 | +public define HTML_Off_Form | ||
| 35 | |||
| 36 | + ( | ||
| 37 | + List(CoreAttrs) attrs, | ||
| 38 | + String email_str | ||
| 39 | + )= | ||
| 40 | + if email_str = "" then empty | ||
| 41 | + else | ||
| 42 | + with _attrs = [data("email", email_str), event(onclick, "hk_send_email(this)"), class("email_click") . attrs], | ||
| 43 | + div([ | ||
| 44 | + image(_attrs, "/icons/16x16/email.png"), | ||
| 45 | + text(_attrs, email_str) | ||
| 46 | + ]) | ||
| 47 | +. | ||
| 48 | + | ||
| 49 | +public define HTML_Off_Form | ||
| 50 | |||
| 51 | + ( | ||
| 52 | + String phone_number | ||
| 53 | + )= | ||
| 54 | + email([], phone_number) | ||
| 55 | +. |