Fix taglist widget:

- Fix taglist single styling
- Fix toggle to single not working when there're multiple selected
This commit is contained in:
Hadi Nategh 2016-05-13 18:44:37 +02:00
parent 2c43d7d24b
commit 4b0bc10900
3 changed files with 15 additions and 10 deletions

View File

@ -3275,7 +3275,8 @@ var et2_nextmatch_filterheader = (function(){ "use strict"; return et2_taglist.e
this.nextmatch.applyFilters({col_filter: col_filter});
}
},
rows: { default: 2}
rows: { default: 2},
class: {default: 'nm_filterheader_taglist'},
},
/**

View File

@ -650,7 +650,7 @@ var et2_taglist = (function(){ "use strict"; return et2_selectbox.extend([et2_IR
this.taglist.setMaxSelection(this._multiple ? this.options.maxSelection : 1);
if(!this._multiple && this.taglist.getValue().length > 1)
{
this.set_value(this.taglist.getValue());
this.set_value(multiple?this.taglist.getValue():this.taglist.getValue()[0]);
}
// This changes sizes, so
@ -829,9 +829,9 @@ var et2_taglist = (function(){ "use strict"; return et2_selectbox.extend([et2_IR
min_width += this.taglist.trigger ? this.taglist.trigger.outerWidth(true) : 0;
// Not enough for one
if(min_width > this.div.width() ||
if(this.options.multiple && (min_width > this.div.width() ||
this.taglist.container.width() > this.div.width() || this.taglist.container.height() > this.div.height()
)
))
{
this._setup_small();
}

View File

@ -1110,7 +1110,7 @@ div .et2_taglist_single div.ms-sel-ctn div.ms-sel-item {
overflow: hidden;
}
div .et2_taglist_single:not(.et2_taglist_small) div.ms-sel-ctn div.ms-sel-item {
width: calc(100% - 43px);
width: calc(100% - 30px);
}
.et2_taglist_single div.ms-sel-item > span:first-child {
max-width: 100%;
@ -1185,6 +1185,10 @@ div .et2_taglist_small.et2_taglist_single div.ms-sel-ctn div.ms-sel-item {
overflow: hidden;
}
.et2_taglist.et2_taglist_single.nm_filterheader_taglist div.ms-ctn input {
min-width: calc(100% - 30px);
}
/* Taglist category */
.et2_taglist_category span[class*="cat_"] {
height: 1.7em;