Commit bb252afb authored by Marius Cramer's avatar Marius Cramer
Browse files

- added missing changes from previous commits

parent 374d7e6e
...@@ -88,7 +88,9 @@ function hideLoadIndicator() { ...@@ -88,7 +88,9 @@ function hideLoadIndicator() {
} }
} }
function onAfterContentLoad() { function onAfterContentLoad(url, data) {
if(!data) data = '';
else data = '&' + data;
<?php <?php
if($server_config_array['misc']['use_combobox'] == 'y'){ if($server_config_array['misc']['use_combobox'] == 'y'){
?> ?>
...@@ -96,7 +98,7 @@ if($server_config_array['misc']['use_combobox'] == 'y'){ ...@@ -96,7 +98,7 @@ if($server_config_array['misc']['use_combobox'] == 'y'){
<?php <?php
} }
?> ?>
callHook('onAfterContentLoad'); callHook('onAfterContentLoad', {'url': url, 'data': data });
} }
function loadContentRefresh(pagename) { function loadContentRefresh(pagename) {
...@@ -112,7 +114,7 @@ function loadContentRefresh(pagename) { ...@@ -112,7 +114,7 @@ function loadContentRefresh(pagename) {
success: function(data, textStatus, jqXHR) { success: function(data, textStatus, jqXHR) {
hideLoadIndicator(); hideLoadIndicator();
jQuery('#pageContent').html(jqXHR.responseText); jQuery('#pageContent').html(jqXHR.responseText);
onAfterContentLoad(); onAfterContentLoad(pagename, "refresh="+document.getElementById('refreshinterval').value);
pageFormChanged = false; pageFormChanged = false;
}, },
error: function() { error: function() {
...@@ -191,7 +193,7 @@ function submitLoginForm(formname) { ...@@ -191,7 +193,7 @@ function submitLoginForm(formname) {
document.location.href = 'index.php'; document.location.href = 'index.php';
} else { } else {
jQuery('#pageContent').html(jqXHR.responseText); jQuery('#pageContent').html(jqXHR.responseText);
onAfterContentLoad(); onAfterContentLoad('content.php', jQuery('#'+formname).serialize());
pageFormChanged = false; pageFormChanged = false;
} }
loadMenus(); loadMenus();
...@@ -229,7 +231,7 @@ function submitForm(formname,target) { ...@@ -229,7 +231,7 @@ function submitForm(formname,target) {
//window.setTimeout('loadContent(redirect)', 1000); //window.setTimeout('loadContent(redirect)', 1000);
} else { } else {
jQuery('#pageContent').html(jqXHR.responseText); jQuery('#pageContent').html(jqXHR.responseText);
onAfterContentLoad(); onAfterContentLoad(target, jQuery('#'+formname).serialize());
pageFormChanged = false; pageFormChanged = false;
} }
hideLoadIndicator(); hideLoadIndicator();
...@@ -268,7 +270,7 @@ function submitFormConfirm(formname,target,confirmation) { ...@@ -268,7 +270,7 @@ function submitFormConfirm(formname,target,confirmation) {
//window.setTimeout('loadContent(redirect)', 1000); //window.setTimeout('loadContent(redirect)', 1000);
} else { } else {
jQuery('#pageContent').html(jqXHR.responseText); jQuery('#pageContent').html(jqXHR.responseText);
onAfterContentLoad(); onAfterContentLoad(target, jQuery('#'+formname).serialize());
pageFormChanged = false; pageFormChanged = false;
} }
hideLoadIndicator(); hideLoadIndicator();
...@@ -346,7 +348,7 @@ function loadContent(pagename) { ...@@ -346,7 +348,7 @@ function loadContent(pagename) {
//jQuery.each(reponseScript, function(idx, val) { eval(val.text); } ); //jQuery.each(reponseScript, function(idx, val) { eval(val.text); } );
jQuery('#pageContent').html(jqXHR.responseText); jQuery('#pageContent').html(jqXHR.responseText);
onAfterContentLoad(); onAfterContentLoad(pagename, (params ? params : null));
pageFormChanged = false; pageFormChanged = false;
} }
hideLoadIndicator(); hideLoadIndicator();
...@@ -373,7 +375,7 @@ function loadInitContent() { ...@@ -373,7 +375,7 @@ function loadInitContent() {
loadContent(parts[1]); loadContent(parts[1]);
} else { } else {
jQuery('#pageContent').html(jqXHR.responseText); jQuery('#pageContent').html(jqXHR.responseText);
onAfterContentLoad(); onAfterContentLoad('content.php', "s_mod=login&s_pg=index");
pageFormChanged = false; pageFormChanged = false;
} }
hideLoadIndicator(); hideLoadIndicator();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment