datetime-local fallback and fix timestamp-button
This commit is contained in:
parent
325d3be574
commit
06f65b44b3
@ -25,7 +25,7 @@
|
||||
<label for="serendipityNewTimestamp">{$CONST.DATE}</label>
|
||||
<input id="serendipityNewTimestamp" name="serendipity[new_timestamp]" type="datetime-local" value="{$entry_vars.timestamp|@formatTime:'o-m-d\TH:i':true:false:true}">
|
||||
|
||||
<a id="reset_timestamp" class="button_link" href="#serendipityNewTimestamp" data-currtime="{$entry_vars.reset_timestamp|@formatTime:DATE_FORMAT_2:true:false:true}" title="{$CONST.RESET_DATE_DESC}"><span class="icon-clock"></span><span class="visuallyhidden"> {$CONST.RESET_DATE}</span></a>
|
||||
<a id="reset_timestamp" class="button_link" href="#serendipityNewTimestamp" data-currtime="{$entry_vars.reset_timestamp|@formatTime:'o-m-d\TH:i':true:false:true}" title="{$CONST.RESET_DATE_DESC}"><span class="icon-clock"></span><span class="visuallyhidden"> {$CONST.RESET_DATE}</span></a>
|
||||
</div>
|
||||
{/if}
|
||||
<div id="edit_entry_category" class="form_select">
|
||||
|
@ -674,9 +674,15 @@ function highlightComment(id, checkvalue) {
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
// Make the timestamp readable in browser not supporting datetime-local.
|
||||
// Has no effect in those supporting it, as the timestamp is invalid in HTML5
|
||||
$('#serendipityNewTimestamp').val($('#serendipityNewTimestamp').val().replace("T", " "));
|
||||
|
||||
|
||||
// Set entry timestamp
|
||||
$('#reset_timestamp').click(function(e) {
|
||||
$('#serendipityNewTimestamp').val($(this).attr('data-currtime'));
|
||||
$('#serendipityNewTimestamp').val($('#serendipityNewTimestamp').val().replace("T", " "));
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user