comparison core/modules/tour/js/tour.es6.js @ 14:1fec387a4317

Update Drupal core to 8.5.2 via Composer
author Chris Cannam
date Mon, 23 Apr 2018 09:46:53 +0100
parents 4c8ae668cc8c
children 129ea1e6d783
comparison
equal deleted inserted replaced
13:5fb285c0d0e3 14:1fec387a4317
144 toggleTour() { 144 toggleTour() {
145 if (this.model.get('isActive')) { 145 if (this.model.get('isActive')) {
146 const $tour = this._getTour(); 146 const $tour = this._getTour();
147 this._removeIrrelevantTourItems($tour, this._getDocument()); 147 this._removeIrrelevantTourItems($tour, this._getDocument());
148 const that = this; 148 const that = this;
149 const close = Drupal.t('Close');
149 if ($tour.find('li').length) { 150 if ($tour.find('li').length) {
150 $tour.joyride({ 151 $tour.joyride({
151 autoStart: true, 152 autoStart: true,
152 postRideCallback() { 153 postRideCallback() {
153 that.model.set('isActive', false); 154 that.model.set('isActive', false);
154 }, 155 },
155 // HTML segments for tip layout. 156 // HTML segments for tip layout.
156 template: { 157 template: {
157 link: '<a href=\"#close\" class=\"joyride-close-tip\">&times;</a>', 158 link: `<a href="#close" class="joyride-close-tip" aria-label="${close}">&times;</a>`,
158 button: '<a href=\"#\" class=\"button button--primary joyride-next-tip\"></a>', 159 button: '<a href="#" class="button button--primary joyride-next-tip"></a>',
159 }, 160 },
160 }); 161 });
161 this.model.set({ isActive: true, activeTour: $tour }); 162 this.model.set({ isActive: true, activeTour: $tour });
162 } 163 }
163 } 164 }