From d2e8c2533e64ba71f2c5feb4a39e4c2490fd01aa Mon Sep 17 00:00:00 2001 From: Eric Rasmussen <erasmussen2@unl.edu> Date: Wed, 4 Apr 2012 21:57:21 +0000 Subject: [PATCH] [#1100] Restore Tim's changes from r65 that were removed with the TinyMCE upgrade. Also include UNL Readme file --- README-UNL.txt | 5 +++++ plugins/advimage/js/image.js | 9 +++++++-- themes/advanced/js/image.js | 7 ++++++- 3 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 README-UNL.txt diff --git a/README-UNL.txt b/README-UNL.txt new file mode 100644 index 0000000..8664744 --- /dev/null +++ b/README-UNL.txt @@ -0,0 +1,5 @@ +UNL Modifications to Core (Marked with "Start UNL Change"): +---------------- + +Both image.js files (in plugins/advimage and themes) have been modified to not autofill image width and height. +---------------- \ No newline at end of file diff --git a/plugins/advimage/js/image.js b/plugins/advimage/js/image.js index 546b69c..0dec9dc 100644 --- a/plugins/advimage/js/image.js +++ b/plugins/advimage/js/image.js @@ -314,8 +314,13 @@ var ImageDialog = { var f = document.forms[0]; if (!st) { - f.elements.width.value = img.width; - f.elements.height.value = img.height; + // Start UNL Change! + + // By default, we don't want width and height specified. + //f.elements.width.value = img.width; + //f.elements.height.value = img.height; + + // END UNL Change! } this.preloadImg = img; diff --git a/themes/advanced/js/image.js b/themes/advanced/js/image.js index 6c2489a..bd72e50 100644 --- a/themes/advanced/js/image.js +++ b/themes/advanced/js/image.js @@ -229,7 +229,12 @@ var ImageDialog = { updateImageData : function() { var f = document.forms[0], t = ImageDialog; - + + // Start UNL Change! + // By default, we don't want width and height specified. + return; + // End UNL Change! + if (f.width.value == "") f.width.value = t.preloadImg.width; -- GitLab