For those of us implementing tours on sites that don't already use bootstrap, it would be nice to be able to select to use bootstrap tour's supplied bootstrap-tour-standalone.min.css and bootstrap-tour-standalone.min.js files.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tripper54’s picture

Status: Active » Needs review
FileSize
2.83 KB

Patch attached.

tripper54’s picture

FileSize
2.77 KB

Hrm. Here's one that actually works.

attiks’s picture

Status: Needs review » Reviewed & tested by the community

Works great, thanks

aklump’s picture

Here's another solution to this same issue: https://www.drupal.org/sandbox/aklump/2653886

candelas’s picture

@tripper54 Which version do you use? Version 0.5.0, which is the chosen in the module, has not bootstrap-tour-standalone.js or bootstrap-tour-standalone.css. If I change the version to 0.9.3, it works, but the tour doesn't automatically run.

Could you please put the steps for it to work? Thanks

tripper54’s picture

@candelas I'm running version 0.10.2 of bootstrap tour, downloaded from github to sites/all/libraries.

candelas’s picture

I confirm that works with 0.9.3 which is the first that has the alternative :) Thanks @tripper54

kevineinarsson’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
6.3 KB

I can confirm that 0.9.3 works well for me too.

I made some adjustments to the patch that I believe should be fixed too.

The code checks if bootstrap_tour exists as a library and if not, it downloads and places the JS and CSS in public://. This part of the code doesn't check if we want the standalone version. It also downloads version 0.6.1 which is hardcoded.

So two simple fixes. With the library we can determine which version should be downloaded. This would also let users call a hook_library_alter() to specify an override instead of hacking the module when letting the module handle the files.

I also changed version to 0.9.3 in the library declaration because I simply couldn't get 0.5.0 working on my end.

weri’s picture

I updated the patch from @kevineinarsson, because the variable $variant was not available, when the library was not installed.

OliverColeman’s picture

weri's patch from #9 with the missing settings form added back into bootstrap_tour.admin.inc.