mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-15 20:54:03 +00:00
Server-side render initial visibility of select help text
Resolves failure to display initial help text of difficulty level.
This commit is contained in:
parent
e5ab9b4db1
commit
6ed1725b01
3 changed files with 18 additions and 9 deletions
|
|
@ -145,7 +145,7 @@ function word_count(text, divId, maxcount) {
|
|||
/* Wait for the DOM to be ready before attaching events to the elements */
|
||||
$( document ).ready(function() {
|
||||
/* Set the minimum and maximum proposal abstract word length */
|
||||
$("#event_event_type_id").change(function () {
|
||||
function updateEventTypeRequirements() {
|
||||
var $selected = $("#event_event_type_id option:selected")
|
||||
var max = $selected.data("max-words");
|
||||
var min = $selected.data("min-words");
|
||||
|
|
@ -153,8 +153,9 @@ $( document ).ready(function() {
|
|||
$("#abstract-maximum-word-count").text(max);
|
||||
$("#abstract-minimum-word-count").text(min);
|
||||
word_count($('#event_abstract').get(0), 'abstract-count', max);
|
||||
})
|
||||
.trigger('change');
|
||||
}
|
||||
$("#event_event_type_id").change(updateEventTypeRequirements);
|
||||
updateEventTypeRequirements();
|
||||
|
||||
/* Count the proposal abstract length */
|
||||
$("#event_abstract").on('input', function() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue