diff options
Diffstat (limited to 'ui/i18n/jquery.ui.datepicker-nb.js')
-rw-r--r-- | ui/i18n/jquery.ui.datepicker-nb.js | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/ui/i18n/jquery.ui.datepicker-nb.js b/ui/i18n/jquery.ui.datepicker-nb.js index 845a5052d..61e751cd3 100644 --- a/ui/i18n/jquery.ui.datepicker-nb.js +++ b/ui/i18n/jquery.ui.datepicker-nb.js @@ -1,7 +1,17 @@ /* Norwegian Bokmål initialisation for the jQuery UI date picker plugin. */ /* Written by Bjørn Johansen (post@bjornjohansen.no). */ -jQuery(function($){ - $.datepicker.regional['nb'] = { +(function( factory ) { + if ( typeof define === "function" && define.amd ) { + + // AMD. Register as an anonymous module. + define([ "../jquery.ui.datepicker" ], factory ); + } else { + + // Browser globals + factory( jQuery.datepicker ); + } +}(function( datepicker ) { + datepicker.regional['nb'] = { closeText: 'Lukk', prevText: '«Forrige', nextText: 'Neste»', @@ -18,5 +28,8 @@ jQuery(function($){ showMonthAfterYear: false, yearSuffix: '' }; - $.datepicker.setDefaults($.datepicker.regional['nb']); -}); + datepicker.setDefaults(datepicker.regional['nb']); + + return datepicker.regional['nb']; + +})); |