Commit 095a7572 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

Add App Page: Allow creation of completely empty Apps

parent f49e15de
......@@ -126,15 +126,6 @@
options.crib_url = "https://" + options.subdomain + BASE_CRIB_WILDCARD;
}
// If no Zip is provided no need to continue
if (gadget.props.element
.querySelector("form.crib-load-from-zip .load-zip-file").files.length === 0 &&
gadget.props.element
.querySelector("form.crib-load-from-zip .load-zip-url").value.length === 0) {
logAddApp(gadget, "Please set a Zip File or Zip Url");
return;
}
// Start the process to add the application
return RSVP.Queue()
.push(function () {
......@@ -154,9 +145,13 @@
.querySelector("form.crib-load-from-zip .load-zip-file").files.length !== 0) {
logAddApp(gadget, "Will load Zip from File");
promise_list.push(loadCribJSFromZipFile(gadget, event, logAddApp));
} else {
} else if (gadget.props.element
.querySelector("form.crib-load-from-zip .load-zip-url").value) {
logAddApp(gadget, "Will load Zip from Url");
promise_list.push(loadCribJSFromZipUrl(gadget, event, logAddApp));
} else {
logAddApp(gadget, "Will not load any Zip");
promise_list.push([]);
}
promise_list.push(getApplicationList(gadget));
return RSVP.all(promise_list);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment