Skip to content

Commit bb252af

Browse files
author
Marius Cramer
committed
- added missing changes from previous commits
1 parent 374d7e6 commit bb252af

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

interface/web/js/scrigo.js.php

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -88,15 +88,17 @@ function hideLoadIndicator() {
8888
}
8989
}
9090

91-
function onAfterContentLoad() {
91+
function onAfterContentLoad(url, data) {
92+
if(!data) data = '';
93+
else data = '&' + data;
9294
<?php
9395
if($server_config_array['misc']['use_combobox'] == 'y'){
9496
?>
9597
$('#pageContent').find("select").combobox();
9698
<?php
9799
}
98100
?>
99-
callHook('onAfterContentLoad');
101+
callHook('onAfterContentLoad', {'url': url, 'data': data });
100102
}
101103

102104
function loadContentRefresh(pagename) {
@@ -112,7 +114,7 @@ function loadContentRefresh(pagename) {
112114
success: function(data, textStatus, jqXHR) {
113115
hideLoadIndicator();
114116
jQuery('#pageContent').html(jqXHR.responseText);
115-
onAfterContentLoad();
117+
onAfterContentLoad(pagename, "refresh="+document.getElementById('refreshinterval').value);
116118
pageFormChanged = false;
117119
},
118120
error: function() {
@@ -191,7 +193,7 @@ function submitLoginForm(formname) {
191193
document.location.href = 'index.php';
192194
} else {
193195
jQuery('#pageContent').html(jqXHR.responseText);
194-
onAfterContentLoad();
196+
onAfterContentLoad('content.php', jQuery('#'+formname).serialize());
195197
pageFormChanged = false;
196198
}
197199
loadMenus();
@@ -229,7 +231,7 @@ function submitForm(formname,target) {
229231
//window.setTimeout('loadContent(redirect)', 1000);
230232
} else {
231233
jQuery('#pageContent').html(jqXHR.responseText);
232-
onAfterContentLoad();
234+
onAfterContentLoad(target, jQuery('#'+formname).serialize());
233235
pageFormChanged = false;
234236
}
235237
hideLoadIndicator();
@@ -268,7 +270,7 @@ function submitFormConfirm(formname,target,confirmation) {
268270
//window.setTimeout('loadContent(redirect)', 1000);
269271
} else {
270272
jQuery('#pageContent').html(jqXHR.responseText);
271-
onAfterContentLoad();
273+
onAfterContentLoad(target, jQuery('#'+formname).serialize());
272274
pageFormChanged = false;
273275
}
274276
hideLoadIndicator();
@@ -346,7 +348,7 @@ function loadContent(pagename) {
346348
//jQuery.each(reponseScript, function(idx, val) { eval(val.text); } );
347349

348350
jQuery('#pageContent').html(jqXHR.responseText);
349-
onAfterContentLoad();
351+
onAfterContentLoad(pagename, (params ? params : null));
350352
pageFormChanged = false;
351353
}
352354
hideLoadIndicator();
@@ -373,7 +375,7 @@ function loadInitContent() {
373375
loadContent(parts[1]);
374376
} else {
375377
jQuery('#pageContent').html(jqXHR.responseText);
376-
onAfterContentLoad();
378+
onAfterContentLoad('content.php', "s_mod=login&s_pg=index");
377379
pageFormChanged = false;
378380
}
379381
hideLoadIndicator();

0 commit comments

Comments
 (0)