Edit File by line
/home/barbar84/www/wp-conte.../plugins/updraftp.../js
File: tour.js
* Scroll to Popup
[500] Fix | Delete
*
[501] Fix | Delete
* @param {Object} step
[502] Fix | Delete
*/
[503] Fix | Delete
var scroll_to_popup = function(step) {
[504] Fix | Delete
main_tour.going_somewhere = false;
[505] Fix | Delete
if (!step) {
[506] Fix | Delete
step = main_tour.getCurrentStep();
[507] Fix | Delete
}
[508] Fix | Delete
var popup = $(step.el);
[509] Fix | Delete
var target = $(step.tether.target);
[510] Fix | Delete
$('body, html').animate({
[511] Fix | Delete
scrollTop: popup.offset().top - 50
[512] Fix | Delete
}, 500, function() {
[513] Fix | Delete
window.scrollTo(0, popup.offset().top - 50);
[514] Fix | Delete
});
[515] Fix | Delete
[516] Fix | Delete
}
[517] Fix | Delete
[518] Fix | Delete
// If $('#updraft-backupnow-button'), start tour
[519] Fix | Delete
if ($('#updraft-backupnow-button').length) {
[520] Fix | Delete
/*
[521] Fix | Delete
Setup other events
[522] Fix | Delete
*/
[523] Fix | Delete
[524] Fix | Delete
// Backup now
[525] Fix | Delete
$('#updraft-backupnow-button').on('click', function(e) {
[526] Fix | Delete
if (!main_tour.canceled) {
[527] Fix | Delete
main_tour.show('backup_options');
[528] Fix | Delete
}
[529] Fix | Delete
});
[530] Fix | Delete
[531] Fix | Delete
// Click on status tab
[532] Fix | Delete
$('#updraft-navtab-backups').on('click', function(e) {
[533] Fix | Delete
if (!main_tour.canceled) {
[534] Fix | Delete
main_tour.show('backup_now');
[535] Fix | Delete
}
[536] Fix | Delete
});
[537] Fix | Delete
[538] Fix | Delete
$(document).on('click', 'label[for=updraft_servicecheckbox_updraftvault]', function(e) {
[539] Fix | Delete
if (!main_tour.canceled && !$('#updraft_servicecheckbox_updraftvault').is(':checked')) {
[540] Fix | Delete
setTimeout(function() {
[541] Fix | Delete
main_tour.show('vault_selected');
[542] Fix | Delete
}, 200);
[543] Fix | Delete
}
[544] Fix | Delete
});
[545] Fix | Delete
[546] Fix | Delete
// close backup backupnow modal
[547] Fix | Delete
$('#updraft-backupnow-modal').on("dialogclose", function(event, ui) {
[548] Fix | Delete
if (!main_tour.canceled) {
[549] Fix | Delete
main_tour.show('backup_now');
[550] Fix | Delete
}
[551] Fix | Delete
});
[552] Fix | Delete
[553] Fix | Delete
// Backup now - manual backup is starting
[554] Fix | Delete
$('.js-tour-backup-now-button').on('click', function(e) {
[555] Fix | Delete
if (!main_tour.canceled) {
[556] Fix | Delete
main_tour.show('backup_now_btn_success');
[557] Fix | Delete
}
[558] Fix | Delete
})
[559] Fix | Delete
[560] Fix | Delete
// settings tab
[561] Fix | Delete
$('#updraft-navtab-settings').on('click', function(e) {
[562] Fix | Delete
if (!main_tour.canceled && !main_tour.going_somewhere) {
[563] Fix | Delete
main_tour.show('settings_timing');
[564] Fix | Delete
}
[565] Fix | Delete
});
[566] Fix | Delete
[567] Fix | Delete
// addons tab
[568] Fix | Delete
$('#updraft-navtab-addons').on('click', function(e) {
[569] Fix | Delete
if (!main_tour.canceled) {
[570] Fix | Delete
main_tour.show('premium');
[571] Fix | Delete
}
[572] Fix | Delete
});
[573] Fix | Delete
[574] Fix | Delete
// Tabs without guide
[575] Fix | Delete
$('#updraft-navtab-migrate, #updraft-navtab-expert').on('click', function(e) {
[576] Fix | Delete
if (!main_tour.canceled) {
[577] Fix | Delete
main_tour.hide();
[578] Fix | Delete
}
[579] Fix | Delete
});
[580] Fix | Delete
// start tour
[581] Fix | Delete
main_tour.start();
[582] Fix | Delete
[583] Fix | Delete
// go back to fisrt tab
[584] Fix | Delete
if (updraftplus_tour_i18n.show_tab_on_load) {
[585] Fix | Delete
$(updraftplus_tour_i18n.show_tab_on_load).trigger('click');
[586] Fix | Delete
} else {
[587] Fix | Delete
$('#updraft-navtab-backups').trigger('click');
[588] Fix | Delete
}
[589] Fix | Delete
[590] Fix | Delete
}
[591] Fix | Delete
[592] Fix | Delete
// start plugins page tour
[593] Fix | Delete
if ($('.js-updraftplus-settings').length) {
[594] Fix | Delete
plugins_page_tour.start();
[595] Fix | Delete
}
[596] Fix | Delete
[597] Fix | Delete
});
[598] Fix | Delete
[599] Fix | Delete
})(jQuery);
[600] Fix | Delete
[601] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function