From 6954099e88c8d1e10616433628885db45ce88856 Mon Sep 17 00:00:00 2001
From: Martin Dietze <mdietze@gmail.com>
Date: Tue, 24 Jun 2014 11:23:33 +0200
Subject: [PATCH] Add new configuration option
'editor.config.image_emptyHeightWidth' through which the pre-filling of the
image dialog's 'width' and 'height' fields can be suppressed. This option is
useful, because in some cases, users want no hard-set dimensions in the
generated IMG tab by default.
---
plugins/image/dialogs/image.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/plugins/image/dialogs/image.js b/plugins/image/dialogs/image.js
index fe15c4f..ba1d755 100644
a
|
b
|
|
155 | 155 | if ( oImageOriginal.getCustomData( 'isReady' ) == 'true' ) { |
156 | 156 | var widthField = dialog.getContentElement( 'info', 'txtWidth' ), |
157 | 157 | heightField = dialog.getContentElement( 'info', 'txtHeight' ); |
158 | | widthField && widthField.setValue( oImageOriginal.$.width ); |
159 | | heightField && heightField.setValue( oImageOriginal.$.height ); |
| 158 | widthField && !editor.config.image_emptyHeightWidth && widthField.setValue( oImageOriginal.$.width ); |
| 159 | heightField && !editor.config.image_emptyHeightWidth && heightField.setValue( oImageOriginal.$.height ); |
160 | 160 | } |
161 | 161 | updatePreview( dialog ); |
162 | 162 | }; |