Commit 3c4c66f6 authored by WalkingDexter's avatar WalkingDexter Committed by atymchuk

XSL sorting for lastmod column.

parent cd19a5ff
...@@ -92,6 +92,7 @@ class SimplesitemapController extends ControllerBase { ...@@ -92,6 +92,7 @@ class SimplesitemapController extends ControllerBase {
'[images]' => $this->t('Images'), '[images]' => $this->t('Images'),
'[jquery]' => base_path() . 'core/assets/vendor/jquery/jquery.min.js', '[jquery]' => base_path() . 'core/assets/vendor/jquery/jquery.min.js',
'[jquery-tablesorter]' => base_path() . $module_path . '/xsl/jquery.tablesorter.min.js', '[jquery-tablesorter]' => base_path() . $module_path . '/xsl/jquery.tablesorter.min.js',
'[parser-date-iso8601]' => base_path() . $module_path . '/xsl/parser-date-iso8601.min.js',
'[xsl-js]' => base_path() . $module_path . '/xsl/simple_sitemap.xsl.js', '[xsl-js]' => base_path() . $module_path . '/xsl/simple_sitemap.xsl.js',
'[xsl-css]' => base_path() . $module_path . '/xsl/simple_sitemap.xsl.css', '[xsl-css]' => base_path() . $module_path . '/xsl/simple_sitemap.xsl.css',
]; ];
......
(function(factory){if (typeof define === 'function' && define.amd){define(['jquery'], factory);} else if (typeof module === 'object' && typeof module.exports === 'object'){module.exports = factory(require('jquery'));} else {factory(jQuery);}}(function(jQuery){
/*! Parser: ISO-8601 date - updated 10/26/2014 (v2.18.0) */
!function(e){"use strict";var s=/^([0-9]{4})(-([0-9]{2})(-([0-9]{2})(T([0-9]{2}):([0-9]{2})(:([0-9]{2})(\.([0-9]+))?)?(Z|(([-+])([0-9]{2}):([0-9]{2})))?)?)?)?$/;e.tablesorter.addParser({id:"iso8601date",is:function(e){return!!e&&e.match(s)},format:function(e){var t=e?e.match(s):e;if(t){var r=new Date(t[1],0,1);return t[3]&&r.setMonth(t[3]-1),t[5]&&r.setDate(t[5]),t[7]&&r.setHours(t[7]),t[8]&&r.setMinutes(t[8]),t[10]&&r.setSeconds(t[10]),t[12]&&r.setMilliseconds(1e3*Number("0."+t[12])),r.getTime()}return e},type:"numeric"})}(jQuery);return jQuery;}));
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
<title>[title]</title> <title>[title]</title>
<script type="text/javascript" src="[jquery]"/> <script type="text/javascript" src="[jquery]"/>
<script type="text/javascript" src="[jquery-tablesorter]"/> <script type="text/javascript" src="[jquery-tablesorter]"/>
<script type="text/javascript" src="[parser-date-iso8601]"/>
<script type="text/javascript" src="[xsl-js]"/> <script type="text/javascript" src="[xsl-js]"/>
<link href="[xsl-css]" type="text/css" rel="stylesheet"/> <link href="[xsl-css]" type="text/css" rel="stylesheet"/>
</head> </head>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment