I combined some feature requests and created a new version. See attach for zip/patch.

  • Ctrl and Shift-behavior of native selects (credits - and complaints :) - go to wolffereast)
  • You can hold the mouse down when selecting items
  • Two separate search inputs

Please test it and keep us updated!

Comments

koosvdkolk created an issue. See original summary.

dmitrii’s picture

Status: Needs review » Needs work

Great work @koosvdkolk, thank you!
I've tested your patch and in general it works.

But there are some problems.
The behaviour of the remove all button is different now. It should removes all visible items but it removes all items, including hidden by filter.
Also there are some issues related to the Drupal coding standards, but it's minor and can be fixed in any IDE by the code auto format.

What do you think about adding configuration option to enable your functionality? It seems to me it should be disabled by default to prevent UI problems for users who will update the module from earlier versions.

dmitrii’s picture

Priority: Normal » Major
jvdkolk’s picture

Thanks! I will dive into it.

To be honest: In my own implementation I have removed the 'move all' options, because my users don't need them. Can't we make these optional as well?

dmitrii’s picture

I think it's a good idea. We can implement something like this for the add/remove all buttons: if label is not set - hide it from UI.

dmegatool’s picture

That's some really nice additions. I just installed Improved Multi Select for the first time and the lack of shift+click struck me immediatly. Can't wait to see this integrated in the next release.

wolffereast’s picture

Fixed the remove all also removing hidden items issue.
Also forced a re-filter on both the add and remove buttons.
I picked off any coding standards issues I cam across, though I didn't run it through pareview so I probably missed a few. I am going to take a wack at adding configuration options for the add/remove all buttons as well as the new filtering functionality when I get a chance.

wolffereast’s picture

What are your thoughts on moving the button click functions into their own named functions instead of using anonymous functions in a click bind? I think that might make some of these changes a bit easier, especially if some of the functions need to change depending on the setup. It will also clean up the attach function significantly, making this file a bit easier to work with when making updates.

wolffereast’s picture

I added two new admin options. The first is a checkbox that turns the add/remove all options on and off, which defaults to on. I also added a checkbox that turns the new secondary filter on, which defaults to off.
I split the css for the new filters out so that the single filter looks the same as it used to.
I broke the js click handlers for the add/remove buttons out into their own named functions.

wolffereast’s picture

Moved the other click binds into named functions for good measure (just to be consistent). I know much of this might need to be in a separate patch to clean up the module's commit history, but we can always split it up if need be.

wolffereast’s picture

Status: Needs work » Needs review
jvdkolk’s picture

Status: Needs review » Reviewed & tested by the community

Works fine with me

wolffereast’s picture

Forgot to clean up after myself... The only difference between this patch and the previous one is the addition of 2 variable_del calls in the uninstall hook. Leaving at RTBC

WorldFallz’s picture

Status: Reviewed & tested by the community » Needs work

I'd love to get these taken care of, but we should really do it in separate patches. Feel free to update if anyone gets to it before i do.

wolffereast’s picture

Some of this functionality was originally pulled from other requests. I will compile a list of links and drop them here (along with updates to the patches in those tasks if appropriate) when I have a chance

jvdkolk’s picture

@wolffereast: any news on this issue?

wolffereast’s picture

@koosvdkolk Sorry, been very busy lately. I think this will need to be deconstructed into several patches as I was unable to find the original issues I thought existed. I must have been mistaken, anyways I think an initial patch that updates the JS structure without changing anything functionally followed by individual patches for the different improvements is a good idea.
I will try to put eyes on this soon

jvdkolk’s picture

Thanks!