X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Fforms%2Fplugin.js;h=4668bef9c2e8e6f693465bffbfee2ad64cdc6133;hb=614511639979907ceb0da3614122a4d8eb963ad4;hp=fcf639cb687cfa6cdad18dec3e901fbe005a5d80;hpb=f8fc585c18d287eb325c575596d183122486b641;p=ckeditor.git diff --git a/_source/plugins/forms/plugin.js b/_source/plugins/forms/plugin.js index fcf639c..4668bef 100644 --- a/_source/plugins/forms/plugin.js +++ b/_source/plugins/forms/plugin.js @@ -27,8 +27,8 @@ CKEDITOR.plugins.add( 'forms', 'background-position: center center;' + 'background-repeat: no-repeat;' + 'border: 1px solid #a9a9a9;' + - 'width: 16px;' + - 'height: 16px;' + + 'width: 16px !important;' + + 'height: 16px !important;' + '}' ); // All buttons use the same code to register. So, to avoid @@ -131,13 +131,13 @@ CKEDITOR.plugins.add( 'forms', { editor.contextMenu.addListener( function( element ) { - if ( element && element.hasAscendant( 'form', true ) ) + if ( element && element.hasAscendant( 'form', true ) && !element.isReadOnly() ) return { form : CKEDITOR.TRISTATE_OFF }; }); editor.contextMenu.addListener( function( element ) { - if ( element ) + if ( element && !element.isReadOnly() ) { var name = element.getName(); @@ -191,10 +191,13 @@ CKEDITOR.plugins.add( 'forms', switch ( type ) { - case 'text' : case 'password': + case 'text' : + case 'password' : evt.data.dialog = 'textfield'; break; - case 'button' : case 'submit' : case 'reset' : + case 'button' : + case 'submit' : + case 'reset' : evt.data.dialog = 'button'; break; case 'checkbox' :