mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +09:00
lib UM.menus renamed to UM.dropdown
This commit is contained in:
@@ -744,7 +744,7 @@ a.um-link-alt:hover {text-decoration: underline !important;}
|
||||
-moz-border-radius: 5px;
|
||||
-webkit-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
z-index: 10;
|
||||
z-index: 55;
|
||||
display: none;
|
||||
border: 1px solid #e5e5e5;
|
||||
box-sizing: border-box;
|
||||
|
||||
@@ -10,7 +10,7 @@ if ( typeof (window.UM) !== 'object' ) {
|
||||
window.UM = {};
|
||||
}
|
||||
|
||||
window.UM.menus = {
|
||||
UM.dropdown = {
|
||||
/**
|
||||
* Hide the menu
|
||||
* @param {object} menu
|
||||
@@ -49,7 +49,7 @@ window.UM.menus = {
|
||||
position = $menu.attr('data-position'),
|
||||
trigger = $menu.attr('data-trigger');
|
||||
|
||||
var $element = element && jQuery(element).length ? jQuery(element) : $menu.parent();
|
||||
var $element = element && jQuery(element).length ? jQuery(element) : ($menu.siblings('a').length ? $menu.siblings('a').first() : $menu.parent());
|
||||
$element.addClass('um-trigger-menu-on-' + trigger);
|
||||
|
||||
var gap_right = 0,
|
||||
@@ -138,7 +138,7 @@ window.UM.menus = {
|
||||
}
|
||||
|
||||
$menu.css({
|
||||
'top': top_p + 4,
|
||||
'top': top_p + 6,
|
||||
'width': menu_width,
|
||||
'left': left_p,
|
||||
'right': 'auto',
|
||||
@@ -161,8 +161,8 @@ window.UM.menus = {
|
||||
show: function (menu) {
|
||||
|
||||
var $menu = jQuery(menu);
|
||||
UM.menus.setPosition($menu);
|
||||
jQuery('.um-dropdown').hide();
|
||||
UM.dropdown.hideAll();
|
||||
UM.dropdown.setPosition($menu);
|
||||
$menu.show();
|
||||
|
||||
}
|
||||
@@ -171,13 +171,11 @@ window.UM.menus = {
|
||||
|
||||
/**
|
||||
* Hide all menus
|
||||
* @deprecated since 2.1.16, use UM.menus.hideAll() instead
|
||||
* @deprecated since 2.1.16, use UM.dropdown.hideAll() instead
|
||||
* @returns {undefined}
|
||||
*/
|
||||
function UM_hide_menus() {
|
||||
var menu = jQuery( '.um-dropdown' );
|
||||
menu.parents('div' ).find('a').removeClass( 'active' );
|
||||
menu.hide();
|
||||
UM.dropdown.hideAll();
|
||||
}
|
||||
|
||||
|
||||
@@ -186,7 +184,7 @@ function UM_hide_menus() {
|
||||
*/
|
||||
function UM_domenus() {
|
||||
jQuery('.um-dropdown').each( function( i, menu ) {
|
||||
UM.menus.setPosition( menu );
|
||||
UM.dropdown.setPosition( menu );
|
||||
});
|
||||
}
|
||||
|
||||
@@ -601,8 +599,7 @@ function um_new_modal( id, size, isPhoto, source ){
|
||||
|
||||
jQuery('.tipsy').hide();
|
||||
|
||||
//UM_hide_menus();
|
||||
UM.menus.hideAll();
|
||||
UM.dropdown.hideAll();
|
||||
|
||||
jQuery('body,html,textarea').css("overflow", "hidden");
|
||||
|
||||
|
||||
@@ -41,8 +41,7 @@ jQuery(document).ready(function() {
|
||||
user_id = jQuery(this).attr('data-user_id');
|
||||
metakey = 'profile_photo';
|
||||
|
||||
//UM_hide_menus();
|
||||
UM.menus.hideAll();
|
||||
UM.dropdown.hideAll();
|
||||
|
||||
jQuery.ajax({
|
||||
url: wp.ajax.settings.url,
|
||||
@@ -85,8 +84,7 @@ jQuery(document).ready(function() {
|
||||
}
|
||||
});
|
||||
|
||||
//UM_hide_menus();
|
||||
UM.menus.hideAll();
|
||||
UM.dropdown.hideAll();
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
@@ -95,12 +95,12 @@ jQuery(document).ready(function() {
|
||||
|
||||
jQuery( document.body ).on( 'click', '.um-trigger-menu-on-click', function() {
|
||||
var menu = jQuery(this).find('.um-dropdown');
|
||||
UM.menus.show( menu );
|
||||
UM.dropdown.show( menu );
|
||||
return false;
|
||||
});
|
||||
|
||||
jQuery( document.body ).on('click', '.um-dropdown-hide', function() {
|
||||
UM.menus.hideAll();
|
||||
UM.dropdown.hideAll();
|
||||
return false;
|
||||
});
|
||||
|
||||
@@ -108,7 +108,7 @@ jQuery(document).ready(function() {
|
||||
var child = jQuery(this).attr('data-child');
|
||||
var parent = jQuery(this).attr('data-parent');
|
||||
jQuery(this).parents( parent ).find( child ).trigger('click');
|
||||
UM.menus.hideAll();
|
||||
UM.dropdown.hideAll();
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user