JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.6.1
[ckeditor.git] / _source / plugins / image / dialogs / image.js
index 3833e03..e793a89 100644 (file)
@@ -158,11 +158,14 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                        else\r
                                ratioButton.addClass( 'cke_btn_unlocked' );\r
 \r
-                       var lang = dialog._.editor.lang.image,\r
-                               label =  lang[  dialog.lockRatio ? 'unlockRatio' : 'lockRatio' ];\r
+                       ratioButton.setAttribute( 'aria-checked', dialog.lockRatio );\r
 \r
-                       ratioButton.setAttribute( 'title', label );\r
-                       ratioButton.getFirst().setText( label );\r
+                       // Ratio button hc presentation - WHITE SQUARE / BLACK SQUARE\r
+                       if ( CKEDITOR.env.hc )\r
+                       {\r
+                               var icon = ratioButton.getChild( 0 );\r
+                               icon.setHtml(  dialog.lockRatio ? CKEDITOR.env.ie ? '\u25A0': '\u25A3' : CKEDITOR.env.ie ? '\u25A1' : '\u25A2' );\r
+                       }\r
 \r
                        return dialog.lockRatio;\r
                };\r
@@ -780,7 +783,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                                                                                                                                                        updatePreview( this );\r
                                                                                                                                                }\r
                                                                                                                                        }\r
-                                                                                                                                       evt.data.preventDefault();\r
+                                                                                                                                       evt.data && evt.data.preventDefault();\r
                                                                                                                                }, this.getDialog() );\r
                                                                                                                        ratioButton.on( 'mouseover', function()\r
                                                                                                                                {\r
@@ -793,8 +796,8 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                                                                                                                }\r
                                                                                                        },\r
                                                                                                        html : '<div>'+\r
-                                                                                                               '<a href="javascript:void(0)" tabindex="-1" title="' + editor.lang.image.unlockRatio +\r
-                                                                                                               '" class="cke_btn_locked" id="' + btnLockSizesId + '" role="button"><span class="cke_label">' + editor.lang.image.unlockRatio + '</span></a>' +\r
+                                                                                                               '<a href="javascript:void(0)" tabindex="-1" title="' + editor.lang.image.lockRatio +\r
+                                                                                                               '" class="cke_btn_locked" id="' + btnLockSizesId + '" role="checkbox"><span class="cke_icon"></span><span class="cke_label">' + editor.lang.image.lockRatio + '</span></a>' +\r
                                                                                                                '<a href="javascript:void(0)" tabindex="-1" title="' + editor.lang.image.resetSize +\r
                                                                                                                '" class="cke_btn_reset" id="' + btnResetSizeId + '" role="button"><span class="cke_label">' + editor.lang.image.resetSize + '</span></a>'+\r
                                                                                                                '</div>'\r