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