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