Changeset 3706 for trunk/bp-core/bp-core-cssjs.php
- Timestamp:
- 01/14/2011 07:35:58 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-cssjs.php
r3702 r3706 34 34 */ 35 35 function bp_core_admin_menu_icon_css() { 36 global $bp; 37 ?> 36 global $bp; ?> 38 37 39 38 <style type="text/css"> 40 ul#adminmenu li.toplevel_page_bp-general-settings .wp-menu-image a { background-image: url( <?php echo BP_PLUGIN_URL . '/bp-core/images/admin_menu_icon.png' ?> ) !important; background-position: -1px -32px; } 41 ul#adminmenu li.toplevel_page_bp-general-settings:hover .wp-menu-image a, ul#adminmenu li.toplevel_page_bp-general-settings.wp-has-current-submenu .wp-menu-image a { background-position: -1px 0; } 39 /* Wizard Icon */ 40 ul#adminmenu li.toplevel_page_bp-wizard .wp-menu-image a img { display: none; } 41 ul#adminmenu li.toplevel_page_bp-wizard .wp-menu-image a { background-image: url( <?php echo plugins_url( 'buddypress/bp-core/images/admin_menu_icon.png' ) ?> ) !important; background-position: -1px -32px; } 42 ul#adminmenu li.toplevel_page_bp-wizard:hover .wp-menu-image a, 43 ul#adminmenu li.toplevel_page_bp-wizard.wp-has-current-submenu .wp-menu-image a { 44 background-position: -1px 0; 45 } 46 47 /* Settings Icon */ 42 48 ul#adminmenu li.toplevel_page_bp-general-settings .wp-menu-image a img { display: none; } 49 ul#adminmenu li.toplevel_page_bp-general-settings .wp-menu-image a { background-image: url( <?php echo plugins_url( 'buddypress/bp-core/images/admin_menu_icon.png' ) ?> ) !important; background-position: -1px -32px; } 50 ul#adminmenu li.toplevel_page_bp-general-settings:hover .wp-menu-image a, 51 ul#adminmenu li.toplevel_page_bp-general-settings.wp-has-current-submenu .wp-menu-image a { 52 background-position: -1px 0; 53 } 43 54 </style> 44 55 … … 85 96 $image = apply_filters( 'bp_inline_cropper_image', getimagesize( BP_AVATAR_UPLOAD_PATH . $bp->avatar_admin->image->dir ) ); 86 97 $aspect_ratio = 1; 98 99 $full_height = (int) constant( 'BP_AVATAR_FULL_HEIGHT' ); 100 $full_width = (int) constant( 'BP_AVATAR_FULL_WIDTH' ); 87 101 88 102 // Calculate Aspect Ratio 89 if ( (int) constant( 'BP_AVATAR_FULL_HEIGHT' ) && ( (int) constant( 'BP_AVATAR_FULL_WIDTH' ) != (int) constant( 'BP_AVATAR_FULL_HEIGHT' )) )90 $aspect_ratio = (int) constant( 'BP_AVATAR_FULL_WIDTH' ) / (int) constant( 'BP_AVATAR_FULL_HEIGHT' );103 if ( $full_height && ( $full_width != $full_height ) ) 104 $aspect_ratio = $full_width / $full_height; 91 105 92 106 $width = $image[0] / 2; … … 115 129 function showPreview(coords) { 116 130 if ( parseInt(coords.w) > 0 ) { 117 var rx = <?php echo (int) constant( 'BP_AVATAR_FULL_WIDTH' )?> / coords.w;118 var ry = <?php echo (int) constant( 'BP_AVATAR_FULL_HEIGHT' )?> / coords.h;131 var rx = <?php echo $full_width; ?> / coords.w; 132 var ry = <?php echo $full_height; ?> / coords.h; 119 133 120 134 jQuery('#avatar-crop-preview').css({ 121 135 <?php if ( $image ) : ?> 122 width: Math.round(rx * <?php echo $image[0] ?>) + 'px',123 height: Math.round(ry * <?php echo $image[1] ?>) + 'px',136 width: Math.round(rx * <?php echo $image[0]; ?>) + 'px', 137 height: Math.round(ry * <?php echo $image[1]; ?>) + 'px', 124 138 <?php endif; ?> 125 139 marginLeft: '-' + Math.round(rx * coords.x) + 'px',
Note: See TracChangeset
for help on using the changeset viewer.