|
@@ -13,16 +13,14 @@ define([
|
|
|
Utils.Extend(SelectAdapter, BaseAdapter);
|
|
|
|
|
|
SelectAdapter.prototype.current = function (callback) {
|
|
|
- var data = [];
|
|
|
var self = this;
|
|
|
|
|
|
- this.$element.find(':selected').each(function () {
|
|
|
- var $option = $(this);
|
|
|
-
|
|
|
- var option = self.item($option);
|
|
|
-
|
|
|
- data.push(option);
|
|
|
- });
|
|
|
+ var data = Array.prototype.map.call(
|
|
|
+ this.$element[0].querySelectorAll(':checked'),
|
|
|
+ function (selectedElement) {
|
|
|
+ return self.item($(selectedElement));
|
|
|
+ }
|
|
|
+ );
|
|
|
|
|
|
callback(data);
|
|
|
};
|