Skip to content

Commit

Permalink
MIR-1256 Support time in mods:dateIssued
Browse files Browse the repository at this point in the history
Implements a Timepicker
  • Loading branch information
Antoniafriedrich committed Nov 14, 2023
1 parent 4058662 commit 1069813
Show file tree
Hide file tree
Showing 11 changed files with 420 additions and 28 deletions.
5 changes: 3 additions & 2 deletions mir-module/GruntFile.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,11 @@ module.exports = function(grunt) {
'<%= globalConfig.moduleDirectory %>/target/classes/META-INF/resources/js/mir/geo-coords.min.js': '<%= globalConfig.moduleDirectory %>/src/main/resources/META-INF/resources/js/mir/geo-coords.js',
'<%= globalConfig.moduleDirectory %>/target/classes/META-INF/resources/js/mir/select-doctype.min.js': '<%= globalConfig.moduleDirectory %>/src/main/resources/META-INF/resources/js/mir/select-doctype.js',
'<%= globalConfig.moduleDirectory %>/target/classes/META-INF/resources/js/mir/citation.min.js': '<%= globalConfig.moduleDirectory %>/src/main/resources/META-INF/resources/js/mir/citation.js',

'<%= globalConfig.moduleDirectory %>/target/classes/META-INF/resources/js/jquery.search-entity.min.js': '<%= globalConfig.moduleDirectory %>/src/main/resources/META-INF/resources/js/jquery.search-entity.js',
'<%= globalConfig.moduleDirectory %>/target/classes/META-INF/resources/js/epusta.min.js': '<%= globalConfig.moduleDirectory %>/src/main/resources/META-INF/resources/js/epusta.js',
'<%= globalConfig.moduleDirectory %>/target/classes/META-INF/assets/ckeditor4/config.min.js': '<%= globalConfig.moduleDirectory %>/src/main/resources/META-INF/resources/js/ckeditor-config.js'
'<%= globalConfig.moduleDirectory %>/target/classes/META-INF/assets/ckeditor4/config.min.js': '<%= globalConfig.moduleDirectory %>/src/main/resources/META-INF/resources/js/ckeditor-config.js',
'<%= globalConfig.moduleDirectory %>/target/classes/META-INF/resources/js/mir/bootstrap-datepicker-timepicker/bootstrap-datepicker-timepicker.js': '<%= globalConfig.moduleDirectory %>/src/main/resources/META-INF/resources/js/mir/bootstrap-datepicker-timepicker/bootstrap-datepicker-timepicker.js',
'<%= globalConfig.moduleDirectory %>/target/classes/META-INF/resources/js/mir/bootstrap-datepicker-timepicker/bootstrap-datepicker-timepicker.de.js': '<%= globalConfig.moduleDirectory %>/src/main/resources/META-INF/resources/js/mir/bootstrap-datepicker-timepicker/bootstrap-datepicker-timepicker.de.js',
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@
<script type="text/javascript" src="{$WebApplicationBaseURL}assets/bootstrap-datepicker/locales/bootstrap-datepicker.de.min.js"></script>
<script type="text/javascript" src="{$WebApplicationBaseURL}assets/moment/min/moment.min.js"></script>
<script type="text/javascript" src="{$WebApplicationBaseURL}js/mir/xeditor-form.min.js"></script>
<script type="text/javascript" src="{$WebApplicationBaseURL}js/mir/bootstrap-datepicker-timepicker/bootstrap-datepicker-timepicker.js"></script>
<script type="text/javascript" src="{$WebApplicationBaseURL}js/mir/bootstrap-datepicker-timepicker/bootstrap-datepicker-timepicker.de.js"></script>
<link rel="stylesheet" type="text/css" href="{$WebApplicationBaseURL}assets/select2/css/select2.min.css" />
<script type="text/javascript" src="{$WebApplicationBaseURL}assets/select2/js/select2.min.js" />
<script type="text/javascript" src="{$WebApplicationBaseURL}assets/select2/js/i18n/{$MCR.Metadata.DefaultLang}.js" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2293,8 +2293,7 @@
<xed:validate xpath="//mods:mods/mods:identifier[@type='urn']" matches="urn:nbn:[a-z]{2}:\S*" i18n="mir.validation.urn" display="global" />
<xed:validate xpath="//mods:mods/mods:identifier[@type='ppn']" class="org.mycore.mir.validation.MIRValidationHelper" method="validatePPN" display="global" i18n="mir.validation.ppn" />
<xed:validate xpath="//mods:url|//mods:abstract/@xlink:href" matches="(ftp|http|https)://[\w\d.]+\S*" i18n="mir.validation.url" display="global" />
<xed:validate xpath="//mods:*[@encoding='w3cdtf'][not(ancestor::mods:recordInfo)]|//mods:mods/mods:accessCondition[@type='embargo']" matches="\d{4}(\-\d{2}(\-\d{2})?)?" type="datetime" format="yyyy;yyyy-MM;yyyy-MM-dd" i18n="mir.validation.date"
display="global" />
<xed:validate xpath="//mods:*[@encoding='w3cdtf'][not(ancestor::mods:recordInfo)]|//mods:mods/mods:accessCondition[@type='embargo']" matches="\d{4}(\-\d{2}(\-\d{2})(T\d{2}:\d{2}:\d{2}\+\d{2}:\d{2})?)?" type="datetime" format="yyyy;yyyy-MM;yyyy-MM-dd;yyyy-MM-dd'T'HH:mm:ssZ" i18n="mir.validation.date" display="global" />
<xed:validate xpath="//mods:*[@encoding='iso8601']" matches="\d{4}(\-\d{2}(\-\d{2})?)?(\/\d{4}(\-\d{2}(\-\d{2})?)?)?" display="global" i18n="mir.validation.date.iso8601"/>
<xed:validate xpath="//mods:part/@order" type="integer" display="global" i18n="mir.validation.order" />
</xed:template>
Expand Down Expand Up @@ -2339,6 +2338,8 @@
src="{$WebApplicationBaseURL}assets/bootstrap-datepicker/locales/bootstrap-datepicker.de.min.js"></script>
<script type="text/javascript" src="{$WebApplicationBaseURL}assets/moment/min/moment.min.js"></script>
<script type="text/javascript" src="{$WebApplicationBaseURL}js/mir/xeditor-form.min.js"></script>
<script type="text/javascript" src="{$WebApplicationBaseURL}js/mir/bootstrap-datepicker-timepicker/bootstrap-datepicker-timepicker.js"></script>
<script type="text/javascript" src="{$WebApplicationBaseURL}js/mir/bootstrap-datepicker-timepicker/bootstrap-datepicker-timepicker.de.js"></script>
<script type="text/javascript" src="{$WebApplicationBaseURL}assets/ckeditor4/ckeditor.js"></script>
<link rel="stylesheet" type="text/css" href="{$WebApplicationBaseURL}assets/select2/css/select2.min.css"/>
<script type="text/javascript" src="{$WebApplicationBaseURL}assets/select2/js/select2.min.js"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
document.addEventListener("DOMContentLoaded", function () {
if ( typeof $.fn.timepicker !== 'undefined') {
$.fn.timepicker.localisation.de = {
timeTxt: "Zeit einstellen",
calenderTxt: "Kalender"
}
};
});
Loading

0 comments on commit 1069813

Please sign in to comment.