]> source.dussan.org Git - nextcloud-server.git/commitdiff
Clicking on theming preview triggers fileupload dialog
authorMorris Jobke <hey@morrisjobke.de>
Fri, 12 May 2017 00:49:32 +0000 (19:49 -0500)
committerMorris Jobke <hey@morrisjobke.de>
Fri, 12 May 2017 00:49:36 +0000 (19:49 -0500)
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
apps/theming/css/settings-admin.css
apps/theming/js/settings-admin.js

index e401d77e4b6558cba60860896f00ed3f218c720e..ef3c9f68b275ac91d94404369533a870f08f4326 100644 (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 {
index 5d91892c00717299a8d212c1806b1ba873c4b229..d4ecba5a1412264e58448637c214c72dab8e78a9 100644 (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);