summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/Controller/Board.php2
-rw-r--r--app/Integration/BitbucketWebhook.php1
-rw-r--r--app/Template/board/edit.php12
-rw-r--r--app/Template/board/edit_column.php13
-rw-r--r--app/Template/board/swimlane.php2
-rw-r--r--app/Template/project/show.php14
-rw-r--r--assets/css/app.css12
-rw-r--r--assets/css/src/form.css4
-rw-r--r--assets/js/app.js18
-rw-r--r--assets/js/src/base.js2
-rw-r--r--assets/js/src/board.js1
11 files changed, 49 insertions, 32 deletions
diff --git a/app/Controller/Board.php b/app/Controller/Board.php
index 758dea1e..e859348e 100644
--- a/app/Controller/Board.php
+++ b/app/Controller/Board.php
@@ -283,7 +283,7 @@ class Board extends Base
if ($valid) {
- if ($this->board->addColumn($project['id'], $data['title'],$data['task_limit'],$data['description'])) {
+ if ($this->board->addColumn($project['id'], $data['title'], $data['task_limit'], $data['description'])) {
$this->session->flash(t('Board updated successfully.'));
$this->response->redirect('?controller=board&action=edit&project_id='.$project['id']);
}
diff --git a/app/Integration/BitbucketWebhook.php b/app/Integration/BitbucketWebhook.php
index 9f82d5c0..ccb89e13 100644
--- a/app/Integration/BitbucketWebhook.php
+++ b/app/Integration/BitbucketWebhook.php
@@ -2,7 +2,6 @@
namespace Integration;
-use Event\GenericEvent;
use Event\TaskEvent;
use Model\Task;
diff --git a/app/Template/board/edit.php b/app/Template/board/edit.php
index 75f2b4f5..b9b1788a 100644
--- a/app/Template/board/edit.php
+++ b/app/Template/board/edit.php
@@ -59,6 +59,12 @@
<?= $this->formLabel(t('Description'), 'description') ?>
<div class="form-tabs">
+ <div class="write-area">
+ <?= $this->formTextarea('description', $values, $errors) ?>
+ </div>
+ <div class="preview-area">
+ <div class="markdown"></div>
+ </div>
<ul class="form-tabs-nav">
<li class="form-tab form-tab-selected">
<i class="fa fa-pencil-square-o fa-fw"></i><a id="markdown-write" href="#"><?= t('Write') ?></a>
@@ -67,12 +73,6 @@
<a id="markdown-preview" href="#"><i class="fa fa-eye fa-fw"></i><?= t('Preview') ?></a>
</li>
</ul>
- <div class="write-area">
- <?= $this->formTextarea('description', $values, $errors) ?>
- </div>
- <div class="preview-area">
- <div class="markdown"></div>
- </div>
</div>
<div class="form-help"><a href="http://kanboard.net/documentation/syntax-guide" target="_blank" rel="noreferrer"><?= t('Write your text in Markdown') ?></a></div>
diff --git a/app/Template/board/edit_column.php b/app/Template/board/edit_column.php
index 397e1d23..ef76b180 100644
--- a/app/Template/board/edit_column.php
+++ b/app/Template/board/edit_column.php
@@ -18,6 +18,13 @@
<?= $this->formLabel(t('Description'), 'description') ?>
<div class="form-tabs">
+
+ <div class="write-area">
+ <?= $this->formTextarea('description', $values, $errors) ?>
+ </div>
+ <div class="preview-area">
+ <div class="markdown"></div>
+ </div>
<ul class="form-tabs-nav">
<li class="form-tab form-tab-selected">
<i class="fa fa-pencil-square-o fa-fw"></i><a id="markdown-write" href="#"><?= t('Write') ?></a>
@@ -26,12 +33,6 @@
<a id="markdown-preview" href="#"><i class="fa fa-eye fa-fw"></i><?= t('Preview') ?></a>
</li>
</ul>
- <div class="write-area">
- <?= $this->formTextarea('description', $values, $errors) ?>
- </div>
- <div class="preview-area">
- <div class="markdown"></div>
- </div>
</div>
<div class="form-help"><a href="http://kanboard.net/documentation/syntax-guide" target="_blank" rel="noreferrer"><?= t('Write your text in Markdown') ?></a></div>
diff --git a/app/Template/board/swimlane.php b/app/Template/board/swimlane.php
index 23e170d9..f0a00fc1 100644
--- a/app/Template/board/swimlane.php
+++ b/app/Template/board/swimlane.php
@@ -24,7 +24,9 @@
<?= $this->a('+', 'task', 'create', array('project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id']), false, 'task-creation-popover', t('Add a new task')) ?>
</div>
<?php endif ?>
+
<?= $this->e($column['title']) ?>
+
<?php if (! empty($column['description'])): ?>
<span class="column-tooltip pull-right" title="<?= $this->markdown($column['description']) ?>">
<i class="fa fa-info-circle"></i>
diff --git a/app/Template/project/show.php b/app/Template/project/show.php
index 888eea2a..b8bfd510 100644
--- a/app/Template/project/show.php
+++ b/app/Template/project/show.php
@@ -47,12 +47,14 @@
</tr>
<?php foreach ($stats['columns'] as $column): ?>
<tr>
- <td><?= $this->e($column['title']) ?>
- <?php if (! empty($column['description'])): ?>
- <span class="column-tooltip" title="<?= $this->markdown($column['description']) ?>">
- <i class="fa fa-info-circle"></i>
- </span>
- <?php endif ?></td>
+ <td>
+ <?= $this->e($column['title']) ?>
+ <?php if (! empty($column['description'])): ?>
+ <span class="column-tooltip" title="<?= $this->markdown($column['description']) ?>">
+ <i class="fa fa-info-circle"></i>
+ </span>
+ <?php endif ?>
+ </td>
<td><?= $column['task_limit'] ?: '∞' ?></td>
<td><?= $column['nb_active_tasks'] ?></td>
</tr>
diff --git a/assets/css/app.css b/assets/css/app.css
index 2f410dc0..844d1641 100644
--- a/assets/css/app.css
+++ b/assets/css/app.css
@@ -1022,6 +1022,10 @@ input.form-input-large {
}
/* preview tabs */
+label + .form-tabs {
+ margin-top: 10px;
+}
+
.form-tabs {
width: 100%;
max-width: 800px;
@@ -1261,7 +1265,13 @@ div.ui-tooltip {
.tooltip-large {
width: 550px;
-}/* header */
+}
+
+.column-tooltip {
+ color: #999;
+ font-size: 0.95em;
+}
+/* header */
header {
margin-top: 10px;
padding-bottom: 15px;
diff --git a/assets/css/src/form.css b/assets/css/src/form.css
index 7eec0e72..60dccd4c 100644
--- a/assets/css/src/form.css
+++ b/assets/css/src/form.css
@@ -176,6 +176,10 @@ input.form-input-large {
}
/* preview tabs */
+label + .form-tabs {
+ margin-top: 10px;
+}
+
.form-tabs {
width: 100%;
max-width: 800px;
diff --git a/assets/js/app.js b/assets/js/app.js
index 114c8fae..48eac871 100644
--- a/assets/js/app.js
+++ b/assets/js/app.js
@@ -136,16 +136,16 @@ var Kanboard=function(){jQuery(document).ready(function(){Kanboard.Init()});retu
$("#popover-content").click(function(a){a.stopPropagation()});$(".close-popover").click(function(a){a.preventDefault();$("#popover-container").remove()});Mousetrap.bind("esc",function(){$("#popover-container").remove()});c&&c()})},IsVisible:function(){var a="";"undefined"!==typeof document.hidden?a="visibilityState":"undefined"!==typeof document.mozHidden?a="mozVisibilityState":"undefined"!==typeof document.msHidden?a="msVisibilityState":"undefined"!==typeof document.webkitHidden&&(a="webkitVisibilityState");
return""!=a?"visible"==document[a]:!0},SetStorageItem:function(a,c){"undefined"!==typeof Storage&&localStorage.setItem(a,c)},GetStorageItem:function(a){return"undefined"!==typeof Storage?localStorage.getItem(a):""},MarkdownPreview:function(a){a.preventDefault();var c=$(this),b=$(this).closest("ul"),d=$(".write-area"),e=$(".preview-area"),f=$("textarea");$.ajax({url:"?controller=app&action=preview",contentType:"application/json",type:"POST",processData:!1,dataType:"html",data:JSON.stringify({text:f.val()})}).done(function(a){b.find("li").removeClass("form-tab-selected");
c.parent().addClass("form-tab-selected");e.find(".markdown").html(a);e.css("height",f.css("height"));e.css("width",f.css("width"));d.hide();e.show()})},MarkdownWriter:function(a){a.preventDefault();$(this).closest("ul").find("li").removeClass("form-tab-selected");$(this).parent().addClass("form-tab-selected");$(".write-area").show();$(".preview-area").hide()},CheckSession:function(){$(".form-login").length||$.ajax({cache:!1,url:$("body").data("status-url"),statusCode:{401:function(a){window.location=
-$("body").data("login-url")}}})},Init:function(){$("#board-selector").chosen({width:180});$("#board-selector").change(function(){window.location=$(this).attr("data-board-url").replace(/PROJECT_ID/g,$(this).val())});window.setInterval(Kanboard.CheckSession,6E4);$(".popover-subtask-restriction").click(Kanboard.Popover);$(".file-popover").click(Kanboard.Popover);Mousetrap.bind("ctrl+enter",function(){$("form").submit()});$.datepicker.setDefaults($.datepicker.regional[$("body").data("js-lang")]);Kanboard.InitAfterAjax()},
-InitAfterAjax:function(){$(".form-date").datepicker({showOtherMonths:!0,selectOtherMonths:!0,dateFormat:"yy-mm-dd",constrainInput:!1});$("#markdown-preview").click(Kanboard.MarkdownPreview);$("#markdown-write").click(Kanboard.MarkdownWriter);$(".auto-select").focus(function(){$(this).select()});$(".dropit-submenu").hide();$(".dropdown").not(".dropit").dropit()}}}();
+$("body").data("login-url")}}})},Init:function(){$("#board-selector").chosen({width:180});$("#board-selector").change(function(){window.location=$(this).attr("data-board-url").replace(/PROJECT_ID/g,$(this).val())});window.setInterval(Kanboard.CheckSession,6E4);$(".popover-subtask-restriction").click(Kanboard.Popover);$(".file-popover").click(Kanboard.Popover);Mousetrap.bind("ctrl+enter",function(){$("form").submit()});$(".column-tooltip").tooltip({content:function(a){return'<div class="markdown">'+
+$(this).attr("title")+"</div>"}});$.datepicker.setDefaults($.datepicker.regional[$("body").data("js-lang")]);Kanboard.InitAfterAjax()},InitAfterAjax:function(){$(".form-date").datepicker({showOtherMonths:!0,selectOtherMonths:!0,dateFormat:"yy-mm-dd",constrainInput:!1});$("#markdown-preview").click(Kanboard.MarkdownPreview);$("#markdown-write").click(Kanboard.MarkdownWriter);$(".auto-select").focus(function(){$(this).select()});$(".dropit-submenu").hide();$(".dropdown").not(".dropit").dropit()}}}();
Kanboard.Board=function(){function a(a){Kanboard.Popover(a,Kanboard.InitAfterAjax)}function c(){Mousetrap.bind("n",function(){Kanboard.OpenPopover($(".task-creation-popover").attr("href"),Kanboard.InitAfterAjax)})}function b(){$(".column").sortable({delay:300,distance:5,connectWith:".column",placeholder:"draggable-placeholder",stop:function(a,b){e(b.item.attr("data-task-id"),b.item.parent().attr("data-column-id"),b.item.index()+1,b.item.parent().attr("data-swimlane-id"))}});$(".assignee-popover").click(a);
-$(".category-popover").click(a);$(".task-edit-popover").click(a);$(".task-creation-popover").click(a);$(".task-description-popover").click(a);$(".column-tooltip").tooltip({content:function(a){return $(this).attr("title")}});$(".task-board-tooltip").tooltip({track:!1,position:{my:"left-20 top",at:"center bottom+9",using:function(a,b){$(this).css(a);var c=b.target.left+b.target.width/2-b.element.left-20;$("<div>").addClass("tooltip-arrow").addClass(b.vertical).addClass(0==c?"align-left":"align-right").appendTo(this)}},
-content:function(a){if(a=$(this).attr("data-href")){var b=this;$.get(a,function l(a){$(".ui-tooltip-content:visible").html(a);a=$(".ui-tooltip:visible");a.css({top:"",left:""});a.children(".tooltip-arrow").remove();var c=$(b).tooltip("option","position");c.of=$(b);a.position(c);$("#tooltip-subtasks a").click(function(a){a.preventDefault();a.stopPropagation();$(this).hasClass("popover-subtask-restriction")?(Kanboard.OpenPopover($(this).attr("href")),$(b).tooltip("close")):$.get($(this).attr("href"),
-l)})});return'<i class="fa fa-refresh fa-spin fa-2x"></i>'}}}).on("mouseenter",function(){var a=this;$(this).tooltip("open");$(".ui-tooltip").on("mouseleave",function(){$(a).tooltip("close")})}).on("mouseleave focusout",function(a){a.stopImmediatePropagation();var b=this;setTimeout(function(){$(".ui-tooltip:hover").length||$(b).tooltip("close")},100)});$("[data-task-url]").each(function(){$(this).click(function(){window.location=$(this).attr("data-task-url")})});var b=parseInt($("#board").attr("data-check-interval"));
-0<b&&(k=window.setInterval(f,1E3*b))}function d(){$("[data-task-url]").off();clearInterval(k)}function e(a,c,e,h){d();$.ajax({cache:!1,url:$("#board").attr("data-save-url"),contentType:"application/json",type:"POST",processData:!1,data:JSON.stringify({task_id:a,column_id:c,swimlane_id:h,position:e}),success:function(a){$("#board").remove();$("#main").append(a);Kanboard.InitAfterAjax();b();g()}})}function f(){Kanboard.IsVisible()&&$.ajax({cache:!1,url:$("#board").attr("data-check-url"),statusCode:{200:function(a){$("#board").remove();
-$("#main").append(a);Kanboard.InitAfterAjax();d();b();g()}}})}function g(){var a=$("#form-user_id").val(),b=$("#form-category_id").val(),c=$("#filter-due-date").hasClass("filter-on"),d=$("#board").data("project-id");$("[data-task-id]").each(function(d,g){var e=g.getAttribute("data-owner-id"),h=g.getAttribute("data-due-date"),f=g.getAttribute("data-category-id");g.style.opacity=e!=a&&-1!=a?"0.2":"1.0";!c||""!=h&&"0"!=h||(g.style.opacity="0.2");f!=b&&-1!=b&&(g.style.opacity="0.2")});Kanboard.SetStorageItem("board_filter_"+
-d+"_form-user_id",a);Kanboard.SetStorageItem("board_filter_"+d+"_form-category_id",b);Kanboard.SetStorageItem("board_filter_"+d+"_filter-due-date",~~c)}function h(){var a=$("#board").data("project-id");$("#form-user_id").change(g);$("#form-category_id").change(g);$("#filter-due-date").click(function(a){$(this).toggleClass("filter-on");g();a.preventDefault()});$("#form-user_id").val(Kanboard.GetStorageItem("board_filter_"+a+"_form-user_id")||-1);$("#form-category_id").val(Kanboard.GetStorageItem("board_filter_"+
-a+"_form-category_id")||-1);+Kanboard.GetStorageItem("board_filter_"+a+"_filter-due-date")?$("#filter-due-date").addClass("filter-on"):$("#filter-due-date").removeClass("filter-on");g()}var k=null;jQuery(document).ready(function(){Kanboard.Exists("board")&&(b(),h(),c())})}();
+$(".category-popover").click(a);$(".task-edit-popover").click(a);$(".task-creation-popover").click(a);$(".task-description-popover").click(a);$(".task-board-tooltip").tooltip({track:!1,position:{my:"left-20 top",at:"center bottom+9",using:function(a,b){$(this).css(a);var c=b.target.left+b.target.width/2-b.element.left-20;$("<div>").addClass("tooltip-arrow").addClass(b.vertical).addClass(0==c?"align-left":"align-right").appendTo(this)}},content:function(a){if(a=$(this).attr("data-href")){var b=this;
+$.get(a,function l(a){$(".ui-tooltip-content:visible").html(a);a=$(".ui-tooltip:visible");a.css({top:"",left:""});a.children(".tooltip-arrow").remove();var c=$(b).tooltip("option","position");c.of=$(b);a.position(c);$("#tooltip-subtasks a").click(function(a){a.preventDefault();a.stopPropagation();$(this).hasClass("popover-subtask-restriction")?(Kanboard.OpenPopover($(this).attr("href")),$(b).tooltip("close")):$.get($(this).attr("href"),l)})});return'<i class="fa fa-refresh fa-spin fa-2x"></i>'}}}).on("mouseenter",
+function(){var a=this;$(this).tooltip("open");$(".ui-tooltip").on("mouseleave",function(){$(a).tooltip("close")})}).on("mouseleave focusout",function(a){a.stopImmediatePropagation();var b=this;setTimeout(function(){$(".ui-tooltip:hover").length||$(b).tooltip("close")},100)});$("[data-task-url]").each(function(){$(this).click(function(){window.location=$(this).attr("data-task-url")})});var b=parseInt($("#board").attr("data-check-interval"));0<b&&(k=window.setInterval(f,1E3*b))}function d(){$("[data-task-url]").off();
+clearInterval(k)}function e(a,c,e,h){d();$.ajax({cache:!1,url:$("#board").attr("data-save-url"),contentType:"application/json",type:"POST",processData:!1,data:JSON.stringify({task_id:a,column_id:c,swimlane_id:h,position:e}),success:function(a){$("#board").remove();$("#main").append(a);Kanboard.InitAfterAjax();b();g()}})}function f(){Kanboard.IsVisible()&&$.ajax({cache:!1,url:$("#board").attr("data-check-url"),statusCode:{200:function(a){$("#board").remove();$("#main").append(a);Kanboard.InitAfterAjax();
+d();b();g()}}})}function g(){var a=$("#form-user_id").val(),b=$("#form-category_id").val(),c=$("#filter-due-date").hasClass("filter-on"),d=$("#board").data("project-id");$("[data-task-id]").each(function(d,g){var e=g.getAttribute("data-owner-id"),h=g.getAttribute("data-due-date"),f=g.getAttribute("data-category-id");g.style.opacity=e!=a&&-1!=a?"0.2":"1.0";!c||""!=h&&"0"!=h||(g.style.opacity="0.2");f!=b&&-1!=b&&(g.style.opacity="0.2")});Kanboard.SetStorageItem("board_filter_"+d+"_form-user_id",a);
+Kanboard.SetStorageItem("board_filter_"+d+"_form-category_id",b);Kanboard.SetStorageItem("board_filter_"+d+"_filter-due-date",~~c)}function h(){var a=$("#board").data("project-id");$("#form-user_id").change(g);$("#form-category_id").change(g);$("#filter-due-date").click(function(a){$(this).toggleClass("filter-on");g();a.preventDefault()});$("#form-user_id").val(Kanboard.GetStorageItem("board_filter_"+a+"_form-user_id")||-1);$("#form-category_id").val(Kanboard.GetStorageItem("board_filter_"+a+"_form-category_id")||
+-1);+Kanboard.GetStorageItem("board_filter_"+a+"_filter-due-date")?$("#filter-due-date").addClass("filter-on"):$("#filter-due-date").removeClass("filter-on");g()}var k=null;jQuery(document).ready(function(){Kanboard.Exists("board")&&(b(),h(),c())})}();
Kanboard.Calendar=function(){function a(a){$.ajax({cache:!1,url:$("#calendar").data("save-url"),contentType:"application/json",type:"POST",processData:!1,data:JSON.stringify({task_id:a.id,date_due:a.start.format()})})}function c(a){var b=$("#user-calendar");a=b.data("check-url");var c={start:b.fullCalendar("getView").start.format(),end:b.fullCalendar("getView").end.format(),user_id:b.data("user-id")},d;for(d in c)a+="&"+d+"="+c[d];$.getJSON(a,function(a){b.fullCalendar("removeEvents");b.fullCalendar("addEventSource",
a);b.fullCalendar("rerenderEvents")})}function b(a){var b=$("#calendar"),c=b.data("check-url"),d={start:b.fullCalendar("getView").start.format(),end:b.fullCalendar("getView").end.format()};jQuery.extend(d,a);for(var e in d)c+="&"+e+"="+d[e];$.getJSON(c,function(a){b.fullCalendar("removeEvents");b.fullCalendar("addEventSource",a);b.fullCalendar("rerenderEvents")})}function d(){var a=Kanboard.GetStorageItem(f);if(""!==a){var a=JSON.parse(a),c;for(c in a)$("select[name="+c+"]").val(a[c])}b(a||{});$(".calendar-filter").change(e)}
function e(){var a={};$(".calendar-filter").each(function(b,c){a[$(this).attr("name")]=$(this).val()});Kanboard.SetStorageItem(f,JSON.stringify(a));b(a)}var f="";jQuery(document).ready(function(){if(Kanboard.Exists("calendar")){f="calendar_filters_"+$("#calendar").data("project-id");var b=$("#calendar");b.data("translations");b.fullCalendar({lang:$("body").data("js-lang"),editable:!0,eventLimit:!0,defaultView:"agendaWeek",header:{left:"prev,next today",center:"title",right:"month,agendaWeek,agendaDay"},
diff --git a/assets/js/src/base.js b/assets/js/src/base.js
index cf8de7df..2fe287b4 100644
--- a/assets/js/src/base.js
+++ b/assets/js/src/base.js
@@ -191,7 +191,7 @@ var Kanboard = (function() {
// Tooltip for column description
$(".column-tooltip").tooltip({
content: function(e) {
- return '<div class="markdown">'+$(this).attr("title")+'</div>';
+ return '<div class="markdown">' + $(this).attr("title") + '</div>';
}
});
diff --git a/assets/js/src/board.js b/assets/js/src/board.js
index 2a51eef4..e4ba4ed5 100644
--- a/assets/js/src/board.js
+++ b/assets/js/src/board.js
@@ -272,7 +272,6 @@ Kanboard.Board = (function() {
filter_load_events();
keyboard_shortcuts();
}
-
});
})();