Fixed some cross browser flexbox popup issues
Set min height for poor IE & safari flexbox support. Fixes #105.
Showing
4 changed files
with
34 additions
and
6 deletions
| ... | @@ -134,17 +134,24 @@ $(function () { | ... | @@ -134,17 +134,24 @@ $(function () { |
| 134 | $('.popup-close').click(function() { | 134 | $('.popup-close').click(function() { |
| 135 | $(this).closest('.overlay').fadeOut(240); | 135 | $(this).closest('.overlay').fadeOut(240); |
| 136 | }); | 136 | }); |
| 137 | - | ||
| 138 | $('.overlay').click(function(event) { | 137 | $('.overlay').click(function(event) { |
| 139 | if (!$(event.target).hasClass('overlay')) return; | 138 | if (!$(event.target).hasClass('overlay')) return; |
| 140 | $(this).fadeOut(240); | 139 | $(this).fadeOut(240); |
| 141 | }); | 140 | }); |
| 142 | 141 | ||
| 142 | + // Prevent markdown display link click redirect | ||
| 143 | $('.markdown-display').on('click', 'a', function(event) { | 143 | $('.markdown-display').on('click', 'a', function(event) { |
| 144 | event.preventDefault(); | 144 | event.preventDefault(); |
| 145 | window.open($(this).attr('href')); | 145 | window.open($(this).attr('href')); |
| 146 | }); | 146 | }); |
| 147 | 147 | ||
| 148 | + // Detect IE for css | ||
| 149 | + if(navigator.userAgent.indexOf('MSIE')!==-1 | ||
| 150 | + || navigator.appVersion.indexOf('Trident/') > 0 | ||
| 151 | + || navigator.userAgent.indexOf('Safari') !== -1){ | ||
| 152 | + $('body').addClass('flexbox-support'); | ||
| 153 | + } | ||
| 154 | + | ||
| 148 | }); | 155 | }); |
| 149 | 156 | ||
| 150 | // Page specific items | 157 | // Page specific items | ... | ... |
| ... | @@ -16,6 +16,10 @@ | ... | @@ -16,6 +16,10 @@ |
| 16 | display: none; | 16 | display: none; |
| 17 | } | 17 | } |
| 18 | 18 | ||
| 19 | +.popup-body-wrap { | ||
| 20 | + display: flex; | ||
| 21 | +} | ||
| 22 | + | ||
| 19 | .popup-body { | 23 | .popup-body { |
| 20 | background-color: #FFF; | 24 | background-color: #FFF; |
| 21 | max-height: 90%; | 25 | max-height: 90%; |
| ... | @@ -39,6 +43,10 @@ | ... | @@ -39,6 +43,10 @@ |
| 39 | } | 43 | } |
| 40 | } | 44 | } |
| 41 | 45 | ||
| 46 | +//body.ie .popup-body { | ||
| 47 | +// min-height: 100%; | ||
| 48 | +//} | ||
| 49 | + | ||
| 42 | .corner-button { | 50 | .corner-button { |
| 43 | position: absolute; | 51 | position: absolute; |
| 44 | top: 0; | 52 | top: 0; |
| ... | @@ -50,19 +58,28 @@ | ... | @@ -50,19 +58,28 @@ |
| 50 | } | 58 | } |
| 51 | 59 | ||
| 52 | .popup-header, .popup-footer { | 60 | .popup-header, .popup-footer { |
| 53 | - display: block; | 61 | + display: block !important; |
| 54 | position: relative; | 62 | position: relative; |
| 55 | height: 40px; | 63 | height: 40px; |
| 64 | + flex: none !important; | ||
| 56 | .popup-title { | 65 | .popup-title { |
| 57 | color: #FFF; | 66 | color: #FFF; |
| 58 | padding: 8px $-m; | 67 | padding: 8px $-m; |
| 59 | } | 68 | } |
| 60 | } | 69 | } |
| 70 | +body.flexbox-support #entity-selector-wrap .popup-body .form-group { | ||
| 71 | + height: 444px; | ||
| 72 | + min-height: 444px; | ||
| 73 | +} | ||
| 61 | #entity-selector-wrap .popup-body .form-group { | 74 | #entity-selector-wrap .popup-body .form-group { |
| 62 | margin: 0; | 75 | margin: 0; |
| 63 | } | 76 | } |
| 77 | +//body.ie #entity-selector-wrap .popup-body .form-group { | ||
| 78 | +// min-height: 60vh; | ||
| 79 | +//} | ||
| 80 | + | ||
| 64 | .image-manager-body { | 81 | .image-manager-body { |
| 65 | - min-height: 60vh; | 82 | + min-height: 70vh; |
| 66 | } | 83 | } |
| 67 | 84 | ||
| 68 | #image-manager .dropzone-container { | 85 | #image-manager .dropzone-container { | ... | ... |
| ... | @@ -29,6 +29,10 @@ body.flexbox { | ... | @@ -29,6 +29,10 @@ body.flexbox { |
| 29 | flex: 1; | 29 | flex: 1; |
| 30 | } | 30 | } |
| 31 | 31 | ||
| 32 | +//body.ie .flex-child > div { | ||
| 33 | +// flex: 1 0 0px; | ||
| 34 | +//} | ||
| 35 | + | ||
| 32 | /** Rules for all columns */ | 36 | /** Rules for all columns */ |
| 33 | div[class^="col-"] img { | 37 | div[class^="col-"] img { |
| 34 | max-width: 100%; | 38 | max-width: 100%; | ... | ... |
| ... | @@ -4,7 +4,7 @@ | ... | @@ -4,7 +4,7 @@ |
| 4 | 4 | ||
| 5 | <div class="popup-header primary-background"> | 5 | <div class="popup-header primary-background"> |
| 6 | <div class="popup-title">Image Select</div> | 6 | <div class="popup-title">Image Select</div> |
| 7 | - <button class="popup-close neg button">x</button> | 7 | + <button class="popup-close neg corner-button button">x</button> |
| 8 | </div> | 8 | </div> |
| 9 | 9 | ||
| 10 | <div class="flex-fill image-manager-body"> | 10 | <div class="flex-fill image-manager-body"> |
| ... | @@ -31,7 +31,7 @@ | ... | @@ -31,7 +31,7 @@ |
| 31 | <img ng-src="@{{image.thumbs.gallery}}" ng-attr-alt="@{{image.title}}" ng-attr-title="@{{image.name}}"> | 31 | <img ng-src="@{{image.thumbs.gallery}}" ng-attr-alt="@{{image.title}}" ng-attr-title="@{{image.name}}"> |
| 32 | <div class="image-meta"> | 32 | <div class="image-meta"> |
| 33 | <span class="name" ng-bind="image.name"></span> | 33 | <span class="name" ng-bind="image.name"></span> |
| 34 | - <span class="date">Uploaded @{{ getDate(image.created_at) | date:'mediumDate' }}</span> | 34 | + <span class="date">Uploaded @{{ getDate(image.created_at) }}</span> |
| 35 | </div> | 35 | </div> |
| 36 | </div> | 36 | </div> |
| 37 | </div> | 37 | </div> |
| ... | @@ -70,7 +70,7 @@ | ... | @@ -70,7 +70,7 @@ |
| 70 | 70 | ||
| 71 | <div class="clearfix"> | 71 | <div class="clearfix"> |
| 72 | <form class="float left" ng-submit="deleteImage($event)"> | 72 | <form class="float left" ng-submit="deleteImage($event)"> |
| 73 | - <button class="button neg"><i class="zmdi zmdi-delete"></i></button> | 73 | + <button class="button icon neg"><i class="zmdi zmdi-delete"></i></button> |
| 74 | </form> | 74 | </form> |
| 75 | <button class="button pos anim fadeIn float right" ng-show="selectedImage" ng-click="selectButtonClick()"> | 75 | <button class="button pos anim fadeIn float right" ng-show="selectedImage" ng-click="selectButtonClick()"> |
| 76 | <i class="zmdi zmdi-square-right"></i>Select Image | 76 | <i class="zmdi zmdi-square-right"></i>Select Image | ... | ... |
-
Please register or sign in to post a comment