diff --git a/src/controllers/resources.js b/src/controllers/resources.js index 02fa0bbe..92b7c3fc 100644 --- a/src/controllers/resources.js +++ b/src/controllers/resources.js @@ -555,7 +555,7 @@ export default function () { const id = Tab.selectedItems[done] if (id) { - const isApiv2 = Number(window.sessionStorage.getItem('api_version')) === 2 + const isApiv2 = Number(window.localStorage.getItem('api_version')) === 2 || window.ECOMCLIENT_API_STORE.indexOf('v2') > -1 const apiBaseUri = isApiv2 ? 'https://ecomplus.io/v2' : 'https://api.e-com.plus/v1' askConfirmation( `${apiBaseUri}/${slug}/${id}.json`, diff --git a/src/controllers/resources/form/products.js b/src/controllers/resources/form/products.js index 978f8209..949e0211 100644 --- a/src/controllers/resources/form/products.js +++ b/src/controllers/resources/form/products.js @@ -489,7 +489,6 @@ export default function () { $emptyGrid.focus() return } - // add li element var $li = $('
  • ', { html: liGrid @@ -551,7 +550,6 @@ export default function () { if (options.length) { $inputOption.attr('placeholder', options[0]) } - if (gridsOptions.hasOwnProperty(gridId)) { // grid already in use var idAux = 2 @@ -922,8 +920,9 @@ export default function () { // single new option newOption = handleNewOption() } else { - // multiple options should be separated with points - var options = option.split(/[,;/\\|.]+/g) + // multiple options should be separated with some char + + var options = option.split(/[;/\\|]+/g) // handle all new options for (var i = 0; i < options.length; i++) { @@ -2078,7 +2077,6 @@ export default function () { if (dateStrs.length === 2) { dateStrs.forEach((dateStr, i) => { const { day, month, year, hour, min, sec } = parseHourDate(dateStr) - console.log(day, month, year, hour, min, sec) if (day && month && year) { const date = new Date(year, month - 1, day) if (hour >= 0 && min >= 0 && sec >= 0) { diff --git a/src/index.ejs b/src/index.ejs index 173e75e4..a8040f42 100644 --- a/src/index.ejs +++ b/src/index.ejs @@ -27,7 +27,8 @@