Ticket #5307: 5307.patch

File 5307.patch, 1.3 KB (added by Garry Yao, 14 years ago)
  • _source/plugins/dialog/plugin.js

     
    893893
    894894                        page.setAttribute( 'aria-labelledby', tabId );
    895895
    896                         // If only a single page exist, a different style is used in the central pane.
    897                         if ( this._.pageCount === 0 )
    898                                 this.parts.dialog.addClass( 'cke_single_page' );
    899                         else
    900                                 this.parts.dialog.removeClass( 'cke_single_page' );
    901 
    902896                        // Take records for the tabs and elements created.
    903897                        this._.tabs[ contents.id ] = [ tab, page ];
    904898                        this._.tabIdList.push( contents.id );
    905                         this._.pageCount++;
     899                        !contents.hidden && this._.pageCount++;
    906900                        this._.lastTab = tab;
    907901
     902                        // If only a single page exist, a different style is used in the central pane.
     903                        this.parts.dialog[ ( this._.pageCount === 1 ? 'add' : 'remove' ) + 'Class' ]( 'cke_single_page' );
     904
    908905                        var contentMap = this._.contents[ contents.id ] = {},
    909906                                cursor,
    910907                                children = vbox.getChild();
     
    973970                        if ( !tab )
    974971                                return;
    975972                        tab.hide();
     973                        this._.pageCount--;
    976974                },
    977975
    978976                /**
     
    987985                        if ( !tab )
    988986                                return;
    989987                        tab.show();
     988                        this._.pageCount++;
    990989                },
    991990
    992991                /**
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy