Download Jar. Libraryless. Click here for Pure Java version (10588L/71K/237K).
1 | !7 |
2 | |
3 | static int maxLineLength = tenK(); |
4 | |
5 | concept Dialog { |
6 | new L<Entry> entries; |
7 | } |
8 | |
9 | concept Entry { |
10 | S text; |
11 | S ip; |
12 | } |
13 | |
14 | p { db(); } |
15 | |
16 | html { |
17 | S text = mapGet text(params); |
18 | Dialog dialog = null; |
19 | if (nempty(text)) { |
20 | text = shorten(text, maxLineLength); |
21 | dialog = cnew(Dialog); |
22 | dialog.entries.add(cnew(Entry, ip := subBot_clientIP(), +text)); |
23 | dialog.change(); |
24 | } |
25 | ret hhtml_head_title_body("Talk", |
26 | hcommentIfNempty(dialog != null ? dialog.id : null) |
27 | + hfullcenter(hform(htextfield('text, autofocus := true, style := "width: 400px; text-align: center"))) |
28 | ); |
29 | } |
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1021156 |
Snippet name: | Input Field [Web Bot] |
Eternal ID of this version: | #1021156/10 |
Text MD5: | f41c9314bbc98875744e7dbf2a828616 |
Transpilation MD5: | 9394de07bb8d3a846e6ae9233b26e8f5 |
Author: | stefan |
Category: | javax / web |
Type: | JavaX module |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-01-31 06:01:27 |
Source code size: | 615 bytes / 29 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 417 / 1769 |
Version history: | 9 change(s) |
Referenced in: | [show references] |