Browse Source

Popup z-index going way up #1668. Add z-index variable for modal

pull/1698/merge
jlukic 9 years ago
parent
commit
671948c252
5 changed files with 14 additions and 7 deletions
  1. 2
      src/definitions/modules/modal.less
  2. 7
      src/definitions/modules/popup.js
  3. 5
      src/definitions/modules/popup.less
  4. 1
      src/themes/default/modules/modal.variables
  5. 6
      src/themes/default/modules/popup.variables

2
src/definitions/modules/modal.less

@ -25,7 +25,7 @@
.ui.modal {
display: none;
position: fixed;
z-index: 1001;
z-index: @zIndex;
top: 50%;
left: 50%;

7
src/definitions/modules/popup.js

@ -103,18 +103,18 @@ $.fn.popup = function(parameters) {
refresh: function() {
if(settings.popup) {
$popup = $(settings.popup);
$popup = $(settings.popup).eq(0);
}
else {
if(settings.inline) {
$popup = $target.next(selector.popup);
$popup = $target.next(selector.popup).eq(0);
}
}
if(settings.popup) {
$popup.addClass(className.loading);
$offsetParent = module.get.offsetParent();
$popup.removeClass(className.loading);
if(module.has.popup() && module.get.offsetParent($popup)[0] !== $offsetParent[0]) {
if(settings.movePopup && module.has.popup() && module.get.offsetParent($popup)[0] !== $offsetParent[0]) {
module.debug('Moving popup to the same offset parent as activating element');
$popup
.detach()
@ -1087,6 +1087,7 @@ $.fn.popup.settings = {
},
setFluidWidth : true,
movePopup : true,
target : false,
popup : false,

5
src/definitions/modules/popup.less

@ -18,6 +18,7 @@
@import '../../theme.config';
/*******************************
Popup
*******************************/
@ -27,6 +28,10 @@
position: absolute;
top: 0px;
right: 0px;
/* Fixes content being squished when inline (moz only) */
min-width: -moz-max-content;
z-index: @zIndex;
border: @border;

1
src/themes/default/modules/modal.variables

@ -5,6 +5,7 @@
@background: @white;
@border: none;
@width: 90%;
@zIndex: 1001;
@xOffset: -(@width / 2);
@borderRadius: @defaultBorderRadius;
@boxShadow: 0 1px 4px 1px rgba(0, 0, 0, 0.3);

6
src/themes/default/modules/popup.variables

@ -6,7 +6,7 @@
Element
--------------------*/
@zIndex: 900;
@zIndex: 1900;
@background: @white;
@maxWidth: 250px;
@ -60,8 +60,8 @@
Coupling
--------------------*/
/* (padding * @medium) */
@nestedGridMargin: -0.7rem -0.875rem;
/* Grid Inside Popup */
@nestedGridMargin: -0.7rem -0.875rem; /* (padding * @medium) */
@nestedGridWidth: ~"calc(100% + 1.75rem)";
/*-------------------

Loading…
Cancel
Save