2 * JavaScript for admin 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,
28 // Make both windows drag'n'drop-able
29 $().ready(function() {
30 // Fade default content in
31 window.setTimeout("requestAjaxContent('admin', 'admin_content', '$content[admin_page]', false)", 250);
34 defaultTabId = '$content[admin_page]';
36 // Set 'save-changes' button id
37 saveChangesId = 'save_changes';
39 //-----------------------------------------
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();
49 // Valid found, so initialize the POST request
50 requestAjaxContent('admin', 'admin_content', indexTranslation[event.data.index], false);
55 //-----------------------------------------
57 //-----------------------------------------
58 $('#admin_error_close').click(function () {
60 closeErrorWindow('admin');
63 $('#admin_warning_close').click(function () {
65 closeWarningWindow('admin');
68 //-----------------------------------------
70 //-----------------------------------------
71 $('#' + saveChangesId).click(function () {
76 //-----------------------------------------
78 //-----------------------------------------
79 $('#admin_warning').draggable({
83 $('#admin_error').draggable({