Replace color dropdown by color picker in task forms

This commit is contained in:
Frederic Guillot
2015-09-05 18:24:46 -04:00
parent 70d3340cd0
commit c62e14f1cc
14 changed files with 66 additions and 22 deletions

View File

@@ -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();

10
assets/js/src/Task.js Normal file
View File

@@ -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"));
});
};