Fix JS error in recent protocol drop down

This commit is contained in:
Anton Ignatov 2019-09-24 09:47:04 +02:00
parent 73020043a4
commit c389972e2a

View file

@ -1,4 +1,4 @@
/* global TinyMCE I18n animateSpinner importProtocolFromFile truncateLongString globalConstants */
/* global TinyMCE I18n animateSpinner importProtocolFromFile truncateLongString */
/* global HelperModule GLOBAL_CONSTANTS */
/* eslint-disable no-use-before-define, no-alert, no-restricted-globals, no-underscore-dangle */
@ -437,7 +437,7 @@ function initRecentProtocols() {
$.get('/protocols/recent_protocols', result => {
$.each(result, (i, protocol) => {
$('<div class="protocol"><i class="fas fa-file-alt"></i>'
+ truncateLongString(protocol.name, globalConstants.name_truncation_length)
+ truncateLongString(protocol.name, GLOBAL_CONSTANTS.NAME_TRUNCATION_LENGTH)
+ '</div>').appendTo(dropDownList)
.click(() => {
$.post(recentProtocolContainer.data('updateUrl'), { source_id: protocol.id })