]> BookStack Code Mirror - bookstack/commitdiff
Fixed bug causing image manager popup not to show
authorDan Brown <redacted>
Mon, 7 Aug 2017 18:32:31 +0000 (19:32 +0100)
committerDan Brown <redacted>
Mon, 7 Aug 2017 18:32:31 +0000 (19:32 +0100)
resources/assets/js/components/overlay.js
resources/assets/js/controllers.js

index 6984928bdd046bb453177d5dbdb4b246123d3819..6e7a598ac58027d739e7efd7a178ae9498bdda01 100644 (file)
@@ -21,7 +21,7 @@ class Overlay {
             let targetOpacity = show ? (elapsedTime / duration) : 1-(elapsedTime / duration);
             this.container.style.opacity = targetOpacity;
             if (elapsedTime > duration) {
-                this.container.style.display = show ? 'display' : 'none';
+                this.container.style.display = show ? 'flex' : 'none';
                 this.container.style.opacity = '';
             } else {
                 requestAnimationFrame(setOpacity.bind(this));
index e1d838bb6375a610c435b05e2c9d097493ece887..4acb40b3576a59f90e7b49f2c1d73ec5012d956a 100644 (file)
@@ -113,7 +113,7 @@ module.exports = function (ngApp, events) {
             function show(doneCallback) {
                 callback = doneCallback;
                 $scope.showing = true;
-                $('#image-manager').find('.overlay').css('display', 'flex').hide().fadeIn(240);
+                $('#image-manager').find('[overlay]').css('display', 'flex').hide().fadeIn(240);
                 // Get initial images if they have not yet been loaded in.
                 if (!dataLoaded) {
                     fetchData();
@@ -136,7 +136,7 @@ module.exports = function (ngApp, events) {
              */
             $scope.hide = function () {
                 $scope.showing = false;
-                $('#image-manager').find('.overlay').fadeOut(240);
+                $('#image-manager').find('[overlay]').fadeOut(240);
             };
 
             let baseUrl = window.baseUrl('/images/' + $scope.imageType + '/all/');