Installation NG continued (still not fully working)
[mailer.git] / templates / de / html / js / js_install_ajax.tpl
1 /**
2  * JavaScript for installation AJAX stuff
3  * --------------------------------------------------------------------
4  * $Revision::                                                        $
5  * $Date::                                                            $
6  * $Tag:: 0.2.1-FINAL                                                 $
7  * $Author::                                                          $
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
12  *
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.
17  *
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.
22  *
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,
26  * MA  02110-1301  USA
27  */
28
29 // Initialize all navigations
30 $().ready(function() {
31         // Fade default content in
32         window.setTimeout("requestAjaxContent('install', 'install_content', '$content[install_page]', true)", 250);
33
34         // Set default tab id
35         defaultTabId = '$content[install_page]';
36
37         // Set 'save-changes' button id
38         saveChangesId = 'save_changes';
39
40         //-----------------------------------------
41         //            Tab navigation
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();
49
50                                 // Valid found, so initialize the POST request
51                                 requestAjaxContent('install', 'install_content', indexTranslation[event.data.index], true);
52                         } // END - if
53                 });
54         });
55
56         //-----------------------------------------
57         //             Close buttons
58         //-----------------------------------------
59         $('#install_error_close').click(function () {
60                 // Close the window
61                 closeErrorWindow('install');
62         });
63
64         $('#install_warning_close').click(function () {
65                 // Close the window
66                 closeWarningWindow('install');
67         });
68
69         //-----------------------------------------
70         //           Footer navigation
71         //-----------------------------------------
72         $('#finish').click(function () {
73                 // 'finish' button has been clicked
74                 doFinishInstallation();
75         });
76
77         $('#next_page').click(function () {
78                 // 'next' button has been clicked
79                 doFooterPage('install', 'install_content', 'next');
80         });
81
82         $('#previous_page').click(function () {
83                 // 'previous' button has been clicked
84                 doFooterPage('install', 'install_content', 'previous');
85         });
86
87         $('#installer_switch').click(function () {
88                 // Switch installer (to plain)
89                 switchInstaller('plain');
90         });
91
92         //-----------------------------------------
93         //             Save changes
94         //-----------------------------------------
95         $('#' + saveChangesId).click(function () {
96                 // Save changes
97                 saveChanges('install');
98         });
99
100         //-----------------------------------------
101         //              Drag'N'Drop
102         //-----------------------------------------
103         $('#install_process').draggable({
104                 opacity: 0.85
105         });
106
107         $('#install_warning').draggable({
108                 opacity: 0.85
109         });
110
111         $('#install_error').draggable({
112                 opacity: 0.85
113         });
114 });