mirror of
https://github.com/documize/community.git
synced 2025-07-24 23:59:47 +02:00
edit category
This commit is contained in:
parent
4874d23f15
commit
ea38729f55
3 changed files with 11 additions and 3 deletions
|
@ -279,7 +279,7 @@ func (h *Handler) Delete(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
|
||||
/*
|
||||
6. add category view permission !!!
|
||||
7. link/unlink document to category
|
||||
6. add category view permission !!!
|
||||
8. filter space documents by category -- URL param? nested route?
|
||||
*/
|
||||
|
|
|
@ -78,10 +78,18 @@ export default Ember.Component.extend(NotifierMixin, {
|
|||
|
||||
onCancel(id) {
|
||||
this.setEdit(id, false);
|
||||
this.load();
|
||||
},
|
||||
|
||||
onSave(id) {
|
||||
let cat = this.setEdit(id, false);
|
||||
let cat = this.setEdit(id, true);
|
||||
if (cat.get('category') === '') {
|
||||
$('#edit-category-' + cat.get('id')).addClass('error').focus();
|
||||
return;
|
||||
}
|
||||
|
||||
cat = this.setEdit(id, false);
|
||||
$('#edit-category-' + cat.get('id')).removeClass('error');
|
||||
|
||||
this.get('categoryService').save(cat).then(() => {
|
||||
this.load();
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
<div class="margin-top-30"><i>No categories defined yet</i></div>
|
||||
{{/each}}
|
||||
</div>
|
||||
<div class="input-control margin-top-50">
|
||||
<div class="input-control margin-top-50 width-60">
|
||||
<label>Add Category</label>
|
||||
<div class="tip">Provide a short name</div>
|
||||
{{focus-input id="new-category-name" type="text" value=newCategory}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue