mirror of
https://github.com/antos-rde/antosdk-apps.git
synced 2024-12-25 03:38:21 +01:00
Update Blogger and Booklet to use new MDE library
This commit is contained in:
parent
de639e6d39
commit
7c161236f3
@ -6,6 +6,7 @@ Blackend for my blog at https://blog.iohub.dev
|
|||||||
## Change logs
|
## Change logs
|
||||||
|
|
||||||
### v0.2.x-a
|
### v0.2.x-a
|
||||||
|
* Patch 9: Update to use the new MDE library
|
||||||
* Patch 8: Support for antOS 2.0.x
|
* Patch 8: Support for antOS 2.0.x
|
||||||
* Patch 7: Fix sendmail API security bug
|
* Patch 7: Fix sendmail API security bug
|
||||||
* Patch 6: Chage libraries load order
|
* Patch 6: Chage libraries load order
|
||||||
|
@ -6,6 +6,7 @@ Blackend for my blog at https://blog.iohub.dev
|
|||||||
## Change logs
|
## Change logs
|
||||||
|
|
||||||
### v0.2.x-a
|
### v0.2.x-a
|
||||||
|
* Patch 9: Update to use the new MDE library
|
||||||
* Patch 8: Support for antOS 2.0.x
|
* Patch 8: Support for antOS 2.0.x
|
||||||
* Patch 7: Fix sendmail API security bug
|
* Patch 7: Fix sendmail API security bug
|
||||||
* Patch 6: Chage libraries load order
|
* Patch 6: Chage libraries load order
|
||||||
|
File diff suppressed because one or more lines are too long
@ -6,9 +6,9 @@
|
|||||||
"author": "Xuan Sang LE",
|
"author": "Xuan Sang LE",
|
||||||
"email": "xsang.le@gmail.com"
|
"email": "xsang.le@gmail.com"
|
||||||
},
|
},
|
||||||
"version":"0.2.8-a",
|
"version":"0.2.9-a",
|
||||||
"category":"Internet",
|
"category":"Internet",
|
||||||
"iconclass":"fa fa-book",
|
"iconclass":"fa fa-book",
|
||||||
"dependencies": ["SimpleMDE@1.11.2-r","Katex@0.11.1-r"],
|
"dependencies": ["SimpleMDE@2.18.0-r","Katex@0.11.1-r"],
|
||||||
"mimes":["none"]
|
"mimes":["none"]
|
||||||
}
|
}
|
Binary file not shown.
@ -81,7 +81,7 @@ class BloggerCVSectionDiaglog extends this.OS.GUI.BasicDialog
|
|||||||
|
|
||||||
main: () ->
|
main: () ->
|
||||||
super.main()
|
super.main()
|
||||||
@editor = new SimpleMDE
|
@editor = new EasyMDE
|
||||||
autoDownloadFontAwesome: false
|
autoDownloadFontAwesome: false
|
||||||
element: @find "contentarea"
|
element: @find "contentarea"
|
||||||
status: false
|
status: false
|
||||||
@ -107,14 +107,14 @@ class BloggerCVSectionDiaglog extends this.OS.GUI.BasicDialog
|
|||||||
@handle data if @handle
|
@handle data if @handle
|
||||||
@quit()
|
@quit()
|
||||||
|
|
||||||
@on "vboxchange", () => @resizeContent()
|
@on "resize", () => @resizeContent()
|
||||||
@resizeContent()
|
@resizeContent()
|
||||||
|
|
||||||
resizeContent: () ->
|
resizeContent: () ->
|
||||||
container = @find "editor-container"
|
container = @find "editor-container"
|
||||||
children = ($ container).children()
|
children = ($ ".EasyMDEContainer", container).children()
|
||||||
cheight = ($ container).height() - 30
|
cheight = ($ container).height() - 30
|
||||||
($ children[1]).css("height", cheight + "px")
|
($ children[0]).css("height", cheight + "px")
|
||||||
|
|
||||||
|
|
||||||
# this dialog is for send mail
|
# this dialog is for send mail
|
||||||
|
@ -187,7 +187,7 @@ class Blogger extends this.OS.application.BaseApplication
|
|||||||
.catch (e) => @error __("Cannot delete the section: {0}", e.toString()), e
|
.catch (e) => @error __("Cannot delete the section: {0}", e.toString()), e
|
||||||
return false
|
return false
|
||||||
|
|
||||||
@editor = new SimpleMDE
|
@editor = new EasyMDE
|
||||||
element: @find "markarea"
|
element: @find "markarea"
|
||||||
autoDownloadFontAwesome: false
|
autoDownloadFontAwesome: false
|
||||||
autofocus: true
|
autofocus: true
|
||||||
@ -237,7 +237,7 @@ class Blogger extends this.OS.application.BaseApplication
|
|||||||
className: "fa fa-eye no-disable",
|
className: "fa fa-eye no-disable",
|
||||||
action: (e) =>
|
action: (e) =>
|
||||||
@previewOn = !@previewOn
|
@previewOn = !@previewOn
|
||||||
SimpleMDE.togglePreview e
|
EasyMDE.togglePreview e
|
||||||
#/console.log @select ".editor-preview editor-preview-active"
|
#/console.log @select ".editor-preview editor-preview-active"
|
||||||
renderMathInElement @find "editor-container"
|
renderMathInElement @find "editor-container"
|
||||||
},
|
},
|
||||||
@ -294,7 +294,7 @@ class Blogger extends this.OS.application.BaseApplication
|
|||||||
sel = @tabcontainer.selectedTab
|
sel = @tabcontainer.selectedTab
|
||||||
return unless sel and sel.container.aid is "blog-container"
|
return unless sel and sel.container.aid is "blog-container"
|
||||||
@saveBlog()
|
@saveBlog()
|
||||||
@on "vboxchange", () =>
|
@on "resize", () =>
|
||||||
@resizeContent()
|
@resizeContent()
|
||||||
|
|
||||||
@resizeContent()
|
@resizeContent()
|
||||||
@ -489,12 +489,12 @@ class Blogger extends this.OS.application.BaseApplication
|
|||||||
|
|
||||||
resizeContent: () ->
|
resizeContent: () ->
|
||||||
container = @find "editor-container"
|
container = @find "editor-container"
|
||||||
children = ($ container).children()
|
children = ($ ".EasyMDEContainer", container).children()
|
||||||
titlebar = (($ @scheme).find ".afx-window-top")[0]
|
titlebar = (($ @scheme).find ".afx-window-top")[0]
|
||||||
toolbar = children[1]
|
toolbar = children[0]
|
||||||
statusbar = children[4]
|
statusbar = children[3]
|
||||||
cheight = ($ @scheme).height() - ($ titlebar).height() - ($ toolbar).height() - ($ statusbar).height() - 90
|
cheight = ($ @scheme).height() - ($ titlebar).height() - ($ toolbar).height() - ($ statusbar).height() - 90
|
||||||
($ children[2]).css("height", cheight + "px")
|
($ children[1]).css("height", cheight + "px")
|
||||||
|
|
||||||
Blogger.singleton = true
|
Blogger.singleton = true
|
||||||
Blogger.dependencies = [
|
Blogger.dependencies = [
|
||||||
|
@ -6,9 +6,9 @@
|
|||||||
"author": "Xuan Sang LE",
|
"author": "Xuan Sang LE",
|
||||||
"email": "xsang.le@gmail.com"
|
"email": "xsang.le@gmail.com"
|
||||||
},
|
},
|
||||||
"version":"0.2.8-a",
|
"version":"0.2.9-a",
|
||||||
"category":"Internet",
|
"category":"Internet",
|
||||||
"iconclass":"fa fa-book",
|
"iconclass":"fa fa-book",
|
||||||
"dependencies": ["SimpleMDE@1.11.2-r","Katex@0.11.1-r"],
|
"dependencies": ["SimpleMDE@2.18.0-r","Katex@0.11.1-r"],
|
||||||
"mimes":["none"]
|
"mimes":["none"]
|
||||||
}
|
}
|
@ -3,6 +3,8 @@ A back-end tool for my online document hub [https://doc.iohub.dev/antos/](https:
|
|||||||
|
|
||||||
|
|
||||||
## Change logs
|
## Change logs
|
||||||
|
### v0.2.5-a
|
||||||
|
* Use the new MDE library
|
||||||
### v0.2.3-a
|
### v0.2.3-a
|
||||||
* Chage app category name
|
* Chage app category name
|
||||||
### v0.2.1-a
|
### v0.2.1-a
|
||||||
|
@ -3,6 +3,8 @@ A back-end tool for my online document hub [https://doc.iohub.dev/antos/](https:
|
|||||||
|
|
||||||
|
|
||||||
## Change logs
|
## Change logs
|
||||||
|
### v0.2.5-a
|
||||||
|
* Use the new MDE library
|
||||||
### v0.2.3-a
|
### v0.2.3-a
|
||||||
* Chage app category name
|
* Chage app category name
|
||||||
### v0.2.1-a
|
### v0.2.1-a
|
||||||
|
File diff suppressed because one or more lines are too long
@ -7,9 +7,9 @@
|
|||||||
"author": "Xuan Sang LE",
|
"author": "Xuan Sang LE",
|
||||||
"email": "mrsang@lxsang.me"
|
"email": "mrsang@lxsang.me"
|
||||||
},
|
},
|
||||||
"version":"0.2.4-a",
|
"version":"0.2.5-a",
|
||||||
"category":"Office",
|
"category":"Office",
|
||||||
"iconclass":"bi bi-journals",
|
"iconclass":"bi bi-journals",
|
||||||
"dependencies": ["SimpleMDE@1.11.2-r","Katex@0.11.1-r"],
|
"dependencies": ["SimpleMDE@2.18.0-r","Katex@0.11.1-r"],
|
||||||
"mimes":["dir"]
|
"mimes":["dir"]
|
||||||
}
|
}
|
Binary file not shown.
@ -166,7 +166,7 @@ class Booklet extends this.OS.application.BaseApplication
|
|||||||
@previewOn = false
|
@previewOn = false
|
||||||
@editormux = false
|
@editormux = false
|
||||||
|
|
||||||
@editor = new SimpleMDE
|
@editor = new EasyMDE
|
||||||
element: markarea
|
element: markarea
|
||||||
autoDownloadFontAwesome: false
|
autoDownloadFontAwesome: false
|
||||||
autofocus: true
|
autofocus: true
|
||||||
@ -232,7 +232,7 @@ class Booklet extends this.OS.application.BaseApplication
|
|||||||
name: __("Preview"),
|
name: __("Preview"),
|
||||||
className: "fa fa-eye no-disable",
|
className: "fa fa-eye no-disable",
|
||||||
action: (e) =>
|
action: (e) =>
|
||||||
SimpleMDE.togglePreview e
|
EasyMDE.togglePreview e
|
||||||
#/console.log @select ".editor-preview editor-preview-active"
|
#/console.log @select ".editor-preview editor-preview-active"
|
||||||
renderMathInElement @find "mycontainer"
|
renderMathInElement @find "mycontainer"
|
||||||
@renderLocalElement()
|
@renderLocalElement()
|
||||||
@ -246,7 +246,7 @@ class Booklet extends this.OS.application.BaseApplication
|
|||||||
|
|
||||||
preview.innerHTML = html
|
preview.innerHTML = html
|
||||||
|
|
||||||
@on "hboxchange", (e) => @resizeContent()
|
@on "resize", (e) => @resizeContent()
|
||||||
@bindKey "ALT-N", () => @actionFile "#{@name}-New"
|
@bindKey "ALT-N", () => @actionFile "#{@name}-New"
|
||||||
@bindKey "ALT-O", () => @actionFile "#{@name}-Open"
|
@bindKey "ALT-O", () => @actionFile "#{@name}-Open"
|
||||||
@bindKey "CTRL-S", () => @actionFile "#{@name}-Save"
|
@bindKey "CTRL-S", () => @actionFile "#{@name}-Save"
|
||||||
@ -263,12 +263,12 @@ class Booklet extends this.OS.application.BaseApplication
|
|||||||
@currentToc.descFile.cache = @editor.value()
|
@currentToc.descFile.cache = @editor.value()
|
||||||
|
|
||||||
resizeContent: () ->
|
resizeContent: () ->
|
||||||
children = ($ @container).children()
|
children = ($ ".EasyMDEContainer", @container).children()
|
||||||
titlebar = (($ @scheme).find ".afx-window-top")[0]
|
titlebar = (($ @scheme).find ".afx-window-top")[0]
|
||||||
toolbar = children[1]
|
toolbar = children[0]
|
||||||
statusbar = children[4]
|
statusbar = children[3]
|
||||||
cheight = ($ @scheme).height() - ($ titlebar).height() - ($ toolbar).height() - ($ statusbar).height() - 40
|
cheight = ($ @scheme).height() - ($ titlebar).height() - ($ toolbar).height() - ($ statusbar).height() - 40
|
||||||
($ children[2]).css("height", cheight + "px")
|
($ children[1]).css("height", cheight + "px")
|
||||||
|
|
||||||
|
|
||||||
menu: () ->
|
menu: () ->
|
||||||
|
@ -7,9 +7,9 @@
|
|||||||
"author": "Xuan Sang LE",
|
"author": "Xuan Sang LE",
|
||||||
"email": "mrsang@lxsang.me"
|
"email": "mrsang@lxsang.me"
|
||||||
},
|
},
|
||||||
"version":"0.2.4-a",
|
"version":"0.2.5-a",
|
||||||
"category":"Office",
|
"category":"Office",
|
||||||
"iconclass":"bi bi-journals",
|
"iconclass":"bi bi-journals",
|
||||||
"dependencies": ["SimpleMDE@1.11.2-r","Katex@0.11.1-r"],
|
"dependencies": ["SimpleMDE@2.18.0-r","Katex@0.11.1-r"],
|
||||||
"mimes":["dir"]
|
"mimes":["dir"]
|
||||||
}
|
}
|
@ -95,8 +95,8 @@
|
|||||||
"description": "https://raw.githubusercontent.com/lxsang/antosdk-apps/2.0.x/Blogger/README.md",
|
"description": "https://raw.githubusercontent.com/lxsang/antosdk-apps/2.0.x/Blogger/README.md",
|
||||||
"category": "Internet",
|
"category": "Internet",
|
||||||
"author": "Xuan Sang LE",
|
"author": "Xuan Sang LE",
|
||||||
"version": "0.2.8-a",
|
"version": "0.2.9-a",
|
||||||
"dependencies": ["SimpleMDE@1.11.2-r","Katex@0.11.1-r"],"mimes":["none"],
|
"dependencies": ["SimpleMDE@2.18.0-r","Katex@0.11.1-r"],"mimes":["none"],
|
||||||
"download": "https://raw.githubusercontent.com/lxsang/antosdk-apps/2.0.x/Blogger/build/release/Blogger.zip"
|
"download": "https://raw.githubusercontent.com/lxsang/antosdk-apps/2.0.x/Blogger/build/release/Blogger.zip"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -105,8 +105,8 @@
|
|||||||
"description": "https://raw.githubusercontent.com/lxsang/antosdk-apps/2.0.x/Booklet/README.md",
|
"description": "https://raw.githubusercontent.com/lxsang/antosdk-apps/2.0.x/Booklet/README.md",
|
||||||
"category": "Office",
|
"category": "Office",
|
||||||
"author": "Xuan Sang LE",
|
"author": "Xuan Sang LE",
|
||||||
"version": "0.2.4-a",
|
"version": "0.2.5-a",
|
||||||
"dependencies": ["SimpleMDE@1.11.2-r","Katex@0.11.1-r"],"mimes":["dir"],
|
"dependencies": ["SimpleMDE@2.18.0-r","Katex@0.11.1-r"],"mimes":["dir"],
|
||||||
"download": "https://raw.githubusercontent.com/lxsang/antosdk-apps/2.0.x/Booklet/build/release/Booklet.zip"
|
"download": "https://raw.githubusercontent.com/lxsang/antosdk-apps/2.0.x/Booklet/build/release/Booklet.zip"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user