Fixed error in uploader;
h3rald h3rald@h3rald.com
Fri, 11 Sep 2015 21:39:52 +0200
3 files changed,
6 insertions(+),
5 deletions(-)
M
admin/js/components/uploader.js
→
admin/js/components/uploader.js
@@ -23,18 +23,19 @@ vm.docid = m.prop(args.docid);
vm.file = m.prop(); vm.id = args.id; vm.btnId = "#upload-"+vm.id+"-btn"; + vm.modalId = "#upload-"+vm.id+"-modal"; vm.reader = new FileReader(); vm.contents = m.prop(); vm.isText = m.prop(false); vm.reader.onloadstart = function() { vm.contents(""); - $(modalId).find(".btn-primary").attr("disabled", true); + $(vm.modalId).find(".btn-primary").attr("disabled", true); }; vm.reader.onloadend = function() { vm.contents(vm.reader.result); - $(modalId).find(".btn-primary").removeAttr("disabled"); + $(vm.modalId).find(".btn-primary").removeAttr("disabled"); }; vm.save = function() {@@ -82,4 +83,4 @@ };
return u.modal(config); }; -}()); +}());
M
admin/js/models.js
→
admin/js/models.js
@@ -4,9 +4,9 @@ window.Info = {};
window.Doc = {}; var app = window.LS || (window.LS = {}); var u = app.utils; - app.host = 'http://localhost:9500' + app.host = 'http://localhost:9500'; - var host = location.origin === app.host ? "" : app.host + var host = location.origin === app.host ? "" : app.host; Page.get = function(id) { var content = m.prop("");