From 5eae2ecc7ccd6b29b91de4964dae2ef639ec7be8 Mon Sep 17 00:00:00 2001 From: Eric Rasmussen <ericrasmussen1@gmail.com> Date: Thu, 18 Apr 2013 16:31:08 -0500 Subject: [PATCH] [gh-3] Add image height/width autofill changes Were wiped out in 2095279405440f0036c50c08b9b360c90850f646 --- README-UNL.txt | 4 ++-- plugins/advimage/js/image.js | 9 +++++++-- themes/advanced/js/image.js | 5 +++++ 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/README-UNL.txt b/README-UNL.txt index 8664744..2319731 100644 --- a/README-UNL.txt +++ b/README-UNL.txt @@ -1,5 +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 +Both image.js files (in plugins/advimage/js and themes/advanced/js) have been modified to not autofill image width and height. +---------------- diff --git a/plugins/advimage/js/image.js b/plugins/advimage/js/image.js index f0b7c6e..0822471 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 bb09e75..cf2cc6b 100644 --- a/themes/advanced/js/image.js +++ b/themes/advanced/js/image.js @@ -232,6 +232,11 @@ 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