Commit a516b0bc authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

Add App Page: Display Advanced parameters if initialised from url

parent 40204fbf
...@@ -285,7 +285,8 @@ ...@@ -285,7 +285,8 @@
.declareMethod('render', function (options) { .declareMethod('render', function (options) {
var gadget = this, var gadget = this,
getURL = window.location, getURL = window.location,
site = getURL.protocol + "//" + getURL.host; site = getURL.protocol + "//" + getURL.host,
display_details = false;
if (options.hasOwnProperty("app_name")) { if (options.hasOwnProperty("app_name")) {
gadget.props.element gadget.props.element
.querySelector("form.crib-load-from-zip .app-name") .querySelector("form.crib-load-from-zip .app-name")
...@@ -300,11 +301,13 @@ ...@@ -300,11 +301,13 @@
gadget.props.element gadget.props.element
.querySelector("form.crib-load-from-zip .load-from-zip-path") .querySelector("form.crib-load-from-zip .load-from-zip-path")
.value = options.from_path; .value = options.from_path;
display_details = true;
} }
if (options.hasOwnProperty("to_path")) { if (options.hasOwnProperty("to_path")) {
gadget.props.element gadget.props.element
.querySelector("form.crib-load-from-zip .load-zip-to-path") .querySelector("form.crib-load-from-zip .load-zip-to-path")
.value = options.to_path; .value = options.to_path;
display_details = true;
} }
if (options.hasOwnProperty("zip_app_url")) { if (options.hasOwnProperty("zip_app_url")) {
gadget.props.element gadget.props.element
...@@ -315,6 +318,11 @@ ...@@ -315,6 +318,11 @@
gadget.props.element gadget.props.element
.querySelector("form.crib-load-from-zip .redirect-url") .querySelector("form.crib-load-from-zip .redirect-url")
.value = options.redirect_url; .value = options.redirect_url;
display_details = true;
}
if (display_details) {
gadget.props.element
.querySelector("details").open = true;
} }
return gadget.props.start_deferred.resolve(); return gadget.props.start_deferred.resolve();
}) })
......
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