Changeset 5246
- Timestamp:
- 03/18/10 08:43:21 (3 years ago)
- Location:
- CKEditor/trunk
- Files:
-
- 2 edited
-
CHANGES.html (modified) (1 diff)
-
_source/plugins/dialog/plugin.js (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
CKEditor/trunk/CHANGES.html
r5245 r5246 72 72 <li><a href="http://dev.fckeditor.net/ticket/4717">#4717</a> : 'Unlink' and 'Outdent' command buttons should be disabled on editor startup.</li> 73 73 <li><a href="http://dev.fckeditor.net/ticket/5119">#5119</a> : Disabled command buttons are not being properly marked when focused.</li> 74 <li><a href="http://dev.fckeditor.net/ticket/5307">#5307</a> : Hide dialog page cause problem when there's only two remains.</li> 74 75 </ul> 75 76 <h3> -
CKEditor/trunk/_source/plugins/dialog/plugin.js
r5215 r5246 336 336 processed = 1; 337 337 } 338 else if ( keystroke == CKEDITOR.ALT + 121 && !me._.tabBarMode )338 else if ( keystroke == CKEDITOR.ALT + 121 && !me._.tabBarMode && me.getPageCount() > 1 ) 339 339 { 340 340 // Alt-F10 puts focus into the current tab item in the tab bar. … … 894 894 page.setAttribute( 'aria-labelledby', tabId ); 895 895 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 else900 this.parts.dialog.removeClass( 'cke_single_page' );901 902 896 // Take records for the tabs and elements created. 903 897 this._.tabs[ contents.id ] = [ tab, page ]; 904 898 this._.tabIdList.push( contents.id ); 905 this._.pageCount++;899 !contents.hidden && this._.pageCount++; 906 900 this._.lastTab = tab; 901 this.updateStyle(); 907 902 908 903 var contentMap = this._.contents[ contents.id ] = {}, … … 962 957 }, 963 958 959 // Dialog state-specific style updates. 960 updateStyle : function() 961 { 962 // If only a single page shown, a different style is used in the central pane. 963 this.parts.dialog[ ( this._.pageCount === 1 ? 'add' : 'remove' ) + 'Class' ]( 'cke_single_page' ); 964 }, 965 964 966 /** 965 967 * Hides a page's tab away from the dialog. … … 971 973 { 972 974 var tab = this._.tabs[id] && this._.tabs[id][0]; 973 if ( !tab )975 if ( !tab || this._.pageCount == 1 ) 974 976 return; 977 // Switch to other tab first when we're hiding the active tab. 978 else if ( id == this._.currentTabId ) 979 this.selectPage( getPreviousVisibleTab.call( this ) ); 980 975 981 tab.hide(); 982 this._.pageCount--; 983 this.updateStyle(); 976 984 }, 977 985 … … 988 996 return; 989 997 tab.show(); 998 this._.pageCount++; 999 this.updateStyle(); 990 1000 }, 991 1001
Note: See TracChangeset
for help on using the changeset viewer.
