Improve js and add native language support for datepicker and calendar

This commit is contained in:
Frederic Guillot
2015-02-08 15:07:47 -05:00
parent 813b7c4c00
commit acf3941b4a
77 changed files with 182 additions and 678 deletions

View File

@@ -1,6 +1,10 @@
// Common functions
var Kanboard = (function() {
jQuery(document).ready(function() {
Kanboard.Init();
});
return {
// Return true if the element#id exists
@@ -174,11 +178,17 @@ 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() {
$("form").submit();
});
$(".popover-subtask-restriction").click(Kanboard.Popover);
$.datepicker.setDefaults($.datepicker.regional[$("body").data("js-lang")]);
Kanboard.InitAfterAjax();
},