Changeset 672024
- Timestamp:
- 02/23/2013 12:14:07 AM (13 years ago)
- Location:
- expandable-menus/trunk
- Files:
-
- 2 edited
-
expandable-menus.php (modified) (4 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
expandable-menus/trunk/expandable-menus.php
r669399 r672024 5 5 Description: Allows you to expand and collapse theme menus in WordPress admin. 6 6 Author: Dustin Dempsey 7 Version: 2. 07 Version: 2.1 8 8 Author URI: http://playforward.net 9 9 */ … … 15 15 // echo css and javascript 16 16 $plus_path = includes_url('/images/admin-bar-sprite.png'); 17 17 18 echo ' 18 19 <style> … … 76 77 77 78 function expand_get( c_name ) { 78 var i,x,y,ARRcookies = document.cookie.split(";"); 79 for ( i=0; i<ARRcookies.length; i++ ) { 80 x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("=")); 81 y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1); 82 x=x.replace(/^\s+|\s+$/g,""); 83 if ( x == c_name ) { 84 return unescape( y ); 85 } 86 } 79 if ( document.cookie ) { 80 var i,x,y,ARRcookies = document.cookie.split(";"); 81 for ( i=0; i<ARRcookies.length; i++ ) { 82 x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("=")); 83 y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1); 84 x=x.replace(/^\s+|\s+$/g,""); 85 if ( x == c_name ) { 86 return unescape( y ); 87 } 88 } 89 } else { 90 return false; 91 } 87 92 } 88 93 … … 293 298 var process_cookie = function() { 294 299 295 // if we still have items in the array to process 296 if ( cookies.length > 0 ) { 297 298 // trigger double click on item 299 var current_item = cookies[0]; 300 jQuery("#"+current_item).trigger( "dblclick" ); 301 302 // remove item from array 303 cookies.splice( 0, 1 ); 304 305 // process again 300 if ( cookies ) { 301 302 // if we still have items in the array to process 303 if ( cookies.length > 0 ) { 304 305 // trigger double click on item 306 var current_item = cookies[0]; 307 jQuery("#"+current_item).trigger( "dblclick" ); 308 309 // remove item from array 310 cookies.splice( 0, 1 ); 311 312 // process again 313 process_cookie(); 314 } 315 } 316 } 317 318 if ( cookie ) { 319 320 // get minimized items and revrse array to work backwards 321 var cookies = cookie.split("|"); 322 323 if ( cookies ) { 324 325 cookies = cookies.reverse(); 326 327 // process cookie items 306 328 process_cookie(); 307 308 329 } 309 330 } 310 311 // get minimized items and revrse array to work backwards312 var cookies = cookie.split("|");313 cookies = cookies.reverse();314 315 // process cookie items316 process_cookie();317 331 }); 318 332 </script> -
expandable-menus/trunk/readme.txt
r669399 r672024 5 5 Requires at least: 3.0 6 6 Tested up to: 3.6 7 Stable tag: 2. 07 Stable tag: 2.1 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 69 69 * Saves minimized menus in a cookie so you don't have to minimize every time the page is loaded. 70 70 71 = 2.1 = 72 73 * Addresses a javascript error, see support forum. 74 71 75 == Upgrade Notice == 72 76 … … 85 89 * Different indicators on hover and when minimized 86 90 * Saves minimized menus in a cookie so you don't have to minimize every time the page is loaded. 91 92 = 2.1 = 93 94 * Addresses a javascript error, see support forum.
Note: See TracChangeset
for help on using the changeset viewer.