| [ Index ] |
PHP Cross Reference of Wordpress 2.9.1 |
[Summary view] [Print] [Text view]
1 jQuery(document).ready(function($) { 2 var options = false, addAfter, delBefore, delAfter; 3 if ( document.forms['addcat'].category_parent ) 4 options = document.forms['addcat'].category_parent.options; 5 6 addAfter = function( r, settings ) { 7 var name, id; 8 9 name = $("<span>" + $('name', r).text() + "</span>").text(); 10 id = $('cat', r).attr('id'); 11 options[options.length] = new Option(name, id); 12 } 13 14 delAfter = function( r, settings ) { 15 var id = $('cat', r).attr('id'), o; 16 for ( o = 0; o < options.length; o++ ) 17 if ( id == options[o].value ) 18 options[o] = null; 19 } 20 21 delBefore = function(s) { 22 if ( 'undefined' != showNotice ) 23 return showNotice.warn() ? s : false; 24 25 return s; 26 } 27 28 if ( options ) 29 $('#the-list').wpList( { addAfter: addAfter, delBefore: delBefore, delAfter: delAfter } ); 30 else 31 $('#the-list').wpList({ delBefore: delBefore }); 32 33 $('.delete a[class^="delete"]').live('click', function(){return false;}); 34 });
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Fri Jan 8 00:19:48 2010 | Cross-referenced by PHPXref 0.7 |