If I set resizable option to disabled on the edit vocabulary form (assume I use HS with taxonomy) then it stays resizable on the node submission page.
This patch handles the problem.
Explanation: in file hierarchical_select.js, in function Drupal.HierarchicalSelect.initialize there is an if statement which is always true: if (Drupal.settings.HierarchicalSelect.settings[hsid].resizable). That's because .resizable is string type. A simple parseInt solves the problem.
Diffed against 5.x-3.x-dev $Id: hierarchical_select.js,v 1.79 2008/09/21 22:25:44 wimleers Exp $

CommentFileSizeAuthor
resizable.patch568 byteszserno

Comments

wim leers’s picture

Assigned: Unassigned » wim leers

Hrm, .resizable should NOT be a string. Thanks for reporting!

I'm sure that I did test if disabling the resizable option worked though, at least for Taxonomy. Where did this happen for you?

zserno’s picture

Here is what I did:

  1. Installed a clean 5.10
  2. Installed HS 5.x-3.x-dev
  3. Installed JQuery Update 2.0
  4. Enabled modules: HS, HS Taxonomy, JQuery update
  5. Status report shows no error
  6. Set up a new category at admin/content/taxonomy/edit/vocabulary/1
  7. Enabled HS for 'page' type, set resizable to disabled (btw here I had to hack a bit, because after I hit submit the HS settings are lost - see my other issue: http://drupal.org/node/316157)
  8. Added some terms hierarchically
  9. Visited node/add/page and HS is resizable (even though .resizable is "0")
  10. In file hierarchical_select.js inserted the following line to line 22:
    console.log("Type of .resizable: " + typeof(Drupal.settings.HierarchicalSelect.settings[hsid].resizable));

That's it :)

wim leers’s picture

Weird. Reproduced.

wim leers’s picture

Title: Resizable option is always enabled. » Resizable setting is always enabled
Status: Needs review » Fixed

This was happening because I wasn't typecasting it properly. No need to make any changes in the JS.

While I was at it, I also made the positioning of the 'resizable' setting in the various $configs more consistent and added it to the exported code.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.