Adjusted list/table clicks

This commit is contained in:
Dennis Eichhorn 2017-05-01 13:55:48 +02:00
parent 4500f29af5
commit c1b570a850
4 changed files with 36 additions and 3 deletions

View File

@ -25,6 +25,7 @@ return ['Tasks' => [
'Default' => 'Default',
'Day' => 'Day',
'Due' => 'Due',
'Forward' => 'Forward',
'Forwarded' => 'Forwarded',
'From' => 'From',
'Group' => 'Group',
@ -64,4 +65,9 @@ return ['Tasks' => [
'S4' => 'Canceled',
'S5' => 'Done',
'S6' => 'Closed',
'P1' => 'Very Low',
'P2' => 'Low',
'P3' => 'Medium',
'P4' => 'High',
'P5' => 'Very High',
]];

View File

@ -37,7 +37,7 @@ $tasks = $this->getData('tasks');
elseif($task->getStatus() === \Modules\Tasks\Models\TaskStatus::WORKING) { $color = 'purple'; }
elseif($task->getStatus() === \Modules\Tasks\Models\TaskStatus::CANCELED) { $color = 'red'; }
elseif($task->getStatus() === \Modules\Tasks\Models\TaskStatus::SUSPENDED) { $color = 'yellow'; } ;?>
<tr>
<tr data-href="<?= $url; ?>">
<td><a href="<?= $url; ?>"><span class="tag <?= $color; ?>"><?= $this->getText('S' . $task->getStatus()); ?></span></a>
<td><a href="<?= $url; ?>"><?= $task->getDue()->format('Y-m-d H:i'); ?></a>
<td><a href="<?= $url; ?>"><?= $task->getTitle(); ?></a>

View File

@ -48,12 +48,39 @@ echo $this->getData('nav')->render(); ?>
]' required>
<datalist id="iReceiver-datalist"></datalist></span><td><button><?= $this->getText('Add', 0, 0); ?></button>
<tr><td colspan="2"><label for="iObserver"><?= $this->getText('CC'); ?></label>
<tr><td><span class="input"><button type="button" formaction=""><i class="fa fa-book"></i></button><input type="number" min="1" id="iObserver" name="observer" placeholder="&#xf007; Guest"></span><td><button><?= $this->getText('Add', 0, 0); ?></button>
<tr><td><span class="input"><button type="button" data-action='[
{
"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></span><td><button><?= $this->getText('Add', 0, 0); ?></button>
<tr><td colspan="2"><label for="iPriority"><?= $this->getText('Priority'); ?></label>
<tr><td><select id="iPriority" name="priority">
<option value="<?= \Modules\Tasks\Models\TaskPriority::VLOW; ?>"><?= $this->getText('P1'); ?>
<option value="<?= \Modules\Tasks\Models\TaskPriority::LOW; ?>"><?= $this->getText('P2'); ?>
<option value="<?= \Modules\Tasks\Models\TaskPriority::MEDIUM; ?>" selected><?= $this->getText('P3'); ?>
<option value="<?= \Modules\Tasks\Models\TaskPriority::HIGH; ?>"><?= $this->getText('P4'); ?>
<option value="<?= \Modules\Tasks\Models\TaskPriority::VHIGH; ?>"><?= $this->getText('P5'); ?>Done
</select><td>
<tr><td colspan="2"><label for="iDue"><?= $this->getText('Due'); ?></label>
<tr><td><input type="datetime-local" id="iDue" name="due" value="<?= (new \DateTime('NOW'))->format('Y-m-d\TH:i:s') ?>"><td>
<tr><td colspan="2"><label for="iTitle"><?= $this->getText('Title'); ?></label>
<tr><td><input type="text" id="iTitle" name="title" placeholder="&#xf040; <?= $this->getText('Title'); ?>" required><td>
<tr><td colspan="2"><label for="iMessage"><?= $this->getText('Message'); ?></label>
<tr><td><?php //include __DIR__ . '/../../../Editor/Theme/Backend/inline-editor-tools.tpl.php'; ?>
<tr><td><textarea id="iMessage" name="description" placeholder="&#xf040;" required></textarea><td>
<tr><td colspan="2"><input type="submit" value="<?= $this->getText('Create', 0, 0); ?>"><input type="hidden" name="type" value="<?= \Modules\Tasks\Models\TaskType::SINGLE; ?>">
</table>

View File

@ -41,7 +41,7 @@ echo $this->getData('nav')->render(); ?>
elseif($task->getStatus() === \Modules\Tasks\Models\TaskStatus::WORKING) { $color = 'purple'; }
elseif($task->getStatus() === \Modules\Tasks\Models\TaskStatus::CANCELED) { $color = 'red'; }
elseif($task->getStatus() === \Modules\Tasks\Models\TaskStatus::SUSPENDED) { $color = 'yellow'; } ;?>
<tr>
<tr data-href="<?= $url; ?>">
<td><a href="<?= $url; ?>"><span class="tag <?= $color; ?>"><?= $this->getText('S' . $task->getStatus()); ?></span></a>
<td><a href="<?= $url; ?>"><?= $task->getDue()->format('Y-m-d H:i'); ?></a>
<td><a href="<?= $url; ?>"><?= $task->getTitle(); ?></a>