Uploading a logo/preview image didn't cause the displayed image to be refreshed becau...
authorAlexander Ebert <ebert@woltlab.com>
Mon, 2 Mar 2015 14:21:23 +0000 (15:21 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 2 Mar 2015 14:21:23 +0000 (15:21 +0100)
wcfsetup/install/files/acp/js/WCF.ACP.Style.js

index 4619bbe57b9e8b2b6e5267e8cde693213c8235a7..1285d703677fb845fbf2c92d5c0f86cb9b779aeb 100644 (file)
@@ -131,7 +131,7 @@ WCF.ACP.Style.ImageUpload = WCF.Upload.extend({
        _success: function(uploadID, data) {
                if (data.returnValues.url) {
                        // show image
-                       this._image.attr('src', data.returnValues.url);
+                       this._image.attr('src', data.returnValues.url + '?timestamp=' + Date.now());
                        
                        // hide error
                        this._button.next('.innerError').remove();
@@ -249,7 +249,7 @@ WCF.ACP.Style.LogoUpload = WCF.Upload.extend({
                        $src = $('#logo > a > img').prop('src');
                }
                
-               this._image.attr('src', $src);
+               this._image.attr('src', $src + '?timestamp=' + Date.now());
        },
        
        /**
@@ -274,7 +274,7 @@ WCF.ACP.Style.LogoUpload = WCF.Upload.extend({
        _success: function(uploadID, data) {
                if (data.returnValues.url) {
                        // show image
-                       this._image.attr('src', data.returnValues.url);
+                       this._image.attr('src', data.returnValues.url + '?timestamp=' + Date.now());
                        this._pageLogo.val(data.returnValues.url);
                        
                        // hide error