diff options
25 files changed, 151 insertions, 199 deletions
diff --git a/app/Helper/AppHelper.php b/app/Helper/AppHelper.php index 3a0a2428..63ebac98 100644 --- a/app/Helper/AppHelper.php +++ b/app/Helper/AppHelper.php @@ -12,6 +12,16 @@ use Kanboard\Core\Base; */ class AppHelper extends Base { + public function tooltipMarkdown($markdownText, $icon = 'fa-info-circle') + { + return '<span class="tooltip"><i class="fa '.$icon.'"></i><script type="text/template"><div class="markdown">'.$this->helper->text->markdown($markdownText).'</div></script></span>'; + } + + public function tooltipLink($label, $link) + { + return '<span class="tooltip" data-href="'.$link.'">'.$label.'</span>'; + } + public function getToken() { return $this->token; diff --git a/app/Helper/TextHelper.php b/app/Helper/TextHelper.php index 698bef6d..910130d6 100644 --- a/app/Helper/TextHelper.php +++ b/app/Helper/TextHelper.php @@ -52,18 +52,6 @@ class TextHelper extends Base } /** - * Escape Markdown text that need to be stored in HTML attribute - * - * @access public - * @param string $text - * @return mixed - */ - public function markdownAttribute($text) - { - return htmlentities($this->markdown($text), ENT_QUOTES, 'UTF-8'); - } - - /** * Format a file size * * @param integer $size Size in bytes diff --git a/app/Template/board/table_column.php b/app/Template/board/table_column.php index 1bba397d..765d05a9 100644 --- a/app/Template/board/table_column.php +++ b/app/Template/board/table_column.php @@ -68,11 +68,8 @@ <?php endif ?> <?php if (! $not_editable && ! empty($column['description'])): ?> - <span class="tooltip" title="<?= $this->text->markdownAttribute($column['description']) ?>"> - <i class="fa fa-info-circle"></i> - </span> + <?= $this->app->tooltipMarkdown($column['description']) ?> <?php endif ?> - </span> <?php if (! empty($column['column_nb_tasks'])): ?> diff --git a/app/Template/board/table_swimlane.php b/app/Template/board/table_swimlane.php index c5937e01..33c1cf26 100644 --- a/app/Template/board/table_swimlane.php +++ b/app/Template/board/table_swimlane.php @@ -11,12 +11,7 @@ <?= $this->text->e($swimlane['name']) ?> <?php if (! $not_editable && ! empty($swimlane['description'])): ?> - <span - title="<?= t('Description') ?>" - class="tooltip" - data-href="<?= $this->url->href('BoardTooltipController', 'swimlane', array('swimlane_id' => $swimlane['id'], 'project_id' => $project['id'])) ?>"> - <i class="fa fa-info-circle"></i> - </span> + <?= $this->app->tooltipLink('<i class="fa fa-info-circle"></i>', $this->url->href('BoardTooltipController', 'swimlane', array('swimlane_id' => $swimlane['id'], 'project_id' => $project['id']))) ?> <?php endif ?> <span title="<?= t('Task count') ?>" class="board-column-header-task-count swimlane-task-count-<?= $swimlane['id'] ?>"> diff --git a/app/Template/board/table_tasks.php b/app/Template/board/table_tasks.php index e7452807..82e90bc9 100644 --- a/app/Template/board/table_tasks.php +++ b/app/Template/board/table_tasks.php @@ -31,7 +31,7 @@ data-task-limit="<?= $column['task_limit'] ?>"> <div class="board-rotation-wrapper"> <div class="board-column-title board-rotation board-toggle-column-view" data-column-id="<?= $column['id'] ?>" title="<?= t('Show this column') ?>"> - <i class="fa fa-plus-square tooltip" title="<?= $this->text->e($column['title']) ?>"></i> <?= $this->text->e($column['title']) ?> + <i class="fa fa-plus-square" title="<?= $this->text->e($column['title']) ?>"></i> <?= $this->text->e($column['title']) ?> </div> </div> </div> diff --git a/app/Template/board/task_footer.php b/app/Template/board/task_footer.php index 9d375194..95ffd8fd 100644 --- a/app/Template/board/task_footer.php +++ b/app/Template/board/task_footer.php @@ -11,8 +11,11 @@ array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'js-modal-medium' . (! empty($task['category_description']) ? ' tooltip' : ''), - ! empty($task['category_description']) ? $this->text->markdownAttribute($task['category_description']) : t('Change category') + t('Change category') ) ?> + <?php if (! empty($task['category_description'])): ?> + <?= $this->app->tooltipMarkdown($task['category_description']) ?> + <?php endif ?> <?php endif ?> </span> </div> @@ -72,27 +75,27 @@ <div class="task-board-icons-row"> <?php if ($task['recurrence_status'] == \Kanboard\Model\TaskModel::RECURRING_STATUS_PENDING): ?> - <span title="<?= t('Recurrence') ?>" class="tooltip" data-href="<?= $this->url->href('BoardTooltipController', 'recurrence', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><i class="fa fa-refresh fa-rotate-90"></i></span> + <?= $this->app->tooltipLink('<i class="fa fa-refresh fa-rotate-90"></i>', $this->url->href('BoardTooltipController', 'recurrence', array('task_id' => $task['id'], 'project_id' => $task['project_id']))) ?> <?php endif ?> <?php if ($task['recurrence_status'] == \Kanboard\Model\TaskModel::RECURRING_STATUS_PROCESSED): ?> - <span title="<?= t('Recurrence') ?>" class="tooltip" data-href="<?= $this->url->href('BoardTooltipController', 'recurrence', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><i class="fa fa-refresh fa-rotate-90 fa-inverse"></i></span> + <?= $this->app->tooltipLink('<i class="fa fa-refresh fa-rotate-90 fa-inverse"></i>', $this->url->href('BoardTooltipController', 'recurrence', array('task_id' => $task['id'], 'project_id' => $task['project_id']))) ?> <?php endif ?> <?php if (! empty($task['nb_links'])): ?> - <span title="<?= t('Links') ?>" class="tooltip" data-href="<?= $this->url->href('BoardTooltipController', 'tasklinks', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><i class="fa fa-code-fork fa-fw"></i><?= $task['nb_links'] ?></span> + <?= $this->app->tooltipLink('<i class="fa fa-code-fork fa-fw"></i>'.$task['nb_links'], $this->url->href('BoardTooltipController', 'tasklinks', array('task_id' => $task['id'], 'project_id' => $task['project_id']))) ?> <?php endif ?> <?php if (! empty($task['nb_external_links'])): ?> - <span title="<?= t('External links') ?>" class="tooltip" data-href="<?= $this->url->href('BoardTooltipController', 'externallinks', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><i class="fa fa-external-link fa-fw"></i><?= $task['nb_external_links'] ?></span> + <?= $this->app->tooltipLink('<i class="fa fa-external-link fa-fw"></i>'.$task['nb_external_links'], $this->url->href('BoardTooltipController', 'externallinks', array('task_id' => $task['id'], 'project_id' => $task['project_id']))) ?> <?php endif ?> <?php if (! empty($task['nb_subtasks'])): ?> - <span title="<?= t('Sub-Tasks') ?>" class="tooltip" data-href="<?= $this->url->href('BoardTooltipController', 'subtasks', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><i class="fa fa-bars"></i> <?= round($task['nb_completed_subtasks']/$task['nb_subtasks']*100, 0).'%' ?></span> + <?= $this->app->tooltipLink('<i class="fa fa-bars fa-fw"></i>'.round($task['nb_completed_subtasks'] / $task['nb_subtasks'] * 100, 0).'%', $this->url->href('BoardTooltipController', 'subtasks', array('task_id' => $task['id'], 'project_id' => $task['project_id']))) ?> <?php endif ?> <?php if (! empty($task['nb_files'])): ?> - <span title="<?= t('Attachments') ?>" class="tooltip" data-href="<?= $this->url->href('BoardTooltipController', 'attachments', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><i class="fa fa-paperclip"></i> <?= $task['nb_files'] ?></span> + <?= $this->app->tooltipLink('<i class="fa fa-paperclip fa-fw"></i>'.$task['nb_files'], $this->url->href('BoardTooltipController', 'attachments', array('task_id' => $task['id'], 'project_id' => $task['project_id']))) ?> <?php endif ?> <?php if ($task['nb_comments'] > 0): ?> @@ -111,9 +114,7 @@ <?php endif ?> <?php if (! empty($task['description'])): ?> - <span title="<?= t('Description') ?>" class="tooltip" data-href="<?= $this->url->href('BoardTooltipController', 'description', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"> - <i class="fa fa-file-text-o"></i> - </span> + <?= $this->app->tooltipLink('<i class="fa fa-file-text-o"></i>', $this->url->href('BoardTooltipController', 'description', array('task_id' => $task['id'], 'project_id' => $task['project_id']))) ?> <?php endif ?> <?php if ($task['is_active'] == 1): ?> diff --git a/app/Template/category/index.php b/app/Template/category/index.php index f7657be2..1ef67fdb 100644 --- a/app/Template/category/index.php +++ b/app/Template/category/index.php @@ -31,9 +31,7 @@ <?= $this->text->e($category['name']) ?> <?php if (! empty($category['description'])): ?> - <span class="tooltip" title="<?= $this->text->markdownAttribute($category['description']) ?>"> - <i class="fa fa-info-circle"></i> - </span> + <?= $this->app->tooltipMarkdown($category['description']) ?> <?php endif ?> </td> </tr> diff --git a/app/Template/column/index.php b/app/Template/column/index.php index 7c29d4bf..92abfbcf 100644 --- a/app/Template/column/index.php +++ b/app/Template/column/index.php @@ -42,9 +42,7 @@ </div> <?= $this->text->e($column['title']) ?> <?php if (! empty($column['description'])): ?> - <span class="tooltip" title="<?= $this->text->markdownAttribute($column['description']) ?>"> - <i class="fa fa-info-circle"></i> - </span> + <?= $this->app->tooltipMarkdown($column['description']) ?> <?php endif ?> </td> <td> diff --git a/app/Template/header/title.php b/app/Template/header/title.php index 61c6ee9a..75fb1af7 100644 --- a/app/Template/header/title.php +++ b/app/Template/header/title.php @@ -10,8 +10,6 @@ <?php endif ?> </span> <?php if (! empty($description)): ?> - <small class="tooltip" title="<?= $this->text->markdownAttribute($description) ?>"> - <i class="fa fa-info-circle"></i> - </small> + <?= $this->app->tooltipMarkdown($description) ?> <?php endif ?> </h1> diff --git a/app/Template/project_list/project_icons.php b/app/Template/project_list/project_icons.php index 348db367..b359bcfe 100644 --- a/app/Template/project_list/project_icons.php +++ b/app/Template/project_list/project_icons.php @@ -10,13 +10,11 @@ <?php endif ?> <?php if ($this->user->hasAccess('ProjectUserOverviewController', 'managers')): ?> - <span class="tooltip" title="<?= t('Members') ?>" data-href="<?= $this->url->href('ProjectUserOverviewController', 'users', array('project_id' => $project['id'])) ?>"><i class="fa fa-users"></i></span> + <?= $this->app->tooltipLink('<i class="fa fa-users"></i>', $this->url->href('ProjectUserOverviewController', 'users', array('project_id' => $project['id']))) ?> <?php endif ?> <?php if (! empty($project['description'])): ?> - <span class="tooltip" title="<?= $this->text->markdownAttribute($project['description']) ?>"> - <i class="fa fa-info-circle"></i> - </span> + <?= $this->app->tooltipMarkdown($project['description']) ?> <?php endif ?> <?php if ($project['is_active'] == 0): ?> diff --git a/app/Template/project_overview/images.php b/app/Template/project_overview/images.php index 482ef551..bc356fc2 100644 --- a/app/Template/project_overview/images.php +++ b/app/Template/project_overview/images.php @@ -30,9 +30,7 @@ </div> </div> <div class="file-thumbnail-description"> - <span class="tooltip" title='<?= t('Uploaded: %s', $this->dt->datetime($file['date'])).'<br>'.t('Size: %s', $this->text->bytes($file['size'])) ?>'> - <i class="fa fa-info-circle"></i> - </span> + <?= $this->app->tooltipMarkdown(t('Uploaded: %s', $this->dt->datetime($file['date']))."\n\n".t('Size: %s', $this->text->bytes($file['size']))) ?> <?php if (! empty($file['user_id'])): ?> <?= t('Uploaded by %s', $file['user_name'] ?: $file['username']) ?> <?php else: ?> diff --git a/app/Template/project_predefined_content/show.php b/app/Template/project_predefined_content/show.php index b2785ada..5bfd0722 100644 --- a/app/Template/project_predefined_content/show.php +++ b/app/Template/project_predefined_content/show.php @@ -25,9 +25,7 @@ </ul> </div> <?= $this->text->e($template['title']) ?> - <span class="tooltip" title="<?= $this->text->markdownAttribute($template['description']) ?>"> - <i class="fa fa-info-circle"></i> - </span> + <?= $this->app->tooltipMarkdown($template['description']) ?> </td> </tr> <?php endforeach ?> diff --git a/app/Template/project_view/show.php b/app/Template/project_view/show.php index 8105d708..755b25c8 100644 --- a/app/Template/project_view/show.php +++ b/app/Template/project_view/show.php @@ -65,9 +65,7 @@ <td> <?= $this->text->e($column['title']) ?> <?php if (! empty($column['description'])): ?> - <span class="tooltip" title="<?= $this->text->markdownAttribute($column['description']) ?>"> - <i class="fa fa-info-circle"></i> - </span> + <?= $this->app->tooltipMarkdown($column['description']) ?> <?php endif ?> </td> <td> diff --git a/app/Template/swimlane/table.php b/app/Template/swimlane/table.php index 708b67f5..eb8f591f 100644 --- a/app/Template/swimlane/table.php +++ b/app/Template/swimlane/table.php @@ -40,9 +40,7 @@ <?= $this->text->e($swimlane['name']) ?> <?php if (! empty($swimlane['description'])): ?> - <span class="tooltip" title="<?= $this->text->markdownAttribute($swimlane['description']) ?>"> - <i class="fa fa-info-circle"></i> - </span> + <?= $this->app->tooltipMarkdown($swimlane['description']) ?> <?php endif ?> </td> <td> diff --git a/app/Template/task_file/images.php b/app/Template/task_file/images.php index 9d20dea0..c03e5648 100644 --- a/app/Template/task_file/images.php +++ b/app/Template/task_file/images.php @@ -30,9 +30,7 @@ </div> </div> <div class="file-thumbnail-description"> - <span class="tooltip" title='<?= t('Uploaded: %s', $this->dt->datetime($file['date'])).'<br>'.t('Size: %s', $this->text->bytes($file['size'])) ?>'> - <i class="fa fa-info-circle"></i> - </span> + <?= $this->app->tooltipMarkdown(t('Uploaded: %s', $this->dt->datetime($file['date']))."\n\n".t('Size: %s', $this->text->bytes($file['size']))) ?> <?php if (! empty($file['user_id'])): ?> <?= t('Uploaded by %s', $file['user_name'] ?: $file['username']) ?> <?php else: ?> diff --git a/app/Template/task_list/task_details.php b/app/Template/task_list/task_details.php index eeb5747d..b68be2dc 100644 --- a/app/Template/task_list/task_details.php +++ b/app/Template/task_list/task_details.php @@ -13,8 +13,11 @@ array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'js-modal-medium' . (! empty($task['category_description']) ? ' tooltip' : ''), - ! empty($task['category_description']) ? $this->text->markdownAttribute($task['category_description']) : t('Change category') + t('Change category') ) ?> + <?php if (! empty($task['category_description'])): ?> + <?= $this->app->tooltipMarkdown($task['category_description']) ?> + <?php endif ?> <?php else: ?> <?= $this->text->e($task['category_name']) ?> <?php endif ?> diff --git a/app/Template/task_list/task_icons.php b/app/Template/task_list/task_icons.php index d02c9021..ded13ade 100644 --- a/app/Template/task_list/task_icons.php +++ b/app/Template/task_list/task_icons.php @@ -44,27 +44,27 @@ <?php endif ?> <?php if ($task['recurrence_status'] == \Kanboard\Model\TaskModel::RECURRING_STATUS_PENDING): ?> - <span title="<?= t('Recurrence') ?>" class="tooltip" data-href="<?= $this->url->href('BoardTooltipController', 'recurrence', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><i class="fa fa-refresh fa-rotate-90"></i></span> + <?= $this->app->tooltipLink('<i class="fa fa-refresh fa-rotate-90"></i>', $this->url->href('BoardTooltipController', 'recurrence', array('task_id' => $task['id'], 'project_id' => $task['project_id']))) ?> <?php endif ?> <?php if ($task['recurrence_status'] == \Kanboard\Model\TaskModel::RECURRING_STATUS_PROCESSED): ?> - <span title="<?= t('Recurrence') ?>" class="tooltip" data-href="<?= $this->url->href('BoardTooltipController', 'recurrence', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><i class="fa fa-refresh fa-rotate-90 fa-inverse"></i></span> + <?= $this->app->tooltipLink('<i class="fa fa-refresh fa-rotate-90 fa-inverse"></i>', $this->url->href('BoardTooltipController', 'recurrence', array('task_id' => $task['id'], 'project_id' => $task['project_id']))) ?> <?php endif ?> <?php if (! empty($task['nb_links'])): ?> - <span title="<?= t('Links') ?>" class="tooltip" data-href="<?= $this->url->href('BoardTooltipController', 'tasklinks', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><i class="fa fa-code-fork fa-fw"></i><?= $task['nb_links'] ?></span> + <?= $this->app->tooltipLink('<i class="fa fa-code-fork fa-fw"></i>'.$task['nb_links'], $this->url->href('BoardTooltipController', 'tasklinks', array('task_id' => $task['id'], 'project_id' => $task['project_id']))) ?> <?php endif ?> <?php if (! empty($task['nb_external_links'])): ?> - <span title="<?= t('External links') ?>" class="tooltip" data-href="<?= $this->url->href('BoardTooltipController', 'externallinks', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><i class="fa fa-external-link fa-fw"></i><?= $task['nb_external_links'] ?></span> + <?= $this->app->tooltipLink('<i class="fa fa-external-link fa-fw"></i>'.$task['nb_external_links'], $this->url->href('BoardTooltipController', 'externallinks', array('task_id' => $task['id'], 'project_id' => $task['project_id']))) ?> <?php endif ?> <?php if (! empty($task['nb_subtasks'])): ?> - <span title="<?= t('Sub-Tasks') ?>" class="tooltip" data-href="<?= $this->url->href('BoardTooltipController', 'subtasks', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><i class="fa fa-bars"></i> <?= round($task['nb_completed_subtasks']/$task['nb_subtasks']*100, 0).'%' ?></span> + <?= $this->app->tooltipLink('<i class="fa fa-bars fa-fw"></i>'.round($task['nb_completed_subtasks'] / $task['nb_subtasks'] * 100, 0).'%', $this->url->href('BoardTooltipController', 'subtasks', array('task_id' => $task['id'], 'project_id' => $task['project_id']))) ?> <?php endif ?> <?php if (! empty($task['nb_files'])): ?> - <span title="<?= t('Attachments') ?>" class="tooltip" data-href="<?= $this->url->href('BoardTooltipController', 'attachments', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><i class="fa fa-paperclip"></i> <?= $task['nb_files'] ?></span> + <?= $this->app->tooltipLink('<i class="fa fa-paperclip fa-fw"></i>'.$task['nb_files'], $this->url->href('BoardTooltipController', 'attachments', array('task_id' => $task['id'], 'project_id' => $task['project_id']))) ?> <?php endif ?> <?php if ($task['nb_comments'] > 0): ?> @@ -83,9 +83,7 @@ <?php endif ?> <?php if (! empty($task['description'])): ?> - <span title="<?= t('Description') ?>" class="tooltip" data-href="<?= $this->url->href('BoardTooltipController', 'description', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"> - <i class="fa fa-file-text-o"></i> - </span> + <?= $this->app->tooltipLink('<i class="fa fa-file-text-o"></i>', $this->url->href('BoardTooltipController', 'description', array('task_id' => $task['id'], 'project_id' => $task['project_id']))) ?> <?php endif ?> <span title="<?= t('Position') ?>">(<?= $task['position'] ?>)</span> diff --git a/assets/css/app.min.css b/assets/css/app.min.css index 3cf7da7f..cdb5c190 100644 --- a/assets/css/app.min.css +++ b/assets/css/app.min.css @@ -1 +1 @@ -h1,li,ul,ol,table,tr,td,th,p,blockquote,body{margin:0;padding:0;font-size:100%}body{padding-bottom:10px;color:#333;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;text-rendering:optimizeLegibility}small{font-size:0.8em}hr{border:0;height:0;border-top:1px solid rgba(0,0,0,0.1);border-bottom:1px solid rgba(255,255,255,0.3)}.page{margin-left:10px;margin-right:10px}.margin-top{margin-top:20px}.margin-bottom{margin-bottom:20px}.pull-right{text-align:right}ul.no-bullet li{list-style-type:none;margin-left:0}#app-loading-icon{position:fixed;right:3px;bottom:3px}.assign-me{vertical-align:bottom}a{color:#36c;border:none}a:focus{outline:0;color:#DF5353;text-decoration:none}a:hover{color:#333;text-decoration:none}a .fa{padding-right:3px;text-decoration:none;color:#333}h1,h2,h3{font-weight:normal;color:#333}h1{font-size:1.5em}h2{font-size:1.4em;margin-bottom:10px}h3{margin-top:10px;font-size:1.2em}table{width:100%;border-collapse:collapse;border-spacing:0;margin-bottom:20px}table.table-fixed{table-layout:fixed;white-space:nowrap}table.table-fixed th{overflow:hidden}table.table-fixed td{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}table.table-small{font-size:0.8em}table.table-striped tr:nth-child(odd){background:#fefefe}@media (max-width: 768px){table.table-scrolling{overflow-x:auto;display:inline-block;vertical-align:top;max-width:100%;white-space:nowrap}}table th{text-align:left;padding:0.5em 3px;border:1px solid #eee;background:#fbfbfb}table th a{text-decoration:none;color:#333}table th a:focus,table th a:hover{text-decoration:underline}table td{border:1px solid #eee;padding:0.5em 3px;vertical-align:top}table td li{margin-left:20px}.column-1{width:1%}.column-2{width:2%}.column-3{width:3%}.column-4{width:4%}.column-5{width:5%}.column-6{width:6%}.column-7{width:7%}.column-8{width:8%}.column-9{width:9%}.column-10{width:10%}.column-11{width:11%}.column-12{width:12%}.column-13{width:13%}.column-14{width:14%}.column-15{width:15%}.column-16{width:16%}.column-17{width:17%}.column-18{width:18%}.column-19{width:19%}.column-20{width:20%}.column-21{width:21%}.column-22{width:22%}.column-23{width:23%}.column-24{width:24%}.column-25{width:25%}.column-26{width:26%}.column-27{width:27%}.column-28{width:28%}.column-29{width:29%}.column-30{width:30%}.column-31{width:31%}.column-32{width:32%}.column-33{width:33%}.column-34{width:34%}.column-35{width:35%}.column-36{width:36%}.column-37{width:37%}.column-38{width:38%}.column-39{width:39%}.column-40{width:40%}.column-41{width:41%}.column-42{width:42%}.column-43{width:43%}.column-44{width:44%}.column-45{width:45%}.column-46{width:46%}.column-47{width:47%}.column-48{width:48%}.column-49{width:49%}.column-50{width:50%}.column-51{width:51%}.column-52{width:52%}.column-53{width:53%}.column-54{width:54%}.column-55{width:55%}.column-56{width:56%}.column-57{width:57%}.column-58{width:58%}.column-59{width:59%}.column-60{width:60%}.column-61{width:61%}.column-62{width:62%}.column-63{width:63%}.column-64{width:64%}.column-65{width:65%}.column-66{width:66%}.column-67{width:67%}.column-68{width:68%}.column-69{width:69%}.column-70{width:70%}.column-71{width:71%}.column-72{width:72%}.column-73{width:73%}.column-74{width:74%}.column-75{width:75%}.column-76{width:76%}.column-77{width:77%}.column-78{width:78%}.column-79{width:79%}.column-80{width:80%}.column-81{width:81%}.column-82{width:82%}.column-83{width:83%}.column-84{width:84%}.column-85{width:85%}.column-86{width:86%}.column-87{width:87%}.column-88{width:88%}.column-89{width:89%}.column-90{width:90%}.column-91{width:91%}.column-92{width:92%}.column-93{width:93%}.column-94{width:94%}.column-95{width:95%}.column-96{width:96%}.column-97{width:97%}.column-98{width:98%}.column-99{width:99%}.column-100{width:100%}.draggable-row-handle{cursor:move;color:#dedede}.draggable-row-handle:hover{color:#333}tr.draggable-item-selected{background:#fff;border:2px solid #666;box-shadow:4px 2px 10px -4px rgba(0,0,0,0.55)}tr.draggable-item-selected td{border-top:none;border-bottom:none}tr.draggable-item-selected td:first-child{border-left:none}tr.draggable-item-selected td:last-child{border-right:none}.table-stripped tr.draggable-item-hover,.table-stripped tr.draggable-item-hover{background:#FEFFF2}.table-list{font-size:0.9em;margin-bottom:20px}.table-list-header{background:#fbfbfb;border:1px solid #e5e5e5;border-radius:5px 5px 0 0;line-height:35px;padding-left:3px;padding-right:3px}.table-list-header a{color:#333;font-weight:500;text-decoration:none;margin-right:10px}.table-list-header a:hover,.table-list-header a:focus{color:#767676}.table-list-header .table-list-header-count{color:#767676;display:inline-block;float:left}.table-list-header .table-list-header-menu{text-align:right}.table-list-row{padding-left:3px;padding-right:3px;border-bottom:1px solid #e5e5e5;border-right:1px solid #e5e5e5}.table-list-row.table-border-left{border-left:1px solid #e5e5e5}.table-list-row:nth-child(odd){background:#fefefe}.table-list-row:last-child{border-radius:0 0 5px 5px}.table-list-row:hover{background:#fff8dc;border-bottom:1px solid #ffeb8e;border-right:1px solid #ffeb8e}.table-list-row .table-list-title{font-weight:500;line-height:23px}.table-list-row .table-list-title.status-closed{text-decoration:line-through;margin-right:10px}.table-list-row .table-list-title.status-closed a{font-style:italic}.table-list-row .table-list-title a{color:#333;text-decoration:none}.table-list-row .table-list-title a:hover,.table-list-row .table-list-title a:focus{text-decoration:underline}.table-list-row .table-list-details{color:#999;font-weight:300;line-height:30px}.table-list-row .table-list-details span{margin-left:5px}.table-list-row .table-list-details span:first-child{margin-left:0}.table-list-row .table-list-details li{display:inline;list-style-type:none}.table-list-row .table-list-details li:after{content:', '}.table-list-row .table-list-details li:last-child:after{content:''}.table-list-row .table-list-details strong{font-weight:400;color:#555}.table-list-row .table-list-details-with-icons{float:left}@media (max-width: 768px){.table-list-row .table-list-details-with-icons{float:none}}.table-list-row .table-list-icons{font-size:0.8em;text-align:right;line-height:30px}@media (max-width: 768px){.table-list-row .table-list-icons{text-align:left;line-height:20px}}.table-list-row .table-list-icons span{margin-left:5px}.table-list-row .table-list-icons a{text-decoration:none}.table-list-row .table-list-icons a:hover{color:#333}.table-list-row .table-list-icons a:hover i{color:#333}.table-list-category{font-size:0.9em;font-weight:500;color:#000;padding:1px 2px 1px 2px;border-radius:3px;background:#fcfcfc;border:1px solid #ccc}.table-list-category a{text-decoration:none;color:#000}.table-list-category a:hover{color:#36c}fieldset{border:1px solid #ccc;margin-top:20px}legend{font-weight:500;font-size:1.2em}label{cursor:pointer;display:block;margin-top:10px;font-weight:400}input[type="number"],input[type="date"],input[type="email"],input[type="password"],input[type="text"]:not(.input-addon-field){color:#999;border:1px solid #ccc;width:300px;max-width:95%;font-size:1em;height:25px;padding-bottom:0;padding-left:4px;font-family:sans-serif;-webkit-appearance:none;-moz-appearance:none}input[type="number"]::-webkit-input-placeholder,input[type="date"]::-webkit-input-placeholder,input[type="email"]::-webkit-input-placeholder,input[type="password"]::-webkit-input-placeholder,input[type="text"]:not(.input-addon-field)::-webkit-input-placeholder{color:#dedede}input[type="number"]::-moz-placeholder,input[type="date"]::-moz-placeholder,input[type="email"]::-moz-placeholder,input[type="password"]::-moz-placeholder,input[type="text"]:not(.input-addon-field)::-moz-placeholder{color:#dedede}input[type="number"]:-ms-input-placeholder,input[type="date"]:-ms-input-placeholder,input[type="email"]:-ms-input-placeholder,input[type="password"]:-ms-input-placeholder,input[type="text"]:not(.input-addon-field):-ms-input-placeholder{color:#dedede}input[type="number"]:focus,input[type="date"]:focus,input[type="email"]:focus,input[type="password"]:focus,input[type="text"]:focus{color:#000;border-color:rgba(82,168,236,0.8);outline:0;box-shadow:0 0 8px rgba(82,168,236,0.6)}input[type="number"]{width:70px}input[type="text"]:not(.input-addon-field).form-numeric{width:70px}input[type="text"]:not(.input-addon-field).form-datetime,input[type="text"]:not(.input-addon-field).form-date{width:150px}input[type="text"]:not(.input-addon-field).form-input-large{width:400px}input[type="text"]:not(.input-addon-field).form-input-small{width:150px}textarea:focus{color:#000;border-color:rgba(82,168,236,0.8);outline:0;box-shadow:0 0 8px rgba(82,168,236,0.6)}textarea{padding:4px;border:1px solid #ccc;width:400px;max-width:99%;height:200px;font-family:sans-serif;font-size:1em}textarea::-webkit-input-placeholder{color:#dedede}textarea::-moz-placeholder{color:#dedede}textarea:-ms-input-placeholder{color:#dedede}select{font-size:1.0em;max-width:95%}select:focus{outline:0}select[multiple]{width:300px}.tag-autocomplete{width:400px}span.select2-container{margin-top:2px}.form-actions{padding-top:20px;clear:both}.form-required{color:red;padding-left:5px;font-weight:bold}@media (max-width: 480px){.form-required{display:none}}input.form-error,textarea.form-error{border:2px solid #b94a48}input.form-error:focus,textarea.form-error:focus{box-shadow:none;border:2px solid #b94a48}.form-errors{color:#b94a48;list-style-type:none}ul.form-errors li{margin-left:0}.form-help{font-size:0.8em;color:brown;margin-bottom:15px}.form-inline{padding:0;margin:0;border:none}.form-inline label{display:inline;padding-right:3px}.form-inline input,.form-inline select{margin:0 15px 0 0}.form-inline .form-required{display:none}.form-inline .form-actions{display:inline-block}.form-inline .js-submit-buttons-rendered{display:inline-block}.form-inline-group{display:inline}.form-columns{display:-webkit-flex;display:flex;-webkit-flex-direction:row;flex-direction:row;-webkit-flex-wrap:wrap;flex-wrap:wrap;-webkit-justify-content:flex-start;justify-content:flex-start}.form-columns .form-column{margin-right:25px;flex-grow:1}.form-columns fieldset{margin-top:0}.form-login{max-width:350px;margin:5% auto 0}@media (max-width: 480px){.form-login{margin-left:5px}}.form-login li{margin-left:25px;line-height:25px}.form-login h2{margin-bottom:30px;font-weight:bold}.reset-password{margin-top:20px;margin-bottom:20px}.reset-password a{color:#999}.input-addon{display:flex}.input-addon-field{flex:1;font-size:1em;color:#999;margin:0;-webkit-appearance:none;-moz-appearance:none}.input-addon-field:first-child{border-radius:5px 0 0 5px}.input-addon-field:last-child{border-radius:0 5px 5px 0}.input-addon-item{background-color:rgba(147,128,108,0.1);color:#666;font:inherit;font-weight:normal}.input-addon-item:first-child{border-radius:5px 0 0 5px}.input-addon-item:last-child{border-radius:0 5px 5px 0}@media (max-width: 480px){.input-addon-item .dropdown .fa-caret-down{display:none}}.input-addon-field,.input-addon-item{border:1px solid rgba(147,128,108,0.25);padding:4px 0.75em}.input-addon-field:not(:first-child),.input-addon-item:not(:first-child){border-left:0}.icon-success{color:#468847}.icon-error{color:#b94a48}.icon-fade-out{opacity:1;animation:icon-fadeout 5s linear forwards}@keyframes icon-fadeout{0%{opacity:1}100%{opacity:0}}.alert{padding:8px 35px 8px 14px;margin-top:5px;margin-bottom:5px;color:#c09853;background-color:#fcf8e3;border:1px solid #fbeed5;border-radius:4px}.alert-success{color:#468847;background-color:#dff0d8;border-color:#d6e9c6}.alert-error{color:#b94a48;background-color:#f2dede;border-color:#eed3d7}.alert-info{color:#3a87ad;background-color:#d9edf7;border-color:#bce8f1}.alert-normal{color:#333;background-color:#f0f0f0;border-color:#ddd}.alert ul{margin-top:10px;margin-bottom:10px}.alert li{margin-left:25px}.alert-fade-out{text-align:center;position:fixed;bottom:0;left:20%;width:60%;padding-top:5px;padding-bottom:5px;margin-bottom:0;border-width:1px 0 0;border-radius:4px 4px 0 0;z-index:9999;opacity:1;animation:fadeout 5s linear forwards}@keyframes fadeout{0%{opacity:1}100%{opacity:0}}a.btn{text-decoration:none}.btn{-webkit-appearance:none;-moz-appearance:none;font-size:1.2em;font-weight:normal;cursor:pointer;display:inline-block;border-radius:2px;padding:3px 10px;margin:0;border:1px solid #ddd;background:#f5f5f5;color:#333}.btn:hover,.btn:focus{border-color:#bbb;background:#fafafa;color:#000}.btn-red{border-color:#b0281a;background:#d14836;color:#fff}.btn-red:hover,.btn-red:focus{border-color:#b0281a;background:#c53727;color:#fff}.btn-blue{border-color:#3079ed;background:#4d90fe;color:#fff}.btn-blue:hover,.btn-blue:focus{border-color:#3079ed;background:#357ae8;color:#fff}.btn:disabled{color:#ccc;border-color:#ccc;background:#f7f7f7}.buttons-header{font-size:0.8em;margin-top:5px;margin-bottom:15px}.tooltip-arrow:after{background:#fff;border:1px solid #aaaaaa;box-shadow:0 0 5px #aaa}div.ui-tooltip{min-width:200px;max-width:600px}.tooltip-arrow{width:20px;height:10px;overflow:hidden;position:absolute}.tooltip-arrow.top{top:-10px}.tooltip-arrow.bottom{bottom:-10px}.tooltip-arrow.align-left{left:10px}.tooltip-arrow.align-right{right:10px}.tooltip-arrow:after{content:"";position:absolute;width:14px;height:14px;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.tooltip-arrow.bottom:after{top:-10px}.tooltip-arrow.top:after{bottom:-10px}.tooltip-arrow.align-left:after{left:0}.tooltip-arrow.align-right:after{right:0}.tooltip-large{width:600px}.ui-tooltip-content .markdown p{margin-bottom:0}.tooltip .fa-info-circle{color:#999}h2 .dropdown ul{display:none}.dropdown{display:inline;position:relative}.dropdown ul{display:none}.dropdown-smaller{font-size:0.85em}ul.dropdown-submenu-open{display:block;position:absolute;z-index:1000;min-width:285px;list-style:none;margin:3px 0 0 1px;padding:6px 0;background-color:#fff;border:1px solid #b2b2b2;border-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,0.15)}.dropdown-submenu-open li{display:block;margin:0;padding:8px 10px;font-size:0.9em;border-bottom:1px solid #f8f8f8;cursor:pointer}.dropdown-submenu-open li.no-hover{cursor:default}.dropdown-submenu-open li:last-child{border:none}.dropdown-submenu-open li:not(.no-hover):hover{background:#4078C0;color:#fff}.dropdown-submenu-open li:hover a{color:#fff}.dropdown-submenu-open a{text-decoration:none;color:#333}.dropdown-submenu-open a:focus{text-decoration:underline}.dropdown-menu-link-text,.dropdown-menu-link-icon{color:#333;text-decoration:none}.dropdown-menu-link-text:hover{text-decoration:underline}td a.dropdown-menu strong{color:#333}td a.dropdown-menu strong i{color:#333}td a.dropdown-menu i{color:#dedede}td a.dropdown-menu:hover strong{color:#555}td a.dropdown-menu:hover strong i{color:#555}td a.dropdown-menu:hover i{color:#333}.accordion-title{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAADCAYAAABS3WWCAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NEQ5RDgxQzc2RjQ5MTFFMjhEMUNENzFGRUMwRjhBRTciIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NEQ5RDgxQzg2RjQ5MTFFMjhEMUNENzFGRUMwRjhBRTciPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0RDlEODFDNTZGNDkxMUUyOEQxQ0Q3MUZFQzBGOEFFNyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0RDlEODFDNjZGNDkxMUUyOEQxQ0Q3MUZFQzBGOEFFNyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PvXFWFAAAAAYSURBVHjaYvj//z8D0/Pnz/8zgFgAAQYAS5UJscReGMIAAAAASUVORK5CYII=) repeat-x scroll 0 10px}.accordion-title h3{display:inline;padding-right:5px;background:#fff}.accordion-content{margin-top:15px;margin-bottom:25px}.accordion-toggle{color:#333;text-decoration:none}.accordion-toggle:focus{color:#333}.accordion-toggle:hover{color:#999}.accordion-toggle:before{content:"\f0d7"}.accordion-collapsed{margin-bottom:25px}.accordion-collapsed .accordion-toggle:before{content:"\f0da"}.accordion-collapsed .accordion-content{display:none}#select-dropdown-menu{position:absolute;display:block;z-index:1000;min-width:160px;padding:5px 0;background:#fff;list-style:none;border:1px solid #ccc;border-radius:3px;box-shadow:0 6px 12px rgba(0,0,0,0.175);overflow:scroll}.select-dropdown-menu-item{white-space:nowrap;overflow:hidden;padding:3px 10px;color:#555;cursor:pointer;border-bottom:1px solid #f8f8f8;line-height:1.5em;font-weight:400}.select-dropdown-menu-item.active{color:#fff;background:#428bca}.select-dropdown-menu-item:last-child{border:none}.select-dropdown-input-container{position:relative;border:1px solid #ccc;border-radius:5px;background-color:#fff}.select-dropdown-input-container input.select-dropdown-input{margin:0 0 0 5px;border:none;height:23px}.select-dropdown-input-container input.select-dropdown-input:focus{border:none;box-shadow:none}.select-dropdown-input-container .select-dropdown-chevron{color:#555;position:absolute;top:4px;right:5px;cursor:pointer}.select-dropdown-input-container .select-loading-icon{color:#555;position:absolute;top:4px;right:5px}#suggest-menu{position:absolute;display:block;z-index:1000;min-width:160px;padding:5px 0;background:#fff;list-style:none;border:1px solid #ccc;border-radius:3px;box-shadow:0 6px 12px rgba(0,0,0,0.175)}.suggest-menu-item{white-space:nowrap;padding:3px 10px;color:#333;font-weight:bold;cursor:pointer}.suggest-menu-item.active{color:#fff;background:#428bca}.suggest-menu-item.active small{color:#fff}.suggest-menu-item small{color:#999;font-weight:normal}#modal-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.9);overflow:auto;z-index:100}#modal-box{position:fixed;max-height:calc(100% - 30px);top:2%;left:50%;transform:translateX(-50%);background:#fff;overflow:auto;border-radius:5px}#modal-content{padding:0 5px 5px}#modal-header{text-align:right;padding-right:5px}#modal-close-button{color:#333}#modal-close-button:hover{color:#b94a48}.pagination{text-align:center}.pagination-showing{margin-right:5px;padding-right:5px;border-right:1px solid #999}.pagination-next{margin-left:5px}.pagination-previous{margin-right:5px}header{display:flex;flex-wrap:wrap;padding:5px 10px;margin-bottom:5px;border-bottom:1px solid #dedede;background-color:#fbfbfb}header .title-container{flex:1;min-width:300px}@media (max-width: 480px){header .title-container{order:3}}header .board-selector-container{min-width:320px;display:flex;align-items:center}@media (max-width: 480px){header .board-selector-container{order:2;min-width:300px}header .board-selector-container input[type=text]{max-width:280px}}header .menus-container{min-width:120px;display:flex;align-items:center;justify-content:flex-end}@media (max-width: 480px){header .menus-container{order:1;margin-bottom:5px;margin-left:auto}}header h1{font-size:1.5em}header h1 .tooltip{opacity:0.3;font-size:0.7em}a i.web-notification-icon{color:#36c}a i.web-notification-icon:focus,a i.web-notification-icon:hover{color:#000}.logo a{opacity:0.5;color:#d40000;text-decoration:none}.logo span{color:#333}.logo a:hover{opacity:0.8;color:#333}.logo a:focus span,.logo a:hover span{color:#d40000}.page-header{margin-bottom:20px}.page-header .dropdown{padding-right:10px}.page-header h2{margin:0;padding:0;font-weight:bold;border-bottom:1px dotted #ccc}.page-header h2 a{color:#333;text-decoration:none}.page-header h2 a:focus,.page-header h2 a:hover{color:#999}.page-header ul{text-align:left;margin-top:5px;display:inline-block}.page-header li{display:inline;padding-right:15px}@media (max-width: 480px){.page-header li{display:block;line-height:1.5em}}.page-header li.active a{color:#333;text-decoration:none;font-weight:bold}.page-header li.active a:hover,.page-header li.active a:focus{text-decoration:underline}.menu-inline{margin-bottom:5px}.menu-inline li{display:inline;padding-right:15px}.menu-inline li .active a{font-weight:bold;color:#000;text-decoration:none}.sidebar-container{height:100%;display:flex;flex-flow:row}@media (max-width: 768px){.sidebar-container{flex-flow:wrap}}.sidebar-content{padding-left:10px;flex:1 100%;max-width:85%;overflow-wrap:break-word}@media (max-width: 768px){.sidebar-content{padding-left:0;order:1;max-width:100%}}@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: landscape) and (-webkit-min-device-pixel-ratio: 1){.sidebar-content{max-width:75%}}.sidebar{max-width:25%;min-width:230px}@media (max-width: 768px){.sidebar{flex:1 auto;order:2}}.sidebar h2{margin-top:0}.sidebar>ul a{text-decoration:none;color:#999;font-weight:300}.sidebar>ul a:hover{color:#333}.sidebar>ul li{list-style-type:none;line-height:35px;border-bottom:1px dotted #efefef;padding-left:13px}.sidebar>ul li:hover{border-left:5px solid #555;padding-left:8px}.sidebar>ul li.active{border-left:5px solid #333;padding-left:8px}.sidebar>ul li.active a{color:#333;font-weight:bold}.sidebar-icons>ul li{padding-left:0}.sidebar-icons>ul li:hover,.sidebar-icons>ul li.active{padding-left:0;border-left:none}.sidebar>ul li.active a:focus,.sidebar>ul li.active a:hover{color:#555}.sidebar>ul li:last-child{margin-bottom:15px}.avatar img{vertical-align:bottom}.avatar-left{float:left;margin-right:10px}.avatar-inline{display:inline-block;margin-right:3px}.avatar-48 img,.avatar-48 div{border-radius:30px}.avatar-48 .avatar-letter{line-height:48px;width:48px;font-size:25px}.avatar-20 img,.avatar-20 div{border-radius:10px}.avatar-20 .avatar-letter{line-height:20px;width:20px;font-size:11px}.avatar-letter{color:#fff;text-align:center}#file-dropzone,#screenshot-zone{position:relative;border:2px dashed #ccc;width:99%;height:250px;overflow:auto}#file-dropzone-inner,#screenshot-inner{position:absolute;left:0;bottom:48%;width:100%;text-align:center;color:#aaa}#screenshot-zone.screenshot-pasted{border:2px solid #333}#file-list{margin:20px}#file-list li{list-style-type:none;padding-top:8px;padding-bottom:8px;border-bottom:1px dotted #ddd;width:95%}#file-list li .file-error{font-weight:bold;color:#b94a48}.file-thumbnails{display:-webkit-flex;display:flex;-webkit-flex-direction:row;flex-direction:row;-webkit-flex-wrap:wrap;flex-wrap:wrap;-webkit-justify-content:flex-start;justify-content:flex-start}.file-thumbnail{width:250px;border:1px solid #efefef;border-radius:5px;margin-bottom:20px;box-shadow:4px 2px 10px -6px rgba(0,0,0,0.55);margin-right:15px}.file-thumbnail img{cursor:pointer;border-top-left-radius:5px;border-top-right-radius:5px}.file-thumbnail img:hover{opacity:0.5}.file-thumbnail-content{padding-left:8px;padding-right:8px}.file-thumbnail-title{font-weight:700;font-size:0.9em;color:#555;overflow:hidden;text-overflow:ellipsis}.file-thumbnail-description{font-size:0.8em;color:#999;margin-top:8px;margin-bottom:5px}.file-viewer{position:relative}.file-viewer img{max-width:95%;max-height:85%;margin-top:10px}.color-picker{width:180px}.color-picker-option{height:25px}.color-picker-square{display:inline-block;width:18px;height:18px;margin-right:5px;border:1px solid #000}.color-picker-label{display:inline-block;vertical-align:bottom;padding-bottom:3px}.filter-box{max-width:1024px}.action-menu{color:#333;text-decoration:none}.action-menu:hover,.action-menu:focus{text-decoration:underline}.js-project-creation-options{max-width:500px;border-left:3px dotted #efefef;margin-top:20px;padding-left:15px;padding-bottom:5px;padding-top:5px}.project-overview-columns{display:-webkit-flex;display:flex;-webkit-flex-direction:row;flex-direction:row;-webkit-flex-wrap:wrap;flex-wrap:wrap;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;margin-bottom:20px;font-size:1.4em}@media (max-width: 480px){.project-overview-columns{display:block}}.project-overview-column{text-align:center;margin-right:3%;margin-top:5px;padding:3px 15px 3px 15px;border:1px dashed #ddd}@media (max-width: 480px){.project-overview-column{text-align:left}}.project-overview-column small{color:#999}.project-overview-column strong{color:#555;display:block}@media (max-width: 480px){.project-overview-column strong{display:inline}}.project-header{margin-bottom:8px}.project-header .dropdown-component{margin-top:4px;margin-right:5px;float:left}@media (max-width: 768px){.project-header .dropdown-component{float:none}}.project-header .views-switcher-component{margin-top:4px;float:left}@media (max-width: 768px){.project-header .views-switcher-component{float:none;margin-bottom:10px}}.project-header .filter-box-component form{margin:0}.views{margin-right:10px;margin-top:1px;font-size:0.9em}@media (max-width: 560px){.views{width:100%}}@media (max-width: 768px){.views{margin-top:10px;font-size:1em}}@media (max-width: 480px){.views{margin-top:5px}}.views li{white-space:nowrap;background:#fafafa;border:1px solid #ddd;border-right:none;padding:4px 8px;display:inline}@media (max-width: 560px){.views li{display:block;margin-top:5px;border-radius:5px;border:1px solid #ddd}}.views li.active a{font-weight:bold;color:#000;text-decoration:none}.views li:first-child{border-top-left-radius:5px;border-bottom-left-radius:5px}.views li:last-child{border-right:1px solid #ddd;border-top-right-radius:5px;border-bottom-right-radius:5px}.views a{color:#555;text-decoration:none}.views a:hover{color:#333;text-decoration:underline}.dashboard-project-stats small{margin-right:10px;color:#999}.dashboard-table-link{font-weight:bold;color:#000;text-decoration:none}.dashboard-table-link:focus,.dashboard-table-link:hover{color:#999}.public-board{margin-top:5px}.public-task{max-width:800px;margin:5px auto 0}#board-container{overflow-x:auto}#board{table-layout:fixed;margin-bottom:0}#board th.board-column-header{width:240px}#board td{vertical-align:top}.board-container-compact{overflow-x:initial}@media all and (-ms-high-contrast: active), (-ms-high-contrast: none){.board-container-compact #board{table-layout:auto}}#board th.board-column-header.board-column-compact{width:initial}.board-column-collapsed{display:none}td.board-column-task-collapsed{font-weight:bold;background-color:#fbfbfb}#board th.board-column-header-collapsed{width:28px;min-width:28px;text-align:center;overflow:hidden}.board-rotation-wrapper{position:relative;padding:8px 4px;min-height:150px;overflow:hidden}.board-rotation{white-space:nowrap;-webkit-backface-visibility:hidden;-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg);-webkit-transform-origin:0 100%;-moz-transform-origin:0 100%;-ms-transform-origin:0 100%;transform-origin:0 100%}.board-column-title .dropdown-menu{text-decoration:none}.board-add-icon{float:left;padding:0 5px}.board-add-icon i{text-decoration:none;color:#36c;font-size:1.4em}.board-add-icon i:focus,.board-add-icon i:hover{text-decoration:none;color:red}.board-column-header-task-count{color:#999;font-weight:normal}a.board-swimlane-toggle{text-decoration:none}a.board-swimlane-toggle:hover,a.board-swimlane-toggle:focus{color:#000;text-decoration:none;border:none}.board-task-list{min-height:60px}.board-task-list .task-board:last-child{margin-bottom:0}.board-task-list-limit{background-color:#DF5353}.draggable-item{cursor:pointer;user-select:none;-webkit-user-select:none;-moz-user-select:none}.draggable-placeholder{border:2px dashed #000;background:#fafafa;height:70px;margin-bottom:10px}div.draggable-item-selected{border:1px solid #000}.task-board-sort-handle{float:left;padding-right:5px}.task-board{position:relative;margin-bottom:4px;border:1px solid #000;padding:2px;word-wrap:break-word;font-size:0.9em;border-radius:6px}div.task-board-recent{border-width:2px}div.task-board-status-closed{user-select:none;border:1px dotted #555}.task-board a{color:#000;text-decoration:none}.task-board-collapsed{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.task-board-title{margin-top:5px;margin-bottom:8px}.task-board-title a:hover{text-decoration:underline}.task-board-saving-state{opacity:0.3}.task-board-saving-icon{position:absolute;margin:auto;width:100%;text-align:center;color:#000}.task-board-avatars{text-align:right;float:right}.task-board-change-assignee{cursor:pointer}.task-board-change-assignee:hover{opacity:0.6}.task-list-avatars{display:inline-block;float:left}@media (max-width: 768px){.task-list-avatars{float:none;display:block}}.task-list-avatars .task-avatar-assignee{font-weight:300;color:#999}.task-list-avatars:hover .task-avatar-assignee{font-weight:400;color:#000}.task-board-icons,.task-list-icons{font-size:0.8em;text-align:right}.task-board-icons a,.task-list-icons a{text-decoration:none}.task-board-icons a:hover,.task-list-icons a:hover{color:#333}.task-board-icons a:hover i,.task-list-icons a:hover i{color:#333}.task-board-icons .task-score,.task-list-icons .task-score{font-weight:bold}.task-board-icons .flag-milestone,.task-list-icons .flag-milestone{color:green}.task-board-icons{margin-top:7px}.task-board-icons a{opacity:0.5}.task-board-icons span{opacity:0.5;margin-left:4px}.task-board-icons a:hover{opacity:1.0;font-weight:bold}.task-board-icons .task-board-icons-row{line-height:22px}.task-list-icons{line-height:22px}.task-list-icons a,.task-list-icons span,.task-list-icons i{color:#999;opacity:1.0}.task-list-icons span{margin-left:5px}@media (max-width: 768px){.task-list-icons{text-align:left}}.task-icon-age{display:inline-block}span.task-icon-age-total{border:1px solid #e5e5e5;padding:1px 3px 1px 3px;border-top-left-radius:3px;border-bottom-left-radius:3px}span.task-icon-age-column{border:1px solid #e5e5e5;border-left:none;margin-left:-5px;padding:1px 3px 1px 3px;border-top-right-radius:3px;border-bottom-right-radius:3px}.task-board span.task-icon-age-total,.task-board span.task-icon-age-column{border-color:#666}.task-board-category-container{text-align:right;margin-top:8px;margin-bottom:8px}.task-board-category{border:1px solid #555;font-size:0.9em;font-weight:500;color:#000;padding:1px 3px 1px 2px;border-radius:3px}.task-board-category a:hover{text-decoration:underline}.task-date{font-weight:500;color:#000}span.task-date-today{opacity:1.0;color:#36c}span.task-date-overdue{opacity:1.0;color:#b94a48}.task-tags li{display:inline-block;margin:3px 3px 0 0;padding:1px 3px 1px 3px;color:#333;border:1px solid #333;border-radius:4px}.task-summary-container .task-tags{margin-top:10px}.task-list-tag{background:#ffeb8e;border-color:#333}#task-summary{margin-bottom:15px}#task-summary h2{color:#555;font-size:1.6em;margin-top:0;padding-top:0}.task-summary-container{border:2px solid #000;border-radius:8px;padding:10px}.task-summary-columns{display:flex;flex-flow:row;justify-content:space-between}@media (max-width: 768px){.task-summary-columns{flex-flow:column}}.task-summary-column{color:#333}.task-summary-column span{color:#555}.task-summary-column li{line-height:23px}#external-task-view{padding:10px;margin-top:10px;margin-bottom:10px;border:1px dotted #ccc}.task-form-container{box-sizing:border-box;display:flex;flex-wrap:wrap}.task-form-container>*{box-sizing:border-box}.task-form-container>*{width:1%}.task-form-main-column{width:60%}@media (max-width: 1000px){.task-form-main-column{width:100%}}.task-form-main-column input[type="text"]{width:700px;max-width:99%}.task-form-secondary-column{max-width:250px;min-width:200px;max-height:600px;padding-left:10px;overflow:auto;width:20%}@media (max-width: 1000px){.task-form-secondary-column{width:100%;max-width:99%;max-height:none}}@media (max-width: 768px){.task-form-secondary-column{padding-left:0}}.task-form-secondary-column label:first-child{margin-top:0}@media (max-width: 1000px){.task-form-secondary-column label:first-child{margin-top:10px}}.task-form-bottom{width:100%}.comment-sorting{text-align:right}.comment-sorting a{color:#555;font-weight:normal;text-decoration:none}.comment-sorting a:hover{color:#999}.comment{padding:5px;margin-bottom:15px}.comment-title{border-bottom:1px dotted #eee;margin-left:55px}.comment-date{color:#999;font-weight:200}.comment-actions{text-align:right}.comment-content{margin-left:55px}.comments .text-editor textarea{height:90px}.comments .text-editor .text-editor-preview-area{height:90px}.comments .comment-highlighted{background-color:#fff8dc;border:2px solid #ffeb8e}.comments .comment-highlighted:hover{background-color:#fff8dc}.comments .comment:hover{background:#fff8dc}.comments .comment:nth-child(even):not(.comment-highlighted){background:#fbfbfb}.comments .comment:nth-child(even):not(.comment-highlighted):hover{background:#fff8dc}.subtask-cell{padding:4px 10px;border-top:1px dotted #dedede;border-left:1px dotted #dedede;display:table-cell;vertical-align:middle}.subtask-cell a{color:#333;text-decoration:none}.subtask-cell a:hover,.subtask-cell a:focus{color:#36c}.subtask-cell:first-child{border-left:none}@media (max-width: 768px){.subtask-cell{width:90%;display:block;border-left:none}}.task-list-subtasks{display:table;width:100%}@media (max-width: 768px){.task-list-subtasks{display:block}}.task-list-subtask{display:table-row}@media (max-width: 768px){.task-list-subtask{display:block}}@media (max-width: 768px){.subtask-assignee,.subtask-time-tracking-cell{display:none}}.task-links-table td{vertical-align:middle}.task-links-task-count{color:#999;font-weight:normal}.task-link-closed{text-decoration:line-through}.text-editor{margin-top:10px}.text-editor a{font-size:1em;color:#999;text-decoration:none;margin-right:10px}.text-editor a:hover{color:#36c}.text-editor .text-editor-preview-area{border:1px solid #dedede;width:700px;max-width:99%;height:250px;overflow:auto;padding:2px}.text-editor textarea{width:700px;max-width:98%;height:250px}.markdown{line-height:1.4em}.markdown h1{margin-top:5px;margin-bottom:10px;font-weight:bold}.markdown h2{font-weight:bold}.markdown p{margin-bottom:10px}.markdown ol,.markdown ul{margin-left:25px;margin-top:10px;margin-bottom:10px}.markdown pre{background:#fbfbfb;padding:10px;border-radius:5px;border:1px solid #ddd;overflow:auto;overflow-wrap:initial;color:#555}.markdown blockquote{font-style:italic;border-left:3px solid #ddd;padding-left:10px;margin-bottom:10px;margin-left:20px}.markdown img{display:block;max-width:80%;margin-top:10px}.documentation{margin:0 auto;padding:20px;max-width:850px;background:#fefefe;border:1px solid #ccc;border-radius:5px;color:#555}.documentation img{border:1px solid #333}.documentation h1{text-decoration:none;margin-bottom:30px}.documentation h2{text-decoration:none;border-bottom:1px solid #ccc;margin-bottom:25px}.documentation li{line-height:30px}.panel{border-radius:4px;padding:8px 35px 8px 10px;margin-top:10px;margin-bottom:15px;border:1px solid #ddd;color:#333;background-color:#fcfcfc;overflow:auto}.panel li{list-style-type:square;margin-left:20px;line-height:1.35em}.activity-event{margin-bottom:15px;padding:10px}.activity-event:nth-child(even){background:#fafafa}.activity-event:hover{background:#fff8dc}.activity-date{margin-left:10px;font-weight:normal;color:#999}.activity-content{margin-left:55px}.activity-title{font-weight:bold;color:#000;border-bottom:1px dotted #efefef}.activity-description{color:#555;margin-top:10px}@media (max-width: 480px){.activity-description{overflow:auto}}.activity-description li{list-style-type:circle}.activity-description ul{margin-top:10px;margin-left:20px}.user-mention-link{font-weight:bold;color:#000;text-decoration:none}.user-mention-link:hover{color:#555}.image-slideshow-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.95);overflow:auto;z-index:100}.image-slideshow-overlay img{display:block;margin:auto}.image-slideshow-overlay figcaption{color:#fff;opacity:0.7;position:absolute;bottom:5px;right:15px}.slideshow-icon{color:#fff;position:absolute;font-size:2.5em;opacity:0.6}.slideshow-icon:hover{opacity:0.9;cursor:pointer}.slideshow-previous-icon{left:10px;top:45%}.slideshow-next-icon{right:10px;top:45%}.slideshow-close-icon{right:10px;top:10px;font-size:1.4em}.slideshow-download-icon{left:10px;bottom:10px;font-size:1.3em} +h1,li,ul,ol,table,tr,td,th,p,blockquote,body{margin:0;padding:0;font-size:100%}body{padding-bottom:10px;color:#333;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;text-rendering:optimizeLegibility}small{font-size:0.8em}hr{border:0;height:0;border-top:1px solid rgba(0,0,0,0.1);border-bottom:1px solid rgba(255,255,255,0.3)}.page{margin-left:10px;margin-right:10px}.margin-top{margin-top:20px}.margin-bottom{margin-bottom:20px}.pull-right{text-align:right}ul.no-bullet li{list-style-type:none;margin-left:0}#app-loading-icon{position:fixed;right:3px;bottom:3px}.assign-me{vertical-align:bottom}a{color:#36c;border:none}a:focus{outline:0;color:#DF5353;text-decoration:none}a:hover{color:#333;text-decoration:none}a .fa{padding-right:3px;text-decoration:none;color:#333}h1,h2,h3{font-weight:normal;color:#333}h1{font-size:1.5em}h2{font-size:1.4em;margin-bottom:10px}h3{margin-top:10px;font-size:1.2em}table{width:100%;border-collapse:collapse;border-spacing:0;margin-bottom:20px}table.table-fixed{table-layout:fixed;white-space:nowrap}table.table-fixed th{overflow:hidden}table.table-fixed td{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}table.table-small{font-size:0.8em}table.table-striped tr:nth-child(odd){background:#fefefe}@media (max-width: 768px){table.table-scrolling{overflow-x:auto;display:inline-block;vertical-align:top;max-width:100%;white-space:nowrap}}table th{text-align:left;padding:0.5em 3px;border:1px solid #eee;background:#fbfbfb}table th a{text-decoration:none;color:#333}table th a:focus,table th a:hover{text-decoration:underline}table td{border:1px solid #eee;padding:0.5em 3px;vertical-align:top}table td li{margin-left:20px}.column-1{width:1%}.column-2{width:2%}.column-3{width:3%}.column-4{width:4%}.column-5{width:5%}.column-6{width:6%}.column-7{width:7%}.column-8{width:8%}.column-9{width:9%}.column-10{width:10%}.column-11{width:11%}.column-12{width:12%}.column-13{width:13%}.column-14{width:14%}.column-15{width:15%}.column-16{width:16%}.column-17{width:17%}.column-18{width:18%}.column-19{width:19%}.column-20{width:20%}.column-21{width:21%}.column-22{width:22%}.column-23{width:23%}.column-24{width:24%}.column-25{width:25%}.column-26{width:26%}.column-27{width:27%}.column-28{width:28%}.column-29{width:29%}.column-30{width:30%}.column-31{width:31%}.column-32{width:32%}.column-33{width:33%}.column-34{width:34%}.column-35{width:35%}.column-36{width:36%}.column-37{width:37%}.column-38{width:38%}.column-39{width:39%}.column-40{width:40%}.column-41{width:41%}.column-42{width:42%}.column-43{width:43%}.column-44{width:44%}.column-45{width:45%}.column-46{width:46%}.column-47{width:47%}.column-48{width:48%}.column-49{width:49%}.column-50{width:50%}.column-51{width:51%}.column-52{width:52%}.column-53{width:53%}.column-54{width:54%}.column-55{width:55%}.column-56{width:56%}.column-57{width:57%}.column-58{width:58%}.column-59{width:59%}.column-60{width:60%}.column-61{width:61%}.column-62{width:62%}.column-63{width:63%}.column-64{width:64%}.column-65{width:65%}.column-66{width:66%}.column-67{width:67%}.column-68{width:68%}.column-69{width:69%}.column-70{width:70%}.column-71{width:71%}.column-72{width:72%}.column-73{width:73%}.column-74{width:74%}.column-75{width:75%}.column-76{width:76%}.column-77{width:77%}.column-78{width:78%}.column-79{width:79%}.column-80{width:80%}.column-81{width:81%}.column-82{width:82%}.column-83{width:83%}.column-84{width:84%}.column-85{width:85%}.column-86{width:86%}.column-87{width:87%}.column-88{width:88%}.column-89{width:89%}.column-90{width:90%}.column-91{width:91%}.column-92{width:92%}.column-93{width:93%}.column-94{width:94%}.column-95{width:95%}.column-96{width:96%}.column-97{width:97%}.column-98{width:98%}.column-99{width:99%}.column-100{width:100%}.draggable-row-handle{cursor:move;color:#dedede}.draggable-row-handle:hover{color:#333}tr.draggable-item-selected{background:#fff;border:2px solid #666;box-shadow:4px 2px 10px -4px rgba(0,0,0,0.55)}tr.draggable-item-selected td{border-top:none;border-bottom:none}tr.draggable-item-selected td:first-child{border-left:none}tr.draggable-item-selected td:last-child{border-right:none}.table-stripped tr.draggable-item-hover,.table-stripped tr.draggable-item-hover{background:#FEFFF2}.table-list{font-size:0.9em;margin-bottom:20px}.table-list-header{background:#fbfbfb;border:1px solid #e5e5e5;border-radius:5px 5px 0 0;line-height:35px;padding-left:3px;padding-right:3px}.table-list-header a{color:#333;font-weight:500;text-decoration:none;margin-right:10px}.table-list-header a:hover,.table-list-header a:focus{color:#767676}.table-list-header .table-list-header-count{color:#767676;display:inline-block;float:left}.table-list-header .table-list-header-menu{text-align:right}.table-list-row{padding-left:3px;padding-right:3px;border-bottom:1px solid #e5e5e5;border-right:1px solid #e5e5e5}.table-list-row.table-border-left{border-left:1px solid #e5e5e5}.table-list-row:nth-child(odd){background:#fefefe}.table-list-row:last-child{border-radius:0 0 5px 5px}.table-list-row:hover{background:#fff8dc;border-bottom:1px solid #ffeb8e;border-right:1px solid #ffeb8e}.table-list-row .table-list-title{font-weight:500;line-height:23px}.table-list-row .table-list-title.status-closed{text-decoration:line-through;margin-right:10px}.table-list-row .table-list-title.status-closed a{font-style:italic}.table-list-row .table-list-title a{color:#333;text-decoration:none}.table-list-row .table-list-title a:hover,.table-list-row .table-list-title a:focus{text-decoration:underline}.table-list-row .table-list-details{color:#999;font-weight:300;line-height:30px}.table-list-row .table-list-details span{margin-left:5px}.table-list-row .table-list-details span:first-child{margin-left:0}.table-list-row .table-list-details li{display:inline;list-style-type:none}.table-list-row .table-list-details li:after{content:', '}.table-list-row .table-list-details li:last-child:after{content:''}.table-list-row .table-list-details strong{font-weight:400;color:#555}.table-list-row .table-list-details-with-icons{float:left}@media (max-width: 768px){.table-list-row .table-list-details-with-icons{float:none}}.table-list-row .table-list-icons{font-size:0.8em;text-align:right;line-height:30px}@media (max-width: 768px){.table-list-row .table-list-icons{text-align:left;line-height:20px}}.table-list-row .table-list-icons span{margin-left:5px}.table-list-row .table-list-icons a{text-decoration:none}.table-list-row .table-list-icons a:hover{color:#333}.table-list-row .table-list-icons a:hover i{color:#333}.table-list-category{font-size:0.9em;font-weight:500;color:#000;padding:1px 2px 1px 2px;border-radius:3px;background:#fcfcfc;border:1px solid #ccc}.table-list-category a{text-decoration:none;color:#000}.table-list-category a:hover{color:#36c}fieldset{border:1px solid #ccc;margin-top:20px}legend{font-weight:500;font-size:1.2em}label{cursor:pointer;display:block;margin-top:10px;font-weight:400}input[type="number"],input[type="date"],input[type="email"],input[type="password"],input[type="text"]:not(.input-addon-field){color:#999;border:1px solid #ccc;width:300px;max-width:95%;font-size:1em;height:25px;padding-bottom:0;padding-left:4px;font-family:sans-serif;-webkit-appearance:none;-moz-appearance:none}input[type="number"]::-webkit-input-placeholder,input[type="date"]::-webkit-input-placeholder,input[type="email"]::-webkit-input-placeholder,input[type="password"]::-webkit-input-placeholder,input[type="text"]:not(.input-addon-field)::-webkit-input-placeholder{color:#dedede}input[type="number"]::-moz-placeholder,input[type="date"]::-moz-placeholder,input[type="email"]::-moz-placeholder,input[type="password"]::-moz-placeholder,input[type="text"]:not(.input-addon-field)::-moz-placeholder{color:#dedede}input[type="number"]:-ms-input-placeholder,input[type="date"]:-ms-input-placeholder,input[type="email"]:-ms-input-placeholder,input[type="password"]:-ms-input-placeholder,input[type="text"]:not(.input-addon-field):-ms-input-placeholder{color:#dedede}input[type="number"]:focus,input[type="date"]:focus,input[type="email"]:focus,input[type="password"]:focus,input[type="text"]:focus{color:#000;border-color:rgba(82,168,236,0.8);outline:0;box-shadow:0 0 8px rgba(82,168,236,0.6)}input[type="number"]{width:70px}input[type="text"]:not(.input-addon-field).form-numeric{width:70px}input[type="text"]:not(.input-addon-field).form-datetime,input[type="text"]:not(.input-addon-field).form-date{width:150px}input[type="text"]:not(.input-addon-field).form-input-large{width:400px}input[type="text"]:not(.input-addon-field).form-input-small{width:150px}textarea:focus{color:#000;border-color:rgba(82,168,236,0.8);outline:0;box-shadow:0 0 8px rgba(82,168,236,0.6)}textarea{padding:4px;border:1px solid #ccc;width:400px;max-width:99%;height:200px;font-family:sans-serif;font-size:1em}textarea::-webkit-input-placeholder{color:#dedede}textarea::-moz-placeholder{color:#dedede}textarea:-ms-input-placeholder{color:#dedede}select{font-size:1.0em;max-width:95%}select:focus{outline:0}select[multiple]{width:300px}.tag-autocomplete{width:400px}span.select2-container{margin-top:2px}.form-actions{padding-top:20px;clear:both}.form-required{color:red;padding-left:5px;font-weight:bold}@media (max-width: 480px){.form-required{display:none}}input.form-error,textarea.form-error{border:2px solid #b94a48}input.form-error:focus,textarea.form-error:focus{box-shadow:none;border:2px solid #b94a48}.form-errors{color:#b94a48;list-style-type:none}ul.form-errors li{margin-left:0}.form-help{font-size:0.8em;color:brown;margin-bottom:15px}.form-inline{padding:0;margin:0;border:none}.form-inline label{display:inline;padding-right:3px}.form-inline input,.form-inline select{margin:0 15px 0 0}.form-inline .form-required{display:none}.form-inline .form-actions{display:inline-block}.form-inline .js-submit-buttons-rendered{display:inline-block}.form-inline-group{display:inline}.form-columns{display:-webkit-flex;display:flex;-webkit-flex-direction:row;flex-direction:row;-webkit-flex-wrap:wrap;flex-wrap:wrap;-webkit-justify-content:flex-start;justify-content:flex-start}.form-columns .form-column{margin-right:25px;flex-grow:1}.form-columns fieldset{margin-top:0}.form-login{max-width:350px;margin:5% auto 0}@media (max-width: 480px){.form-login{margin-left:5px}}.form-login li{margin-left:25px;line-height:25px}.form-login h2{margin-bottom:30px;font-weight:bold}.reset-password{margin-top:20px;margin-bottom:20px}.reset-password a{color:#999}.input-addon{display:flex}.input-addon-field{flex:1;font-size:1em;color:#999;margin:0;-webkit-appearance:none;-moz-appearance:none}.input-addon-field:first-child{border-radius:5px 0 0 5px}.input-addon-field:last-child{border-radius:0 5px 5px 0}.input-addon-item{background-color:rgba(147,128,108,0.1);color:#666;font:inherit;font-weight:normal}.input-addon-item:first-child{border-radius:5px 0 0 5px}.input-addon-item:last-child{border-radius:0 5px 5px 0}@media (max-width: 480px){.input-addon-item .dropdown .fa-caret-down{display:none}}.input-addon-field,.input-addon-item{border:1px solid rgba(147,128,108,0.25);padding:4px 0.75em}.input-addon-field:not(:first-child),.input-addon-item:not(:first-child){border-left:0}.icon-success{color:#468847}.icon-error{color:#b94a48}.icon-fade-out{opacity:1;animation:icon-fadeout 5s linear forwards}@keyframes icon-fadeout{0%{opacity:1}100%{opacity:0}}.alert{padding:8px 35px 8px 14px;margin-top:5px;margin-bottom:5px;color:#c09853;background-color:#fcf8e3;border:1px solid #fbeed5;border-radius:4px}.alert-success{color:#468847;background-color:#dff0d8;border-color:#d6e9c6}.alert-error{color:#b94a48;background-color:#f2dede;border-color:#eed3d7}.alert-info{color:#3a87ad;background-color:#d9edf7;border-color:#bce8f1}.alert-normal{color:#333;background-color:#f0f0f0;border-color:#ddd}.alert ul{margin-top:10px;margin-bottom:10px}.alert li{margin-left:25px}.alert-fade-out{text-align:center;position:fixed;bottom:0;left:20%;width:60%;padding-top:5px;padding-bottom:5px;margin-bottom:0;border-width:1px 0 0;border-radius:4px 4px 0 0;z-index:9999;opacity:1;animation:fadeout 5s linear forwards}@keyframes fadeout{0%{opacity:1}100%{opacity:0}}a.btn{text-decoration:none}.btn{-webkit-appearance:none;-moz-appearance:none;font-size:1.2em;font-weight:normal;cursor:pointer;display:inline-block;border-radius:2px;padding:3px 10px;margin:0;border:1px solid #ddd;background:#f5f5f5;color:#333}.btn:hover,.btn:focus{border-color:#bbb;background:#fafafa;color:#000}.btn-red{border-color:#b0281a;background:#d14836;color:#fff}.btn-red:hover,.btn-red:focus{border-color:#b0281a;background:#c53727;color:#fff}.btn-blue{border-color:#3079ed;background:#4d90fe;color:#fff}.btn-blue:hover,.btn-blue:focus{border-color:#3079ed;background:#357ae8;color:#fff}.btn:disabled{color:#ccc;border-color:#ccc;background:#f7f7f7}.buttons-header{font-size:0.8em;margin-top:5px;margin-bottom:15px}.tooltip i.fa{cursor:pointer}.tooltip .fa-info-circle{color:#999}#tooltip-container{padding:5px;background:#fff;border:1px solid #ddd;border-radius:4px;box-shadow:0 6px 12px #aaa;position:absolute;min-width:350px}#tooltip-container .markdown p{margin-bottom:0}#tooltip-container .tooltip-large{width:600px}h2 .dropdown ul{display:none}.dropdown{display:inline;position:relative}.dropdown ul{display:none}.dropdown-smaller{font-size:0.85em}ul.dropdown-submenu-open{display:block;position:absolute;z-index:1000;min-width:285px;list-style:none;margin:3px 0 0 1px;padding:6px 0;background-color:#fff;border:1px solid #b2b2b2;border-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,0.15)}.dropdown-submenu-open li{display:block;margin:0;padding:8px 10px;font-size:0.9em;border-bottom:1px solid #f8f8f8;cursor:pointer}.dropdown-submenu-open li.no-hover{cursor:default}.dropdown-submenu-open li:last-child{border:none}.dropdown-submenu-open li:not(.no-hover):hover{background:#4078C0;color:#fff}.dropdown-submenu-open li:hover a{color:#fff}.dropdown-submenu-open a{text-decoration:none;color:#333}.dropdown-submenu-open a:focus{text-decoration:underline}.dropdown-menu-link-text,.dropdown-menu-link-icon{color:#333;text-decoration:none}.dropdown-menu-link-text:hover{text-decoration:underline}td a.dropdown-menu strong{color:#333}td a.dropdown-menu strong i{color:#333}td a.dropdown-menu i{color:#dedede}td a.dropdown-menu:hover strong{color:#555}td a.dropdown-menu:hover strong i{color:#555}td a.dropdown-menu:hover i{color:#333}.accordion-title{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAADCAYAAABS3WWCAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NEQ5RDgxQzc2RjQ5MTFFMjhEMUNENzFGRUMwRjhBRTciIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NEQ5RDgxQzg2RjQ5MTFFMjhEMUNENzFGRUMwRjhBRTciPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0RDlEODFDNTZGNDkxMUUyOEQxQ0Q3MUZFQzBGOEFFNyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0RDlEODFDNjZGNDkxMUUyOEQxQ0Q3MUZFQzBGOEFFNyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PvXFWFAAAAAYSURBVHjaYvj//z8D0/Pnz/8zgFgAAQYAS5UJscReGMIAAAAASUVORK5CYII=) repeat-x scroll 0 10px}.accordion-title h3{display:inline;padding-right:5px;background:#fff}.accordion-content{margin-top:15px;margin-bottom:25px}.accordion-toggle{color:#333;text-decoration:none}.accordion-toggle:focus{color:#333}.accordion-toggle:hover{color:#999}.accordion-toggle:before{content:"\f0d7"}.accordion-collapsed{margin-bottom:25px}.accordion-collapsed .accordion-toggle:before{content:"\f0da"}.accordion-collapsed .accordion-content{display:none}#select-dropdown-menu{position:absolute;display:block;z-index:1000;min-width:160px;padding:5px 0;background:#fff;list-style:none;border:1px solid #ccc;border-radius:3px;box-shadow:0 6px 12px rgba(0,0,0,0.175);overflow:scroll}.select-dropdown-menu-item{white-space:nowrap;overflow:hidden;padding:3px 10px;color:#555;cursor:pointer;border-bottom:1px solid #f8f8f8;line-height:1.5em;font-weight:400}.select-dropdown-menu-item.active{color:#fff;background:#428bca}.select-dropdown-menu-item:last-child{border:none}.select-dropdown-input-container{position:relative;border:1px solid #ccc;border-radius:5px;background-color:#fff}.select-dropdown-input-container input.select-dropdown-input{margin:0 0 0 5px;border:none;height:23px}.select-dropdown-input-container input.select-dropdown-input:focus{border:none;box-shadow:none}.select-dropdown-input-container .select-dropdown-chevron{color:#555;position:absolute;top:4px;right:5px;cursor:pointer}.select-dropdown-input-container .select-loading-icon{color:#555;position:absolute;top:4px;right:5px}#suggest-menu{position:absolute;display:block;z-index:1000;min-width:160px;padding:5px 0;background:#fff;list-style:none;border:1px solid #ccc;border-radius:3px;box-shadow:0 6px 12px rgba(0,0,0,0.175)}.suggest-menu-item{white-space:nowrap;padding:3px 10px;color:#333;font-weight:bold;cursor:pointer}.suggest-menu-item.active{color:#fff;background:#428bca}.suggest-menu-item.active small{color:#fff}.suggest-menu-item small{color:#999;font-weight:normal}#modal-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.9);overflow:auto;z-index:100}#modal-box{position:fixed;max-height:calc(100% - 30px);top:2%;left:50%;transform:translateX(-50%);background:#fff;overflow:auto;border-radius:5px}#modal-content{padding:0 5px 5px}#modal-header{text-align:right;padding-right:5px}#modal-close-button{color:#333}#modal-close-button:hover{color:#b94a48}.pagination{text-align:center}.pagination-showing{margin-right:5px;padding-right:5px;border-right:1px solid #999}.pagination-next{margin-left:5px}.pagination-previous{margin-right:5px}header{display:flex;flex-wrap:wrap;padding:5px 10px;margin-bottom:5px;border-bottom:1px solid #dedede;background-color:#fbfbfb}header .title-container{flex:1;min-width:300px}@media (max-width: 480px){header .title-container{order:3}}header .board-selector-container{min-width:320px;display:flex;align-items:center}@media (max-width: 480px){header .board-selector-container{order:2;min-width:300px}header .board-selector-container input[type=text]{max-width:280px}}header .menus-container{min-width:120px;display:flex;align-items:center;justify-content:flex-end}@media (max-width: 480px){header .menus-container{order:1;margin-bottom:5px;margin-left:auto}}header h1{font-size:1.5em}header h1 .tooltip{opacity:0.3;font-size:0.7em}a i.web-notification-icon{color:#36c}a i.web-notification-icon:focus,a i.web-notification-icon:hover{color:#000}.logo a{opacity:0.5;color:#d40000;text-decoration:none}.logo span{color:#333}.logo a:hover{opacity:0.8;color:#333}.logo a:focus span,.logo a:hover span{color:#d40000}.page-header{margin-bottom:20px}.page-header .dropdown{padding-right:10px}.page-header h2{margin:0;padding:0;font-weight:bold;border-bottom:1px dotted #ccc}.page-header h2 a{color:#333;text-decoration:none}.page-header h2 a:focus,.page-header h2 a:hover{color:#999}.page-header ul{text-align:left;margin-top:5px;display:inline-block}.page-header li{display:inline;padding-right:15px}@media (max-width: 480px){.page-header li{display:block;line-height:1.5em}}.page-header li.active a{color:#333;text-decoration:none;font-weight:bold}.page-header li.active a:hover,.page-header li.active a:focus{text-decoration:underline}.menu-inline{margin-bottom:5px}.menu-inline li{display:inline;padding-right:15px}.menu-inline li .active a{font-weight:bold;color:#000;text-decoration:none}.sidebar-container{height:100%;display:flex;flex-flow:row}@media (max-width: 768px){.sidebar-container{flex-flow:wrap}}.sidebar-content{padding-left:10px;flex:1 100%;max-width:85%;overflow-wrap:break-word}@media (max-width: 768px){.sidebar-content{padding-left:0;order:1;max-width:100%}}@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: landscape) and (-webkit-min-device-pixel-ratio: 1){.sidebar-content{max-width:75%}}.sidebar{max-width:25%;min-width:230px}@media (max-width: 768px){.sidebar{flex:1 auto;order:2}}.sidebar h2{margin-top:0}.sidebar>ul a{text-decoration:none;color:#999;font-weight:300}.sidebar>ul a:hover{color:#333}.sidebar>ul li{list-style-type:none;line-height:35px;border-bottom:1px dotted #efefef;padding-left:13px}.sidebar>ul li:hover{border-left:5px solid #555;padding-left:8px}.sidebar>ul li.active{border-left:5px solid #333;padding-left:8px}.sidebar>ul li.active a{color:#333;font-weight:bold}.sidebar-icons>ul li{padding-left:0}.sidebar-icons>ul li:hover,.sidebar-icons>ul li.active{padding-left:0;border-left:none}.sidebar>ul li.active a:focus,.sidebar>ul li.active a:hover{color:#555}.sidebar>ul li:last-child{margin-bottom:15px}.avatar img{vertical-align:bottom}.avatar-left{float:left;margin-right:10px}.avatar-inline{display:inline-block;margin-right:3px}.avatar-48 img,.avatar-48 div{border-radius:30px}.avatar-48 .avatar-letter{line-height:48px;width:48px;font-size:25px}.avatar-20 img,.avatar-20 div{border-radius:10px}.avatar-20 .avatar-letter{line-height:20px;width:20px;font-size:11px}.avatar-letter{color:#fff;text-align:center}#file-dropzone,#screenshot-zone{position:relative;border:2px dashed #ccc;width:99%;height:250px;overflow:auto}#file-dropzone-inner,#screenshot-inner{position:absolute;left:0;bottom:48%;width:100%;text-align:center;color:#aaa}#screenshot-zone.screenshot-pasted{border:2px solid #333}#file-list{margin:20px}#file-list li{list-style-type:none;padding-top:8px;padding-bottom:8px;border-bottom:1px dotted #ddd;width:95%}#file-list li .file-error{font-weight:bold;color:#b94a48}.file-thumbnails{display:-webkit-flex;display:flex;-webkit-flex-direction:row;flex-direction:row;-webkit-flex-wrap:wrap;flex-wrap:wrap;-webkit-justify-content:flex-start;justify-content:flex-start}.file-thumbnail{width:250px;border:1px solid #efefef;border-radius:5px;margin-bottom:20px;box-shadow:4px 2px 10px -6px rgba(0,0,0,0.55);margin-right:15px}.file-thumbnail img{cursor:pointer;border-top-left-radius:5px;border-top-right-radius:5px}.file-thumbnail img:hover{opacity:0.5}.file-thumbnail-content{padding-left:8px;padding-right:8px}.file-thumbnail-title{font-weight:700;font-size:0.9em;color:#555;overflow:hidden;text-overflow:ellipsis}.file-thumbnail-description{font-size:0.8em;color:#999;margin-top:8px;margin-bottom:5px}.file-viewer{position:relative}.file-viewer img{max-width:95%;max-height:85%;margin-top:10px}.color-picker{width:180px}.color-picker-option{height:25px}.color-picker-square{display:inline-block;width:18px;height:18px;margin-right:5px;border:1px solid #000}.color-picker-label{display:inline-block;vertical-align:bottom;padding-bottom:3px}.filter-box{max-width:1024px}.action-menu{color:#333;text-decoration:none}.action-menu:hover,.action-menu:focus{text-decoration:underline}.js-project-creation-options{max-width:500px;border-left:3px dotted #efefef;margin-top:20px;padding-left:15px;padding-bottom:5px;padding-top:5px}.project-overview-columns{display:-webkit-flex;display:flex;-webkit-flex-direction:row;flex-direction:row;-webkit-flex-wrap:wrap;flex-wrap:wrap;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;margin-bottom:20px;font-size:1.4em}@media (max-width: 480px){.project-overview-columns{display:block}}.project-overview-column{text-align:center;margin-right:3%;margin-top:5px;padding:3px 15px 3px 15px;border:1px dashed #ddd}@media (max-width: 480px){.project-overview-column{text-align:left}}.project-overview-column small{color:#999}.project-overview-column strong{color:#555;display:block}@media (max-width: 480px){.project-overview-column strong{display:inline}}.project-header{margin-bottom:8px}.project-header .dropdown-component{margin-top:4px;margin-right:5px;float:left}@media (max-width: 768px){.project-header .dropdown-component{float:none}}.project-header .views-switcher-component{margin-top:4px;float:left}@media (max-width: 768px){.project-header .views-switcher-component{float:none;margin-bottom:10px}}.project-header .filter-box-component form{margin:0}.views{margin-right:10px;margin-top:1px;font-size:0.9em}@media (max-width: 560px){.views{width:100%}}@media (max-width: 768px){.views{margin-top:10px;font-size:1em}}@media (max-width: 480px){.views{margin-top:5px}}.views li{white-space:nowrap;background:#fafafa;border:1px solid #ddd;border-right:none;padding:4px 8px;display:inline}@media (max-width: 560px){.views li{display:block;margin-top:5px;border-radius:5px;border:1px solid #ddd}}.views li.active a{font-weight:bold;color:#000;text-decoration:none}.views li:first-child{border-top-left-radius:5px;border-bottom-left-radius:5px}.views li:last-child{border-right:1px solid #ddd;border-top-right-radius:5px;border-bottom-right-radius:5px}.views a{color:#555;text-decoration:none}.views a:hover{color:#333;text-decoration:underline}.dashboard-project-stats small{margin-right:10px;color:#999}.dashboard-table-link{font-weight:bold;color:#000;text-decoration:none}.dashboard-table-link:focus,.dashboard-table-link:hover{color:#999}.public-board{margin-top:5px}.public-task{max-width:800px;margin:5px auto 0}#board-container{overflow-x:auto}#board{table-layout:fixed;margin-bottom:0}#board th.board-column-header{width:240px}#board td{vertical-align:top}.board-container-compact{overflow-x:initial}@media all and (-ms-high-contrast: active), (-ms-high-contrast: none){.board-container-compact #board{table-layout:auto}}#board th.board-column-header.board-column-compact{width:initial}.board-column-collapsed{display:none}td.board-column-task-collapsed{font-weight:bold;background-color:#fbfbfb}#board th.board-column-header-collapsed{width:28px;min-width:28px;text-align:center;overflow:hidden}.board-rotation-wrapper{position:relative;padding:8px 4px;min-height:150px;overflow:hidden}.board-rotation{white-space:nowrap;-webkit-backface-visibility:hidden;-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg);-webkit-transform-origin:0 100%;-moz-transform-origin:0 100%;-ms-transform-origin:0 100%;transform-origin:0 100%}.board-column-title .dropdown-menu{text-decoration:none}.board-add-icon{float:left;padding:0 5px}.board-add-icon i{text-decoration:none;color:#36c;font-size:1.4em}.board-add-icon i:focus,.board-add-icon i:hover{text-decoration:none;color:red}.board-column-header-task-count{color:#999;font-weight:normal}a.board-swimlane-toggle{text-decoration:none}a.board-swimlane-toggle:hover,a.board-swimlane-toggle:focus{color:#000;text-decoration:none;border:none}.board-task-list{min-height:60px}.board-task-list .task-board:last-child{margin-bottom:0}.board-task-list-limit{background-color:#DF5353}.draggable-item{cursor:pointer;user-select:none;-webkit-user-select:none;-moz-user-select:none}.draggable-placeholder{border:2px dashed #000;background:#fafafa;height:70px;margin-bottom:10px}div.draggable-item-selected{border:1px solid #000}.task-board-sort-handle{float:left;padding-right:5px}.task-board{position:relative;margin-bottom:4px;border:1px solid #000;padding:2px;word-wrap:break-word;font-size:0.9em;border-radius:6px}div.task-board-recent{border-width:2px}div.task-board-status-closed{user-select:none;border:1px dotted #555}.task-board a{color:#000;text-decoration:none}.task-board-collapsed{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.task-board-title{margin-top:5px;margin-bottom:8px}.task-board-title a:hover{text-decoration:underline}.task-board-saving-state{opacity:0.3}.task-board-saving-icon{position:absolute;margin:auto;width:100%;text-align:center;color:#000}.task-board-avatars{text-align:right;float:right}.task-board-change-assignee{cursor:pointer}.task-board-change-assignee:hover{opacity:0.6}.task-list-avatars{display:inline-block;float:left}@media (max-width: 768px){.task-list-avatars{float:none;display:block}}.task-list-avatars .task-avatar-assignee{font-weight:300;color:#999}.task-list-avatars:hover .task-avatar-assignee{font-weight:400;color:#000}.task-board-icons,.task-list-icons{font-size:0.8em;text-align:right}.task-board-icons a,.task-list-icons a{text-decoration:none}.task-board-icons a:hover,.task-list-icons a:hover{color:#333}.task-board-icons a:hover i,.task-list-icons a:hover i{color:#333}.task-board-icons .task-score,.task-list-icons .task-score{font-weight:bold}.task-board-icons .flag-milestone,.task-list-icons .flag-milestone{color:green}.task-board-icons{margin-top:7px}.task-board-icons a{opacity:0.5}.task-board-icons span{opacity:0.5;margin-left:4px}.task-board-icons a:hover{opacity:1.0;font-weight:bold}.task-board-icons .task-board-icons-row{line-height:22px}.task-list-icons{line-height:22px}.task-list-icons a,.task-list-icons span,.task-list-icons i{color:#999;opacity:1.0}.task-list-icons span{margin-left:5px}@media (max-width: 768px){.task-list-icons{text-align:left}}.task-icon-age{display:inline-block}span.task-icon-age-total{border:1px solid #e5e5e5;padding:1px 3px 1px 3px;border-top-left-radius:3px;border-bottom-left-radius:3px}span.task-icon-age-column{border:1px solid #e5e5e5;border-left:none;margin-left:-5px;padding:1px 3px 1px 3px;border-top-right-radius:3px;border-bottom-right-radius:3px}.task-board span.task-icon-age-total,.task-board span.task-icon-age-column{border-color:#666}.task-board-category-container{text-align:right;margin-top:8px;margin-bottom:8px}.task-board-category{border:1px solid #555;font-size:0.9em;font-weight:500;color:#000;padding:1px 3px 1px 2px;border-radius:3px}.task-board-category a:hover{text-decoration:underline}.task-date{font-weight:500;color:#000}span.task-date-today{opacity:1.0;color:#36c}span.task-date-overdue{opacity:1.0;color:#b94a48}.task-tags li{display:inline-block;margin:3px 3px 0 0;padding:1px 3px 1px 3px;color:#333;border:1px solid #333;border-radius:4px}.task-summary-container .task-tags{margin-top:10px}.task-list-tag{background:#ffeb8e;border-color:#333}#task-summary{margin-bottom:15px}#task-summary h2{color:#555;font-size:1.6em;margin-top:0;padding-top:0}.task-summary-container{border:2px solid #000;border-radius:8px;padding:10px}.task-summary-columns{display:flex;flex-flow:row;justify-content:space-between}@media (max-width: 768px){.task-summary-columns{flex-flow:column}}.task-summary-column{color:#333}.task-summary-column span{color:#555}.task-summary-column li{line-height:23px}#external-task-view{padding:10px;margin-top:10px;margin-bottom:10px;border:1px dotted #ccc}.task-form-container{box-sizing:border-box;display:flex;flex-wrap:wrap}.task-form-container>*{box-sizing:border-box}.task-form-container>*{width:1%}.task-form-main-column{width:60%}@media (max-width: 1000px){.task-form-main-column{width:100%}}.task-form-main-column input[type="text"]{width:700px;max-width:99%}.task-form-secondary-column{max-width:250px;min-width:200px;max-height:600px;padding-left:10px;overflow:auto;width:20%}@media (max-width: 1000px){.task-form-secondary-column{width:100%;max-width:99%;max-height:none}}@media (max-width: 768px){.task-form-secondary-column{padding-left:0}}.task-form-secondary-column label:first-child{margin-top:0}@media (max-width: 1000px){.task-form-secondary-column label:first-child{margin-top:10px}}.task-form-bottom{width:100%}.comment-sorting{text-align:right}.comment-sorting a{color:#555;font-weight:normal;text-decoration:none}.comment-sorting a:hover{color:#999}.comment{padding:5px;margin-bottom:15px}.comment-title{border-bottom:1px dotted #eee;margin-left:55px}.comment-date{color:#999;font-weight:200}.comment-actions{text-align:right}.comment-content{margin-left:55px}.comments .text-editor textarea{height:90px}.comments .text-editor .text-editor-preview-area{height:90px}.comments .comment-highlighted{background-color:#fff8dc;border:2px solid #ffeb8e}.comments .comment-highlighted:hover{background-color:#fff8dc}.comments .comment:hover{background:#fff8dc}.comments .comment:nth-child(even):not(.comment-highlighted){background:#fbfbfb}.comments .comment:nth-child(even):not(.comment-highlighted):hover{background:#fff8dc}.subtask-cell{padding:4px 10px;border-top:1px dotted #dedede;border-left:1px dotted #dedede;display:table-cell;vertical-align:middle}.subtask-cell a{color:#333;text-decoration:none}.subtask-cell a:hover,.subtask-cell a:focus{color:#36c}.subtask-cell:first-child{border-left:none}@media (max-width: 768px){.subtask-cell{width:90%;display:block;border-left:none}}.task-list-subtasks{display:table;width:100%}@media (max-width: 768px){.task-list-subtasks{display:block}}.task-list-subtask{display:table-row}@media (max-width: 768px){.task-list-subtask{display:block}}@media (max-width: 768px){.subtask-assignee,.subtask-time-tracking-cell{display:none}}.task-links-table td{vertical-align:middle}.task-links-task-count{color:#999;font-weight:normal}.task-link-closed{text-decoration:line-through}.text-editor{margin-top:10px}.text-editor a{font-size:1em;color:#999;text-decoration:none;margin-right:10px}.text-editor a:hover{color:#36c}.text-editor .text-editor-preview-area{border:1px solid #dedede;width:700px;max-width:99%;height:250px;overflow:auto;padding:2px}.text-editor textarea{width:700px;max-width:98%;height:250px}.markdown{line-height:1.4em}.markdown h1{margin-top:5px;margin-bottom:10px;font-weight:bold}.markdown h2{font-weight:bold}.markdown p{margin-bottom:10px}.markdown ol,.markdown ul{margin-left:25px;margin-top:10px;margin-bottom:10px}.markdown pre{background:#fbfbfb;padding:10px;border-radius:5px;border:1px solid #ddd;overflow:auto;overflow-wrap:initial;color:#555}.markdown blockquote{font-style:italic;border-left:3px solid #ddd;padding-left:10px;margin-bottom:10px;margin-left:20px}.markdown img{display:block;max-width:80%;margin-top:10px}.documentation{margin:0 auto;padding:20px;max-width:850px;background:#fefefe;border:1px solid #ccc;border-radius:5px;color:#555}.documentation img{border:1px solid #333}.documentation h1{text-decoration:none;margin-bottom:30px}.documentation h2{text-decoration:none;border-bottom:1px solid #ccc;margin-bottom:25px}.documentation li{line-height:30px}.panel{border-radius:4px;padding:8px 35px 8px 10px;margin-top:10px;margin-bottom:15px;border:1px solid #ddd;color:#333;background-color:#fcfcfc;overflow:auto}.panel li{list-style-type:square;margin-left:20px;line-height:1.35em}.activity-event{margin-bottom:15px;padding:10px}.activity-event:nth-child(even){background:#fafafa}.activity-event:hover{background:#fff8dc}.activity-date{margin-left:10px;font-weight:normal;color:#999}.activity-content{margin-left:55px}.activity-title{font-weight:bold;color:#000;border-bottom:1px dotted #efefef}.activity-description{color:#555;margin-top:10px}@media (max-width: 480px){.activity-description{overflow:auto}}.activity-description li{list-style-type:circle}.activity-description ul{margin-top:10px;margin-left:20px}.user-mention-link{font-weight:bold;color:#000;text-decoration:none}.user-mention-link:hover{color:#555}.image-slideshow-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.95);overflow:auto;z-index:100}.image-slideshow-overlay img{display:block;margin:auto}.image-slideshow-overlay figcaption{color:#fff;opacity:0.7;position:absolute;bottom:5px;right:15px}.slideshow-icon{color:#fff;position:absolute;font-size:2.5em;opacity:0.6}.slideshow-icon:hover{opacity:0.9;cursor:pointer}.slideshow-previous-icon{left:10px;top:45%}.slideshow-next-icon{right:10px;top:45%}.slideshow-close-icon{right:10px;top:10px;font-size:1.4em}.slideshow-download-icon{left:10px;bottom:10px;font-size:1.3em} diff --git a/assets/js/app.min.js b/assets/js/app.min.js index bf0243ed..482e01c0 100644 --- a/assets/js/app.min.js +++ b/assets/js/app.min.js @@ -1,2 +1,2 @@ -!function(){function e(e,a,i){if(!o)throw new Error("textarea-caret-position#getCaretCoordinates should only be called in a browser");var r=i&&i.debug||!1;if(r){var d=document.querySelector("#input-textarea-caret-position-mirror-div");d&&d.parentNode.removeChild(d)}var s=document.createElement("div");s.id="input-textarea-caret-position-mirror-div",document.body.appendChild(s);var l=s.style,c=window.getComputedStyle?getComputedStyle(e):e.currentStyle;l.whiteSpace="pre-wrap","INPUT"!==e.nodeName&&(l.wordWrap="break-word"),l.position="absolute",r||(l.visibility="hidden"),t.forEach(function(e){l[e]=c[e]}),n?e.scrollHeight>parseInt(c.height)&&(l.overflowY="scroll"):l.overflow="hidden",s.textContent=e.value.substring(0,a),"INPUT"===e.nodeName&&(s.textContent=s.textContent.replace(/\s/g," "));var u=document.createElement("span");u.textContent=e.value.substring(a)||".",s.appendChild(u);var m={top:u.offsetTop+parseInt(c.borderTopWidth),left:u.offsetLeft+parseInt(c.borderLeftWidth)};return r?u.style.backgroundColor="#aaa":document.body.removeChild(s),m}var t=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"],o="undefined"!=typeof window,n=o&&null!=window.mozInnerScreenX;"undefined"!=typeof module&&void 0!==module.exports?module.exports=e:o&&(window.getCaretCoordinates=e)}(),function(){function e(){if(!("KeyboardEvent"in window)||"key"in KeyboardEvent.prototype)return!1;var e={get:function(e){var t=o.keys[this.which||this.keyCode];return Array.isArray(t)&&(t=t[+this.shiftKey]),t}};return Object.defineProperty(KeyboardEvent.prototype,"key",e),e}var t,o={polyfill:e,keys:{3:"Cancel",6:"Help",8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",28:"Convert",29:"NonConvert",30:"Accept",31:"ModeChange",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",41:"Select",42:"Print",43:"Execute",44:"PrintScreen",45:"Insert",46:"Delete",48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],91:"OS",93:"ContextMenu",144:"NumLock",145:"ScrollLock",181:"VolumeMute",182:"VolumeDown",183:"VolumeUp",186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"'],224:"Meta",225:"AltGraph",246:"Attn",247:"CrSel",248:"ExSel",249:"EraseEof",250:"Play",251:"ZoomOut"}};for(t=1;t<25;t++)o.keys[111+t]="F"+t;var n="";for(t=65;t<91;t++)n=String.fromCharCode(t),o.keys[t]=[n.toLowerCase(),n.toUpperCase()];o.polyfill()}(),Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),o=t.length;--o>=0&&t.item(o)!==this;);return o>-1});var KB={components:{},utils:{},html:{},http:{},listeners:{clicks:{},changes:{},keys:[],internals:{}}};KB.on=function(e,t){this.listeners.internals.hasOwnProperty(e)||(this.listeners.internals[e]=[]),this.listeners.internals[e].push(t)},KB.trigger=function(e,t){if(this.listeners.internals.hasOwnProperty(e))for(var o=0;o<this.listeners.internals[e].length;o++)this.listeners.internals[e][o](t)},KB.removeListener=function(e,t){if(this.listeners.internals.hasOwnProperty(e))for(var o=0;o<this.listeners.internals[e].length;o++)this.listeners.internals[e][o]===t&&this.listeners.internals[e].splice(o,1)},KB.onClick=function(e,t,o){this.listeners.clicks[e]={callback:t,noPreventDefault:!0===o}},KB.onChange=function(e,t){this.listeners.changes[e]=t},KB.onKey=function(e,t,o,n,a){this.listeners.keys.push({combination:e,callback:t,ignoreInputField:o||!1,ctrlKey:n||!1,metaKey:a||!1})},KB.listen=function(){function e(e){for(var t in n.listeners.clicks)n.listeners.clicks.hasOwnProperty(t)&&e.target.matches(t)&&(n.listeners.clicks[t].noPreventDefault||e.preventDefault(),n.listeners.clicks[t].callback(e))}function t(e){for(var t in n.listeners.changes)n.listeners.changes.hasOwnProperty(t)&&e.target.matches(t)&&n.listeners.changes[t](e.target)}function o(e){var t=KB.utils.getKey(e),o=KB.utils.isInputField(e);if(o&&-1===["Escape","Enter"].indexOf(t)||a.push(t),a.length>0){for(var i=!0,r=0;r<n.listeners.keys.length;r++){var d=n.listeners.keys[r],s=d.combination,l=s.split("+");if(KB.utils.arraysIdentical(a,l)&&e.ctrlKey===d.ctrlKey&&e.metaKey===d.metaKey){if(o&&!d.ignoreInputField)return void(a=[]);e.preventDefault(),e.stopPropagation(),a=[],d.callback(e);break}KB.utils.arraysStartsWith(a,l)&&a.length<l.length&&(i=!1)}i&&(a=[])}}var n=this,a=[];document.addEventListener("click",e,!1),document.addEventListener("change",t,!1),window.addEventListener("keydown",o,!1)},KB.component=function(e,t){this.components[e]=t},KB.getComponent=function(e,t,o){return new(0,this.components[e])(t,o)},KB.render=function(){for(var e in this.components)for(var t=document.querySelectorAll(".js-"+e),o=0;o<t.length;o++)if(this.components.hasOwnProperty(e)){var n;t[o].dataset.params&&(n=JSON.parse(t[o].dataset.params));var a=KB.getComponent(e,t[o],n);a.render(),t[o].className=t[o].className+"-rendered"}},KB.interval=function(e,t){setInterval(t,1e3*e)},KB.dom=function(e){function t(e){var t="string"==typeof e?document.createElement(e):e;this.attr=function(e,o){return null!==o&&void 0!==o?(t.setAttribute(e,o),this):t.getAttribute(e)},this.data=function(e,o){return 1===arguments.length?t.dataset[e]:(t.dataset[e]=o,this)},this.hide=function(){return t.style.display="none",this},this.show=function(){return t.style.display="block",this},this.toggle=function(){return"none"===t.style.display?this.show():this.hide(),this},this.style=function(e,o){return t.style[e]=o,this},this.on=function(e,o,n){return t.addEventListener(e,function(e){n||e.preventDefault(),o(e.target)}),this},this.click=function(e){return this.on("click",e)},this.mouseover=function(e){return this.on("mouseover",e)},this.change=function(e){return this.on("change",e)},this.add=function(e){return t.appendChild(e),this},this.replace=function(e){return t.parentNode.replaceChild(e,t),this},this.html=function(e){return t.innerHTML=e,this},this.text=function(e){return t.appendChild(document.createTextNode(e)),this},this.replaceText=function(e){return t.textContent=e,this},this.addClass=function(e){return t.classList.add(e),this},this.removeClass=function(e){return t.classList.remove(e),this},this.toggleClass=function(e){return t.classList.toggle(e),this},this.hasClass=function(e){return t.classList.contains(e)},this.disable=function(){return t.disabled=!0,this},this.enable=function(){return t.disabled=!1,this},this.remove=function(){return t.parentNode.removeChild(t),this},this.empty=function(){for(;t.firstChild;)t.removeChild(t.firstChild);return this},this.parent=function(e){for(;t&&t!==document;t=t.parentNode)if(t.matches(e))return t;return null},this.find=function(e){return t.querySelector(e)},this.for=function(e,o){for(var n=0;n<o.length;n++){var a=o[n];if("object"!=typeof a)t.appendChild(KB.dom(e).text(a).build());else{var i=KB.dom(e);for(var r in a)a.hasOwnProperty(r)&&r in this&&"function"==typeof this[r]?i[r](a[r]):i.attr(r,a[r]);t.appendChild(i.build())}}return this},this.build=function(){return t}}return new t(e)},KB.find=function(e){var t=document.querySelector(e);return t?KB.dom(t):null},KB.exists=function(e){return!!document.querySelector(e)},KB.focus=function(e){var t=document.querySelector(e);if(t)return t.focus()},KB.html.label=function(e,t){return KB.dom("label").attr("for",t).text(e).build()},KB.html.radio=function(e,t,o){return KB.dom("label").add(KB.dom("input").attr("type","radio").attr("name",t).attr("value",o).build()).text(e).build()},KB.html.radios=function(e){var t=KB.dom("div");for(var o in e)e.hasOwnProperty(o)&&t.add(KB.html.radio(o.label,o.name,o.value))},KB.http.request=function(e,t,o,n){function a(e){var t=e.getResponseHeader("X-Ajax-Redirect"),o=e.getResponseHeader("Location");if("self"===t)window.location.reload();else if(t&&t.indexOf("#")>-1)window.location=t.split("#")[0];else if(t)window.location=t;else if(o)window.location=o;else if("application/json"===e.getResponseHeader("Content-Type"))try{return JSON.parse(e.responseText)}catch(e){}return e.responseText}var i=function(){},r=function(){};this.execute=function(){var d=new XMLHttpRequest;d.open(e,t,!0),d.setRequestHeader("X-Requested-With","XMLHttpRequest");for(var s in o)o.hasOwnProperty(s)&&d.setRequestHeader(s,o[s]);return d.onerror=function(){r()},d.onreadystatechange=function(){if(d.readyState===XMLHttpRequest.DONE){var e=a(d);200===d.status?i(e):r(e)}},d.send(n),this},this.success=function(e){return i=e,this},this.error=function(e){return r=e,this}},KB.http.get=function(e){return new KB.http.request("GET",e).execute()},KB.http.postJson=function(e,t){var o={"Content-Type":"application/json",Accept:"application/json"};return new KB.http.request("POST",e,o,JSON.stringify(t)).execute()},KB.http.postForm=function(e,t){var o=new FormData(t);return new KB.http.request("POST",e,{},o).execute()},KB.http.uploadFile=function(e,t,o,n,a,i,r){var d=new FormData;d.append("files[]",t),d.append("csrf_token",o);var s=new XMLHttpRequest;s.upload.addEventListener("progress",n),s.upload.addEventListener("error",i),s.open("POST",e,!0),s.setRequestHeader("X-Requested-With","XMLHttpRequest"),s.onreadystatechange=function(){s.readyState===XMLHttpRequest.DONE&&(200===s.status?a():void 0!==r&&r(JSON.parse(s.responseText)))},s.send(d)},function(){function e(e){e.target.matches("#modal-overlay")&&(e.stopPropagation(),e.preventDefault(),s())}function t(){KB.trigger("modal.close")}function o(){KB.trigger("modal.loading"),a()}function n(){return document.querySelector("#modal-content form:not(.js-modal-ignore-form)")}function a(){var e=n();if(e){var t=e.getAttribute("action");t&&KB.http.postForm(t,e).success(function(e){KB.trigger("modal.stop"),e?r(e):s()}).error(function(e){KB.trigger("modal.stop"),e.hasOwnProperty("message")&&window.alert(e.message)})}}function i(){var e=KB.find("#modal-content form");e&&e.on("submit",o,!1);var t=document.querySelector("#modal-content input[autofocus]");t&&t.focus(),KB.render(),_KB.datePicker(),_KB.autoComplete(),_KB.tagAutoComplete(),_KB.get("Task").onPopoverOpened(),KB.trigger("modal.afterRender")}function r(e){var t=KB.find("#modal-content");t&&(t.replace(KB.dom("div").attr("id","modal-content").html(e).build()),i())}function d(o,n,a){var r=KB.dom("a").attr("href","#").attr("id","modal-close-button").html('<i class="fa fa-times"></i>').click(t).build(),d=KB.dom("div").attr("id","modal-header").add(r).build(),s=KB.dom("div").attr("id","modal-content").html(o).build(),l=KB.dom("div").attr("id","modal-box").style("width",n).add(d).add(s).build(),c=KB.dom("div").attr("id","modal-overlay").add(l).build();a&&c.addEventListener("click",e,!1),document.body.appendChild(c),i()}function s(){c=!1;var e=KB.find("#modal-overlay");e&&(KB.trigger("modal.beforeDestroy"),e.remove())}function l(e){var t=KB.utils.getViewportSize();if(t.width<700)return"99%";switch(e){case"large":return t.width<1350?"98%":"1350px";case"medium":return t.width<1024?"70%":"1024px"}return t.width<800?"75%":"800px"}var c=!1;KB.on("modal.close",function(){s()}),KB.on("modal.submit",function(){a()}),KB.modal={open:function(e,t,o){KB.trigger("modal.open"),_KB.get("Dropdown").close(),s(),void 0===o&&(o=!0),KB.http.get(e).success(function(e){c=!0,d(e,l(t),o)})},close:function(){s()},isOpen:function(){return c},replace:function(e){KB.http.get(e).success(function(e){r(e)})},getForm:n,submitForm:a}}(),KB.utils.formatDuration=function(e){return e>=86400?Math.round(e/86400)+"d":e>=3600?Math.round(e/3600)+"h":e>=60?Math.round(e/60)+"m":e+"s"},KB.utils.getSelectionPosition=function(e){var t,o;return t=e.value.length<e.selectionStart?e.value.length:e.selectionStart,o=e.selectionStart===e.selectionEnd?t:e.selectionEnd,{selectionStart:t,selectionEnd:o}},KB.utils.arraysIdentical=function(e,t){var o=e.length;if(o!==t.length)return!1;for(;o--;)if(e[o]!==t[o])return!1;return!0},KB.utils.arraysStartsWith=function(e,t){for(var o=Math.min(e.length,t.length),n=0;n<o;n++)if(e[n]!==t[n])return!1;return!0},KB.utils.isInputField=function(e){var t=e.target;return!("INPUT"!==t.tagName&&"SELECT"!==t.tagName&&"TEXTAREA"!==t.tagName&&!t.isContentEditable)},KB.utils.getKey=function(e){var t={Esc:"Escape",Up:"ArrowUp",Down:"ArrowDown",Left:"ArrowLeft",Right:"ArrowRight"};for(var o in t)if(t.hasOwnProperty(o)&&o===e.key)return t[o];return e.key},KB.utils.getViewportSize=function(){return{width:Math.max(document.documentElement.clientWidth,window.innerWidth||0),height:Math.max(document.documentElement.clientHeight,window.innerHeight||0)}},KB.utils.isVisible=function(){var e="";return void 0!==document.hidden?e="visibilityState":void 0!==document.mozHidden?e="mozVisibilityState":void 0!==document.msHidden?e="msVisibilityState":void 0!==document.webkitHidden&&(e="webkitVisibilityState"),""===e||"visible"===document[e]},KB.onClick(".accordion-toggle",function(e){var t=KB.dom(e.target).parent(".accordion-section");t&&KB.dom(t).toggleClass("accordion-collapsed")}),KB.onClick(".js-autocomplete-email",function(e){var t=e.target.dataset.email,o=document.querySelector('.js-mail-form input[name="emails"]');t&&o&&(""!==o.value?o.value+=", "+t:o.value=t,_KB.controllers.Dropdown.close())}),KB.onClick(".js-autocomplete-subject",function(e){var t=KB.dom(e.target).data("subject"),o=KB.find('.js-mail-form input[name="subject"]');t&&o&&(o.build().value=t),_KB.controllers.Dropdown.close()}),function(){function e(e){if(!KB.dom(e.target).parent("a, .task-board-change-assignee")){var t=KB.dom(e.target).parent(".task-board");if(t){var o=KB.dom(t).data("taskUrl");o&&(window.location=o)}}}function t(e){var t=KB.dom(e.target).parent(".task-board-change-assignee"),o=KB.dom(t).data("url");o&&KB.modal.open(o,"medium",!1)}KB.onClick(".task-board *",e,!0),KB.onClick(".task-board-change-assignee *",t,!0)}(),KB.component("chart-project-avg-time-column",function(e,t){this.render=function(){var o=t.metrics,n=[t.label],a=[];for(var i in o)n.push(o[i].average),a.push(o[i].title);KB.dom(e).add(KB.dom("div").attr("id","chart").build()),c3.generate({data:{columns:[n],type:"bar"},bar:{width:{ratio:.5}},axis:{x:{type:"category",categories:a},y:{tick:{format:KB.utils.formatDuration}}},legend:{show:!1}})}}),KB.component("chart-project-burndown",function(e,t){this.render=function(){for(var o=t.metrics,n=[[t.labelTotal]],a=[],i=d3.time.format("%Y-%m-%d"),r=d3.time.format(t.dateFormat),d=0;d<o.length;d++)for(var s=0;s<o[d].length;s++){var l=o[d][s];0===d?s>0&&n.push([l]):s>0?(n[s].push(l),void 0===n[0][d]&&n[0].push(0),n[0][d]+=l):a.push(r(i.parse(l)))}KB.dom(e).add(KB.dom("div").attr("id","chart").build()),c3.generate({data:{columns:n},axis:{x:{type:"category",categories:a}}})}}),KB.component("chart-project-cumulative-flow",function(e,t){this.render=function(){for(var o=t.metrics,n=[],a=[],i=[],r=d3.time.format("%Y-%m-%d"),d=d3.time.format(t.dateFormat),s=0;s<o.length;s++)for(var l=0;l<o[s].length;l++){var c=o[s][l];0===s?l>0&&(a.push(c),n.push([c])):l>0?n[l-1].push(c):i.push(d(r.parse(c)))}KB.dom(e).add(KB.dom("div").attr("id","chart").build()),c3.generate({data:{columns:n.reverse(),type:"area-spline",groups:[a],order:null},axis:{x:{type:"category",categories:i}}})}}),KB.component("chart-project-lead-cycle-time",function(e,t){this.render=function(){var o=t.metrics,n=[t.labelCycle],a=[t.labelLead],i=[],r={};r[t.labelCycle]="area",r[t.labelLead]="area-spline";var d={};d[t.labelLead]="#afb42b",d[t.labelCycle]="#4e342e";for(var s=0;s<o.length;s++)n.push(parseInt(o[s].avg_cycle_time)),a.push(parseInt(o[s].avg_lead_time)),i.push(o[s].day);KB.dom(e).add(KB.dom("div").attr("id","chart").build()),c3.generate({data:{columns:[a,n],types:r,colors:d},axis:{x:{type:"category",categories:i},y:{tick:{format:KB.utils.formatDuration}}}})}}),KB.component("chart-project-task-distribution",function(e,t){this.render=function(){for(var o=[],n=0;n<t.metrics.length;n++)o.push([t.metrics[n].column_title,t.metrics[n].nb_tasks]);KB.dom(e).add(KB.dom("div").attr("id","chart").build()),c3.generate({data:{columns:o,type:"donut"}})}}),KB.component("chart-project-time-comparison",function(e,t){this.render=function(){var o=[t.labelSpent],n=[t.labelEstimated],a=[];for(var i in t.metrics)o.push(t.metrics[i].time_spent),n.push(t.metrics[i].time_estimated),a.push("open"===i?t.labelOpen:t.labelClosed);KB.dom(e).add(KB.dom("div").attr("id","chart").build()),c3.generate({data:{columns:[o,n],type:"bar"},bar:{width:{ratio:.2}},axis:{x:{type:"category",categories:a}},legend:{show:!0}})}}),KB.component("chart-project-user-distribution",function(e,t){this.render=function(){for(var o=[],n=0;n<t.metrics.length;n++)o.push([t.metrics[n].user,t.metrics[n].nb_tasks]);KB.dom(e).add(KB.dom("div").attr("id","chart").build()),c3.generate({data:{columns:o,type:"donut"}})}}),KB.component("chart-task-time-column",function(e,t){this.render=function(){for(var o=t.metrics,n=[t.label],a=[],i=0;i<o.length;i++)n.push(o[i].time_spent),a.push(o[i].title);KB.dom(e).add(KB.dom("div").attr("id","chart-task-time-column").build()),c3.generate({bindto:"#chart-task-time-column",data:{columns:[n],type:"bar"},bar:{width:{ratio:.5}},axis:{x:{type:"category",categories:a},y:{tick:{format:KB.utils.formatDuration}}},legend:{show:!1}})}}),KB.on("dom.ready",function(){function e(){if(0===window.location.hash.indexOf("#comment-")){var e=KB.find(window.location.hash);if(e){document.querySelectorAll(".comment").forEach(function(e){KB.dom(e).removeClass("comment-highlighted")}),e.addClass("comment-highlighted")}}}window.addEventListener("hashchange",e),e()}),KB.component("confirm-buttons",function(e,t){function o(){r=!0,KB.find("#modal-confirm-button").replace(i()),KB.http.get(t.url)}function n(){KB.trigger("modal.close")}function a(){r=!1,KB.find("#modal-confirm-button").replace(i())}function i(){var e=KB.dom("button").click(o).attr("id","modal-confirm-button").attr("type","button").attr("class","btn btn-red");return r&&e.disable().add(KB.dom("i").attr("class","fa fa-spinner fa-pulse").build()).text(" "),t.tabindex&&e.attr("tabindex",t.tabindex),e.text(t.submitLabel).build()}var r=!1;this.render=function(){KB.on("modal.stop",a),KB.on("modal.close",function(){KB.removeListener("modal.stop",a)});var o=KB.dom("div").attr("class","form-actions").add(i()).text(" "+t.orLabel+" ").add(KB.dom("a").attr("href","#").click(n).text(t.cancelLabel).build()).build();e.appendChild(o)}}),KB.component("external-task-view",function(e,t){this.render=function(){KB.dom(e).html('<div id="external-task-view"><i class="fa fa-spinner fa-2x fa-pulse"></div>'),$.ajax({cache:!1,url:t.url,success:function(t){KB.dom(e).html('<div id="external-task-view">'+t+"</div>")}})}}),KB.component("file-upload",function(e,t){function o(e){if(e.lengthComputable){var t=e.loaded/e.total,o=Math.floor(100*t);KB.find("#file-progress-"+y).attr("value",t),KB.find("#file-percentage-"+y).replaceText("("+o+"%)")}}function n(){var e=KB.dom("div").addClass("file-error").text(t.labelUploadError).build();KB.find("#file-item-"+y).add(e)}function a(e){var t=KB.dom("div").addClass("file-error").text(e.message).build();KB.find("#file-item-"+y).add(t),KB.trigger("modal.stop")}function i(){if(++y<w.length)KB.http.uploadFile(t.url,w[y],t.csrf,o,i,n,a);else{KB.trigger("modal.stop"),KB.trigger("modal.hide");var e=KB.dom("div").addClass("alert").addClass("alert-success").text(t.labelSuccess).build(),d=KB.dom("button").attr("type","button").addClass("btn").addClass("btn-blue").click(r).text(t.labelCloseSuccess).build();KB.dom(B).replace(KB.dom("div").add(e).add(d).build())}}function r(){window.location.reload()}function d(){y=0,m()}function s(){for(var e=0;e<K.files.length;e++)w.push(K.files[e]);p()}function l(){w=[],y=0,K.click()}function c(e){e.stopPropagation(),e.preventDefault()}function u(e){e.stopPropagation(),e.preventDefault();for(var t=0;t<e.dataTransfer.files.length;t++)w.push(e.dataTransfer.files[t]);p()}function m(){w.length>0&&KB.http.uploadFile(t.url,w[y],t.csrf,o,i,n,a)}function p(){w.length>0?(KB.trigger("modal.enable"),KB.dom(B).empty().add(b())):(KB.trigger("modal.disable"),KB.dom(B).empty().add(h()))}function f(){return KB.dom("input").attr("id","file-input-element").attr("type","file").attr("name","files[]").attr("multiple",!0).on("change",s).hide().build()}function h(){var e=KB.dom("a").attr("href","#").text(t.labelChooseFiles).click(l).build();return KB.dom("div").attr("id","file-dropzone-inner").text(t.labelDropzone+" "+t.labelOr+" ").add(e).build()}function g(){var e=KB.dom("div").attr("id","file-dropzone").add(h()).build();return e.ondragover=c,e.ondrop=u,e.ondragover=c,e}function v(e){var o=!1,n=KB.dom("progress").attr("id","file-progress-"+e).attr("value",0).build(),a=KB.dom("span").attr("id","file-percentage-"+e).text("(0%)").build(),i=KB.dom("span").attr("id","file-delete-"+e).html('<a href="#"><i class="fa fa-trash fa-fw"></i></a>').on("click",function(){w.splice(e,1),KB.find("#file-item-"+e).remove(),p()}).build(),r=KB.dom("li").attr("id","file-item-"+e).add(i).add(n).text(" "+w[e].name+" ").add(a);return w[e].size>t.maxSize&&(r.add(KB.dom("div").addClass("file-error").text(t.labelOversize).build()),o=!0),o&&KB.trigger("modal.disable"),r.build()}function b(){for(var e=KB.dom("ul").attr("id","file-list").build(),t=0;t<w.length;t++)e.appendChild(v(t));return e}var K=null,B=null,w=[],y=0;this.render=function(){KB.on("modal.submit",d),KB.on("modal.close",function(){KB.removeListener("modal.submit",d)}),K=f(),B=g(),e.appendChild(K),e.appendChild(B)}}),KB.onClick(".js-form-export",function(e){var t=document.querySelector("#modal-content form"),o=t.querySelector("#form-from"),n=t.querySelector("#form-to");""!==o.value&&""!==n.value&&t.submit()}),KB.component("image-slideshow",function(e,t){function o(e){switch(KB.utils.getKey(e)){case"Escape":s();break;case"ArrowRight":i();break;case"ArrowLeft":r()}}function n(e){e.matches(".slideshow-next-icon")?i():e.matches(".slideshow-previous-icon")?r():e.matches(".slideshow-download-icon")?window.location.href=e.href:s()}function a(e){var t=KB.dom(e).data("imageId");l(t);d()}function i(){s();for(var e=0;e<t.images.length;e++)if(t.images[e].id===m.id){var o=e+1;o>=t.images.length&&(o=0),m=t.images[o];break}d()}function r(){s();for(var e=0;e<t.images.length;e++)if(t.images[e].id===m.id){var o=e-1;o<0&&(o=t.images.length-1),m=t.images[o];break}d()}function d(){var e=KB.dom("div").attr("class","fa fa-window-close slideshow-icon slideshow-close-icon").build(),t=KB.dom("a").attr("class","fa fa-download slideshow-icon slideshow-download-icon").attr("href",c(m,"download")).build(),a=KB.dom("div").attr("class","fa fa-chevron-circle-left slideshow-icon slideshow-previous-icon").build(),i=KB.dom("div").attr("class","fa fa-chevron-circle-right slideshow-icon slideshow-next-icon").build(),r=KB.dom("img").attr("src",c(m,"image")).attr("alt",m.name).attr("title",m.name).style("maxHeight",window.innerHeight-50+"px").build(),d=KB.dom("figcaption").text(m.name).build(),s=KB.dom("figure").add(r).add(d).build(),l=KB.dom("div").addClass("image-slideshow-overlay").add(e).add(t).add(a).add(i).add(s).click(n).build();document.body.appendChild(l),document.addEventListener("keydown",o,!1)}function s(){var e=KB.find(".image-slideshow-overlay");null!==e&&(document.removeEventListener("keydown",o,!1),e.remove())}function l(e){for(var o=0;o<t.images.length;o++)if(t.images[o].id===e)return t.images[o];return null}function c(e,o){var n=new RegExp(t.regex,"g");return t.url[o].replace(n,e.id)}function u(e){return KB.dom("img").attr("src",c(e,"thumbnail")).attr("alt",e.name).attr("title",e.name).data("imageId",e.id).click(a).build()}var m;this.render=function(){m=t.image,e.appendChild(u(m))}}),KB.keyboardShortcuts=function(){function e(e){if(!KB.modal.isOpen()){var t=KB.find(e);null!==t&&(window.location=t.attr("href"))}}function t(){if(KB.modal.isOpen())KB.modal.submitForm();else{var e=$("form");1==e.length?e.submit():e.length>1&&("INPUT"!==document.activeElement.tagName&&"TEXTAREA"!==document.activeElement.tagName||$(document.activeElement).parents("form").submit())}}KB.onKey("?",function(){KB.modal.isOpen()||KB.modal.open(KB.find("body").data("keyboardShortcutUrl"))}),KB.onKey("Escape",function(){KB.exists("#suggest-menu")||(KB.trigger("modal.close"),_KB.get("Dropdown").close())}),KB.onKey("Enter",t,!0,!0),KB.onKey("Enter",t,!0,!1,!0),KB.onKey("b",function(){KB.modal.isOpen()||KB.trigger("board.selector.open")}),KB.exists("#board")&&(KB.onKey("c",function(){KB.modal.isOpen()||_KB.get("BoardHorizontalScrolling").toggle()}),KB.onKey("s",function(){KB.modal.isOpen()||_KB.get("BoardCollapsedMode").toggle()}),KB.onKey("n",function(){KB.modal.isOpen()||KB.modal.open(KB.find("#board").data("taskCreationUrl"),"large",!1)})),KB.exists("#task-view")&&(KB.onKey("e",function(){KB.modal.isOpen()||KB.modal.open(KB.find("#task-view").data("editUrl"),"large",!1)}),KB.onKey("c",function(){KB.modal.isOpen()||KB.modal.open(KB.find("#task-view").data("commentUrl"),"medium",!1)}),KB.onKey("s",function(){KB.modal.isOpen()||KB.modal.open(KB.find("#task-view").data("subtaskUrl"),"medium",!1)}),KB.onKey("l",function(){KB.modal.isOpen()||KB.modal.open(KB.find("#task-view").data("internalLinkUrl"),"medium",!1)})),KB.onKey("f",function(){KB.modal.isOpen()||KB.focus("#form-search")}),KB.onKey("r",function(){if(!KB.modal.isOpen()){var e=$(".filter-reset").data("filter");$("#form-search").val(e),$("form.search").submit()}}),KB.onKey("v+o",function(){e("a.view-overview")}),KB.onKey("v+b",function(){e("a.view-board")}),KB.onKey("v+l",function(){e("a.view-listing")})},function(){function e(e){return"I"===e.target.tagName?e.target.parentNode.getAttribute("href"):e.target.getAttribute("href")}KB.onClick(".js-modal-large",function(t){KB.modal.open(e(t),"large",!1)}),KB.onClick(".js-modal-medium",function(t){KB.modal.isOpen()?KB.modal.replace(e(t)):KB.modal.open(e(t),"medium",!1)}),KB.onClick(".js-modal-small",function(t){KB.modal.open(e(t),"small",!1)}),KB.onClick(".js-modal-confirm",function(t){KB.modal.open(e(t),"small")}),KB.onClick(".js-modal-close",function(){KB.modal.close()}),KB.onClick(".js-modal-replace",function(t){var o=e(t);KB.modal.isOpen()?KB.modal.replace(o):window.location.href=o})}(),KB.onChange(".js-project-creation-select-options",function(e){"0"===e.value?KB.find(".js-project-creation-options").hide():KB.find(".js-project-creation-options").show()}),KB.component("project-select-role",function(e,t){function o(e){d=!0,t.role=e.value,a(),n()}function n(){KB.http.postJson(t.url,{id:t.id,role:t.role}).success(function(){d=!1,s=!0,a()}).error(function(){d=!1,s=!1,l=!0,a()})}function a(){KB.dom(r).remove(),r=i(),e.appendChild(r)}function i(){var e=[],n=KB.dom("div");for(var a in t.roles)if(t.roles.hasOwnProperty(a)){var i={value:a,text:t.roles[a]};t.role===a&&(i.selected="selected"),e.push(i)}return n.add(KB.dom("select").change(o).for("option",e).build()),d?(n.text(" "),n.add(KB.dom("i").attr("class","fa fa-spinner fa-pulse fa-fw").build())):s?(n.text(" "),n.add(KB.dom("i").attr("class","fa fa-check fa-fw icon-fade-out icon-success").build())):l&&(n.text(" "),n.add(KB.dom("i").attr("class","fa fa-check fa-fw icon-fade-out icon-error").build())),n.build()}var r,d=!1,s=!1,l=!1;this.render=function(){r=i(),e.appendChild(r)}}),KB.component("screenshot",function(e){function t(e){d(e.target.result)}function o(e){if(e.clipboardData&&e.clipboardData.items){var o=e.clipboardData.items;if(o)for(var n=0;n<o.length;n++)if(-1!==o[n].type.indexOf("image")){var a=o[n].getAsFile(),i=new FileReader;i.onload=t,i.readAsDataURL(a)}}else setTimeout(r,100)}function n(){a(),window.Clipboard||(s=document.createElement("div"),s.id="screenshot-pastezone",s.contentEditable=!0,s.style.opacity=0,s.style.position="fixed",s.style.top=0,s.style.right=0,s.style.width=0,document.body.insertBefore(s,document.body.firstChild),s.focus(),document.addEventListener("click",i),document.getElementById("screenshot-zone").addEventListener("click",i)),window.addEventListener("paste",o,!1)}function a(){KB.exists("#screenshot-pastezone")&&KB.find("#screenshot-pastezone").remove(),document.removeEventListener("click",i),s=null}function i(){null!==s&&s.focus()}function r(){var e=s.childNodes[0];e&&"IMG"===e.tagName&&d(e.src),s.innerHTML=""}function d(e){var t=new Image;t.src=e,t.onload=function(){var t=e.split("base64,");l.value=t[1]};var o=document.getElementById("screenshot-zone");o.innerHTML="",o.className="screenshot-pasted",o.appendChild(t),a(),n()}var s=null,l=null;KB.on("modal.close",function(){a()}),this.render=function(){l=KB.dom("input").attr("type","hidden").attr("name","screenshot").build(),e.appendChild(l),n()}}),KB.component("select-dropdown-autocomplete",function(e,t){function o(){KB.dom(k).show(),KB.dom(x).hide()}function n(){KB.dom(k).hide(),KB.dom(x).show()}function a(){var e=KB.find("#select-dropdown-menu");if(e){var t=w.getBoundingClientRect();e.style("top",document.body.scrollTop+t.bottom+"px")}}function i(e){switch(KB.utils.getKey(e)){case"Escape":y.value="",b();break;case"ArrowUp":e.preventDefault(),e.stopImmediatePropagation(),p();break;case"ArrowDown":e.preventDefault(),e.stopImmediatePropagation(),f();break;case"Enter":e.preventDefault(),e.stopImmediatePropagation(),u()}}function r(){b(),K()}function d(e){KB.dom(e).hasClass("select-dropdown-menu-item")&&(KB.find(".select-dropdown-menu-item.active").removeClass("active"),KB.dom(e).addClass("active"))}function s(){u()}function l(t){e.contains(t.target)||(y.value="",b())}function c(){null===KB.find("#select-dropdown-menu")?K():b()}function u(){var e=KB.find(".select-dropdown-menu-item.active"),n=e.data("value");C.value=n,y.value=t.items[n],b(),t.redirect?window.location=t.redirect.url.replace(new RegExp(t.redirect.regex,"g"),n):t.replace&&(o(),KB.modal.replace(t.replace.url.replace(new RegExp(t.replace.regex,"g"),n)))}function m(){for(var e=document.querySelectorAll(".select-dropdown-menu-item"),t=0;t<e.length;t++)if(KB.dom(e[t]).hasClass("active")){KB.dom(e[t]).removeClass("active");break}return{items:e,index:t}}function p(){var e=m();e.index>0&&(e.index=e.index-1),KB.dom(e.items[e.index]).addClass("active")}function f(){var e=m();e.index<e.items.length-1&&e.index++,KB.dom(e.items[e.index]).addClass("active")}function h(e){var o=[];for(var n in e)e.hasOwnProperty(n)&&o.push({class:"select-dropdown-menu-item",text:e[n],"data-label":e[n],"data-value":n});return t.sortByKeys?o.sort(function(e,t){var o=e["data-value"].toLowerCase(),n=t["data-value"].toLowerCase();return o<n?-1:o>n?1:0}):o.sort(function(e,t){var o=e["data-label"].toLowerCase(),n=t["data-label"].toLowerCase();return o<n?-1:o>n?1:0}),o}function g(e,o){for(var n=[],a=!1,i=0;i<o.length;i++)if(0===e.length||o[i]["data-label"].toLowerCase().indexOf(e.toLowerCase())>-1){var r=o[i];void 0!==t.defaultValue&&String(t.defaultValue)===r["data-value"]&&(r.class+=" active",a=!0),n.push(r)}return!a&&n.length>0&&(n[0].class+=" active"),n}function v(){var e=g(y.value,h(t.items)),o=w.getBoundingClientRect(),n=document.body.scrollTop||document.documentElement.scrollTop;return 0===e.length?null:KB.dom("ul").attr("id","select-dropdown-menu").style("top",n+o.bottom+"px").style("left",o.left+"px").style("width",o.width+"px").style("maxHeight",window.innerHeight-o.bottom-20+"px").mouseover(d).click(s).for("li",e).build()}function b(){var e=KB.find("#select-dropdown-menu") -;null!==e&&e.remove(),document.removeEventListener("keydown",i,!1),document.removeEventListener("click",l,!1)}function K(){var e=v();null!==e&&document.body.appendChild(e),document.addEventListener("keydown",i,!1),document.addEventListener("click",l,!1)}function B(){return t.defaultValue&&t.defaultValue in t.items?t.items[t.defaultValue]:t.placeholder?t.placeholder:""}var w,y,C,x,k;this.render=function(){KB.on("select.dropdown.loading.start",o),KB.on("select.dropdown.loading.stop",n),KB.on("modal.close",function(){KB.removeListener("select.dropdown.loading.start",o),KB.removeListener("select.dropdown.loading.stop",n)}),x=KB.dom("i").attr("class","fa fa-chevron-down select-dropdown-chevron").click(c).build(),k=KB.dom("span").hide().addClass("select-loading-icon").add(KB.dom("i").attr("class","fa fa-spinner fa-pulse").build()).build(),C=KB.dom("input").attr("type","hidden").attr("name",t.name).attr("value",t.defaultValue||"").build(),y=KB.dom("input").attr("type","text").attr("placeholder",B()).addClass("select-dropdown-input").style("width",e.offsetWidth-30+"px").on("focus",c).on("input",r,!0).build(),w=KB.dom("div").addClass("select-dropdown-input-container").add(C).add(y).add(x).add(k).build(),e.appendChild(w),t.onFocus&&t.onFocus.forEach(function(e){KB.on(e,function(){y.focus()})}),window.addEventListener("scroll",a,!1)}}),KB.interval(60,function(){var e=KB.find("body").data("statusUrl"),t=KB.find("body").data("loginUrl");null===KB.find(".form-login")&&KB.http.get(e).error(function(){window.location=t})}),KB.component("submit-buttons",function(e,t){function o(){u=!0,c(),KB.trigger("modal.submit")}function n(){KB.trigger("modal.close")}function a(){u=!1,c()}function i(){u=!1,m=!0,c()}function r(){u=!1,m=!1,c()}function d(){KB.dom(f).hide()}function s(e){p=e.submitLabel,c()}function l(){var e=KB.dom("button").attr("type","submit").attr("class","btn btn-"+(t.color||"blue"));return KB.modal.isOpen()&&e.click(o),t.tabindex&&e.attr("tabindex",t.tabindex),u&&e.disable().add(KB.dom("i").attr("class","fa fa-spinner fa-pulse").build()).text(" "),m&&e.disable(),e.text(p).build()}function c(){var e=l();KB.dom(h).replace(e),h=e}var u=!1,m=t.disabled||!1,p=t.submitLabel,f=null,h=null;this.render=function(){KB.on("modal.stop",a),KB.on("modal.disable",i),KB.on("modal.enable",r),KB.on("modal.hide",d),KB.on("modal.submit.label",s),KB.on("modal.close",function(){KB.removeListener("modal.stop",a),KB.removeListener("modal.disable",i),KB.removeListener("modal.enable",r),KB.removeListener("modal.hide",d),KB.removeListener("modal.submit.label",s)}),h=l();var o=KB.dom("div").attr("class","form-actions").add(h);KB.modal.isOpen()&&o.text(" "+t.orLabel+" ").add(KB.dom("a").attr("href","#").click(n).text(t.cancelLabel).build()),f=o.build(),e.appendChild(f)}}),KB.on("dom.ready",function(){function e(e,t){var o=$(".subtasks-table").data("save-position-url");$.ajax({cache:!1,url:o,contentType:"application/json",type:"POST",processData:!1,data:JSON.stringify({subtask_id:e,position:t})})}$(".draggable-row-handle").mouseenter(function(){$(this).parent().parent().addClass("draggable-item-hover")}).mouseleave(function(){$(this).parent().parent().removeClass("draggable-item-hover")}),$(".subtasks-table tbody").sortable({forcePlaceholderSize:!0,handle:"td:first i",helper:function(e,t){return t.children().each(function(){$(this).width($(this).width())}),t},stop:function(t,o){var n=o.item;n.removeClass("draggable-item-selected"),e(n.data("subtask-id"),n.index()+1)},start:function(e,t){t.item.addClass("draggable-item-selected")}}).disableSelection()}),KB.on("dom.ready",function(){$(document).on("click",".js-subtask-toggle-status",function(e){var t=$(this),o=t.attr("href");e.preventDefault(),$.ajax({cache:!1,url:o,success:function(e){-1!=o.indexOf("fragment=table")?$(".subtasks-table").replaceWith(e):-1!=o.indexOf("fragment=rows")?$(t).closest(".task-list-subtasks").replaceWith(e):$(t).closest(".subtask-title").replaceWith(e)}})}),$(document).on("click",".js-subtask-toggle-timer",function(e){var t=$(this);e.preventDefault(),$.ajax({cache:!1,url:t.attr("href"),success:function(e){$(t).closest(".subtask-time-tracking").replaceWith(e)}})})}),KB.component("suggest-menu",function(e,t){function o(e){switch(KB.utils.getKey(e)){case"Escape":u();break;case"ArrowUp":e.preventDefault(),e.stopImmediatePropagation(),l();break;case"ArrowDown":e.preventDefault(),e.stopImmediatePropagation(),c();break;case"Enter":e.preventDefault(),e.stopImmediatePropagation(),i()}}function n(){i()}function a(e){KB.dom(e).hasClass("suggest-menu-item")&&(KB.find(".suggest-menu-item.active").removeClass("active"),KB.dom(e).addClass("active"))}function i(){e.focus();var t=KB.find(".suggest-menu-item.active"),o=t.data("value"),n=t.data("trigger"),a=e.value,i=r(e),d=n+o+" ",s=KB.utils.getSelectionPosition(e),l=a.substring(0,s.selectionStart-i.length),c=a.substring(s.selectionEnd),m=l.length+d.length;e.value=l+d+c,e.setSelectionRange(m,m),u()}function r(e){var t=e.value.substring(0,e.selectionEnd).split("\n"),o=t[t.length-1],n=o.split(" ");return n[n.length-1]}function d(){for(var e=["#modal-content form","#modal-content","body"],t=0;t<e.length;t++){var o=document.querySelector(e[t]);if(null!==o)return o}return null}function s(){for(var e=document.querySelectorAll(".suggest-menu-item"),t=0;t<e.length;t++)if(KB.dom(e[t]).hasClass("active")){KB.dom(e[t]).removeClass("active");break}return{items:e,index:t}}function l(){var e=s();e.index>0&&(e.index=e.index-1),KB.dom(e.items[e.index]).addClass("active")}function c(){var e=s();e.index<e.items.length-1&&e.index++,KB.dom(e.items[e.index]).addClass("active")}function u(){var e=KB.find("#suggest-menu");null!==e&&e.remove(),document.removeEventListener("keydown",o,!1)}function m(e){var o=r(e),n=p(o,t.triggers);u(),null!==n&&f(n,o.substring(n.length),t.triggers[n])}function p(e,t){for(var o in t)if(t.hasOwnProperty(o)&&0===e.indexOf(o))return o;return null}function f(e,t,o){if("string"==typeof o){var n=new RegExp("SEARCH_TERM","g"),a=o.replace(n,t);KB.http.get(a).success(function(o){h(e,t,o)})}else h(e,t,o)}function h(e,t,o){o=g(t,o),o.length>0&&b(v(e,o))}function g(e,t){var o=[];if(0===e.length)return t;for(var n=0;n<t.length;n++)0===t[n].value.toLowerCase().indexOf(e.toLowerCase())&&o.push(t[n]);return o}function v(e,t){for(var o=[],n=0;n<t.length;n++){var a="suggest-menu-item";0===n&&(a+=" active"),o.push({class:a,html:t[n].html,"data-value":t[n].value,"data-trigger":e})}return o}function b(t){var i=d(),r=getCaretCoordinates(e,e.selectionEnd),s=r.left+e.offsetLeft-e.scrollLeft,l=r.top+e.offsetTop-e.scrollTop+16;document.addEventListener("keydown",o,!1);var c=KB.dom("ul").attr("id","suggest-menu").click(n).mouseover(a).style("left",s+"px").style("top",l+"px").for("li",t).build();i.appendChild(c)}this.render=function(){e.addEventListener("input",function(){m(this)})}}),KB.component("task-move-position",function(e,t){function o(e){var t=KB.dom(document).find("#"+e);return t?parseInt(t.options[t.selectedIndex].value):null}function n(){var e=o("form-swimlanes");return null===e?t.board[0].id:e}function a(){var e=o("form-columns");return null===e?t.board[0].columns[0].id:e}function i(){var e=o("form-position");return null===e?1:e}function r(){var e=KB.find("input[name=positionChoice]:checked");return e?e.value:"before"}function d(){var e=KB.dom(document).find("#form-columns");KB.dom(e).replace(m());var t=KB.dom(document).find("#form-tasks");KB.dom(t).replace(p())}function s(){var e=KB.dom(document).find("#form-tasks");KB.dom(e).replace(p())}function l(e){KB.trigger("modal.stop"),KB.find("#message-container").replace(KB.dom("div").attr("id","message-container").attr("class","alert alert-error").text(e).build())}function c(){var e=i();"after"===r()&&e++,KB.find("#message-container").replace(KB.dom("div").attr("id","message-container").build()),KB.http.postJson(t.saveUrl,{column_id:a(),swimlane_id:n(),position:e}).error(function(e){e&&l(e.message)})}function u(){var e=[];return t.board.forEach(function(o){var n={value:o.id,text:o.name};o.id==t.task.swimlane_id&&(n.selected=""),e.push(n)}),KB.dom("select").attr("id","form-swimlanes").change(d).for("option",e).build()}function m(){var e=[],o=n();return t.board.forEach(function(n){o===n.id&&n.columns.forEach(function(o){var n={value:o.id,text:o.title};o.id==t.task.column_id&&(n.selected=""),e.push(n)})}),KB.dom("select").attr("id","form-columns").change(s).for("option",e).build()}function p(){var e=[],o=n(),i=a(),r=KB.dom("div").attr("id","form-tasks");return t.board.forEach(function(t){o===t.id&&t.columns.forEach(function(t){i===t.id&&t.tasks.forEach(function(t){e.push({value:t.position,text:"#"+t.id+" - "+t.title})})})}),e.length>0&&r.add(KB.html.label(t.positionLabel,"form-position")).add(KB.dom("select").attr("id","form-position").for("option",e).build()).add(KB.html.radio(t.beforeLabel,"positionChoice","before")).add(KB.html.radio(t.afterLabel,"positionChoice","after")),r.build()}this.render=function(){KB.on("modal.submit",c),KB.on("modal.close",function(){KB.removeListener("modal.submit",c)});var o=KB.dom("div").add(KB.dom("div").attr("id","message-container").build()).add(KB.html.label(t.swimlaneLabel,"form-swimlanes")).add(u()).add(KB.html.label(t.columnLabel,"form-columns")).add(m()).add(p()).build();e.appendChild(o)}}),KB.onClick(".js-template",function(e){var t=KB.dom(e.target).data("template"),o=KB.dom(e.target).data("templateTarget"),n=KB.find(o);n&&(n.build().value=t),_KB.controllers.Dropdown.close()}),KB.component("text-editor",function(e,t){function o(){var e=KB.dom("div").attr("class","text-editor-toolbar").for("a",[{href:"#",html:'<i class="fa fa-pencil-square-o fa-fw"></i> '+t.labelWrite,click:function(){a()}}]).build();return h=KB.dom("div").attr("class","text-editor-preview-area markdown").build(),KB.dom("div").attr("class","text-editor-view-mode").add(e).add(h).hide().build()}function n(){var e=KB.dom("div").attr("class","text-editor-toolbar").for("a",[{href:"#",html:'<i class="fa fa-eye fa-fw"></i> '+t.labelPreview,click:function(){a()}},{href:"#",html:'<i class="fa fa-bold fa-fw"></i>',click:function(){d("**")}},{href:"#",html:'<i class="fa fa-italic fa-fw"></i>',click:function(){d("_")}},{href:"#",html:'<i class="fa fa-strikethrough fa-fw"></i>',click:function(){d("~~")}},{href:"#",html:'<i class="fa fa-quote-right fa-fw"></i>',click:function(){l("> ")}},{href:"#",html:'<i class="fa fa-list-ul fa-fw"></i>',click:function(){l("* ")}},{href:"#",html:'<i class="fa fa-code fa-fw"></i>',click:function(){s("```")}}]).build(),o=KB.dom("textarea");return o.attr("name",t.name),t.tabindex&&o.attr("tabindex",t.tabindex),t.required&&o.attr("required","required"),o.text(t.text),t.placeholder&&o.attr("placeholder",t.placeholder),m=o.build(),t.suggestOptions&&KB.getComponent("suggest-menu",m,t.suggestOptions).render(),KB.dom("div").attr("class","text-editor-write-mode").add(e).add(m).build()}function a(){KB.dom(h).html(marked(m.value,{sanitize:!0})),KB.dom(p).toggle(),KB.dom(f).toggle()}function i(){return m.value.substring(m.selectionStart,m.selectionEnd)}function r(e,t,o,n){return e.substring(0,t)+n+e.substring(o)}function d(e){c(e+i()+e),u(e)}function s(e){c("\n"+e+"\n"+i()+"\n"+e),u(e,2)}function l(e){var t=i();if(-1===t.indexOf("\n"))c("\n"+e+t);else{for(var o=t.split("\n"),n=0;n<o.length;n++)-1===o[n].indexOf(e)&&(o[n]=e+o[n]);c(o.join("\n"))}u(e,1)}function c(e){m.focus();var t=!1,o=KB.utils.getSelectionPosition(m);if(g=o.selectionStart,v=o.selectionEnd,document.queryCommandSupported("insertText")&&(t=document.execCommand("insertText",!1,e)),!t){try{document.execCommand("ms-beginUndoUnit")}catch(e){}m.value=r(m.value,g,v,e);try{document.execCommand("ms-endUndoUnit")}catch(e){}}}function u(e,t){t=t||0;var o=v+e.length+t;m.setSelectionRange(o,o)}var m,p,f,h,g,v;this.render=function(){f=n(),p=o(),e.appendChild(KB.dom("div").attr("class","text-editor").add(p).add(f).build()),t.autofocus&&m.focus()}}),document.addEventListener("DOMContentLoaded",function(){KB.render(),KB.listen(),KB.keyboardShortcuts(),KB.trigger("dom.ready")});var Kanboard={};Kanboard.App=function(){this.controllers={}},Kanboard.App.prototype.get=function(e){return this.controllers[e]},Kanboard.App.prototype.execute=function(){for(var e in Kanboard)if("App"!==e){var t=new Kanboard[e](this);this.controllers[e]=t,"function"==typeof t.execute&&t.execute(),"function"==typeof t.listen&&t.listen(),"function"==typeof t.focus&&t.focus()}this.focus(),this.datePicker(),this.autoComplete(),this.tagAutoComplete()},Kanboard.App.prototype.focus=function(){$(document).on("focus",".auto-select",function(){$(this).select()}),$(document).on("mouseup",".auto-select",function(e){e.preventDefault()})},Kanboard.App.prototype.datePicker=function(){var e=$("body"),t=e.data("js-date-format"),o=e.data("js-time-format"),n=e.data("js-lang");$.datepicker.setDefaults($.datepicker.regional[n]),$.timepicker.setDefaults($.timepicker.regional[n]),$(".form-date").datepicker({showOtherMonths:!0,selectOtherMonths:!0,dateFormat:t,constrainInput:!1}),$(".form-datetime").datetimepicker({dateFormat:t,timeFormat:o,constrainInput:!1})},Kanboard.App.prototype.tagAutoComplete=function(){$(".tag-autocomplete").select2({tags:!0})},Kanboard.App.prototype.autoComplete=function(){$(".autocomplete").each(function(){var e=$(this),t=e.data("dst-field"),o=e.data("dst-extra-fields");""===$("#form-"+t).val()&&e.parent().find("button[type=submit]").attr("disabled","disabled"),e.autocomplete({source:e.data("search-url"),minLength:1,select:function(n,a){if($("input[name="+t+"]").val(a.item.id),o)for(var i=o.split(","),r=0;r<i.length;r++){var d=i[r].trim();$("input[name="+d+"]").val(a.item[d])}e.parent().find("button[type=submit]").removeAttr("disabled")}})})},Kanboard.App.prototype.hasId=function(e){return!!document.getElementById(e)},Kanboard.App.prototype.showLoadingIcon=function(){$("body").append('<span id="app-loading-icon"> <i class="fa fa-spinner fa-spin"></i></span>')},Kanboard.App.prototype.hideLoadingIcon=function(){$("#app-loading-icon").remove()},Kanboard.BoardCollapsedMode=function(e){this.app=e},Kanboard.BoardCollapsedMode.prototype.toggle=function(){var e=this;this.app.showLoadingIcon(),$.ajax({cache:!1,url:$('.filter-display-mode:not([style="display: none;"]) a').attr("href"),success:function(t){$(".filter-display-mode").toggle(),e.app.get("BoardDragAndDrop").refresh(t)}})},Kanboard.BoardColumnView=function(e){this.app=e},Kanboard.BoardColumnView.prototype.execute=function(){this.app.hasId("board")&&this.render()},Kanboard.BoardColumnView.prototype.listen=function(){var e=this;$(document).on("click",".board-toggle-column-view",function(){e.toggle($(this).data("column-id"))})},Kanboard.BoardColumnView.prototype.onBoardRendered=function(){this.render()},Kanboard.BoardColumnView.prototype.render=function(){var e=this;$(".board-column-header").each(function(){var t=$(this).data("column-id");localStorage.getItem("hidden_column_"+t)&&e.hideColumn(t)})},Kanboard.BoardColumnView.prototype.toggle=function(e){localStorage.getItem("hidden_column_"+e)?this.showColumn(e):this.hideColumn(e),this.app.get("BoardDragAndDrop").dragAndDrop()},Kanboard.BoardColumnView.prototype.hideColumn=function(e){$(".board-column-"+e+" .board-column-expanded").hide(),$(".board-column-"+e+" .board-column-collapsed").show(),$(".board-column-header-"+e+" .board-column-expanded").hide(),$(".board-column-header-"+e+" .board-column-collapsed").show(),$(".board-column-header-"+e).each(function(){$(this).removeClass("board-column-compact"),$(this).addClass("board-column-header-collapsed")}),$(".board-column-"+e).each(function(){$(this).addClass("board-column-task-collapsed")}),$(".board-column-"+e+" .board-rotation").each(function(){$(this).css("width",$(".board-column-"+e).height())}),localStorage.setItem("hidden_column_"+e,1)},Kanboard.BoardColumnView.prototype.showColumn=function(e){$(".board-column-"+e+" .board-column-expanded").show(),$(".board-column-"+e+" .board-column-collapsed").hide(),$(".board-column-header-"+e+" .board-column-expanded").show(),$(".board-column-header-"+e+" .board-column-collapsed").hide(),$(".board-column-header-"+e).removeClass("board-column-header-collapsed"),$(".board-column-"+e).removeClass("board-column-task-collapsed"),0==localStorage.getItem("horizontal_scroll")&&$(".board-column-header-"+e).addClass("board-column-compact"),localStorage.removeItem("hidden_column_"+e)},Kanboard.BoardHorizontalScrolling=function(e){this.app=e},Kanboard.BoardHorizontalScrolling.prototype.execute=function(){this.app.hasId("board")&&this.render()},Kanboard.BoardHorizontalScrolling.prototype.listen=function(){var e=this;$(document).on("click",".filter-toggle-scrolling",function(t){t.preventDefault(),e.toggle()})},Kanboard.BoardHorizontalScrolling.prototype.onBoardRendered=function(){this.render()},Kanboard.BoardHorizontalScrolling.prototype.toggle=function(){var e=localStorage.getItem("horizontal_scroll")||1;localStorage.setItem("horizontal_scroll",0==e?1:0),this.render()},Kanboard.BoardHorizontalScrolling.prototype.render=function(){0==localStorage.getItem("horizontal_scroll")?($(".filter-wide").show(),$(".filter-compact").hide(),$("#board-container").addClass("board-container-compact"),$("#board th:not(.board-column-header-collapsed)").addClass("board-column-compact")):($(".filter-wide").hide(),$(".filter-compact").show(),$("#board-container").removeClass("board-container-compact"),$("#board th").removeClass("board-column-compact"))},Kanboard.BoardPolling=function(e){this.app=e},Kanboard.BoardPolling.prototype.execute=function(){if(this.app.hasId("board")){var e=parseInt($("#board").attr("data-check-interval"));e>0&&window.setInterval(this.check.bind(this),1e3*e)}},Kanboard.BoardPolling.prototype.check=function(){if(KB.utils.isVisible()&&!this.app.get("BoardDragAndDrop").savingInProgress){var e=this;this.app.showLoadingIcon(),$.ajax({cache:!1,url:$("#board").data("check-url"),statusCode:{200:function(t){e.app.get("BoardDragAndDrop").refresh(t)},304:function(){e.app.hideLoadingIcon()}}})}},Kanboard.Column=function(e){this.app=e},Kanboard.Column.prototype.listen=function(){this.dragAndDrop()},Kanboard.Column.prototype.dragAndDrop=function(){var e=this;$(".draggable-row-handle").mouseenter(function(){$(this).parent().parent().addClass("draggable-item-hover")}).mouseleave(function(){$(this).parent().parent().removeClass("draggable-item-hover")}),$(".columns-table tbody").sortable({forcePlaceholderSize:!0,handle:"td:first i",helper:function(e,t){return t.children().each(function(){$(this).width($(this).width())}),t},stop:function(t,o){var n=o.item;n.removeClass("draggable-item-selected"),e.savePosition(n.data("column-id"),n.index()+1)},start:function(e,t){t.item.addClass("draggable-item-selected")}}).disableSelection()},Kanboard.Column.prototype.savePosition=function(e,t){var o=$(".columns-table").data("save-position-url"),n=this;this.app.showLoadingIcon(),$.ajax({cache:!1,url:o,contentType:"application/json",type:"POST",processData:!1,data:JSON.stringify({column_id:e,position:t}),complete:function(){n.app.hideLoadingIcon()}})},Kanboard.Dropdown=function(e){this.app=e},Kanboard.Dropdown.prototype.listen=function(){var e=this;$(document).on("click",function(){e.close()}),$(document).on("click",".dropdown-menu",function(t){t.preventDefault(),t.stopImmediatePropagation(),e.close();var o=$(this).next("ul"),n=$(this).offset();$("body").append(jQuery("<div>",{id:"dropdown"})),o.clone().appendTo("#dropdown");var a=$("#dropdown ul");a.addClass("dropdown-submenu-open");var i=a.outerHeight(),r=a.outerWidth();n.top+i-$(window).scrollTop()<$(window).height()||$(window).scrollTop()+n.top<i?a.css("top",n.top+$(this).height()):a.css("top",n.top-i-5),n.left+r>$(window).width()?a.css("left",n.left-r+$(this).outerWidth()):a.css("left",n.left),null!==document.getElementById("dropdown")&&KB.trigger("dropdown.afterRender")}),$(document).on("click",".dropdown-submenu-open li",function(e){if($(e.target).is("li")){KB.trigger("dropdown.clicked");var t=$(this).find("a:visible");t.length>0&&t[0].click()}})},Kanboard.Dropdown.prototype.close=function(){null!==document.getElementById("dropdown")&&KB.trigger("dropdown.beforeDestroy"),$("#dropdown").remove()},Kanboard.Search=function(e){this.app=e},Kanboard.Search.prototype.focus=function(){$(document).on("focus","#form-search",function(){var e=$("#form-search");if(e[0].setSelectionRange){var t=2*e.val().length;e[0].setSelectionRange(t,t)}})},Kanboard.Search.prototype.listen=function(){$(document).on("click",".filter-helper",function(e){e.preventDefault();var t=$(this).data("filter"),o=$(this).data("append-filter"),n=$(this).data("unique-filter"),a=$("#form-search");if(n){var i=n.substr(0,n.indexOf(":"));t=a.val().replace(new RegExp("("+i+":[#a-z0-9]+)","g"),""),t=t.replace(new RegExp("("+i+':"(.+)")',"g"),""),t=t.trim(),t+=" "+n}else o&&(t=a.val()+" "+o);a.val(t),$("form.search").submit()})},Kanboard.Swimlane=function(e){this.app=e},Kanboard.Swimlane.prototype.execute=function(){$(".swimlanes-table").length&&this.dragAndDrop()},Kanboard.Swimlane.prototype.listen=function(){var e=this;$(document).on("click",".board-swimlane-toggle",function(t){t.preventDefault();var o=$(this).data("swimlane-id");e.isCollapsed(o)?e.expand(o):e.collapse(o)})},Kanboard.Swimlane.prototype.onBoardRendered=function(){for(var e=this.getAllCollapsed(),t=0;t<e.length;t++)this.collapse(e[t])},Kanboard.Swimlane.prototype.getStorageKey=function(){return"hidden_swimlanes_"+$("#board").data("project-id")},Kanboard.Swimlane.prototype.expand=function(e){var t=this.getAllCollapsed(),o=t.indexOf(e);o>-1&&t.splice(o,1),localStorage.setItem(this.getStorageKey(),JSON.stringify(t)),$(".board-swimlane-columns-"+e).css("display","table-row"),$(".board-swimlane-tasks-"+e).css("display","table-row"),$(".hide-icon-swimlane-"+e).css("display","inline"),$(".show-icon-swimlane-"+e).css("display","none")},Kanboard.Swimlane.prototype.collapse=function(e){var t=this.getAllCollapsed();t.indexOf(e)<0&&(t.push(e),localStorage.setItem(this.getStorageKey(),JSON.stringify(t))),$(".board-swimlane-columns-"+e+":not(:first-child)").css("display","none"),$(".board-swimlane-tasks-"+e).css("display","none"),$(".hide-icon-swimlane-"+e).css("display","none"),$(".show-icon-swimlane-"+e).css("display","inline")},Kanboard.Swimlane.prototype.isCollapsed=function(e){return this.getAllCollapsed().indexOf(e)>-1},Kanboard.Swimlane.prototype.getAllCollapsed=function(){return JSON.parse(localStorage.getItem(this.getStorageKey()))||[]},Kanboard.Swimlane.prototype.dragAndDrop=function(){var e=this;$(".draggable-row-handle").mouseenter(function(){$(this).parent().parent().addClass("draggable-item-hover")}).mouseleave(function(){$(this).parent().parent().removeClass("draggable-item-hover")}),$(".swimlanes-table tbody").sortable({forcePlaceholderSize:!0,handle:"td:first i",helper:function(e,t){return t.children().each(function(){$(this).width($(this).width())}),t},stop:function(t,o){var n=o.item;n.removeClass("draggable-item-selected"),e.savePosition(n.data("swimlane-id"),n.index()+1)},start:function(e,t){t.item.addClass("draggable-item-selected")}}).disableSelection()},Kanboard.Swimlane.prototype.savePosition=function(e,t){var o=$(".swimlanes-table").data("save-position-url"),n=this;this.app.showLoadingIcon(),$.ajax({cache:!1,url:o,contentType:"application/json",type:"POST",processData:!1,data:JSON.stringify({swimlane_id:e,position:t}),complete:function(){n.app.hideLoadingIcon()}})},Kanboard.Task=function(e){this.app=e},Kanboard.Task.prototype.onPopoverOpened=function(){this.renderColorPicker(),$(document).on("click",".assign-me",function(e){var t=$(this).data("current-id"),o="#"+$(this).data("target-id");e.preventDefault(),$(o+" option[value="+t+"]").length&&$(o).val(t)})},Kanboard.Task.prototype.renderColorPicker=function(){function e(e){return $('<div class="color-picker-option"><div class="color-picker-square color-'+e.id+'"></div><div class="color-picker-label">'+e.text+"</div></div>")}$(".color-picker").select2({minimumResultsForSearch:1/0,templateResult:e,templateSelection:e})},Kanboard.Tooltip=function(e){this.app=e},Kanboard.Tooltip.prototype.onBoardRendered=function(){this.execute()},Kanboard.Tooltip.prototype.execute=function(){$(".tooltip").tooltip({track:!1,show:!1,hide:!1,position:{my:"left-20 top",at:"center bottom+9",using:function(e,t){$(this).css(e);var o=t.target.left+t.target.width/2-t.element.left-20;$("<div>").addClass("tooltip-arrow").addClass(t.vertical).addClass(o<1?"align-left":"align-right").appendTo(this)}},content:function(){var e=this,t=$(this).attr("data-href");return t?($.get(t,function(t){var o=$(".ui-tooltip:visible");$(".ui-tooltip-content:visible").html(t),o.css({top:"",left:""}),o.children(".tooltip-arrow").remove();var n=$(e).tooltip("option","position");n.of=$(e),o.position(n)}),'<i class="fa fa-spinner fa-spin"></i>'):'<div class="markdown">'+$(this).attr("title")+"</div>"}}).on("mouseenter",function(){var e=this;$(this).tooltip("open"),$(".ui-tooltip").on("mouseleave",function(){$(e).tooltip("close")})}).on("mouseleave focusout",function(e){e.stopImmediatePropagation();var t=this;setTimeout(function(){$(".ui-tooltip:hover").length||$(t).tooltip("close")},100)})},Kanboard.BoardDragAndDrop=function(e){this.app=e,this.savingInProgress=!1},Kanboard.BoardDragAndDrop.prototype.execute=function(){this.app.hasId("board")&&(this.executeListeners(),this.dragAndDrop())},Kanboard.BoardDragAndDrop.prototype.dragAndDrop=function(){var e=this,t=$(".board-task-list"),o={forcePlaceholderSize:!0,tolerance:"pointer",connectWith:".sortable-column",placeholder:"draggable-placeholder",items:".draggable-item",stop:function(t,o){var n=o.item,a=n.attr("data-task-id"),i=n.attr("data-position"),r=n.attr("data-column-id"),d=n.attr("data-swimlane-id"),s=n.parent().attr("data-column-id"),l=n.parent().attr("data-swimlane-id"),c=n.index()+1;n.removeClass("draggable-item-selected"),s==r&&l==d&&c==i||(e.changeTaskState(a),e.save(a,r,s,c,l))},start:function(e,t){t.item.addClass("draggable-item-selected"),t.placeholder.height(t.item.height())}};isMobile.any&&($(".task-board-sort-handle").css("display","inline"),o.handle=".task-board-sort-handle"),t.each(function(){$(this).css("min-height",$(this).parent().height())}),t.sortable(o)},Kanboard.BoardDragAndDrop.prototype.changeTaskState=function(e){var t=$("div[data-task-id="+e+"]");t.addClass("task-board-saving-state"),t.find(".task-board-saving-icon").show()},Kanboard.BoardDragAndDrop.prototype.save=function(e,t,o,n,a){var i=this;i.app.showLoadingIcon(),i.savingInProgress=!0,$.ajax({cache:!1,url:$("#board").data("save-url"),contentType:"application/json",type:"POST",processData:!1,data:JSON.stringify({task_id:e,src_column_id:t,dst_column_id:o,swimlane_id:a,position:n}),success:function(e){i.refresh(e),i.savingInProgress=!1},error:function(){i.app.hideLoadingIcon(),i.savingInProgress=!1},statusCode:{403:function(e){window.alert(e.responseJSON.message),document.location.reload(!0)}}})},Kanboard.BoardDragAndDrop.prototype.refresh=function(e){$("#board-container").replaceWith(e),this.app.hideLoadingIcon(),this.executeListeners(),this.dragAndDrop()},Kanboard.BoardDragAndDrop.prototype.executeListeners=function(){for(var e in this.app.controllers){var t=this.app.get(e);"function"==typeof t.onBoardRendered&&t.onBoardRendered()}};var _KB=null;jQuery(document).ready(function(){_KB=new Kanboard.App,_KB.execute()});
\ No newline at end of file +!function(){function e(e,a,i){if(!n)throw new Error("textarea-caret-position#getCaretCoordinates should only be called in a browser");var r=i&&i.debug||!1;if(r){var d=document.querySelector("#input-textarea-caret-position-mirror-div");d&&d.parentNode.removeChild(d)}var s=document.createElement("div");s.id="input-textarea-caret-position-mirror-div",document.body.appendChild(s);var l=s.style,c=window.getComputedStyle?window.getComputedStyle(e):e.currentStyle,u="INPUT"===e.nodeName;l.whiteSpace="pre-wrap",u||(l.wordWrap="break-word"),l.position="absolute",r||(l.visibility="hidden"),t.forEach(function(e){u&&"lineHeight"===e?l.lineHeight=c.height:l[e]=c[e]}),o?e.scrollHeight>parseInt(c.height)&&(l.overflowY="scroll"):l.overflow="hidden",s.textContent=e.value.substring(0,a),u&&(s.textContent=s.textContent.replace(/\s/g," "));var m=document.createElement("span");m.textContent=e.value.substring(a)||".",s.appendChild(m);var p={top:m.offsetTop+parseInt(c.borderTopWidth),left:m.offsetLeft+parseInt(c.borderLeftWidth),height:parseInt(c.lineHeight)};return r?m.style.backgroundColor="#aaa":document.body.removeChild(s),p}var t=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"],n="undefined"!=typeof window,o=n&&null!=window.mozInnerScreenX;"undefined"!=typeof module&&void 0!==module.exports?module.exports=e:n&&(window.getCaretCoordinates=e)}(),function(){function e(){if(!("KeyboardEvent"in window)||"key"in KeyboardEvent.prototype)return!1;var e={get:function(e){var t=n.keys[this.which||this.keyCode];return Array.isArray(t)&&(t=t[+this.shiftKey]),t}};return Object.defineProperty(KeyboardEvent.prototype,"key",e),e}var t,n={polyfill:e,keys:{3:"Cancel",6:"Help",8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",28:"Convert",29:"NonConvert",30:"Accept",31:"ModeChange",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",41:"Select",42:"Print",43:"Execute",44:"PrintScreen",45:"Insert",46:"Delete",48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],91:"OS",93:"ContextMenu",144:"NumLock",145:"ScrollLock",181:"VolumeMute",182:"VolumeDown",183:"VolumeUp",186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"'],224:"Meta",225:"AltGraph",246:"Attn",247:"CrSel",248:"ExSel",249:"EraseEof",250:"Play",251:"ZoomOut"}};for(t=1;t<25;t++)n.keys[111+t]="F"+t;var o="";for(t=65;t<91;t++)o=String.fromCharCode(t),n.keys[t]=[o.toLowerCase(),o.toUpperCase()];n.polyfill()}(),Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),n=t.length;--n>=0&&t.item(n)!==this;);return n>-1});var KB={components:{},utils:{},html:{},http:{},listeners:{clicks:{},changes:{},keys:[],internals:{}}};KB.on=function(e,t){this.listeners.internals.hasOwnProperty(e)||(this.listeners.internals[e]=[]),this.listeners.internals[e].push(t)},KB.trigger=function(e,t){if(this.listeners.internals.hasOwnProperty(e))for(var n=0;n<this.listeners.internals[e].length;n++)this.listeners.internals[e][n](t)},KB.removeListener=function(e,t){if(this.listeners.internals.hasOwnProperty(e))for(var n=0;n<this.listeners.internals[e].length;n++)this.listeners.internals[e][n]===t&&this.listeners.internals[e].splice(n,1)},KB.onClick=function(e,t,n){this.listeners.clicks[e]={callback:t,noPreventDefault:!0===n}},KB.onChange=function(e,t){this.listeners.changes[e]=t},KB.onKey=function(e,t,n,o,a){this.listeners.keys.push({combination:e,callback:t,ignoreInputField:n||!1,ctrlKey:o||!1,metaKey:a||!1})},KB.listen=function(){function e(e){for(var t in o.listeners.clicks)o.listeners.clicks.hasOwnProperty(t)&&e.target.matches(t)&&(o.listeners.clicks[t].noPreventDefault||e.preventDefault(),o.listeners.clicks[t].callback(e))}function t(e){for(var t in o.listeners.changes)o.listeners.changes.hasOwnProperty(t)&&e.target.matches(t)&&o.listeners.changes[t](e.target)}function n(e){var t=KB.utils.getKey(e),n=KB.utils.isInputField(e);if(n&&-1===["Escape","Enter"].indexOf(t)||a.push(t),a.length>0){for(var i=!0,r=0;r<o.listeners.keys.length;r++){var d=o.listeners.keys[r],s=d.combination,l=s.split("+");if(KB.utils.arraysIdentical(a,l)&&e.ctrlKey===d.ctrlKey&&e.metaKey===d.metaKey){if(n&&!d.ignoreInputField)return void(a=[]);e.preventDefault(),e.stopPropagation(),a=[],d.callback(e);break}KB.utils.arraysStartsWith(a,l)&&a.length<l.length&&(i=!1)}i&&(a=[])}}var o=this,a=[];document.addEventListener("click",e,!1),document.addEventListener("change",t,!1),window.addEventListener("keydown",n,!1)},KB.component=function(e,t){this.components[e]=t},KB.getComponent=function(e,t,n){return new(0,this.components[e])(t,n)},KB.render=function(){for(var e in this.components)for(var t=document.querySelectorAll(".js-"+e),n=0;n<t.length;n++)if(this.components.hasOwnProperty(e)){var o;t[n].dataset.params&&(o=JSON.parse(t[n].dataset.params));var a=KB.getComponent(e,t[n],o);a.render(),t[n].className=t[n].className+"-rendered"}},KB.interval=function(e,t){setInterval(t,1e3*e)},KB.dom=function(e){function t(e){var t="string"==typeof e?document.createElement(e):e;this.attr=function(e,n){return null!==n&&void 0!==n?(t.setAttribute(e,n),this):t.getAttribute(e)},this.data=function(e,n){return 1===arguments.length?t.dataset[e]:(t.dataset[e]=n,this)},this.hide=function(){return t.style.display="none",this},this.show=function(){return t.style.display="block",this},this.toggle=function(){return"none"===t.style.display?this.show():this.hide(),this},this.style=function(e,n){return t.style[e]=n,this},this.on=function(e,n,o){return t.addEventListener(e,function(e){o||e.preventDefault(),n(e.target)}),this},this.click=function(e){return this.on("click",e)},this.mouseover=function(e){return this.on("mouseover",e)},this.change=function(e){return this.on("change",e)},this.add=function(e){return t.appendChild(e),this},this.replace=function(e){return t.parentNode.replaceChild(e,t),this},this.html=function(e){return t.innerHTML=e,this},this.text=function(e){return t.appendChild(document.createTextNode(e)),this},this.replaceText=function(e){return t.textContent=e,this},this.addClass=function(e){return t.classList.add(e),this},this.removeClass=function(e){return t.classList.remove(e),this},this.toggleClass=function(e){return t.classList.toggle(e),this},this.hasClass=function(e){return t.classList.contains(e)},this.disable=function(){return t.disabled=!0,this},this.enable=function(){return t.disabled=!1,this},this.remove=function(){return t.parentNode.removeChild(t),this},this.empty=function(){for(;t.firstChild;)t.removeChild(t.firstChild);return this},this.parent=function(e){for(;t&&t!==document;t=t.parentNode)if(t.matches(e))return t;return null},this.find=function(e){return t.querySelector(e)},this.for=function(e,n){for(var o=0;o<n.length;o++){var a=n[o];if("object"!=typeof a)t.appendChild(KB.dom(e).text(a).build());else{var i=KB.dom(e);for(var r in a)a.hasOwnProperty(r)&&r in this&&"function"==typeof this[r]?i[r](a[r]):i.attr(r,a[r]);t.appendChild(i.build())}}return this},this.build=function(){return t}}return new t(e)},KB.find=function(e){var t=document.querySelector(e);return t?KB.dom(t):null},KB.exists=function(e){return!!document.querySelector(e)},KB.focus=function(e){var t=document.querySelector(e);if(t)return t.focus()},KB.html.label=function(e,t){return KB.dom("label").attr("for",t).text(e).build()},KB.html.radio=function(e,t,n){return KB.dom("label").add(KB.dom("input").attr("type","radio").attr("name",t).attr("value",n).build()).text(e).build()},KB.html.radios=function(e){var t=KB.dom("div");for(var n in e)e.hasOwnProperty(n)&&t.add(KB.html.radio(n.label,n.name,n.value))},KB.http.request=function(e,t,n,o){function a(e){var t=e.getResponseHeader("X-Ajax-Redirect"),n=e.getResponseHeader("Location");if("self"===t)window.location.reload();else if(t&&t.indexOf("#")>-1)window.location=t.split("#")[0];else if(t)window.location=t;else if(n)window.location=n;else if("application/json"===e.getResponseHeader("Content-Type"))try{return JSON.parse(e.responseText)}catch(e){}return e.responseText}var i=function(){},r=function(){};this.execute=function(){var d=new XMLHttpRequest;d.open(e,t,!0),d.setRequestHeader("X-Requested-With","XMLHttpRequest");for(var s in n)n.hasOwnProperty(s)&&d.setRequestHeader(s,n[s]);return d.onerror=function(){r()},d.onreadystatechange=function(){if(d.readyState===XMLHttpRequest.DONE){var e=a(d);200===d.status?i(e):r(e)}},d.send(o),this},this.success=function(e){return i=e,this},this.error=function(e){return r=e,this}},KB.http.get=function(e){return new KB.http.request("GET",e).execute()},KB.http.postJson=function(e,t){var n={"Content-Type":"application/json",Accept:"application/json"};return new KB.http.request("POST",e,n,JSON.stringify(t)).execute()},KB.http.postForm=function(e,t){var n=new FormData(t);return new KB.http.request("POST",e,{},n).execute()},KB.http.uploadFile=function(e,t,n,o,a,i,r){var d=new FormData;d.append("files[]",t),d.append("csrf_token",n);var s=new XMLHttpRequest;s.upload.addEventListener("progress",o),s.upload.addEventListener("error",i),s.open("POST",e,!0),s.setRequestHeader("X-Requested-With","XMLHttpRequest"),s.onreadystatechange=function(){s.readyState===XMLHttpRequest.DONE&&(200===s.status?a():void 0!==r&&r(JSON.parse(s.responseText)))},s.send(d)},function(){function e(e){e.target.matches("#modal-overlay")&&(e.stopPropagation(),e.preventDefault(),s())}function t(){KB.trigger("modal.close")}function n(){KB.trigger("modal.loading"),a()}function o(){return document.querySelector("#modal-content form:not(.js-modal-ignore-form)")}function a(){var e=o();if(e){var t=e.getAttribute("action");t&&KB.http.postForm(t,e).success(function(e){KB.trigger("modal.stop"),e?r(e):s()}).error(function(e){KB.trigger("modal.stop"),e.hasOwnProperty("message")&&window.alert(e.message)})}}function i(){var e=KB.find("#modal-content form");e&&e.on("submit",n,!1);var t=document.querySelector("#modal-content input[autofocus]");t&&t.focus(),KB.render(),_KB.datePicker(),_KB.autoComplete(),_KB.tagAutoComplete(),_KB.get("Task").onPopoverOpened(),KB.trigger("modal.afterRender")}function r(e){var t=KB.find("#modal-content");t&&(t.replace(KB.dom("div").attr("id","modal-content").html(e).build()),i())}function d(n,o,a){var r=KB.dom("a").attr("href","#").attr("id","modal-close-button").html('<i class="fa fa-times"></i>').click(t).build(),d=KB.dom("div").attr("id","modal-header").add(r).build(),s=KB.dom("div").attr("id","modal-content").html(n).build(),l=KB.dom("div").attr("id","modal-box").style("width",o).add(d).add(s).build(),c=KB.dom("div").attr("id","modal-overlay").add(l).build();a&&c.addEventListener("click",e,!1),document.body.appendChild(c),i()}function s(){c=!1;var e=KB.find("#modal-overlay");e&&(KB.trigger("modal.beforeDestroy"),e.remove())}function l(e){var t=KB.utils.getViewportSize();if(t.width<700)return"99%";switch(e){case"large":return t.width<1350?"98%":"1350px";case"medium":return t.width<1024?"70%":"1024px"}return t.width<800?"75%":"800px"}var c=!1;KB.on("modal.close",function(){s()}),KB.on("modal.submit",function(){a()}),KB.modal={open:function(e,t,n){KB.trigger("modal.open"),_KB.get("Dropdown").close(),s(),void 0===n&&(n=!0),KB.http.get(e).success(function(e){c=!0,d(e,l(t),n)})},close:function(){s()},isOpen:function(){return c},replace:function(e){KB.http.get(e).success(function(e){r(e)})},getForm:o,submitForm:a}}(),KB.tooltip=function(){function e(e){r()||n(e.target)}function t(){setTimeout(i,500)}function n(e){var t=e.querySelector("script");if(t)return void a(e,t.innerHTML);var n=e.dataset.href;n&&o(n,function(t){t&&a(e,t)})}function o(e,t){var n=new XMLHttpRequest;n.open("GET",e,!0),n.setRequestHeader("X-Requested-With","XMLHttpRequest"),n.onreadystatechange=function(){n.readyState===XMLHttpRequest.DONE&&200===n.status&&t(n.responseText)},n.send(null)}function a(e,n){var o=document.createElement("div");o.id="tooltip-container",o.innerHTML=n,o.addEventListener("mouseleave",t,!1);var a=e.getBoundingClientRect(),r=a.top+window.scrollY+a.height;if(o.style.top=r+"px",a.left>window.innerWidth-600){var d=window.innerWidth-a.right-window.scrollX;o.style.right=d+"px"}else{var s=a.left+window.scrollX;o.style.left=s+"px"}document.body.appendChild(o),document.body.onclick=function(e){o.contains(e.target)||i()}}function i(){var e=document.getElementById("tooltip-container");e&&e.parentNode.removeChild(e)}function r(){return!!document.getElementById("tooltip-container")}for(var d=document.querySelectorAll(".tooltip"),s=0;s<d.length;s++)d[s].addEventListener("mouseenter",e,!1)},KB.utils.formatDuration=function(e){return e>=86400?Math.round(e/86400)+"d":e>=3600?Math.round(e/3600)+"h":e>=60?Math.round(e/60)+"m":e+"s"},KB.utils.getSelectionPosition=function(e){var t,n;return t=e.value.length<e.selectionStart?e.value.length:e.selectionStart,n=e.selectionStart===e.selectionEnd?t:e.selectionEnd,{selectionStart:t,selectionEnd:n}},KB.utils.arraysIdentical=function(e,t){var n=e.length;if(n!==t.length)return!1;for(;n--;)if(e[n]!==t[n])return!1;return!0},KB.utils.arraysStartsWith=function(e,t){for(var n=Math.min(e.length,t.length),o=0;o<n;o++)if(e[o]!==t[o])return!1;return!0},KB.utils.isInputField=function(e){var t=e.target;return!("INPUT"!==t.tagName&&"SELECT"!==t.tagName&&"TEXTAREA"!==t.tagName&&!t.isContentEditable)},KB.utils.getKey=function(e){var t={Esc:"Escape",Up:"ArrowUp",Down:"ArrowDown",Left:"ArrowLeft",Right:"ArrowRight"};for(var n in t)if(t.hasOwnProperty(n)&&n===e.key)return t[n];return e.key},KB.utils.getViewportSize=function(){return{width:Math.max(document.documentElement.clientWidth,window.innerWidth||0),height:Math.max(document.documentElement.clientHeight,window.innerHeight||0)}},KB.utils.isVisible=function(){var e="";return void 0!==document.hidden?e="visibilityState":void 0!==document.mozHidden?e="mozVisibilityState":void 0!==document.msHidden?e="msVisibilityState":void 0!==document.webkitHidden&&(e="webkitVisibilityState"),""===e||"visible"===document[e]},KB.onClick(".accordion-toggle",function(e){var t=KB.dom(e.target).parent(".accordion-section");t&&KB.dom(t).toggleClass("accordion-collapsed")}),KB.onClick(".js-autocomplete-email",function(e){var t=e.target.dataset.email,n=document.querySelector('.js-mail-form input[name="emails"]');t&&n&&(""!==n.value?n.value+=", "+t:n.value=t,_KB.controllers.Dropdown.close())}),KB.onClick(".js-autocomplete-subject",function(e){var t=KB.dom(e.target).data("subject"),n=KB.find('.js-mail-form input[name="subject"]');t&&n&&(n.build().value=t),_KB.controllers.Dropdown.close()}),function(){function e(e){if(!KB.dom(e.target).parent("a, .task-board-change-assignee")){var t=KB.dom(e.target).parent(".task-board");if(t){var n=KB.dom(t).data("taskUrl");n&&(window.location=n)}}}function t(e){var t=KB.dom(e.target).parent(".task-board-change-assignee"),n=KB.dom(t).data("url");n&&KB.modal.open(n,"medium",!1)}KB.onClick(".task-board *",e,!0),KB.onClick(".task-board-change-assignee *",t,!0)}(),KB.component("chart-project-avg-time-column",function(e,t){this.render=function(){var n=t.metrics,o=[t.label],a=[];for(var i in n)o.push(n[i].average),a.push(n[i].title);KB.dom(e).add(KB.dom("div").attr("id","chart").build()),c3.generate({data:{columns:[o],type:"bar"},bar:{width:{ratio:.5}},axis:{x:{type:"category",categories:a},y:{tick:{format:KB.utils.formatDuration}}},legend:{show:!1}})}}),KB.component("chart-project-burndown",function(e,t){this.render=function(){for(var n=t.metrics,o=[[t.labelTotal]],a=[],i=d3.time.format("%Y-%m-%d"),r=d3.time.format(t.dateFormat),d=0;d<n.length;d++)for(var s=0;s<n[d].length;s++){var l=n[d][s];0===d?s>0&&o.push([l]):s>0?(o[s].push(l),void 0===o[0][d]&&o[0].push(0),o[0][d]+=l):a.push(r(i.parse(l)))}KB.dom(e).add(KB.dom("div").attr("id","chart").build()),c3.generate({data:{columns:o},axis:{x:{type:"category",categories:a}}})}}),KB.component("chart-project-cumulative-flow",function(e,t){this.render=function(){for(var n=t.metrics,o=[],a=[],i=[],r=d3.time.format("%Y-%m-%d"),d=d3.time.format(t.dateFormat),s=0;s<n.length;s++)for(var l=0;l<n[s].length;l++){var c=n[s][l];0===s?l>0&&(a.push(c),o.push([c])):l>0?o[l-1].push(c):i.push(d(r.parse(c)))}KB.dom(e).add(KB.dom("div").attr("id","chart").build()),c3.generate({data:{columns:o.reverse(),type:"area-spline",groups:[a],order:null},axis:{x:{type:"category",categories:i}}})}}),KB.component("chart-project-lead-cycle-time",function(e,t){this.render=function(){var n=t.metrics,o=[t.labelCycle],a=[t.labelLead],i=[],r={};r[t.labelCycle]="area",r[t.labelLead]="area-spline";var d={};d[t.labelLead]="#afb42b",d[t.labelCycle]="#4e342e";for(var s=0;s<n.length;s++)o.push(parseInt(n[s].avg_cycle_time)),a.push(parseInt(n[s].avg_lead_time)),i.push(n[s].day);KB.dom(e).add(KB.dom("div").attr("id","chart").build()),c3.generate({data:{columns:[a,o],types:r,colors:d},axis:{x:{type:"category",categories:i},y:{tick:{format:KB.utils.formatDuration}}}})}}),KB.component("chart-project-task-distribution",function(e,t){this.render=function(){for(var n=[],o=0;o<t.metrics.length;o++)n.push([t.metrics[o].column_title,t.metrics[o].nb_tasks]);KB.dom(e).add(KB.dom("div").attr("id","chart").build()),c3.generate({data:{columns:n,type:"donut"}})}}),KB.component("chart-project-time-comparison",function(e,t){this.render=function(){var n=[t.labelSpent],o=[t.labelEstimated],a=[];for(var i in t.metrics)n.push(t.metrics[i].time_spent),o.push(t.metrics[i].time_estimated),a.push("open"===i?t.labelOpen:t.labelClosed);KB.dom(e).add(KB.dom("div").attr("id","chart").build()),c3.generate({data:{columns:[n,o],type:"bar"},bar:{width:{ratio:.2}},axis:{x:{type:"category",categories:a}},legend:{show:!0}})}}),KB.component("chart-project-user-distribution",function(e,t){this.render=function(){for(var n=[],o=0;o<t.metrics.length;o++)n.push([t.metrics[o].user,t.metrics[o].nb_tasks]);KB.dom(e).add(KB.dom("div").attr("id","chart").build()),c3.generate({data:{columns:n,type:"donut"}})}}),KB.component("chart-task-time-column",function(e,t){this.render=function(){for(var n=t.metrics,o=[t.label],a=[],i=0;i<n.length;i++)o.push(n[i].time_spent),a.push(n[i].title);KB.dom(e).add(KB.dom("div").attr("id","chart-task-time-column").build()),c3.generate({bindto:"#chart-task-time-column",data:{columns:[o],type:"bar"},bar:{width:{ratio:.5}},axis:{x:{type:"category",categories:a},y:{tick:{format:KB.utils.formatDuration}}},legend:{show:!1}})}}),KB.on("dom.ready",function(){function e(){if(0===window.location.hash.indexOf("#comment-")){var e=KB.find(window.location.hash);if(e){document.querySelectorAll(".comment").forEach(function(e){KB.dom(e).removeClass("comment-highlighted")}),e.addClass("comment-highlighted")}}}window.addEventListener("hashchange",e),e()}),KB.component("confirm-buttons",function(e,t){function n(){r=!0,KB.find("#modal-confirm-button").replace(i()),KB.http.get(t.url)}function o(){KB.trigger("modal.close")}function a(){r=!1,KB.find("#modal-confirm-button").replace(i())}function i(){var e=KB.dom("button").click(n).attr("id","modal-confirm-button").attr("type","button").attr("class","btn btn-red");return r&&e.disable().add(KB.dom("i").attr("class","fa fa-spinner fa-pulse").build()).text(" "),t.tabindex&&e.attr("tabindex",t.tabindex),e.text(t.submitLabel).build()}var r=!1;this.render=function(){KB.on("modal.stop",a),KB.on("modal.close",function(){KB.removeListener("modal.stop",a)});var n=KB.dom("div").attr("class","form-actions").add(i()).text(" "+t.orLabel+" ").add(KB.dom("a").attr("href","#").click(o).text(t.cancelLabel).build()).build();e.appendChild(n)}}),KB.component("external-task-view",function(e,t){this.render=function(){KB.dom(e).html('<div id="external-task-view"><i class="fa fa-spinner fa-2x fa-pulse"></div>'),$.ajax({cache:!1,url:t.url,success:function(t){KB.dom(e).html('<div id="external-task-view">'+t+"</div>")}})}}),KB.component("file-upload",function(e,t){function n(e){if(e.lengthComputable){var t=e.loaded/e.total,n=Math.floor(100*t);KB.find("#file-progress-"+y).attr("value",t),KB.find("#file-percentage-"+y).replaceText("("+n+"%)")}}function o(){var e=KB.dom("div").addClass("file-error").text(t.labelUploadError).build();KB.find("#file-item-"+y).add(e)}function a(e){var t=KB.dom("div").addClass("file-error").text(e.message).build();KB.find("#file-item-"+y).add(t),KB.trigger("modal.stop")}function i(){if(++y<w.length)KB.http.uploadFile(t.url,w[y],t.csrf,n,i,o,a);else{KB.trigger("modal.stop"),KB.trigger("modal.hide");var e=KB.dom("div").addClass("alert").addClass("alert-success").text(t.labelSuccess).build(),d=KB.dom("button").attr("type","button").addClass("btn").addClass("btn-blue").click(r).text(t.labelCloseSuccess).build();KB.dom(B).replace(KB.dom("div").add(e).add(d).build())}}function r(){window.location.reload()}function d(){y=0,m()}function s(){for(var e=0;e<K.files.length;e++)w.push(K.files[e]);p()}function l(){w=[],y=0,K.click()}function c(e){e.stopPropagation(),e.preventDefault()}function u(e){e.stopPropagation(),e.preventDefault();for(var t=0;t<e.dataTransfer.files.length;t++)w.push(e.dataTransfer.files[t]);p()}function m(){w.length>0&&KB.http.uploadFile(t.url,w[y],t.csrf,n,i,o,a)}function p(){w.length>0?(KB.trigger("modal.enable"),KB.dom(B).empty().add(b())):(KB.trigger("modal.disable"),KB.dom(B).empty().add(h()))}function f(){return KB.dom("input").attr("id","file-input-element").attr("type","file").attr("name","files[]").attr("multiple",!0).on("change",s).hide().build()}function h(){var e=KB.dom("a").attr("href","#").text(t.labelChooseFiles).click(l).build();return KB.dom("div").attr("id","file-dropzone-inner").text(t.labelDropzone+" "+t.labelOr+" ").add(e).build()}function g(){var e=KB.dom("div").attr("id","file-dropzone").add(h()).build();return e.ondragover=c,e.ondrop=u,e.ondragover=c,e}function v(e){var n=!1,o=KB.dom("progress").attr("id","file-progress-"+e).attr("value",0).build(),a=KB.dom("span").attr("id","file-percentage-"+e).text("(0%)").build(),i=KB.dom("span").attr("id","file-delete-"+e).html('<a href="#"><i class="fa fa-trash fa-fw"></i></a>').on("click",function(){w.splice(e,1),KB.find("#file-item-"+e).remove(),p()}).build(),r=KB.dom("li").attr("id","file-item-"+e).add(i).add(o).text(" "+w[e].name+" ").add(a);return w[e].size>t.maxSize&&(r.add(KB.dom("div").addClass("file-error").text(t.labelOversize).build()),n=!0),n&&KB.trigger("modal.disable"),r.build()}function b(){for(var e=KB.dom("ul").attr("id","file-list").build(),t=0;t<w.length;t++)e.appendChild(v(t));return e}var K=null,B=null,w=[],y=0;this.render=function(){KB.on("modal.submit",d),KB.on("modal.close",function(){KB.removeListener("modal.submit",d)}),K=f(),B=g(),e.appendChild(K),e.appendChild(B)}}),KB.onClick(".js-form-export",function(e){var t=document.querySelector("#modal-content form"),n=t.querySelector("#form-from"),o=t.querySelector("#form-to");""!==n.value&&""!==o.value&&t.submit()}),KB.component("image-slideshow",function(e,t){function n(e){switch(KB.utils.getKey(e)){case"Escape":s();break;case"ArrowRight":i();break;case"ArrowLeft":r()}}function o(e){e.matches(".slideshow-next-icon")?i():e.matches(".slideshow-previous-icon")?r():e.matches(".slideshow-download-icon")?window.location.href=e.href:s()}function a(e){var t=KB.dom(e).data("imageId");l(t);d()}function i(){s();for(var e=0;e<t.images.length;e++)if(t.images[e].id===m.id){var n=e+1;n>=t.images.length&&(n=0),m=t.images[n];break}d()}function r(){s();for(var e=0;e<t.images.length;e++)if(t.images[e].id===m.id){var n=e-1;n<0&&(n=t.images.length-1),m=t.images[n];break}d()}function d(){var e=KB.dom("div").attr("class","fa fa-window-close slideshow-icon slideshow-close-icon").build(),t=KB.dom("a").attr("class","fa fa-download slideshow-icon slideshow-download-icon").attr("href",c(m,"download")).build(),a=KB.dom("div").attr("class","fa fa-chevron-circle-left slideshow-icon slideshow-previous-icon").build(),i=KB.dom("div").attr("class","fa fa-chevron-circle-right slideshow-icon slideshow-next-icon").build(),r=KB.dom("img").attr("src",c(m,"image")).attr("alt",m.name).attr("title",m.name).style("maxHeight",window.innerHeight-50+"px").build(),d=KB.dom("figcaption").text(m.name).build(),s=KB.dom("figure").add(r).add(d).build(),l=KB.dom("div").addClass("image-slideshow-overlay").add(e).add(t).add(a).add(i).add(s).click(o).build();document.body.appendChild(l),document.addEventListener("keydown",n,!1)}function s(){var e=KB.find(".image-slideshow-overlay");null!==e&&(document.removeEventListener("keydown",n,!1),e.remove())}function l(e){for(var n=0;n<t.images.length;n++)if(t.images[n].id===e)return t.images[n];return null}function c(e,n){var o=new RegExp(t.regex,"g");return t.url[n].replace(o,e.id)}function u(e){return KB.dom("img").attr("src",c(e,"thumbnail")).attr("alt",e.name).attr("title",e.name).data("imageId",e.id).click(a).build()}var m;this.render=function(){m=t.image,e.appendChild(u(m))}}),KB.keyboardShortcuts=function(){function e(e){if(!KB.modal.isOpen()){var t=KB.find(e);null!==t&&(window.location=t.attr("href"))}}function t(){if(KB.modal.isOpen())KB.modal.submitForm();else{var e=$("form");1==e.length?e.submit():e.length>1&&("INPUT"!==document.activeElement.tagName&&"TEXTAREA"!==document.activeElement.tagName||$(document.activeElement).parents("form").submit())}}KB.onKey("?",function(){KB.modal.isOpen()||KB.modal.open(KB.find("body").data("keyboardShortcutUrl"))}),KB.onKey("Escape",function(){KB.exists("#suggest-menu")||(KB.trigger("modal.close"),_KB.get("Dropdown").close())}),KB.onKey("Enter",t,!0,!0),KB.onKey("Enter",t,!0,!1,!0),KB.onKey("b",function(){KB.modal.isOpen()||KB.trigger("board.selector.open")}),KB.exists("#board")&&(KB.onKey("c",function(){KB.modal.isOpen()||_KB.get("BoardHorizontalScrolling").toggle()}),KB.onKey("s",function(){KB.modal.isOpen()||_KB.get("BoardCollapsedMode").toggle()}),KB.onKey("n",function(){KB.modal.isOpen()||KB.modal.open(KB.find("#board").data("taskCreationUrl"),"large",!1)})),KB.exists("#task-view")&&(KB.onKey("e",function(){KB.modal.isOpen()||KB.modal.open(KB.find("#task-view").data("editUrl"),"large",!1)}),KB.onKey("c",function(){KB.modal.isOpen()||KB.modal.open(KB.find("#task-view").data("commentUrl"),"medium",!1)}),KB.onKey("s",function(){KB.modal.isOpen()||KB.modal.open(KB.find("#task-view").data("subtaskUrl"),"medium",!1)}),KB.onKey("l",function(){KB.modal.isOpen()||KB.modal.open(KB.find("#task-view").data("internalLinkUrl"),"medium",!1)})),KB.onKey("f",function(){KB.modal.isOpen()||KB.focus("#form-search")}),KB.onKey("r",function(){if(!KB.modal.isOpen()){var e=$(".filter-reset").data("filter");$("#form-search").val(e),$("form.search").submit()}}),KB.onKey("v+o",function(){e("a.view-overview")}),KB.onKey("v+b",function(){e("a.view-board")}),KB.onKey("v+l",function(){e("a.view-listing")})},function(){function e(e){return"I"===e.target.tagName?e.target.parentNode.getAttribute("href"):e.target.getAttribute("href")}KB.onClick(".js-modal-large",function(t){KB.modal.open(e(t),"large",!1)}),KB.onClick(".js-modal-medium",function(t){KB.modal.isOpen()?KB.modal.replace(e(t)):KB.modal.open(e(t),"medium",!1)}),KB.onClick(".js-modal-small",function(t){KB.modal.open(e(t),"small",!1)}),KB.onClick(".js-modal-confirm",function(t){KB.modal.open(e(t),"small")}),KB.onClick(".js-modal-close",function(){KB.modal.close()}),KB.onClick(".js-modal-replace",function(t){var n=e(t);KB.modal.isOpen()?KB.modal.replace(n):window.location.href=n})}(),KB.onChange(".js-project-creation-select-options",function(e){"0"===e.value?KB.find(".js-project-creation-options").hide():KB.find(".js-project-creation-options").show()}),KB.component("project-select-role",function(e,t){function n(e){d=!0,t.role=e.value,a(),o()}function o(){KB.http.postJson(t.url,{id:t.id,role:t.role}).success(function(){d=!1,s=!0,a()}).error(function(){d=!1,s=!1,l=!0,a()})}function a(){KB.dom(r).remove(),r=i(),e.appendChild(r)}function i(){var e=[],o=KB.dom("div");for(var a in t.roles)if(t.roles.hasOwnProperty(a)){var i={value:a,text:t.roles[a]};t.role===a&&(i.selected="selected"),e.push(i)}return o.add(KB.dom("select").change(n).for("option",e).build()),d?(o.text(" "),o.add(KB.dom("i").attr("class","fa fa-spinner fa-pulse fa-fw").build())):s?(o.text(" "),o.add(KB.dom("i").attr("class","fa fa-check fa-fw icon-fade-out icon-success").build())):l&&(o.text(" "),o.add(KB.dom("i").attr("class","fa fa-check fa-fw icon-fade-out icon-error").build())),o.build()}var r,d=!1,s=!1,l=!1;this.render=function(){r=i(),e.appendChild(r)}}),KB.component("screenshot",function(e){function t(e){d(e.target.result)}function n(e){if(e.clipboardData&&e.clipboardData.items){var n=e.clipboardData.items;if(n)for(var o=0;o<n.length;o++)if(-1!==n[o].type.indexOf("image")){var a=n[o].getAsFile(),i=new FileReader;i.onload=t,i.readAsDataURL(a)}}else setTimeout(r,100)}function o(){a(),window.Clipboard||(s=document.createElement("div"),s.id="screenshot-pastezone",s.contentEditable=!0,s.style.opacity=0,s.style.position="fixed",s.style.top=0,s.style.right=0,s.style.width=0,document.body.insertBefore(s,document.body.firstChild),s.focus(),document.addEventListener("click",i),document.getElementById("screenshot-zone").addEventListener("click",i)),window.addEventListener("paste",n,!1)}function a(){KB.exists("#screenshot-pastezone")&&KB.find("#screenshot-pastezone").remove(),document.removeEventListener("click",i),s=null}function i(){null!==s&&s.focus()}function r(){var e=s.childNodes[0];e&&"IMG"===e.tagName&&d(e.src),s.innerHTML=""}function d(e){var t=new Image;t.src=e,t.onload=function(){var t=e.split("base64,");l.value=t[1]};var n=document.getElementById("screenshot-zone");n.innerHTML="",n.className="screenshot-pasted",n.appendChild(t),a(),o()}var s=null,l=null;KB.on("modal.close",function(){a()}),this.render=function(){l=KB.dom("input").attr("type","hidden").attr("name","screenshot").build(),e.appendChild(l),o()}}),KB.component("select-dropdown-autocomplete",function(e,t){function n(){KB.dom(k).show(),KB.dom(x).hide()}function o(){KB.dom(k).hide(),KB.dom(x).show()}function a(){var e=KB.find("#select-dropdown-menu");if(e){var t=w.getBoundingClientRect();e.style("top",document.body.scrollTop+t.bottom+"px")}}function i(e){switch(KB.utils.getKey(e)){case"Escape":y.value="",b();break;case"ArrowUp":e.preventDefault(),e.stopImmediatePropagation(),p();break;case"ArrowDown":e.preventDefault(),e.stopImmediatePropagation(),f();break;case"Enter":e.preventDefault(),e.stopImmediatePropagation(),u()}}function r(){b(),K()}function d(e){KB.dom(e).hasClass("select-dropdown-menu-item")&&(KB.find(".select-dropdown-menu-item.active").removeClass("active"),KB.dom(e).addClass("active"))}function s(){u()}function l(t){e.contains(t.target)||(y.value="",b())}function c(){null===KB.find("#select-dropdown-menu")?K():b()}function u(){var e=KB.find(".select-dropdown-menu-item.active"),o=e.data("value");C.value=o,y.value=t.items[o],b(),t.redirect?window.location=t.redirect.url.replace(new RegExp(t.redirect.regex,"g"),o):t.replace&&(n(),KB.modal.replace(t.replace.url.replace(new RegExp(t.replace.regex,"g"),o)))}function m(){for(var e=document.querySelectorAll(".select-dropdown-menu-item"),t=0;t<e.length;t++)if(KB.dom(e[t]).hasClass("active")){KB.dom(e[t]).removeClass("active");break}return{items:e,index:t}}function p(){var e=m();e.index>0&&(e.index=e.index-1),KB.dom(e.items[e.index]).addClass("active") +}function f(){var e=m();e.index<e.items.length-1&&e.index++,KB.dom(e.items[e.index]).addClass("active")}function h(e){var n=[];for(var o in e)e.hasOwnProperty(o)&&n.push({class:"select-dropdown-menu-item",text:e[o],"data-label":e[o],"data-value":o});return t.sortByKeys?n.sort(function(e,t){var n=e["data-value"].toLowerCase(),o=t["data-value"].toLowerCase();return n<o?-1:n>o?1:0}):n.sort(function(e,t){var n=e["data-label"].toLowerCase(),o=t["data-label"].toLowerCase();return n<o?-1:n>o?1:0}),n}function g(e,n){for(var o=[],a=!1,i=0;i<n.length;i++)if(0===e.length||n[i]["data-label"].toLowerCase().indexOf(e.toLowerCase())>-1){var r=n[i];void 0!==t.defaultValue&&String(t.defaultValue)===r["data-value"]&&(r.class+=" active",a=!0),o.push(r)}return!a&&o.length>0&&(o[0].class+=" active"),o}function v(){var e=g(y.value,h(t.items)),n=w.getBoundingClientRect(),o=document.body.scrollTop||document.documentElement.scrollTop;return 0===e.length?null:KB.dom("ul").attr("id","select-dropdown-menu").style("top",o+n.bottom+"px").style("left",n.left+"px").style("width",n.width+"px").style("maxHeight",window.innerHeight-n.bottom-20+"px").mouseover(d).click(s).for("li",e).build()}function b(){var e=KB.find("#select-dropdown-menu");null!==e&&e.remove(),document.removeEventListener("keydown",i,!1),document.removeEventListener("click",l,!1)}function K(){var e=v();null!==e&&document.body.appendChild(e),document.addEventListener("keydown",i,!1),document.addEventListener("click",l,!1)}function B(){return t.defaultValue&&t.defaultValue in t.items?t.items[t.defaultValue]:t.placeholder?t.placeholder:""}var w,y,C,x,k;this.render=function(){KB.on("select.dropdown.loading.start",n),KB.on("select.dropdown.loading.stop",o),KB.on("modal.close",function(){KB.removeListener("select.dropdown.loading.start",n),KB.removeListener("select.dropdown.loading.stop",o)}),x=KB.dom("i").attr("class","fa fa-chevron-down select-dropdown-chevron").click(c).build(),k=KB.dom("span").hide().addClass("select-loading-icon").add(KB.dom("i").attr("class","fa fa-spinner fa-pulse").build()).build(),C=KB.dom("input").attr("type","hidden").attr("name",t.name).attr("value",t.defaultValue||"").build(),y=KB.dom("input").attr("type","text").attr("placeholder",B()).addClass("select-dropdown-input").style("width",e.offsetWidth-30+"px").on("focus",c).on("input",r,!0).build(),w=KB.dom("div").addClass("select-dropdown-input-container").add(C).add(y).add(x).add(k).build(),e.appendChild(w),t.onFocus&&t.onFocus.forEach(function(e){KB.on(e,function(){y.focus()})}),window.addEventListener("scroll",a,!1)}}),KB.interval(60,function(){var e=KB.find("body").data("statusUrl"),t=KB.find("body").data("loginUrl");null===KB.find(".form-login")&&KB.http.get(e).error(function(){window.location=t})}),KB.component("submit-buttons",function(e,t){function n(){u=!0,c(),KB.trigger("modal.submit")}function o(){KB.trigger("modal.close")}function a(){u=!1,c()}function i(){u=!1,m=!0,c()}function r(){u=!1,m=!1,c()}function d(){KB.dom(f).hide()}function s(e){p=e.submitLabel,c()}function l(){var e=KB.dom("button").attr("type","submit").attr("class","btn btn-"+(t.color||"blue"));return KB.modal.isOpen()&&e.click(n),t.tabindex&&e.attr("tabindex",t.tabindex),u&&e.disable().add(KB.dom("i").attr("class","fa fa-spinner fa-pulse").build()).text(" "),m&&e.disable(),e.text(p).build()}function c(){var e=l();KB.dom(h).replace(e),h=e}var u=!1,m=t.disabled||!1,p=t.submitLabel,f=null,h=null;this.render=function(){KB.on("modal.stop",a),KB.on("modal.disable",i),KB.on("modal.enable",r),KB.on("modal.hide",d),KB.on("modal.submit.label",s),KB.on("modal.close",function(){KB.removeListener("modal.stop",a),KB.removeListener("modal.disable",i),KB.removeListener("modal.enable",r),KB.removeListener("modal.hide",d),KB.removeListener("modal.submit.label",s)}),h=l();var n=KB.dom("div").attr("class","form-actions").add(h);KB.modal.isOpen()&&n.text(" "+t.orLabel+" ").add(KB.dom("a").attr("href","#").click(o).text(t.cancelLabel).build()),f=n.build(),e.appendChild(f)}}),KB.on("dom.ready",function(){function e(e,t){var n=$(".subtasks-table").data("save-position-url");$.ajax({cache:!1,url:n,contentType:"application/json",type:"POST",processData:!1,data:JSON.stringify({subtask_id:e,position:t})})}$(".draggable-row-handle").mouseenter(function(){$(this).parent().parent().addClass("draggable-item-hover")}).mouseleave(function(){$(this).parent().parent().removeClass("draggable-item-hover")}),$(".subtasks-table tbody").sortable({forcePlaceholderSize:!0,handle:"td:first i",helper:function(e,t){return t.children().each(function(){$(this).width($(this).width())}),t},stop:function(t,n){var o=n.item;o.removeClass("draggable-item-selected"),e(o.data("subtask-id"),o.index()+1)},start:function(e,t){t.item.addClass("draggable-item-selected")}}).disableSelection()}),KB.on("dom.ready",function(){$(document).on("click",".js-subtask-toggle-status",function(e){var t=$(this),n=t.attr("href");e.preventDefault(),$.ajax({cache:!1,url:n,success:function(e){-1!=n.indexOf("fragment=table")?$(".subtasks-table").replaceWith(e):-1!=n.indexOf("fragment=rows")?$(t).closest(".task-list-subtasks").replaceWith(e):$(t).closest(".subtask-title").replaceWith(e)}})}),$(document).on("click",".js-subtask-toggle-timer",function(e){var t=$(this);e.preventDefault(),$.ajax({cache:!1,url:t.attr("href"),success:function(e){$(t).closest(".subtask-time-tracking").replaceWith(e)}})})}),KB.component("suggest-menu",function(e,t){function n(e){switch(KB.utils.getKey(e)){case"Escape":u();break;case"ArrowUp":e.preventDefault(),e.stopImmediatePropagation(),l();break;case"ArrowDown":e.preventDefault(),e.stopImmediatePropagation(),c();break;case"Enter":e.preventDefault(),e.stopImmediatePropagation(),i()}}function o(){i()}function a(e){KB.dom(e).hasClass("suggest-menu-item")&&(KB.find(".suggest-menu-item.active").removeClass("active"),KB.dom(e).addClass("active"))}function i(){e.focus();var t=KB.find(".suggest-menu-item.active"),n=t.data("value"),o=t.data("trigger"),a=e.value,i=r(e),d=o+n+" ",s=KB.utils.getSelectionPosition(e),l=a.substring(0,s.selectionStart-i.length),c=a.substring(s.selectionEnd),m=l.length+d.length;e.value=l+d+c,e.setSelectionRange(m,m),u()}function r(e){var t=e.value.substring(0,e.selectionEnd).split("\n"),n=t[t.length-1],o=n.split(" ");return o[o.length-1]}function d(){for(var e=["#modal-content form","#modal-content","body"],t=0;t<e.length;t++){var n=document.querySelector(e[t]);if(null!==n)return n}return null}function s(){for(var e=document.querySelectorAll(".suggest-menu-item"),t=0;t<e.length;t++)if(KB.dom(e[t]).hasClass("active")){KB.dom(e[t]).removeClass("active");break}return{items:e,index:t}}function l(){var e=s();e.index>0&&(e.index=e.index-1),KB.dom(e.items[e.index]).addClass("active")}function c(){var e=s();e.index<e.items.length-1&&e.index++,KB.dom(e.items[e.index]).addClass("active")}function u(){var e=KB.find("#suggest-menu");null!==e&&e.remove(),document.removeEventListener("keydown",n,!1)}function m(e){var n=r(e),o=p(n,t.triggers);u(),null!==o&&f(o,n.substring(o.length),t.triggers[o])}function p(e,t){for(var n in t)if(t.hasOwnProperty(n)&&0===e.indexOf(n))return n;return null}function f(e,t,n){if("string"==typeof n){var o=new RegExp("SEARCH_TERM","g"),a=n.replace(o,t);KB.http.get(a).success(function(n){h(e,t,n)})}else h(e,t,n)}function h(e,t,n){n=g(t,n),n.length>0&&b(v(e,n))}function g(e,t){var n=[];if(0===e.length)return t;for(var o=0;o<t.length;o++)0===t[o].value.toLowerCase().indexOf(e.toLowerCase())&&n.push(t[o]);return n}function v(e,t){for(var n=[],o=0;o<t.length;o++){var a="suggest-menu-item";0===o&&(a+=" active"),n.push({class:a,html:t[o].html,"data-value":t[o].value,"data-trigger":e})}return n}function b(t){var i=d(),r=getCaretCoordinates(e,e.selectionEnd),s=r.left+e.offsetLeft-e.scrollLeft,l=r.top+e.offsetTop-e.scrollTop+16;document.addEventListener("keydown",n,!1);var c=KB.dom("ul").attr("id","suggest-menu").click(o).mouseover(a).style("left",s+"px").style("top",l+"px").for("li",t).build();i.appendChild(c)}this.render=function(){e.addEventListener("input",function(){m(this)})}}),KB.component("task-move-position",function(e,t){function n(e){var t=KB.dom(document).find("#"+e);return t?parseInt(t.options[t.selectedIndex].value):null}function o(){var e=n("form-swimlanes");return null===e?t.board[0].id:e}function a(){var e=n("form-columns");return null===e?t.board[0].columns[0].id:e}function i(){var e=n("form-position");return null===e?1:e}function r(){var e=KB.find("input[name=positionChoice]:checked");return e?e.value:"before"}function d(){var e=KB.dom(document).find("#form-columns");KB.dom(e).replace(m());var t=KB.dom(document).find("#form-tasks");KB.dom(t).replace(p())}function s(){var e=KB.dom(document).find("#form-tasks");KB.dom(e).replace(p())}function l(e){KB.trigger("modal.stop"),KB.find("#message-container").replace(KB.dom("div").attr("id","message-container").attr("class","alert alert-error").text(e).build())}function c(){var e=i();"after"===r()&&e++,KB.find("#message-container").replace(KB.dom("div").attr("id","message-container").build()),KB.http.postJson(t.saveUrl,{column_id:a(),swimlane_id:o(),position:e}).error(function(e){e&&l(e.message)})}function u(){var e=[];return t.board.forEach(function(n){var o={value:n.id,text:n.name};n.id==t.task.swimlane_id&&(o.selected=""),e.push(o)}),KB.dom("select").attr("id","form-swimlanes").change(d).for("option",e).build()}function m(){var e=[],n=o();return t.board.forEach(function(o){n===o.id&&o.columns.forEach(function(n){var o={value:n.id,text:n.title};n.id==t.task.column_id&&(o.selected=""),e.push(o)})}),KB.dom("select").attr("id","form-columns").change(s).for("option",e).build()}function p(){var e=[],n=o(),i=a(),r=KB.dom("div").attr("id","form-tasks");return t.board.forEach(function(t){n===t.id&&t.columns.forEach(function(t){i===t.id&&t.tasks.forEach(function(t){e.push({value:t.position,text:"#"+t.id+" - "+t.title})})})}),e.length>0&&r.add(KB.html.label(t.positionLabel,"form-position")).add(KB.dom("select").attr("id","form-position").for("option",e).build()).add(KB.html.radio(t.beforeLabel,"positionChoice","before")).add(KB.html.radio(t.afterLabel,"positionChoice","after")),r.build()}this.render=function(){KB.on("modal.submit",c),KB.on("modal.close",function(){KB.removeListener("modal.submit",c)});var n=KB.dom("div").add(KB.dom("div").attr("id","message-container").build()).add(KB.html.label(t.swimlaneLabel,"form-swimlanes")).add(u()).add(KB.html.label(t.columnLabel,"form-columns")).add(m()).add(p()).build();e.appendChild(n)}}),KB.onClick(".js-template",function(e){var t=KB.dom(e.target).data("template"),n=KB.dom(e.target).data("templateTarget"),o=KB.find(n);o&&(o.build().value=t),_KB.controllers.Dropdown.close()}),KB.component("text-editor",function(e,t){function n(){var e=KB.dom("div").attr("class","text-editor-toolbar").for("a",[{href:"#",html:'<i class="fa fa-pencil-square-o fa-fw"></i> '+t.labelWrite,click:function(){a()}}]).build();return h=KB.dom("div").attr("class","text-editor-preview-area markdown").build(),KB.dom("div").attr("class","text-editor-view-mode").add(e).add(h).hide().build()}function o(){var e=KB.dom("div").attr("class","text-editor-toolbar").for("a",[{href:"#",html:'<i class="fa fa-eye fa-fw"></i> '+t.labelPreview,click:function(){a()}},{href:"#",html:'<i class="fa fa-bold fa-fw"></i>',click:function(){d("**")}},{href:"#",html:'<i class="fa fa-italic fa-fw"></i>',click:function(){d("_")}},{href:"#",html:'<i class="fa fa-strikethrough fa-fw"></i>',click:function(){d("~~")}},{href:"#",html:'<i class="fa fa-quote-right fa-fw"></i>',click:function(){l("> ")}},{href:"#",html:'<i class="fa fa-list-ul fa-fw"></i>',click:function(){l("* ")}},{href:"#",html:'<i class="fa fa-code fa-fw"></i>',click:function(){s("```")}}]).build(),n=KB.dom("textarea");return n.attr("name",t.name),t.tabindex&&n.attr("tabindex",t.tabindex),t.required&&n.attr("required","required"),n.text(t.text),t.placeholder&&n.attr("placeholder",t.placeholder),m=n.build(),t.suggestOptions&&KB.getComponent("suggest-menu",m,t.suggestOptions).render(),KB.dom("div").attr("class","text-editor-write-mode").add(e).add(m).build()}function a(){KB.dom(h).html(marked(m.value,{sanitize:!0})),KB.dom(p).toggle(),KB.dom(f).toggle()}function i(){return m.value.substring(m.selectionStart,m.selectionEnd)}function r(e,t,n,o){return e.substring(0,t)+o+e.substring(n)}function d(e){c(e+i()+e),u(e)}function s(e){c("\n"+e+"\n"+i()+"\n"+e),u(e,2)}function l(e){var t=i();if(-1===t.indexOf("\n"))c("\n"+e+t);else{for(var n=t.split("\n"),o=0;o<n.length;o++)-1===n[o].indexOf(e)&&(n[o]=e+n[o]);c(n.join("\n"))}u(e,1)}function c(e){m.focus();var t=!1,n=KB.utils.getSelectionPosition(m);if(g=n.selectionStart,v=n.selectionEnd,document.queryCommandSupported("insertText")&&(t=document.execCommand("insertText",!1,e)),!t){try{document.execCommand("ms-beginUndoUnit")}catch(e){}m.value=r(m.value,g,v,e);try{document.execCommand("ms-endUndoUnit")}catch(e){}}}function u(e,t){t=t||0;var n=v+e.length+t;m.setSelectionRange(n,n)}var m,p,f,h,g,v;this.render=function(){f=o(),p=n(),e.appendChild(KB.dom("div").attr("class","text-editor").add(p).add(f).build()),t.autofocus&&m.focus()}}),document.addEventListener("DOMContentLoaded",function(){KB.render(),KB.listen(),KB.keyboardShortcuts(),KB.tooltip(),KB.trigger("dom.ready")});var Kanboard={};Kanboard.App=function(){this.controllers={}},Kanboard.App.prototype.get=function(e){return this.controllers[e]},Kanboard.App.prototype.execute=function(){for(var e in Kanboard)if("App"!==e){var t=new Kanboard[e](this);this.controllers[e]=t,"function"==typeof t.execute&&t.execute(),"function"==typeof t.listen&&t.listen(),"function"==typeof t.focus&&t.focus()}this.focus(),this.datePicker(),this.autoComplete(),this.tagAutoComplete()},Kanboard.App.prototype.focus=function(){$(document).on("focus",".auto-select",function(){$(this).select()}),$(document).on("mouseup",".auto-select",function(e){e.preventDefault()})},Kanboard.App.prototype.datePicker=function(){var e=$("body"),t=e.data("js-date-format"),n=e.data("js-time-format"),o=e.data("js-lang");$.datepicker.setDefaults($.datepicker.regional[o]),$.timepicker.setDefaults($.timepicker.regional[o]),$(".form-date").datepicker({showOtherMonths:!0,selectOtherMonths:!0,dateFormat:t,constrainInput:!1}),$(".form-datetime").datetimepicker({dateFormat:t,timeFormat:n,constrainInput:!1})},Kanboard.App.prototype.tagAutoComplete=function(){$(".tag-autocomplete").select2({tags:!0})},Kanboard.App.prototype.autoComplete=function(){$(".autocomplete").each(function(){var e=$(this),t=e.data("dst-field"),n=e.data("dst-extra-fields");""===$("#form-"+t).val()&&e.parent().find("button[type=submit]").attr("disabled","disabled"),e.autocomplete({source:e.data("search-url"),minLength:1,select:function(o,a){if($("input[name="+t+"]").val(a.item.id),n)for(var i=n.split(","),r=0;r<i.length;r++){var d=i[r].trim();$("input[name="+d+"]").val(a.item[d])}e.parent().find("button[type=submit]").removeAttr("disabled")}})})},Kanboard.App.prototype.hasId=function(e){return!!document.getElementById(e)},Kanboard.App.prototype.showLoadingIcon=function(){$("body").append('<span id="app-loading-icon"> <i class="fa fa-spinner fa-spin"></i></span>')},Kanboard.App.prototype.hideLoadingIcon=function(){$("#app-loading-icon").remove()},Kanboard.BoardCollapsedMode=function(e){this.app=e},Kanboard.BoardCollapsedMode.prototype.toggle=function(){var e=this;this.app.showLoadingIcon(),$.ajax({cache:!1,url:$('.filter-display-mode:not([style="display: none;"]) a').attr("href"),success:function(t){$(".filter-display-mode").toggle(),e.app.get("BoardDragAndDrop").refresh(t)}})},Kanboard.BoardColumnView=function(e){this.app=e},Kanboard.BoardColumnView.prototype.execute=function(){this.app.hasId("board")&&this.render()},Kanboard.BoardColumnView.prototype.listen=function(){var e=this;$(document).on("click",".board-toggle-column-view",function(){e.toggle($(this).data("column-id"))})},Kanboard.BoardColumnView.prototype.onBoardRendered=function(){this.render()},Kanboard.BoardColumnView.prototype.render=function(){var e=this;$(".board-column-header").each(function(){var t=$(this).data("column-id");localStorage.getItem("hidden_column_"+t)&&e.hideColumn(t)})},Kanboard.BoardColumnView.prototype.toggle=function(e){localStorage.getItem("hidden_column_"+e)?this.showColumn(e):this.hideColumn(e),this.app.get("BoardDragAndDrop").dragAndDrop()},Kanboard.BoardColumnView.prototype.hideColumn=function(e){$(".board-column-"+e+" .board-column-expanded").hide(),$(".board-column-"+e+" .board-column-collapsed").show(),$(".board-column-header-"+e+" .board-column-expanded").hide(),$(".board-column-header-"+e+" .board-column-collapsed").show(),$(".board-column-header-"+e).each(function(){$(this).removeClass("board-column-compact"),$(this).addClass("board-column-header-collapsed")}),$(".board-column-"+e).each(function(){$(this).addClass("board-column-task-collapsed")}),$(".board-column-"+e+" .board-rotation").each(function(){$(this).css("width",$(".board-column-"+e).height())}),localStorage.setItem("hidden_column_"+e,1)},Kanboard.BoardColumnView.prototype.showColumn=function(e){$(".board-column-"+e+" .board-column-expanded").show(),$(".board-column-"+e+" .board-column-collapsed").hide(),$(".board-column-header-"+e+" .board-column-expanded").show(),$(".board-column-header-"+e+" .board-column-collapsed").hide(),$(".board-column-header-"+e).removeClass("board-column-header-collapsed"),$(".board-column-"+e).removeClass("board-column-task-collapsed"),0==localStorage.getItem("horizontal_scroll")&&$(".board-column-header-"+e).addClass("board-column-compact"),localStorage.removeItem("hidden_column_"+e)},Kanboard.BoardHorizontalScrolling=function(e){this.app=e},Kanboard.BoardHorizontalScrolling.prototype.execute=function(){this.app.hasId("board")&&this.render()},Kanboard.BoardHorizontalScrolling.prototype.listen=function(){var e=this;$(document).on("click",".filter-toggle-scrolling",function(t){t.preventDefault(),e.toggle()})},Kanboard.BoardHorizontalScrolling.prototype.onBoardRendered=function(){this.render()},Kanboard.BoardHorizontalScrolling.prototype.toggle=function(){var e=localStorage.getItem("horizontal_scroll")||1;localStorage.setItem("horizontal_scroll",0==e?1:0),this.render()},Kanboard.BoardHorizontalScrolling.prototype.render=function(){0==localStorage.getItem("horizontal_scroll")?($(".filter-wide").show(),$(".filter-compact").hide(),$("#board-container").addClass("board-container-compact"),$("#board th:not(.board-column-header-collapsed)").addClass("board-column-compact")):($(".filter-wide").hide(),$(".filter-compact").show(),$("#board-container").removeClass("board-container-compact"),$("#board th").removeClass("board-column-compact"))},Kanboard.BoardPolling=function(e){this.app=e},Kanboard.BoardPolling.prototype.execute=function(){if(this.app.hasId("board")){var e=parseInt($("#board").attr("data-check-interval"));e>0&&window.setInterval(this.check.bind(this),1e3*e)}},Kanboard.BoardPolling.prototype.check=function(){if(KB.utils.isVisible()&&!this.app.get("BoardDragAndDrop").savingInProgress){var e=this;this.app.showLoadingIcon(),$.ajax({cache:!1,url:$("#board").data("check-url"),statusCode:{200:function(t){e.app.get("BoardDragAndDrop").refresh(t)},304:function(){e.app.hideLoadingIcon()}}})}},Kanboard.Column=function(e){this.app=e},Kanboard.Column.prototype.listen=function(){this.dragAndDrop()},Kanboard.Column.prototype.dragAndDrop=function(){var e=this;$(".draggable-row-handle").mouseenter(function(){$(this).parent().parent().addClass("draggable-item-hover")}).mouseleave(function(){$(this).parent().parent().removeClass("draggable-item-hover")}),$(".columns-table tbody").sortable({forcePlaceholderSize:!0,handle:"td:first i",helper:function(e,t){return t.children().each(function(){$(this).width($(this).width())}),t},stop:function(t,n){var o=n.item;o.removeClass("draggable-item-selected"),e.savePosition(o.data("column-id"),o.index()+1)},start:function(e,t){t.item.addClass("draggable-item-selected")}}).disableSelection()},Kanboard.Column.prototype.savePosition=function(e,t){var n=$(".columns-table").data("save-position-url"),o=this;this.app.showLoadingIcon(),$.ajax({cache:!1,url:n,contentType:"application/json",type:"POST",processData:!1,data:JSON.stringify({column_id:e,position:t}),complete:function(){o.app.hideLoadingIcon()}})},Kanboard.Dropdown=function(e){this.app=e},Kanboard.Dropdown.prototype.listen=function(){var e=this;$(document).on("click",function(){e.close()}),$(document).on("click",".dropdown-menu",function(t){t.preventDefault(),t.stopImmediatePropagation(),e.close();var n=$(this).next("ul"),o=$(this).offset();$("body").append(jQuery("<div>",{id:"dropdown"})),n.clone().appendTo("#dropdown");var a=$("#dropdown ul");a.addClass("dropdown-submenu-open");var i=a.outerHeight(),r=a.outerWidth();o.top+i-$(window).scrollTop()<$(window).height()||$(window).scrollTop()+o.top<i?a.css("top",o.top+$(this).height()):a.css("top",o.top-i-5),o.left+r>$(window).width()?a.css("left",o.left-r+$(this).outerWidth()):a.css("left",o.left),null!==document.getElementById("dropdown")&&KB.trigger("dropdown.afterRender")}),$(document).on("click",".dropdown-submenu-open li",function(e){if($(e.target).is("li")){KB.trigger("dropdown.clicked");var t=$(this).find("a:visible");t.length>0&&t[0].click()}})},Kanboard.Dropdown.prototype.close=function(){null!==document.getElementById("dropdown")&&KB.trigger("dropdown.beforeDestroy"),$("#dropdown").remove()},Kanboard.Search=function(e){this.app=e},Kanboard.Search.prototype.focus=function(){$(document).on("focus","#form-search",function(){var e=$("#form-search");if(e[0].setSelectionRange){var t=2*e.val().length;e[0].setSelectionRange(t,t)}})},Kanboard.Search.prototype.listen=function(){$(document).on("click",".filter-helper",function(e){e.preventDefault();var t=$(this).data("filter"),n=$(this).data("append-filter"),o=$(this).data("unique-filter"),a=$("#form-search");if(o){var i=o.substr(0,o.indexOf(":"));t=a.val().replace(new RegExp("("+i+":[#a-z0-9]+)","g"),""),t=t.replace(new RegExp("("+i+':"(.+)")',"g"),""),t=t.trim(),t+=" "+o}else n&&(t=a.val()+" "+n);a.val(t),$("form.search").submit()})},Kanboard.Swimlane=function(e){this.app=e},Kanboard.Swimlane.prototype.execute=function(){$(".swimlanes-table").length&&this.dragAndDrop()},Kanboard.Swimlane.prototype.listen=function(){var e=this;$(document).on("click",".board-swimlane-toggle",function(t){t.preventDefault();var n=$(this).data("swimlane-id");e.isCollapsed(n)?e.expand(n):e.collapse(n)})},Kanboard.Swimlane.prototype.onBoardRendered=function(){for(var e=this.getAllCollapsed(),t=0;t<e.length;t++)this.collapse(e[t])},Kanboard.Swimlane.prototype.getStorageKey=function(){return"hidden_swimlanes_"+$("#board").data("project-id")},Kanboard.Swimlane.prototype.expand=function(e){var t=this.getAllCollapsed(),n=t.indexOf(e);n>-1&&t.splice(n,1),localStorage.setItem(this.getStorageKey(),JSON.stringify(t)),$(".board-swimlane-columns-"+e).css("display","table-row"),$(".board-swimlane-tasks-"+e).css("display","table-row"),$(".hide-icon-swimlane-"+e).css("display","inline"),$(".show-icon-swimlane-"+e).css("display","none")},Kanboard.Swimlane.prototype.collapse=function(e){var t=this.getAllCollapsed();t.indexOf(e)<0&&(t.push(e),localStorage.setItem(this.getStorageKey(),JSON.stringify(t))),$(".board-swimlane-columns-"+e+":not(:first-child)").css("display","none"),$(".board-swimlane-tasks-"+e).css("display","none"),$(".hide-icon-swimlane-"+e).css("display","none"),$(".show-icon-swimlane-"+e).css("display","inline")},Kanboard.Swimlane.prototype.isCollapsed=function(e){return this.getAllCollapsed().indexOf(e)>-1},Kanboard.Swimlane.prototype.getAllCollapsed=function(){return JSON.parse(localStorage.getItem(this.getStorageKey()))||[]},Kanboard.Swimlane.prototype.dragAndDrop=function(){var e=this;$(".draggable-row-handle").mouseenter(function(){$(this).parent().parent().addClass("draggable-item-hover")}).mouseleave(function(){$(this).parent().parent().removeClass("draggable-item-hover")}),$(".swimlanes-table tbody").sortable({forcePlaceholderSize:!0,handle:"td:first i",helper:function(e,t){return t.children().each(function(){$(this).width($(this).width())}),t},stop:function(t,n){var o=n.item;o.removeClass("draggable-item-selected"),e.savePosition(o.data("swimlane-id"),o.index()+1)},start:function(e,t){t.item.addClass("draggable-item-selected")}}).disableSelection()},Kanboard.Swimlane.prototype.savePosition=function(e,t){var n=$(".swimlanes-table").data("save-position-url"),o=this;this.app.showLoadingIcon(),$.ajax({cache:!1,url:n,contentType:"application/json",type:"POST",processData:!1,data:JSON.stringify({swimlane_id:e,position:t}),complete:function(){o.app.hideLoadingIcon()}})},Kanboard.Task=function(e){this.app=e},Kanboard.Task.prototype.onPopoverOpened=function(){this.renderColorPicker(),$(document).on("click",".assign-me",function(e){var t=$(this).data("current-id"),n="#"+$(this).data("target-id");e.preventDefault(),$(n+" option[value="+t+"]").length&&$(n).val(t)})},Kanboard.Task.prototype.renderColorPicker=function(){function e(e){return $('<div class="color-picker-option"><div class="color-picker-square color-'+e.id+'"></div><div class="color-picker-label">'+e.text+"</div></div>")}$(".color-picker").select2({minimumResultsForSearch:1/0,templateResult:e,templateSelection:e})},Kanboard.BoardDragAndDrop=function(e){this.app=e,this.savingInProgress=!1},Kanboard.BoardDragAndDrop.prototype.execute=function(){this.app.hasId("board")&&(this.executeListeners(),this.dragAndDrop())},Kanboard.BoardDragAndDrop.prototype.dragAndDrop=function(){var e=this,t=$(".board-task-list"),n={forcePlaceholderSize:!0,tolerance:"pointer",connectWith:".sortable-column",placeholder:"draggable-placeholder",items:".draggable-item",stop:function(t,n){var o=n.item,a=o.attr("data-task-id"),i=o.attr("data-position"),r=o.attr("data-column-id"),d=o.attr("data-swimlane-id"),s=o.parent().attr("data-column-id"),l=o.parent().attr("data-swimlane-id"),c=o.index()+1;o.removeClass("draggable-item-selected"),s==r&&l==d&&c==i||(e.changeTaskState(a),e.save(a,r,s,c,l))},start:function(e,t){t.item.addClass("draggable-item-selected"),t.placeholder.height(t.item.height())}};isMobile.any&&($(".task-board-sort-handle").css("display","inline"),n.handle=".task-board-sort-handle"),t.each(function(){$(this).css("min-height",$(this).parent().height())}),t.sortable(n)},Kanboard.BoardDragAndDrop.prototype.changeTaskState=function(e){var t=$("div[data-task-id="+e+"]");t.addClass("task-board-saving-state"),t.find(".task-board-saving-icon").show()},Kanboard.BoardDragAndDrop.prototype.save=function(e,t,n,o,a){var i=this;i.app.showLoadingIcon(),i.savingInProgress=!0,$.ajax({cache:!1,url:$("#board").data("save-url"),contentType:"application/json",type:"POST",processData:!1,data:JSON.stringify({task_id:e,src_column_id:t,dst_column_id:n,swimlane_id:a,position:o}),success:function(e){i.refresh(e),i.savingInProgress=!1},error:function(){i.app.hideLoadingIcon(),i.savingInProgress=!1},statusCode:{403:function(e){window.alert(e.responseJSON.message),document.location.reload(!0)}}})},Kanboard.BoardDragAndDrop.prototype.refresh=function(e){$("#board-container").replaceWith(e),this.app.hideLoadingIcon(),this.executeListeners(),this.dragAndDrop(),KB.tooltip()},Kanboard.BoardDragAndDrop.prototype.executeListeners=function(){for(var e in this.app.controllers){var t=this.app.get(e);"function"==typeof t.onBoardRendered&&t.onBoardRendered()}};var _KB=null;jQuery(document).ready(function(){_KB=new Kanboard.App,_KB.execute()});
\ No newline at end of file diff --git a/assets/js/core/bootstrap.js b/assets/js/core/bootstrap.js index 8609155d..afcd95d5 100644 --- a/assets/js/core/bootstrap.js +++ b/assets/js/core/bootstrap.js @@ -3,5 +3,6 @@ document.addEventListener('DOMContentLoaded', function () { KB.render(); KB.listen(); KB.keyboardShortcuts(); + KB.tooltip(); KB.trigger('dom.ready'); }); diff --git a/assets/js/core/tooltip.js b/assets/js/core/tooltip.js new file mode 100644 index 00000000..acb42bbd --- /dev/null +++ b/assets/js/core/tooltip.js @@ -0,0 +1,85 @@ +KB.tooltip = function () { + function onMouseOver(event) { + if (! exists()) { + create(event.target); + } + } + + function onMouseLeaveContainer() { + setTimeout(destroy, 500); + } + + function create(element) { + var contentElement = element.querySelector("script"); + if (contentElement) { + render(element, contentElement.innerHTML); + return; + } + + var link = element.dataset.href; + if (link) { + fetch(link, function (html) { + if (html) { + render(element, html); + } + }); + } + } + + function fetch(url, callback) { + var request = new XMLHttpRequest(); + request.open("GET", url, true); + request.setRequestHeader("X-Requested-With", "XMLHttpRequest"); + request.onreadystatechange = function () { + if (request.readyState === XMLHttpRequest.DONE) { + if (request.status === 200) { + callback(request.responseText); + } + } + }; + request.send(null); + } + + function render(element, html) { + var containerElement = document.createElement("div"); + containerElement.id = "tooltip-container"; + containerElement.innerHTML = html; + containerElement.addEventListener("mouseleave", onMouseLeaveContainer, false); + + var elementRect = element.getBoundingClientRect(); + var top = elementRect.top + window.scrollY + elementRect.height; + containerElement.style.top = top + "px"; + + if (elementRect.left > (window.innerWidth - 600)) { + var right = window.innerWidth - elementRect.right - window.scrollX; + containerElement.style.right = right + "px"; + } else { + var left = elementRect.left + window.scrollX; + containerElement.style.left = left + "px"; + } + + document.body.appendChild(containerElement); + + document.body.onclick = function(event) { + if (! containerElement.contains(event.target)) { + destroy(); + } + }; + } + + function destroy() { + var element = document.getElementById("tooltip-container"); + if (element) { + element.parentNode.removeChild(element); + } + } + + function exists() { + return !!document.getElementById("tooltip-container"); + } + + var elements = document.querySelectorAll(".tooltip"); + for (var i = 0; i < elements.length; i++) { + elements[i].addEventListener("mouseenter", onMouseOver, false); + } +}; diff --git a/assets/js/src/BoardDragAndDrop.js b/assets/js/src/BoardDragAndDrop.js index 77d22b55..eef45a19 100644 --- a/assets/js/src/BoardDragAndDrop.js +++ b/assets/js/src/BoardDragAndDrop.js @@ -103,6 +103,7 @@ Kanboard.BoardDragAndDrop.prototype.refresh = function(data) { this.app.hideLoadingIcon(); this.executeListeners(); this.dragAndDrop(); + KB.tooltip(); }; Kanboard.BoardDragAndDrop.prototype.executeListeners = function() { diff --git a/assets/js/src/Tooltip.js b/assets/js/src/Tooltip.js deleted file mode 100644 index 28e922cc..00000000 --- a/assets/js/src/Tooltip.js +++ /dev/null @@ -1,75 +0,0 @@ -Kanboard.Tooltip = function(app) { - this.app = app; -}; - -Kanboard.Tooltip.prototype.onBoardRendered = function() { - this.execute(); -}; - -Kanboard.Tooltip.prototype.execute = function() { - $(".tooltip").tooltip({ - track: false, - show: false, - hide: false, - position: { - my: 'left-20 top', - at: 'center bottom+9', - using: function(position, feedback) { - - $(this).css(position); - - var arrow_pos = feedback.target.left + feedback.target.width / 2 - feedback.element.left - 20; - - $("<div>") - .addClass("tooltip-arrow") - .addClass(feedback.vertical) - .addClass(arrow_pos < 1 ? "align-left" : "align-right") - .appendTo(this); - } - }, - content: function() { - var _this = this; - var href = $(this).attr('data-href'); - - if (! href) { - return '<div class="markdown">' + $(this).attr("title") + '</div>'; - } - - $.get(href, function setTooltipContent(data) { - var tooltip = $('.ui-tooltip:visible'); - - $('.ui-tooltip-content:visible').html(data); - - // Clear previous position, it interferes with the updated position computation - tooltip.css({ top: '', left: '' }); - - // Remove arrow, it will be added when repositionning - tooltip.children('.tooltip-arrow').remove(); - - // Reposition the tooltip - var position = $(_this).tooltip("option", "position"); - position.of = $(_this); - tooltip.position(position); - }); - - return '<i class="fa fa-spinner fa-spin"></i>'; - } - }) - .on("mouseenter", function() { - var _this = this; - $(this).tooltip("open"); - - $(".ui-tooltip").on("mouseleave", function() { - $(_this).tooltip('close'); - }); - }).on("mouseleave focusout", function(e) { - e.stopImmediatePropagation(); - var _this = this; - - setTimeout(function() { - if (! $(".ui-tooltip:hover").length) { - $(_this).tooltip("close"); - } - }, 100); - }); -}; diff --git a/assets/sass/_tooltip.sass b/assets/sass/_tooltip.sass index 14b91d51..95ea1032 100644 --- a/assets/sass/_tooltip.sass +++ b/assets/sass/_tooltip.sass @@ -1,49 +1,23 @@ @import variables -.tooltip-arrow:after - background: #fff - border: 1px solid #aaaaaa - box-shadow: 0 0 5px #aaa +.tooltip + i.fa + cursor: pointer -div.ui-tooltip - min-width: 200px - max-width: 600px + .fa-info-circle + color: color('light') -.tooltip-arrow - width: 20px - height: 10px - overflow: hidden +#tooltip-container + padding: 5px + background: #fff + border: 1px solid #ddd + border-radius: 4px + box-shadow: 0 6px 12px #aaa position: absolute - &.top - top: -10px - &.bottom - bottom: -10px - &.align-left - left: 10px - &.align-right - right: 10px - &:after - content: "" - position: absolute - width: 14px - height: 14px - -webkit-transform: rotate(45deg) - -ms-transform: rotate(45deg) - transform: rotate(45deg) - &.bottom:after - top: -10px - &.top:after - bottom: -10px - &.align-left:after - left: 0 - &.align-right:after - right: 0 - -.tooltip-large - width: 600px + min-width: 350px -.ui-tooltip-content .markdown p - margin-bottom: 0 + .markdown p + margin-bottom: 0 -.tooltip .fa-info-circle - color: color('light') + .tooltip-large + width: 600px diff --git a/tests/units/Helper/TextHelperTest.php b/tests/units/Helper/TextHelperTest.php index abe921fe..f8c0f845 100644 --- a/tests/units/Helper/TextHelperTest.php +++ b/tests/units/Helper/TextHelperTest.php @@ -102,14 +102,6 @@ class TextHelperTest extends Base $this->assertEquals('<p>Text @admin @notfound</p>', $textHelper->markdown('Text @admin @notfound', true)); } - public function testMarkdownAttribute() - { - $textHelper = new TextHelper($this->container); - $this->assertEquals('<p>Ça marche</p>', $textHelper->markdownAttribute('Ça marche')); - $this->assertEquals('<p>Test with &quot;double quotes&quot;</p>', $textHelper->markdownAttribute('Test with "double quotes"')); - $this->assertEquals('<p>Test with 'single quotes'</p>', $textHelper->markdownAttribute("Test with 'single quotes'")); - } - public function testFormatBytes() { $textHelper = new TextHelper($this->container); |