all repos — litestore @ 4d43c5f1f138ba73aa8366e41d2596b889d85592

A minimalist nosql document store.

Refactoring.
h3rald h3rald@h3rald.com
Sun, 10 May 2015 14:16:15 +0200
commit

4d43c5f1f138ba73aa8366e41d2596b889d85592

parent

9b46f23f05fbbaf1b065efd3c029ca2698bf0a53

2 files changed, 3 insertions(+), 7 deletions(-)

jump to
M admin/js/components/editor.jsadmin/js/components/editor.js

@@ -56,11 +56,7 @@ * @param obj

* - content The content of the editor */ app.editor.controller = function(args) { - return { - content: args.content, - id: args.id, - readOnly: args.readOnly, - }; + return args; }; app.editor.view = function(ctrl) { return m(".editor.panel.panal-default", {config: app.editor.config(ctrl)}, ctrl.content);
M admin/js/modules/document.jsadmin/js/modules/document.js

@@ -11,11 +11,11 @@ var vm = this;

vm.dir = app.system.directory; vm.id = m.prop(m.route.param("id")); vm.action = m.route.param("action"); - vm.readOnly = true; + vm.uploader = app.uploader({docid: vm.id() || ""}); + vm.readOnly = true; vm.contentType = m.prop(""); vm.updatedTags = m.prop(""); vm.content = ""; - vm.uploader = new app.uploader(vm.id() || ""); vm.binary = false; vm.image = false; vm.tags = [];