i have overrided jquery update file and using LATEST jquery base .

i get this error on firebug :

$selects.gt is not a function
[Break on this error] $selects.gt(0)

hierarchical_select.js (line 110)

Thing is i dont mind so much about the jquery effect , so , is there any quick fix to completely remove Jquery and the effects and just popup a new select dropdown list whenever thats needed?
So basically we're talking bout a JAVASCRIPT-LESS version of hierarchy select module .

thanks

CommentFileSizeAuthor
#11 hierarchical_select.js_.txt16.22 KBev417

Comments

wim leers’s picture

Category: bug » support

Well, either you can:
- provide a patch to make it jQuery 1.2 compatible (but you have to keep 1.1 compatibility)
- make the JS file empty. This will make Hierarchical Select degrade to a normal select.

This is *not* a bug. You're effectively hacking the jQuery Update module.

gkatsanos’s picture

I'm sorry about the wrong Category selection for the ISSUE. I'm just starting here and sometimes i cant decide what's best.

So , i emptied hierarchical_select.js , the error was gone , but so was complete module's functionality . I'm not talking about the effect , i'm talking about the fact that SUBTERMS span on a new SELECT .

Is there anyway to keep this while not having the jquery/js around?
(that would be really a life-saver cause the dependency of jquery interface is really a bugger,big script,and i dont want it for anything else since i got latest base installed)

wim leers’s picture

Assigned: Unassigned » wim leers
Status: Active » Closed (won't fix)

Well, you can manually hack all the jQuery Interface stuff away. Look for calls to DropOutLeft() and DropInLeft(). This won't be supported, of course.

gkatsanos’s picture

If thats your decision i have no other option than to accept it , although we could leave the issue open so that maybe someone else could reply.
IMHO i see NO BAD in a jquery-free version of your other than that very usefull module.

So some more info about the code , is it an easy hack? Cause i dont know much bout php other than..recognizing patterns :-)
First of all , by emptying the hierarchical_select.js , and editing your module code , is it possible that your module still working without the animation effect?
Or if thats a "no" , is there any similar module that produces a new SELECT for SUBTERMS?

thanks for the immediate reply

wim leers’s picture

HS 3 does not require JS! You're free to test the tarballs :)

ev417’s picture

Assigned: wim leers » Unassigned
Status: Closed (won't fix) » Postponed (maintainer needs more info)

just try to replace :
$selects.gt(0) with : $selects.slice(1)

and then give comment to :
- $selects.gt(lastUnchanged).DropOutLeft(animationDelay); ----> //$selects.gt(lastUnchanged).DropOutLeft(animationDelay);
- $selects.gt(lastUnchanged).hide(0).DropInLeft(animationDelay); ----- > //$selects.gt(lastUnchanged).hide(0).DropInLeft(animationDelay);

this will remove the effect..
just try it.. hopefully it can run well :)

wim leers’s picture

I did try that. Unfortunately, that's not sufficient. When I tried that, along with several other modifications to make it compatible, that resulted in lots of other JS errors. That's understandable, IMO. How could you expect the same JS code to be compatible with very different major versions of a JS library?

Unless you plan to provide a patch, I'm going to won't fix this issue again.

wim leers’s picture

I did try that. Unfortunately, that's not sufficient. When I tried that, along with several other modifications to make it compatible, that resulted in lots of other JS errors. That's understandable, IMO. How could you expect the same JS code to be compatible with very different major versions of a JS library?

Unless you plan to provide a patch, I'm going to won't fix this issue again.

ev417’s picture

sorry i'm forget to tell u.. that i'm testing this on jquery 1.2.3 :)

yeah when i try in jquery 1.1.2 , it will show error in js.. but when i try in jquery 1.2.3 it work nicely...

hopefully the functionality runs well too.. because i'm using this HS module in jquery 1.2.3 and i like this module very much :)

wim leers’s picture

That works? :S I tried that too and it failed miserably. Could you please upload your hierarchical_select.js? Thanks.

ev417’s picture

StatusFileSize
new16.22 KB

I attach this hierarchical_select.js... i put a comment 'edit here' for the js i have changed..

i'm testing using firefox.. and it run well. Just try to clear the cache first after you change the js.. and clear session and cookies (i'clear my private data in firefox). i should thank's to you, because you create a great module :) hopefully it work on you :)

wim leers’s picture

Version: 5.x-2.1 » 5.x-3.x-dev
Status: Postponed (maintainer needs more info) » Closed (fixed)

That's against version 2's JS code. We're at version 3 now (still in development though) ;) :)

So… the file you uploaded is completely useless now. Also, it doesn't support the DropOutLeft/DropOutRight effects anymore *at all*, which is not desirable.

Thanks for your contribution though, it might be useful to some other users :)

Closing this issue.