smalos / nubuilder_dev

Found shorthand type coercions JS-0066
Anti-pattern
Minor
6 occurrences in this check
 34            $('#label_' + id + ',#' + id + ', .select2').wrapAll('<div class="nuObjectWrapper"></div>')
 35          }
 36          if (o[i].input == 'button') {
 37            $('#' + id + '').not('#sal_zzzzsys_form_id_open_button').wrapAll('<div class="nuObjectWrapper nuRespButton"></div>') // 02/02/23 Added Class:nuRespButton .not('#sal_zzzzsys_form_id_open_button') 38
 39            // $(".nuLookupButton").unwrap();
 40          }
 54              position: ''
 55
 56            })
 57            $('#' + id + '').css({ 58              'overflow-x': 'auto'
 59            })
 60          } else if (o[i].tab != '0' && oType == 'subform') { // subform on other tabs are not wrapped and maintains its NB set positions + subforms are responsive
use String('#' + id + ',#label_' + id) instead.
 47
 48          if (o[i].tab === 0 && oType == 'subform') { // subforms in tab one only-responsive + scroll on small screens
 49            $('#label_' + id + ',#' + id + '').wrapAll('<div class="nuObjectWrapper nuSubformWrapper"></div>')
 50            $('#' + id + ',#label_' + id + '').css({ 51              top: '',
 52              left: '',
 53              width: '',
use String('#label_' + id + ',#' + id) instead.
 46          // }
 47
 48          if (o[i].tab === 0 && oType == 'subform') { // subforms in tab one only-responsive + scroll on small screens
 49            $('#label_' + id + ',#' + id + '').wrapAll('<div class="nuObjectWrapper nuSubformWrapper"></div>') 50            $('#' + id + ',#label_' + id + '').css({
 51              top: '',
 52              left: '',
use Boolean(byUser === true && !$tabId.is('[nu-data-clicked-by-system]')) instead.
3443
3444  const $tabId = $('#' + tab.id)
3445
3446  byUser = !!(byUser === true && !$tabId.is('[nu-data-clicked-by-system]'))3447
3448  if (byUser) nuSaveScrollPositions()
3449
use String("<div id='" + i + "' title='" + title + "' style='font-size: 17px; display: inline-block; cursor : pointer; padding-right:12px; padding-left:" + paddingLeft + "' onclick='" + oClick + "'><i class='" + iClass + "'></i>") instead.
 251}
 252
 253function nuAddIconToBreadcrumbHolder (i, title, oClick, iClass, paddingLeft) {
 254  const h = "<div id='" + i + "' title='" + title + "' style='font-size: 17px; display: inline-block; cursor : pointer; padding-right:12px; padding-left:" + paddingLeft + "' onclick='" + oClick + "'><i class='" + iClass + "'></i>" + '' + '</div>' 255
 256  const fragment = nuCreateAppendHTML(h)
 257  const options = $('#nuBreadcrumbHolder').find('[id$=nuOptions]')