mirror of
https://github.com/documize/community.git
synced 2025-07-23 15:19:42 +02:00
Set default label color if user does not pick one
This commit is contained in:
parent
5faf6bda9b
commit
9219dd9296
2 changed files with 776 additions and 772 deletions
1540
embed/bindata.go
1540
embed/bindata.go
File diff suppressed because one or more lines are too long
|
@ -15,9 +15,9 @@ import Component from '@ember/component';
|
||||||
|
|
||||||
export default Component.extend(Modals, {
|
export default Component.extend(Modals, {
|
||||||
labelName: '',
|
labelName: '',
|
||||||
labelColor: '',
|
labelColor: '#263238',
|
||||||
editLabel: null,
|
editLabel: null,
|
||||||
deleetLabel: null,
|
deleteLabel: null,
|
||||||
showDeleteDialog: false,
|
showDeleteDialog: false,
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
|
@ -49,6 +49,10 @@ export default Component.extend(Modals, {
|
||||||
color: this.get('labelColor').trim(),
|
color: this.get('labelColor').trim(),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (label.color === '') {
|
||||||
|
label.color = '#263238';
|
||||||
|
}
|
||||||
|
|
||||||
if (is.empty(label.name)) {
|
if (is.empty(label.name)) {
|
||||||
$('#add-label-name').addClass('is-invalid').focus();
|
$('#add-label-name').addClass('is-invalid').focus();
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue