diff options
-rw-r--r-- | assets/js/app.js | 2 | ||||
-rw-r--r-- | assets/js/src/board.js | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/assets/js/app.js b/assets/js/app.js index 69e34781..dd053468 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -150,7 +150,7 @@ at:"center bottom+9",using:function(a,b){$(this).css(a);var c=b.target.left+b.ta $("#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"),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&&(l=window.setInterval(m,1E3*b))}function n(a,b,c,d){clearInterval(l);$.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").remove();$("#main").append(a);Kanboard.InitAfterAjax();k();h();g()}})}function m(){Kanboard.IsVisible()&&$.ajax({cache:!1,url:$("#board").attr("data-check-url"), statusCode:{200:function(a){$("#board").remove();$("#main").append(a);Kanboard.InitAfterAjax();clearInterval(l);k();h();g()}}})}function h(){var a=$("#form-user_id").val(),b=$("#form-category_id").val(),c=$("#filter-due-date").hasClass("filter-on"),d=$("#filter-recent").hasClass("filter-on"),e=$("#board").data("project-id");$("[data-task-id]").each(function(e,g){var f=g.getAttribute("data-owner-id"),k=g.getAttribute("data-due-date"),h=g.getAttribute("data-category-id"),m=g.matches(".task-board-recent"); -g.style.opacity=f!=a&&-1!=a?"0.2":"1.0";!c||""!=k&&"0"!=k||(g.style.opacity="0.2");h!=b&&-1!=b&&(g.style.opacity="0.2");d&&!m&&(g.style.opacity="0.2")});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 q(){var a=$("#board").data("project-id");$("#form-user_id").change(function(a){$(this).parent().toggleClass("filter-on", +g.style.display=f!=a&&-1!=a?"none":"block";!c||""!=k&&"0"!=k||(g.style.display="none");h!=b&&-1!=b&&(g.style.display="none");d&&!m&&(g.style.opacity="0.2")});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 q(){var a=$("#board").data("project-id");$("#form-user_id").change(function(a){$(this).parent().toggleClass("filter-on", -1!=$(this).val());h()});$("#form-category_id").change(function(a){$(this).parent().toggleClass("filter-on",-1!=$(this).val());h()});$("#filter-due-date").click(function(a){$(this).toggleClass("filter-on");h();a.preventDefault()});$("#filter-recent").click(function(a){$(this).toggleClass("filter-on");h();a.preventDefault()});$("#form-user_id").val(Kanboard.GetStorageItem("board_filter_"+a+"_form-user_id")||-1);$("#form-user_id").parent().toggleClass("filter-on",-1!=$("#form-user_id").val());$("#form-category_id").val(Kanboard.GetStorageItem("board_filter_"+ a+"_form-category_id")||-1);$("#form-category_id").parent().toggleClass("filter-on",-1!=$("#form-category_id").val());+Kanboard.GetStorageItem("board_filter_"+a+"_filter-due-date")?$("#filter-due-date").addClass("filter-on"):$("#filter-due-date").removeClass("filter-on");+Kanboard.GetStorageItem("board_filter_"+a+"_filter-recent")?$("#filter-recent").addClass("filter-on"):$("#filter-recent").removeClass("filter-on");h()}var l=null;jQuery(document).ready(function(){Kanboard.Exists("board")&&(k(),q(), b(),c())})}(); diff --git a/assets/js/src/board.js b/assets/js/src/board.js index d2aeb0bd..32a9d3ed 100644 --- a/assets/js/src/board.js +++ b/assets/js/src/board.js @@ -284,18 +284,18 @@ Kanboard.Board = (function() { var recent = item.matches(".task-board-recent"); if (ownerId != selectedUserId && selectedUserId != -1) { - item.style.opacity = "0.2"; + item.style.display = "none"; } else { - item.style.opacity = "1.0"; + item.style.display = "block"; } if (filterDueDate && (dueDate == "" || dueDate == "0")) { - item.style.opacity = "0.2"; + item.style.display = "none"; } if (categoryId != selectedCategoryId && selectedCategoryId != -1) { - item.style.opacity = "0.2"; + item.style.display = "none"; } if (filterRecent && ! recent) { |