extjs

javascript client date format

牧云@^-^@ 提交于 2019-12-11 05:59:54
问题 I had a problem on extjs date. Seem by default it using computer date to create a date. I don't check up my pc and post the date.Then i found it based on American M/d/yyyy. After i change the system regional setting date to d-m-Y.Everthing work fine. So anybody know how extjs get client date format ? e.g 'YYYY-mm-dd' or 'M/d/yyyy' . Since i need to parse the format from extjs code to php to mysql date format. I try to find stackoverflow and site but seem not found out, 回答1: You can convert

ExtJs Animation - Show/Fade elements ad infinitum

末鹿安然 提交于 2019-12-11 05:49:34
问题 I'm trying to create a never-ending looping animation using ExtJs, but am hitting the obvious barrier - calling a function recursively that potentially never ends tends to fill the stack pretty quickly. My (non-functioning) code is below; this function gets passed an array of strings which correspond to the divs to be shown and hidden. Without the callback, the code produces the desired show/fade effect, but obviously only the once. // 'divArray' - a string array containing the IDs of the

Sencha Touch Rails 3.1

牧云@^-^@ 提交于 2019-12-11 05:39:08
问题 I'm trying to load a resource with sencha touch on rails but i get the following error: Started OPTIONS "/menu_items.json?_dc=1322512349038&limit=25&sort=%5B%7B%22property%22%3A%22name%22%2C%22direction%22%3A%22ASC%22%7D%5D" for 127.0.0.1 at 2011-11-28 18:32:29 -0200 ActionController::RoutingError (No route matches [OPTIONS] "/menu_items.json"): My store code: new Ext.data.Store({ model: 'MenuItem', sorters: 'name', getGroupString: function(r){ return r.get('name')[0] || ""; }, proxy: { type:

ComboBox in editable grid: can't see the value

被刻印的时光 ゝ 提交于 2019-12-11 05:29:57
问题 I have an editable grid that uses a store. I want to insert a combobox in one of the fields. This is my store for the grid: new Ext.data.Store({ .... proxy: new Ext.data.HttpProxy...... reader: new Ext.data.JsonReader({ root: 'rows', fields: [..... {name:'wid', mapping: 'wid'}, There is another store for combobox only, which has 'wid' and 'name' fields. In my column model: header: 'Worker', dataIndex: 'wid', editor: new Ext.grid.GridEditor(workerCmb), renderer:function(value, p, record){

ExtJS 6.2 Sort grid Panel groupings based on summary row

一曲冷凌霜 提交于 2019-12-11 05:25:17
问题 I've been searching for hours to figure out how to do this. Essentially what I want to do is group data based on one column, create a summary for that grouping, then sort the groups based on the summary. Using one of their kitchen sink examples, I would like to be able to sort these groups by summary value rate. http://examples.sencha.com/extjs/6.0.0/examples/classic/grid/group-summary-grid.html 回答1: This can be done using a grouper with a sorterFn . The sorterFn should compare the summary

How i can retrieve value from selected node on Tree Panel

无人久伴 提交于 2019-12-11 05:19:00
问题 I use following methods : var myobj = myTree.getSelectionModel().getSelection(); alert(myobj) // [Object object] Now, i don't know what i can do it with this object. I supposed this Object have my value ? But i don't know how to use Object to retrieve values ... ! Thanks a lot :) 回答1: First. Looking at the API, I think the method you are talking about is // DefaultSelectionModel: var myobj = myTree.getSelectionModel().getSelectedNode(); // MultiSelectionModel: var myobj = myTree

How to use addCls() in extjs 3.2

北慕城南 提交于 2019-12-11 05:18:50
问题 I am try to delete row from a grid. For that I need to strike a row. I am using addCls but it is not supporting in extjs 3. What is the alternate way to do that. { xtype: 'button', text: 'Delete', handler : function(){ var cogrid = Ext.getCmp('HART_GRID'); var costore = cohartgrid.getStore(); var record = Ext.getCmp('HART_GRID').getSelectionModel().getSelected(); if (record) { Ext.fly(row).addCls('row-deleted');// This line is throwing error. } if(record.data.Excl == "No"){ cohartstore.remove

Extjs How can I change the 'style' of Ext.form.Label

橙三吉。 提交于 2019-12-11 05:17:17
问题 I know that I can set the style property of the label when creating it, but I want to change the style at run time, how can I do that? the user pick: font, color, bg color and I want to change the existing label style as user desire. thank you? 回答1: You can apply styles: yourFormPanel.getForm().findField("field_name").labelEl.setStyle({"color":"red"}); or add/remove css classes: yourFormPanel.getForm().findField("field_name").labelEl.addCls("red-label"); yourFormPanel.getForm().findField(

Form with textfield and grid: send all values to the server

匆匆过客 提交于 2019-12-11 05:17:14
问题 In create and update forms, it is sometimes necessary to give the user the ability to dynamically add fields to values of the same type (more than one phone, more than one address, etc.). I'm exploring several possibilities to do this. One of them is to use a grid as a form field. However, I have doubts about how best to implement this idea, especially on how to send all the form field values (textfield and grid) to the server (and then how to load them later in the form to edit). Fiddles

Change field labels on an ExtJS chart

怎甘沉沦 提交于 2019-12-11 05:12:12
问题 How would I go about changing the axes labels in an ExtJS chart? Specifically, I'm brining data in via proxy, and it's populating with the fields as they are labled in the database. I want to customize them, even if they have to be static. Here's the code from the ExtJS site: var panel1 = Ext.create('widget.panel', { width: 800, height: 400, title: 'Stacked Bar Chart - Movies by Genre', renderTo: Ext.getBody(), layout: 'fit', items: { xtype: 'chart', animate: true, shadow: true, store: store,