mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-19 15:22:17 +02:00
Warnings suppression
This commit is contained in:
@@ -21,7 +21,7 @@
|
|||||||
*
|
*
|
||||||
* @since 2.7.0
|
* @since 2.7.0
|
||||||
*/
|
*/
|
||||||
var CombodoPortalToolbox = {
|
const CombodoPortalToolbox = {
|
||||||
/**
|
/**
|
||||||
* Close all opened modals on the page
|
* Close all opened modals on the page
|
||||||
*/
|
*/
|
||||||
@@ -80,7 +80,7 @@ var CombodoPortalToolbox = {
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Compute modal selector
|
// Compute modal selector
|
||||||
var oSelectorElem = null;
|
let oSelectorElem = null;
|
||||||
switch(typeof oOptions.base_modal.selector)
|
switch(typeof oOptions.base_modal.selector)
|
||||||
{
|
{
|
||||||
case 'string':
|
case 'string':
|
||||||
@@ -96,11 +96,11 @@ var CombodoPortalToolbox = {
|
|||||||
{
|
{
|
||||||
console.warn('Could not open modal dialog as the select option was malformed: ', oOptions.content);
|
console.warn('Could not open modal dialog as the select option was malformed: ', oOptions.content);
|
||||||
}
|
}
|
||||||
break;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get modal element by either
|
// Get modal element by either
|
||||||
var oModalElem = null;
|
let oModalElem = null;
|
||||||
// - Create a new modal from template
|
// - Create a new modal from template
|
||||||
// Note : This could be better if we check for an existing modal first instead of always creating a new one
|
// Note : This could be better if we check for an existing modal first instead of always creating a new one
|
||||||
if (oOptions.base_modal.usage === 'clone')
|
if (oOptions.base_modal.usage === 'clone')
|
||||||
@@ -116,7 +116,7 @@ var CombodoPortalToolbox = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set attributes
|
// Set attributes
|
||||||
for(var sProp in oOptions.attributes)
|
for(let sProp in oOptions.attributes)
|
||||||
{
|
{
|
||||||
oModalElem.attr(sProp, oOptions.attributes[sProp]);
|
oModalElem.attr(sProp, oOptions.attributes[sProp]);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user