diff --git a/TODO b/TODO index 9c048d3..5c28bd1 100644 --- a/TODO +++ b/TODO @@ -1,2 +1 @@ -VFS mountpoints object (selected) is changed between apps, which is not a good ideal -Some error in event handle using observable \ No newline at end of file +add require function that allows load shared library between application \ No newline at end of file diff --git a/src/core/BaseDialog.coffee b/src/core/BaseDialog.coffee index 0e65892..eab9ec7 100644 --- a/src/core/BaseDialog.coffee +++ b/src/core/BaseDialog.coffee @@ -17,7 +17,7 @@ class SubWindow extends this.OS.GUI.BaseModel @parent.meta() show: () -> @trigger 'focus' - ($ @scheme).css "z-index", window._zindex+2 + ($ @scheme).css "z-index", window._zindex + 2 hide: () -> @trigger 'hide' @@ -182,7 +182,7 @@ this.OS.register "InfoDialog", InfoDialog class YesNoDialog extends BasicDialog constructor: () -> super "YesNoDialog", { - tags: [{ tag: "afx-label", att: "style = 'padding:10px;'" }], + tags: [{ tag: "afx-label", att: "style = 'padding-left:10px;'" }], width: 300, height: 100, resizable: true, diff --git a/src/core/BaseModel.coffee b/src/core/BaseModel.coffee index 60f163b..c3bc227 100644 --- a/src/core/BaseModel.coffee +++ b/src/core/BaseModel.coffee @@ -20,6 +20,11 @@ class BaseModel @dialog.quit() if @dialog _PM.kill @ + path: () -> + mt = @meta() + return mt.path if mt and mt.path + return null + init: -> #implement by sub class onexit: (e) -> diff --git a/src/core/api.coffee b/src/core/api.coffee index 5cf8417..0a96dfc 100644 --- a/src/core/api.coffee +++ b/src/core/api.coffee @@ -3,6 +3,7 @@ self.OS.API = # fetch user data, used by the API to make requests # handlers are defined in /src/handlers handler: { } + shared: {} # shared libraries #request a user data post: (p, d, c, f) -> q = _courrier.getMID() @@ -115,6 +116,33 @@ self.OS.API = path = "resources/#{r}" _API.get path, c, f + require: (l,f) -> + path = "os:///scripts/" + if not _API.shared[l] + js = "#{path}#{l}.js" + js.asFileHandler().onready (d) -> + _API.shared[l] = true + el = $ ' - - - - diff --git a/src/packages/MarkOn/simplemde.min.css b/src/libs/mde/simplemde.min.css similarity index 100% rename from src/packages/MarkOn/simplemde.min.css rename to src/libs/mde/simplemde.min.css diff --git a/src/packages/MarkOn/simplemde.min.js b/src/libs/mde/simplemde.min.js similarity index 100% rename from src/packages/MarkOn/simplemde.min.js rename to src/libs/mde/simplemde.min.js diff --git a/src/packages/Blogger/Makefile b/src/packages/Blogger/Makefile index 6dba0ff..f64aa65 100644 --- a/src/packages/Blogger/Makefile +++ b/src/packages/Blogger/Makefile @@ -4,7 +4,7 @@ jsfiles = cssfiles = main.css -copyfiles = scheme.html package.json +copyfiles = scheme.html cvsection.html package.json PKG_NAME=Blogger diff --git a/src/packages/Blogger/cvsection.html b/src/packages/Blogger/cvsection.html new file mode 100644 index 0000000..6978310 --- /dev/null +++ b/src/packages/Blogger/cvsection.html @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + +