%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/medipszd/public_html/bower_components/select2/src/js/select2/data/
Upload File :
Create Path :
Current File : /home/medipszd/public_html/bower_components/select2/src/js/select2/data/maximumSelectionLength.js

define([

], function (){
  function MaximumSelectionLength (decorated, $e, options) {
    this.maximumSelectionLength = options.get('maximumSelectionLength');

    decorated.call(this, $e, options);
  }

  MaximumSelectionLength.prototype.query =
    function (decorated, params, callback) {
      var self = this;

      this.current(function (currentData) {
        var count = currentData != null ? currentData.length : 0;
        if (self.maximumSelectionLength > 0 &&
          count >= self.maximumSelectionLength) {
          self.trigger('results:message', {
            message: 'maximumSelected',
            args: {
              maximum: self.maximumSelectionLength
            }
          });
          return;
        }
        decorated.call(self, params, callback);
      });
  };

  return MaximumSelectionLength;
});

Zerion Mini Shell 1.0