mirror of
https://github.com/Karaka-Management/oms-Profile.git
synced 2026-01-24 13:18:41 +00:00
Improved action draft
This commit is contained in:
parent
baa8073591
commit
602389ee44
|
|
@ -13,7 +13,7 @@
|
|||
<input type="text" list="<?= htmlspecialchars($this->getId(), ENT_COMPAT, 'utf-8'); ?>-datalist" id="<?= htmlspecialchars($this->getId(), ENT_COMPAT, 'utf-8'); ?>" name="receiver" placeholder=" Guest" data-action='[
|
||||
{
|
||||
"key": 1, "listener": "keyup", "action": [
|
||||
{"key": 1, "type": "validate.keypress", "pressed": "!enter"},
|
||||
{"key": 1, "type": "validate.keypress", "pressed": "!13"},
|
||||
{"key": 2, "type": "utils.timer", "id": "<?= htmlspecialchars($this->getId(), ENT_COMPAT, 'utf-8'); ?>", "delay": 500, "resets": true},
|
||||
{"key": 3, "type": "dom.datalist.clear", "id": "<?= htmlspecialchars($this->getId(), ENT_COMPAT, 'utf-8'); ?>-datalist"},
|
||||
{"key": 4, "type": "message.request", "uri": "{/base}/{/lang}/api/admin/find/account?search={#<?= htmlspecialchars($this->getId(), ENT_COMPAT, 'utf-8'); ?>}", "method": "GET", "request_type": "json"},
|
||||
|
|
@ -21,25 +21,14 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"key": 2, "listener": "keyup", "action" : [
|
||||
{"key": 1, "type": "validate.keypress", "pressed": "enter"},
|
||||
"key": 2, "listener": "keydown", "action" : [
|
||||
{"key": 1, "type": "validate.keypress", "pressed": "13"},
|
||||
{"key": 2, "type": "message.request", "uri": "{/base}/{/lang}/api/admin/find/account?search={#<?= htmlspecialchars($this->getId(), ENT_COMPAT, 'utf-8'); ?>}", "method": "GET", "request_type": "json"},
|
||||
{"key": 3, "type": "dom.set", "id": "<?= htmlspecialchars($this->getId(), ENT_COMPAT, 'utf-8'); ?>-idlist" "data": ""}
|
||||
{"key": 3, "type": "dom.setvalue", "overwrite": false, "id": "<?= htmlspecialchars($this->getId(), ENT_COMPAT, 'utf-8'); ?>-idlist", "data-path": "", "data": ""},
|
||||
{"key": 4, "type": "dom.setvalue", "overwrite": false, "id": "<?= htmlspecialchars($this->getId(), ENT_COMPAT, 'utf-8'); ?>-taglist", "data-path": "", "data": ""}
|
||||
]
|
||||
}
|
||||
]' required><!-- todo: handle keyup-enter -->
|
||||
<datalist id="<?= htmlspecialchars($this->getId(), ENT_COMPAT, 'utf-8'); ?>-datalist"></datalist>
|
||||
<input type="text" id="<?= htmlspecialchars($this->getId(), ENT_COMPAT, 'utf-8'); ?>-list"></span>
|
||||
<!--
|
||||
<ul class="select" data-action='[
|
||||
{
|
||||
"listener": "click", "selector": "ul.select li" "action": [
|
||||
{"key": 1, "type": "dom.add", "id": "taglist", "schema": "<span data-value=\"{$value}\">{$text}</span>", "position": "end"},
|
||||
{"key": 2, "type": "dom.bind", "id": "asfdsaf"}
|
||||
]
|
||||
}
|
||||
]'>
|
||||
<li data-value="my value">Text
|
||||
</ul>
|
||||
-->
|
||||
<div id="tag-list"></div>
|
||||
<input type="hidden" id="<?= htmlspecialchars($this->getId(), ENT_COMPAT, 'utf-8'); ?>-idlist"></span>
|
||||
<div id="<?= htmlspecialchars($this->getId(), ENT_COMPAT, 'utf-8'); ?>-taglist"></div>
|
||||
Loading…
Reference in New Issue
Block a user