Browse Source

Merge branch 'master' of https://github.com/nojhamster/Semantic-UI

pull/4188/head
jlukic 10 years ago
parent
commit
208faf530f
1 changed files with 13 additions and 0 deletions
  1. 13
      src/modules/modal.js

13
src/modules/modal.js

@ -219,6 +219,11 @@ $.fn.modal = function(parameters) {
} }
}, },
updateModalList: function() {
$otherModals = $module.siblings(selector.modal);
$allModals = $otherModals.add($module);
},
toggle: function() { toggle: function() {
if( module.is.active() ) { if( module.is.active() ) {
module.hide(); module.hide();
@ -243,6 +248,8 @@ $.fn.modal = function(parameters) {
: function(){} : function(){}
; ;
if( !module.is.active() ) { if( !module.is.active() ) {
module.updateModalList();
if(module.cache === undefined) { if(module.cache === undefined) {
module.cacheSizes(); module.cacheSizes();
} }
@ -298,6 +305,8 @@ $.fn.modal = function(parameters) {
? callback ? callback
: function(){} : function(){}
; ;
module.updateModalList();
if($allModals.filter(':visible').size() <= 1) { if($allModals.filter(':visible').size() <= 1) {
module.hideDimmer(); module.hideDimmer();
} }
@ -365,6 +374,8 @@ $.fn.modal = function(parameters) {
? callback ? callback
: function(){} : function(){}
; ;
module.updateModalList();
if( $allModals.is(':visible') ) { if( $allModals.is(':visible') ) {
module.debug('Hiding all visible modals'); module.debug('Hiding all visible modals');
module.hideDimmer(); module.hideDimmer();
@ -380,6 +391,8 @@ $.fn.modal = function(parameters) {
? callback ? callback
: function(){} : function(){}
; ;
module.updateModalList();
if( $otherModals.is(':visible') ) { if( $otherModals.is(':visible') ) {
module.debug('Hiding other modals'); module.debug('Hiding other modals');
$otherModals $otherModals

Loading…
Cancel
Save