Add dropdown menu to the tasks
This commit is contained in:
@@ -160,17 +160,8 @@ var Kanboard = (function() {
|
||||
}
|
||||
},
|
||||
|
||||
// Common init
|
||||
Init: function() {
|
||||
|
||||
// Datepicker
|
||||
$(".form-date").datepicker({
|
||||
showOtherMonths: true,
|
||||
selectOtherMonths: true,
|
||||
dateFormat: 'yy-mm-dd',
|
||||
constrainInput: false
|
||||
});
|
||||
|
||||
// Project select box
|
||||
$("#board-selector").chosen({
|
||||
width: 180
|
||||
@@ -180,23 +171,38 @@ var Kanboard = (function() {
|
||||
window.location = $(this).attr("data-board-url").replace(/PROJECT_ID/g, $(this).val());
|
||||
});
|
||||
|
||||
// Check the session every 60s
|
||||
window.setInterval(Kanboard.CheckSession, 60000);
|
||||
|
||||
Mousetrap.bind("ctrl+enter", function() {
|
||||
$("form").submit();
|
||||
});
|
||||
|
||||
Kanboard.InitAfterAjax();
|
||||
},
|
||||
|
||||
InitAfterAjax: function() {
|
||||
|
||||
// Datepicker
|
||||
$(".form-date").datepicker({
|
||||
showOtherMonths: true,
|
||||
selectOtherMonths: true,
|
||||
dateFormat: 'yy-mm-dd',
|
||||
constrainInput: false
|
||||
});
|
||||
|
||||
// Markdown Preview for textareas
|
||||
$("#markdown-preview").click(Kanboard.MarkdownPreview);
|
||||
$("#markdown-write").click(Kanboard.MarkdownWriter);
|
||||
|
||||
// Check the session every 60s
|
||||
window.setInterval(Kanboard.CheckSession, 60000);
|
||||
|
||||
// Auto-select input fields
|
||||
$(".auto-select").focus(function() {
|
||||
$(this).select();
|
||||
});
|
||||
|
||||
Mousetrap.bind("ctrl+enter", function() {
|
||||
$("form").submit();
|
||||
});
|
||||
|
||||
$('.dropdown').dropit();
|
||||
// Dropdown
|
||||
$(".dropit-submenu").hide();
|
||||
$('.dropdown').not(".dropit").dropit();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ Kanboard.Board = (function() {
|
||||
|
||||
function on_popover(e)
|
||||
{
|
||||
Kanboard.Popover(e, Kanboard.Init);
|
||||
Kanboard.Popover(e, Kanboard.InitAfterAjax);
|
||||
}
|
||||
|
||||
function keyboard_shortcuts()
|
||||
@@ -13,7 +13,7 @@ Kanboard.Board = (function() {
|
||||
|
||||
Kanboard.OpenPopover(
|
||||
$(".task-creation-popover").attr('href'),
|
||||
Kanboard.Init
|
||||
Kanboard.InitAfterAjax
|
||||
);
|
||||
});
|
||||
}
|
||||
@@ -38,10 +38,10 @@ Kanboard.Board = (function() {
|
||||
});
|
||||
|
||||
// Assignee change
|
||||
$(".assignee-popover").click(Kanboard.Popover);
|
||||
$(".assignee-popover").click(on_popover);
|
||||
|
||||
// Category change
|
||||
$(".category-popover").click(Kanboard.Popover);
|
||||
$(".category-popover").click(on_popover);
|
||||
|
||||
// Task edit popover
|
||||
$(".task-edit-popover").click(on_popover);
|
||||
@@ -50,6 +50,7 @@ Kanboard.Board = (function() {
|
||||
// Description popover
|
||||
$(".task-description-popover").click(on_popover);
|
||||
|
||||
// Tooltip for column description
|
||||
$(".column-tooltip").tooltip({
|
||||
content: function(e) {
|
||||
return $(this).attr("title");
|
||||
@@ -175,6 +176,7 @@ Kanboard.Board = (function() {
|
||||
success: function(data) {
|
||||
$("#board").remove();
|
||||
$("#main").append(data);
|
||||
Kanboard.InitAfterAjax();
|
||||
board_load_events();
|
||||
filter_apply();
|
||||
}
|
||||
@@ -192,6 +194,7 @@ Kanboard.Board = (function() {
|
||||
200: function(data) {
|
||||
$("#board").remove();
|
||||
$("#main").append(data);
|
||||
Kanboard.InitAfterAjax();
|
||||
board_unload_events();
|
||||
board_load_events();
|
||||
filter_apply();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Initialization
|
||||
$(function() {
|
||||
|
||||
jQuery(document).ready(function() {
|
||||
|
||||
Kanboard.Init();
|
||||
|
||||
if (Kanboard.Exists("board")) {
|
||||
|
||||
Reference in New Issue
Block a user