Skip to content

Commit

Permalink
No need for moment, lets just use standard format for date
Browse files Browse the repository at this point in the history
  • Loading branch information
ThistleFIN committed Jan 5, 2024
1 parent 0849091 commit 098cb96
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
8 changes: 1 addition & 7 deletions js/front-poytakirjat.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,8 @@ jQuery(document).ready(function($) {
DataTable.datetime('DD/MM/YYYY');
$('#pk-taulukko').DataTable({
responsive: true,
'order': [[2, 'asc']],
'order': [[2, 'desc']],
'pageLength': 25,
"columnDefs": [
{ "type": "html", "targets": 0 },
{ "type": "num", "targets": 1 },
{ "type": "date", "targets": 2 },
{ "type": "string", "targets": 3 }
],
'language': {
'sProcessing': 'Käsitellään...',
'sLengthMenu': 'Näytä _MENU_ pöytäkirjaa',
Expand Down
2 changes: 1 addition & 1 deletion templates/poytakirjat-shortcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ function onCatChange() {
$custom_pdf_data = get_post_meta($post->ID, 'custom_pdf_data');
$pdfurl = $custom_pdf_data[0]['src'];
$slug = get_permalink();
$pm = date('d/m/Y', strtotime(get_post_meta($post->ID, 'pk_paivamaara', true)));
$pm = date('Y/m/d', strtotime(get_post_meta($post->ID, 'pk_paivamaara', true)));
$jn = get_post_meta($post->ID, 'pk_numero', true);
$tyyppi = get_the_terms($post->ID, 'tyyppi');
$thumbnail = $custom_pdf_data[0]['tnSmall'];
Expand Down
3 changes: 1 addition & 2 deletions wp-arkisto-enqueue.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,8 @@ function wppoyt_enqueue_shortcode_assets()
wp_deregister_style('jquery-ui-base-dialog');
wp_enqueue_style('jquery-ui-base-dialog', 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.13.1/themes/base/jquery-ui.min.css');

wp_enqueue_script('wpark-moment', plugins_url('assets/moment.min.js', __FILE__));
wp_enqueue_style('wpark-datatables-css', plugins_url('assets/datatables.min.css', __FILE__));
wp_enqueue_script('wpark-datatables-js', plugins_url('assets/datatables.min.js', __FILE__), array('jquery', 'wpark-moment'), true);
wp_enqueue_script('wpark-datatables-js', plugins_url('assets/datatables.min.js', __FILE__), array('jquery'), true);

wp_enqueue_script('wpark-front-js', plugins_url('js/front-poytakirjat.js', __FILE__), array(
'jquery',
Expand Down

0 comments on commit 098cb96

Please sign in to comment.