Commit 60e2222d93ac7fe8d078820795e25302e7e1be4c
1 parent
770e633f
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
site_tour: disable step numbers to avoid conflict between groups
Showing
3 changed files
with
5 additions
and
6 deletions
Show diff stats
plugins/site_tour/public/main.js
... | ... | @@ -77,6 +77,7 @@ var siteTourPlugin = (function() { |
77 | 77 | |
78 | 78 | intro = introJs(); |
79 | 79 | intro.setOption('tooltipPosition', 'auto'); |
80 | + intro.setOption('showStepNumbers', 'false'); | |
80 | 81 | intro.setOptions(options); |
81 | 82 | intro.onafterchange(function(targetElement) { |
82 | 83 | var name = jQuery(targetElement).attr('data-intro-name'); | ... | ... |
plugins/site_tour/test/unit/site_tour_plugin_test.rb
... | ... | @@ -67,7 +67,7 @@ class SiteTourPluginTest < ActionView::TestCase |
67 | 67 | body_ending = instance_exec(&plugin.body_ending) |
68 | 68 | assert_match /siteTourPlugin\.add\('test_a', 'body', 'Test A1', 1\);/, body_ending |
69 | 69 | assert_match /siteTourPlugin\.add\('test_a', 'body', 'Test A2', 2\);/, body_ending |
70 | - assert_match /siteTourPlugin\.add\('test_b', 'body', 'Test B1', 1\);/, body_ending | |
70 | + assert_match /siteTourPlugin\.add\('test_b', 'body', 'Test B1', 3\);/, body_ending | |
71 | 71 | end |
72 | 72 | |
73 | 73 | end | ... | ... |
plugins/site_tour/views/tour_actions.html.erb
... | ... | @@ -5,13 +5,11 @@ |
5 | 5 | <% if actions.present? %> |
6 | 6 | <script> |
7 | 7 | jQuery( document ).ready(function( $ ) { |
8 | - <% actions.group_by {|h| h[:group_name]}.each do |group, group_actions| %> | |
9 | - <% group_actions.each_with_index do |action, index| %> | |
10 | - <%= "siteTourPlugin.add('#{j action[:group_name]}', '#{j action[:selector]}', '#{j parse_tour_description(action[:description])}', #{index + 1});" %> | |
11 | - <% end %> | |
8 | + <% actions.each_with_index do |action, index| %> | |
9 | + <%= "siteTourPlugin.add('#{j action[:group_name]}', '#{j action[:selector]}', '#{j parse_tour_description(action[:description])}', #{index + 1});" %> | |
12 | 10 | <% end %> |
13 | 11 | |
14 | - <% (group_triggers||[]).each_with_index do |group, index| %> | |
12 | + <% (group_triggers||[]).each do |group| %> | |
15 | 13 | <%= "siteTourPlugin.addGroupTrigger('#{j group[:group_name]}', '#{j group[:selector]}', '#{j group[:event]}');" %> |
16 | 14 | <% end %> |
17 | 15 | ... | ... |