added button in admin to upload favicon + show current favicon image

v1.18.x
psychobunny 11 years ago
parent bcb364c4d4
commit 35f17db141

@ -75,13 +75,20 @@ define(['uploader'], function(uploader) {
});
$('#uploadLogoBtn').on('click', function() {
uploader.open(RELATIVE_PATH + '/admin/uploadlogo', function(image) {
$('#logoUrl').val(image);
});
uploader.hideAlerts();
});
$('#uploadLogoBtn').on('click', function() {
uploader.open(RELATIVE_PATH + '/admin/uploadfavicon', function() {
$('#favicon').attr('src', './../favicon.ico?v=' + new Date().getTime());
});
uploader.hideAlerts();
});
};
Settings.remove = function(key) {

@ -12,11 +12,14 @@
<input type="text" class="form-control" placeholder="Keywords describing your community, comma-seperated" data-field="keywords" /><br />
<label>Site Logo</label>
<input id="logoUrl" type="text" class="form-control" placeholder="Path to a logo to display on forum header" data-field="brand:logo" /><br />
<input id="uploadLogoBtn" type="button" class="btn btn-default" value="Upload"></input> <br />
<input id="uploadLogoBtn" type="button" class="btn btn-default" value="Upload Logo"></input> <br />
<label>Imgur Client ID</label>
<input type="text" class="form-control" placeholder="Imgur ClientID for image uploads" data-field="imgurClientID" /><br />
<label>Maximum User Image Size</label>
<input type="text" class="form-control" placeholder="Maximum size of uploaded user images in kilobytes" data-field="maximumProfileImageSize" />
<input type="text" class="form-control" placeholder="Maximum size of uploaded user images in kilobytes" data-field="maximumProfileImageSize" /><br />
<label>Favicon</label><br />
<img src="./../favicon.ico" />&nbsp;
<input id="uploadFaviconBtn" type="button" class="btn btn-default" value="Upload Favicon"></input> <br />
</form>
</div>

Loading…
Cancel
Save