summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/Template/layout.php2
-rw-r--r--assets/js/app.js2
-rw-r--r--assets/js/src/base.js2
3 files changed, 3 insertions, 3 deletions
diff --git a/app/Template/layout.php b/app/Template/layout.php
index 283a85f8..f04dad4b 100644
--- a/app/Template/layout.php
+++ b/app/Template/layout.php
@@ -35,7 +35,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' => '%d')) ?>">
+ <select id="board-selector" 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 2832d5af..81af5121 100644
--- a/assets/js/app.js
+++ b/assets/js/app.js
@@ -28,7 +28,7 @@ function(a){!e&&this._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,f=!
"";"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,d){"undefined"!==typeof Storage&&localStorage.setItem(a,d)},GetStorageItem:function(a){return"undefined"!==typeof Storage?localStorage.getItem(a):""},MarkdownPreview:function(a){a.preventDefault();
var d=$(this),f=$(this).closest("ul"),e=$(".write-area"),c=$(".preview-area"),b=$("textarea");$.ajax({url:"?controller=app&action=preview",contentType:"application/json",type:"POST",processData:!1,dataType:"html",data:JSON.stringify({text:b.val()})}).done(function(a){f.find("li").removeClass("form-tab-selected");d.parent().addClass("form-tab-selected");c.find(".markdown").html(a);c.css("height",b.css("height"));c.css("width",b.css("width"));e.hide();c.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(a){window.location=$("body").data("login-url")}}})},Init:function(){$(".form-date").datepicker({showOtherMonths:!0,selectOtherMonths:!0,dateFormat:"yy-mm-dd",constrainInput:!1});$("#board-selector").chosen({width:180});
-$("#board-selector").change(function(){window.location=$(this).attr("data-board-url").replace(/%d/g,$(this).val())});$("#markdown-preview").click(Kanboard.MarkdownPreview);$("#markdown-write").click(Kanboard.MarkdownWriter);window.setInterval(Kanboard.CheckSession,6E4);$(".auto-select").focus(function(){$(this).select()})}}}();
+$("#board-selector").change(function(){window.location=$(this).attr("data-board-url").replace(/PROJECT_ID/g,$(this).val())});$("#markdown-preview").click(Kanboard.MarkdownPreview);$("#markdown-write").click(Kanboard.MarkdownWriter);window.setInterval(Kanboard.CheckSession,6E4);$(".auto-select").focus(function(){$(this).select()})}}}();
Kanboard.Board=function(){function a(a){Kanboard.Popover(a,Kanboard.Init)}function d(){$(".column").sortable({delay:300,distance:5,connectWith:".column",placeholder:"draggable-placeholder",stop:function(a,b){e(b.item.attr("data-task-id"),b.item.parent().attr("data-column-id"),b.item.index()+1,b.item.parent().attr("data-swimlane-id"))}});$(".assignee-popover").click(Kanboard.Popover);$(".category-popover").click(Kanboard.Popover);$(".task-edit-popover").click(a);$(".task-creation-popover").click(a);
$(".task-description-popover").click(a);$(".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(b){if(b=$(this).attr("data-href")){var a=this;$.get(b,function k(b){$(".ui-tooltip-content:visible").html(b);b=$(".ui-tooltip:visible");b.css({top:"",
left:""});b.children(".tooltip-arrow").remove();var c=$(a).tooltip("option","position");c.of=$(a);b.position(c);$("#tooltip-subtasks a").click(function(b){b.preventDefault();b.stopPropagation();$.get($(this).attr("href"),k)})});return'<i class="fa fa-refresh fa-spin fa-2x"></i>'}}}).on("mouseenter",function(){var b=this;$(this).tooltip("open");$(".ui-tooltip").on("mouseleave",function(){$(b).tooltip("close")})}).on("mouseleave focusout",function(b){b.stopImmediatePropagation();var a=this;setTimeout(function(){$(".ui-tooltip:hover").length||
diff --git a/assets/js/src/base.js b/assets/js/src/base.js
index 75d23b88..8d292a5f 100644
--- a/assets/js/src/base.js
+++ b/assets/js/src/base.js
@@ -162,7 +162,7 @@ var Kanboard = (function() {
});
$("#board-selector").change(function() {
- window.location = $(this).attr("data-board-url").replace(/%d/g, $(this).val());
+ window.location = $(this).attr("data-board-url").replace(/PROJECT_ID/g, $(this).val());
});
// Markdown Preview for textareas