Grooming.
parent
49078d5308
commit
ef8ce02cf4
|
@ -18,6 +18,21 @@ module.exports = {
|
||||||
h \label.label args, [label]
|
h \label.label args, [label]
|
||||||
input: (args, children) ->
|
input: (args, children) ->
|
||||||
h \input.input args, children
|
h \input.input args, children
|
||||||
|
textarea: (args, children) ->
|
||||||
|
h \textarea.textarea args, children
|
||||||
|
control: (args, children) ->
|
||||||
|
h \div.control args, children
|
||||||
|
select: (selector, args, children) ->
|
||||||
|
if typeof(selector) == "object"
|
||||||
|
children = args
|
||||||
|
args = selector
|
||||||
|
|
||||||
|
h (\div.select + selector), {
|
||||||
|
} [
|
||||||
|
h \select {
|
||||||
|
onchange: args.onchange || ->
|
||||||
|
} children
|
||||||
|
]
|
||||||
|
|
||||||
# FIXME: Use only args and add args.label and args.input?
|
# FIXME: Use only args and add args.label and args.input?
|
||||||
# Or maybe args.name and args.type could be used directly?
|
# Or maybe args.name and args.type could be used directly?
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
h = require 'maquette' .h
|
h = require 'maquette' .h
|
||||||
Modal = require './modal.ls'
|
Modal = require './modal.ls'
|
||||||
|
|
||||||
|
{field, input, textarea, label, control, select} = require './bulma.ls'
|
||||||
|
|
||||||
colors = [
|
colors = [
|
||||||
"white"
|
"white"
|
||||||
"black"
|
"black"
|
||||||
|
@ -72,31 +74,41 @@ TaskCreationModal = (project, todod-ws, task, users) ->
|
||||||
# TITLE
|
# TITLE
|
||||||
#
|
#
|
||||||
|
|
||||||
h \input.input {
|
field [
|
||||||
value: self.title
|
label "Task title"
|
||||||
oninput: (e) ->
|
|
||||||
self.title := e.target.value
|
input {
|
||||||
}
|
value: self.title
|
||||||
|
oninput: (e) ->
|
||||||
|
self.title := e.target.value
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
#
|
field [
|
||||||
# DESCRIPTION
|
label "Task description"
|
||||||
#
|
|
||||||
|
|
||||||
h \textarea {
|
#
|
||||||
value: self.description
|
# DESCRIPTION
|
||||||
oninput: (e) ->
|
#
|
||||||
self.description := e.target.value
|
|
||||||
}
|
textarea {
|
||||||
|
value: self.description
|
||||||
|
oninput: (e) ->
|
||||||
|
self.description := e.target.value
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
h \p [ "Choose the column" ]
|
field [
|
||||||
|
label "Initial column"
|
||||||
|
|
||||||
h \div.select [
|
control [
|
||||||
h \select {
|
select \.is-fullwidth {
|
||||||
onchange: (e) ->
|
onchange: (e) ->
|
||||||
self.extra_properties.column := e.target.value
|
self.extra_properties.column := e.target.value
|
||||||
} project.extra_properties.columns.map (column) -> column-form-selection self, column
|
} project.extra_properties.columns.map (column) -> column-form-selection self, column
|
||||||
|
]
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
@ -106,13 +118,13 @@ TaskCreationModal = (project, todod-ws, task, users) ->
|
||||||
|
|
||||||
h \hr []
|
h \hr []
|
||||||
|
|
||||||
h \p [ "Assign someone to the task" ]
|
field [
|
||||||
|
label "Assigned user"
|
||||||
|
|
||||||
h \div.field.has-addons {
|
control {
|
||||||
key: "assign-someone-to-task"
|
key: "assign-someone-to-task"
|
||||||
} [
|
} [
|
||||||
h \div.select.control [
|
select \.is-fullwidth {
|
||||||
h \select {
|
|
||||||
onchange: (e) ->
|
onchange: (e) ->
|
||||||
self.extra_properties.assignee-id := e.target.value
|
self.extra_properties.assignee-id := e.target.value
|
||||||
} [
|
} [
|
||||||
|
@ -128,13 +140,15 @@ TaskCreationModal = (project, todod-ws, task, users) ->
|
||||||
# BACKGROUND COLOR
|
# BACKGROUND COLOR
|
||||||
#
|
#
|
||||||
|
|
||||||
h \p [ "Choose the background color" ]
|
field [
|
||||||
|
label "Card background color"
|
||||||
|
|
||||||
h \div.select [
|
control [
|
||||||
h \select {
|
select \.is-fullwidth {
|
||||||
onchange: (e) ->
|
onchange: (e) ->
|
||||||
self.extra_properties.background-color := e.target.value
|
self.extra_properties.background-color := e.target.value
|
||||||
} colors.map (color) -> color-to-form-selection self, color, self.extra_properties.background-color
|
} colors.map (color) -> color-to-form-selection self, color, self.extra_properties.background-color
|
||||||
|
]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue