First small component implemented

This commit is contained in:
Dennis Eichhorn 2017-05-18 19:54:25 +02:00
parent 31bc6a464e
commit ec37d1c2b4
2 changed files with 6 additions and 41 deletions

View File

@ -171,6 +171,9 @@ class Controller extends ModuleAbstract implements WebInterface
$view->setTemplate('/Modules/Tasks/Theme/Backend/task-create'); $view->setTemplate('/Modules/Tasks/Theme/Backend/task-create');
$view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1001101001, $request, $response)); $view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1001101001, $request, $response));
$accGrpSelector = new \Modules\Profile\Theme\Backend\Components\AccountGroupSelector\BaseView($this->app, $request, $response);
$view->addData('accGrpSelector', $accGrpSelector);
return $view; return $view;
} }

View File

@ -28,47 +28,9 @@ echo $this->getData('nav')->render(); ?>
<table class="layout wf-100"> <table class="layout wf-100">
<tbody> <tbody>
<tr><td colspan="2"><label for="iReceiver"><?= $this->getText('To'); ?></label> <tr><td colspan="2"><label for="iReceiver"><?= $this->getText('To'); ?></label>
<tr><td><span class="input"><button type="button" data-action='[ <tr><td><?= $this->getData('accGrpSelector')->render('iReceiver'); ?><td><button><?= $this->getText('Add', 0, 0); ?></button>
{
"listener": "click", "action": [
{"type": "dom.popup", "tpl": "acc-grp-tpl", "aniIn": "fadeIn"},
{"type": "message.request", "uri": "<?= \phpOMS\Uri\UriFactory::build('{/base}/{/lang}/api/admin/account?filter=some&limit=10'); ?>", "method": "GET", "request_type": "json"},
{"type": "dom.table.append", "id": "acc-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="iReceiver-datalist" id="iReceiver" name="receiver" placeholder="&#xf007; Guest" data-action='[
{
"listener": "keyup", "action": [
{"type": "utils.timer", "id": "iReceiver", "delay": 500, "resets": true},
{"type": "dom.datalist.clear", "id": "iReceiver-datalist"},
{"type": "message.request", "uri": "{/base}/{/lang}/api/admin/find/account?search={#iReceiver}", "method": "GET", "request_type": "json"},
{"type": "dom.datalist.append", "id": "iReceiver-datalist", "value": "id", "text": "name"}
]
}
]' required>
<datalist id="iReceiver-datalist"></datalist>
<input type="hidden" id="iReceiver-list"></span><td><button><?= $this->getText('Add', 0, 0); ?></button>
<tr><td colspan="2"><label for="iObserver"><?= $this->getText('CC'); ?></label> <tr><td colspan="2"><label for="iObserver"><?= $this->getText('CC'); ?></label>
<tr><td><span class="input"><button type="button" data-action='[ <tr><td><?= $this->getData('accGrpSelector')->render('iCC'); ?><td><button><?= $this->getText('Add', 0, 0); ?></button>
{
"listener": "click", "action": [
{"type": "dom.popup", "tpl": "acc-grp-tpl", "aniIn": "fadeIn"},
{"type": "message.request", "uri": "<?= \phpOMS\Uri\UriFactory::build('{/base}/{/lang}/api/admin/account?filter=some&limit=10'); ?>", "method": "GET", "request_type": "json"},
{"type": "dom.table.append", "id": "acc-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="iCC-datalist" id="iCC" name="receiver" placeholder="&#xf007; Guest" data-action='[
{
"listener": "keyup", "action": [
{"type": "utils.timer", "id": "iCC", "delay": 500, "resets": true},
{"type": "dom.datalist.clear", "id": "iCC-datalist"},
{"type": "message.request", "uri": "{/base}/{/lang}/api/admin/find/account?search={#iCC}", "method": "GET", "request_type": "json"},
{"type": "dom.datalist.append", "id": "iCC-datalist", "value": "id", "text": "name"}
]
}
]' required>
<datalist id="iCC-datalist"></datalist>
<input type="hidden" id="iCC-list"></span><td><button><?= $this->getText('Add', 0, 0); ?></button>
<tr><td colspan="2"><label for="iPriority"><?= $this->getText('Priority'); ?></label> <tr><td colspan="2"><label for="iPriority"><?= $this->getText('Priority'); ?></label>
<tr><td><select id="iPriority" name="priority"> <tr><td><select id="iPriority" name="priority">
<option value="<?= \Modules\Tasks\Models\TaskPriority::VLOW; ?>"><?= $this->getText('P1'); ?> <option value="<?= \Modules\Tasks\Models\TaskPriority::VLOW; ?>"><?= $this->getText('P1'); ?>
@ -110,4 +72,4 @@ echo $this->getData('nav')->render(); ?>
</div> </div>
</div> </div>
<?php include __DIR__ . '/../../../Profile/Theme/Backend/acc-grp-popup.tpl.php'; ?> <?= $this->getData('accGrpSelector')->getData('popup')->render(); ?>