From e16bde4650b541b7c45a7e7c787f9e14b75e5336 Mon Sep 17 00:00:00 2001 From: mambax7 Date: Mon, 6 Jul 2020 06:38:57 -0400 Subject: [PATCH] trello --- admin/trello.php | 8 ++++---- admin/trellostatus.php | 4 ++-- assets/js/trello.js | 5 ++--- docs/changelog.txt | 1 + templates/admin/publisher_trello.tpl | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/admin/trello.php b/admin/trello.php index 3bbf7fd9..96dd9962 100644 --- a/admin/trello.php +++ b/admin/trello.php @@ -20,12 +20,12 @@ ]; $projectName = 'StartTuts'; -$projectManagement = new TrelloManagement(); -$statusResult = $projectManagement->getAllStatus(); +$trelloManagement = new TrelloManagement(); +$statusResult = $trelloManagement->getAllStatus(); foreach ($statusResult as $statusRow) { -// $itemResult[] = $projectManagement->getProjectTaskByStatus($statusRow['id'], $projectName); -// $itemResult[] = $projectManagement->getProjectTaskByStatus($statusRow['itemid'], $statusRow['itemid']); +// $itemResult[] = $trelloManagement->getProjectTaskByStatus($statusRow['id'], $projectName); +// $itemResult[] = $trelloManagement->getProjectTaskByStatus($statusRow['itemid'], $statusRow['itemid']); } //$xoopsTpl->assign('taskResult', $itemResult); diff --git a/admin/trellostatus.php b/admin/trellostatus.php index 1b182a1e..147ec2a8 100644 --- a/admin/trellostatus.php +++ b/admin/trellostatus.php @@ -2,9 +2,9 @@ use XoopsModules\Publisher\TrelloManagement; -$projectManagement = new TrelloManagement(); +$trelloManagement = new TrelloManagement(); $statusId = $_GET['status']; $itemId = $_GET['itemid']; -$result = $projectManagement->editTaskStatus($statusId, $itemId); +$result = $trelloManagement->editTaskStatus($statusId, $itemId); diff --git a/assets/js/trello.js b/assets/js/trello.js index e41943df..85e22176 100644 --- a/assets/js/trello.js +++ b/assets/js/trello.js @@ -1,16 +1,15 @@ $( function() { - var url = 'edit-status.php'; + var url = 'trellostatus.php'; $('ul[itemid^="sort"]').sortable({ connectWith: ".sortable", receive: function (e, ui) { var status_id = $(ui.item).parent(".sortable").data("status-id"); var item_id = $(ui.item).data("item-id"); $.ajax({ - url: url+'?status_id='+status_id+'&item_id='+item_id, + url: url+'?status='+status_id+'&itemid='+item_id, success: function(response){ } }); } - }).disableSelection(); } ); diff --git a/docs/changelog.txt b/docs/changelog.txt index b8909865..616e955d 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -57,6 +57,7 @@ - timezone conversion (ihackcode) - Convert user time to Server time on saving items (ihackcode) - added Save/Load Permissions to test data - based on work by Goffy (mamba) +- added Trello board, based on https://phppot.com/php/trello-like-drag-and-drop-cards-for-project-management-software/ (mamba) TODO: diff --git a/templates/admin/publisher_trello.tpl b/templates/admin/publisher_trello.tpl index 2e786702..fb0de6c2 100644 --- a/templates/admin/publisher_trello.tpl +++ b/templates/admin/publisher_trello.tpl @@ -26,7 +26,7 @@ data-status-id="<{$item.status}>"> <{if $item.status == $k}>
  • + data-item-id="<{$item.itemid}>"> <{$item.itemid}> <{$item.title}>
  • <{/if}>