1
0
Fork 0
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:
Harvey Kandola 2019-01-26 20:02:03 +00:00
parent 5faf6bda9b
commit 9219dd9296
2 changed files with 776 additions and 772 deletions

File diff suppressed because one or more lines are too long

View file

@ -15,9 +15,9 @@ import Component from '@ember/component';
export default Component.extend(Modals, {
labelName: '',
labelColor: '',
labelColor: '#263238',
editLabel: null,
deleetLabel: null,
deleteLabel: null,
showDeleteDialog: false,
actions: {
@ -49,6 +49,10 @@ export default Component.extend(Modals, {
color: this.get('labelColor').trim(),
}
if (label.color === '') {
label.color = '#263238';
}
if (is.empty(label.name)) {
$('#add-label-name').addClass('is-invalid').focus();
return;