Javascript(216)
-
Sencha 팝업 내용 html로 꾸미기
Ext.create('Ext.window.Window', { title: 'Line Information', modal: true, width: 300, height: 200, layout: 'fit', items: { xtype: 'panel', html: ` Series Title: ${item.series.getTitle()} Category: ${item.record.get('category')} Value: ${item.record.get('value')} ` }}).show();
2025.01.21 -
Sencha iframe으로 팝업 띄우기
Ext.create('Ext.window.Window', { title: 'Details', modal: true, width: 800, height: 600, layout: 'fit', items: [ { xtype: 'component', autoEl: { tag: 'iframe', src: url } } ]}).show();
2025.01.21 -
Sencha chart의 line 클릭시 팝업 띄우기
chart 자체에 afterrender 이벤트에 click 이벤트를 적용Ext.create('Ext.chart.CartesianChart', { renderTo: Ext.getBody(), width: 600, height: 400, store: { fields: ['category', 'value', 'group', 'url'], data: [ { category: 'Jan', value: 10, group: 'Group A', url: 'https://example.com/a1' }, { category: 'Feb', value: 20, group: 'Group A', url: 'https://example.com/..
2025.01.21 -
Sencha store 정보 가져오기
store.each로 전체 record 정보 처리store.getAt(0)로 특정 record 가져오기const store = Ext.create('Ext.data.Store', { fields: ['DATA1', 'DATA2'], data: [ { DATA1: 'value1', DATA2: 'value2' }, { DATA1: 'value3', DATA2: 'value4' } ]});// Access all records in the storestore.each(function (record) { console.log('Record:', record.getData()); // Logs each record's data});// Access a specifi..
2025.01.21 -
Sencha 팝업 호출시 get방식으로 파라메터 전달
팝업 호출const view = app.view.getViewModel();const params = view.get('sampleParams');// Convert searchParams to a query stringconst params = params ? params.getData() : {};const queryString = Ext.Object.toQueryString(params); // Converts the object to a query string// Open a new window with the query stringwindow.open( `/temp/test?${queryString}`, '_blank', // Open in a new tab or window '..
2025.01.21 -
Sencha callback 함수 샘플
비동기 호출에서 순서를 주기 위해서 Callback을 사용했음Callback 함수 정의sample: function (callback) { // Simulate namespace refresh logic const result = { success: true, data: 'Namespace data' }; console.log('Namespace refreshed.'); // Execute the callback with parameters if (typeof callback === 'function') { callback(result); }}Callback 호출this.sample(function (result) { if (result.success) ..
2025.01.21