use
String('#' + id)
instead. 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 }
use
String('#' + id)
instead. 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]')
Description
Prefer using explicit casts by calling Number
, Boolean
, or String
over using operators like +
, !!
or "" +
.
This is considered best practice as it improves readability.
Bad Practice
const b = !!foo;
// The `+` operator does not change the value of its operand
// unless it's already a number.
let n = +foo;
n = 1 * foo;
const s = "" + foo;
Recommended
const b = Boolean(foo);
const n = Number(foo);
const s = String(foo);