Remove redundant client-side render
Incidentally resolves a JavaScript error introduced in #3138 affecting pages without the proposal form: Uncaught TypeError: text is undefined at word_count (app/assets/javascripts/osem.js:134)
This commit is contained in:
parent
63a83f1938
commit
99c854f7d5
1 changed files with 2 additions and 4 deletions
|
|
@ -145,7 +145,7 @@ function word_count(text, divId, maxcount) {
|
||||||
/* Wait for the DOM to be ready before attaching events to the elements */
|
/* Wait for the DOM to be ready before attaching events to the elements */
|
||||||
$( document ).ready(function() {
|
$( document ).ready(function() {
|
||||||
/* Set the minimum and maximum proposal abstract word length */
|
/* Set the minimum and maximum proposal abstract word length */
|
||||||
function updateEventTypeRequirements() {
|
$("#event_event_type_id").change(function () {
|
||||||
var $selected = $("#event_event_type_id option:selected")
|
var $selected = $("#event_event_type_id option:selected")
|
||||||
var max = $selected.data("max-words");
|
var max = $selected.data("max-words");
|
||||||
var min = $selected.data("min-words");
|
var min = $selected.data("min-words");
|
||||||
|
|
@ -153,9 +153,7 @@ $( document ).ready(function() {
|
||||||
$("#abstract-maximum-word-count").text(max);
|
$("#abstract-maximum-word-count").text(max);
|
||||||
$("#abstract-minimum-word-count").text(min);
|
$("#abstract-minimum-word-count").text(min);
|
||||||
word_count($('#event_abstract').get(0), 'abstract-count', max);
|
word_count($('#event_abstract').get(0), 'abstract-count', max);
|
||||||
}
|
});
|
||||||
$("#event_event_type_id").change(updateEventTypeRequirements);
|
|
||||||
updateEventTypeRequirements();
|
|
||||||
|
|
||||||
/* Count the proposal abstract length */
|
/* Count the proposal abstract length */
|
||||||
$("#event_abstract").on('input', function() {
|
$("#event_abstract").on('input', function() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue