bundleMessage = { getCurrentVersion: function (nc) { var v = '3.4.0'; if (typeof nc !== 'undefined') { return v.split('.').slice(0, nc).join('.'); } return v; }, getMessage: function (version) { var currentVersionVal = bundleMessage.getCurrentVersion(); function msgs(version) { var c, vP, vN, vC; c = currentVersionVal.split('.'); vP = version.split('.'); vN = parseInt(vP.join('')); vC = parseInt(c.join('')); vN = parseInt(vN.toString().substring(0, 3)); if ((vP[0] === c[0] && vP[1] === c[1] && vP[2] === c[2]) || vN > vC) { return 'You are using the current release of JSCharting! (v' + version + ')'; } else if (vC > vN) { return 'New version ' + currentVersionVal + ' is available! Download Now. This version: (v' + version + ')'; } } var msg = msgs(version); $('#bundleMsg').html(msg); } }; bundleMessageOrg = { getCurrentVersion: function (nc) { var v = '3.4.0'; if (typeof nc !== 'undefined') { return v.split('.').slice(0, nc).join('.'); } return v; }, getMessage: function (version) { var currentVersionVal = bundleMessage.getCurrentVersion(); function msgs(version) { var c, vP, vN, vC; c = currentVersionVal.split('.'); vP = version.split('.'); vN = parseInt(vP.join('')); vC = parseInt(c.join('')); vN = parseInt(vN.toString().substring(0, 3)); if ((vP[0] === c[0] && vP[1] === c[1] && vP[2] === c[2]) || vN > vC) { return 'You are using the current release of JSCharting Org! (v' + version + ')'; } else if (vC > vN) { return 'New version ' + currentVersionVal + ' is available! Download Now. This version: (v' + version + ')'; } } var msg = msgs(version); $('#bundleMsg').html(msg); } }; bundleMessageGantt = { getCurrentVersion: function (nc) { var v = '3.4.0'; if (typeof nc !== 'undefined') { return v.split('.').slice(0, nc).join('.'); } return v; }, getMessage: function (version) { var currentVersionVal = bundleMessage.getCurrentVersion(); function msgs(version) { var c, vP, vN, vC; c = currentVersionVal.split('.'); vP = version.split('.'); vN = parseInt(vP.join('')); vC = parseInt(c.join('')); vN = parseInt(vN.toString().substring(0, 3)); if ((vP[0] === c[0] && vP[1] === c[1] && vP[2] === c[2]) || vN > vC) { return 'You are using the current release of JSCharting Gantt! (v' + version + ')'; } else if (vC > vN) { return 'New version ' + currentVersionVal + ' is available! Download Now. This version: (v' + version + ')'; } } var msg = msgs(version); $('#bundleMsg').html(msg); } };