Refactoring.
h3rald h3rald@h3rald.com
Sun, 10 May 2015 14:16:15 +0200
2 files changed,
3 insertions(+),
7 deletions(-)
M
admin/js/components/editor.js
→
admin/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.js
→
admin/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 = [];