Issue 2443. Modal bug bugfix.

git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@11556 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ChanMyeong 2012-09-27 09:44:05 +00:00
parent cfe90618e3
commit e2b79bb9fa
2 changed files with 32 additions and 28 deletions

View file

@ -100,7 +100,7 @@ jQuery(function($){
contentBugFix();
});
// Multilingual
var $mlCheck = $('.x .multilingual>label>input[type="checkbox"]');
/*var $mlCheck = $('.x .multilingual>label>input[type="checkbox"]');
function multilingual(){
$mlCheck.each(function(event){
var $this = $(this);
@ -122,7 +122,8 @@ jQuery(function($){
});
}
multilingual();
$mlCheck.change(multilingual);
$mlCheck.change(multilingual);*/
// var $multilingual
// Check All
$('.x th>input[type="checkbox"]')
.change(function() {
@ -181,7 +182,6 @@ jQuery(function($){
jQuery(function($){
var ESC = 27;
$.fn.xeModalWindow = function(){
this
.not('.xe-modal-window')
@ -194,16 +194,6 @@ $.fn.xeModalWindow = function(){
// get and initialize modal window
$modal = $( $this.attr('href') );
if(!$modal.parent('body').length) {
$btnClose = $('<button type="button" class="x_close">&times;</button>');
$btnClose.click(function(){ $modal.data('anchor').trigger('close.mw') });
$modal.find('[data-hide]').click(function(){ $modal.data('anchor').trigger('close.mw') });
$('body').append('<div class="x_modal-backdrop"></div>').append($modal); // append background
$modal.prepend($btnClose); // prepend close button
}
// set the related anchor
$modal.data('anchor', $this);
if($modal.data('state') == 'showing') {
$this.trigger('close.mw');
@ -214,7 +204,19 @@ $.fn.xeModalWindow = function(){
return false;
})
.bind('open.mw', function(){
var $this = $(this), before_event, $modal, duration;
var $this = $(this), $modal, $btnClose, disabled, before_event, duration;
$modal = $( $this.attr('href') );
if(!$modal.parent('body').length) {
$btnClose = $('<button type="button" class="x_close">&times;</button>');
$btnClose.click(function(){ $modal.data('anchor').trigger('close.mw') });
$modal.find('[data-hide]').click(function(){ $modal.data('anchor').trigger('close.mw') });
$('body').append('<div class="x_modal-backdrop"></div>').append($modal); // append background
$modal.prepend($btnClose); // prepend close button
}
// set the related anchor
$modal.data('anchor', $this);
// before event trigger
before_event = $.Event('before-open.mw');

View file

@ -100,7 +100,7 @@ jQuery(function($){
contentBugFix();
});
// Multilingual
var $mlCheck = $('.x .multilingual>label>input[type="checkbox"]');
/*var $mlCheck = $('.x .multilingual>label>input[type="checkbox"]');
function multilingual(){
$mlCheck.each(function(event){
var $this = $(this);
@ -122,7 +122,8 @@ jQuery(function($){
});
}
multilingual();
$mlCheck.change(multilingual);
$mlCheck.change(multilingual);*/
// var $multilingual
// Check All
$('.x th>input[type="checkbox"]')
.change(function() {
@ -181,7 +182,6 @@ jQuery(function($){
jQuery(function($){
var ESC = 27;
$.fn.xeModalWindow = function(){
this
.not('.xe-modal-window')
@ -194,16 +194,6 @@ $.fn.xeModalWindow = function(){
// get and initialize modal window
$modal = $( $this.attr('href') );
if(!$modal.parent('body').length) {
$btnClose = $('<button type="button" class="x_close">&times;</button>');
$btnClose.click(function(){ $modal.data('anchor').trigger('close.mw') });
$modal.find('[data-hide]').click(function(){ $modal.data('anchor').trigger('close.mw') });
$('body').append('<div class="x_modal-backdrop"></div>').append($modal); // append background
$modal.prepend($btnClose); // prepend close button
}
// set the related anchor
$modal.data('anchor', $this);
if($modal.data('state') == 'showing') {
$this.trigger('close.mw');
@ -214,7 +204,19 @@ $.fn.xeModalWindow = function(){
return false;
})
.bind('open.mw', function(){
var $this = $(this), before_event, $modal, duration;
var $this = $(this), $modal, $btnClose, disabled, before_event, duration;
$modal = $( $this.attr('href') );
if(!$modal.parent('body').length) {
$btnClose = $('<button type="button" class="x_close">&times;</button>');
$btnClose.click(function(){ $modal.data('anchor').trigger('close.mw') });
$modal.find('[data-hide]').click(function(){ $modal.data('anchor').trigger('close.mw') });
$('body').append('<div class="x_modal-backdrop"></div>').append($modal); // append background
$modal.prepend($btnClose); // prepend close button
}
// set the related anchor
$modal.data('anchor', $this);
// before event trigger
before_event = $.Event('before-open.mw');