mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 18:51:41 +09:00
Fixed a bug for repeating initialization. Adjust fog layer's height
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8868 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
9462e2c9d9
commit
bd0b64c1a3
1 changed files with 15 additions and 21 deletions
|
|
@ -120,11 +120,23 @@ jQuery(function($){
|
|||
// Modal Window
|
||||
$('a.modalAnchor')
|
||||
.click(function(){
|
||||
var $this = $(this), $modal, disabled;
|
||||
var $this = $(this), $modal, $btnClose, disabled;
|
||||
|
||||
// get and initialize modal window
|
||||
$modal = $( $this.attr('href') );
|
||||
$this.trigger('init.mw');
|
||||
if(!$modal.parent('body').length) {
|
||||
$btnClose = $('<button type="button" class="modalClose" title="Close this layer">X</button>');
|
||||
$btnClose.click(function(){ $modal.data('anchor').trigger('close.mw') });
|
||||
|
||||
$modal
|
||||
.prepend('<span class="bg"></span>')
|
||||
.append('<!--[if IE 6]><iframe class="ie6"></iframe><![endif]-->')
|
||||
.find('>.fg')
|
||||
.prepend($btnClose)
|
||||
.append($btnClose.clone(true))
|
||||
.end()
|
||||
.appendTo('body');
|
||||
}
|
||||
|
||||
// set the related anchor
|
||||
$modal.data('anchor', $this);
|
||||
|
|
@ -137,25 +149,6 @@ jQuery(function($){
|
|||
|
||||
return false;
|
||||
})
|
||||
.bind('init.mw', function(){
|
||||
var $this = $(this), $modal, $btnClose;
|
||||
|
||||
$modal = $( $this.attr('href') );
|
||||
$btnClose = $('<button type="button" class="modalClose" title="Close this layer">X</button>');
|
||||
$btnClose.click(function(){ $modal.data('anchor').trigger('close.mw') });
|
||||
|
||||
$modal
|
||||
.prepend('<span class="bg"></span>')
|
||||
.append('<!--[if IE 6]><iframe class="ie6"></iframe><![endif]-->')
|
||||
.find('>.fg')
|
||||
.prepend($btnClose)
|
||||
.append($btnClose.clone(true))
|
||||
.end()
|
||||
.appendTo('body');
|
||||
|
||||
// unbind create event
|
||||
$this.unbind('init.mw');
|
||||
})
|
||||
.bind('open.mw', function(){
|
||||
var $this = $(this), before_event, $modal, duration;
|
||||
|
||||
|
|
@ -190,6 +183,7 @@ jQuery(function($){
|
|||
|
||||
$modal
|
||||
.fadeIn(duration, after)
|
||||
.find('>.bg').height($(document).height()).end()
|
||||
.find('button.modalClose:first').focus();
|
||||
})
|
||||
.bind('close.mw', function(){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue