all repos — litestore @ daad4a5b7f0d5e4f84870bf16c0f859e68fcd680

A minimalist nosql document store.

Fixed error in uploader;
h3rald h3rald@h3rald.com
Fri, 11 Sep 2015 21:39:52 +0200
commit

daad4a5b7f0d5e4f84870bf16c0f859e68fcd680

parent

0991016883d61d6c8a789df61ae287ebed127a6e

3 files changed, 6 insertions(+), 5 deletions(-)

jump to
M admin/js/components/uploader.jsadmin/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.jsadmin/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("");