Unexpected string concatenation.
5671
5672function nuAccessFormSetButtonIcons (force) {
5673 function setInnerHTML (element, icon) {
5674 element.innerHTML = '<br> <span style="padding: 1px 10px 1px 10px;" class="nuActionButton"><i class="' + icon + '"></i></span>'5675 }
5676
5677 if (nuIsMobile() || force === true) {
Unexpected string concatenation.
5662 }
5663
5664 const select2 = $('#' + obj0Id + '_select2')
5665 return select2.length == 0 ? $('#' + obj0Id) : select2.children(':first').children(':first')5666 }
5667 }
5668
Unexpected string concatenation.
5661 return obj0Code
5662 }
5663
5664 const select2 = $('#' + obj0Id + '_select2')5665 return select2.length == 0 ? $('#' + obj0Id) : select2.children(':first').children(':first')
5666 }
5667 }
Unexpected string concatenation.
5656 }
5657
5658 if (obj0Id !== null) {
5659 const obj0Code = $('#' + obj0Id + 'code')5660 if (obj0Code.length !== 0) {
5661 return obj0Code
5662 }
Unexpected string concatenation.
5645 const obj = $('#' + id)
5646
5647 if (tabNr == -1 || obj.attr('data-nu-tab') == tabNr) {
5648 if (nuIsEnabled(id) && (nuIsVisible(id) || nuIsVisible(id + 'code') || nuIsVisible(id + '_select2'))) {5649 const c = obj.attr('class')
5650 if (c === undefined || !obj.attr('class').containsAny(['nuReadonly', 'nuHtml', 'nuImage', 'nuWord', 'nuCalculator', 'nuContentBoxContainer'])) {
5651 obj0Id = objects[i].id
Unexpected string concatenation.
5645 const obj = $('#' + id)
5646
5647 if (tabNr == -1 || obj.attr('data-nu-tab') == tabNr) {
5648 if (nuIsEnabled(id) && (nuIsVisible(id) || nuIsVisible(id + 'code') || nuIsVisible(id + '_select2'))) {5649 const c = obj.attr('class')
5650 if (c === undefined || !obj.attr('class').containsAny(['nuReadonly', 'nuHtml', 'nuImage', 'nuWord', 'nuCalculator', 'nuContentBoxContainer'])) {
5651 obj0Id = objects[i].id
Unexpected string concatenation.
5642
5643 for (let i = 0; i < objects.length; i++) {
5644 const id = objects[i].id
5645 const obj = $('#' + id)5646
5647 if (tabNr == -1 || obj.attr('data-nu-tab') == tabNr) {
5648 if (nuIsEnabled(id) && (nuIsVisible(id) || nuIsVisible(id + 'code') || nuIsVisible(id + '_select2'))) {
Unexpected string concatenation.
5626
5627 $id.select2(select2Options)
5628
5629 $('.' + select2Id).parent().parent().css({5630 position: 'absolute',
5631 width: Number(obj.width),
5632 top: Number(obj.top),
Unexpected string concatenation.
5601
5602 $id.attr('date-nu-select2', 1)
5603
5604 const select2Id = $('#' + id).attr('id') + '_select2'5605
5606 const lang = (nuSERVERRESPONSE.language === null ? 'en' : nuSERVERRESPONSE.language.toLowerCase())
5607 const select2OptionsDefault = {
Unexpected string concatenation.
5601
5602 $id.attr('date-nu-select2', 1)
5603
5604 const select2Id = $('#' + id).attr('id') + '_select2'5605
5606 const lang = (nuSERVERRESPONSE.language === null ? 'en' : nuSERVERRESPONSE.language.toLowerCase())
5607 const select2OptionsDefault = {
Unexpected string concatenation.
5597}
5598
5599function nuSetSelect2 (id, obj) {
5600 const $id = $('#' + id)5601
5602 $id.attr('date-nu-select2', 1)
5603
Unexpected string concatenation.
5574
5575// Show all dropdown items when clicking on the datalist arrow down button
5576function nuDatalistShowAllOnArrowClick (i) {
5577 $('#' + i)5578 .on('click', function (e) {
5579 const t = $(this)
5580 if ((t.width() - (e.clientX - t.offset().left)) < 14) {
Unexpected string concatenation.
5559}
5560
5561function nuDatalistValueRestoreValue (i) {
5562 const t = $('#' + i)5563 if (t.val() === '') {
5564 if (t.attr('org-placeholder') !== t.attr('placeholder')) {
5565 t.val(t.attr('placeholder'))
Unexpected string concatenation.
5555
5556 $('#' + id).val(nuGetProperty(id))
5557
5558 return $('#' + id)5559}
5560
5561function nuDatalistValueRestoreValue (i) {
Unexpected string concatenation.
5553 e.stopPropagation()
5554 })
5555
5556 $('#' + id).val(nuGetProperty(id))5557
5558 return $('#' + id)
5559}
Unexpected string concatenation.
5544 const obj = $('#nuBrowseTitle' + index)
5545 obj.append('<br/>').append(list)
5546
5547 $('#' + id).on('change', function () {5548 nuSetProperty(this.id, this.value)
5549 nuSearchAction()
5550 })
Unexpected string concatenation.
5541 list.appendChild(opt)
5542 })
5543
5544 const obj = $('#nuBrowseTitle' + index)5545 obj.append('<br/>').append(list)
5546
5547 $('#' + id).on('change', function () {
Unexpected string concatenation.
5531 w = nuCurrentProperties().column_widths == 0 ? nuCurrentProperties().browse_columns[index].width : nuCurrentProperties().column_widths[index] - 3
5532 }
5533
5534 list.setAttribute('style', 'width:' + w + 'px')5535
5536 const is1DArray = data[0][0] === undefined
5537 data.forEach(function (a) {
Unexpected string concatenation.
5523function nuAddBrowseTitleSelect (index, data, w) {
5524 if (!$.isArray(data)) return
5525
5526 const id = 'nuBrowseTitle' + index + '_select'5527 const list = document.createElement('select')
5528 list.setAttribute('id', id)
5529
Unexpected string concatenation.
5466 const body = document.getElementById('nupromptbody')
5467 body.innerHTML = text
5468 body.innerHTML += '<br><input id="prompt_value1" onkeyup="promot.inputkeyup(event, \'' + fctn + '\')" style="width: 450px; margin-top: 10px; border: 1px solid #CCC; padding: 10px; border-radius: 4px;"/>'
5469 document.getElementById('nupromptfoot').innerHTML = '<button class="nuActionButton" onclick="promot.ok(\'' + fctn + '\', true)">OK</button> <button class="nuActionButton" onclick="promot.cancel(\'' + fctn + '\', false)">Cancel</button>'5470
5471 const value1 = document.getElementById('prompt_value1')
5472 value1.value = defaultValue === undefined ? '' : defaultValue
Unexpected string concatenation.
5465 document.getElementById('nuprompthead').innerHTML = caption
5466 const body = document.getElementById('nupromptbody')
5467 body.innerHTML = text
5468 body.innerHTML += '<br><input id="prompt_value1" onkeyup="promot.inputkeyup(event, \'' + fctn + '\')" style="width: 450px; margin-top: 10px; border: 1px solid #CCC; padding: 10px; border-radius: 4px;"/>'5469 document.getElementById('nupromptfoot').innerHTML = '<button class="nuActionButton" onclick="promot.ok(\'' + fctn + '\', true)">OK</button> <button class="nuActionButton" onclick="promot.cancel(\'' + fctn + '\', false)">Cancel</button>'
5470
5471 const value1 = document.getElementById('prompt_value1')
Unexpected string concatenation.
5459 const nuprompt = document.getElementById('nuprompt')
5460 modal.style.display = 'block'
5461 modal.style.height = winH + 'px'
5462 nuprompt.style.left = (winW / 2) - (560 * 0.5) + 'px'5463 nuprompt.style.top = '5px'
5464 nuprompt.style.display = 'block'
5465 document.getElementById('nuprompthead').innerHTML = caption
Unexpected string concatenation.
5458 const modal = document.getElementById('nupromptmodal')
5459 const nuprompt = document.getElementById('nuprompt')
5460 modal.style.display = 'block'
5461 modal.style.height = winH + 'px'5462 nuprompt.style.left = (winW / 2) - (560 * 0.5) + 'px'
5463 nuprompt.style.top = '5px'
5464 nuprompt.style.display = 'block'
Unexpected string concatenation.
5436 let html = '<span id="nuFirst" class="nuBrowsePage" style="font-size: 15px;"><i class="fa fa-step-backward ml-5 mr-5" onclick="nuGetPage(1)"> </i></span>'
5437 $(html).insertBefore('#nuLast')
5438
5439 html = '<span id="nuEnd" class="nuBrowsePage" style="font-size: 15px;"> <i class="fa fa-step-forward ml-5 mr-5" onclick="nuGetPage(' + lastPage + ')"></i></span>'5440 $(html).insertAfter('#nuNext')
5441
5442 if (currentPage == 1) {
Unexpected string concatenation.
5373
5374 const p = f.nuFormat({ StartRow: startRow, EndRow: endRow, TotalRows: totalRows })
5375
5376 $('#nuBrowseFooter').append('<span class="nuPaginationInfo">' + p + '</span>')5377 }
5378}
5379
Description
In ES2015 (ES6), we can use template literals instead of string concatenation.
var str = `Hello, ${name}!`;
Bad Practice
var str = "Hello, " + name + "!";
var str = "Time: " + (12 * 60 * 60 * 1000);
Recommended
var str = "Hello World!";
var str = `Hello, ${name}!`;
var str = `Time: ${12 * 60 * 60 * 1000}`;
var str = "Hello, " + "World!";