|
@@ -4103,7 +4103,7 @@ define('select2/options',[
|
|
|
$e.prop('disabled', this.options.disabled);
|
|
|
$e.prop('multiple', this.options.multiple);
|
|
|
|
|
|
- if ($e.data('select2-tags')) {
|
|
|
+ if ($e.data('select2Tags')) {
|
|
|
if (window.console && console.warn) {
|
|
|
console.warn(
|
|
|
'Select2: The `data-select2-tags` attribute has been changed to ' +
|
|
@@ -4112,11 +4112,11 @@ define('select2/options',[
|
|
|
);
|
|
|
}
|
|
|
|
|
|
- $e.data('data', $e.data('select2-tags'));
|
|
|
+ $e.data('data', $e.data('select2Tags'));
|
|
|
$e.data('tags', true);
|
|
|
}
|
|
|
|
|
|
- if ($e.data('ajax-url')) {
|
|
|
+ if ($e.data('ajaxUrl')) {
|
|
|
if (window.console && console.warn) {
|
|
|
console.warn(
|
|
|
'Select2: The `data-ajax-url` attribute has been changed to ' +
|
|
@@ -4125,12 +4125,20 @@ define('select2/options',[
|
|
|
);
|
|
|
}
|
|
|
|
|
|
- $e.data('ajax--url', $e.data('ajax-url'));
|
|
|
+ $e.data('ajax-Url', $e.data('ajaxUrl'));
|
|
|
}
|
|
|
|
|
|
+ var dataset = {};
|
|
|
+
|
|
|
// Prefer the element's `dataset` attribute if it exists
|
|
|
// jQuery 1.x does not correctly handle data attributes with multiple dashes
|
|
|
- var data = $.extend(true, {}, $e[0].dataset || $e.data());
|
|
|
+ if ($.fn.jquery && $.fn.jquery.substr(0, 2) == '1.' && $e[0].dataset) {
|
|
|
+ dataset = $.extend(true, {}, $e[0].dataset, $e.data());
|
|
|
+ } else {
|
|
|
+ dataset = $e.data();
|
|
|
+ }
|
|
|
+
|
|
|
+ var data = $.extend(true, {}, dataset);
|
|
|
|
|
|
data = Utils._convertData(data);
|
|
|
|