mirror of
https://github.com/Karaka-Management/oms-Organization.git
synced 2026-01-23 21:38:41 +00:00
Automated formatting changes
This commit is contained in:
parent
c8a7f44061
commit
2e6cbcb9dd
|
|
@ -1,48 +1,48 @@
|
|||
<template id="org-department-selector-tpl">
|
||||
<section id="org-department-selector" class="box w-50" style="z-index: 9; position: absolute; margin: 0 auto; left: 50%; top: 50%; transform: translate(-50%, -50%);">
|
||||
<header><h1><?= $this->getHtml('Department', 'Organization') ?></h1></header>
|
||||
|
||||
<div class="inner">
|
||||
<label for="iSearchOrgDepartment">Search</label>
|
||||
<input type="text" id="iSearchOrgDepartment" name="receiver-search" data-action='[
|
||||
{
|
||||
"key": 1, "listener": "keyup", "action": [
|
||||
{"key": 1, "type": "utils.timer", "id": "iSearchOrgDepartment", "delay": 500, "resets": true},
|
||||
{"key": 2, "type": "dom.table.clear", "id": "acc-table"},
|
||||
{"key": 3, "type": "message.request", "uri": "{/base}/{/lang}/api/organization/find/department?search={#iSearchOrgDepartment}", "method": "GET", "request_type": "json"},
|
||||
{"key": 4, "type": "dom.table.append", "id": "acc-table", "aniIn": "fadeIn", "data": [], "bindings": {"id": "id", "name": "name/0"}, "position": -1}
|
||||
]
|
||||
}
|
||||
]' autocomplete="off">
|
||||
<table id="acc-table" class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-name="id">ID
|
||||
<th data-name="name">Name
|
||||
<th data-name="address">Address
|
||||
<th data-name="city">City
|
||||
<th data-name="zip">Zip
|
||||
<th data-name="country">Country
|
||||
<!-- todo: get data from tr in action and pass it to next actions, or make new request based on table cell? -->
|
||||
<tbody data-action='[
|
||||
{
|
||||
"key": 1, "listener": "click", "selector": "#acc-table tbody tr", "action": [
|
||||
{"key": 1, "type": "dom.getvalue", "base": "self", "selector": ""},
|
||||
{"key": 2, "type": "dom.setvalue", "overwrite": false, "selector": "#{$id}-idlist", "value": "{0/id}", "data": ""},
|
||||
{"key": 3, "type": "dom.setvalue", "overwrite": false, "selector": "#{$id}-taglist", "value": "<span id=\"{$id}-taglist-{0/id}\" class=\"tag red\" data-id=\"{0/id}\"><i class=\"fa fa-times\"></i> {0/name/0}, {0/name/1}<span>", "data": ""},
|
||||
{"key": 4, "type": "dom.setvalue", "overwrite": true, "selector": "#{$id}", "value": "", "data": ""}
|
||||
]
|
||||
}
|
||||
]'>
|
||||
<tfoot>
|
||||
</table>
|
||||
<button type="button" id="iSearchOrgDepartment-close" data-action='[
|
||||
{
|
||||
"key": 1, "listener": "click", "action": [
|
||||
{"key": 1, "type": "dom.remove", "selector": "#org-department-selector", "aniOut": "fadeOut"}
|
||||
]
|
||||
}
|
||||
]'><?= $this->getHtml('Close', 'Admin') ?></button>
|
||||
</div>
|
||||
</section>
|
||||
<template id="org-department-selector-tpl">
|
||||
<section id="org-department-selector" class="box w-50" style="z-index: 9; position: absolute; margin: 0 auto; left: 50%; top: 50%; transform: translate(-50%, -50%);">
|
||||
<header><h1><?= $this->getHtml('Department', 'Organization') ?></h1></header>
|
||||
|
||||
<div class="inner">
|
||||
<label for="iSearchOrgDepartment">Search</label>
|
||||
<input type="text" id="iSearchOrgDepartment" name="receiver-search" data-action='[
|
||||
{
|
||||
"key": 1, "listener": "keyup", "action": [
|
||||
{"key": 1, "type": "utils.timer", "id": "iSearchOrgDepartment", "delay": 500, "resets": true},
|
||||
{"key": 2, "type": "dom.table.clear", "id": "acc-table"},
|
||||
{"key": 3, "type": "message.request", "uri": "{/base}/{/lang}/api/organization/find/department?search={#iSearchOrgDepartment}", "method": "GET", "request_type": "json"},
|
||||
{"key": 4, "type": "dom.table.append", "id": "acc-table", "aniIn": "fadeIn", "data": [], "bindings": {"id": "id", "name": "name/0"}, "position": -1}
|
||||
]
|
||||
}
|
||||
]' autocomplete="off">
|
||||
<table id="acc-table" class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-name="id">ID
|
||||
<th data-name="name">Name
|
||||
<th data-name="address">Address
|
||||
<th data-name="city">City
|
||||
<th data-name="zip">Zip
|
||||
<th data-name="country">Country
|
||||
<!-- todo: get data from tr in action and pass it to next actions, or make new request based on table cell? -->
|
||||
<tbody data-action='[
|
||||
{
|
||||
"key": 1, "listener": "click", "selector": "#acc-table tbody tr", "action": [
|
||||
{"key": 1, "type": "dom.getvalue", "base": "self", "selector": ""},
|
||||
{"key": 2, "type": "dom.setvalue", "overwrite": false, "selector": "#{$id}-idlist", "value": "{0/id}", "data": ""},
|
||||
{"key": 3, "type": "dom.setvalue", "overwrite": false, "selector": "#{$id}-taglist", "value": "<span id=\"{$id}-taglist-{0/id}\" class=\"tag red\" data-id=\"{0/id}\"><i class=\"fa fa-times\"></i> {0/name/0}, {0/name/1}<span>", "data": ""},
|
||||
{"key": 4, "type": "dom.setvalue", "overwrite": true, "selector": "#{$id}", "value": "", "data": ""}
|
||||
]
|
||||
}
|
||||
]'>
|
||||
<tfoot>
|
||||
</table>
|
||||
<button type="button" id="iSearchOrgDepartment-close" data-action='[
|
||||
{
|
||||
"key": 1, "listener": "click", "action": [
|
||||
{"key": 1, "type": "dom.remove", "selector": "#org-department-selector", "aniOut": "fadeOut"}
|
||||
]
|
||||
}
|
||||
]'><?= $this->getHtml('Close', 'Admin') ?></button>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
|
@ -1,49 +1,49 @@
|
|||
<div class="ipt-wrap">
|
||||
<div class="ipt-first">
|
||||
<span class="input">
|
||||
<button type="button" id="<?= $this->printHtml($this->getId()); ?>-book-button" data-action='[
|
||||
{
|
||||
"key": 1, "listener": "click", "action": [
|
||||
{"key": 1, "type": "dom.popup", "selector": "#org-department-selector-tpl", "aniIn": "fadeIn", "id": "<?= $this->printHtml($this->getId()); ?>"},
|
||||
{"key": 2, "type": "message.request", "uri": "<?= \phpOMS\Uri\UriFactory::build('{/prefix}organization/department?filter=some&limit=10'); ?>", "method": "GET", "request_type": "json"},
|
||||
{"key": 3, "type": "dom.table.append", "id": "acc-table", "aniIn": "fadeIn", "data": [], "bindings": {"id": "id", "name": "name/0"}, "position": -1},
|
||||
{"key": 4, "type": "message.request", "uri": "<?= \phpOMS\Uri\UriFactory::build('{/prefix}organization/department?filter=some&limit=10'); ?>", "method": "GET", "request_type": "json"},
|
||||
{"key": 5, "type": "dom.table.append", "id": "grp-table", "aniIn": "fadeIn", "data": [], "bindings": {"id": "id", "name": "name/0"}, "position": -1}
|
||||
]
|
||||
}
|
||||
]'><i class="fa fa-book"></i></button>
|
||||
<input type="text" list="<?= $this->printHtml($this->getId()); ?>-datalist" id="<?= $this->printHtml($this->getId()); ?>" name="receiver" placeholder=" Guest" data-action='[
|
||||
{
|
||||
"key": 1, "listener": "keyup", "action": [
|
||||
{"key": 1, "type": "validate.keypress", "pressed": "!13!37!38!39!40"},
|
||||
{"key": 2, "type": "utils.timer", "id": "<?= $this->printHtml($this->getId()); ?>", "delay": 500, "resets": true},
|
||||
{"key": 3, "type": "dom.datalist.clear", "id": "<?= $this->printHtml($this->getId()); ?>-datalist"},
|
||||
{"key": 4, "type": "message.request", "uri": "{/base}/{/lang}/api/organization/find/department?search={#<?= $this->printHtml($this->getId()); ?>}", "method": "GET", "request_type": "json"},
|
||||
{"key": 5, "type": "dom.datalist.append", "id": "<?= $this->printHtml($this->getId()); ?>-datalist", "value": "id", "text": "name"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": 2, "listener": "keydown", "action" : [
|
||||
{"key": 1, "type": "validate.keypress", "pressed": "13|9"},
|
||||
{"key": 2, "type": "message.request", "uri": "{/base}/{/lang}/api/organization/find/department?search={#<?= $this->printHtml($this->getId()); ?>}", "method": "GET", "request_type": "json"},
|
||||
{"key": 3, "type": "dom.setvalue", "overwrite": true, "selector": "#<?= $this->printHtml($this->getId()); ?>-idlist", "value": "{0/id}", "data": ""},
|
||||
{"key": 4, "type": "dom.setvalue", "overwrite": true, "selector": "#<?= $this->printHtml($this->getId()); ?>-taglist", "value": "<span id=\"<?= $this->printHtml($this->getId()); ?>-taglist-{0/id}\" class=\"tag red\" data-id=\"{0/id}\"><i class=\"fa fa-times\"></i> {0/name/0}, {0/name/1}</span>", "data": ""},
|
||||
{"key": 5, "type": "dom.setvalue", "overwrite": true, "selector": "#<?= $this->printHtml($this->getId()); ?>", "value": "", "data": ""}
|
||||
]
|
||||
}
|
||||
]'>
|
||||
<datalist id="<?= $this->printHtml($this->getId()); ?>-datalist"></datalist>
|
||||
<input type="hidden" id="<?= $this->printHtml($this->getId()); ?>-idlist"<?= $this->isRequired() ? ' required' : ''; ?>>
|
||||
</span>
|
||||
</div>
|
||||
<div class="ipt-second"><button><?= $this->getHtml('Add', '0', '0'); ?></button></div>
|
||||
</div>
|
||||
<div class="box taglist" id="<?= $this->printHtml($this->getId()); ?>-taglist" data-action='[
|
||||
{
|
||||
"key": 1, "listener": "click", "selector": "#<?= $this->printHtml($this->getId()); ?>-taglist span fa", "action": [
|
||||
{"key": 1, "type": "dom.getvalue", "base": "self"},
|
||||
{"key": 2, "type": "dom.removevalue", "selector": "#<?= $this->printHtml($this->getId()); ?>-idlist", "data": ""},
|
||||
{"key": 3, "type": "dom.remove", "base": "self"}
|
||||
]
|
||||
}
|
||||
<div class="ipt-wrap">
|
||||
<div class="ipt-first">
|
||||
<span class="input">
|
||||
<button type="button" id="<?= $this->printHtml($this->getId()); ?>-book-button" data-action='[
|
||||
{
|
||||
"key": 1, "listener": "click", "action": [
|
||||
{"key": 1, "type": "dom.popup", "selector": "#org-department-selector-tpl", "aniIn": "fadeIn", "id": "<?= $this->printHtml($this->getId()); ?>"},
|
||||
{"key": 2, "type": "message.request", "uri": "<?= \phpOMS\Uri\UriFactory::build('{/prefix}organization/department?filter=some&limit=10'); ?>", "method": "GET", "request_type": "json"},
|
||||
{"key": 3, "type": "dom.table.append", "id": "acc-table", "aniIn": "fadeIn", "data": [], "bindings": {"id": "id", "name": "name/0"}, "position": -1},
|
||||
{"key": 4, "type": "message.request", "uri": "<?= \phpOMS\Uri\UriFactory::build('{/prefix}organization/department?filter=some&limit=10'); ?>", "method": "GET", "request_type": "json"},
|
||||
{"key": 5, "type": "dom.table.append", "id": "grp-table", "aniIn": "fadeIn", "data": [], "bindings": {"id": "id", "name": "name/0"}, "position": -1}
|
||||
]
|
||||
}
|
||||
]'><i class="fa fa-book"></i></button>
|
||||
<input type="text" list="<?= $this->printHtml($this->getId()); ?>-datalist" id="<?= $this->printHtml($this->getId()); ?>" name="receiver" placeholder=" Guest" data-action='[
|
||||
{
|
||||
"key": 1, "listener": "keyup", "action": [
|
||||
{"key": 1, "type": "validate.keypress", "pressed": "!13!37!38!39!40"},
|
||||
{"key": 2, "type": "utils.timer", "id": "<?= $this->printHtml($this->getId()); ?>", "delay": 500, "resets": true},
|
||||
{"key": 3, "type": "dom.datalist.clear", "id": "<?= $this->printHtml($this->getId()); ?>-datalist"},
|
||||
{"key": 4, "type": "message.request", "uri": "{/base}/{/lang}/api/organization/find/department?search={#<?= $this->printHtml($this->getId()); ?>}", "method": "GET", "request_type": "json"},
|
||||
{"key": 5, "type": "dom.datalist.append", "id": "<?= $this->printHtml($this->getId()); ?>-datalist", "value": "id", "text": "name"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": 2, "listener": "keydown", "action" : [
|
||||
{"key": 1, "type": "validate.keypress", "pressed": "13|9"},
|
||||
{"key": 2, "type": "message.request", "uri": "{/base}/{/lang}/api/organization/find/department?search={#<?= $this->printHtml($this->getId()); ?>}", "method": "GET", "request_type": "json"},
|
||||
{"key": 3, "type": "dom.setvalue", "overwrite": true, "selector": "#<?= $this->printHtml($this->getId()); ?>-idlist", "value": "{0/id}", "data": ""},
|
||||
{"key": 4, "type": "dom.setvalue", "overwrite": true, "selector": "#<?= $this->printHtml($this->getId()); ?>-taglist", "value": "<span id=\"<?= $this->printHtml($this->getId()); ?>-taglist-{0/id}\" class=\"tag red\" data-id=\"{0/id}\"><i class=\"fa fa-times\"></i> {0/name/0}, {0/name/1}</span>", "data": ""},
|
||||
{"key": 5, "type": "dom.setvalue", "overwrite": true, "selector": "#<?= $this->printHtml($this->getId()); ?>", "value": "", "data": ""}
|
||||
]
|
||||
}
|
||||
]'>
|
||||
<datalist id="<?= $this->printHtml($this->getId()); ?>-datalist"></datalist>
|
||||
<input type="hidden" id="<?= $this->printHtml($this->getId()); ?>-idlist"<?= $this->isRequired() ? ' required' : ''; ?>>
|
||||
</span>
|
||||
</div>
|
||||
<div class="ipt-second"><button><?= $this->getHtml('Add', '0', '0'); ?></button></div>
|
||||
</div>
|
||||
<div class="box taglist" id="<?= $this->printHtml($this->getId()); ?>-taglist" data-action='[
|
||||
{
|
||||
"key": 1, "listener": "click", "selector": "#<?= $this->printHtml($this->getId()); ?>-taglist span fa", "action": [
|
||||
{"key": 1, "type": "dom.getvalue", "base": "self"},
|
||||
{"key": 2, "type": "dom.removevalue", "selector": "#<?= $this->printHtml($this->getId()); ?>-idlist", "data": ""},
|
||||
{"key": 3, "type": "dom.remove", "base": "self"}
|
||||
]
|
||||
}
|
||||
]'></div>
|
||||
|
|
@ -1,48 +1,48 @@
|
|||
<template id="org-position-selector-tpl">
|
||||
<section id="org-position-selector" class="box w-50" style="z-index: 9; position: absolute; margin: 0 auto; left: 50%; top: 50%; transform: translate(-50%, -50%);">
|
||||
<header><h1><?= $this->getHtml('Position', 'Organization') ?></h1></header>
|
||||
|
||||
<div class="inner">
|
||||
<label for="iSearchOrgPosition">Search</label>
|
||||
<input type="text" id="iSearchOrgPosition" name="receiver-search" data-action='[
|
||||
{
|
||||
"key": 1, "listener": "keyup", "action": [
|
||||
{"key": 1, "type": "utils.timer", "id": "iSearchOrgPosition", "delay": 500, "resets": true},
|
||||
{"key": 2, "type": "dom.table.clear", "id": "acc-table"},
|
||||
{"key": 3, "type": "message.request", "uri": "{/base}/{/lang}/api/organization/find/position?search={#iSearchOrgPosition}", "method": "GET", "request_type": "json"},
|
||||
{"key": 4, "type": "dom.table.append", "id": "acc-table", "aniIn": "fadeIn", "data": [], "bindings": {"id": "id", "name": "name/0"}, "position": -1}
|
||||
]
|
||||
}
|
||||
]' autocomplete="off">
|
||||
<table id="acc-table" class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-name="id">ID
|
||||
<th data-name="name">Name
|
||||
<th data-name="address">Address
|
||||
<th data-name="city">City
|
||||
<th data-name="zip">Zip
|
||||
<th data-name="country">Country
|
||||
<!-- todo: get data from tr in action and pass it to next actions, or make new request based on table cell? -->
|
||||
<tbody data-action='[
|
||||
{
|
||||
"key": 1, "listener": "click", "selector": "#acc-table tbody tr", "action": [
|
||||
{"key": 1, "type": "dom.getvalue", "base": "self", "selector": ""},
|
||||
{"key": 2, "type": "dom.setvalue", "overwrite": false, "selector": "#{$id}-idlist", "value": "{0/id}", "data": ""},
|
||||
{"key": 3, "type": "dom.setvalue", "overwrite": false, "selector": "#{$id}-taglist", "value": "<span id=\"{$id}-taglist-{0/id}\" class=\"tag red\" data-id=\"{0/id}\"><i class=\"fa fa-times\"></i> {0/name/0}, {0/name/1}<span>", "data": ""},
|
||||
{"key": 4, "type": "dom.setvalue", "overwrite": true, "selector": "#{$id}", "value": "", "data": ""}
|
||||
]
|
||||
}
|
||||
]'>
|
||||
<tfoot>
|
||||
</table>
|
||||
<button type="button" id="iSearchOrgPosition-close" data-action='[
|
||||
{
|
||||
"key": 1, "listener": "click", "action": [
|
||||
{"key": 1, "type": "dom.remove", "selector": "#org-position-selector", "aniOut": "fadeOut"}
|
||||
]
|
||||
}
|
||||
]'><?= $this->getHtml('Close', 'Admin') ?></button>
|
||||
</div>
|
||||
</section>
|
||||
<template id="org-position-selector-tpl">
|
||||
<section id="org-position-selector" class="box w-50" style="z-index: 9; position: absolute; margin: 0 auto; left: 50%; top: 50%; transform: translate(-50%, -50%);">
|
||||
<header><h1><?= $this->getHtml('Position', 'Organization') ?></h1></header>
|
||||
|
||||
<div class="inner">
|
||||
<label for="iSearchOrgPosition">Search</label>
|
||||
<input type="text" id="iSearchOrgPosition" name="receiver-search" data-action='[
|
||||
{
|
||||
"key": 1, "listener": "keyup", "action": [
|
||||
{"key": 1, "type": "utils.timer", "id": "iSearchOrgPosition", "delay": 500, "resets": true},
|
||||
{"key": 2, "type": "dom.table.clear", "id": "acc-table"},
|
||||
{"key": 3, "type": "message.request", "uri": "{/base}/{/lang}/api/organization/find/position?search={#iSearchOrgPosition}", "method": "GET", "request_type": "json"},
|
||||
{"key": 4, "type": "dom.table.append", "id": "acc-table", "aniIn": "fadeIn", "data": [], "bindings": {"id": "id", "name": "name/0"}, "position": -1}
|
||||
]
|
||||
}
|
||||
]' autocomplete="off">
|
||||
<table id="acc-table" class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-name="id">ID
|
||||
<th data-name="name">Name
|
||||
<th data-name="address">Address
|
||||
<th data-name="city">City
|
||||
<th data-name="zip">Zip
|
||||
<th data-name="country">Country
|
||||
<!-- todo: get data from tr in action and pass it to next actions, or make new request based on table cell? -->
|
||||
<tbody data-action='[
|
||||
{
|
||||
"key": 1, "listener": "click", "selector": "#acc-table tbody tr", "action": [
|
||||
{"key": 1, "type": "dom.getvalue", "base": "self", "selector": ""},
|
||||
{"key": 2, "type": "dom.setvalue", "overwrite": false, "selector": "#{$id}-idlist", "value": "{0/id}", "data": ""},
|
||||
{"key": 3, "type": "dom.setvalue", "overwrite": false, "selector": "#{$id}-taglist", "value": "<span id=\"{$id}-taglist-{0/id}\" class=\"tag red\" data-id=\"{0/id}\"><i class=\"fa fa-times\"></i> {0/name/0}, {0/name/1}<span>", "data": ""},
|
||||
{"key": 4, "type": "dom.setvalue", "overwrite": true, "selector": "#{$id}", "value": "", "data": ""}
|
||||
]
|
||||
}
|
||||
]'>
|
||||
<tfoot>
|
||||
</table>
|
||||
<button type="button" id="iSearchOrgPosition-close" data-action='[
|
||||
{
|
||||
"key": 1, "listener": "click", "action": [
|
||||
{"key": 1, "type": "dom.remove", "selector": "#org-position-selector", "aniOut": "fadeOut"}
|
||||
]
|
||||
}
|
||||
]'><?= $this->getHtml('Close', 'Admin') ?></button>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
|
@ -1,49 +1,49 @@
|
|||
<div class="ipt-wrap">
|
||||
<div class="ipt-first">
|
||||
<span class="input">
|
||||
<button type="button" id="<?= $this->printHtml($this->getId()); ?>-book-button" data-action='[
|
||||
{
|
||||
"key": 1, "listener": "click", "action": [
|
||||
{"key": 1, "type": "dom.popup", "selector": "#org-position-selector-tpl", "aniIn": "fadeIn", "id": "<?= $this->printHtml($this->getId()); ?>"},
|
||||
{"key": 2, "type": "message.request", "uri": "<?= \phpOMS\Uri\UriFactory::build('{/prefix}organization/position?filter=some&limit=10'); ?>", "method": "GET", "request_type": "json"},
|
||||
{"key": 3, "type": "dom.table.append", "id": "acc-table", "aniIn": "fadeIn", "data": [], "bindings": {"id": "id", "name": "name/0"}, "position": -1},
|
||||
{"key": 4, "type": "message.request", "uri": "<?= \phpOMS\Uri\UriFactory::build('{/prefix}organization/position?filter=some&limit=10'); ?>", "method": "GET", "request_type": "json"},
|
||||
{"key": 5, "type": "dom.table.append", "id": "grp-table", "aniIn": "fadeIn", "data": [], "bindings": {"id": "id", "name": "name/0"}, "position": -1}
|
||||
]
|
||||
}
|
||||
]' formaction=""><i class="fa fa-book"></i></button>
|
||||
<input type="text" list="<?= $this->printHtml($this->getId()); ?>-datalist" id="<?= $this->printHtml($this->getId()); ?>" name="receiver" placeholder=" Guest" data-action='[
|
||||
{
|
||||
"key": 1, "listener": "keyup", "action": [
|
||||
{"key": 1, "type": "validate.keypress", "pressed": "!13!37!38!39!40"},
|
||||
{"key": 2, "type": "utils.timer", "id": "<?= $this->printHtml($this->getId()); ?>", "delay": 500, "resets": true},
|
||||
{"key": 3, "type": "dom.datalist.clear", "id": "<?= $this->printHtml($this->getId()); ?>-datalist"},
|
||||
{"key": 4, "type": "message.request", "uri": "{/base}/{/lang}/api/organization/find/position?search={#<?= $this->printHtml($this->getId()); ?>}", "method": "GET", "request_type": "json"},
|
||||
{"key": 5, "type": "dom.datalist.append", "id": "<?= $this->printHtml($this->getId()); ?>-datalist", "value": "id", "text": "name"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": 2, "listener": "keydown", "action" : [
|
||||
{"key": 1, "type": "validate.keypress", "pressed": "13|9"},
|
||||
{"key": 2, "type": "message.request", "uri": "{/base}/{/lang}/api/organization/find/position?search={#<?= $this->printHtml($this->getId()); ?>}", "method": "GET", "request_type": "json"},
|
||||
{"key": 3, "type": "dom.setvalue", "overwrite": true, "selector": "#<?= $this->printHtml($this->getId()); ?>-idlist", "value": "{0/id}", "data": ""},
|
||||
{"key": 4, "type": "dom.setvalue", "overwrite": true, "selector": "#<?= $this->printHtml($this->getId()); ?>-taglist", "value": "<span id=\"<?= $this->printHtml($this->getId()); ?>-taglist-{0/id}\" class=\"tag red\" data-id=\"{0/id}\"><i class=\"fa fa-times\"></i> {0/name/0}, {0/name/1}</span>", "data": ""},
|
||||
{"key": 5, "type": "dom.setvalue", "overwrite": true, "selector": "#<?= $this->printHtml($this->getId()); ?>", "value": "", "data": ""}
|
||||
]
|
||||
}
|
||||
]'>
|
||||
<datalist id="<?= $this->printHtml($this->getId()); ?>-datalist"></datalist>
|
||||
<input type="hidden" id="<?= $this->printHtml($this->getId()); ?>-idlist"<?= $this->isRequired() ? ' required' : ''; ?>>
|
||||
</span>
|
||||
</div>
|
||||
<div class="ipt-second"><button><?= $this->getHtml('Add', '0', '0'); ?></button></div>
|
||||
</div>
|
||||
<div class="box taglist" id="<?= $this->printHtml($this->getId()); ?>-taglist" data-action='[
|
||||
{
|
||||
"key": 1, "listener": "click", "selector": "#<?= $this->printHtml($this->getId()); ?>-taglist span fa", "action": [
|
||||
{"key": 1, "type": "dom.getvalue", "base": "self"},
|
||||
{"key": 2, "type": "dom.removevalue", "selector": "#<?= $this->printHtml($this->getId()); ?>-idlist", "data": ""},
|
||||
{"key": 3, "type": "dom.remove", "base": "self"}
|
||||
]
|
||||
}
|
||||
<div class="ipt-wrap">
|
||||
<div class="ipt-first">
|
||||
<span class="input">
|
||||
<button type="button" id="<?= $this->printHtml($this->getId()); ?>-book-button" data-action='[
|
||||
{
|
||||
"key": 1, "listener": "click", "action": [
|
||||
{"key": 1, "type": "dom.popup", "selector": "#org-position-selector-tpl", "aniIn": "fadeIn", "id": "<?= $this->printHtml($this->getId()); ?>"},
|
||||
{"key": 2, "type": "message.request", "uri": "<?= \phpOMS\Uri\UriFactory::build('{/prefix}organization/position?filter=some&limit=10'); ?>", "method": "GET", "request_type": "json"},
|
||||
{"key": 3, "type": "dom.table.append", "id": "acc-table", "aniIn": "fadeIn", "data": [], "bindings": {"id": "id", "name": "name/0"}, "position": -1},
|
||||
{"key": 4, "type": "message.request", "uri": "<?= \phpOMS\Uri\UriFactory::build('{/prefix}organization/position?filter=some&limit=10'); ?>", "method": "GET", "request_type": "json"},
|
||||
{"key": 5, "type": "dom.table.append", "id": "grp-table", "aniIn": "fadeIn", "data": [], "bindings": {"id": "id", "name": "name/0"}, "position": -1}
|
||||
]
|
||||
}
|
||||
]' formaction=""><i class="fa fa-book"></i></button>
|
||||
<input type="text" list="<?= $this->printHtml($this->getId()); ?>-datalist" id="<?= $this->printHtml($this->getId()); ?>" name="receiver" placeholder=" Guest" data-action='[
|
||||
{
|
||||
"key": 1, "listener": "keyup", "action": [
|
||||
{"key": 1, "type": "validate.keypress", "pressed": "!13!37!38!39!40"},
|
||||
{"key": 2, "type": "utils.timer", "id": "<?= $this->printHtml($this->getId()); ?>", "delay": 500, "resets": true},
|
||||
{"key": 3, "type": "dom.datalist.clear", "id": "<?= $this->printHtml($this->getId()); ?>-datalist"},
|
||||
{"key": 4, "type": "message.request", "uri": "{/base}/{/lang}/api/organization/find/position?search={#<?= $this->printHtml($this->getId()); ?>}", "method": "GET", "request_type": "json"},
|
||||
{"key": 5, "type": "dom.datalist.append", "id": "<?= $this->printHtml($this->getId()); ?>-datalist", "value": "id", "text": "name"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": 2, "listener": "keydown", "action" : [
|
||||
{"key": 1, "type": "validate.keypress", "pressed": "13|9"},
|
||||
{"key": 2, "type": "message.request", "uri": "{/base}/{/lang}/api/organization/find/position?search={#<?= $this->printHtml($this->getId()); ?>}", "method": "GET", "request_type": "json"},
|
||||
{"key": 3, "type": "dom.setvalue", "overwrite": true, "selector": "#<?= $this->printHtml($this->getId()); ?>-idlist", "value": "{0/id}", "data": ""},
|
||||
{"key": 4, "type": "dom.setvalue", "overwrite": true, "selector": "#<?= $this->printHtml($this->getId()); ?>-taglist", "value": "<span id=\"<?= $this->printHtml($this->getId()); ?>-taglist-{0/id}\" class=\"tag red\" data-id=\"{0/id}\"><i class=\"fa fa-times\"></i> {0/name/0}, {0/name/1}</span>", "data": ""},
|
||||
{"key": 5, "type": "dom.setvalue", "overwrite": true, "selector": "#<?= $this->printHtml($this->getId()); ?>", "value": "", "data": ""}
|
||||
]
|
||||
}
|
||||
]'>
|
||||
<datalist id="<?= $this->printHtml($this->getId()); ?>-datalist"></datalist>
|
||||
<input type="hidden" id="<?= $this->printHtml($this->getId()); ?>-idlist"<?= $this->isRequired() ? ' required' : ''; ?>>
|
||||
</span>
|
||||
</div>
|
||||
<div class="ipt-second"><button><?= $this->getHtml('Add', '0', '0'); ?></button></div>
|
||||
</div>
|
||||
<div class="box taglist" id="<?= $this->printHtml($this->getId()); ?>-taglist" data-action='[
|
||||
{
|
||||
"key": 1, "listener": "click", "selector": "#<?= $this->printHtml($this->getId()); ?>-taglist span fa", "action": [
|
||||
{"key": 1, "type": "dom.getvalue", "base": "self"},
|
||||
{"key": 2, "type": "dom.removevalue", "selector": "#<?= $this->printHtml($this->getId()); ?>-idlist", "data": ""},
|
||||
{"key": 3, "type": "dom.remove", "base": "self"}
|
||||
]
|
||||
}
|
||||
]'></div>
|
||||
|
|
@ -1,48 +1,48 @@
|
|||
<template id="org-unit-selector-tpl">
|
||||
<section id="org-unit-selector" class="box w-50" style="z-index: 9; position: absolute; margin: 0 auto; left: 50%; top: 50%; transform: translate(-50%, -50%);">
|
||||
<header><h1><?= $this->getHtml('Unit', 'Organization') ?></h1></header>
|
||||
|
||||
<div class="inner">
|
||||
<label for="iSearchOrgUnit">Search</label>
|
||||
<input type="text" id="iSearchOrgUnit" name="receiver-search" data-action='[
|
||||
{
|
||||
"key": 1, "listener": "keyup", "action": [
|
||||
{"key": 1, "type": "utils.timer", "id": "iSearchOrgUnit", "delay": 500, "resets": true},
|
||||
{"key": 2, "type": "dom.table.clear", "id": "acc-table"},
|
||||
{"key": 3, "type": "message.request", "uri": "{/base}/{/lang}/api/organization/find/unit?search={#iSearchOrgUnit}", "method": "GET", "request_type": "json"},
|
||||
{"key": 4, "type": "dom.table.append", "id": "acc-table", "aniIn": "fadeIn", "data": [], "bindings": {"id": "id", "name": "name/0"}, "position": -1}
|
||||
]
|
||||
}
|
||||
]' autocomplete="off">
|
||||
<table id="acc-table" class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-name="id">ID
|
||||
<th data-name="name">Name
|
||||
<th data-name="address">Address
|
||||
<th data-name="city">City
|
||||
<th data-name="zip">Zip
|
||||
<th data-name="country">Country
|
||||
<!-- todo: get data from tr in action and pass it to next actions, or make new request based on table cell? -->
|
||||
<tbody data-action='[
|
||||
{
|
||||
"key": 1, "listener": "click", "selector": "#acc-table tbody tr", "action": [
|
||||
{"key": 1, "type": "dom.getvalue", "base": "self", "selector": ""},
|
||||
{"key": 2, "type": "dom.setvalue", "overwrite": false, "selector": "#{$id}-idlist", "value": "{0/id}", "data": ""},
|
||||
{"key": 3, "type": "dom.setvalue", "overwrite": false, "selector": "#{$id}-taglist", "value": "<span id=\"{$id}-taglist-{0/id}\" class=\"tag red\" data-id=\"{0/id}\"><i class=\"fa fa-times\"></i> {0/name/0}, {0/name/1}<span>", "data": ""},
|
||||
{"key": 4, "type": "dom.setvalue", "overwrite": true, "selector": "#{$id}", "value": "", "data": ""}
|
||||
]
|
||||
}
|
||||
]'>
|
||||
<tfoot>
|
||||
</table>
|
||||
<button type="button" id="iSearchOrgUnit-close" data-action='[
|
||||
{
|
||||
"key": 1, "listener": "click", "action": [
|
||||
{"key": 1, "type": "dom.remove", "selector": "#org-unit-selector", "aniOut": "fadeOut"}
|
||||
]
|
||||
}
|
||||
]'><?= $this->getHtml('Close', 'Admin') ?></button>
|
||||
</div>
|
||||
</section>
|
||||
<template id="org-unit-selector-tpl">
|
||||
<section id="org-unit-selector" class="box w-50" style="z-index: 9; position: absolute; margin: 0 auto; left: 50%; top: 50%; transform: translate(-50%, -50%);">
|
||||
<header><h1><?= $this->getHtml('Unit', 'Organization') ?></h1></header>
|
||||
|
||||
<div class="inner">
|
||||
<label for="iSearchOrgUnit">Search</label>
|
||||
<input type="text" id="iSearchOrgUnit" name="receiver-search" data-action='[
|
||||
{
|
||||
"key": 1, "listener": "keyup", "action": [
|
||||
{"key": 1, "type": "utils.timer", "id": "iSearchOrgUnit", "delay": 500, "resets": true},
|
||||
{"key": 2, "type": "dom.table.clear", "id": "acc-table"},
|
||||
{"key": 3, "type": "message.request", "uri": "{/base}/{/lang}/api/organization/find/unit?search={#iSearchOrgUnit}", "method": "GET", "request_type": "json"},
|
||||
{"key": 4, "type": "dom.table.append", "id": "acc-table", "aniIn": "fadeIn", "data": [], "bindings": {"id": "id", "name": "name/0"}, "position": -1}
|
||||
]
|
||||
}
|
||||
]' autocomplete="off">
|
||||
<table id="acc-table" class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-name="id">ID
|
||||
<th data-name="name">Name
|
||||
<th data-name="address">Address
|
||||
<th data-name="city">City
|
||||
<th data-name="zip">Zip
|
||||
<th data-name="country">Country
|
||||
<!-- todo: get data from tr in action and pass it to next actions, or make new request based on table cell? -->
|
||||
<tbody data-action='[
|
||||
{
|
||||
"key": 1, "listener": "click", "selector": "#acc-table tbody tr", "action": [
|
||||
{"key": 1, "type": "dom.getvalue", "base": "self", "selector": ""},
|
||||
{"key": 2, "type": "dom.setvalue", "overwrite": false, "selector": "#{$id}-idlist", "value": "{0/id}", "data": ""},
|
||||
{"key": 3, "type": "dom.setvalue", "overwrite": false, "selector": "#{$id}-taglist", "value": "<span id=\"{$id}-taglist-{0/id}\" class=\"tag red\" data-id=\"{0/id}\"><i class=\"fa fa-times\"></i> {0/name/0}, {0/name/1}<span>", "data": ""},
|
||||
{"key": 4, "type": "dom.setvalue", "overwrite": true, "selector": "#{$id}", "value": "", "data": ""}
|
||||
]
|
||||
}
|
||||
]'>
|
||||
<tfoot>
|
||||
</table>
|
||||
<button type="button" id="iSearchOrgUnit-close" data-action='[
|
||||
{
|
||||
"key": 1, "listener": "click", "action": [
|
||||
{"key": 1, "type": "dom.remove", "selector": "#org-unit-selector", "aniOut": "fadeOut"}
|
||||
]
|
||||
}
|
||||
]'><?= $this->getHtml('Close', 'Admin') ?></button>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
|
@ -1,49 +1,49 @@
|
|||
<div class="ipt-wrap">
|
||||
<div class="ipt-first">
|
||||
<span class="input">
|
||||
<button type="button" id="<?= $this->printHtml($this->getId()); ?>-book-button" data-action='[
|
||||
{
|
||||
"key": 1, "listener": "click", "action": [
|
||||
{"key": 1, "type": "dom.popup", "selector": "#org-unit-selector-tpl", "aniIn": "fadeIn", "id": "<?= $this->printHtml($this->getId()); ?>"},
|
||||
{"key": 2, "type": "message.request", "uri": "<?= \phpOMS\Uri\UriFactory::build('{/prefix}organization/unit?filter=some&limit=10'); ?>", "method": "GET", "request_type": "json"},
|
||||
{"key": 3, "type": "dom.table.append", "id": "acc-table", "aniIn": "fadeIn", "data": [], "bindings": {"id": "id", "name": "name"}, "position": -1},
|
||||
{"key": 4, "type": "message.request", "uri": "<?= \phpOMS\Uri\UriFactory::build('{/prefix}organization/unit?filter=some&limit=10'); ?>", "method": "GET", "request_type": "json"},
|
||||
{"key": 5, "type": "dom.table.append", "id": "grp-table", "aniIn": "fadeIn", "data": [], "bindings": {"id": "id", "name": "name"}, "position": -1}
|
||||
]
|
||||
}
|
||||
]' formaction=""><i class="fa fa-book"></i></button>
|
||||
<input type="text" list="<?= $this->printHtml($this->getId()); ?>-datalist" id="<?= $this->printHtml($this->getId()); ?>" name="receiver" placeholder=" Guest" data-action='[
|
||||
{
|
||||
"key": 1, "listener": "keyup", "action": [
|
||||
{"key": 1, "type": "validate.keypress", "pressed": "!13!37!38!39!40"},
|
||||
{"key": 2, "type": "utils.timer", "id": "<?= $this->printHtml($this->getId()); ?>", "delay": 500, "resets": true},
|
||||
{"key": 3, "type": "dom.datalist.clear", "id": "<?= $this->printHtml($this->getId()); ?>-datalist"},
|
||||
{"key": 4, "type": "message.request", "uri": "{/base}/{/lang}/api/organization/find/unit?search={#<?= $this->printHtml($this->getId()); ?>}", "method": "GET", "request_type": "json"},
|
||||
{"key": 5, "type": "dom.datalist.append", "id": "<?= $this->printHtml($this->getId()); ?>-datalist", "value": "id", "text": "name"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": 2, "listener": "keydown", "action" : [
|
||||
{"key": 1, "type": "validate.keypress", "pressed": "13|9"},
|
||||
{"key": 2, "type": "message.request", "uri": "{/base}/{/lang}/api/organization/find/unit?search={#<?= $this->printHtml($this->getId()); ?>}", "method": "GET", "request_type": "json"},
|
||||
{"key": 3, "type": "dom.setvalue", "overwrite": true, "selector": "#<?= $this->printHtml($this->getId()); ?>-idlist", "value": "{0/id}", "data": ""},
|
||||
{"key": 4, "type": "dom.setvalue", "overwrite": true, "selector": "#<?= $this->printHtml($this->getId()); ?>-taglist", "value": "<span id=\"<?= $this->printHtml($this->getId()); ?>-taglist-{0/id}\" class=\"tag red\" data-id=\"{0/id}\"><i class=\"fa fa-times\"></i> {0/name}</span>", "data": ""},
|
||||
{"key": 5, "type": "dom.setvalue", "overwrite": true, "selector": "#<?= $this->printHtml($this->getId()); ?>", "value": "", "data": ""}
|
||||
]
|
||||
}
|
||||
]'>
|
||||
<datalist id="<?= $this->printHtml($this->getId()); ?>-datalist"></datalist>
|
||||
<input type="hidden" id="<?= $this->printHtml($this->getId()); ?>-idlist"<?= $this->isRequired() ? ' required' : ''; ?>>
|
||||
</span>
|
||||
</div>
|
||||
<div class="ipt-second"><button><?= $this->getHtml('Add', '0', '0'); ?></button></div>
|
||||
</div>
|
||||
<div class="box taglist" id="<?= $this->printHtml($this->getId()); ?>-taglist" data-action='[
|
||||
{
|
||||
"key": 1, "listener": "click", "selector": "#<?= $this->printHtml($this->getId()); ?>-taglist span fa", "action": [
|
||||
{"key": 1, "type": "dom.getvalue", "base": "self"},
|
||||
{"key": 2, "type": "dom.removevalue", "selector": "#<?= $this->printHtml($this->getId()); ?>-idlist", "data": ""},
|
||||
{"key": 3, "type": "dom.remove", "base": "self"}
|
||||
]
|
||||
}
|
||||
<div class="ipt-wrap">
|
||||
<div class="ipt-first">
|
||||
<span class="input">
|
||||
<button type="button" id="<?= $this->printHtml($this->getId()); ?>-book-button" data-action='[
|
||||
{
|
||||
"key": 1, "listener": "click", "action": [
|
||||
{"key": 1, "type": "dom.popup", "selector": "#org-unit-selector-tpl", "aniIn": "fadeIn", "id": "<?= $this->printHtml($this->getId()); ?>"},
|
||||
{"key": 2, "type": "message.request", "uri": "<?= \phpOMS\Uri\UriFactory::build('{/prefix}organization/unit?filter=some&limit=10'); ?>", "method": "GET", "request_type": "json"},
|
||||
{"key": 3, "type": "dom.table.append", "id": "acc-table", "aniIn": "fadeIn", "data": [], "bindings": {"id": "id", "name": "name"}, "position": -1},
|
||||
{"key": 4, "type": "message.request", "uri": "<?= \phpOMS\Uri\UriFactory::build('{/prefix}organization/unit?filter=some&limit=10'); ?>", "method": "GET", "request_type": "json"},
|
||||
{"key": 5, "type": "dom.table.append", "id": "grp-table", "aniIn": "fadeIn", "data": [], "bindings": {"id": "id", "name": "name"}, "position": -1}
|
||||
]
|
||||
}
|
||||
]' formaction=""><i class="fa fa-book"></i></button>
|
||||
<input type="text" list="<?= $this->printHtml($this->getId()); ?>-datalist" id="<?= $this->printHtml($this->getId()); ?>" name="receiver" placeholder=" Guest" data-action='[
|
||||
{
|
||||
"key": 1, "listener": "keyup", "action": [
|
||||
{"key": 1, "type": "validate.keypress", "pressed": "!13!37!38!39!40"},
|
||||
{"key": 2, "type": "utils.timer", "id": "<?= $this->printHtml($this->getId()); ?>", "delay": 500, "resets": true},
|
||||
{"key": 3, "type": "dom.datalist.clear", "id": "<?= $this->printHtml($this->getId()); ?>-datalist"},
|
||||
{"key": 4, "type": "message.request", "uri": "{/base}/{/lang}/api/organization/find/unit?search={#<?= $this->printHtml($this->getId()); ?>}", "method": "GET", "request_type": "json"},
|
||||
{"key": 5, "type": "dom.datalist.append", "id": "<?= $this->printHtml($this->getId()); ?>-datalist", "value": "id", "text": "name"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": 2, "listener": "keydown", "action" : [
|
||||
{"key": 1, "type": "validate.keypress", "pressed": "13|9"},
|
||||
{"key": 2, "type": "message.request", "uri": "{/base}/{/lang}/api/organization/find/unit?search={#<?= $this->printHtml($this->getId()); ?>}", "method": "GET", "request_type": "json"},
|
||||
{"key": 3, "type": "dom.setvalue", "overwrite": true, "selector": "#<?= $this->printHtml($this->getId()); ?>-idlist", "value": "{0/id}", "data": ""},
|
||||
{"key": 4, "type": "dom.setvalue", "overwrite": true, "selector": "#<?= $this->printHtml($this->getId()); ?>-taglist", "value": "<span id=\"<?= $this->printHtml($this->getId()); ?>-taglist-{0/id}\" class=\"tag red\" data-id=\"{0/id}\"><i class=\"fa fa-times\"></i> {0/name}</span>", "data": ""},
|
||||
{"key": 5, "type": "dom.setvalue", "overwrite": true, "selector": "#<?= $this->printHtml($this->getId()); ?>", "value": "", "data": ""}
|
||||
]
|
||||
}
|
||||
]'>
|
||||
<datalist id="<?= $this->printHtml($this->getId()); ?>-datalist"></datalist>
|
||||
<input type="hidden" id="<?= $this->printHtml($this->getId()); ?>-idlist"<?= $this->isRequired() ? ' required' : ''; ?>>
|
||||
</span>
|
||||
</div>
|
||||
<div class="ipt-second"><button><?= $this->getHtml('Add', '0', '0'); ?></button></div>
|
||||
</div>
|
||||
<div class="box taglist" id="<?= $this->printHtml($this->getId()); ?>-taglist" data-action='[
|
||||
{
|
||||
"key": 1, "listener": "click", "selector": "#<?= $this->printHtml($this->getId()); ?>-taglist span fa", "action": [
|
||||
{"key": 1, "type": "dom.getvalue", "base": "self"},
|
||||
{"key": 2, "type": "dom.removevalue", "selector": "#<?= $this->printHtml($this->getId()); ?>-idlist", "data": ""},
|
||||
{"key": 3, "type": "dom.remove", "base": "self"}
|
||||
]
|
||||
}
|
||||
]'></div>
|
||||
Loading…
Reference in New Issue
Block a user