So we can use views infinite scroll with the simplytest.me service yay.

I create a make file to download the autopager lib to libraries. The patch adds a make file and the dependency to libraries module. Idk if the make file is 100% correct or if there is a better way to include the autopager lib without the libraries dependency. But it is a start and it works on simplytest.me :-)

Comments

cwithout’s picture

Status: Active » Needs work

One issue with this patch is that Views Infinite Scroll doesn't depend on the Libraries module. The plugin can be installed in this module's js directory. Maybe you could change your patch to install the that location like the Drush command does.

Ciraxis’s picture

Yes but i don't know if we can realise that without libraries. But i thaught the common way to add third party javascript is with the libraries api?

cwithout’s picture

Yes, the preferred way to add 3rd party libraries is to use the Libraries API. But as far as I know, it's not yet a strict requirement. A module can choose to allow libraries to be installed in its own directory -- as this module does.

There's nothing wrong with making the Libraries API required. But to do so, you'll also have to include in your patch changes that remove the ability to add the library to the module's js directory, update the Drush integration, and handle informing users who have already installed the js library in the ~/views_infinite_scroll/js directory of the change when they update. You can't just change the .info file to require the Libraries API module without those other changes.

Seeing as those make it larger change than the scope of your issue, you might be better off having your patch install to the js directory as like the Drush integration does -- or opening a separate ticket that deals with requiring the Library API, then coming back to this one once that one's closed.

According to the docs (http://drush.ws/help/5#make), you can use the following to install to the module's js directory.

libraries[autopager][destination] = "modules/views_infinite_scroll/js"
honza pobořil’s picture

Issue summary: View changes
Status: Needs work » Closed (outdated)