diff options
-rw-r--r-- | app/Template/board/task_private.php | 9 | ||||
-rw-r--r-- | app/Template/layout.php | 2 | ||||
-rw-r--r-- | app/Template/task/edit_description.php | 2 | ||||
-rw-r--r-- | assets/css/app.css | 59 | ||||
-rw-r--r-- | assets/css/print.css | 32 | ||||
-rw-r--r-- | assets/css/src/dropdown.css | 8 | ||||
-rw-r--r-- | assets/css/src/screenshot.css | 19 | ||||
-rw-r--r-- | assets/css/src/task.css | 31 | ||||
-rw-r--r-- | assets/js/app.js | 12 | ||||
-rw-r--r-- | assets/js/src/board.js | 1 | ||||
-rwxr-xr-x | scripts/make-assets.sh | 2 |
11 files changed, 86 insertions, 91 deletions
diff --git a/app/Template/board/task_private.php b/app/Template/board/task_private.php index 44ce9d97..3cd471d7 100644 --- a/app/Template/board/task_private.php +++ b/app/Template/board/task_private.php @@ -1,4 +1,7 @@ -<div class="task-board draggable-item color-<?= $task['color_id'] ?> <?= $task['date_modification'] > time() - $board_highlight_period ? 'task-board-recent' : '' ?>" +<div class=" + task-board + <?= $task['is_active'] == 1 ? 'draggable-item task-board-status-open '.($task['date_modification'] > (time() - $board_highlight_period) ? 'task-board-recent' : '') : 'task-board-status-closed' ?> + color-<?= $task['color_id'] ?>" data-task-id="<?= $task['id'] ?>" data-owner-id="<?= $task['owner_id'] ?>" data-category-id="<?= $task['category_id'] ?>" @@ -31,10 +34,14 @@ ) ?> </span> + <?php if ($task['is_active'] == 1): ?> <div class="task-board-days"> <span title="<?= t('Task age in days')?>" class="task-days-age"><?= $this->datetime->age($task['date_creation']) ?></span> <span title="<?= t('Days in this column')?>" class="task-days-incolumn"><?= $this->datetime->age($task['date_moved']) ?></span> </div> + <?php else: ?> + <div class="task-board-closed"><i class="fa fa-ban fa-fw"></i><?= t('Closed') ?></div> + <?php endif ?> <div class="task-board-title"> <?= $this->url->link($this->e($task['title']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?> diff --git a/app/Template/layout.php b/app/Template/layout.php index c630132d..a6d00470 100644 --- a/app/Template/layout.php +++ b/app/Template/layout.php @@ -15,9 +15,9 @@ <?= $this->asset->js('assets/js/app.js', true) ?> <?php endif ?> + <?= $this->asset->colorCss() ?> <?= $this->asset->css('assets/css/app.css') ?> <?= $this->asset->css('assets/css/print.css', true, 'print') ?> - <?= $this->asset->colorCss() ?> <?= $this->asset->customCss() ?> <link rel="icon" type="image/png" href="assets/img/favicon.png"> diff --git a/app/Template/task/edit_description.php b/app/Template/task/edit_description.php index 84f0cebd..99a547e1 100644 --- a/app/Template/task/edit_description.php +++ b/app/Template/task/edit_description.php @@ -17,7 +17,7 @@ </li> </ul> <div class="write-area"> - <?= $this->form->textarea('description', $values, $errors, array('autofocus', 'placeholder="'.t('Leave a description').'"'), 'description-textarea') ?> + <?= $this->form->textarea('description', $values, $errors, array('autofocus', 'placeholder="'.t('Leave a description').'"'), 'task-show-description-textarea') ?> </div> <div class="preview-area"> <div class="markdown"></div> diff --git a/assets/css/app.css b/assets/css/app.css index 790886fa..508417fe 100644 --- a/assets/css/app.css +++ b/assets/css/app.css @@ -880,7 +880,12 @@ nav .active a { } div.task-board-recent { - border: 1px solid #666; + box-shadow: 2px 2px 5px rgba(0,0,0,0.25); +} + +div.task-board-status-closed { + user-select: none; + border: 1px dotted #555; } .task-table a, @@ -1003,6 +1008,7 @@ span.task-board-date-overdue { } /* task age */ +.task-board-closed, .task-board-days { position: absolute; right: 5px; @@ -1089,7 +1095,7 @@ span.task-board-date-overdue { padding-left: 20px; } -.description-textarea { +.task-show-description-textarea { width: 99%; max-width: 99%; height: 300px; @@ -1154,27 +1160,7 @@ span.task-board-date-overdue { .task-show-file-table { width: auto; } - -/* screenshots */ -#screenshot-zone { - position: relative; - border: 2px dashed #ccc; - width: 90%; - height: 250px; - overflow: auto; -} - -#screenshot-inner { - position: absolute; - left: 0; - bottom: 48%; - width: 100%; - text-align: center; -} - -#screenshot-zone.screenshot-pasted { - border: 2px solid #333; -}/* comments */ +/* comments */ .comment { margin-bottom: 20px; } @@ -1592,12 +1578,8 @@ span.task-board-date-overdue { padding: 6px 0; background-color: #fff; border: 1px solid #b2b2b2; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - -webkit-box-shadow: 0px 1px 3px rgba(0,0,0,0.15); - -moz-box-shadow: 0px 1px 3px rgba(0,0,0,0.15); - box-shadow: 0px 1px 3px rgba(0,0,0,0.15); + border-radius: 3px; + box-shadow: 0px 1px 3px rgba(0,0,0,0.15); } .dropdown ul li { @@ -1641,3 +1623,22 @@ td li.dropit-trigger { .task-board .dropit-submenu a:hover { text-decoration: none; } +#screenshot-zone { + position: relative; + border: 2px dashed #ccc; + width: 90%; + height: 250px; + overflow: auto; +} + +#screenshot-inner { + position: absolute; + left: 0; + bottom: 48%; + width: 100%; + text-align: center; +} + +#screenshot-zone.screenshot-pasted { + border: 2px solid #333; +}
\ No newline at end of file diff --git a/assets/css/print.css b/assets/css/print.css index 7e5f9f9d..8f0e7e20 100644 --- a/assets/css/print.css +++ b/assets/css/print.css @@ -251,7 +251,12 @@ th a:hover { } div.task-board-recent { - border: 1px solid #666; + box-shadow: 2px 2px 5px rgba(0,0,0,0.25); +} + +div.task-board-status-closed { + user-select: none; + border: 1px dotted #555; } .task-table a, @@ -374,6 +379,7 @@ span.task-board-date-overdue { } /* task age */ +.task-board-closed, .task-board-days { position: absolute; right: 5px; @@ -460,7 +466,7 @@ span.task-board-date-overdue { padding-left: 20px; } -.description-textarea { +.task-show-description-textarea { width: 99%; max-width: 99%; height: 300px; @@ -525,27 +531,7 @@ span.task-board-date-overdue { .task-show-file-table { width: auto; } - -/* screenshots */ -#screenshot-zone { - position: relative; - border: 2px dashed #ccc; - width: 90%; - height: 250px; - overflow: auto; -} - -#screenshot-inner { - position: absolute; - left: 0; - bottom: 48%; - width: 100%; - text-align: center; -} - -#screenshot-zone.screenshot-pasted { - border: 2px solid #333; -}/* comments */ +/* comments */ .comment { margin-bottom: 20px; } diff --git a/assets/css/src/dropdown.css b/assets/css/src/dropdown.css index 4ddcbf29..15ba2ae0 100644 --- a/assets/css/src/dropdown.css +++ b/assets/css/src/dropdown.css @@ -18,12 +18,8 @@ padding: 6px 0; background-color: #fff; border: 1px solid #b2b2b2; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - -webkit-box-shadow: 0px 1px 3px rgba(0,0,0,0.15); - -moz-box-shadow: 0px 1px 3px rgba(0,0,0,0.15); - box-shadow: 0px 1px 3px rgba(0,0,0,0.15); + border-radius: 3px; + box-shadow: 0px 1px 3px rgba(0,0,0,0.15); } .dropdown ul li { diff --git a/assets/css/src/screenshot.css b/assets/css/src/screenshot.css new file mode 100644 index 00000000..4d917200 --- /dev/null +++ b/assets/css/src/screenshot.css @@ -0,0 +1,19 @@ +#screenshot-zone { + position: relative; + border: 2px dashed #ccc; + width: 90%; + height: 250px; + overflow: auto; +} + +#screenshot-inner { + position: absolute; + left: 0; + bottom: 48%; + width: 100%; + text-align: center; +} + +#screenshot-zone.screenshot-pasted { + border: 2px solid #333; +}
\ No newline at end of file diff --git a/assets/css/src/task.css b/assets/css/src/task.css index 9f8125fe..1b35c995 100644 --- a/assets/css/src/task.css +++ b/assets/css/src/task.css @@ -9,7 +9,12 @@ } div.task-board-recent { - border: 1px solid #666; + box-shadow: 2px 2px 5px rgba(0,0,0,0.25); +} + +div.task-board-status-closed { + user-select: none; + border: 1px dotted #555; } .task-table a, @@ -132,6 +137,7 @@ span.task-board-date-overdue { } /* task age */ +.task-board-closed, .task-board-days { position: absolute; right: 5px; @@ -218,7 +224,7 @@ span.task-board-date-overdue { padding-left: 20px; } -.description-textarea { +.task-show-description-textarea { width: 99%; max-width: 99%; height: 300px; @@ -283,24 +289,3 @@ span.task-board-date-overdue { .task-show-file-table { width: auto; } - -/* screenshots */ -#screenshot-zone { - position: relative; - border: 2px dashed #ccc; - width: 90%; - height: 250px; - overflow: auto; -} - -#screenshot-inner { - position: absolute; - left: 0; - bottom: 48%; - width: 100%; - text-align: center; -} - -#screenshot-zone.screenshot-pasted { - border: 2px solid #333; -}
\ No newline at end of file diff --git a/assets/js/app.js b/assets/js/app.js index 2ac0060c..bb16ba8c 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -146,12 +146,12 @@ $(".auto-select").focus(function(){$(this).select()});$(".dropit-submenu").hide( $(".task-autocomplete").parent().find("input[type=submit]").removeAttr("disabled")}}));$(".column-tooltip").tooltip({content:function(){return'<div class="markdown">'+$(this).attr("title")+"</div>"},position:{my:"left-20 top",at:"center bottom+9",using:function(a,c){$(this).css(a);var b=c.target.left+c.target.width/2-c.element.left-20;$("<div>").addClass("tooltip-arrow").addClass(c.vertical).addClass(0==b?"align-left":"align-right").appendTo(this)}}});Kanboard.Exists("screenshot-zone")&&Kanboard.Screenshot.Init()}}}(); (function(){function a(a){a.preventDefault();a.stopPropagation();Kanboard.Popover(a,Kanboard.InitAfterAjax)}function c(){Mousetrap.bind("n",function(){Kanboard.OpenPopover($("#board").data("task-creation-url"),Kanboard.InitAfterAjax)});Mousetrap.bind("s",function(){"expanded"===(Kanboard.GetStorageItem(d())||"expanded")?(e(),Kanboard.SetStorageItem(d(),"collapsed")):(f(),Kanboard.SetStorageItem(d(),"expanded"))});Mousetrap.bind("c",function(){n()})}function b(){$(".filter-expand-link").click(function(a){a.preventDefault(); f();Kanboard.SetStorageItem(d(),"expanded")});$(".filter-collapse-link").click(function(a){a.preventDefault();e();Kanboard.SetStorageItem(d(),"collapsed")});k()}function d(){return"board_stacking_"+$("#board").data("project-id")}function e(){$(".filter-collapse").hide();$(".task-board-collapsed").show();$(".filter-expand").show();$(".task-board-expanded").hide()}function f(){$(".filter-collapse").show();$(".task-board-collapsed").hide();$(".filter-expand").hide();$(".task-board-expanded").show()} -function k(){"expanded"===(Kanboard.GetStorageItem(d())||"expanded")?f():e()}function l(){$(".column").sortable({delay:300,distance:5,connectWith:".column",placeholder:"draggable-placeholder",stop:function(a,b){g(b.item.attr("data-task-id"),b.item.parent().attr("data-column-id"),b.item.index()+1,b.item.parent().attr("data-swimlane-id"))}});$("#board").on("click",".task-board-popover",a);$("#board").on("click",".task-board",function(){window.location=$(this).data("task-url")});$(".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 p(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").not(".popover").click(function(a){a.preventDefault();a.stopPropagation();$(this).hasClass("popover-subtask-restriction")?(Kanboard.OpenPopover($(this).attr("href")),$(b).tooltip("close")):$.get($(this).attr("href"),p)})});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)});var b=parseInt($("#board").attr("data-check-interval"));0<b&&(m=window.setInterval(q,1E3*b))}function g(a,b,c,d){clearInterval(m);$.ajax({cache:!1,url:$("#board").attr("data-save-url"),contentType:"application/json",type:"POST",processData:!1,data:JSON.stringify({task_id:a,column_id:b,swimlane_id:d,position:c}),success:function(a){$("#board-container").remove();$("#main").append(a);Kanboard.InitAfterAjax(); -l();k();h()}})}function q(){Kanboard.IsVisible()&&$.ajax({cache:!1,url:$("#board").attr("data-check-url"),statusCode:{200:function(a){$("#board-container").remove();$("#main").append(a);Kanboard.InitAfterAjax();clearInterval(m);l();k();h()}}})}function r(){jQuery(document).on("click",".filter-toggle-scrolling",function(a){a.preventDefault();n()});h()}function n(){var a=Kanboard.GetStorageItem("horizontal_scroll")||1;Kanboard.SetStorageItem("horizontal_scroll",0==a?1:0);h()}function h(){0==Kanboard.GetStorageItem("horizontal_scroll")? -($(".filter-wide").show(),$(".filter-compact").hide(),$("#board-container").addClass("board-container-compact"),$("#board th").addClass("board-column-compact")):($(".filter-wide").hide(),$(".filter-compact").show(),$("#board-container").removeClass("board-container-compact"),$("#board th").removeClass("board-column-compact"))}var m=null;jQuery(document).ready(function(){Kanboard.Exists("board")&&(l(),b(),r(),c())})})(); +function k(){"expanded"===(Kanboard.GetStorageItem(d())||"expanded")?f():e()}function l(){$(".column").sortable({delay:300,distance:5,connectWith:".column",placeholder:"draggable-placeholder",items:".draggable-item",stop:function(a,b){g(b.item.attr("data-task-id"),b.item.parent().attr("data-column-id"),b.item.index()+1,b.item.parent().attr("data-swimlane-id"))}});$("#board").on("click",".task-board-popover",a);$("#board").on("click",".task-board",function(){window.location=$(this).data("task-url")}); +$(".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 p(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").not(".popover").click(function(a){a.preventDefault();a.stopPropagation();$(this).hasClass("popover-subtask-restriction")?(Kanboard.OpenPopover($(this).attr("href")),$(b).tooltip("close")):$.get($(this).attr("href"),p)})});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)});var b=parseInt($("#board").attr("data-check-interval"));0<b&&(m=window.setInterval(q,1E3*b))}function g(a,b,c,d){clearInterval(m);$.ajax({cache:!1,url:$("#board").attr("data-save-url"),contentType:"application/json",type:"POST",processData:!1,data:JSON.stringify({task_id:a,column_id:b,swimlane_id:d,position:c}),success:function(a){$("#board-container").remove();$("#main").append(a); +Kanboard.InitAfterAjax();l();k();h()}})}function q(){Kanboard.IsVisible()&&$.ajax({cache:!1,url:$("#board").attr("data-check-url"),statusCode:{200:function(a){$("#board-container").remove();$("#main").append(a);Kanboard.InitAfterAjax();clearInterval(m);l();k();h()}}})}function r(){jQuery(document).on("click",".filter-toggle-scrolling",function(a){a.preventDefault();n()});h()}function n(){var a=Kanboard.GetStorageItem("horizontal_scroll")||1;Kanboard.SetStorageItem("horizontal_scroll",0==a?1:0);h()} +function h(){0==Kanboard.GetStorageItem("horizontal_scroll")?($(".filter-wide").show(),$(".filter-compact").hide(),$("#board-container").addClass("board-container-compact"),$("#board th").addClass("board-column-compact")):($(".filter-wide").hide(),$(".filter-compact").show(),$("#board-container").removeClass("board-container-compact"),$("#board th").removeClass("board-column-compact"))}var m=null;jQuery(document).ready(function(){Kanboard.Exists("board")&&(l(),b(),r(),c())})})(); (function(){jQuery(document).ready(function(){if(Kanboard.Exists("calendar")){var a=$("#calendar");a.fullCalendar({lang:$("body").data("js-lang"),editable:!0,eventLimit:!0,defaultView:"month",header:{left:"prev,next today",center:"title",right:"month,agendaWeek,agendaDay"},eventDrop:function(c){$.ajax({cache:!1,url:a.data("save-url"),contentType:"application/json",type:"POST",processData:!1,data:JSON.stringify({task_id:c.id,date_due:c.start.format()})})},viewRender:function(){var c=a.data("check-url"), b={start:a.fullCalendar("getView").start.format(),end:a.fullCalendar("getView").end.format()},d;for(d in b)c+="&"+d+"="+b[d];$.getJSON(c,function(b){a.fullCalendar("removeEvents");a.fullCalendar("addEventSource",b);a.fullCalendar("rerenderEvents")})}})}})})(); (function(){jQuery(document).ready(function(){if(Kanboard.Exists("analytic-task-repartition")){for(var a=$("#chart").data("metrics"),c=[],b=0;b<a.length;b++)c.push([a[b].column_title,a[b].nb_tasks]);c3.generate({data:{columns:c,type:"donut"}})}else if(Kanboard.Exists("analytic-user-repartition")){a=$("#chart").data("metrics");c=[];for(b=0;b<a.length;b++)c.push([a[b].user,a[b].nb_tasks]);c3.generate({data:{columns:c,type:"donut"}})}else if(Kanboard.Exists("analytic-cfd")){for(var a=$("#chart").data("metrics"), diff --git a/assets/js/src/board.js b/assets/js/src/board.js index d11e39f5..356437a1 100644 --- a/assets/js/src/board.js +++ b/assets/js/src/board.js @@ -106,6 +106,7 @@ distance: 5, connectWith: ".column", placeholder: "draggable-placeholder", + items: ".draggable-item", stop: function(event, ui) { board_save( ui.item.attr('data-task-id'), diff --git a/scripts/make-assets.sh b/scripts/make-assets.sh index e340a4b2..15f807d4 100755 --- a/scripts/make-assets.sh +++ b/scripts/make-assets.sh @@ -1,7 +1,7 @@ #!/bin/bash print_css="print links table board task comment subtask markdown" -app_css="base links title table form button alert tooltip header board task comment subtask markdown listing activity dashboard pagination popover confirm sidebar responsive dropdown" +app_css="base links title table form button alert tooltip header board task comment subtask markdown listing activity dashboard pagination popover confirm sidebar responsive dropdown screenshot" vendor_css="jquery-ui.min chosen.min fullcalendar.min font-awesome.min c3.min" app_js="base board calendar analytic swimlane screenshot" |