diff options
-rw-r--r-- | assets/css/app.css | 25 | ||||
-rw-r--r-- | assets/css/src/board.css | 25 | ||||
-rw-r--r-- | assets/js/app.js | 4 | ||||
-rw-r--r-- | assets/js/src/board.js | 8 |
4 files changed, 32 insertions, 30 deletions
diff --git a/assets/css/app.css b/assets/css/app.css index 4d2f4075..9705b64f 100644 --- a/assets/css/app.css +++ b/assets/css/app.css @@ -762,26 +762,27 @@ nav .active a { /* board table */ #board-container { padding-bottom: 180px; /* Space to avoid dropdown menu truncated */ -} - -/* Board container classes for wide/compact view */ -.board-container-wide { overflow-x: scroll; } .board-container-compact { - overflow-x: hidden; + overflow-x: initial; +} + +#board { + table-layout: fixed; +} + +#board th { + width: 120px; /* Width of swimlane column */ } -/* Board table column for wide/compact view */ -.board-column-wide { - min-width: 240px; - max-width: 240px; +#board th.board-column { + width: 240px; /* Width of other columns, in default [horizontal scrolling] view mode */ } -.board-column-compact { - min-width: 0px; - max-width: 0px; +#board th.board-column.board-column-compact { + width: initial; /* Do not force the width of the columns in compact view mode */ } #board th a { diff --git a/assets/css/src/board.css b/assets/css/src/board.css index f4aefa95..4309b178 100644 --- a/assets/css/src/board.css +++ b/assets/css/src/board.css @@ -21,26 +21,27 @@ /* board table */ #board-container { padding-bottom: 180px; /* Space to avoid dropdown menu truncated */ -} - -/* Board container classes for wide/compact view */ -.board-container-wide { overflow-x: scroll; } .board-container-compact { - overflow-x: hidden; + overflow-x: initial; +} + +#board { + table-layout: fixed; +} + +#board th { + width: 120px; /* Width of swimlane column */ } -/* Board table column for wide/compact view */ -.board-column-wide { - min-width: 240px; - max-width: 240px; +#board th.board-column { + width: 240px; /* Width of other columns, in default [horizontal scrolling] view mode */ } -.board-column-compact { - min-width: 0px; - max-width: 0px; +#board th.board-column.board-column-compact { + width: initial; /* Do not force the width of the columns in compact view mode */ } #board th a { diff --git a/assets/js/app.js b/assets/js/app.js index 6e6f7f34..7a3a6c96 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -153,8 +153,8 @@ k();h();g();l()}})}function n(){Kanboard.IsVisible()&&$.ajax({cache:!1,url:$("#b g){var k=g.getAttribute("data-owner-id"),f=g.getAttribute("data-due-date"),n=g.getAttribute("data-category-id"),h=$(g).hasClass("task-board-recent");g.style.display=k!=a&&-1!=a?"none":"block";!c||""!=f&&"0"!=f||(g.style.display="none");n!=b&&-1!=b&&(g.style.display="none");d&&!h&&(g.style.display="none")});Kanboard.SetStorageItem("board_filter_"+e+"_form-user_id",a);Kanboard.SetStorageItem("board_filter_"+e+"_form-category_id",b);Kanboard.SetStorageItem("board_filter_"+e+"_filter-due-date",~~c);Kanboard.SetStorageItem("board_filter_"+ e+"_filter-recent",~~d)}function t(){var a=$("#board").data("project-id");$("#form-user_id").chosen({width:"180px",no_results_text:$("#form-user_id").data("notfound")});$("#form-category_id").chosen({width:"200px",no_results_text:$("#form-category_id").data("notfound")});$("#more-filters").chosen({width:"30%",no_results_text:$("#more-filters").data("notfound")});$(".apply-filters").change(function(a){h()});$("#form-user_id").val(Kanboard.GetStorageItem("board_filter_"+a+"_form-user_id")||-1);$("#form-user_id").trigger("chosen:updated"); $("#form-category_id").val(Kanboard.GetStorageItem("board_filter_"+a+"_form-category_id")||-1);$("#form-category_id").trigger("chosen:updated");+Kanboard.GetStorageItem("board_filter_"+a+"_filter-due-date")&&$("#more-filters option[value=filter-due-date]").attr("selected",!0);+Kanboard.GetStorageItem("board_filter_"+a+"_filter-recent")&&$("#more-filters option[value=filter-recent]").attr("selected",!0);$("#more-filters").trigger("chosen:updated");h()}function u(){jQuery(document).on("click",".filter-toggle-scrolling", -function(a){a.preventDefault();p()});l()}function p(){var a=Kanboard.GetStorageItem("horizontal_scroll")||1;Kanboard.SetStorageItem("horizontal_scroll",0==a?1:0);l()}function l(){0==Kanboard.GetStorageItem("horizontal_scroll")?($(".filter-wide").show(),$(".filter-compact").hide(),$("#board-container").removeClass("board-container-wide").addClass("board-container-compact"),$("#board th,#board td").removeClass("board-column-wide").addClass("board-column-compact")):($(".filter-wide").hide(),$(".filter-compact").show(), -$("#board-container").removeClass("board-container-compact").addClass("board-container-wide"),$("#board th,#board td").removeClass("board-column-compact").addClass("board-column-wide"))}var m=null;jQuery(document).ready(function(){Kanboard.Exists("board")&&(k(),t(),b(),u(),c())})}(); +function(a){a.preventDefault();p()});l()}function p(){var a=Kanboard.GetStorageItem("horizontal_scroll")||1;Kanboard.SetStorageItem("horizontal_scroll",0==a?1:0);l()}function l(){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")&&(k(),t(),b(),u(),c())})}(); Kanboard.Calendar=function(){function a(a){var b=$("#calendar").data("save-url")||$("#user-calendar").data("save-url");$.ajax({cache:!1,url:b,contentType:"application/json",type:"POST",processData:!1,data:JSON.stringify({task_id:a.id,date_due:a.start.format()})})}function c(){var a=$("#user-calendar"),b=a.data("check-url"),c={start:a.fullCalendar("getView").start.format(),end:a.fullCalendar("getView").end.format(),user_id:a.data("user-id")},d;for(d in c)b+="&"+d+"="+c[d];$.getJSON(b,function(b){a.fullCalendar("removeEvents"); a.fullCalendar("addEventSource",b);a.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(){a[$(this).attr("name")]=$(this).val()});Kanboard.SetStorageItem(f,JSON.stringify(a));b(a)}var f="";jQuery(document).ready(function(){Kanboard.Exists("calendar")?(f="calendar_filters_"+$("#calendar").data("project-id"),$("#calendar").fullCalendar({lang:$("body").data("js-lang"),editable:!0,eventLimit:!0,defaultView:"month",header:{left:"prev,next today",center:"title",right:"month,agendaWeek,agendaDay"}, diff --git a/assets/js/src/board.js b/assets/js/src/board.js index 878cb98e..9f93a869 100644 --- a/assets/js/src/board.js +++ b/assets/js/src/board.js @@ -384,16 +384,16 @@ Kanboard.Board = (function() { $(".filter-wide").show(); $(".filter-compact").hide(); - $("#board-container").removeClass("board-container-wide").addClass("board-container-compact"); - $("#board th,#board td").removeClass("board-column-wide").addClass("board-column-compact"); + $("#board-container").addClass("board-container-compact"); + $("#board th").addClass("board-column-compact"); } else { $(".filter-wide").hide(); $(".filter-compact").show(); - $("#board-container").removeClass("board-container-compact").addClass("board-container-wide"); - $("#board th,#board td").removeClass("board-column-compact").addClass("board-column-wide"); + $("#board-container").removeClass("board-container-compact"); + $("#board th").removeClass("board-column-compact"); } } |