Merge pull request #2081 from aignatov-bio/ai-sci-3901-recent-protocol-js-error

Fix JS error in recent protocol drop down [SCI-3901]
This commit is contained in:
aignatov-bio 2019-09-24 10:38:42 +02:00 committed by GitHub
commit 7c52728b08
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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 })