To my utter astonishment I got a javascript image resizer for the board pictures to actually work - without breaking anything else.
Way to go...
Posted by: Dandello Posted on: Aug 14th, 2014 at 1:59am
To my utter astonishment I got a javascript image resizer for the board pictures to actually work - without breaking anything else.
Posted by: Dandello Posted on: Aug 13th, 2014 at 8:51pm
Well, the javascript solution based on the image_resize sub just didn't do it. BUT, a css solution worked. (I checked it in all the major browsers I have on my test machine and so far it's looking okay.)
Edited:
However, it still may not be quite 'smart' enough to 'smart resize' images that are tall and skinny.
Posted by: Monni Posted on: Aug 13th, 2014 at 2:16pm
I was thinking about using the Board IDs to generate IDs for all the Board pics and put those into the javascript array for resizing. In theory, that should get around the problem of the pictures in the hidden tables not being detected.
I'll work on it tomorrow.
Even if you get all the IDs in the array, the result depends on whether the actual resize call in JavaScript code happens late enough that the actual DOM nodes are iterable.
Posted by: Dandello Posted on: Aug 13th, 2014 at 5:02am
I was thinking about using the Board IDs to generate IDs for all the Board pics and put those into the javascript array for resizing. In theory, that should get around the problem of the pictures in the hidden tables not being detected.
I'll work on it tomorrow.
Posted by: Monni Posted on: Aug 13th, 2014 at 4:05am
The obvious solution is to add step to the Ajax call that loads the hidden boards, which either re-iterates the images and updates the list at the bottom of the page source or forces Perl to handle the image resize for them instead of JavaScript code.
Posted by: Dandello Posted on: Aug 12th, 2014 at 10:37pm
When in the MessageIndex dropdown, board pictures don't get included in the javascript array that controls the image resize. (I'm guessing that since they start out 'hidden', the javascript script in Subs.pm doesn't see them to change their IDs and stick them in the array.)
It would be nice to not lose the board picture resize but this level of javascript writing is beyond me.