Commit 0c29519c authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

Rename crib-sw-storage-gadget to be more easily accessible

parent 27df4d52
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<script src="/lib/jio-latest.js" type="text/javascript"></script> <script src="/lib/jio-latest.js" type="text/javascript"></script>
<!-- custom script --> <!-- custom script -->
<script src="crib-sw-storage-gadget.js" type="text/javascript"></script> <script src="crib-enable.js" type="text/javascript"></script>
</head> </head>
<body> <body>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
var storage_gadget, site_editor_gadget_url, getURL = window.location; var storage_gadget, site_editor_gadget_url, getURL = window.location;
return gadget.getSetting( return gadget.getSetting(
"site_editor_gadget_url", "site_editor_gadget_url",
getURL.protocol + "//" + getURL.host + "/gadget/crib-sw-storage-gadget.html" getURL.protocol + "//" + getURL.host + "/crib-enable.html"
) )
.push(function (url) { .push(function (url) {
if (gadget.props.storage_gadget_url == url) { if (gadget.props.storage_gadget_url == url) {
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
.push(function (element) { .push(function (element) {
var getURL = window.location; var getURL = window.location;
g.props.element = element; g.props.element = element;
getURL.protocol + "//" + getURL.host + "/gadget/crib-sw-storage-gadget.html" getURL.protocol + "//" + getURL.host + "/crib-enable.html"
}); });
}) })
.ready(function(gadget) { .ready(function(gadget) {
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<div class="nav_content save_load container"> <div class="nav_content save_load container">
<h3>Site Editor Gadget URL</h3> <h3>Site Editor Gadget URL</h3>
<p>Enter the URL of the Crib Gadget from the site you want to edit. If you want to edit this site use: <p>Enter the URL of the Crib Gadget from the site you want to edit. If you want to edit this site use:
"/gadget/crib-sw-storage-gadget.html"</p> "/crib-enable.html"</p>
<div class="row"> <div class="row">
<table class="table"> <table class="table">
<tr> <tr>
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<div class="form-group"> <div class="form-group">
<label for="url" class="col-sm-2 control-label">URL</label> <label for="url" class="col-sm-2 control-label">URL</label>
<div class="col-sm-10"> <div class="col-sm-10">
<input type="text" class="form-control url" id="url" value="/gadget/crib-sw-storage-gadget.html"> <input type="text" class="form-control url" id="url" value="/crib-enable.html">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
var getURL = window.location; var getURL = window.location;
return gadget.getSetting( return gadget.getSetting(
"site_editor_gadget_url", "site_editor_gadget_url",
getURL.protocol + "//" + getURL.host + "/gadget/crib-sw-storage-gadget.html" getURL.protocol + "//" + getURL.host + "/crib-enable.html"
) )
}) })
.push(function (site_editor_gadget_url) { .push(function (site_editor_gadget_url) {
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
function getSetting(gadget, key, default_value) { function getSetting(gadget, key, default_value) {
if ( key === "site_editor_gadget_url" ) { if ( key === "site_editor_gadget_url" ) {
return window.location.protocol + "//" + window.location.host + "/gadget/crib-sw-storage-gadget.html" return window.location.protocol + "//" + window.location.host + "/crib-enable.html"
} }
return default_value; return default_value;
} }
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<h3>Edit this Site</h3> <h3>Edit this Site</h3>
<div class="form-group"> <div class="form-group">
<label>Edit URL: <label>Edit URL:
<input name="edit-url" class="edit-url form-control" type="text" size="60" readonly value="/gadget/crib-sw-storage-gadget.html"></label> <input name="edit-url" class="edit-url form-control" type="text" size="60" readonly value="/crib-enable.html"></label>
</div> </div>
</div> </div>
<div class="nav_content container"> <div class="nav_content container">
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
site = getURL.protocol + "//" + getURL.host, site = getURL.protocol + "//" + getURL.host,
params = getParameterDict(), params = getParameterDict(),
edit_url="https://" + makeid(10) + ".cribjs.nexedi.net/crib-editor4/#page=editor&url=" edit_url="https://" + makeid(10) + ".cribjs.nexedi.net/crib-editor4/#page=editor&url="
+ site + "&crib_enable_url=" + site + "/gadget/crib-sw-storage-gadget.html"; + site + "&crib_enable_url=" + site + "/crib-enable.html";
gadget.props.element.querySelector("a.edit-url").href = edit_url ; gadget.props.element.querySelector("a.edit-url").href = edit_url ;
if ( params.hasOwnProperty("from_path") ) { if ( params.hasOwnProperty("from_path") ) {
gadget.props.element.querySelector("form.crib-load-from-zip-url .load-from-zip-path").value = params.from_path; gadget.props.element.querySelector("form.crib-load-from-zip-url .load-from-zip-path").value = params.from_path;
......
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