make tables tabable

This commit is contained in:
Dennis Eichhorn 2020-05-31 18:03:29 +02:00
parent 8df7029a0d
commit dbd8e842ca
18 changed files with 192 additions and 129 deletions

View File

@ -34,7 +34,7 @@ final class DepartmentMapper extends DataMapperAbstract
*/
protected static array $columns = [
'organization_department_id' => ['name' => 'organization_department_id', 'type' => 'int', 'internal' => 'id'],
'organization_department_name' => ['name' => 'organization_department_name', 'type' => 'string', 'internal' => 'name'],
'organization_department_name' => ['name' => 'organization_department_name', 'type' => 'string', 'internal' => 'name', 'autocomplete' => true],
'organization_department_description' => ['name' => 'organization_department_description', 'type' => 'string', 'internal' => 'description'],
'organization_department_descriptionraw' => ['name' => 'organization_department_descriptionraw', 'type' => 'string', 'internal' => 'descriptionRaw'],
'organization_department_parent' => ['name' => 'organization_department_parent', 'type' => 'int', 'internal' => 'parent'],

View File

@ -34,7 +34,7 @@ final class PositionMapper extends DataMapperAbstract
*/
protected static array $columns = [
'organization_position_id' => ['name' => 'organization_position_id', 'type' => 'int', 'internal' => 'id'],
'organization_position_name' => ['name' => 'organization_position_name', 'type' => 'string', 'internal' => 'name'],
'organization_position_name' => ['name' => 'organization_position_name', 'type' => 'string', 'internal' => 'name', 'autocomplete' => true],
'organization_position_description' => ['name' => 'organization_position_description', 'type' => 'string', 'internal' => 'description'],
'organization_position_descriptionraw' => ['name' => 'organization_position_descriptionraw', 'type' => 'string', 'internal' => 'descriptionRaw'],
'organization_position_parent' => ['name' => 'organization_position_parent', 'type' => 'int', 'internal' => 'parent'],

View File

@ -34,7 +34,7 @@ final class UnitMapper extends DataMapperAbstract
*/
protected static array $columns = [
'organization_unit_id' => ['name' => 'organization_unit_id', 'type' => 'int', 'internal' => 'id'],
'organization_unit_name' => ['name' => 'organization_unit_name', 'type' => 'string', 'internal' => 'name'],
'organization_unit_name' => ['name' => 'organization_unit_name', 'type' => 'string', 'internal' => 'name', 'autocomplete' => true],
'organization_unit_description' => ['name' => 'organization_unit_description', 'type' => 'string', 'internal' => 'description'],
'organization_unit_descriptionraw' => ['name' => 'organization_unit_descriptionraw', 'type' => 'string', 'internal' => 'descriptionRaw'],
'organization_unit_parent' => ['name' => 'organization_unit_parent', 'type' => 'int', 'internal' => 'parent'],

View File

@ -38,6 +38,14 @@ class DepartmentTagSelectorView extends View
*/
private string $id = '';
/**
* Dom name
*
* @var string
* @since 1.0.0
*/
private string $name = '';
/**
* Is required
*
@ -70,6 +78,18 @@ class DepartmentTagSelectorView extends View
return $this->id;
}
/**
* Get name
*
* @return string
*
* @since 1.0.0
*/
public function getName() : string
{
return $this->name;
}
/**
* Is required?
*
@ -88,7 +108,8 @@ class DepartmentTagSelectorView extends View
public function render(...$data) : string
{
$this->id = $data[0];
$this->isRequired = $data[1] ?? false;
$this->name = $data[1];
$this->isRequired = $data[2] ?? false;
$this->getData('department-selector-popup')->setId($this->id);
return parent::render();

View File

@ -4,46 +4,46 @@
<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}
{"key": 1, "type": "dom.popup", "selector": "#acc-grp-tpl", "aniIn": "fadeIn", "id": "<?= $this->printHtml($this->getId()); ?>"},
{"key": 2, "type": "message.request", "uri": "<?= \phpOMS\Uri\UriFactory::build('{/prefix}admin/account?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}admin/account?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}
]
}
]'><i class="fa fa-book"></i></button>
<input type="text" list="<?= $this->printHtml($this->getId()); ?>-datalist" id="<?= $this->printHtml($this->getId()); ?>" name="receiver" placeholder="&#xf007; 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' : ''; ?>>
]' formaction=""><i class="fa fa-book"></i></button>
<div class="advancedInput wf-100" id="<?= $this->printHtml($this->getId()); ?>">
<input autocomplete="off" class="input" type="text" id="i<?= $this->printHtml($this->getId()); ?>" placeholder="&#xf007; Guest"
data-emptyAfter="true"
data-autocomplete="false"
data-src="api/organization/find/department?search={#i<?= $this->printHtml($this->getId()); ?>}">
<div id="<?= $this->printHtml($this->getId()); ?>-dropdown" class="dropdown" data-active="true">
<table class="default">
<thead>
<tr>
<td>ID<i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
<td>Name<i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
<tbody>
<template id="<?= $this->printHtml($this->getId()); ?>-rowElement" class="rowTemplate">
<tr tabindex="-1">
<td data-tpl-text="/id" data-tpl-value="/id" data-value=""></td>
<td data-tpl-text="/name" data-tpl-value="/name" data-value=""></td>
</tr>
</template>
</tbody>
</table>
</div>
</div>
</span>
</div>
<div class="ipt-second"><button><?= $this->getHtml('Add', '0', '0'); ?></button></div>
<div class="ipt-second"><button><?= $this->getHtml('Select', '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>
<div class="box" id="<?= $this->printHtml($this->getId()); ?>-tags" data-limit="0" data-active="true">
<template id="<?= $this->printHtml($this->getId()); ?>-tagTemplate">
<span class="tag red" data-tpl-value="/id" data-value="" data-uuid="" data-name="<?= $this->printHtml($this->getName()); ?>">
<i class="fa fa-times"></i>
<span data-tpl-text="/id" data-name="id" data-tpl-value="/id" data-value=""></span>
<span data-tpl-text="/name" data-tpl-value="/name" data-value=""></span>
</span>
</template>
</div>

View File

@ -38,6 +38,14 @@ class PositionTagSelectorView extends View
*/
private string $id = '';
/**
* Dom name
*
* @var string
* @since 1.0.0
*/
private string $name = '';
/**
* Is required
*
@ -70,6 +78,18 @@ class PositionTagSelectorView extends View
return $this->id;
}
/**
* Get name
*
* @return string
*
* @since 1.0.0
*/
public function getName() : string
{
return $this->name;
}
/**
* Is required?
*
@ -88,7 +108,8 @@ class PositionTagSelectorView extends View
public function render(...$data) : string
{
$this->id = $data[0];
$this->isRequired = $data[1] ?? false;
$this->name = $data[1];
$this->isRequired = $data[2] ?? false;
$this->getData('position-selector-popup')->setId($this->id);
return parent::render();

View File

@ -4,46 +4,46 @@
<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}
{"key": 1, "type": "dom.popup", "selector": "#acc-grp-tpl", "aniIn": "fadeIn", "id": "<?= $this->printHtml($this->getId()); ?>"},
{"key": 2, "type": "message.request", "uri": "<?= \phpOMS\Uri\UriFactory::build('{/prefix}admin/account?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}admin/account?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="&#xf007; 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' : ''; ?>>
<div class="advancedInput wf-100" id="<?= $this->printHtml($this->getId()); ?>">
<input autocomplete="off" class="input" type="text" id="i<?= $this->printHtml($this->getId()); ?>" placeholder="&#xf007; Guest"
data-emptyAfter="true"
data-autocomplete="false"
data-src="api/organization/find/position?search={#i<?= $this->printHtml($this->getId()); ?>}">
<div id="<?= $this->printHtml($this->getId()); ?>-dropdown" class="dropdown" data-active="true">
<table class="default">
<thead>
<tr>
<td>ID<i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
<td>Name<i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
<tbody>
<template id="<?= $this->printHtml($this->getId()); ?>-rowElement" class="rowTemplate">
<tr tabindex="-1">
<td data-tpl-text="/id" data-tpl-value="/id" data-value=""></td>
<td data-tpl-text="/name" data-tpl-value="/name" data-value=""></td>
</tr>
</template>
</tbody>
</table>
</div>
</div>
</span>
</div>
<div class="ipt-second"><button><?= $this->getHtml('Add', '0', '0'); ?></button></div>
<div class="ipt-second"><button><?= $this->getHtml('Select', '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>
<div class="box" id="<?= $this->printHtml($this->getId()); ?>-tags" data-limit="0" data-active="true">
<template id="<?= $this->printHtml($this->getId()); ?>-tagTemplate">
<span class="tag red" data-tpl-value="/id" data-value="" data-uuid="" data-name="<?= $this->printHtml($this->getName()); ?>">
<i class="fa fa-times"></i>
<span data-tpl-text="/id" data-name="id" data-tpl-value="/id" data-value=""></span>
<span data-tpl-text="/name" data-tpl-value="/name" data-value=""></span>
</span>
</template>
</div>

View File

@ -38,6 +38,14 @@ class UnitTagSelectorView extends View
*/
private string $id = '';
/**
* Dom name
*
* @var string
* @since 1.0.0
*/
private string $name = '';
/**
* Is required
*
@ -82,13 +90,26 @@ class UnitTagSelectorView extends View
return $this->isRequired;
}
/**
* Get name
*
* @return string
*
* @since 1.0.0
*/
public function getName() : string
{
return $this->name;
}
/**
* {@inheritdoc}
*/
public function render(...$data) : string
{
$this->id = $data[0];
$this->isRequired = $data[1] ?? false;
$this->name = $data[1];
$this->isRequired = $data[2] ?? false;
$this->getData('unit-selector-popup')->setId($this->id);
return parent::render();

View File

@ -4,46 +4,46 @@
<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": 1, "type": "dom.popup", "selector": "#acc-grp-tpl", "aniIn": "fadeIn", "id": "<?= $this->printHtml($this->getId()); ?>"},
{"key": 2, "type": "message.request", "uri": "<?= \phpOMS\Uri\UriFactory::build('{/prefix}admin/account?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": 4, "type": "message.request", "uri": "<?= \phpOMS\Uri\UriFactory::build('{/prefix}admin/account?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="&#xf007; 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' : ''; ?>>
<div class="advancedInput wf-100" id="<?= $this->printHtml($this->getId()); ?>">
<input autocomplete="off" class="input" type="text" id="i<?= $this->printHtml($this->getId()); ?>" placeholder="&#xf007; Guest"
data-emptyAfter="true"
data-autocomplete="false"
data-src="api/organization/find/unit?search={#i<?= $this->printHtml($this->getId()); ?>}">
<div id="<?= $this->printHtml($this->getId()); ?>-dropdown" class="dropdown" data-active="true">
<table class="default">
<thead>
<tr>
<td>ID<i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
<td>Name<i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
<tbody>
<template id="<?= $this->printHtml($this->getId()); ?>-rowElement" class="rowTemplate">
<tr tabindex="-1">
<td data-tpl-text="/id" data-tpl-value="/id" data-value=""></td>
<td data-tpl-text="/name" data-tpl-value="/name" data-value=""></td>
</tr>
</template>
</tbody>
</table>
</div>
</div>
</span>
</div>
<div class="ipt-second"><button><?= $this->getHtml('Add', '0', '0'); ?></button></div>
<div class="ipt-second"><button><?= $this->getHtml('Select', '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>
<div class="box" id="<?= $this->printHtml($this->getId()); ?>-tags" data-limit="0" data-active="true">
<template id="<?= $this->printHtml($this->getId()); ?>-tagTemplate">
<span class="tag red" data-tpl-value="/id" data-value="" data-uuid="" data-name="<?= $this->printHtml($this->getName()); ?>">
<i class="fa fa-times"></i>
<span data-tpl-text="/id" data-name="id" data-tpl-value="/id" data-value=""></span>
<span data-tpl-text="/name" data-tpl-value="/name" data-value=""></span>
</span>
</template>
</div>

View File

@ -29,9 +29,9 @@ echo $this->getData('nav')->render(); ?>
<tr><td><label for="iName"><?= $this->getHtml('Name') ?></label>
<tr><td><input type="text" name="name" id="iName" placeholder="&#xf040; R&D" required>
<tr><td><label for="iParent"><?= $this->getHtml('Parent') ?></label>
<tr><td><?= $this->getData('department-selector')->render('iParent', false); ?>
<tr><td><?= $this->getData('department-selector')->render('iParent', 'parent', false); ?>
<tr><td><label for="iUnit"><?= $this->getHtml('Unit') ?></label>
<tr><td><?= $this->getData('unit-selector')->render('iUnit', false); ?>
<tr><td><?= $this->getData('unit-selector')->render('iUnit', 'unit', false); ?>
<tr><td><label for="iDescription"><?= $this->getHtml('Description') ?></label>
<tr><td><?= $this->getData('editor')->render('department-editor'); ?>
<tr><td><?= $this->getData('editor')->getData('text')->render('department-editor', 'description', 'fDepartmentCreate'); ?>

View File

@ -39,7 +39,7 @@ echo $this->getData('nav')->render(); ?>
<tbody>
<?php $c = 0; foreach ($departments as $key => $value) : ++$c;
$url = \phpOMS\Uri\UriFactory::build('{/prefix}organization/department/profile?{?}&id=' . $value->getId()); ?>
<tr data-href="<?= $url; ?>">
<tr tabindex="0" data-href="<?= $url; ?>">
<td data-label="<?= $this->getHtml('ID', '0', '0') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getId()); ?></a>
<td data-label="<?= $this->getHtml('Name') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a>
<td data-label="<?= $this->getHtml('Parent') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getParent()->getName()); ?></a>

View File

@ -32,9 +32,9 @@ echo $this->getData('nav')->render(); ?>
<tr><td><label for="iName"><?= $this->getHtml('Name') ?></label>
<tr><td><input type="text" name="name" id="iName" value="<?= $this->printHtml($department->getName()); ?>">
<tr><td><label for="iParent"><?= $this->getHtml('Parent') ?></label>
<tr><td><?= $this->getData('department-selector')->render('iParent', false); ?>
<tr><td><?= $this->getData('department-selector')->render('iParent', 'parent', false); ?>
<tr><td><label for="iUnit"><?= $this->getHtml('Unit') ?></label>
<tr><td><?= $this->getData('unit-selector')->render('iUnit', false); ?>
<tr><td><?= $this->getData('unit-selector')->render('iUnit', 'unit', false); ?>
<tr><td><label for="iStatus"><?= $this->getHtml('Status') ?></label>
<tr><td><select name="status" id="iStatus">
<option><?= $this->getHtml('Active') ?>

View File

@ -29,9 +29,9 @@ echo $this->getData('nav')->render(); ?>
<tr><td><label for="iName"><?= $this->getHtml('Name') ?></label>
<tr><td><input type="text" name="name" id="iName" placeholder="&#xf040; Orange Management" required>
<tr><td><label for="iParent"><?= $this->getHtml('Parent') ?></label>
<tr><td><?= $this->getData('position-selector')->render('iParent', false); ?>
<tr><td><?= $this->getData('position-selector')->render('iParent', 'parent', false); ?>
<tr><td><label for="iDepartment"><?= $this->getHtml('Department') ?></label>
<tr><td><?= $this->getData('department-selector')->render('iDepartment', false); ?>
<tr><td><?= $this->getData('department-selector')->render('iDepartment', 'department', false); ?>
<tr><td><label for="iStatus"><?= $this->getHtml('Status') ?></label>
<tr><td><select name="status" id="iStatus">
<option value="<?= $this->printHtml(\Modules\Organization\Models\Status::ACTIVE); ?>"><?= $this->getHtml('Active') ?>

View File

@ -40,7 +40,7 @@ echo $this->getData('nav')->render(); ?>
<tbody>
<?php $count = 0; foreach ($positions as $key => $value) : ++$count;
$url = \phpOMS\Uri\UriFactory::build('{/prefix}organization/position/profile?{?}&id=' . $value->getId()); ?>
<tr data-href="<?= $url; ?>">
<tr tabindex="0" data-href="<?= $url; ?>">
<td data-label="<?= $this->getHtml('ID', '0', '0') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getId()); ?></a>
<td data-label="<?= $this->getHtml('Name') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a>
<td data-label="<?= $this->getHtml('Parent') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getParent()->getName()); ?></a>

View File

@ -32,9 +32,9 @@ echo $this->getData('nav')->render(); ?>
<tr><td><label for="iName"><?= $this->getHtml('Name') ?></label>
<tr><td><input type="text" name="name" id="iName" value="<?= $this->printHtml($position->getName()); ?>">
<tr><td><label for="iParent"><?= $this->getHtml('Parent') ?></label>
<tr><td><?= $this->getData('position-selector')->render('iParent', false); ?>
<tr><td><?= $this->getData('position-selector')->render('iParent', 'parent', false); ?>
<tr><td><label for="iDepartment"><?= $this->getHtml('Department') ?></label>
<tr><td><?= $this->getData('department-selector')->render('iDepartment', false); ?>
<tr><td><?= $this->getData('department-selector')->render('iDepartment', 'department', false); ?>
<tr><td><label for="iStatus"><?= $this->getHtml('Status') ?></label>
<tr><td><select name="status" id="iStatus">
<option><?= $this->getHtml('Active') ?>

View File

@ -32,7 +32,7 @@ echo $this->getData('nav')->render(); ?>
<tr><td><img id="preview-logo" class="preview" src="#" accept="image/*" alt="<?= $this->getHtml('UnitLogo') ?>">
<tr><td><?= $this->getData('media-preview-upload')->render('fUnitCreate', 'logo', '/Modules/Organization'); ?>
<tr><td><label for="iParent"><?= $this->getHtml('Parent') ?></label>
<tr><td><?= $this->getData('unit-selector')->render('iParent', false); ?>
<tr><td><?= $this->getData('unit-selector')->render('iParent', 'parent', false); ?>
<tr><td><label for="iStatus"><?= $this->getHtml('Status') ?></label>
<tr><td><select name="status" id="iStatus">
<option value="<?= $this->printHtml(\Modules\Organization\Models\Status::ACTIVE); ?>"><?= $this->getHtml('Active') ?>

View File

@ -38,7 +38,7 @@ echo $this->getData('nav')->render(); ?>
<tbody>
<?php foreach ($units as $key => $value) :
$url = \phpOMS\Uri\UriFactory::build('{/prefix}organization/unit/profile?{?}&id=' . $value->getId()); ?>
<tr data-href="<?= $url; ?>">
<tr tabindex="0" data-href="<?= $url; ?>">
<td data-label="<?= $this->getHtml('ID', '0', '0'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getId()); ?></a>
<td data-label="<?= $this->getHtml('Name') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a>
<td data-label="<?= $this->getHtml('Parent') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getParent()->getName()); ?></a>

View File

@ -32,7 +32,7 @@ echo $this->getData('nav')->render(); ?>
<tr><td><label for="iName"><?= $this->getHtml('Name') ?></label>
<tr><td><input type="text" name="name" id="iName" value="<?= $this->printHtml($unit->getName()); ?>">
<tr><td><label for="iParent"><?= $this->getHtml('Parent') ?></label>
<tr><td><?= $this->getData('unit-selector')->render('iParent', false); ?>
<tr><td><?= $this->getData('unit-selector')->render('iParent', 'parent', false); ?>
<tr><td><label for="iStatus"><?= $this->getHtml('Status') ?></label>
<tr><td><select name="status" id="iStatus">
<option value="<?= $this->printHtml(\Modules\Organization\Models\Status::ACTIVE); ?>"<?= \Modules\Organization\Models\Status::ACTIVE === $unit->getStatus() ? ' selected' : ''; ?>><?= $this->getHtml('Active') ?>