diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-07-04 12:39:43 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-07-04 12:39:43 -0400 |
commit | 37c1b79bddfb7a43aacbcad6f790562786645a03 (patch) | |
tree | 0289610eb14539538f73663816a3ae006fd800b9 /assets | |
parent | 554500aa493faa66b43b2ddce72338880a874724 (diff) |
Do not allow closed tasks to move on the board
Diffstat (limited to 'assets')
-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 |
7 files changed, 75 insertions, 87 deletions
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'), |