summaryrefslogtreecommitdiffstats
path: root/jquery.multiple.select.js
diff options
context:
space:
mode:
Diffstat (limited to 'jquery.multiple.select.js')
-rw-r--r--jquery.multiple.select.js15
1 files changed, 11 insertions, 4 deletions
diff --git a/jquery.multiple.select.js b/jquery.multiple.select.js
index 9d69334..bd10f38 100644
--- a/jquery.multiple.select.js
+++ b/jquery.multiple.select.js
@@ -312,10 +312,17 @@
} else if (this.options.allSelected &&
selects.length === this.$selectItems.length + this.$disableItems.length) {
$span.removeClass('placeholder').html(this.options.allSelected);
- } else if (this.options.countSelected && selects.length > this.options.minumimCountSelected) {
- $span.removeClass('placeholder').html(this.options.countSelected
- .replace('#', selects.length)
- .replace('%', this.$selectItems.length + this.$disableItems.length));
+ } else if ((this.options.countSelected || this.options.etcaetera) && selects.length > this.options.minumimCountSelected) {
+ if(this.options.etcaetera)
+ {
+ $span.removeClass('placeholder').html((this.options.displayValues ? selects : this.getSelects('text').slice(0, this.options.minumimCountSelected)).join(this.options.delimiter)+'...');
+ }
+ else
+ {
+ $span.removeClass('placeholder').html(this.options.countSelected
+ .replace('#', selects.length)
+ .replace('%', this.$selectItems.length + this.$disableItems.length));
+ }
} else {
$span.removeClass('placeholder').html(
(this.options.displayValues ? selects : this.getSelects('text'))