From 1216e2aaf5e9bae52abe1ef9dfb9ab34c271c56d Mon Sep 17 00:00:00 2001 From: Rafael Xavier de Souza Date: Wed, 17 Jul 2013 12:10:30 -0300 Subject: All: Wrap I18n files with UMD return exports Ref #9464 Ref gh-1029 --- ui/i18n/jquery.ui.datepicker-az.js | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'ui/i18n/jquery.ui.datepicker-az.js') diff --git a/ui/i18n/jquery.ui.datepicker-az.js b/ui/i18n/jquery.ui.datepicker-az.js index a133a9eb2..4addf76ef 100644 --- a/ui/i18n/jquery.ui.datepicker-az.js +++ b/ui/i18n/jquery.ui.datepicker-az.js @@ -1,7 +1,17 @@ /* Azerbaijani (UTF-8) initialisation for the jQuery UI date picker plugin. */ /* Written by Jamil Najafov (necefov33@gmail.com). */ -jQuery(function($) { - $.datepicker.regional['az'] = { +(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['az'] = { closeText: 'Bağla', prevText: '<Geri', nextText: 'İrəli>', @@ -19,5 +29,8 @@ jQuery(function($) { isRTL: false, showMonthAfterYear: false, yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['az']); -}); + datepicker.setDefaults(datepicker.regional['az']); + + return datepicker.regional['az']; + +})); -- cgit v1.2.3