Make WordPress Core

Ticket #15911: 15911.5.patch

File 15911.5.patch, 1.2 KB (added by SergeyBiryukov, 14 years ago)
  • wp-admin/js/edit-comments.dev.js

     
    357357                        c = $('#comment-' + this.cid);
    358358
    359359                        if ( typeof QTags != 'undefined' )
    360                                 QTags.closeAllTags('replycontent');
     360                                QTags.clearButtonStates('replycontent');
    361361
    362362                        if ( this.act == 'edit-comment' )
    363363                                c.fadeIn(300, function(){ c.show() }).css('backgroundColor', '');
  • wp-includes/js/quicktags.dev.js

     
    538538                btn.callback.call(btn, '', ed.canvas, ed);
    539539        };
    540540
     541        qt.clearButtonStates = function(editor_id) {
     542                var ed = this.getInstance(editor_id), button, element, tbo = ed.openTags;
     543
     544                if ( tbo ) {
     545                        while ( tbo.length > 0 ) {
     546                                button = ed.getButton(tbo[tbo.length - 1]);
     547                                element = document.getElementById(ed.name + '_' + button.id);
     548                                button.closeTag(element, ed);
     549                        }
     550                }
     551        };
     552
    541553        // the link button
    542554        qt.LinkButton = function() {
    543555                qt.TagButton.call(this, 'link', 'link', '', '</a>', 'a');