From aed7fb5cf5b04b296689771e3337b19a4a281f55 Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Sat, 17 May 2014 20:25:25 -0400 Subject: Assignee change from the board is now a popover --- assets/css/app.css | 22 +++++++++++++++++++++- assets/js/board.js | 27 +++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 1 deletion(-) (limited to 'assets') diff --git a/assets/css/app.css b/assets/css/app.css index dbb302fd..67e4e6df 100644 --- a/assets/css/app.css +++ b/assets/css/app.css @@ -20,7 +20,7 @@ body { margin-left: 10px; margin-right: 10px; color: #333; - font-family: HelveticaNeue, "Helvetica Neue", Helvetica, Arial, sans-serif; + font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; font-smoothing: antialiased; text-rendering: optimizeLegibility; @@ -883,3 +883,23 @@ tr td.task-orange, max-width: 700px; font-size: 1.1em; } + +/* modal box */ +#popover-container { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(0, 0, 0, 0.8); +} + +#popover-content { + position: fixed; + width: 70%; + margin: 0 0 0 -35%; + left: 50%; + top: 5%; + padding: 15px; + background: #fff; +} diff --git a/assets/js/board.js b/assets/js/board.js index 105641ef..1d936a27 100644 --- a/assets/js/board.js +++ b/assets/js/board.js @@ -14,6 +14,19 @@ } }); + // Open assignee popover + $(".task-user a").click(function(e) { + + e.preventDefault(); + e.stopPropagation(); + + var taskId = $(this).parent().parent().attr("data-task-id"); + + $.get("?controller=board&action=assign&task_id=" + taskId, function(data) { + popover_show(data); + }); + }); + // Redirect to the task details page $("[data-task-id]").each(function() { $(this).click(function() { @@ -137,6 +150,20 @@ }); } + // Show popup + function popover_show(content) + { + $("body").append('
' + content + '
'); + + $("#popover-container").click(function() { + $(this).remove(); + }); + + $("#popover-content").click(function(e) { + e.stopPropagation(); + }); + } + // Initialization $(function() { board_load_events(); -- cgit v1.2.3