extjs5

extjs5相关典型特效的实现

爱⌒轻易说出口 提交于 2019-12-03 05:12:41
这里写一些具体特效的实现,这个框架主要用于做比较复杂的企业管理系统,外层的框架搭建好后,开发只需要关注center部分的界面和业务逻辑即可,所以我介绍一些框架的一些实现; 外围框架的特效影响到整体的用户体验,做好后使用起来很爽,否则总会感觉蛋疼,本例程center区域支持iframe和application组件,建议都是用application组件,整个应用都在一个界面上完成 废话少说,整体界面是这样的 1,树状导航单击展开关闭 我之前参考了extjs4.x的单击事件,关键是要获取node对象,然后就可以判断是否叶子节点是否展开等内容,但是extjs5的itemclick事件没有node对象,于是查阅了相关代码后,发现实际上record对象本身就具有node的所有方法和属性,直接操作它就行了具体代码如下 // 导航节点点击事件 itemclick: function(view,record,item,index,event,object){ var itemId = record.data.itemId ; var text = record.data.text ; var tabPanel = Ext.getCmp('index_tab'); // 单击节点事件(node是节点对象) if(!record.isLeaf()){ // 不是叶子节点 record

ExtJS RESTful service fail to handle json data

坚强是说给别人听的谎言 提交于 2019-12-02 10:04:22
I implement simple RESTful Service. These are Rest request url and the response json data. http://localhost:8080/RESTfulTestWeb/rest/services/getJson/aupres {"id":"aupres","passwd":"aaa","age":45,"name":"joseph"} The problem is ExtJS Store object client can not handle the above json data. These are ExtJS client codes Ext.define('extjs.model.Member', { extend: 'Ext.data.Model', fields : [{ name : 'id', type : 'string' }, { name : 'passwd', type : 'string' }, { name : 'age', type : 'int' }, { name : 'name', type : 'string' }] }); Ext.onReady(function () { var members = Ext.create('Ext.data.Store

EXTJS 5 : How to sort grid column in EXT JS 5

≡放荡痞女 提交于 2019-12-01 06:06:27
I recently updated version of EXT JS to 5 and and override of doSort function no longer works. Someone an idea how to do ? Exampple of override : { text: 'Custom', sortable : true, dataIndex: 'customsort', doSort: function(state) { var ds = this.up('grid').getStore(); var field = this.getSortParam(); ds.sort({ property: field, direction: state, sorterFn: function(v1, v2){ v1 = v1.get(field); v2 = v2.get(field); return v1.length > v2.length ? 1 : (v1.length < v2.length ? -1 : 0); } }); } } Edit 1 : I just try the solution of @tomgranerod but the me.sortState is always 'undefined'. So I do this

EXTJS 5 : How to sort grid column in EXT JS 5

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-01 04:04:45
问题 I recently updated version of EXT JS to 5 and and override of doSort function no longer works. Someone an idea how to do ? Exampple of override : { text: 'Custom', sortable : true, dataIndex: 'customsort', doSort: function(state) { var ds = this.up('grid').getStore(); var field = this.getSortParam(); ds.sort({ property: field, direction: state, sorterFn: function(v1, v2){ v1 = v1.get(field); v2 = v2.get(field); return v1.length > v2.length ? 1 : (v1.length < v2.length ? -1 : 0); } }); } }

EXTJS 5 - Date picker year and month only

核能气质少年 提交于 2019-11-30 17:46:06
问题 I guess this question has been asked a lot (as I found a few topics about it), but I still don't really know how to render a date picker, by only displaying month and year. I think I can do this differently: Create my own cuctom component (but I think my knowledge of Extjs is not good enough to be able to create a component which displays the month and year, and, when clicked, renders a year and month picker. Use some code found on google which creates a plugin (but I dont know how to use

Disable caching for ExtJs app

旧城冷巷雨未停 提交于 2019-11-30 09:23:31
问题 We have a ExtJS 5.01 app built with Sencha cmd 5.0.1.231. The issue we are facing is that browsers seem to cache the old version of our application. On looking at the network traffic on chrome when our application is served, i can see that app.js, app.css files all have ?_dc={timestamp} appended to them. Now, that tells me that every time a new version of my app is released (which updates this timestamp), the browsers should get a new version. But it seems like sometimes still the old version

Month field on EXTJS 5.1

戏子无情 提交于 2019-11-30 09:20:30
问题 I got this awesome fiddle https://fiddle.sencha.com/#fiddle/h5i from another stack overflow post (thanks igor). BUT I have one problem: the code doesn't work if I select extjs version 5.1, which is the version I use in my application. The problem is that when I click on a month or a year, the calendar just closes (you can try the behaviour by setting the version to 5.1 and running the fiddle again). I have tried to custom parts of the code, but nothing changed :s. Anyone has any ideas of why

Ext JS

牧云@^-^@ 提交于 2019-11-30 08:44:24
WELCOME TO EXT JS 这个向导提供了一个基本的Ext JS介绍。我们将会以一个非常简单的“hello world”例子来展开讨论。我们将以code是如何在Ext JS中组织的来开始。这个向导同时也包含了许多其他有价值的资源,所以尽可能多看几次以保证你成功的入门Ext JS! Hello World 开始使用Ext JS5是非常简单的!像如下展示的一样简单地创建一个 index.html 文件其中引用的JavaScript 和CSS文件都是从我们的CDN引入的: <!DOCTYPE html> <html> <head> <title>Editor Preview</title> <link rel="stylesheet" type="text/css" href="http://cdn.sencha.com/ext/beta/ext-5.0.0.736/build/packages/ext-theme-neptune/build/resources/ext-theme-neptune-all.css"> <script type="text/javascript" src="http://cdn.sencha.com/ext/beta/ext-5.0.0.736/build/ext-all.js"></script> <script type ="text

ExtJS 5.1: Binding record value to component property

邮差的信 提交于 2019-11-29 17:23:38
Let's say I've got a ViewController, ViewModel, and my View. In the View, I've got a form panel that gets a loaded record. When this record loads into the form, I want to hide or show a button based on the record's status field, so I figured do something with binding. However, it looks like binding is limited to only inverting, not actually using an expression. To get a better understanding, take a look at this code : Ext.application({ name : 'Fiddle', launch : function() { Ext.define('User', { extend: 'Ext.data.Model', fields: ['name', 'status'] }); Ext.define('UserListController', { extend :

Disable caching for ExtJs app

情到浓时终转凉″ 提交于 2019-11-29 15:48:43
We have a ExtJS 5.01 app built with Sencha cmd 5.0.1.231. The issue we are facing is that browsers seem to cache the old version of our application. On looking at the network traffic on chrome when our application is served, i can see that app.js, app.css files all have ?_dc={timestamp} appended to them. Now, that tells me that every time a new version of my app is released (which updates this timestamp), the browsers should get a new version. But it seems like sometimes still the old version get served. Is there anything else i need to do bust cache? Thanks I don't get it why "sometimes" the