Closed (fixed)
Project:
Text Resize
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
4 Nov 2007 at 17:50 UTC
Updated:
31 Mar 2008 at 05:45 UTC
The default initialization JavaScript code throws an error because it defines a variation "option" and then tries to refer to "options".
// Initialize FontSizer
$(document).ready(function() {
var option = { min: -1, max: 2 };
$.FontSizer.Init(options);
});Why not pass in the object literal directly instead of defining a new global variable?
Comments
Comment #1
redbox2000@drupal.org commentedSorry for the delay. I'm in the middle of a huge project launch. I will take a look at this shortly. I have created several other wrappers by now that I'm using in this Drupal project, and I think I have a solution that will accomplish 2 things: 1) always have a 'system-level, default, and 2) allow for 'inline customization' so that you can send pref's when you actually need/use the plug-in.
I'll need a few more days on this as these other 'paying-the-bills' projects' literally consume all my time for the next few days.
Comment #2
druvision commentedI went to the admin/settings/jquery_fontsizer page and changed the initialization code variable name from "option" to "options', then removed compression - now it worked without error.
Then I've set the compression again - it seems to resolve the issue - it was simply an error in the default initialization code.
Request for the module maintainer: please change the var name in the default initialization code from 'option' to 'options'. Here is the code which worked for me:
Amnon
-
Professional: Drupal Israel | Drupal Development & Consulting | Eco-Healing | Effective Hosting Strategies | בניית אתרים
Personal: Hitech Dolphin: Regain Simple Joy :)
Comment #3
redbox2000@drupal.org commentedOk. I have fixed this plus added new options to make this module more flexible. There is a new release available and also a new demo page.
Comment #4
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.