Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 UTC on 18 March 2024, to get $100 off your ticket.
Is there any hope that you will make 6-x branch of this module?
Comment | File | Size | Author |
---|---|---|---|
#23 | 1223556-6x_version-23.patch | 2.85 KB | aidanlis |
Comments
Comment #1
XanoWe could do a backport once the Drupal 7 branch is stable. The code base is very small, so it should not be much work.
Comment #2
PolHello Xano,
Chosen needs jQuery >= 1.4 and I don't think it's available on D6.
Aniway, I'll focus myself on the D7 version, I need to learn D7, so it's a good start.
Nice commits btw ;-)
Have a nice day.
Comment #3
Liliplanet CreditAttribution: Liliplanet commentedsubscribe thx! for 6-x ..
Comment #4
janusman CreditAttribution: janusman commentedsubscribe =)
Comment #5
Vacilando CreditAttribution: Vacilando commentedSubscribing!
Comment #6
Ken Hawkins CreditAttribution: Ken Hawkins commentedI have yet to extensively test using jQuery 1.4.x but it is possible with 6.x.
( Here's how if you use the Adv Agg module http://drupal.org/node/1071624#comment-4401842 )
And it ought not be terribly hard to manually implement the Chosen.js
Load the JS:
Then specify the CSS id/classes the plugin applies too:
All that said, I've asked the Chosen JS maintainer about what it would take to do a 1.3.x backport https://github.com/harvesthq/chosen/issues/63
Comment #7
evlad CreditAttribution: evlad commentedsubscr
Comment #8
GiorgosKI would love to see a 6.x version
here is a similar project that works with views select boxes that you might want to look into
http://drupal.org/project/sexy_exposed
Comment #9
esource CreditAttribution: esource commented@Xano and Pol,
For an internal project at our company the software development team is planning on porting this module to D6 on our own, the success of which we'd be sending back here so it's available to everyone.
Would you be available to assist if we had a few questions?
Thanks.
Comment #10
Pol@esource: yes I'm available if you need something ;-)
Comment #11
esource CreditAttribution: esource commentedJust sent you a PM pol, let's chat about my approach and some basic stuff.
Comment #12
Ken Hawkins CreditAttribution: Ken Hawkins commentedAs an FYI, I've manually implemented the Chosen jQuery library using the steps I mentioned in #6.
One byproduct of using jQuery 1.4x in Drupal 6.x is that the dragable row widgets break (blocks, views, etc)
Here is a code patch that allows that to work.
(If you're using jQuery update you'll need to update the file in /sites/all/modules/jquery_update/replace/tabledrag.js instead)
Comment #13
Crom CreditAttribution: Crom commentedExciting project. D6 port would be fantastic for jq 1.3...subscribing.
@ken Hawkins - any chance of posting the module you created or some step by step instructions?
Cheers,
Crom
Comment #14
mthomas CreditAttribution: mthomas commentedSubscribing.
Comment #15
cposer CreditAttribution: cposer commentedSubscribe =)
Comment #16
Leksat CreditAttribution: Leksat commentedI found a workaround for D6.
Here is an example:
After that you can use Chosen plugin using javascript code like this:
This works fine for me. And yeah... How it works...
The idea came to me with a help of this page - http://bit.ly/ovpGB7
We can add to page isolated copy of Jquery of any version. In my example I used Juery 1.4.1 inside variable "jq141". Right after including Jquery, we have to include Chosen plugin.
The only trouble I met is that all javascript code we need to include must be evaluated before any other scripts. I resolved this by overriding $styles variable in hook_preprocess().
(I performed just a basic tests for this workaround.)
Comment #17
nottaken CreditAttribution: nottaken commentedsubscribe
Comment #18
Leksat CreditAttribution: Leksat commentedMy example (#16) is working fine for me.
Is such workaround admissible for using in 6-x version of the module?
Comment #19
kotnik CreditAttribution: kotnik commentedSubscribing.
Comment #20
Manuel Garcia CreditAttribution: Manuel Garcia commentedI don't believe #16 would be a valid solution.
The way to go would be to require jquery_update module, but currently in D6 it only upgrades jquery to 1.3.2.
There is work being done in jquery_update to upgrade jquery to 1.6 so perhaps we should first work on this here:
#1067290: Fix jQuery 1.7 for Drupal 6
Comment #21
barraponto CreditAttribution: barraponto commentedWhat if we work using the mootools version of chosen? I'll give it a try today (since it seems easier than fixing jquery update for jquery 1.6).
Comment #22
aidanlis CreditAttribution: aidanlis commentedjQuery 1.7 is up and running with Drupal 6, See http://drupal.org/node/1067290#comment-5296732
Comment #23
aidanlis CreditAttribution: aidanlis commentedHere's a port to 6.x. I'll maintain it if you like?
Comment #24
kotnik CreditAttribution: kotnik commentedaidanlis, your patch depends on jquery_update patch in #1067290: Fix jQuery 1.7 for Drupal 6?
Comment #25
aidanlis CreditAttribution: aidanlis commentedYes.
Comment #26
aidanlis CreditAttribution: aidanlis commentedCan we get this committed please?
Comment #27
barraponto CreditAttribution: barraponto commented@aidanlis: can you put the 6.x branch in a sandbox? It will make it easier to try (and debug).
Comment #28
shadcn CreditAttribution: shadcn commentedI created a 6.x branch and applied the patch from #23.
To get it working in D6, you'll need jquery_update module and the patch here #1067290: Fix jQuery 1.7 for Drupal 6 , see comment #117.
Instructions :
It works for me. Thanks for your work on this @aidan. I added you as a maintainer. :)
Comment #29
aidanlis CreditAttribution: aidanlis commentedAwesome! To make it easier, I've created a sandbox for the jQuery Update 6.x-3.x branch and I've updated the README.txt with the details. Thanks Arshad.
Comment #31
Anonymous (not verified) CreditAttribution: Anonymous commented#16 is too CPU time expensive way + JS errors inside chosen event handlers (it will reference to jQuery, that will be lower version already).
Also page load speed will be affected.
#28 failed for me. Any ideas?
Comment #32
Anonymous (not verified) CreditAttribution: Anonymous commentedTake a look on this: https://github.com/harvesthq/chosen/pull/246
So as a solution you can just do following:
chosen.jquery.js
And make required extentions of jQuery (you don't need to buy a whole car when you can just order some spares, right ;) )
This is it. In my case its latest Drupal 6, choosen extention and stable release of jQuery update extension.
Comment #33
adamdicarlo CreditAttribution: adamdicarlo commentedI'm using the technique from #16 but with jQuery 1.6.4 (as it's what's used on the Chosen demonstration page) just fine, with custom code (no Chosen Drupal module).