]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/js/tags.dev.js
Wordpress 3.1
[autoinstalls/wordpress.git] / wp-admin / js / tags.dev.js
index abb8ecc07c7111c34db06e6b86cfbbbd339c02de..3273bae347cc46c73994b613ec2b7d495ca93f51 100644 (file)
@@ -41,9 +41,11 @@ jQuery(document).ready(function($) {
                        var parent = form.find('select#parent').val();
 
                        if ( parent > 0 && $('#tag-' + parent ).length > 0 ) // If the parent exists on this page, insert it below. Else insert it at the top of the list.
-                               $('#the-list #tag-' + parent).after( res.responses[0].supplemental['noparents'] ); // As the parent exists, Insert the version with - - - prefixed
+                               $('.tags #tag-' + parent).after( res.responses[0].supplemental['noparents'] ); // As the parent exists, Insert the version with - - - prefixed
                        else
-                               $('#the-list').prepend( res.responses[0].supplemental['parents'] ); // As the parent is not visible, Insert the version with Parent - Child - ThisTerm
+                               $('.tags').prepend( res.responses[0].supplemental['parents'] ); // As the parent is not visible, Insert the version with Parent - Child - ThisTerm
+
+                       $('.tags .no-items').remove();
 
                        if ( form.find('select#parent') ) {
                                // Parents field exists, Add new term to the list.
@@ -63,4 +65,4 @@ jQuery(document).ready(function($) {
                return false;
        });
 
-});
\ No newline at end of file
+});