Closed (fixed)
Project:
Hierarchical Select
Version:
5.x-3.x-dev
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Reporter:
Created:
2 Oct 2008 at 12:09 UTC
Updated:
19 Oct 2008 at 15:52 UTC
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 $
| Comment | File | Size | Author |
|---|---|---|---|
| resizable.patch | 568 bytes | zserno |
Comments
Comment #1
wim leersHrm, .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?
Comment #2
zserno commentedHere is what I did:
console.log("Type of .resizable: " + typeof(Drupal.settings.HierarchicalSelect.settings[hsid].resizable));That's it :)
Comment #3
wim leersWeird. Reproduced.
Comment #4
wim leersThis 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.
Comment #5
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.