mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-15 01:32:57 -07:00
Sort selectize when rendered
This commit is contained in:
parent
2b22f8eb4f
commit
515e6a8071
2 changed files with 5 additions and 8 deletions
|
@ -109,14 +109,14 @@
|
|||
% if isinstance(item['select_options'], dict):
|
||||
% for section, options in item['select_options'].iteritems():
|
||||
<optgroup label="${section}">
|
||||
% for option in options:
|
||||
% for option in sorted(options, key=lambda x: x['text'].lower()):
|
||||
<option value="${option['value']}">${option['text']}</option>
|
||||
% endfor
|
||||
</optgroup>
|
||||
% endfor
|
||||
% else:
|
||||
<option value="border-all"></option>
|
||||
% for option in item['select_options']:
|
||||
% for option in sorted(item['select_options'], key=lambda x: x['text'].lower()):
|
||||
<option value="${option['value']}">${option['text']}</option>
|
||||
% endfor
|
||||
% endif
|
||||
|
|
|
@ -1304,12 +1304,9 @@ class EMAIL(Notifier):
|
|||
user_emails_cc.update(emails)
|
||||
user_emails_bcc.update(emails)
|
||||
|
||||
user_emails_to = [{'value': k, 'text': v}
|
||||
for k, v in sorted(user_emails_to.iteritems(), key=lambda x: x[1].lower())]
|
||||
user_emails_cc = [{'value': k, 'text': v}
|
||||
for k, v in sorted(user_emails_cc.iteritems(), key=lambda x: x[1].lower())]
|
||||
user_emails_bcc = [{'value': k, 'text': v}
|
||||
for k, v in sorted(user_emails_bcc.iteritems(), key=lambda x: x[1].lower())]
|
||||
user_emails_to = [{'value': k, 'text': v} for k, v in user_emails_to.iteritems()]
|
||||
user_emails_cc = [{'value': k, 'text': v} for k, v in user_emails_cc.iteritems()]
|
||||
user_emails_bcc = [{'value': k, 'text': v} for k, v in user_emails_bcc.iteritems()]
|
||||
|
||||
return user_emails_to, user_emails_cc, user_emails_bcc
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue