mirror of
https://github.com/lxsang/antos-frontend.git
synced 2025-02-22 09:52:47 +01:00
update Blogger
This commit is contained in:
parent
3e008c472b
commit
5db6901770
@ -25,6 +25,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<afx-hbox data-height = "35">
|
<afx-hbox data-height = "35">
|
||||||
<div></div>
|
<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-button iconclass = "fa fa-save" data-id = "bt-cv-sec-save" data-width="60" text = "__(Save)"/>
|
||||||
</afx-hbox>
|
</afx-hbox>
|
||||||
</afx-vbox>
|
</afx-vbox>
|
||||||
|
@ -84,6 +84,7 @@ class BloggerCVSectionDiaglog extends this.OS.GUI.BaseDialog
|
|||||||
inputs = me.select "[input-class='user-input']"
|
inputs = me.select "[input-class='user-input']"
|
||||||
(($ v).val me.data[v.name] for v in inputs ) if me.data
|
(($ 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
|
@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) ->
|
(@find "bt-cv-sec-save").set "onbtclick", (e) ->
|
||||||
data = {}
|
data = {}
|
||||||
console.log inputs
|
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 __("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 ""
|
#return me.notify "Content must not be blank" if data.content is ""
|
||||||
data.id = me.data.id if me.data and me.data.id
|
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.handler data if me.handler
|
||||||
me.quit()
|
me.quit()
|
||||||
me.resizeContent()
|
me.resizeContent()
|
||||||
|
@ -127,7 +127,7 @@ class Blogger extends this.OS.GUI.BaseApplication
|
|||||||
d.cid = Number sec.cid
|
d.cid = Number sec.cid
|
||||||
d.start = Number d.start
|
d.start = Number d.start
|
||||||
d.end = Number d.end
|
d.end = Number d.end
|
||||||
d.publish = Number sec.publish
|
#d.publish = Number sec.publish
|
||||||
me.cvsecdb.save d, (r) ->
|
me.cvsecdb.save d, (r) ->
|
||||||
return me.error __("Cannot save section: {0}", r.error) if r.error
|
return me.error __("Cannot save section: {0}", r.error) if r.error
|
||||||
me.CVSectionByCID Number(sec.cid)
|
me.CVSectionByCID Number(sec.cid)
|
||||||
@ -322,6 +322,7 @@ class Blogger extends this.OS.GUI.BaseApplication
|
|||||||
, __("Delete section") ,
|
, __("Delete section") ,
|
||||||
{ iconclass: "fa fa-question-circle", text: __("Do you really want to delete: {0}?",e.item.item.text) }
|
{ iconclass: "fa fa-question-circle", text: __("Do you really want to delete: {0}?",e.item.item.text) }
|
||||||
return false
|
return false
|
||||||
|
|
||||||
el.set "items", items
|
el.set "items", items
|
||||||
|
|
||||||
# blog
|
# blog
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
"author": "Xuan Sang LE",
|
"author": "Xuan Sang LE",
|
||||||
"email": "xsang.le@gmail.com"
|
"email": "xsang.le@gmail.com"
|
||||||
},
|
},
|
||||||
"version":"0.0.2-a",
|
"version":"0.0.3-a",
|
||||||
"category":"Internet",
|
"category":"Internet",
|
||||||
"iconclass":"fa fa-book",
|
"iconclass":"fa fa-book",
|
||||||
"mimes":["none"]
|
"mimes":["none"]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user