Ticket #5522: 5522.patch
File 5522.patch, 2.4 KB (added by , 13 years ago) |
---|
-
_source/plugins/forms/plugin.js
149 149 150 150 if ( name == 'input' ) 151 151 { 152 var type = element.getAttribute( 'type' ); 152 switch( element.getAttribute( 'type' ) ) 153 { 154 case 'button' : 155 case 'submit' : 156 case 'reset' : 157 return { button : CKEDITOR.TRISTATE_OFF }; 153 158 154 if ( type == 'text' || type == 'password' )155 return { textfield: CKEDITOR.TRISTATE_OFF };159 case 'checkbox' : 160 return { checkbox : CKEDITOR.TRISTATE_OFF }; 156 161 157 if ( type == 'button' || type == 'submit' || type == 'reset' )158 return { button: CKEDITOR.TRISTATE_OFF };162 case 'radio' : 163 return { radio : CKEDITOR.TRISTATE_OFF }; 159 164 160 if ( type == 'checkbox' )161 return { checkbox: CKEDITOR.TRISTATE_OFF };165 case 'image' : 166 return { imagebutton : CKEDITOR.TRISTATE_OFF }; 162 167 163 if ( type == 'radio' ) 164 return { radio : CKEDITOR.TRISTATE_OFF }; 165 166 if ( type == 'image' ) 167 return { imagebutton : CKEDITOR.TRISTATE_OFF }; 168 default : 169 return { textfield : CKEDITOR.TRISTATE_OFF }; 170 } 168 171 } 169 172 170 173 if ( name == 'img' && element.getAttribute( '_cke_real_element_type' ) == 'hiddenfield' ) … … 187 190 evt.data.dialog = 'hiddenfield'; 188 191 else if ( element.is( 'input' ) ) 189 192 { 190 var type = element.getAttribute( 'type' ); 191 192 switch ( type ) 193 switch ( element.getAttribute( 'type' ) ) 193 194 { 194 case 'text' :195 case 'password' :196 evt.data.dialog = 'textfield';197 break;198 195 case 'button' : 199 196 case 'submit' : 200 197 case 'reset' : … … 209 206 case 'image' : 210 207 evt.data.dialog = 'imagebutton'; 211 208 break; 209 default : 210 evt.data.dialog = 'textfield'; 211 break; 212 212 } 213 213 } 214 214 }); … … 231 231 { 232 232 var attrs = input.attributes, 233 233 type = attrs.type; 234 // Old IEs don't provide type for Text inputs #5522 235 if ( !type ) 236 attrs.type = 'text'; 234 237 if ( type == 'checkbox' || type == 'radio' ) 235 238 attrs.value == 'on' && delete attrs.value; 236 239 }