Skip to content

Commit 263c1d9

Browse files
author
Marius Burkard
committed
Merge branch 'stable-3.1' of git.ispconfig.org:ispconfig/ispconfig3 into stable-3.1
2 parents 4a258fa + 15a6b83 commit 263c1d9

File tree

6 files changed

+56
-40
lines changed

6 files changed

+56
-40
lines changed

interface/web/mail/mail_user_edit.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ function onShowEnd() {
9393

9494
// Get the spamfilter policys for the user
9595
$tmp_user = $app->db->queryOneRecord("SELECT policy_id FROM spamfilter_users WHERE email = ?", $this->dataRecord["email"]);
96+
if (isset($_POST['policy'])) $tmp_user['policy_id'] = intval($_POST['policy']);
9697
$sql = "SELECT id, policy_name FROM spamfilter_policy WHERE ".$app->tform->getAuthSQL('r') . " ORDER BY policy_name";
9798
$policys = $app->db->queryAllRecords($sql);
9899
$policy_select = "<option value='0'>".$app->tform->lng("no_policy")."</option>";

interface/web/themes/default/assets/javascripts/ispconfig.js

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ var ISPConfig = {
88
indicatorCompleted: false,
99
registeredHooks: new Array(),
1010
new_tpl_add_id: 0,
11+
dataLogTimer: 0,
1112

1213
options: {
1314
useLoadIndicator: false,
@@ -175,6 +176,8 @@ var ISPConfig = {
175176
ISPConfig.onAfterContentLoad(target, $('#'+formname).serialize());
176177
ISPConfig.pageFormChanged = false;
177178
}
179+
clearTimeout(dataLogTimer);
180+
ISPConfig.dataLogNotification();
178181
ISPConfig.hideLoadIndicator();
179182
},
180183
error: function(jqXHR, textStatus, errorThrown) {
@@ -282,6 +285,8 @@ var ISPConfig = {
282285
ISPConfig.onAfterContentLoad(pagename, (params ? params : null));
283286
ISPConfig.pageFormChanged = false;
284287
}
288+
clearTimeout(dataLogTimer); // clear running dataLogTimer
289+
ISPConfig.dataLogNotification();
285290
ISPConfig.hideLoadIndicator();
286291
},
287292
error: function() {
@@ -346,7 +351,7 @@ var ISPConfig = {
346351

347352
ISPConfig.loadMenus();
348353
ISPConfig.keepalive();
349-
ISPConfig.datalognotification();
354+
ISPConfig.dataLogNotification();
350355
setTimeout(function() {
351356
try {
352357
$('form#pageForm').find('input[name="username"]').focus();
@@ -494,25 +499,27 @@ var ISPConfig = {
494499
}
495500
});
496501
},
497-
datalognotification: function() {
502+
dataLogNotification: function() {
503+
console.log(ISPConfig.options);
498504
var notificationContent = $.ajax({
499505
type: "GET",
500506
url: "datalogstatus.php",
501507
dataType: "json",
502508
success: function(data, textStatus, jqXHR) {
503509
var dataLogItems = [];
504510
$.each( data['entries'], function( key, val ) {
505-
dataLogItems.push('<li><strong>' + val['text'] + ':</strong> ' + val['count'] + '</li>');
511+
dataLogItems.push('<li><strong>' + val['text'] + ':</strong> ' + val['count'] + '</li>');
506512
});
507513
if(data['count'] > 0) {
508514
$('.modal-body').html(dataLogItems.join(""));
509515
$('.notification_text').text(data['count']);
510516
$('.notification').css('display','');
511-
setTimeout( function() { ISPConfig.datalognotification(); }, 2000 );
517+
dataLogTimer = setTimeout( function() { ISPConfig.dataLogNotification(); }, 2000 );
512518
} else {
513519
$('.notification').css('display','none');
514520
$('.modal-body').html('');
515-
setTimeout( function() { ISPConfig.datalognotification(); }, 5000 );
521+
$('#datalogModal').modal('hide');
522+
dataLogTimer = setTimeout( function() { ISPConfig.dataLogNotification(); }, 5000 );
516523
}
517524
},
518525
error: function() {

0 commit comments

Comments
 (0)