diff options
Diffstat (limited to 'assets/js/src/base.js')
-rw-r--r-- | assets/js/src/base.js | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/assets/js/src/base.js b/assets/js/src/base.js index 2fe287b4..75e04b3a 100644 --- a/assets/js/src/base.js +++ b/assets/js/src/base.js @@ -46,7 +46,7 @@ var Kanboard = (function() { $("#popover-content").click(function(e) { e.stopPropagation(); }); - + $(".close-popover").click(function(e) { e.preventDefault(); $('#popover-container').remove(); @@ -156,7 +156,7 @@ var Kanboard = (function() { cache: false, url: $("body").data("status-url"), statusCode: { - 401: function(data) { + 401: function() { window.location = $("body").data("login-url"); } } @@ -178,19 +178,19 @@ var Kanboard = (function() { // Check the session every 60s window.setInterval(Kanboard.CheckSession, 60000); - $(".popover-subtask-restriction").click(Kanboard.Popover); - - // Image preview for attachments - $(".file-popover").click(Kanboard.Popover); - // Keyboard shortcuts - Mousetrap.bind("ctrl+enter", function() { + Mousetrap.bindGlobal("mod+enter", function() { $("form").submit(); }); - + + Mousetrap.bind("b", function(e) { + e.preventDefault(); + $('#board-selector').trigger('chosen:open'); + }); + // Tooltip for column description $(".column-tooltip").tooltip({ - content: function(e) { + content: function() { return '<div class="markdown">' + $(this).attr("title") + '</div>'; } }); @@ -201,7 +201,10 @@ var Kanboard = (function() { }, InitAfterAjax: function() { - + + // Popover + $(document).on("click", ".popover", Kanboard.Popover); + // Datepicker $(".form-date").datepicker({ showOtherMonths: true, |