Editor: add a link to the install source page

This commit is contained in:
tophf 2015-05-15 19:46:21 +03:00
parent 28e34f2990
commit 39021be48c
2 changed files with 12 additions and 0 deletions

View File

@ -81,6 +81,16 @@
#name {
width: 100%;
}
#basic-info-name {
display: flex;
align-items: center;
}
#url {
margin-left: 0.25rem;
}
#url:not([href^="http"]) {
display: none;
}
#enabled {
margin-left: 0;
vertical-align: middle;
@ -353,6 +363,7 @@
<section id="basic-info">
<div id="basic-info-name">
<input id="name" class="style-contributor" i18n-placeholder="styleMissingName">
<a id="url" target="_blank"><img src="world_go.png"></a>
</div>
<div id="basic-info-enabled">
<input type="checkbox" id="enabled" class="style-contributor">

View File

@ -746,6 +746,7 @@ function init() {
function initWithStyle(style) {
document.getElementById("name").value = style.name;
document.getElementById("enabled").checked = style.enabled == "true";
document.getElementById("url").href = style.url;
tE("heading", "editStyleHeading", null, false);
// if this was done in response to an update, we need to clear existing sections
document.querySelectorAll("#sections > div").forEach(function(div) {