|
@@ -4227,7 +4227,7 @@ define('select2/core',[
|
|
|
// Set up containers and adapters
|
|
|
|
|
|
var DataAdapter = this.options.get('dataAdapter');
|
|
|
- this.data = new DataAdapter($element, this.options);
|
|
|
+ this.dataAdapter = new DataAdapter($element, this.options);
|
|
|
|
|
|
var $container = this.render();
|
|
|
|
|
@@ -4246,7 +4246,7 @@ define('select2/core',[
|
|
|
this.dropdown.position(this.$dropdown, $container);
|
|
|
|
|
|
var ResultsAdapter = this.options.get('resultsAdapter');
|
|
|
- this.results = new ResultsAdapter($element, this.options, this.data);
|
|
|
+ this.results = new ResultsAdapter($element, this.options, this.dataAdapter);
|
|
|
this.$results = this.results.render();
|
|
|
|
|
|
this.results.position(this.$results, this.$dropdown);
|
|
@@ -4269,7 +4269,7 @@ define('select2/core',[
|
|
|
this._registerEvents();
|
|
|
|
|
|
// Set the initial state
|
|
|
- this.data.current(function (initialData) {
|
|
|
+ this.dataAdapter.current(function (initialData) {
|
|
|
self.trigger('selection:update', {
|
|
|
data: initialData
|
|
|
});
|
|
@@ -4360,7 +4360,7 @@ define('select2/core',[
|
|
|
};
|
|
|
|
|
|
Select2.prototype._bindAdapters = function () {
|
|
|
- this.data.bind(this, this.$container);
|
|
|
+ this.dataAdapter.bind(this, this.$container);
|
|
|
this.selection.bind(this, this.$container);
|
|
|
|
|
|
this.dropdown.bind(this, this.$container);
|
|
@@ -4371,7 +4371,7 @@ define('select2/core',[
|
|
|
var self = this;
|
|
|
|
|
|
this.$element.on('change.select2', function () {
|
|
|
- self.data.current(function (data) {
|
|
|
+ self.dataAdapter.current(function (data) {
|
|
|
self.trigger('selection:update', {
|
|
|
data: data
|
|
|
});
|
|
@@ -4405,7 +4405,7 @@ define('select2/core',[
|
|
|
Select2.prototype._registerDataEvents = function () {
|
|
|
var self = this;
|
|
|
|
|
|
- this.data.on('*', function (name, params) {
|
|
|
+ this.dataAdapter.on('*', function (name, params) {
|
|
|
self.trigger(name, params);
|
|
|
});
|
|
|
};
|
|
@@ -4475,7 +4475,7 @@ define('select2/core',[
|
|
|
self.trigger('open');
|
|
|
}
|
|
|
|
|
|
- this.data.query(params, function (data) {
|
|
|
+ this.dataAdapter.query(params, function (data) {
|
|
|
self.trigger('results:all', {
|
|
|
data: data,
|
|
|
query: params
|
|
@@ -4484,7 +4484,7 @@ define('select2/core',[
|
|
|
});
|
|
|
|
|
|
this.on('query:append', function (params) {
|
|
|
- this.data.query(params, function (data) {
|
|
|
+ this.dataAdapter.query(params, function (data) {
|
|
|
self.trigger('results:append', {
|
|
|
data: data,
|
|
|
query: params
|
|
@@ -4690,12 +4690,12 @@ define('select2/core',[
|
|
|
this.$element.show();
|
|
|
this.$element.removeData('select2');
|
|
|
|
|
|
- this.data.destroy();
|
|
|
+ this.dataAdapter.destroy();
|
|
|
this.selection.destroy();
|
|
|
this.dropdown.destroy();
|
|
|
this.results.destroy();
|
|
|
|
|
|
- this.data = null;
|
|
|
+ this.dataAdapter = null;
|
|
|
this.selection = null;
|
|
|
this.dropdown = null;
|
|
|
this.results = null;
|