summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrzeka <piotr@rzeka.net>2014-03-05 09:31:14 +0100
committerrzeka <piotr@rzeka.net>2014-03-05 09:31:14 +0100
commit1d94ba9914751b6acd742e5538263b0f394e9189 (patch)
tree5aaf5bca61da94217ad29d2908cb1275c3ef912e
parent141616b48cdb2f05a8288be0519ac4094c292ba6 (diff)
#37 click on task to access it
-rw-r--r--assets/js/board.js8
-rw-r--r--locales/fr_FR/translations.php1
-rw-r--r--locales/pl_PL/translations.php13
-rw-r--r--templates/board_index.php6
4 files changed, 18 insertions, 10 deletions
diff --git a/assets/js/board.js b/assets/js/board.js
index d67521df..7742f3df 100644
--- a/assets/js/board.js
+++ b/assets/js/board.js
@@ -211,4 +211,10 @@
col.addEventListener('drop', handleColumnDrop, false);
});
-}()); \ No newline at end of file
+ [].forEach.call(document.querySelectorAll('[data-task-id]'), function (item) {
+ item.addEventListener('click', function() {
+ window.location.href = '?controller=task&action=show&task_id=' + item.getAttribute('data-task-id');
+ });
+ });
+
+}());
diff --git a/locales/fr_FR/translations.php b/locales/fr_FR/translations.php
index 2429e067..53dbd60e 100644
--- a/locales/fr_FR/translations.php
+++ b/locales/fr_FR/translations.php
@@ -211,4 +211,5 @@ return array(
'Comment added successfully.' => 'Commentaire ajouté avec succès.',
'Unable to create your comment.' => 'Impossible de sauvegarder votre commentaire.',
'The description is required' => 'La description est obligatoire',
+ //'Edit this task' => '',
);
diff --git a/locales/pl_PL/translations.php b/locales/pl_PL/translations.php
index b7adfc45..b088e30e 100644
--- a/locales/pl_PL/translations.php
+++ b/locales/pl_PL/translations.php
@@ -208,10 +208,11 @@ return array(
'%B %e, %G at %k:%M %p' => '%e %B %G o %k:%M',
'Comments' => 'Komentarze',
'Post comment' => 'Dodaj komentarz',
- //'Write your text in Markdown' => '',
- //'Leave a comment' => '',
- //'Comment is required' => '',
- //'Comment added successfully.' => '',
- //'Unable to create your comment.' => '',
- //'The description is required' => '',
+ 'Write your text in Markdown' => 'Możesz użyć Markdown',
+ 'Leave a comment' => 'Zostaw komentarz',
+ 'Comment is required' => 'Komentarz jest wymagany',
+ 'Comment added successfully.' => 'Komentarz dodany',
+ 'Unable to create your comment.' => 'Nie udało się dodać komentarza',
+ 'The description is required' => 'Opis jest wymagany',
+ 'Edit this task' => 'Edytuj zadanie'
);
diff --git a/templates/board_index.php b/templates/board_index.php
index aa581680..20862a4b 100644
--- a/templates/board_index.php
+++ b/templates/board_index.php
@@ -54,9 +54,9 @@
dropzone="copy">
<?php foreach ($column['tasks'] as $task): ?>
<div class="draggable-item" draggable="true">
- <div class="task task-<?= $task['color_id'] ?>" data-task-id="<?= $task['id'] ?>">
+ <div class="task task-<?= $task['color_id'] ?>" data-task-id="<?= $task['id'] ?>" title="<?= t('View this task') ?>">
- <a href="?controller=task&amp;action=show&amp;task_id=<?= $task['id'] ?>" title="<?= t('View this task') ?>">#<?= $task['id'] ?></a> -
+ <a href="?controller=task&amp;action=edit&amp;task_id=<?= $task['id'] ?>" title="<?= t('Edit this task') ?>">#<?= $task['id'] ?></a> -
<span class="task-user">
<?php if (! empty($task['owner_id'])): ?>
@@ -86,4 +86,4 @@
</section>
-<script type="text/javascript" src="assets/js/board.js"></script> \ No newline at end of file
+<script type="text/javascript" src="assets/js/board.js"></script>