Rewrote 'we' word a little, rewrote mail order to use SQL_INSERTID() instead of anoth...
[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 // Make both windows drag'n'drop-able
29 $().ready(function() {
30         // Fade default content in
31         window.setTimeout("requestAjaxContent('install', 'install_content', '$content[install_page]', true)", 250);
32
33         // Set default tab id
34         defaultTabId = '$content[install_page]';
35
36         // Set 'save-changes' button id
37         saveChangesId = 'save_changes';
38
39         //-----------------------------------------
40         //            Tab navigation
41         //-----------------------------------------
42         $('a').each(function (i) {
43                 $(this).on('click', {index:i}, function (event) {
44                         // Is there a valid index?
45                         if (indexTranslation[event.data.index] != null) {
46                                 // Prevent default action
47                                 event.preventDefault();
48
49                                 // Valid found, so initialize the POST request
50                                 requestAjaxContent('install', 'install_content', indexTranslation[event.data.index], true);
51                         } // END - if
52                 });
53         });
54
55         //-----------------------------------------
56         //             Close buttons
57         //-----------------------------------------
58         $('#install_error_close').click(function () {
59                 // Close the window
60                 closeErrorWindow('install');
61         });
62
63         $('#install_warning_close').click(function () {
64                 // Close the window
65                 closeWarningWindow('install');
66         });
67
68         //-----------------------------------------
69         //           Footer navigation
70         //-----------------------------------------
71         $('#next_page').click(function () {
72                 // 'next' button has been clicked
73                 doFooterPage('install', 'install_content', 'next');
74         });
75
76         $('#previous_page').click(function () {
77                 // 'previous' button has been clicked
78                 doFooterPage('install', 'install_content', 'previous');
79         });
80
81         $('#installer_switch').click(function () {
82                 // Switch installer (to plain)
83                 switchInstaller('plain');
84         });
85
86         //-----------------------------------------
87         //             Save changes
88         //-----------------------------------------
89         $('#' + saveChangesId).click(function () {
90                 // Save changes
91                 saveChanges('install');
92         });
93
94         //-----------------------------------------
95         //              Drag'N'Drop
96         //-----------------------------------------
97         $('#install_warning').draggable({
98                 opacity: 0.85
99         });
100
101         $('#install_error').draggable({
102                 opacity: 0.85
103         });
104 });