diff options
-rw-r--r-- | app/Locale/da_DK/translations.php | 1 | ||||
-rw-r--r-- | app/Locale/de_DE/translations.php | 1 | ||||
-rw-r--r-- | app/Locale/es_ES/translations.php | 1 | ||||
-rw-r--r-- | app/Locale/fi_FI/translations.php | 1 | ||||
-rw-r--r-- | app/Locale/fr_FR/translations.php | 1 | ||||
-rw-r--r-- | app/Locale/hu_HU/translations.php | 1 | ||||
-rw-r--r-- | app/Locale/it_IT/translations.php | 1 | ||||
-rw-r--r-- | app/Locale/ja_JP/translations.php | 1 | ||||
-rw-r--r-- | app/Locale/pl_PL/translations.php | 1 | ||||
-rw-r--r-- | app/Locale/pt_BR/translations.php | 1 | ||||
-rw-r--r-- | app/Locale/ru_RU/translations.php | 1 | ||||
-rw-r--r-- | app/Locale/sv_SE/translations.php | 1 | ||||
-rw-r--r-- | app/Locale/th_TH/translations.php | 1 | ||||
-rw-r--r-- | app/Locale/tr_TR/translations.php | 1 | ||||
-rw-r--r-- | app/Locale/zh_CN/translations.php | 1 | ||||
-rw-r--r-- | app/Template/board/filters.php | 6 | ||||
-rw-r--r-- | app/Template/layout.php | 2 | ||||
-rw-r--r-- | assets/js/app.js | 10 | ||||
-rw-r--r-- | assets/js/src/base.js | 3 | ||||
-rw-r--r-- | assets/js/src/board.js | 9 |
20 files changed, 32 insertions, 13 deletions
diff --git a/app/Locale/da_DK/translations.php b/app/Locale/da_DK/translations.php index a378bec6..9d6c7343 100644 --- a/app/Locale/da_DK/translations.php +++ b/app/Locale/da_DK/translations.php @@ -737,4 +737,5 @@ return array( // 'Compact view' => '', // 'Horizontal scrolling' => '', // 'Compact/wide view' => '', + // 'No results match:' => '', ); diff --git a/app/Locale/de_DE/translations.php b/app/Locale/de_DE/translations.php index 5652e3ba..44619315 100644 --- a/app/Locale/de_DE/translations.php +++ b/app/Locale/de_DE/translations.php @@ -737,4 +737,5 @@ return array( // 'Compact view' => '', // 'Horizontal scrolling' => '', // 'Compact/wide view' => '', + // 'No results match:' => '', ); diff --git a/app/Locale/es_ES/translations.php b/app/Locale/es_ES/translations.php index 15071483..91ffe5e8 100644 --- a/app/Locale/es_ES/translations.php +++ b/app/Locale/es_ES/translations.php @@ -737,4 +737,5 @@ return array( // 'Compact view' => '', // 'Horizontal scrolling' => '', // 'Compact/wide view' => '', + // 'No results match:' => '', ); diff --git a/app/Locale/fi_FI/translations.php b/app/Locale/fi_FI/translations.php index e9342e80..28f96069 100644 --- a/app/Locale/fi_FI/translations.php +++ b/app/Locale/fi_FI/translations.php @@ -737,4 +737,5 @@ return array( // 'Compact view' => '', // 'Horizontal scrolling' => '', // 'Compact/wide view' => '', + // 'No results match:' => '', ); diff --git a/app/Locale/fr_FR/translations.php b/app/Locale/fr_FR/translations.php index 9a1d5f57..30531d78 100644 --- a/app/Locale/fr_FR/translations.php +++ b/app/Locale/fr_FR/translations.php @@ -739,4 +739,5 @@ return array( 'Compact view' => 'Vue compacte', 'Horizontal scrolling' => 'Défilement horizontal', 'Compact/wide view' => 'Basculer entre la vue compacte et étendue', + 'No results match:' => 'Aucun résultat :', ); diff --git a/app/Locale/hu_HU/translations.php b/app/Locale/hu_HU/translations.php index ef057f70..07d7ec3b 100644 --- a/app/Locale/hu_HU/translations.php +++ b/app/Locale/hu_HU/translations.php @@ -737,4 +737,5 @@ return array( // 'Compact view' => '', // 'Horizontal scrolling' => '', // 'Compact/wide view' => '', + // 'No results match:' => '', ); diff --git a/app/Locale/it_IT/translations.php b/app/Locale/it_IT/translations.php index 3154ad17..c72dc9e0 100644 --- a/app/Locale/it_IT/translations.php +++ b/app/Locale/it_IT/translations.php @@ -737,4 +737,5 @@ return array( // 'Compact view' => '', // 'Horizontal scrolling' => '', // 'Compact/wide view' => '', + // 'No results match:' => '', ); diff --git a/app/Locale/ja_JP/translations.php b/app/Locale/ja_JP/translations.php index d55227f2..2cfab36a 100644 --- a/app/Locale/ja_JP/translations.php +++ b/app/Locale/ja_JP/translations.php @@ -737,4 +737,5 @@ return array( // 'Compact view' => '', // 'Horizontal scrolling' => '', // 'Compact/wide view' => '', + // 'No results match:' => '', ); diff --git a/app/Locale/pl_PL/translations.php b/app/Locale/pl_PL/translations.php index 6eac4005..39e3bb85 100644 --- a/app/Locale/pl_PL/translations.php +++ b/app/Locale/pl_PL/translations.php @@ -737,4 +737,5 @@ return array( // 'Compact view' => '', // 'Horizontal scrolling' => '', // 'Compact/wide view' => '', + // 'No results match:' => '', ); diff --git a/app/Locale/pt_BR/translations.php b/app/Locale/pt_BR/translations.php index 1791f74f..8436514e 100644 --- a/app/Locale/pt_BR/translations.php +++ b/app/Locale/pt_BR/translations.php @@ -737,4 +737,5 @@ return array( // 'Compact view' => '', // 'Horizontal scrolling' => '', // 'Compact/wide view' => '', + // 'No results match:' => '', ); diff --git a/app/Locale/ru_RU/translations.php b/app/Locale/ru_RU/translations.php index 2fdf6e50..199160c0 100644 --- a/app/Locale/ru_RU/translations.php +++ b/app/Locale/ru_RU/translations.php @@ -737,4 +737,5 @@ return array( // 'Compact view' => '', // 'Horizontal scrolling' => '', // 'Compact/wide view' => '', + // 'No results match:' => '', ); diff --git a/app/Locale/sv_SE/translations.php b/app/Locale/sv_SE/translations.php index bfc8d714..0fc9dfeb 100644 --- a/app/Locale/sv_SE/translations.php +++ b/app/Locale/sv_SE/translations.php @@ -737,4 +737,5 @@ return array( // 'Compact view' => '', // 'Horizontal scrolling' => '', // 'Compact/wide view' => '', + // 'No results match:' => '', ); diff --git a/app/Locale/th_TH/translations.php b/app/Locale/th_TH/translations.php index 04e8dcf8..5f3d7c3d 100644 --- a/app/Locale/th_TH/translations.php +++ b/app/Locale/th_TH/translations.php @@ -737,4 +737,5 @@ return array( // 'Compact view' => '', // 'Horizontal scrolling' => '', // 'Compact/wide view' => '', + // 'No results match:' => '', ); diff --git a/app/Locale/tr_TR/translations.php b/app/Locale/tr_TR/translations.php index 6c03bc41..3ea8c80c 100644 --- a/app/Locale/tr_TR/translations.php +++ b/app/Locale/tr_TR/translations.php @@ -737,4 +737,5 @@ return array( 'Compact view' => 'Ekrana sığdır', 'Horizontal scrolling' => 'Geniş görünüm', 'Compact/wide view' => 'Ekrana sığdır / Geniş görünüm', + // 'No results match:' => '', ); diff --git a/app/Locale/zh_CN/translations.php b/app/Locale/zh_CN/translations.php index cb36250b..575fe442 100644 --- a/app/Locale/zh_CN/translations.php +++ b/app/Locale/zh_CN/translations.php @@ -737,4 +737,5 @@ return array( // 'Compact view' => '', // 'Horizontal scrolling' => '', // 'Compact/wide view' => '', + // 'No results match:' => '', ); diff --git a/app/Template/board/filters.php b/app/Template/board/filters.php index fc5bfc34..2dd559b9 100644 --- a/app/Template/board/filters.php +++ b/app/Template/board/filters.php @@ -57,13 +57,13 @@ </span> </li> <li> - <?= $this->formSelect('user_id', $users, array(), array(), array('data-placeholder="'.t('Filter by user').'"'), 'apply-filters chosen-select') ?> + <?= $this->formSelect('user_id', $users, array(), array(), array('data-placeholder="'.t('Filter by user').'"', 'data-notfound="'.t('No results match:').'"'), 'apply-filters chosen-select') ?> </li> <li> - <?= $this->formSelect('category_id', $categories, array(), array(), array('data-placeholder="'.t('Filter by category').'"'), 'apply-filters chosen-select') ?> + <?= $this->formSelect('category_id', $categories, array(), array(), array('data-placeholder="'.t('Filter by category').'"', 'data-notfound="'.t('No results match:').'"'), 'apply-filters chosen-select') ?> </li> <li> - <select id="more-filters" multiple data-placeholder="<?= t('More filters') ?>" class="apply-filters chosen-select hide-mobile"> + <select id="more-filters" multiple data-placeholder="<?= t('More filters') ?>" data-notfound="<?= t('No results match:') ?>" class="apply-filters chosen-select hide-mobile"> <option value=""></option> <option value="filter-due-date"><?= t('Filter by due date') ?></option> <option value="filter-recent"><?= t('Filter recently updated') ?></option> diff --git a/app/Template/layout.php b/app/Template/layout.php index 6c88d33b..a5d34f4d 100644 --- a/app/Template/layout.php +++ b/app/Template/layout.php @@ -45,7 +45,7 @@ <ul> <?php if (isset($board_selector) && ! empty($board_selector)): ?> <li> - <select id="board-selector" data-placeholder="<?= t('Display another project') ?>" data-board-url="<?= $this->u('board', 'show', array('project_id' => 'PROJECT_ID')) ?>"> + <select id="board-selector" data-notfound="<?= t('No results match:') ?>" data-placeholder="<?= t('Display another project') ?>" data-board-url="<?= $this->u('board', 'show', array('project_id' => 'PROJECT_ID')) ?>"> <option value=""></option> <?php foreach($board_selector as $board_id => $board_name): ?> <option value="<?= $board_id ?>"><?= $this->e($board_name) ?></option> diff --git a/assets/js/app.js b/assets/js/app.js index 76413938..6e6f7f34 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -140,7 +140,7 @@ 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(){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);Mousetrap.bindGlobal("mod+enter",function(){$("form").submit()});Mousetrap.bind("b",function(a){a.preventDefault();$("#board-selector").trigger("chosen:open")});$(".column-tooltip").tooltip({content:function(){return'<div class="markdown">'+ +$("body").data("login-url")}}})},Init:function(){$("#board-selector").chosen({width:180,no_results_text:$("#board-selector").data("notfound")});$("#board-selector").change(function(){window.location=$(this).attr("data-board-url").replace(/PROJECT_ID/g,$(this).val())});window.setInterval(Kanboard.CheckSession,6E4);Mousetrap.bindGlobal("mod+enter",function(){$("form").submit()});Mousetrap.bind("b",function(a){a.preventDefault();$("#board-selector").trigger("chosen:open")});$(".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)}}});$.datepicker.setDefaults($.datepicker.regional[$("body").data("js-lang")]);Kanboard.InitAfterAjax()},InitAfterAjax:function(){$(document).on("click",".popover",Kanboard.Popover);$(".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({triggerParentEl:"span"})}}}(); Kanboard.Board=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(){p()})}function b(){$(".filter-expand-link").click(function(a){a.preventDefault(); @@ -151,10 +151,10 @@ c.of=$(b);a.position(c);$("#tooltip-subtasks a").not(".popover").click(function( 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(n,1E3*b))}function q(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(); k();h();g();l()}})}function n(){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);k();h();g();l()}}})}function h(){var a=$("#form-user_id").val(),b=$("#form-category_id").val(),c=$("#more-filters option[value=filter-due-date]").is(":selected"),d=$("#more-filters option[value=filter-recent]").is(":selected"),e=$("#board").data("project-id");$("[data-task-id]").each(function(e, 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"});$("#form-category_id").chosen({width:"200px"});$("#more-filters").chosen({width:"30%"});$(".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())})}(); +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())})}(); 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/base.js b/assets/js/src/base.js index e844ed27..6e92eb31 100644 --- a/assets/js/src/base.js +++ b/assets/js/src/base.js @@ -168,7 +168,8 @@ var Kanboard = (function() { // Project select box $("#board-selector").chosen({ - width: 180 + width: 180, + no_results_text: $("#board-selector").data("notfound") }); $("#board-selector").change(function() { diff --git a/assets/js/src/board.js b/assets/js/src/board.js index 7f856ce7..878cb98e 100644 --- a/assets/js/src/board.js +++ b/assets/js/src/board.js @@ -322,15 +322,18 @@ Kanboard.Board = (function() { var projectId = $('#board').data('project-id'); $("#form-user_id").chosen({ - width: "180px" + width: "180px", + no_results_text: $("#form-user_id").data("notfound") }); $("#form-category_id").chosen({ - width: "200px" + width: "200px", + no_results_text: $("#form-category_id").data("notfound") }); $("#more-filters").chosen({ - width: "30%" + width: "30%", + no_results_text: $("#more-filters").data("notfound") }); $(".apply-filters").change(function(e) { |