2 * JavaScript for installation AJAX stuff
3 * --------------------------------------------------------------------
4 * Copyright (c) 2003 - 2009 by Roland Haeder
5 * Copyright (c) 2009 - 2013 by Mailer Developer Team
6 * For more information visit: http://mxchange.org
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
24 // Initialize all navigations
25 $().ready(function () {
26 // Fade default content in
27 window.setTimeout("requestAjaxContent('install', 'install_content', '$content[install_page]', true)", 250);
30 defaultTabId = '$content[install_page]';
32 // Set 'save-changes' button id
33 saveChangesId = 'save_changes';
35 //-----------------------------------------
37 //-----------------------------------------
38 $('a').each(function (i) {
39 $(this).on('click', {index:i}, function (event) {
40 // Is there a valid index?
41 if (indexTranslation[event.data.index] !== null) {
42 // Prevent default action
43 event.preventDefault();
45 // Valid found, so initialize the POST request
46 requestAjaxContent('install', 'install_content', indexTranslation[event.data.index], true);
51 // Register common things (close button, drap&drop)
52 registerCommons('install');
54 //-----------------------------------------
56 //-----------------------------------------
57 $('#finish').click(function () {
58 // 'finish' button has been clicked
59 doFinishInstallation();
62 $('#next_page').click(function () {
63 // 'next' button has been clicked
64 doFooterPage('install', 'install_content', 'next');
67 $('#previous_page').click(function () {
68 // 'previous' button has been clicked
69 doFooterPage('install', 'install_content', 'previous');
72 $('#installer_switch').click(function () {
73 // Switch installer (to plain)
74 switchInstaller('plain');
77 //-----------------------------------------
79 //-----------------------------------------
80 $('#' + saveChangesId).click(function () {
82 saveChanges('install');