Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to use a listview's autodividersSelector #210

Open
ghost opened this issue Jun 26, 2013 · 2 comments
Open

how to use a listview's autodividersSelector #210

ghost opened this issue Jun 26, 2013 · 2 comments
Labels

Comments

@ghost
Copy link

ghost commented Jun 26, 2013

Hi Tigro,

I'm making fast progress with your jQm + ng adapter, thanks so far!

Trying to implement a listview widget which should use it's own autodividersSelector (see http://api.jquerymobile.com/listview/) I am now stuck.

Logging stuff by overriding "jqmNgWidgetProvider" for "listview" as you described in "Integrating custom jquery mobile plugins with angular" works fine, but I haven't found a clean way to extend the listview widget with an anonymous function for "autodividersSelector".

My workaround at the moment is to override the default prototype in "jquery.mobile.js" ($.mobile.listview.prototype.options.autodividersSelector = function(elt) { ... }). This does it for me, but I am sure there is a better way and it would be great to have it explained and documented!

Thanks again

Günther

@tbosch
Copy link
Contributor

tbosch commented Jun 27, 2013

Hi,
actually, I haven't played with the auto divider feature yet. Could you publish your solution as a plunk or jsfiddle (for templates see the Readme.md)? This would help a lot!

Thanks,
Tobias

@ghost
Copy link
Author

ghost commented Jul 3, 2013

Hi Tobias,

I haven't actually a real solution. What I did is a very dirty and direct change in "jquery.mobile.js" in order to use the first element's "title" attribute as divider. Here for you to see:

http://jsfiddle.net/QLWd2/1/

I would appreciate a way to inject a personalized "autodividerSelector"-function (the way it is meant to be used with jQuery and without manually changing stuff in jquery.mobile.js).

Thanks!

Günther

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant