1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-23 15:19:42 +02:00

More UI conversion to new framework

This commit is contained in:
Harvey Kandola 2018-05-24 18:09:38 +01:00
parent a453052087
commit 5d757c992f
17 changed files with 442 additions and 416 deletions

View file

@ -22,7 +22,6 @@ export default Component.extend(ModalMixin, TooltipMixin, {
categorySvc: service('category'),
appMeta: service(),
store: service(),
newCategory: '',
deleteId: '',
dropdown: null,
@ -92,29 +91,6 @@ export default Component.extend(ModalMixin, TooltipMixin, {
},
actions: {
onAdd(e) {
e.preventDefault();
let cat = this.get('newCategory');
if (cat === '') {
$('#new-category-name').addClass('is-invalid').focus();
return;
}
$('#new-category-name').removeClass('is-invalid').focus();
this.set('newCategory', '');
let c = {
category: cat,
folderId: this.get('folder.id')
};
this.get('categorySvc').add(c).then(() => {
this.load();
});
},
onShowDelete(id) {
let cat = this.get('category').findBy('id', id);
this.set('deleteId', cat.get('id'));