todo.js
1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/**
Todo Module
**/
var AppTodo = function () {
// private functions & variables
var _initComponents = function() {
// init datepicker
$('.todo-taskbody-due').datepicker({
rtl: App.isRTL(),
orientation: "left",
autoclose: true
});
// init tags
$(".todo-taskbody-tags").select2({
tags: ["Testing", "Important", "Info", "Pending", "Completed", "Requested", "Approved"]
});
}
var _handleProjectListMenu = function() {
if (App.getViewPort().width <= 992) {
$('.todo-project-list-content').addClass("collapse");
} else {
$('.todo-project-list-content').removeClass("collapse").css("height", "auto");
}
}
// public functions
return {
//main function
init: function () {
_initComponents();
_handleProjectListMenu();
App.addResizeHandler(function(){
_handleProjectListMenu();
});
}
};
}();
jQuery(document).ready(function() {
AppTodo.init();
});