Commit 9021d7fc authored by Marius Cramer's avatar Marius Cramer
Browse files

- cleaned up javascript

parent 2d0ebade
......@@ -354,23 +354,23 @@ class listform {
//* Show Back
if(isset($vars['show_page_back']) && $vars['show_page_back'] == 1){
$content .= '<li><a href="'."javascript:loadContent('".$vars['list_file'].'?page=0'.$vars['page_params']."');".'" aria-label="First">
$content .= '<li><a href="#" data-load-content="'.$vars['list_file'].'?page=0'.$vars['page_params'].'" aria-label="First">
<span aria-hidden="true">&laquo;</span></a></li>';
$content .= '<li><a href="'."javascript:loadContent('".$vars['list_file'].'?page='.$vars['last_page'].$vars['page_params']."');".'" aria-label="Previous">
$content .= '<li><a href="#" data-load-content='.$vars['list_file'].'?page='.$vars['last_page'].$vars['page_params'].'" aria-label="Previous">
<span aria-hidden="true">&lsaquo;</span></a></li>';
}
$prev = -1;
foreach($show_pages as $p) {
if($prev != -1 && $p > $prev + 1) $content .= '<li class="disabled"><a href="#">…</a></li>';
$content .= '<li' . ($p == $vars['page'] ? ' class="active"' : '') . '><a href="'."javascript:loadContent('".$vars['list_file'].'?page='.$p.$vars['page_params']."');".'">'. ($p+1) .'</a></li>';
$content .= '<li' . ($p == $vars['page'] ? ' class="active"' : '') . '><a href="#" data-load-content="'.$vars['list_file'].'?page='.$p.$vars['page_params'].'">'. ($p+1) .'</a></li>';
$prev = $p;
}
//.$vars['next_page'].' '.$this->lng('page_of_txt').' '.$vars['max_pages'].' &nbsp; ';
//* Show Next
if(isset($vars['show_page_next']) && $vars['show_page_next'] == 1){
$content .= '<li><a href="'."javascript:loadContent('".$vars['list_file'].'?page='.$vars['next_page'].$vars['page_params']."');".'" aria-label="Next">
$content .= '<li><a href="#" data-load-content="'.$vars['list_file'].'?page='.$vars['next_page'].$vars['page_params'].'" aria-label="Next">
<span aria-hidden="true">&rsaquo;</span></a></li>';
$content .= '<li><a href="'."javascript:loadContent('".$vars['list_file'].'?page='.$vars['pages'].$vars['page_params']."');".'" aria-label="Last">
$content .= '<li><a href="#" data-load-content="'.$vars['list_file'].'?page='.$vars['pages'].$vars['page_params'].'" aria-label="Last">
<span aria-hidden="true">&raquo;</span></a></li>';
}
$content .= '</ul></nav>';
......
......@@ -44,7 +44,7 @@ class listform_tpl_generator {
<div class="pnl_toolsarea">
<fieldset><legend>{tmpl_var name="toolsarea_head_txt"}</legend>
<div class="buttons">
<button class="iconstxt icoAdd" type="button" onclick="'."loadContent('".$module."/".$listDef["edit_file"]."');".'">
<button class="iconstxt icoAdd" type="button" data-load-content="'.$module."/".$listDef["edit_file"].'">
<span>{tmpl_var name="add_new_record_txt"}</span>
</button>
</div>
......@@ -91,7 +91,7 @@ class listform_tpl_generator {
foreach($listDef["item"] as $field) {
$key = $field["field"];
$html .= " <td class=\"tbl_col_".$key."\"><a href=\"#\" onclick=\"loadContent('".$module."/".$listDef["edit_file"]."?id={tmpl_var name='id'}');\">{tmpl_var name=\"".$key."\"}</a></td>\n";
$html .= " <td class=\"tbl_col_".$key."\"><a href=\"#\" data-load-content=\"".$module."/".$listDef["edit_file"]."?id={tmpl_var name='id'}\">{tmpl_var name=\"".$key."\"}</a></td>\n";
}
$html .= " <td class=\"tbl_col_buttons\">
......
......@@ -137,7 +137,7 @@ class tform_tpl_generator {
<div class=\"buttonHolder buttons\">
<button class=\"positive iconstxt icoPositive\" type=\"button\" value=\"{tmpl_var name='btn_save_txt'}\" onclick=\"submitForm('pageForm','".$module."/".$formDef["action"]."');\"><span>{tmpl_var name='btn_save_txt'}</span></button>
<button class=\"negative iconstxt icoNegative\" type=\"button\" value=\"{tmpl_var name='btn_cancel_txt'}\" onclick=\"loadContent('".$module."/".$formDef["list_default"]."');\"><span>{tmpl_var name='btn_cancel_txt'}</span></button>
<button class=\"negative iconstxt icoNegative\" type=\"button\" value=\"{tmpl_var name='btn_cancel_txt'}\" data-load-content=\"".$module."/".$formDef["list_default"]."\"><span>{tmpl_var name='btn_cancel_txt'}</span></button>
</div>
</div>
......
......@@ -165,7 +165,7 @@ if(is_array($packages) && count($packages) > 0) {
if($p['package_installable'] == 'no') {
$installed_txt .= $s['server_name'].": ".$app->lng("Package can not be installed.")."<br />";
} else {
$installed_txt .= $s['server_name'].": <a href=\"#\" onclick=\"loadContent('admin/software_package_install.php?package=".$p["package_name"]."&server_id=".$s["server_id"]."');\">Install now</a><br />";
$installed_txt .= $s['server_name'].": <a href=\"#\" data-load-content=\"admin/software_package_install.php?package=".$p["package_name"]."&server_id=".$s["server_id"]."\">Install now</a><br />";
}
}
}
......
......@@ -176,7 +176,7 @@ if(is_array($installed_packages)) {
foreach($updates as $key => $u) {
$version = $u['v1'].'.'.$u['v2'].'.'.$u['v3'].'.'.$u['v4'];
$installed_txt = "<a href=\"#\" onclick=\"loadContent('admin/software_update_list.php?action=install&package=".$u["package_name"]."&id=".$u["software_update_id"]."&server_id=".$server_id."');\">Install Update</a><br />";
$installed_txt = "<a href=\"#\" data-load-content=\"admin/software_update_list.php?action=install&package=".$u["package_name"]."&id=".$u["software_update_id"]."&server_id=".$server_id."\">Install Update</a><br />";
$records_out[] = array('version' => $version, 'update_title' => $u["update_title"], 'installed' => $installed_txt);
}
......@@ -184,30 +184,6 @@ if(is_array($installed_packages)) {
}
}
/*
$updates = $app->db->queryAllRecords('SELECT software_update.update_title, software_update.software_update_id, software_update.package_name, v1, v2, v3, v4, software_update_inst.status
FROM software_update LEFT JOIN software_update_inst ON ( software_update.software_update_id = software_update_inst.software_update_id )
WHERE server_id = '.$server_id.'
GROUP BY software_update.package_name
ORDER BY software_update.package_name ASC, v1 DESC , v2 DESC , v3 DESC , v4 DESC');
if(is_array($updates)) {
foreach($updates as $key => $u) {
$installed_txt = '';
$version = $u['v1'].'.'.$u['v2'].'.'.$u['v3'].'.'.$u['v4'];
$updates[$key]['version'] = $version;
if($u['status'] == 'installed' || $u['status'] == 'installing' || $u['status'] == 'deleting') {
$installed_txt .= "Installed version $version<br />";
} else {
$installed_txt .= "<a href=\"#\" onclick=\"loadContent('admin/software_update_list.php?action=install&package=".$u["package_name"]."&id=".$u["software_update_id"]."&server_id=".$server_id."');\">Install now</a><br />";
}
$updates[$key]['installed'] = $installed_txt;
}
}
*/
$app->tpl->setLoop('records', $records_out);
......
......@@ -15,7 +15,7 @@
<input type="hidden" name="id" value="{tmpl_var name='id'}">
<div class="buttonHolder buttons">
<button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onClick="submitForm('pageForm','admin/system_config_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button>
<button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onClick="loadContent('admin/server_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button>
<button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/server_list.php"><span>{tmpl_var name='btn_cancel_txt'}</span></button>
</div>
</div>
......
......@@ -92,7 +92,7 @@
<div class="buttonHolder buttons">
<button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="dns/dns_dmarc_edit.php"><span>{tmpl_var name='btn_save_txt'}</span></button>
<button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('dns/dns_soa_edit.php?id={tmpl_var name='zone'}');"><span>{tmpl_var name='btn_cancel_txt'}</span></button>
<button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="dns/dns_soa_edit.php?id={tmpl_var name='zone'}"><span>{tmpl_var name='btn_cancel_txt'}</span></button>
</div>
</div>
......
......@@ -51,6 +51,14 @@ if($sys_config['tab_change_discard'] == 'y') {
$app->tpl->setVar('global_tabchange_discard_txt', $app->lng('global_tabchange_discard_txt'));
}
if($sys_config['use_loadindicator'] == 'y') {
$app->tpl->setVar('use_loadindicator', 'y');
}
if($sys_config['use_combobox'] == 'y') {
$app->tpl->setVar('use_combobox', 'y');
}
if(isset($_SESSION['show_info_msg'])) {
$app->tpl->setVar('show_info_msg', $_SESSION['show_info_msg']);
unset($_SESSION['show_info_msg']);
......
This diff is collapsed.
......@@ -98,7 +98,7 @@ echo '
<input type="hidden" name="s_pg" value="index" />
<div class="wf_actions buttons">
<button class="positive iconstxt icoPositive" type="button" value="'.$wb['btn_yes_txt'].'" onclick="submitLoginForm(' . "'pageForm'" . ');"><span>'.$wb['btn_yes_txt'].'</span></button>
<button class="negative iconstxt icoNegative" type="button" value="'.$wb['btn_back_txt'].'" onclick="loadContent('. "'$backlink'" . ');"><span>'.$wb['btn_back_txt'].'</span></button>
<button class="negative iconstxt icoNegative" type="button" value="'.$wb['btn_back_txt'].'" data-load-content="'.$backlink.'"><span>'.$wb['btn_back_txt'].'</span></button>
</div>
';
?>
......@@ -54,7 +54,7 @@ if ((isset($_SESSION['s_old']) && ($_SESSION['s_old']['user']['typ'] == 'admin'
<input type="hidden" name="s_pg" value="index" />
<div class="wf_actions buttons">
<button class="positive iconstxt icoPositive" type="button" value="Yes, re-login as ' . $utype . '" onclick="submitLoginForm(' . "'pageForm'" . ');"><span>Yes, re-login as ' . $utype . '</span></button>
<button class="negative iconstxt icoNegative" type="button" value="No, logout" onclick="loadContent('. "'login/logout.php?l=1'" . ');"><span>No, logout</span></button>
<button class="negative iconstxt icoNegative" type="button" value="No, logout" data-load-content="login/logout.php?l=1"><span>No, logout</span></button>
</div>
';
exit;
......
......@@ -27,7 +27,7 @@
<div class="clear"><div class="right">
<button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='pw_button_txt'}" data-submit-form="pageForm" data-form-action="login/password_reset.php">{tmpl_var name='pw_button_txt'}</button>
<button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='back_txt'}" onclick="loadInitContent();">{tmpl_var name='back_txt'}</button>
<button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='back_txt'}" onclick="ISPConfig.loadInitContent();">{tmpl_var name='back_txt'}</button>
</div></div>
</div>
......
......@@ -37,7 +37,7 @@ $module["nav"][] = array( 'title' => 'System State (All Servers)',
$servers = $app->db->queryAllRecords("SELECT server_id, server_name FROM server order by server_name");
$dropDown = "<select id='server_id' onchange=\"loadContent('monitor/show_sys_state.php?state=server&server=' + document.getElementById('server_id').value);\">";
$dropDown = "<select id='server_id' onchange=\"ISPConfig.loadContent('monitor/show_sys_state.php?state=server&server=' + document.getElementById('server_id').value);\">";
foreach ($servers as $server)
{
$dropDown .= "<option value='" . $server['server_id'] . "|" . $server['server_name'] . "'>" . $server['server_name'] . "</option>";
......
......@@ -287,8 +287,8 @@ function _getServerState($serverId, $serverName) {
/*
* The normal info also needs a link to the verbose info
*/
$html_ve .= "<a href='#' onclick='loadContent(\"monitor/show_sys_state.php?state=server&server=" . $serverId . '|' . $serverName . "\");'>" . $app->lng("monitor_serverstate_moreinfo_txt") . "</a>";
$html_server .= "<a href='#' onclick='loadContent(\"monitor/show_sys_state.php?state=server&server=" . $serverId . '|' . $serverName . "\");'>" . $app->lng("monitor_serverstate_moreinfo_txt") . "</a>";
$html_ve .= "<a href='#' data-load-content='monitor/show_sys_state.php?state=server&server=" . $serverId . '|' . $serverName . "'>" . $app->lng("monitor_serverstate_moreinfo_txt") . "</a>";
$html_server .= "<a href='#' data-load-content='monitor/show_sys_state.php?state=server&server=" . $serverId . '|' . $serverName . "'>" . $app->lng("monitor_serverstate_moreinfo_txt") . "</a>";
/*
* Finish all html's
......@@ -341,28 +341,28 @@ function _processDbState($type, $serverId, $serverState, $messages) {
switch ($record['state']) {
case 'ok':
$messages[$app->lng("monitor_serverstate_listok_txt")][] = $app->lng("monitor_serverstate_hdok_txt") . ' ' .
"<a href='#' onclick='loadContent(\"monitor/show_data.php?type=disk_usage\");'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
"<a href='#' data-load-content='monitor/show_data.php?type=disk_usage'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
break;
case 'info':
$messages[$app->lng("monitor_serverstate_listinfo_txt")][] = $app->lng("monitor_serverstate_hdgoingfull_txt") . ' ' .
"<a href='#' onclick='loadContent(\"monitor/show_data.php?type=disk_usage\");'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
"<a href='#' data-load-content='monitor/show_data.php?type=disk_usage'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
break;
case 'warning':
$messages[$app->lng("monitor_serverstate_listwarning_txt")][] = $app->lng("monitor_serverstate_hdnearlyfull_txt") . ' ' .
"<a href='#' onclick='loadContent(\"monitor/show_data.php?type=disk_usage\");'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
"<a href='#' data-load-content='monitor/show_data.php?type=disk_usage'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
break;
case 'critical':
$messages[$app->lng("monitor_serverstate_listcritical_txt")][] = $app->lng("monitor_serverstate_hdveryfull_txt") . ' ' .
"<a href='#' onclick='loadContent(\"monitor/show_data.php?type=disk_usage\");'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
"<a href='#' data-load-content='monitor/show_data.php?type=disk_usage'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
break;
case 'error':
$messages[$app->lng("monitor_serverstate_listerror_txt")][] = $app->lng("monitor_serverstate_hdfull_txt") . ' ' .
"<a href='#' onclick='loadContent(\"monitor/show_data.php?type=disk_usage\");'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
"<a href='#' data-load-content='monitor/show_data.php?type=disk_usage'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
break;
default:
$messages[$app->lng("monitor_serverstate_listunknown_txt")][] = $app->lng("monitor_serverstate_hdunknown_txt") . ' ' .
"<a href='#' onclick='loadContent(\"monitor/show_data.php?type=disk_usage\");'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
"<a href='#' data-load-content='monitor/show_data.php?type=disk_usage'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
break;
}
}
......@@ -373,27 +373,27 @@ function _processDbState($type, $serverId, $serverState, $messages) {
switch ($record['state']) {
case 'ok':
$messages[$app->lng("monitor_serverstate_listok_txt")][] = $app->lng("monitor_serverstate_loadok_txt") . ' ' .
"<a href='#' onclick='loadContent(\"monitor/show_data.php?type=server_load\");'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
"<a href='#' data-load-content='monitor/show_data.php?type=server_load'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
break;
case 'info':
$messages[$app->lng("monitor_serverstate_listinfo_txt")][] = $app->lng("monitor_serverstate_loadheavy_txt") . ' ' .
"<a href='#' onclick='loadContent(\"monitor/show_data.php?type=server_load\");'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
"<a href='#' data-load-content='monitor/show_data.php?type=server_load'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
break;
case 'warning':
$messages[$app->lng("monitor_serverstate_listwarning_txt")][] = $app->lng("monitor_serverstate_loadhigh_txt") . ' ' .
"<a href='#' onclick='loadContent(\"monitor/show_data.php?type=server_load\");'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
"<a href='#' data-load-content='monitor/show_data.php?type=server_load'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
break;
case 'critical':
$messages[$app->lng("monitor_serverstate_listcritical_txt")][] = $app->lng("monitor_serverstate_loadhigher_txt") . ' ' .
"<a href='#' onclick='loadContent(\"monitor/show_data.php?type=server_load\");'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
"<a href='#' data-load-content='monitor/show_data.php?type=server_load'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
break;
case 'error':
$messages[$app->lng("monitor_serverstate_listerror_txt")][] = $app->lng("monitor_serverstate_loadhighest_txt") . ' ' .
"<a href='#' onclick='loadContent(\"monitor/show_data.php?type=server_load\");'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
"<a href='#' data-load-content='monitor/show_data.php?type=server_load'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
break;
default:
$messages[$app->lng("monitor_serverstate_listunknown_txt")][] = $app->lng("monitor_serverstate_loadunknown_txt") . ' ' .
"<a href='#' onclick='loadContent(\"monitor/show_data.php?type=server_load\");'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
"<a href='#' data-load-content='monitor/show_data.php?type=server_load'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
break;
}
}
......@@ -401,16 +401,16 @@ function _processDbState($type, $serverId, $serverState, $messages) {
switch ($record['state']) {
case 'ok':
$messages[$app->lng("monitor_serverstate_listok_txt")][] = $app->lng("monitor_serverstate_servicesonline_txt") . ' ' .
"<a href='#' onclick='loadContent(\"monitor/show_data.php?type=services\");'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
"<a href='#' data-load-content='monitor/show_data.php?type=services'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
break;
case 'error':
$messages[$app->lng("monitor_serverstate_listerror_txt")][] = $app->lng("monitor_serverstate_servicesoffline_txt") . ' ' .
"<a href='#' onclick='loadContent(\"monitor/show_data.php?type=services\");'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
"<a href='#' data-load-content='monitor/show_data.php?type=services'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
break;
default:
$messages[$app->lng("monitor_serverstate_listunknown_txt")][] = $app->lng("monitor_serverstate_servicesunknown_txt") . ' ' .
"<a href='#' onclick='loadContent(\"monitor/show_data.php?type=services\");'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
"<a href='#' data-load-content='monitor/show_data.php?type=services'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
break;
}
}
......@@ -418,12 +418,12 @@ function _processDbState($type, $serverId, $serverState, $messages) {
switch ($record['state']) {
case 'ok':
$messages[$app->lng("monitor_serverstate_listok_txt")][] = $app->lng("monitor_serverstate_updatesok_txt") . ' ' .
"<a href='#' onclick='loadContent(\"monitor/show_data.php?type=system_update\");'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
"<a href='#' data-load-content='monitor/show_data.php?type=system_update'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
break;
case 'info':
$messages[$app->lng("monitor_serverstate_listwarning_txt")][] = $app->lng("monitor_serverstate_updatesneeded_txt") . ' ' .
"<a href='#' onclick='loadContent(\"monitor/show_data.php?type=system_update\");'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
"<a href='#' data-load-content='monitor/show_data.php?type=system_update'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
break;
case 'no_state':
/*
......@@ -432,7 +432,7 @@ function _processDbState($type, $serverId, $serverState, $messages) {
break;
default:
$messages[$app->lng("monitor_serverstate_listunknown_txt")][] = $app->lng("monitor_serverstate_updatesunknown_txt") . ' ' .
"<a href='#' onclick='loadContent(\"monitor/show_data.php?type=system_update\");'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
"<a href='#' data-load-content='monitor/show_data.php?type=system_update'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
break;
}
}
......@@ -441,19 +441,19 @@ function _processDbState($type, $serverId, $serverState, $messages) {
switch ($record['state']) {
case 'ok':
$messages[$app->lng("monitor_serverstate_listok_txt")][] = $app->lng("monitor_serverstate_raidok_txt") . ' ' .
"<a href='#' onclick='loadContent(\"monitor/show_data.php?type=raid_state\");'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
"<a href='#' data-load-content='monitor/show_data.php?type=raid_state'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
break;
case 'info':
$messages[$app->lng("monitor_serverstate_listinfo_txt")][] = $app->lng("monitor_serverstate_raidresync_txt") . ' ' .
"<a href='#' onclick='loadContent(\"monitor/show_data.php?type=raid_state\");'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
"<a href='#' data-load-content='monitor/show_data.php?type=raid_state'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
break;
case 'critical':
$messages[$app->lng("monitor_serverstate_listcritical_txt")][] = $app->lng("monitor_serverstate_raidfault_txt") . ' ' .
"<a href='#' onclick='loadContent(\"monitor/show_data.php?type=raid_state\");'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
"<a href='#' data-load-content='monitor/show_data.php?type=raid_state'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
break;
case 'error':
$messages[$app->lng("monitor_serverstate_listerror_txt")][] = $app->lng("monitor_serverstate_raiderror_txt") . ' ' .
"<a href='#' onclick='loadContent(\"monitor/show_data.php?type=raid_state\");'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
"<a href='#' data-load-content='monitor/show_data.php?type=raid_state'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
break;
case 'no_state':
/*
......@@ -462,7 +462,7 @@ function _processDbState($type, $serverId, $serverState, $messages) {
break;
default:
$messages[$app->lng("monitor_serverstate_listunknown_txt")][] = $app->lng("monitor_serverstate_raidunknown_txt") . ' ' .
"<a href='#' onclick='loadContent(\"monitor/show_data.php?type=raid_state\");'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
"<a href='#' data-load-content='monitor/show_data.php?type=raid_state'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
break;
}
}
......@@ -474,23 +474,23 @@ function _processDbState($type, $serverId, $serverState, $messages) {
// switch ($record['state']) {
// case 'ok':
// $messages[$app->lng("monitor_serverstate_listok_txt")][] = $app->lng("monitor_serverstate_beancounterok_txt") . ' ' .
// "<a href='#' onclick='loadContent(\"monitor/show_data.php?type=openvz_beancounter\");'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
// "<a href='#' data-load-content='monitor/show_data.php?type=openvz_beancounter'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
// break;
// case 'info':
// $messages[$app->lng("monitor_serverstate_listinfo_txt")][] = $app->lng("monitor_serverstate_beancounterinfo_txt") . ' ' .
// "<a href='#' onclick='loadContent(\"monitor/show_data.php?type=openvz_beancounter\");'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
// "<a href='#' data-load-content='monitor/show_data.php?type=openvz_beancounter'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
// break;
// case 'warning':
// $messages[$app->lng("monitor_serverstate_listinfo_txt")][] = $app->lng("monitor_serverstate_beancounterwarning_txt") . ' ' .
// "<a href='#' onclick='loadContent(\"monitor/show_data.php?type=openvz_beancounter\");'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
// "<a href='#' data-load-content='monitor/show_data.php?type=openvz_beancounter'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
// break;
// case 'critical':
// $messages[$app->lng("monitor_serverstate_listcritical_txt")][] = $app->lng("monitor_serverstate_beancountercritical_txt") . ' ' .
// "<a href='#' onclick='loadContent(\"monitor/show_data.php?type=openvz_beancounter\");'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
// "<a href='#' data-load-content='monitor/show_data.php?type=openvz_beancounter'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
// break;
// case 'error':
// $messages[$app->lng("monitor_serverstate_listerror_txt")][] = $app->lng("monitor_serverstate_beancountererror_txt") . ' ' .
// "<a href='#' onclick='loadContent(\"monitor/show_data.php?type=openvz_beancounter\");'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
// "<a href='#' data-load-content='monitor/show_data.php?type=openvz_beancounter'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
// break;
// default:
// break;
......@@ -502,27 +502,27 @@ function _processDbState($type, $serverId, $serverState, $messages) {
switch ($record['state']) {
case 'ok':
$messages[$app->lng("monitor_serverstate_listok_txt")][] = $app->lng("monitor_serverstate_mailqok_txt") . ' ' .
"<a href='#' onclick='loadContent(\"monitor/show_data.php?type=mailq\");'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
"<a href='#' data-load-content='monitor/show_data.php?type=mailq'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
break;
case 'info':
$messages[$app->lng("monitor_serverstate_listinfo_txt")][] = $app->lng("monitor_serverstate_mailqheavy_txt") . ' ' .
"<a href='#' onclick='loadContent(\"monitor/show_data.php?type=mailq\");'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
"<a href='#' data-load-content='monitor/show_data.php?type=mailq'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
break;
case 'warning':
$messages[$app->lng("monitor_serverstate_listwarning_txt")][] = $app->lng("monitor_serverstate_mailqhigh_txt") . ' ' .
"<a href='#' onclick='loadContent(\"monitor/show_data.php?type=mailq\");'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
"<a href='#' data-load-content='monitor/show_data.php?type=mailq'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
break;
case 'critical':
$messages[$app->lng("monitor_serverstate_listcritical_txt")][] = $app->lng("monitor_serverstate_mailqhigher_txt") . ' ' .
"<a href='#' onclick='loadContent(\"monitor/show_data.php?type=mailq\");'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
"<a href='#' data-load-content='monitor/show_data.php?type=mailq'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
break;
case 'error':
$messages[$app->lng("monitor_serverstate_listerror_txt")][] = $app->lng("monitor_serverstate_mailqhighest_txt") . ' ' .
"<a href='#' onclick='loadContent(\"monitor/show_data.php?type=mailq\");'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
"<a href='#' data-load-content='monitor/show_data.php?type=mailq'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
break;
default:
$messages[$app->lng("monitor_serverstate_listunknown_txt")][] = $app->lng("monitor_serverstate_mailqunknown_txt") . ' ' .
"<a href='#' onclick='loadContent(\"monitor/show_data.php?type=mailq\");'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
"<a href='#' data-load-content='monitor/show_data.php?type=mailq'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
break;
}
}
......@@ -531,19 +531,19 @@ function _processDbState($type, $serverId, $serverState, $messages) {
switch ($record['state']) {
case 'ok':
$messages[$app->lng("monitor_serverstate_listok_txt")][] = $app->lng("monitor_serverstate_syslogok_txt") . ' ' .
"<a href='#' onclick='loadContent(\"monitor/log_list.php\");'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
"<a href='#' data-load-content='monitor/log_list.php'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
break;
case 'warning':
$messages[$app->lng("monitor_serverstate_listwarning_txt")][] = $app->lng("monitor_serverstate_syslogwarning_txt") . ' ' .
"<a href='#' onclick='loadContent(\"monitor/log_list.php\");'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
"<a href='#' data-load-content='monitor/log_list.php'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
break;
case 'error':
$messages[$app->lng("monitor_serverstate_listerror_txt")][] = $app->lng("monitor_serverstate_syslogerror_txt") . ' ' .
"<a href='#' onclick='loadContent(\"monitor/log_list.php\");'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
"<a href='#' data-load-content='monitor/log_list.php'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
break;
default:
$messages[$app->lng("monitor_serverstate_listunknown_txt")][] = $app->lng("monitor_serverstate_syslogunknown_txt") . ' ' .
"<a href='#' onclick='loadContent(\"monitor/log_list.php\");'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
"<a href='#' data-load-content='monitor/log_list.php'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
break;
}
}
......@@ -556,15 +556,15 @@ function _processDbState($type, $serverId, $serverState, $messages) {
switch ($record['state']) {
case 'ok':
$messages[$app->lng("monitor_serverstate_listok_txt")][] = $app->lng("monitor_serverstate_fclamok_txt") . ' ' .
"<a href='#' onclick='loadContent(\"monitor/show_log.php?log=log_freshclam\");'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
"<a href='#' data-load-content='monitor/show_log.php?log=log_freshclam'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
break;
case 'info':
$messages[$app->lng("monitor_serverstate_listwarning_txt")][] = $app->lng("monitor_serverstate_fclamoutdated_txt") . ' ' .
"<a href='#' onclick='loadContent(\"monitor/show_log.php?log=log_freshclam\");'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
"<a href='#' data-load-content='monitor/show_log.php?log=log_freshclam'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
break;
default:
$messages[$app->lng("monitor_serverstate_listunknown_txt")][] = $app->lng("monitor_serverstate_fclamunknown_txt") . ' ' .
"<a href='#' onclick='loadContent(\"monitor/show_log.php?log=log_freshclam\");'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
"<a href='#' data-load-content='monitor/show_log.php?log=log_freshclam'>[" . $app->lng("monitor_serverstate_more_txt") . "]</a>";
break;
}
}
......
......@@ -8,7 +8,7 @@
<div class="form-group">
<label for="refreshinterval" class="col-sm-3 control-label">{tmpl_var name='refreshinterval_txt'}</label>
<div class="col-sm-9"><select name="refreshinterval" id="refreshinterval" class="form-control" onChange="loadContentRefresh('monitor/show_log.php?log={tmpl_var name="log_id"}')">
<div class="col-sm-9"><select name="refreshinterval" id="refreshinterval" class="form-control" onChange="ISPConfig.loadContentRefresh('monitor/show_log.php?log={tmpl_var name="log_id"}')">
{tmpl_var name='refresh'}
</select></div>
......
......@@ -8,7 +8,7 @@
<div class="form-group">
<label for="refreshinterval" class="col-sm-3 control-label">&nbsp;</label>
<div class="col-sm-9"><select name="refreshinterval" id="refreshinterval" class="form-control" onChange="loadContentRefresh('monitor/show_sys_state.php?state={tmpl_var name="state_type"}')">
<div class="col-sm-9"><select name="refreshinterval" id="refreshinterval" class="form-control" onChange="ISPConfig.loadContentRefresh('monitor/show_sys_state.php?state={tmpl_var name="state_type"}')">
{tmpl_var name='refresh'}
</select></div>
......
......@@ -7,6 +7,6 @@
<legend>{tmpl_var name="legend_txt"}</legend>
<div class="clear"><div class="right">
<button class="btn btn-default formbutton-success" type="button" value="Update Packagelist" onClick="loadContent('sites/aps_cron_apscrawler_if.php')">{tmpl_var name="btn_start_txt"}</button>
<button class="btn btn-default formbutton-success" type="button" value="Update Packagelist" data-load-content="sites/aps_cron_apscrawler_if.php">{tmpl_var name="btn_start_txt"}</button>
<button class="btn btn-default formbutton-default" type="button" value="Cancel" data-load-content="sites/aps_availablepackages_list.php">{tmpl_var name="btn_cancel_txt"}</button>
</div></div>
......@@ -17,11 +17,11 @@
<tbody>
<tmpl_loop name="records">
<tr class="tbl_row_{tmpl_if name='__EVEN__'}even{tmpl_else}uneven{/tmpl_if}">
<td class="tbl_col_active"> <a href="#" onclick="loadContent('sites/web_<tmpl_if name='type' op='==' value='vhostsubdomain'>vhost_sub</tmpl_if><tmpl_if name='type' op='==' value='vhostalias'>vhost_alias</tmpl_if>domain_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="active"}</a> </td>
<td class="tbl_col_domain"> <a href="#" onclick="loadContent('sites/web_<tmpl_if name='type' op='==' value='vhostsubdomain'>vhost_sub</tmpl_if><tmpl_if name='type' op='==' value='vhostalias'>vhost_alias</tmpl_if>domain_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="domain"}</a> </td>
<td class="tbl_col_server"> <a href="#" onclick="loadContent('sites/web_<tmpl_if name='type' op='==' value='vhostsubdomain'>vhost_sub</tmpl_if><tmpl_if name='type' op='==' value='vhostalias'>vhost_alias</tmpl_if>domain_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="server_id"}</a> </td>
<td class="tbl_col_interval"> <a href="#" onclick="loadContent('sites/web_<tmpl_if name='type' op='==' value='vhostsubdomain'>vhost_sub</tmpl_if><tmpl_if name='type' op='==' value='vhostalias'>vhost_alias</tmpl_if>domain_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="backup_interval"}</a> / <a href="#" onclick="loadContent('sites/web_<tmpl_if name='type' op='==' value='vhostsubdomain'>vhost_sub</tmpl_if><tmpl_if name='type' op='==' value='vhostalias'>vhost_alias</tmpl_if>domain_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="backup_copies"}</a> </td>
<td class="tbl_col_backup_count"> <a href="#" onclick="loadContent('sites/web_<tmpl_if name='type' op='==' value='vhostsubdomain'>vhost_sub</tmpl_if><tmpl_if name='type' op='==' value='vhostalias'>vhost_alias</tmpl_if>domain_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="backup_copies_exists"}</a> </td>
<td class="tbl_col_active"> <a href="#" data-load-content="sites/web_<tmpl_if name='type' op='==' value='vhostsubdomain'>vhost_sub</tmpl_if><tmpl_if name='type' op='==' value='vhostalias'>vhost_alias</tmpl_if>domain_edit.php?id={tmpl_var name='id'}">{tmpl_var name="active"}</a> </td>
<td class="tbl_col_domain"> <a href="#" data-load-content="sites/web_<tmpl_if name='type' op='==' value='vhostsubdomain'>vhost_sub</tmpl_if><tmpl_if name='type' op='==' value='vhostalias'>vhost_alias</tmpl_if>domain_edit.php?id={tmpl_var name='id'}">{tmpl_var name="domain"}</a> </td>
<td class="tbl_col_server"> <a href="#" data-load-content="sites/web_<tmpl_if name='type' op='==' value='vhostsubdomain'>vhost_sub</tmpl_if><tmpl_if name='type' op='==' value='vhostalias'>vhost_alias</tmpl_if>domain_edit.php?id={tmpl_var name='id'}">{tmpl_var name="server_id"}</a> </td>
<td class="tbl_col_interval"> <a href="#" data-load-content="sites/web_<tmpl_if name='type' op='==' value='vhostsubdomain'>vhost_sub</tmpl_if><tmpl_if name='type' op='==' value='vhostalias'>vhost_alias</tmpl_if>domain_edit.php?id={tmpl_var name='id'}">{tmpl_var name="backup_interval"}</a> / <a href="#" data-load-content="sites/web_<tmpl_if name='type' op='==' value='vhostsubdomain'>vhost_sub</tmpl_if><tmpl_if name='type' op='==' value='vhostalias'>vhost_alias</tmpl_if>domain_edit.php?id={tmpl_var name='id'}">{tmpl_var name="backup_copies"}</a> </td>
<td class="tbl_col_backup_count"> <a href="#" data-load-content="sites/web_<tmpl_if name='type' op='==' value='vhostsubdomain'>vhost_sub</tmpl_if><tmpl_if name='type' op='==' value='vhostalias'>vhost_alias</tmpl_if>domain_edit.php?id={tmpl_var name='id'}">{tmpl_var name="backup_copies_exists"}</a> </td>
</tr>
</tmpl_loop>
</tbody>
......
$(document).on("ready",function(){$(".progress .progress-bar").css("width",function(){return $(this).attr("aria-valuenow")+"%"})});
\ No newline at end of file
var ISPConfig={pageFormChanged:false,tabChangeWarningTxt:"",tabChangeDiscardTxt:"",tabChangeWarning:false,tabChangeDiscard:false,requestsRunning:0,indicatorCompleted:false,registeredHooks:new Array(),new_tpl_add_id:0,options:{useLoadIndicator:false,useComboBox:false,},setOption:function(a,b){ISPConfig.options[a]=b},setOptions:function(a){$.extend(ISPConfig.options,a)},reportError:function(a){},registerHook:function(a,c){if(!ISPConfig.registeredHooks[a]){ISPConfig.registeredHooks[a]=new Array()}var b=ISPConfig.registeredHooks[a].length;ISPConfig.registeredHooks[a][b]=c},callHook:function(a,c){if(!ISPConfig.registeredHooks[a]){return}for(var b=0;b<ISPConfig.registeredHooks[a].length;b++){var d=ISPConfig.registeredHooks[a][b];d(a,c)}},resetFormChanged:function(){ISPConfig.pageFormChanged=false},showLoadIndicator:function(){document.body.style.cursor="wait";if(ISPConfig.options.useLoadIndicator==true){ISPConfig.requestsRunning+=1;if(ISPConfig.requestsRunning<2){var a=$("#ajaxloader");if(a.length<1){a=$('<div id="ajaxloader" style="display: none;"></div>');a.appendTo("body")}var b=$("#content");if(b.length<1){return}ISPConfig.indicatorCompleted=false;var d=b.offset().left+150;var c=b.offset().top+150;a.css({left:d,top:c}).fadeIn("fast",function(){ISPConfig.indicatorCompleted=true;if(ISPConfig.requestsRunning<1){$(this).fadeOut("fast",function(){$(this).hide()})}})}}},hideLoadIndicator:function(){document.body.style.cursor="";ISPConfig.requestsRunning-=1;if(ISPConfig.requestsRunning<1){ISPConfig.requestsRunning=0;if(ISPConfig.indicatorCompleted==true){$("#ajaxloader").fadeOut("fast",function(){$("#ajaxloader").hide()})}}},onAfterSideNavLoaded:function(){if(ISPConfig.options.useComboBox==true){$("#sidebar").find("select:not(.chosen-select)").select2({placeholder:"",width:"element",selectOnBlur:true,allowClear:true,})}},onAfterContentLoad:function(a,b){if(!b){b=""}else{b="&"+b}if(ISPConfig.options.useComboBox==true){$("#pageContent").find("select:not(.chosen-select)").select2({placeholder:"",width:"element",selectOnBlur:true,allowClear:true,formatResult:function(c){if(c.id&&$(c.element).parent().hasClass("flags")){return'<span class="flags flag-'+c.id.toLowerCase()+'">'+c.text+"</span>"}else{return c.text}},formatSelection:function(c){if(c.id&&$(c.element).parent().hasClass("flags")){return'<span class="flags flag-'+c.id.toLowerCase()+'">'+c.text+"</span>"}else{return c.text}}}).on("change",function(c){if($("#pageForm .table #Filter").length>0){$("#pageForm .table #Filter").trigger("click")}})}ISPConfig.callHook("onAfterContentLoad",{url:a,data:b})},submitLoginForm:function(d){var c=document.getElementById(d);var b=c.username;if(b.value==""){b.focus();return}var e=c.passwort;if(e.value==""){e.focus();return}$("#dummy_username").val(b.value);$("#dummy_passwort").val(e.value);$("#dummy_login_form").submit();var a=$.ajax({type:"POST",url:"content.php",data:$("#"+d).serialize(),dataType:"html",beforeSend:function(){ISPConfig.showLoadIndicator()},success:function(g,i,f){if(f.responseText.indexOf("HEADER_REDIRECT:")>-1){var h=f.responseText.split(":");ISPConfig.loadContent(h[1])}else{if(f.responseText.indexOf("LOGIN_REDIRECT:")>-1){document.location.href="index.php"}else{$("#pageContent").html(f.responseText);ISPConfig.onAfterContentLoad("content.php",$("#"+d).serialize());ISPConfig.pageFormChanged=false}}ISPConfig.loadMenus();ISPConfig.hideLoadIndicator()},error:function(){ISPConfig.hideLoadIndicator();ISPConfig.reportError("Ajax Request was not successful.110")}})},submitForm:function(d,e,c){var b=arguments[3];if(!c){c=false}if(!c||window.confirm(c)){var a=$.ajax({type:"POST",url:e,data:$("#"+d).serialize(),dataType:"html",beforeSend:function(){ISPConfig.showLoadIndicator()},success:function(g,i,f){if(b){alert(b)}if(f.responseText.indexOf("HEADER_REDIRECT:")>-1){var h=f.responseText.split(":");ISPConfig.loadContent(h[1])}else{$("#pageContent").html(f.responseText);ISPConfig.onAfterContentLoad(e,$("#"+d).serialize());ISPConfig.pageFormChanged=false}ISPConfig.hideLoadIndicator()},error:function(f,i,h){ISPConfig.hideLoadIndicator();var g=f.responseText.split(":");ISPConfig.reportError("Ajax Request was not successful. 111")}})}},submitUploadForm:function(c,d){var b=function(l){var g,h=l.contentWindow.document.body.innerHTML;try{g=JSON.parse(h)}catch(i){g=h}var j="";var f=$("#OKMsg",g).html();if(f){j='<div id="OKMsg">'+f+"</div>"}var k=$("#errorMsg",g).html();if(k){j=j+'<div id="errorMsg">'+k+"</div>"}return j};var a="ajaxUploader-iframe-"+Math.round(new Date().getTime()/1000);$("body").after('<iframe width="0" height="0" style="display:none;" name="'+a+'" id="'+a+'"/>');$('input[type="file"]').closest("form").attr({target:a,action:d}).submit();$("#"+a).load(function(){var e=b(this);$("#errorMsg").remove();$("#OKMsg").remove();$('input[name="id"]').before(e);$(this).remove()})},capp:function(b,c){var a=$.ajax({type:"GET",url:"capp.php",data:"mod="+b+((c!=undefined)?"&redirect="+c:""),dataType:"html",beforeSend:function(){ISPConfig.showLoadIndicator()},success:function(e,h,d){if(d.responseText!=""){if(d.responseText.indexOf("HEADER_REDIRECT:")>-1){var g=d.responseText.split(":");ISPConfig.loadContent(g[1])}else{if(d.responseText.indexOf("URL_REDIRECT:")>-1){var f=d.responseText.substr(d.responseText.indexOf("URL_REDIRECT:")+"URL_REDIRECT:".length);document.location.href=f}else{}}}ISPConfig.loadMenus();ISPConfig.hideLoadIndicator()},error:function(){ISPConfig.hideLoadIndicator();ISPConfig.reportError("Ajax Request was not successful."+b)}})},loadContent:function(b){var c=arguments[1];var a=$.ajax({type:"GET",url:b,data:(c?c:null),dataType:"html",beforeSend:function(){ISPConfig.showLoadIndicator()},success:function(e,h,d){if(d.responseText.indexOf("HEADER_REDIRECT:")>-1){var g=d.responseText.split(":");ISPConfig.loadContent(g[1])}else{if(d.responseText.indexOf("URL_REDIRECT:")>-1){var f=d.responseText.substr(d.responseText.indexOf("URL_REDIRECT:")+"URL_REDIRECT:".length);document.location.href=f}else{$("#pageContent").html(d.responseText);ISPConfig.onAfterContentLoad(b,(c?c:null));ISPConfig.pageFormChanged=false}}ISPConfig.hideLoadIndicator()},error:function(){ISPConfig.hideLoadIndicator();ISPConfig.reportError("Ajax Request was not successful. 113")}})},loadContentRefresh:function(b){if($("#refreshinterval").val()>0){var a=$.ajax({type:"GET",url:b,data:"refresh="+document.getElementById("refreshinterval").value,dataType:"html",beforeSend:function(){ISPConfig.showLoadIndicator()},success:function(d,e,c){ISPConfig.hideLoadIndicator();$("#pageContent").html(c.responseText);ISPConfig.onAfterContentLoad(b,"refresh="+document.getElementById("refreshinterval").value);ISPConfig.pageFormChanged=false},error:function(){ISPConfig.hideLoadIndicator();ISPConfig.reportError("Ajax Request was not successful."+b)}});setTimeout("ISPConfig.loadContentRefresh('"+b+"&refresh="+document.getElementById("refreshinterval").value+"')",document.getElementById("refreshinterval").value*1000*60)}},loadInitContent:function(){var a=$.ajax({type:"GET",url:"content.php",data:"s_mod=login&s_pg=index",dataType:"html",beforeSend:function(){ISPConfig.showLoadIndicator()},success:function(c,e,b){if(b.responseText.indexOf("HEADER_REDIRECT:")>-1){var d=b.responseText.split(":");ISPConfig.loadContent(d[1])}else{$("#pageContent").html(b.responseText);ISPConfig.onAfterContentLoad("content.php","s_mod=login&s_pg=index");ISPConfig.pageFormChanged=false}ISPConfig.hideLoadIndicator()},error:function(){ISPConfig.hideLoadIndicator();ISPConfig.reportError("Ajax Request was not successful. 114")}});ISPConfig.loadMenus();ISPConfig.keepalive();setTimeout(function(){try{$("form#pageForm").find('input[name="username"]').focus()}catch(b){}},1000)},loadMenus:function(){var b=$.ajax({type:"GET",url:"nav.php",data:"nav=side",dataType:"html",beforeSend:function(){ISPConfig.showLoadIndicator()},success:function(d,e,c){ISPConfig.hideLoadIndicator();$("#sidebar").html(c.responseText);ISPConfig.onAfterSideNavLoaded();ISPConfig.loadPushyMenu()},error:function(){ISPConfig.hideLoadIndicator();ISPConfig.reportError("Ajax Request was not successful. 115")}});var a=$.ajax({type:"GET",url:"nav.php",data:"nav=top",dataType:"html",beforeSend:function(){ISPConfig.showLoadIndicator()},success:function(d,e,c){ISPConfig.hideLoadIndicator();$("#topnav-container").html(c.responseText);ISPConfig.loadPushyMenu()},error:function(c){ISPConfig.hideLoadIndicator();ISPConfig.reportError("Ajax Request was not successful. 116")}})},changeTab:function(c,e,d){if(ISPConfig.requestsRunning>0){return false}document.pageForm.next_tab.value=c;var b=$("form#pageForm").find('[name="id"]');var f=null;if(b.length>0){f=b.val()}if(ISPConfig.tabChangeDiscard=="y"&&!d){if((b.length<1||f)&&(ISPConfig.pageFormChanged==false||window.confirm(ISPConfig.tabChangeDiscardTxt))){var a=c;if(f){ISPConfig.loadContent(e,{next_tab:a,id:f})}else{ISPConfig.loadContent(e,{next_tab:a})}}else{return false}}else{if(f&&ISPConfig.tabChangeWarning=="y"&&ISPConfig.pageFormChanged==true){if(window.confirm(ISPConfig.tabChangeWarningTxt)){ISPConfig.submitForm("pageForm",e)}else{var a=c;if(f){ISPConfig.loadContent(e,{next_tab:a,id:f})}else{ISPConfig.loadContent(e,{next_tab:a})}}}else{ISPConfig.submitForm("pageForm",e)}}},confirm_action:function(b,a){if(window.confirm(a)){ISPConfig.loadContent(b)}},loadContentInto:function(b,c){var a=$.ajax({type:"GET",url:c,dataType:"html",beforeSend:function(){},success:function(e,f,d){$("#"+b).html(d.responseText)},error:function(){ISPConfig.reportError("Ajax Request was not successful. 118")}})},loadOptionInto:function(b,c){var a=$.ajax({type:"GET",url:c,dataType:"html",beforeSend:function(){},success:function(g,k,f){var h=f.responseText;var j=h.split("#");el=document.getElementById(b);el.innerHTML="";for(var e=0;e<j.length;++e){var d=document.createElement("option");d.appendChild(document.createTextNode(j[e]));d.value=j[e];el.appendChild(d)}},error:function(){ISPConfig.reportError("Ajax Request was not successful. 119")}})},keepalive:function(){var a=$.ajax({type:"GET",url:"keepalive.php",dataType:"html",success:function(c,d,b){setTimeout(keepalive,1000000)},error:function(){ISPConfig.reportError("Session expired. Please login again.")}})},addAdditionalTemplate:function(){var e=$("#template_additional").val();var a=$("#tpl_add_select").val().split("|",2);var d=a[0];var f=a[1];if(d>0){var c=e.split("/");ISPConfig.new_tpl_add_id+=1;var b=$('<a href="#"></a>').attr("class","button icons16 icoDelete").click(function(g){g.preventDefault();ISPConfig.delAdditionalTemplate($(this).parent().attr("rel"))});c[c.length]="n"+ISPConfig.new_tpl_add_id+":"+d;$("<li>"+f+"</li>").attr("rel","n"+new_tpl_add_id).append(b).appendTo("#template_additional_list ul");$("#template_additional").val(c.join("/"));alert("additional template "+f+" added to customer")}else{alert("no additional template selcted")}},delAdditionalTemplate:function(d){var a=$("#template_additional").val();if(d){var l=$("#template_additional_list ul").find('li[rel="'+d+'"]').eq(0);var k=l.text();l.remove();var j=a.split("/");var b=new Array();for(var e=0;e<j.length;e++){var f=j[e].split(":",2);if(f.length==2&&f[0]==d){continue}b[b.length]=j[e]}$("#template_additional").val(b.join("/"));alert("additional template "+k+" deleted from customer")}else{if(a!=""){var c=document.getElementById("tpl_add_select").value.split("|",2);var h=c[0];var k=c[1];$("#template_additional_list ul").find("li:not([rel])").each(function(){var i=$(this).text();if(i==k){$(this).remove();return false}return this});var b=a;var g=new RegExp("(^|/)"+h+"(/|$)");b=b.replace(g,"");b=b.replace("//","/");$("#template_additional").val(b);alert("additional template "+k+" deleted from customer")}else{alert("no additional template selcted")}}}};$(document).on("change",function(a){var b=a.target.localName;if($("#pageForm .table #Filter").length>0&&b=="select"){a.preventDefault();$("#pageForm .table #Filter").trigger("click")}if