mirror of
https://github.com/lxsang/antos-frontend.git
synced 2024-12-27 01:38:21 +01:00
some fix
This commit is contained in:
parent
755a922c48
commit
cbd5762d36
@ -18,7 +18,7 @@
|
||||
<afx-label text = "To:" style="text-align:center;" data-width= "70"></afx-label>
|
||||
<input type = "text" name="end" input-class = "user-input"/>
|
||||
</afx-hbox>
|
||||
<afx-label data-height = "30" text = "Content*:" style = "margin-left:5px;"/>
|
||||
<afx-label data-height = "30" text = "Content:" style = "margin-left:5px;"/>
|
||||
<textarea name="content" input-class = "user-input" style = "margin-left:5px; margin-right:5px;" />
|
||||
<afx-hbox data-height = "30">
|
||||
<div></div>
|
||||
|
@ -65,7 +65,7 @@ class BloggerCVSectionDiaglog extends this.OS.GUI.BaseDialog
|
||||
console.log inputs
|
||||
data[v.name] = ($ v).val() for v in inputs
|
||||
return me.notify "Title must not be blank" if data.title is ""
|
||||
return me.notify "Content must not be blank" if data.content is ""
|
||||
#return me.notify "Content must not be blank" if data.content is ""
|
||||
data.id = me.data.id if me.data and me.data.id
|
||||
me.handler data if me.handler
|
||||
me.quit()
|
||||
|
@ -69,7 +69,8 @@ class Blogger extends this.OS.GUI.BaseApplication
|
||||
me.openDialog "YesNoDialog",
|
||||
(d) ->
|
||||
return unless d
|
||||
console.log "delete all child + theirs content"
|
||||
me.deleteCVCat cat
|
||||
me.refreshCVCat()
|
||||
, "Delete cagegory" ,
|
||||
{ iconclass: "fa fa-question-circle", text: "Do you really want to delete: #{cat.name} ?" }
|
||||
|
||||
@ -206,6 +207,23 @@ class Blogger extends this.OS.GUI.BaseApplication
|
||||
#v.nodes = null if v.nodes.length is 0
|
||||
data.nodes.push v
|
||||
|
||||
deleteCVCat: (cat) ->
|
||||
me = @
|
||||
ids = []
|
||||
func = (c) ->
|
||||
ids.push c.id
|
||||
func(v) for v in c.nodes if c.nodes
|
||||
func(cat)
|
||||
console.log dis
|
||||
return
|
||||
#delete all child
|
||||
@deleteCVCat v for v in cat.nodes if cat.nodes
|
||||
# delete all content
|
||||
@cvsecdb.delete { "=": { cid: cat.id } }, (r) ->
|
||||
return me.error "Cannot delete all content of: #{cat.name} [#{r.error}]" if r.error
|
||||
me.cvcatdb.delete cat.id, (re) ->
|
||||
return me.error "Cannot delete the category: #{cat.name} [#{re.error}]" if re.error
|
||||
|
||||
CVSectionByCID: (cid) ->
|
||||
me = @
|
||||
cond =
|
||||
|
Loading…
Reference in New Issue
Block a user