Да, ваш JavaScript недействителен. Обычно такое предупреждение означает, что у вас есть некорректный код. Я рекомендую запустить его через префиксатор , такой как этот , чтобы помочь выстроить фигурные скобки и найти проблему. Когда мы делаем это с вашим кодом, мы видим 2 ошибки.
- Вы не закрываете функцию с завершающей фигурной скобкой
- У вас есть 1 слишком много скобок перед .show
Это должно выглядеть так
function popWindow() {
Ext.create('Ext.window.Window', {
bodyStyle: "background-color:#FFFFFF",
title: 'QA Tools',
height: 300,
width: 400,
layout: 'absolute',
items: [{
xtype: 'button',
x: 15,
y: 35,
height: 35,
width: 125,
text: 'Sell Listings',
itemId: 'sellBtn',
}, {
xtype: 'button',
x: 15,
y: 90,
height: 35,
width: 125,
text: 'Set SP Cycle to 1 Min',
itemId: 'sp1MinBtn',
}, {
xtype: 'button',
x: 15,
y: 145,
height: 35,
width: 175,
text: 'Set Single AP Cycle to 1 min',
itemId: 'singleAPMinBtn',
}, {
xtype: 'button',
x: 15,
y: 200,
height: 35,
width: 175,
text: 'Set Grouped AP Cycle to 1 min',
itemId: 'groupedAPMinBtn',
}, {
xtype: 'textfield',
x: 170,
y: 36,
height: 30,
width: 175,
allowBlank: false,
minLength: 7,
maxLength: 7,
emptyText: 'Enter Listing ID',
itemId: 'sellListingField',
}]
}).show();
}