From 5df5f339096220c9a952bea1dc458f4945656c9d Mon Sep 17 00:00:00 2001 From: epriestley Date: Thu, 10 Mar 2016 18:54:17 -0800 Subject: [PATCH] Add a task count to workboards Summary: See Q335. This might need some tweaking, but the JS works now so we can move/style the node now. Test Plan: {F1169168} - Also dragged stuff around, saw counts update properly. Reviewers: chad Reviewed By: chad Differential Revision: https://secure.phabricator.com/D15462 --- resources/celerity/map.php | 12 ++++++------ .../rsrc/js/application/projects/WorkboardColumn.js | 7 +++++++ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 52fb90f332..fdc6357f60 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -421,7 +421,7 @@ return array( 'rsrc/js/application/policy/behavior-policy-rule-editor.js' => '5e9f347c', 'rsrc/js/application/projects/WorkboardBoard.js' => '52291776', 'rsrc/js/application/projects/WorkboardCard.js' => 'c587b80f', - 'rsrc/js/application/projects/WorkboardColumn.js' => 'f05d6e5d', + 'rsrc/js/application/projects/WorkboardColumn.js' => 'bae58312', 'rsrc/js/application/projects/WorkboardController.js' => '55baf5ed', 'rsrc/js/application/projects/behavior-project-boards.js' => '14a1faae', 'rsrc/js/application/projects/behavior-project-create.js' => '065227cc', @@ -732,7 +732,7 @@ return array( 'javelin-websocket' => 'e292eaf4', 'javelin-workboard-board' => '52291776', 'javelin-workboard-card' => 'c587b80f', - 'javelin-workboard-column' => 'f05d6e5d', + 'javelin-workboard-column' => 'bae58312', 'javelin-workboard-controller' => '55baf5ed', 'javelin-workflow' => '5b2e3e2b', 'lightbox-attachment-css' => '7acac05d', @@ -1794,6 +1794,10 @@ return array( 'b6b0d1bb' => array( 'phui-inline-comment-view-css', ), + 'bae58312' => array( + 'javelin-install', + 'javelin-workboard-card', + ), 'bcaccd64' => array( 'javelin-behavior', 'javelin-behavior-device', @@ -2062,10 +2066,6 @@ return array( 'javelin-workflow', 'javelin-json', ), - 'f05d6e5d' => array( - 'javelin-install', - 'javelin-workboard-card', - ), 'f411b6ae' => array( 'javelin-behavior', 'javelin-stratcom', diff --git a/webroot/rsrc/js/application/projects/WorkboardColumn.js b/webroot/rsrc/js/application/projects/WorkboardColumn.js index 738cf151c2..ced39dcd73 100644 --- a/webroot/rsrc/js/application/projects/WorkboardColumn.js +++ b/webroot/rsrc/js/application/projects/WorkboardColumn.js @@ -221,6 +221,7 @@ JX.install('WorkboardColumn', { var board = this.getBoard(); var points = {}; + var count = 0; for (var phid in cards) { var card = cards[phid]; @@ -238,6 +239,8 @@ JX.install('WorkboardColumn', { } points[status] += card_points; } + + count++; } var total_points = 0; @@ -254,6 +257,10 @@ JX.install('WorkboardColumn', { display_value = total_points; } + if (board.getPointsEnabled()) { + display_value = count + ' | ' + display_value; + } + var over_limit = ((limit !== null) && (total_points > limit)); var content_node = this.getPointsContentNode();