Changeset 2104 for FCKeditor/branches
- Timestamp:
- 2008-06-23 10:59:19 (5 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
FCKeditor/branches/features/div_container/editor/dialog/fck_div.html
r2103 r2104 79 79 // Popuplate the style menu 80 80 var styles = FCKStyles.GetStyles() ; 81 var match = null ; 82 var selectableStyles = {} ; 81 83 for ( var i in styles ) 82 84 { 83 if ( ! /^_FCK_/.test( i ) )85 if ( ! /^_FCK_/.test( i ) && styles[i].Element == 'div' ) 84 86 { 85 AddStyleOption( i ) ;86 87 if ( ActiveEl && styles[i].CheckElementRemovable( ActiveEl, true ) ) 87 GetE( 'selStyle' ).value = i ; 88 match = i ; 89 selectableStyles[i] = styles[i] ; 88 90 } 89 91 } 92 if ( !match ) 93 AddStyleOption( "" ) ; 94 for ( var i in selectableStyles ) 95 AddStyleOption( i ) ; 96 if ( match ) 97 GetE( 'selStyle' ).value = i ; 90 98 91 99 if ( ActiveEl ) … … 131 139 132 140 var styleName = GetE( 'selStyle' ).value ; 133 var range = new oEditor.FCKDomRange( oEditor.FCK.EditorWindow ) ;134 range.SetStart( ActiveEl, 3 ) ;135 range.SetEnd( ActiveEl, 4 ) ;136 141 if ( styleName ) 137 FCKStyles.GetStyle( styleName ).ApplyTo Range( range, false, true) ;142 FCKStyles.GetStyle( styleName ).ApplyToObject( ActiveEl ) ; 138 143 139 144 return true ; … … 154 159 <span fcklang="DlgDivStyle">Style</span><br /> 155 160 <select id="selStyle" style="width: 100%;"> 156 <option value=""> 157 161 </select> 158 162 </td>