| 1147 | } |
| 1148 | |
| 1149 | private calcSelectWidth(selectors) { |
| 1150 | selectors.each(function (index, selector) { |
| 1151 | const text = j.$(selector).find('option:selected').text(); |
| 1152 | const aux = j.$('<select style="width: auto;"/>').append(j.html(`<option>${text}</option>`)); |
| 1153 | const width = aux.width() || 0; |
| 1154 | |
| 1155 | if (width) { |
| 1156 | j.$('#malp').append( |
| 1157 | // @ts-expect-error |
| 1158 | // TODO --fix this line doesn't make sense |
| 1159 | // .html will return [object Object] 'cause aux is JQuery<HTMLElement> |
| 1160 | j.html(aux), |
| 1161 | ); |
| 1162 | j.$(selector).width(width + 5); |
| 1163 | aux.remove(); |
| 1164 | } |
| 1165 | }); |
| 1166 | } |
| 1167 | |
| 1168 | private async buttonclick() { |
| 1169 | this.singleObj.setEpisode(j.$('#malEpisodes').val()); |