extjs4

Handling the layout dynamically

别等时光非礼了梦想. 提交于 2019-12-11 10:25:14
问题 Below is the code I tried: <script type="text/javascript"> Ext.require(['*']); Ext.onReady(function() { Ext.Loader.setConfig({ enabled: true }); var totalScreenWidth = screen.availWidth; var totalScreenHeight = screen.availHeight; Ext.QuickTips.init(); var viewport = Ext.create('Ext.ViewPort', { id: 'border-example', layout: 'border', items: [ Ext.create('Ext.Component', { region: 'north', height: totalScreenHeight * 0.05, autoEl: { tag: 'div', html: '<p><center>UI Demo</center></p>' } }), {

Disable Sencha script loader cache busting but only while developing/debugging

强颜欢笑 提交于 2019-12-11 10:18:30
问题 I'm working with ExtJS 4.x and Sencha Architect 2.2 but this should be relevant to later versions and any application that uses the Ext.Loader class to dynamically load scripts, including Sencha Touch. By default Ext.Loader adds a ?_dc=... cache busting parameter to make sure that the latest version of each script is loaded into the browser. When deploying to a production or beta-test environment this is a good thing as it ensures the user/tester gets the latest script each time you deploy

SVG text scales inproperly

廉价感情. 提交于 2019-12-11 09:58:09
问题 I use Ext.daw.* to draw svg text. The root element has size 200x300. If some element has larger size than size of root element then everything scales properly except the text: text appears to have larger size. Check out this demo. How to make text scale properly? Ext.create('Ext.draw.Component', { renderTo: Ext.getBody(), width: 200, height: 300, items: [{ type: 'path', path: 'M0 0 V200', 'stroke-width': 3, stroke: 'green' },{ type: 'path', // if I set path to 'M200 0 V700' then text goes

Refreshing grid not working after store.sync();

China☆狼群 提交于 2019-12-11 09:52:47
问题 I have added successfully data to server and get json back so that I have success = true. After adding, my grid doesn't sync data (just after refreshing with F5). In handler for success I've put: var store = Ext.getStore('Workers'); store.sync(); I've checked and I really get store Workers but the sync is not working. I think that when I reload data in store, data in grid should be also reloaded. I've tried this too: Ext.getCmp('workerlist').getView().refresh(); I've tried all examples from

Populating grid and form with same json?

拟墨画扇 提交于 2019-12-11 09:20:18
问题 Is it possible to populate grid with some of the JSON data and a form with other, from the same JSON? Two stores or two models or both? simple example... ;-) 回答1: Yes, the best way to do this would be to manipulate the reader, which as well as returning records, also stores whatever the raw json sent from the server is. The easiest solution would be to specify the reader parameters for your grid, but then have a listener on the store, which then processed the rawData property from the reader

Error upgrading from ExtJs3 to ExtJs4-''members is udefined" in compat mode?

僤鯓⒐⒋嵵緔 提交于 2019-12-11 08:58:30
问题 I'm updating my project from Ext3.3 to Ext4. I have added the ext3-core-compat.js and ext3-compat.js files after added the new ext4 ext-all-debug.js file. I am getting a members is udefined error on line 3262 of ext-all-debug.js. Which is inside the Ext.extend method which accepts 3 parameters: Ext.extend = function(subclass, superclass, members) i can see from the ExtJs4 documentation that Ext.extend is deprecated, however I just want to get my code working before I change all of my Ext

Failed to execute 'querySelectorAll' on 'Element' in ExtJS 5

风格不统一 提交于 2019-12-11 08:49:13
问题 I am trying for using Ext.dom.Query.Select method to find all divs which having class name square and highlightedReactangle.Same method was working with extjs 4 , but after up grading to extjs 5 it start throwing error. Uncaught SyntaxError: Failed to execute 'querySelectorAll' on 'Element': 'div:any(div.square|div.highlightedReactangle|div.highlightedReactangleIE|div.pin|div.redCircleCount|div.stampPreviewCls)' is not a valid selector. The statement I'm using to find related div is, this.el

Downside to extjs “iframe architecture” (should I refactor to MVC pattern?)

不羁岁月 提交于 2019-12-11 07:15:39
问题 I have an existing intranet webapp (solely internal) built with ExtJS using an "iframe architecture", i.e. it has a top menu and a tabpanel on an index page and about 30 other separate webpages that open as iframes "tabs" inside the main tabpanel. There is not any particular reason to use iframes, everything is on the same domain and most of these other seperate pages are written using the ExtJS library almost solely in javascript. The html on almost all of them consists of empty HTML, HEAD

JSONP not working on ExtJS 4 - Uncaught TypeError: Cannot call method 'substring' of undefined

做~自己de王妃 提交于 2019-12-11 07:13:59
问题 I'm stuck with this code, I'm getting this json formated data from the Youtube API, if I use type:'json' it will fail, because of that cross domain thing but the other elements loads anyway; then, if I change type: to 'jsonp' (which is the syntax described on the ExtJS API) it would give me this error:"Uncaught TypeError: Cannot call method 'substring' of undefined" I tried setting type:'anyotherstupidthing' and the same happens, so what could be happening? Here are my current data model and

Special characters in Extjs4?

China☆狼群 提交于 2019-12-11 06:23:23
问题 How to get special characters like ČĆŠĐŽ working in Extjs4. I have tried adding meta utf-8..., also tried with !DOCTYPE html5, and XHTML 1.0 Transitional. Prefered index.html on sencha web page is : <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title id='title'>HTML Page setup Tutorial</title> <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" /> <script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>