Línea 1: |
Línea 1: |
− | ( function (window, document, $, mw, gt) { | + | ( function (window, document, $, mw, gt) { |
| | | |
| + | tour = new gt.TourBuilder({ |
| + | name: 'mallahipertexto' |
| + | }); |
| | | |
| if (mw.cookie.get('mallahipertexto_tour')) { | | if (mw.cookie.get('mallahipertexto_tour')) { |
− | //return; | + | return; |
| } | | } |
| | | |
− | mw.cookie.set('mallahipertexto_tour', 'done'); | + | mw.cookie.set('mallahipertexto_tour', 'done'); |
| | | |
− | | + | var recursosUrl = window.location.toString(); |
− | tour = new gt.TourBuilder({ | + | recursosUrl = recursosUrl .replace("title=", 'title=Recursos:'); |
− | name: 'mallahipertexto'
| + | recursosUrl = recursosUrl .replace("&tour=mallahipertexto", '&tour=mallahipertextorecursos'); |
− | }); | + | $("#ca-Recursos span a").prop("href", recursosUrl ); |
| | | |
| tour.firstStep({ | | tour.firstStep({ |
Línea 60: |
Línea 63: |
| name: 'Muéstrame cómo', | | name: 'Muéstrame cómo', |
| onclick: function () { | | onclick: function () { |
− | //mw.guidedTour.launcher.launchTour('registroprelude','gt-registropreludemallahipertexto-4'); | + | //mw.guidedTour.launcher.launchTour('mallahipertexto','gt-mallahipertexto-4'); |
− | mw.guidedTour.launcher.launchTour('registroprelude'); | + | //mw.guidedTour.launcher.launchTour('mallahipertexto'); |
| var url = window.location.toString(); | | var url = window.location.toString(); |
| url = url.replace("title=", 'title=Recursos:'); | | url = url.replace("title=", 'title=Recursos:'); |
− | url = url.replace("&tour=mallahipertexto", ''); | + | url = url.replace("&tour=mallahipertexto", '&tour=mallahipertextorecursos'); |
| window.location = url ; | | window.location = url ; |
| //mw.libs.guiders.next(); | | //mw.libs.guiders.next(); |
Línea 70: |
Línea 73: |
| }], | | }], |
| | | |
− | }) | + | }) |
− | .next('mallahipertexto4')
| |
| .back('mallahipertexto2'); | | .back('mallahipertexto2'); |
− |
| |
− | tour.step({
| |
− | name: 'mallahipertexto4',
| |
− | title: 'Selecciona los nombres en esta primera columna y podrás ver la descripción de cada recurso',
| |
− | description: '',
| |
− | attachTo: 'table.wikitable tr:nth-child(4) td:first-child',
| |
− | position: 'bottom',
| |
− | closeOnClickOutside: false,
| |
− | overlay: false
| |
− | })
| |
− | .next('mallahipertexto5')
| |
− | .back('mallahipertexto3');
| |
− |
| |
− |
| |
− | tour.step({
| |
− | name: 'mallahipertexto5',
| |
− | title: 'Selecciona la dirección web aquí para ir directamente a los recursos externos',
| |
− | description: '',
| |
− | attachTo: 'table.wikitable tr:nth-child(3) td:first-child',
| |
− | position: 'right',
| |
− | closeOnClickOutside: false,
| |
− | overlay: false
| |
− | })
| |
− | .back('mallahipertexto4');
| |
| | | |
| }(window, document, jQuery, mediaWiki, mediaWiki.guidedTour) ); | | }(window, document, jQuery, mediaWiki, mediaWiki.guidedTour) ); |