diff options
author | Bjoern Schiessle <bjoern@schiessle.org> | 2016-06-22 14:04:54 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2016-06-27 10:26:24 +0200 |
commit | 24144b16d0eabd000cb25d42a7aeacce32c18f6f (patch) | |
tree | 8badec08f7767d89224c77cdcb09087bf64bdcb4 /apps/theming/js | |
parent | 79269427d715edbae61bfe3775e0d55d734fe11b (diff) | |
download | nextcloud-server-24144b16d0eabd000cb25d42a7aeacce32c18f6f.tar.gz nextcloud-server-24144b16d0eabd000cb25d42a7aeacce32c18f6f.zip |
make sure that the preview gets updated every time a new image gets uploaded
Diffstat (limited to 'apps/theming/js')
-rw-r--r-- | apps/theming/js/settings-admin.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/theming/js/settings-admin.js b/apps/theming/js/settings-admin.js index cd650fc0aca..86c22471adb 100644 --- a/apps/theming/js/settings-admin.js +++ b/apps/theming/js/settings-admin.js @@ -40,11 +40,12 @@ function preview(setting, value) { if (setting === 'logoMime') { console.log(setting); var logos = document.getElementsByClassName('logo-icon'); + var timestamp = new Date().getTime(); if(value !== '') { - logos[0].style.background = "url('" + OC.generateUrl('/apps/theming/logo') + "')"; + logos[0].style.background = "url('" + OC.generateUrl('/apps/theming/logo') + "?v" + timestamp + "')"; logos[0].style.backgroundSize = "62px 34px"; } else { - logos[0].style.background = "url('" + OC.getRootPath() + '/core/img/logo-icon.svg'+"')"; + logos[0].style.background = "url('" + OC.getRootPath() + '/core/img/logo-icon.svg?v' + timestamp +"')"; logos[0].style.backgroundSize = "62px 34px"; } } |