Skip to content

Commit

Permalink
#17843 - make server time update work when minified
Browse files Browse the repository at this point in the history
  • Loading branch information
michield committed Sep 23, 2015
1 parent d6aba6c commit e07f97d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
4 changes: 2 additions & 2 deletions public_html/lists/admin/js/phplistapp.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ function messageStatusUpdate(msgid) {
function getServerTime() {
$('#servertime').load('./?page=pageaction&ajaxed=true&action=getservertime',"",function() {
});
setTimeout("getServerTime()",60100); // just over a minute
}

function autoSave() {
// in the future, do an auto-save, for now, we want to keep the session alive
$("#autosave").load('./?page=pageaction&ajaxed=true&action=keepalive');
Expand Down Expand Up @@ -364,6 +362,8 @@ $(document).ready(function() {
}
});

// @TODO, only set when needed
setInterval(getServerTime,30000);

/* future dev
$("#listinvalid").load("./?page=pageaction&action=listinvalid&ajaxed=true",function() {
Expand Down
7 changes: 2 additions & 5 deletions public_html/lists/admin/send_core.php
Original file line number Diff line number Diff line change
Expand Up @@ -694,16 +694,13 @@ function submitform() { document.sendmessageform.submit() }
<div class="field">'.s('phpList operates in the time zone "%s"',SYSTEM_TIMEZONE).'</div>';
} else {
$scheduling_content .= '
<div class="field">'.s('Dates and times are relative to the Server Time').'<br/>'.s('Current Server Time is').' <span id="servertime">'.$currentTime[0].'</span>'.'</div>';
<div class="field">'.s('Dates and times are relative to the Server Time').'<br/>'.s('Current Server Time is').' <span id="servertime">'.substr($currentTime[0],0,-3).'</span>'.'</div>';
}

$scheduling_content .= ' <div class="field"><label for="embargo">'.$GLOBALS['I18N']->get("Embargoed Until").Help('embargo').'</label>'.'
'.$embargo->showInput('embargo',"",$messagedata['embargo']).'</div>
<div class="field"><label for="finishsending">'.$GLOBALS['I18N']->get("Stop sending after").Help('finishsending').'</label>'.'
'.$embargo->showInput('finishsending',"",$messagedata['finishsending']).'</div>
<script type="text/javascript">
getServerTime();
</script>';
'.$embargo->showInput('finishsending',"",$messagedata['finishsending']).'</div>';

if (USE_REPETITION) {
$repeatinterval = $messagedata["repeatinterval"];
Expand Down

0 comments on commit e07f97d

Please sign in to comment.