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 @@
<script src="/lib/jio-latest.js" type="text/javascript"></script>
<!-- custom script -->
<script src="crib-sw-storage-gadget.js" type="text/javascript"></script>
<script src="crib-enable.js" type="text/javascript"></script>
</head>
<body>
......
......@@ -7,7 +7,7 @@
var storage_gadget, site_editor_gadget_url, getURL = window.location;
return gadget.getSetting(
"site_editor_gadget_url",
getURL.protocol + "//" + getURL.host + "/gadget/crib-sw-storage-gadget.html"
getURL.protocol + "//" + getURL.host + "/crib-enable.html"
)
.push(function (url) {
if (gadget.props.storage_gadget_url == url) {
......@@ -56,7 +56,7 @@
.push(function (element) {
var getURL = window.location;
g.props.element = element;
getURL.protocol + "//" + getURL.host + "/gadget/crib-sw-storage-gadget.html"
getURL.protocol + "//" + getURL.host + "/crib-enable.html"
});
})
.ready(function(gadget) {
......
......@@ -20,7 +20,7 @@
<div class="nav_content save_load container">
<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:
"/gadget/crib-sw-storage-gadget.html"</p>
"/crib-enable.html"</p>
<div class="row">
<table class="table">
<tr>
......@@ -33,7 +33,7 @@
<div class="form-group">
<label for="url" class="col-sm-2 control-label">URL</label>
<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 class="form-group">
......
......@@ -33,7 +33,7 @@
var getURL = window.location;
return gadget.getSetting(
"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) {
......
......@@ -14,7 +14,7 @@
function getSetting(gadget, key, default_value) {
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;
}
......
......@@ -25,7 +25,7 @@
<h3>Edit this Site</h3>
<div class="form-group">
<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 class="nav_content container">
......
......@@ -54,7 +54,7 @@
site = getURL.protocol + "//" + getURL.host,
params = getParameterDict(),
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 ;
if ( params.hasOwnProperty("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