update Blogger

This commit is contained in:
lxsang 2019-06-11 18:33:14 +02:00
parent 3e008c472b
commit 5db6901770
4 changed files with 10 additions and 2 deletions

View File

@ -25,6 +25,7 @@
</div>
<afx-hbox data-height = "35">
<div></div>
<afx-switch data data-id = "section-publish" data-width="30"></afx-switch>
<afx-button iconclass = "fa fa-save" data-id = "bt-cv-sec-save" data-width="60" text = "__(Save)"/>
</afx-hbox>
</afx-vbox>

View File

@ -84,6 +84,7 @@ class BloggerCVSectionDiaglog extends this.OS.GUI.BaseDialog
inputs = me.select "[input-class='user-input']"
(($ v).val me.data[v.name] for v in inputs ) if me.data
@editor.value me.data.content if me.data and me.data.content
(me.find "section-publish").set "swon", (if Number(me.data.publish) then true else false)
(@find "bt-cv-sec-save").set "onbtclick", (e) ->
data = {}
console.log inputs
@ -92,6 +93,11 @@ class BloggerCVSectionDiaglog extends this.OS.GUI.BaseDialog
return me.notify __("Title or content must not be blank") if data.title is "" and 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
if (me.find "section-publish").get "swon"
data.publish = 1
else
data.publish = 0
me.handler data if me.handler
me.quit()
me.resizeContent()

View File

@ -127,7 +127,7 @@ class Blogger extends this.OS.GUI.BaseApplication
d.cid = Number sec.cid
d.start = Number d.start
d.end = Number d.end
d.publish = Number sec.publish
#d.publish = Number sec.publish
me.cvsecdb.save d, (r) ->
return me.error __("Cannot save section: {0}", r.error) if r.error
me.CVSectionByCID Number(sec.cid)
@ -322,6 +322,7 @@ class Blogger extends this.OS.GUI.BaseApplication
, __("Delete section") ,
{ iconclass: "fa fa-question-circle", text: __("Do you really want to delete: {0}?",e.item.item.text) }
return false
el.set "items", items
# blog

View File

@ -6,7 +6,7 @@
"author": "Xuan Sang LE",
"email": "xsang.le@gmail.com"
},
"version":"0.0.2-a",
"version":"0.0.3-a",
"category":"Internet",
"iconclass":"fa fa-book",
"mimes":["none"]