Clicking on theming preview triggers fileupload dialog

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
Morris Jobke 2017-05-11 19:49:32 -05:00
parent d83f1d96d4
commit c2350f237e
2 changed files with 12 additions and 0 deletions

View file

@ -89,6 +89,10 @@ div#theming_settings_msg {
display: inline-block;
}
#theming-preview-logo {
cursor: pointer;
}
#theming-preview {
width: 230px;
height: 140px;
@ -97,6 +101,7 @@ div#theming_settings_msg {
text-align: center;
margin-left: 123px;
margin-top: 10px;
cursor: pointer;
}
#theming-preview img {

View file

@ -160,6 +160,13 @@ $(document).ready(function () {
$('#uploadlogo').fileupload(uploadParamsLogo);
$('#upload-login-background').fileupload(uploadParamsLogin);
// clicking preview should also trigger file upload dialog
$('#theming-preview-logo').on('click', function() {
$('#uploadlogo').click();
});
$('#theming-preview').on('click', function() {
$('#upload-login-background').click();
});
$('#theming-name').change(function(e) {
var el = $(this);