diff options
Diffstat (limited to 'assets/js/src')
-rw-r--r-- | assets/js/src/App.js | 2 | ||||
-rw-r--r-- | assets/js/src/Task.js | 10 |
2 files changed, 12 insertions, 0 deletions
diff --git a/assets/js/src/App.js b/assets/js/src/App.js index 2872baf6..02aa7693 100644 --- a/assets/js/src/App.js +++ b/assets/js/src/App.js @@ -7,6 +7,7 @@ function App() { this.dropdown = new Dropdown(); this.tooltip = new Tooltip(this); this.popover = new Popover(this); + this.task = new Task(); this.keyboardShortcuts(); this.chosen(); this.poll(); @@ -34,6 +35,7 @@ App.prototype.listen = function() { this.tooltip.listen(); this.dropdown.listen(); this.search.listen(); + this.task.listen(); this.search.focus(); this.taskAutoComplete(); this.datePicker(); diff --git a/assets/js/src/Task.js b/assets/js/src/Task.js new file mode 100644 index 00000000..b3dc1b63 --- /dev/null +++ b/assets/js/src/Task.js @@ -0,0 +1,10 @@ +function Task() { +} + +Task.prototype.listen = function() { + $(document).on("click", ".color-square", function() { + $(".color-square-selected").removeClass("color-square-selected"); + $(this).addClass("color-square-selected"); + $("#form-color_id").val($(this).data("color-id")); + }); +}; |