Make WordPress Core

Ticket #15911: 15911.4.patch

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

     
    353353        close : function() {
    354354                var c;
    355355
     356                QTags.getInstance('replycontent').clearButtonStates();
     357
    356358                if ( this.cid ) {
    357359                        c = $('#comment-' + this.cid);
    358360
  • wp-includes/js/quicktags.dev.js

     
    209209
    210210                tb.innerHTML = html;
    211211                t.toolbar = tb;
     212                t.canvas = canvas;
    212213
    213214                // listen for click events
    214215                onclick = function(e) {
     
    506507
    507508        qt.prototype.closeAllTags = function() {
    508509                var btn = this.getButton('close');
    509                 btn.callback.call(btn, '', this.canvas, this.toolbar);
     510                btn.callback.call(btn, '', this.canvas, this);
     511        };
     512
     513        qt.prototype.clearButtonStates = function() {
     514                var button, element, tbo = this.openTags;
     515                if ( tbo ) {
     516                        while ( tbo.length > 0 ) {
     517                                button = this.getButton(tbo[tbo.length - 1]);
     518                                element = document.getElementById(this.name + '_' + button.id);
     519                                button.closeTag(element, this);
     520                        }
     521                }
    510522        };
    511523
    512524        // the link button