Browse Source

fixes issue with determining click target on modal content

Former-commit-id: f90a043b2b
Former-commit-id: d04778bddd
pull/258/head
Jack Lukic 11 years ago
parent
commit
d4c7824576
8 changed files with 61 additions and 23 deletions
  1. 15
      build/minified/modules/dimmer.js
  2. 2
      build/minified/modules/dimmer.min.js
  3. 15
      build/packaged/modules/dimmer.js
  4. 2
      build/packaged/semantic.min.js.REMOVED.git-id
  5. 15
      build/uncompressed/modules/dimmer.js
  6. 5
      node/src/documents/modules/dimmer.html
  7. 15
      node/src/files/components/semantic/modules/dimmer.js
  8. 15
      src/modules/dimmer.js

15
build/minified/modules/dimmer.js

@ -76,6 +76,9 @@ $.fn.dimmer = function(parameters) {
module.debug('Module initialized with created dimmer', $dimmer);
}
}
$module
.addClass(className.dimmable)
;
if(settings.closable) {
$dimmer
.on('click', module.event.click)
@ -103,7 +106,7 @@ $.fn.dimmer = function(parameters) {
click: function(event) {
module.verbose('Determining if event occured on dimmer', event);
if( event.target == element ) {
if( $dimmer.find(event.target).size() === 0 ) {
module.hide();
}
}
@ -117,8 +120,8 @@ $.fn.dimmer = function(parameters) {
module.verbose('Showing dimmer animation with css');
$dimmer
.one(animationEnd, function() {
$dimmer.removeClass(className.show);
module.set.active();
$dimmer.removeClass(className.show);
})
.addClass(className.show)
;
@ -132,7 +135,10 @@ $.fn.dimmer = function(parameters) {
width : '100%',
height : '100%'
})
.fadeTo(settings.duration, 1, module.set.active)
.fadeTo(settings.duration, 1, function() {
$dimmer.removeAttr('style');
module.set.active();
})
;
}
},
@ -448,9 +454,10 @@ $.fn.dimmer.settings = {
className : {
active : 'active',
animating : 'animating',
dimmable : 'dimmable',
dimmed : 'dimmed',
disabled : 'disabled',
animating : 'animating',
hide : 'hide',
show : 'show'
}

2
build/minified/modules/dimmer.min.js
File diff suppressed because it is too large
View File

15
build/packaged/modules/dimmer.js

@ -76,6 +76,9 @@ $.fn.dimmer = function(parameters) {
module.debug('Module initialized with created dimmer', $dimmer);
}
}
$module
.addClass(className.dimmable)
;
if(settings.closable) {
$dimmer
.on('click', module.event.click)
@ -103,7 +106,7 @@ $.fn.dimmer = function(parameters) {
click: function(event) {
module.verbose('Determining if event occured on dimmer', event);
if( event.target == element ) {
if( $dimmer.find(event.target).size() === 0 ) {
module.hide();
}
}
@ -117,8 +120,8 @@ $.fn.dimmer = function(parameters) {
module.verbose('Showing dimmer animation with css');
$dimmer
.one(animationEnd, function() {
$dimmer.removeClass(className.show);
module.set.active();
$dimmer.removeClass(className.show);
})
.addClass(className.show)
;
@ -132,7 +135,10 @@ $.fn.dimmer = function(parameters) {
width : '100%',
height : '100%'
})
.fadeTo(settings.duration, 1, module.set.active)
.fadeTo(settings.duration, 1, function() {
$dimmer.removeAttr('style');
module.set.active();
})
;
}
},
@ -448,9 +454,10 @@ $.fn.dimmer.settings = {
className : {
active : 'active',
animating : 'animating',
dimmable : 'dimmable',
dimmed : 'dimmed',
disabled : 'disabled',
animating : 'animating',
hide : 'hide',
show : 'show'
}

2
build/packaged/semantic.min.js.REMOVED.git-id

@ -1 +1 @@
9cdab95e993a45b7b1ee790f44757d8acc6cd475
0a4f3d705b73fa387698ffb41419590d79580cf4

15
build/uncompressed/modules/dimmer.js

@ -76,6 +76,9 @@ $.fn.dimmer = function(parameters) {
module.debug('Module initialized with created dimmer', $dimmer);
}
}
$module
.addClass(className.dimmable)
;
if(settings.closable) {
$dimmer
.on('click', module.event.click)
@ -103,7 +106,7 @@ $.fn.dimmer = function(parameters) {
click: function(event) {
module.verbose('Determining if event occured on dimmer', event);
if( event.target == element ) {
if( $dimmer.find(event.target).size() === 0 ) {
module.hide();
}
}
@ -117,8 +120,8 @@ $.fn.dimmer = function(parameters) {
module.verbose('Showing dimmer animation with css');
$dimmer
.one(animationEnd, function() {
$dimmer.removeClass(className.show);
module.set.active();
$dimmer.removeClass(className.show);
})
.addClass(className.show)
;
@ -132,7 +135,10 @@ $.fn.dimmer = function(parameters) {
width : '100%',
height : '100%'
})
.fadeTo(settings.duration, 1, module.set.active)
.fadeTo(settings.duration, 1, function() {
$dimmer.removeAttr('style');
module.set.active();
})
;
}
},
@ -448,9 +454,10 @@ $.fn.dimmer.settings = {
className : {
active : 'active',
animating : 'animating',
dimmable : 'dimmable',
dimmed : 'dimmed',
disabled : 'disabled',
animating : 'animating',
hide : 'hide',
show : 'show'
}

5
node/src/documents/modules/dimmer.html

@ -53,7 +53,10 @@ type : 'UI Module'
<img src="/images/demo/item1.jpg">
<img src="/images/demo/item2.jpg">
<div class="ui dimmer">
<h2 class="ui inverted header">This is a message for you</h2>
<h2 class="ui inverted header">
This is a message for you
<div class="sub header">How are you doing</div>
</h2>
</div>
</div>
<div class="ignore ui icon buttons">

15
node/src/files/components/semantic/modules/dimmer.js

@ -76,6 +76,9 @@ $.fn.dimmer = function(parameters) {
module.debug('Module initialized with created dimmer', $dimmer);
}
}
$module
.addClass(className.dimmable)
;
if(settings.closable) {
$dimmer
.on('click', module.event.click)
@ -103,7 +106,7 @@ $.fn.dimmer = function(parameters) {
click: function(event) {
module.verbose('Determining if event occured on dimmer', event);
if( event.target == element ) {
if( $dimmer.find(event.target).size() === 0 ) {
module.hide();
}
}
@ -117,8 +120,8 @@ $.fn.dimmer = function(parameters) {
module.verbose('Showing dimmer animation with css');
$dimmer
.one(animationEnd, function() {
$dimmer.removeClass(className.show);
module.set.active();
$dimmer.removeClass(className.show);
})
.addClass(className.show)
;
@ -132,7 +135,10 @@ $.fn.dimmer = function(parameters) {
width : '100%',
height : '100%'
})
.fadeTo(settings.duration, 1, module.set.active)
.fadeTo(settings.duration, 1, function() {
$dimmer.removeAttr('style');
module.set.active();
})
;
}
},
@ -448,9 +454,10 @@ $.fn.dimmer.settings = {
className : {
active : 'active',
animating : 'animating',
dimmable : 'dimmable',
dimmed : 'dimmed',
disabled : 'disabled',
animating : 'animating',
hide : 'hide',
show : 'show'
}

15
src/modules/dimmer.js

@ -76,6 +76,9 @@ $.fn.dimmer = function(parameters) {
module.debug('Module initialized with created dimmer', $dimmer);
}
}
$module
.addClass(className.dimmable)
;
if(settings.closable) {
$dimmer
.on('click', module.event.click)
@ -103,7 +106,7 @@ $.fn.dimmer = function(parameters) {
click: function(event) {
module.verbose('Determining if event occured on dimmer', event);
if( event.target == element ) {
if( $dimmer.find(event.target).size() === 0 ) {
module.hide();
}
}
@ -117,8 +120,8 @@ $.fn.dimmer = function(parameters) {
module.verbose('Showing dimmer animation with css');
$dimmer
.one(animationEnd, function() {
$dimmer.removeClass(className.show);
module.set.active();
$dimmer.removeClass(className.show);
})
.addClass(className.show)
;
@ -132,7 +135,10 @@ $.fn.dimmer = function(parameters) {
width : '100%',
height : '100%'
})
.fadeTo(settings.duration, 1, module.set.active)
.fadeTo(settings.duration, 1, function() {
$dimmer.removeAttr('style');
module.set.active();
})
;
}
},
@ -448,9 +454,10 @@ $.fn.dimmer.settings = {
className : {
active : 'active',
animating : 'animating',
dimmable : 'dimmable',
dimmed : 'dimmed',
disabled : 'disabled',
animating : 'animating',
hide : 'hide',
show : 'show'
}

Loading…
Cancel
Save