mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
Fix show/hide conditional fields for IE browser
This commit is contained in:
@@ -315,20 +315,24 @@ jQuery(document).ready( function (){
|
||||
|
||||
if (condition.action == 'show' && is_true /*&& child_dom.is(':hidden')*/) {
|
||||
child_dom.show();
|
||||
_show_in_ie( child_dom );
|
||||
um_field_restore_default_value(child_dom);
|
||||
}
|
||||
|
||||
if (condition.action == 'show' && !is_true /*&& child_dom.is(':visible') */) {
|
||||
child_dom.hide();
|
||||
_hide_in_ie( child_dom );
|
||||
}
|
||||
|
||||
if (condition.action == 'hide' && is_true /*&& child_dom.is(':visible')*/) {
|
||||
child_dom.hide();
|
||||
}
|
||||
_hide_in_ie( child_dom );
|
||||
}
|
||||
|
||||
if (condition.action == 'hide' && !is_true /*&& child_dom.is(':hidden')*/) {
|
||||
child_dom.show();
|
||||
um_field_restore_default_value(child_dom);
|
||||
_show_in_ie( child_dom );
|
||||
um_field_restore_default_value( child_dom );
|
||||
|
||||
}
|
||||
$dom.removeClass('um-field-has-changed');
|
||||
@@ -452,6 +456,26 @@ jQuery(document).ready( function (){
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Hides div for IE browser
|
||||
* @param object $dom
|
||||
*/
|
||||
function _hide_in_ie( $dom ){
|
||||
if( jQuery.browser.msie ){
|
||||
$dom.css({"visibility":"hidden"});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows div for IE browser
|
||||
* @param object $dom
|
||||
*/
|
||||
function _show_in_ie( $dom ){
|
||||
if( jQuery.browser.msie ){
|
||||
$dom.css({"visibility":"visible"});
|
||||
}
|
||||
}
|
||||
|
||||
jQuery(document).on('change', '.um-field select, .um-field input[type=radio], .um-field input[type=checkbox]', function () {
|
||||
var me = jQuery(this);
|
||||
um_apply_conditions(me, false);
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user