samedi 28 février 2015

Open an asp.net mvc view through Ext.Ajax.request passing parameters

Hello friends,

I have a controller and a method in asp.net mvc 4, which will receive two parameters and will open a view is triggered.


The problem is that I want to open this view by Ext.Ajax.request the Extjs, and the view is open in a tab or window firefox, chrome or internet explorer.


I tried to use logic below but simply nothing happens. My view (cshtml) has only one tag.


Could you help me solve this issue?


hugs



Code:





  • Ext.Ajax.request({

  • scope:this,

  • url:'/Home/OpenView',

  • params:{

  • prtId: id,

  • tipo: tipo

  • },

  • failure:function(){

  • Ext.Msg.alert('Erro','Erro server');

  • }

  • });



View in cshtml

Code:



@{
Layout = null;
ViewBag.Title = "Test View";
}


<h2>Opened View</h2>

Method in C# controller


[HttpPost]

public ActionResult OpenView (int? prtId, string tipo)

{

...

return View("Index2");

}





a hug



Open an asp.net mvc view through Ext.Ajax.request passing parameters

FiltersFeature styles do not work in prodution application

Hi,

I'm using Ext.ux.grid.FiltersFeature in a Ext 4.2 application.


Using it outside my application, the CSS works as expected, using the CSS classes defined in GridFilters.css, as we can see in http://ift.tt/1vL6Xbg


But in my application, the styles are never rendered properly. The class ux-filtered-column is injected as expected, by the styles are not applied, because there is a previous font property assigned to x-column-header.


When I check the differences between my application and the mentioned example, the only difference is the order of ux-filtered-column and x-column-header. In my generated CSS, the x-column-header appears before ux-filtered-column.


I did the following tests:

* Put the GridFilters.css styles in sass/etc/all.scss



Code:



.ux-filtered-column {
font-style: italic;
font-weight: bold;
}
.ux-gridfilter-text-icon {
background-image: url(images/find.png) !important;
}

* Put the style files in index.html before <!-- <x-compile> -->

Code:



<link rel="stylesheet" href="resources/css/GridFilters.css">
<link rel="stylesheet" href="resources/css/RangeMenu.css">

* Added !important to the rules.

Nothing works. The headers never get rendered properly.


Some help is appreciated. Thanks.






FiltersFeature styles do not work in prodution application

Combo bug when displayFields == valueField



  1. Thank you for reporting this bug. We will make it our priority to review this report.







  2. Default Combo bug when displayFields == valueField



    Combo bug when displayFields == valueField





    Ext version tested:

    Browser versions tested against:

    • Firefox 36.0 (Firebug 2.0.8 installed) - windows 7

    • Firefox 34.0 (Firebug 2.0.8 installed)

    • Chrome 40.0.2214.115




    DOCTYPE tested against:

    Description:

    • NB: Despite having a consistent example I'm still not sure of the cause/effect of this...to be honest I'm not even sure if this is one bug or two bugs

    • It seems that when you have a combobox where the displayField is the same as the valueField, it causes issues when binding a remote store and value. The order of the binding config has no effect on this bug (so it doesn't seem to be a dup of http://ift.tt/1AnRskU )

    • In the fiddle below you'll see store with a remote proxy, which uses the Fruit model, used in 2 combo boxes

    • In the first box, the display and value fields are different, the 2nd has them the same, but only the first box works correctly




    (This next section might be a separate bug, or a clue for this one, let me know if I should make separate threads for it):

    Other notes:



    • If I take forceSelection off the 2nd combobox, I get an error in my console: Uncaught TypeError: undefined is not a function

    • It occurs in the "doSetValue" function of combobox at this line (1783 of the Combobox source file, inside the if !forceSelection block)):



    • HTML Code:



      record = new Model(dataObj);



    Steps to reproduce the problem:


    The result that was expected:



    • Both combo boxes should produce the same result (displaying 'Orange'), because the store's data has "name" and "value" as the same string




    The result that occurs instead:

    • The combobox where the display and value fields are the same fails to display the correct result




    Potential Workaround:

    • Changing line 1729 of the source file from



    • HTML Code:



      if (value != null && !displayIsValue && (pendingLoad || unloaded || !isLoaded || store.isEmptyStore)) {


    • to



    • HTML Code:



      if (value != null && (pendingLoad || unloaded || !isLoaded || store.isEmptyStore)) {


    • seems to fix the issue, but there may be a better fix that I can't find















Combo bug when displayFields == valueField

How to show image in full screen without croping

I have image which I want to show in full screen so that it takes max screen height or width whichever is smaller preserving ratio.

With the bellow example image is always maxed out to the screen height so on screens with narrow width right part of the image is not visible.

Code:



Ext.setup({

onReady : function() {


//CREATE CARD VIEW.------------------------------------------
var img = Ext.create('Ext.Img', {
src : 'BLACK_GIANT.png',
xtype : 'image',
mode : 'String',
style : 'background:red'


});

//CREATE CARD LAYOUT CONTAINER TO HOLD THE ABOVE VIEWS.-------
var view = Ext.create('Ext.Panel', {
fullscreen : true,
xtype : 'panel',
layout : 'fit',
items : [img]
});

}


});





How to show image in full screen without croping

Html Editor Line Spaces Problem in Internet Explorer

First please only watch video , i captured video for my problem ,

0-19 Seconds: Captured in explorer it is my problem look at the line spaces,

19-.. Seconds Captured in Chrome i want like this look at again line spaces and please compare with explorer


Thank you






Html Editor Line Spaces Problem in Internet Explorer

how to configure column auto width of grid?

how to convert grid column

vendredi 27 février 2015

Border Layout Height

I have searched for an answer for this with no luck other than "Use a Viewport" which is not the answer.

I have a small EXT JS app which is run in a <div> in a Metro styled management interface


The app has a Panel with a FIT layout.

Inside that I have a Panel with a BORDER layout.

I have a west region grid panel with a FIT layout and a flex = 1.

I have a center region grid panel with a FIT layout and a flex = 2.


The content of the west and center panels size to fit, i.e. both have a paging toolbar docked to the bottom of the panel which are where they should be, the proportions match the flex values.


The top panel with the fit layout fills the <div> in the management interface


The panel with the border layout scales to fit the width of the <div> BUT I cannot get it to fit the height of the div, it leaves a blank area below the panel, I need to put a height in the panel config to get it to render.


How can I get the border panel to fit the <div> height and re-size with <div> in the browser, I guess that its going to require determining the div height and recalculating the border panel height...


Please help I have spent too much time on this already


cheers






Border Layout Height

Panel.bodyPosProps - unused?

[unable to retrieve full-text content]What is the purpose of *bodyPosProps*? I don't see that it's used*.* Code: --------- Ext.define('Ext.panel.Panel', { extend:...



Panel.bodyPosProps - unused?

I can not change to design view with a grid with grouping feature

[unable to retrieve full-text content]In the Log I get: Framework Error: Object (none) as no method 'getGrouper' Am I doing something wrong? Bruce



I can not change to design view with a grid with grouping feature

How could I work with "var = new Ext.Panel" and only viewport or Ext.define?

Hello World!

I have some doubts about views, models and controllers in sencha touch 2.


Could I work like this way?


app.js



Code:



Ext.Viewport.add(menu);

app/view/Menu.js


Code:



var list = new Ext.List({
title: 'Menu',
itemTpl: [
'<img src="resources/menu/{icon}" align="center"/>',
'<span style="margin-left:15px;">{title}</span>'
],
data: [
{title: 'Sell', icon: 'sell.png'}, {title: 'Warehouse', icon: 'warehouse.png'},
{title: 'Transfers', icon: 'transfers.png'},
{title: 'Reports', icon: 'reports.png'}
]
});
var menu = new Ext.navigation.View({
useTitleForBackButtonText: true,
layout: 'card',
items: [
list
]
});

I don't have problems when I work with PHP because my Ext is embedded in the PHP file and includes different files. But when I work with js files and I want to use MVC with sencha cmd I don't know how to indicate to Ext to include my view files without declare Ext.define in each file.

To sum up, how to refer to the view, controller and models without using xtype?, just call the variable created in the js file.


best regards.






How could I work with "var = new Ext.Panel" and only viewport or Ext.define?

How could I work with "var = new Ext.Panel" and only viewport or Ext.define?

Hello World!

I have some doubts about views, models and controllers in sencha touch 2.


Could I work like this way?


app.js



Code:



Ext.Viewport.add(menu);

app/view/Menu.js


Code:



var list = new Ext.List({
title: 'Menu',
itemTpl: [
'<img src="resources/menu/{icon}" align="center"/>',
'<span style="margin-left:15px;">{title}</span>'
],
data: [
{title: 'Sell', icon: 'sell.png'}, {title: 'Warehouse', icon: 'warehouse.png'},
{title: 'Transfers', icon: 'transfers.png'},
{title: 'Reports', icon: 'reports.png'}
]
});
var menu = new Ext.navigation.View({
useTitleForBackButtonText: true,
layout: 'card',
items: [
list
]
});

I don't have problems when I work with PHP because my Ext is embedded in the PHP file and includes different files. But when I work with js files and I want to use MVC with sencha cmd I don't know how to indicate to Ext to include my view files without declare Ext.define in each file.

To sum up, how to refer to the view, controller and models without using xtype?, just call the variable created in the js file.


best regards.






How could I work with "var = new Ext.Panel" and only viewport or Ext.define?

fit panel to grid

Data files automatically generated when last open file is closed

When I have enough file tabs open in a Fiddle to create the bottom scrollbar, trying to close the one on the far right when I'm on that file works, but it also creates a new data.json file in its place. Attempts to close the new data.json file work too, but then another data.json (incremented with a number) is created in its place.

The only way to close the last file tab is by clicking on the one to the left of it, then clicking the close icon only of the tab I want to close, and I have to do that for all files until the horizontal scrollbar is gone.


This happens in FF 35 and Chrome 40.






Data files automatically generated when last open file is closed

Ajax calls in IE 11 issue

Hello everyone.

I've encountered an issue with the ajax calls on IE 11 (other browsers are ok and on other versions of IE I'm testing through a virtual machine and I can't reproduce it in those conditions). I have an application with a lot of ajax usage and I've noticed that when I work on IE 11 something strange happens.


The test scenario for me is this: I use my application on IE 11, then open another windows application (basically I need to lose focus of the IE page) and after a few minutes I return to the IE window. The first usage of ajax will take a really long time (20 seconds or even more). After that everything is ok, as long as I stay on the IE window.


I found a rather dumb fix for this. I created a script on my application that calls a dummy page every minute through ajax. It works for the time being, but I'm not satisfied with this solution. Has anyone encountered this or has some idea what could cause this?


Thank you






Ajax calls in IE 11 issue

Form layout problem



  1. Thank you for reporting this bug. We will make it our priority to review this report.







  2. Default Form layout problem



    Form layout problem





    I have written my problem about the form panel to the Questions section, but I didn't get answare so far!

    http://ift.tt/1LQRr1p

    Maybe it's a bug!















Form layout problem

How to get the row record on click of Checkbox column in the Grid editor panel

[unable to retrieve full-text content]Hi, I'm using a checkbox in my grid panel, and want to disable it or not to allow the user to checkbox based on the one of the column value from...



How to get the row record on click of Checkbox column in the Grid editor panel

[OPEN] Bugs on Windows phone on Lumia



  1. Thank you for reporting this bug. We will make it our priority to review this report.







  2. Default [OPEN] Bugs on Windows phone on Lumia



    [OPEN] Bugs on Windows phone on Lumia





    Hi,

    I have many bugs with my windows phone since last update (Lumia Denim).

    For example, on kitchen sink :


    Nested list :

    - navigate from level 1 to level2 : ok

    - navigate from level 2 to level 3 : impossible

    - back from level 2 to level 1 : ok

    - retry level 1 -> level 2 -> level 3 : it works' !!!!


    Overlay :

    - show : OK

    - hide : OK but mask still here, everything is block


    Is it planned a new working version ?









    Last edited by sylfel; Today at 2:05 AM.


    Reason: add "open" tags











[OPEN] Bugs on Windows phone on Lumia

Textfield height is incorrect

[unable to retrieve full-text content]Hello, I have a container field with the type = hbox. The label is on top. The result is: [ATTACH=CONFIG]51849[/ATTACH] if I give a field...



Textfield height is incorrect

jeudi 26 février 2015

Charts on tabs problem.

Any expert can tell me about the ExtJS5.1 and SA3.2 multi build solution ? :)

Hi guys, we use SA3.0 and SA3.1 to develop over 20 Touch projects, we always use "Ext.app.Profile" to build different UI for Tablet and Phone device. Now we upgrade to SA3.2 and know that ExtJS5.1( sencha CMD 5 ) also can build for different target( Desktop, Phone, Tablet ), then we try.

But the point is: Seems use ExtJS 5.1 ( Ext.app.Profile ) to build the project, the app.js size is supper big !!! ( only use 3 Ext Containers for each profile, just a the demo, nothing else, the production version app.js already 1.1MB ), in the past our very complex Touch project app.js size NEVER over 800KB.


The purpose we want to use SA3.2 ExtJS5.1 Project is that: we build a new project for client which the app will cross over Desktop/Phone/Tablet, and we "try" do that in ONE project and build for different target, is sound very convenient , but now the "whole solution app.js" size not acceptable....


And I read the SenchaCMD5 new feature, there is a "builds" option in app.json file, but ...the API document only show the case for building different themes...can it build for different target ? ( mean "Desktop version app.js", "Phone version app.js" and "Tablet version app.js", each of them ONLY compile the views/models/controllers belongs to specified profile !!! )


Is any one can give us a better solution or suggestion on this purpose ? We're look forward to listen it






Any expert can tell me about the ExtJS5.1 and SA3.2 multi build solution ? :)

Chart Label Alignment

So I'm attempting to draw a bunch of charts that have data from the same time range. The problem is that the labels vary in length, which results in a misalignment of chart grids. Is there a way to force the alignment of the labels to be align along the chart's boundaries and not have the label and the chart negotiating their container space.

Screen Shot 2015-02-26 at 4.53.40 PM.png







Chart Label Alignment

Editable Grid Performance Issue

Hi All,

I have an editable grid with only 4 columns, but my JSON string is coming with 98 columns(out of which only 4 will be mapped to grid).


Because of this the loading time of the grid is more than 40 secs for records > 500.


Why is this happening?


Thanks,

Anant Choubey






Editable Grid Performance Issue

Architect fails to open design view

I created a textbox on a form, and used the bind feature to set the emptyText field to a ViewModel data item. It works fine for the text field, but the emptyText field causes the Architect problems. The design view is just blank after adding the bind. Removing the bind makes it work again.

Is it supposed to be legal to use a ViewModel bind for the emptyText field?


Sencha Architect 3.2







Architect fails to open design view

Ext.dom.Element.get raise warning has error



  1. Thank you for reporting this bug. We will make it our priority to review this report.







  2. Default Ext.dom.Element.get raise warning has error



    Ext.dom.Element.get raise warning has error





    Extract from: http://ift.tt/1aqgZFb

    Code:



    function warnDuplicate(id) {
    Ext.Error.raise("DOM element with id " + id + " in Element cache is not the same as element in the DOM. " + "Make sure to clean up Element instances using destroy()");
    }














Ext.dom.Element.get raise warning has error

Combobox problem with Ext 5.1



  1. Thank you for reporting this bug. We will make it our priority to review this report.







  2. Default Combobox problem with Ext 5.1



    Combobox problem with Ext 5.1





    I had a problem with the combobox and Ext 5.1 (this example worked as expected with Ext 5.0.1)

    Code:



    {
    xtype: 'combobox',
    store: Mymodule.GENDER_CHOICES, // (store)
    name: 'gender',
    queryMode: 'local',
    fieldLabel: translate('Gender'),
    displayField: 'name',
    valueField: 'value',
    forceSelection: true,
    bind: {
    value: '{mainRecord.gender}'
    },
    }

    Mymodule.GENDER_CHOICES is a simple store created like this :

    Code:



    Ext.create('Ext.data.Store', {
    "fields": [
    "value",
    "name"
    ],
    "data": [
    {
    "name": translate("male"),
    "value": 1
    },
    {
    "name": translate("female"),
    "value": 2
    },
    ]
    })

    The field gender is defined like this :


    Code:



    {
    "name": "gender",
    "type": "integer",
    "defaultValue": 1,
    "validators": [
    {
    "type": "presence"
    },


    {
    "list": [
    1,
    2
    ],
    "type": "inclusion"
    }
    ]
    },

    And... it doesn't work.

    The combobox does the validation on the rawValue of the choice ("female" or "male"). I expected the validation to be performed on the "value" of the field (1 or 2).


    The only way I found to make the combobox work with Ext5.1 is to overload the isValid method in the field definition :



    Code:



    {
    xtype: 'combobox',
    store: Mymodule.GENDER_CHOICES, // (store)
    //....
    isValid: function() {
    var me = this,
    disabled = me.disabled,
    validate = me.forceValidation || !disabled;

    return validate ? me.validateValue(me.getValue()) : disabled;
    }
    }

    Is that normal?

    Is that what we want?

    Did I do something wrong?













Combobox problem with Ext 5.1

Extjs 6 and SA 4?

Hi I have a doubt, I read that Sencha is going to merge Sencha Touch and Extjs in the same framework, I

think is good idea, but I have a doubt if today I start a new project with sencha touch, it could be migrated to new framework, and SA 4 will migrate my current project to new framework?

any hint about it will help to make a decision.


regards

Frank







Extjs 6 and SA 4?

Calendar Store Reload/Refresh

Hi,

Issues I am facing is that server side method which I am specifying in my store's proxy is called multiple time on first time loading of my calendar, one with day time range, then weekly range, then monthly and data(event) being fetched from server side after I navigate from one month to other is not being displayed/refreshed in calendar view.


I have tried explicitly like this;


App.calendarPanel.eventStore.proxy.url = '/http://ift.tt/1LJIbdv'+paramValue; //Option 1

App.calendarPanel.eventStore.baseParams = { start: App.viewStart.dateFormat('Y-m-d'), end: App.viewEnd.dateFormat('Y-m-d')};//Option 2

App.eventStore.proxy.url = '/http://ift.tt/1LJIbdv' + paramValue; //Option 3

App.eventStore.baseParams = { start: App.viewStart.dateFormat('Y-m-d'), end: App.viewEnd.dateFormat('Y-m-d')};//Option 4


App.calendarPanel.eventStore.load(); //Option 1

App.calendarPanel.eventStore.reload(); //Option 2


My store looks like;


this.eventStore = Ext.create('Ext.calendar.data.MemoryEventStore', {

//data: Ext.calendar.data.Events.getData()//This static call works just fine if I uncomment this one and comment proxy call

proxy: {

type: 'ajax',

url: Path + '/http://ift.tt/1wiPiZ8,

reader: {

type: 'json',

root: 'evts',//have tried with or without specifying root element

listeners: {

exception: function (proxy, response, options) {

alert(response.responseText);

}

}

}

}

});


Please let me know if you are unable to understand my scenario.






Calendar Store Reload/Refresh

Grid Cell editing plugin: 'beforeedit' is fired before 'edit', if moving with TAB



  1. Thank you for reporting this bug. We will make it our priority to review this report.





  2. Sencha User



    Join Date

    Aug 2012


    Posts

    120


    Vote Rating

    9













Grid Cell editing plugin: 'beforeedit' is fired before 'edit', if moving with TAB

using CheckboxSelectionModel to select multiple rows

Code:



var xg = Ext.grid;

var checkboxSelector = new xg.CheckboxSelectionModel({
header:'',
handleMouseDown:Ext.emptyFn,
listeners : {
'rowselect': function (selectionModel, rowIndex, record){
var valueSelected = record.get ('actionId');
}
}
});


var erroneousActionsGrid = new xg.GridPanel({
id:'erroneousActionsPanel',
layout: 'fit',
store: store,
cm: new xg.ColumnModel([
checkboxSelector,
{header: "Action Name", width: 80, sortable: true , dataIndex: 'actionName'},
{header: "Action Id", width: 30, sortable: true , dataIndex: 'actionId'},
{id:'files',header: "File Id", width: 30, sortable: true , dataIndex: 'fileId', renderer: function (value, metaData, record, rowIndex, colIndex, store) {return '<a href=file/lifeCycleFile/'+ value +'>' + value +'</a>'; }},
{header: "Task Id", width: 30, sortable: true , dataIndex: 'taskId'},
{header: "User Name", width: 50, sortable: true , dataIndex: 'userName'},
{header: "Execute Date", width: 30, sortable: true , dataIndex: 'executeDate', renderer: Ext.util.Format.dateRenderer('Y/m/d H:i:s')}
]),
bbar: actionListPagingBar,
plugins: [{
ptype: 'perpagefield',
beforeText: ''
}],
sm: checkboxSelector,





using CheckboxSelectionModel to select multiple rows

Component DataView not displaying store data

Hi all,

I have a component DataView setup similar to the guide here (non-DataMap):


http://ift.tt/1Fx2bhr


I'm not sure why, but once data is loaded into the store the DataView isn't updated. This isn't a layout: 'fit' issue as I've had this working fine using an XTemplate instead of components. Also 'x-dataview-inner' is completely empty, meaning it's not even attempting to render the data in the store.


At the moment I'm just trying to get the DataView to display something (a button in this case). I'm not actually doing anything with the data yet. The store has 12 records, so I'd expect to see a list of 12 buttons.


Here's my code:


DataView added to a panel in another view:



Code:



this.parent.activity = Ext.create('TestApp.view.shared.Activity', {
username: config.username,
type: 'app',
defaultapp: config.defaultapp
});


this.add(this.parent.activity);

View:


Code:



Ext.define('TestApp.view.shared.Activity', {
extend: 'Ext.dataview.DataView',

requires: [
'TestApp.view.shared.activity.Item',
'TestApp.store.shared.Activity'
],

config: {
defaultType: 'activityitem',
useComponents: true,

layout: {
type: 'fit',
align: 'stretch'
},
width: '100%',
height: '100%',
cls: 'activity',
rendered: false,
listeners: {
painted: function(element) {
if(!this.rendered) {
// Mask view while building components
this.parent.unmask();

// Setup references for parallax effects
this.setupParallax(element);

// Mark view as rendered
this.rendered = true;
}
},
initialize: function(view) {
// Setup parallax effects
this.parallax(view);
}
}
},

constructor: function(config) {
this.store = Ext.create('TestApp.store.shared.Activity', {
type: config.type,
id: config.id ? config.id : false,
username: config.username ? config.username : false,
defaultapp: config.defaultapp,
finished: function() {
if(config.defaultapp) Ext.getCmp('container').hideAppLoadingIndicator();
}
});

this.callParent(arguments);
},

// Add references for parallax effect
setupParallax: function(element) {

},


// Add parallax effects to scroller
parallax: function(view) {

}
});

Item:


Code:



Ext.define('TestApp.view.shared.activity.Item', {
extend: 'Ext.dataview.component.DataItem',
xtype: 'activityitem',
config: {
layout: {
type: 'hbox'
},
items: [
{
xtype: 'button',
text: 'Hello'
}
]
},
updateRecord: function(record) {
me.callParent(arguments);
}
});

Store:


Code:



Ext.define('TestApp.store.shared.Activity', {
extend: 'Ext.data.Store',
requires: ['TestApp.model.shared.Activity'],

config: {
autoLoad: false,
model: 'TestApp.model.shared.Activity',
autoSync: true
},

initialize: function() {
// Set proxy type and proxy ID
this.setProxy({
type : this.config.defaultapp ? 'localstorage' : 'sessionstorage',
id : 'activity-store-' + this.config.type + '-' + this.config.username
});

// Initial load. Records obtained either locally or via an AJAX call (loadData) and refreshed
this.load({
callback: function(records, operation, success) {
if(records.length == 0) this.loadData(false);
else {
// Run callback if it exists
if(this.config.finished) this.config.finished();

// Refresh data
//this.loadData(true)
}
},
scope: this
});
},

loadData: function(update) {
if(update) {
// Show a 'pull-down'-like update animation
}

Ext.Ajax.request({
url: baseUrl + '/api/' + this.config.type + '/activity',
method: 'GET',
scope: this,
params: {
username: this.config.username,
lastdate: update ? this.getLastDate() : false
},
success: function(response){
// Add response data to store
this.add(Ext.JSON.decode(response.responseText));

// Run callback if it exists
if(this.config.finished) this.config.finished();
}
});
},

getLastDate: function() {
// Get all records
var records = this.getRange();

// Sort them!
records.sort(function(a, b){
return new Date(b.data.DateTime) - new Date(a.data.DateTime);
});

// Return DateTime from first record
return records[0].data.DateTime;
}
});





Component DataView not displaying store data

How can i run app.js file

Hello. This app.js start to run when application is up. How can i start this file from code?

Code:



Ext.Loader.setConfig({ enabled: true });

Ext.application({
name: 'ExtMVC',

controllers: [
'Portal'
],

requires: [
'Ext.layout.container.*',
'Ext.resizer.Splitter',
'Ext.fx.target.Element',
'Ext.fx.target.Component',
'Ext.window.Window',
'ExtMVC.view.app.*',
'ExtMVC.view.portal.*',
'ExtMVC.view.portlet.*',
'ExtMVC.view.Viewport',
],

autoCreateViewport: true


});





How can i run app.js file

[FIXED] Row Editor shadow bug



  1. Success! Looks like we've fixed this one. According to our records the fix was applied for

    a bug in our system

    in

    a recent build.







  2. Default Row Editor shadow bug



    Row Editor shadow bug





    Hallo,

    in row editor plugin you the see the shadow bug on the following screenshot:


    ShadowBug.jpg


    The shadow is crashed in case the width of grid is not set.

    In case the grid height is small the shadow, it the content is scrolled and the row editors is hidden by header container.



    Code:



    Ext.application({ name : 'Fiddle',


    launch : function() {
    var store = Ext.create('Ext.data.Store', {
    storeId:'simpsonsStore',
    fields:['name', 'email', 'phone'],
    data: []
    });

    for(var i=0; i<100; i++) {
    store.add({
    "name":"Lisa",
    "email":"lisa@simpsons.com",
    "phone":"555-111-1224",
    age: i
    })
    }
    Ext.create('Ext.grid.Panel', {
    title: 'Simpsons',
    store: store,
    columns: [
    {header: 'Name', dataIndex: 'name', editor: 'textfield'},
    {header: 'Email', dataIndex: 'email', flex:1,
    editor: {
    xtype: 'textfield',
    allowBlank: false
    }
    },
    {header: 'Phone', dataIndex: 'phone'},
    {
    header: 'Age',
    dataIndex: 'age',
    editor:{
    allowBlank:false,
    xtype:'numberfield',
    minValue: 10
    }
    }
    ],
    selModel: 'rowmodel',
    plugins: {
    ptype: 'rowediting',
    clicksToEdit: 1
    },
    height: 200,
    // No Width make shadow bug.
    //width: 400,
    renderTo: Ext.getBody()
    });
    }
    });







    The competent programmer is fully aware of the strictly limited size of his own skull; therefore he approaches the programming task in full humility, and among other things he avoids clever tricks like the plague.













  3. Evan Trimboli

    Sencha Developer

    Twitter - @evantrimboli

    Don't be afraid of the source code!













[FIXED] Row Editor shadow bug

[ExtJS 5.1.0.107 GPL] Bug in Ext.util.Sortable::createComparator method



  1. Thank you for reporting this bug. We will make it our priority to review this report.










  2. Default







    If you have a store with multiple sorters a bug occurs in Ext.util.Sortable::createComparator().

    Code:



    createComparator: function(sorters) {
    return sorters && sorters.length ? function(r1, r2) {
    var result = sorters[0].sort(r1, r2),
    length = sorters.length,
    i = 1;


    for (; !result && i < length; i++) {
    result = sorters[i].sort.call(this, r1, r2); // <--- Bug


    // Correct implementation might look like:
    var sorter = sorters[i];
    result = sorter.sort.call(sorter, r1, r2);
    }
    return result;
    } : function() {
    return 0;
    };
    }














[ExtJS 5.1.0.107 GPL] Bug in Ext.util.Sortable::createComparator method

Can't see Datas in grid second tabpanel despite store loaded

I've a tabpanel with 2 panels.

In the second panel when I load the store the datas are not showed in grid.

It works fine until I have added a second login view before loading my app view.



Code:




region: 'center',
xtype: 'tabpanel',
listeners: {
'tabchange': function(tabPanel, tab){

if (tab.id == 'ongregion') { // pour renseigner les compteurs des grid
if (!storeregion.isLoaded()) {
storeregion.load();
Ext.get('nbregion').setText('Nombre de regions : ' + storeregion.getTotalCount());
Ext.get('nbstockreg').setText('Nombre d\'éléments : ' + storestockregion.getTotalCount());
}
}
}
},



The method to show app view after login :


Code:



success: function(result, action) {
WinLogin.hide();
Ext.get('loading').show();
var mainappli = Ext.create('StockApproApp.view.main.Main');
Ext.widget('app-main');
Ext.get('loading').hide();
}





Can't see Datas in grid second tabpanel despite store loaded

mercredi 25 février 2015

IE8 - View - Text Size doesn't work

Hello,

I have added some component in a cfm page and for business reason the user should be able to modify the text size through the option in IE8. View--> Text Size --> Larger

The text created in HTML does change the text size correctly but the text generated through extjs (a text field label for example) does not change.


Is there an config to activate somewhere to make it work?


Thanks for any help.


Best regards






IE8 - View - Text Size doesn't work

Titlebar not centering title html until element resize.

I have some html set in the "title" attribute of a titlebar, and or some reason the element has the correct width given the buttons on the left and right side, but it isn't centered correctly until I resize the window. I'm sure that this is triggering some redraw on the element.

What I get on init:


2015-02-25_19-30-43.jpg


What I get after window resize (which is correct):


2015-02-25_19-31-47.jpg


Does anyone know a way to force that redraw without resizing the window? I tried removing and re-adding the title bar from the dom but nothing changed. Is some sencha event required?


Thanks!






Titlebar not centering title html until element resize.

grouping components in ext 5

Hi All,

Im looking to develop an app wherein we can group together components like fieldsets, so the app must have the ability to add and delete to a chosen group

Does anyone have any recommendations, code snippets, similar apps,etc

Any help is much appreciated






grouping components in ext 5

Unable to override Ext.data.writer.Json configs



  1. Thank you for reporting this bug. We will make it our priority to review this report.










  2. Default







    There isn't really a bug here. Overrides need to be applied to classes before the instance is first created. In this case, the ext-empty-store is created when the StoreManager loads, which, by default, creates a reader/writer.

    I guess we could fashion it in such a way that it skips the creation of those parts.








    Evan Trimboli

    Sencha Developer

    Twitter - @evantrimboli

    Don't be afraid of the source code!












  3. Default







    Hi Evan,

    I just don't understand why the override works for the Xml writer but not the Json writer.


    Also the example demonstrates the creation of a writer directly without a store.


    Thanks!














  4. Default







    Sorry my bad the fiddle link text is different to the actual link in original post. *Sigh*

    http://ift.tt/1wg6bha




    Updated original post too.















Unable to override Ext.data.writer.Json configs

How to abort a drop event??

Hello, I want to abort a drag & drop when users try to drop to an invalid target in a tree.

I am using GXT3.1, but I think the APIs are the same. How can I achieve it? Thanks.

Here is my attempt, but it does not work.



Code:



target.addDropHandler(new DndDropHandler(){
@Override
public void onDrop(DndDropEvent event) {
// what can I do with a DragEndEvent ?
DragEndEvent endEvent = event.getDragEndEvent();

event.getStatusProxy().setStatus(false);
System.out.println("drop!");
}
});





How to abort a drop event??

addCls() on ListItem

I'm attempting to style a ListItem within a List control. I want each instance of the ListItem to have the CSS class 'LPNListItem'. But none of the following approaches apply the 'LPNListItem' CSS class to *any* node in the DOM:

Code:



Ext.define('ptl.view.LPNListItemRenderer', {
extend: 'Ext.dataview.component.ListItem',
xtype: 'LPNListItemRenderer',
config: {
cls: 'LPNListItem',
...



Code:



Ext.define('ptl.view.LPNListItemRenderer', {
extend: 'Ext.dataview.component.ListItem',
xtype: 'LPNListItemRenderer',
cls: 'LPNListItem',
......



Code:



updateRecord: function(record) {
var me = this;
me.addCls('LPNListItem');
this.callParent(arguments);
...






addCls() on ListItem

Animate slideOut for titlebar+toolbar while smoothly adjusting contents

I see some google search results for this question but none seem to answer it accurately. I have a view that uses a titlebar and a toolbar, and want to slide them out of view (titlebar:up, toolbar:down) while smoothly adjusting the rest of the view to fit. Is this possible?

For example I read the Ext.Anim source code and there is no way to use a frame render callback on the animation. Plus those animations seem to be choppy/buggy for these objects anyway.


Thoughts? Thanks!







Animate slideOut for titlebar+toolbar while smoothly adjusting contents

tabpanel setActivePanel(n) does not fire tabchange for activeTab = n setting in view

The .setActiveTab(n) function does not fire a tabchange event for the tab which equals

activeTab: n


in the Ext.tab.Panel view.


All other tabs work as documented and so the tabchange gets fired.


I've solved this by setting activeTab: -1 in the view config, which lets all the tabs fire.


I'm using ext-4.2.2.1118


Could this be a bug?


I don't think I had this problem with earlier ext versions.






tabpanel setActivePanel(n) does not fire tabchange for activeTab = n setting in view

Kee inside form when tabbing - how?

I have a form that opens inside an Ext.window.MessageBox.

The form has some fields, and a toolbar at the bottom with an 'Ok' and a 'Cancel'-button.

When the form opens, focus is placed in the first input-field.

If i press the TAB-key, it correctly advances to the next field. Keep pressing TAB and I reach the first button in the toolbar.


But then if I press TAB again,focus goes to the browsers address-field. I would very much like it to go back to the first input-field of the form. Is that possible?


-mads






Kee inside form when tabbing - how?

How to make combobox revert when user input does not match items in store?

I have a combobox with the following configs:

queryMode: 'remote',

forceSelection: true,

editable: true,

autoSelect: true


the following configs are data bound:


store,

value,

selection,

emptyText


if the user types a value into the field that does not match something in the store and loses focus, the box clears. I would like for the box to revert to the last valid selection in this case. Is there a config I am not setting or anything I can do to make the box display the last valid selection?






How to make combobox revert when user input does not match items in store?

GXT ignores user.agent

When I run my GWT 2.6 + GXT 3.1.1 project in "Super Dev Mode", compilation with the code server ignores bindings of user.agent (such as user.agent=safari). As a result, it builds more permutations than necessary and it can't load the source map ("java.lang.RuntimeException: Multiple fragment 0 sourcemaps found. Too many permutations."). If instead you specify a value for gxt.user.agent, it compiles only one permutation, as desired.

Why is this? What can I do about it?







GXT ignores user.agent

Multitouch possibilities with SenchaTouch

[unable to retrieve full-text content]Hi, I have a question regarding SenchaTouch. To which extend does SenchaTouch have multitouch possibilities? I saw that there is a pinch, swipe...



Multitouch possibilities with SenchaTouch

How to remove/clear selection from Ext.grid.Panel

[unable to retrieve full-text content]Hello, Which is the right way to clear Ext.grid.Panel's selection? I've tried: Code: --------- myGrid.getSelectionModel().deselectAll()...



How to remove/clear selection from Ext.grid.Panel

Documentation: 'sort' event of Store is not documented



  1. Thank you for reporting this bug. We will make it our priority to review this report.







  2. Default Documentation: 'sort' event of Store is not documented



    Documentation: 'sort' event of Store is not documented





    In class Ext.data.Store the 'sort' event is not documented.

    Ext JS 4.2.3.

    It is fired by Ext.data.Store.doSort().


    Note:

    In Ext JS 5.1.0 it is documented (although with the wrong signature): sort.















Documentation: 'sort' event of Store is not documented

layout crashes on panel collapse/expand responsiveConfig

My application which was recently migrated to Ext JS 5.1.0 from 4.1.1 is showing a random issue,

on panel collapse/expand the layout fails. the issue ia random. might appear on the second expand /collapse. or the following ones.

It shows the following error in console:

Uncaught TypeError: Cannot read property 'getStyle' of null


Attaching screen shot of the error in console.

Attaching screenshots of the UI.


I have used border layout for viewport.

The problem panel is in the center region panel. This panel has a 'responsive' plugin which changes it to a collapsible panel in devices other than desktop.

Following is the code for the view.



Code:



Ext.define('XX.view.report.agency.CampaignReportPanel', { extend : 'Ext.panel.Panel',
border : false,
xtype : 'campaignreportpanel',


initComponent : function() {
var prevMonthDate = new Date();
prevMonthDate.setMonth(prevMonthDate.getMonth() - 1);
var accountStore = Ext.create('Ext.data.Store', {
model : 'XX.model.Account',
proxy : this.accountStoreProxy,
listeners : {
load : function() {
accountStore.insert(0, {
id : -1,
title : Ext.getStore('MessageResources').getMessage('CAMPAIGN_REPORT_ALL')
});
}
}
});


var cgTypes = XX.controller.CreativeGroup.prototype.getSupportedTypesObjectArray(false);
var channelTypeStore = Ext.create('Ext.data.Store', {
fields : ['id', 'displayField'],
data : cgTypes
});
var campaignStore = Ext.create('Ext.data.Store', {
model : 'XX.model.Campaign',
remoteFilter : true,
filters : [{
property : 'accountId',
type : 'numeric',
operator : 'eq',
value : 0
}, {
property : 'stateId',
type : 'numeric',
operator : 'ne',
value : 0
}],
proxy : this.campaignStoreProxy,
listeners : {
load : function() {
campaignStore.insert(0, {
id : -1,
name : Ext.getStore('MessageResources').getMessage('CAMPAIGN_REPORT_ALL')
});
}
}
});
var campReportView = function(field, value, options) {
var goButton = this.down('button[itemId=goButton]');
goButton.fireEvent('click', goButton);
};
this.items = [{
xtype : 'panel',
title : Ext.getStore('MessageResources').getMessage('REPORT_CAMPAIGN_REPORT'),
frame : true,
name : 'collapsepanel',
plugins : 'responsive',
responsiveConfig : {
'desktop' : {
collapsible : false,
collapsed : false
},
'!desktop' : {
collapsible : true,
collapsed : true
}
},
items : [{
xtype : 'toolbar',
dock : 'top',
flex : 1,
plugins : 'responsive',
responsiveConfig : {
'!desktop' : {
layout : {
type : 'vbox',
align : 'left'
}
}
},
defaults : {
padding: 3
},
items : [{
xtype : 'combobox',
store : accountStore,
fieldLabel : Ext.getStore('MessageResources').getMessage('CAMPAIGN_ACCOUNT'),
forceSelection : true,
labelAlign : 'right',
name : 'accountscombo',
displayField : 'title',
valueField : 'id',
queryMode : 'remote',
triggerAction : 'all',
listeners : {
select : function(field, value, options) {
var container = field.up('toolbar');
container.down('combobox[name=campaigncombo]').reset();
var accountFilterIndex = -1;
Ext.Array.forEach(campaignStore.getFilters().items,function(filter,i){
if(filter.getProperty() === 'accountId'){
accountFilterIndex = i;
}
});
if (accountFilterIndex === -1) {
campaignStore.filters.add({
property : 'accountId',
type : 'numeric',
operator : 'eq',
value : field.getValue()
});
} else {
/*jslint nomen: true*/
campaignStore.filters.getAt(accountFilterIndex)._value = field.getValue();
/*jslint nomen: false*/
}
var campaignCombo = container.down('combobox[name=campaigncombo]');
campaignCombo.lastQuery = null;
var localCampaignStore = Ext.create('Ext.data.Store', {
model : 'XX.model.Campaign',
remoteFilter : true,
filters : [{
property : 'accountId',
type : 'numeric',
operator : 'eq',
value : field.getValue()
}, {
property : 'stateId',
type : 'numeric',
operator : 'ne',
value : 0
}],
proxy : this.campaignStoreProxy,
listeners : {
load : function() {
localCampaignStore.insert(0, {
id : -1,
name : Ext.getStore('MessageResources').getMessage('CAMPAIGN_REPORT_ALL')
});
campaignCombo.select(localCampaignStore.getById(-1));
}
}
});
localCampaignStore.on('load', function() {
if (localCampaignStore.getAt(0)) {
var campaign = localCampaignStore.getAt(0);
campaignCombo.store.loadData([campaign]);
campaignCombo.setValue(campaign.get('id'));
campaignCombo.fireEvent('select', campaignCombo, campaign, null);
}
});
localCampaignStore.load({
limit : 1
});
if (this.eventFiredOnce) {
campaignCombo.un('select', campReportView, this, {
single : true
});
}
this.eventFiredOnce = true;
},
scope : this
}
}, {
xtype : 'tbspacer',
width : 5
}, {
xtype : 'combobox',
store : campaignStore,
forceSelection : true,
name : 'campaigncombo',
fieldLabel : Ext.getStore('MessageResources').getMessage('CREATIVE_GROUP_CAMPAIGN'),
labelAlign : 'right',
displayField : 'name',
valueField : 'id',
queryMode : 'remote',
triggerAction : 'all'
}, {
xtype : 'combobox',
name : 'channelCombo',
forceSelection : true,
store : channelTypeStore,
fieldLabel : Ext.getStore('MessageResources').getMessage('CREATIVE_GROUP_TYPE'),
labelAlign : 'right',
queryMode : 'local',
valueField : 'id',
displayField : 'displayField'
}]
}, {
xtype : 'toolbar',
layout : 'hbox',
dock : 'top',
flex : 1,
plugins : 'responsive',
responsiveConfig : {
'!desktop' : {
layout : {
type : 'vbox',
align : 'left'
}
}
},
defaults : {
padding: 3
},
items : [{
xtype : 'datefield',
value : Ext.Date.add(new Date(), Ext.Date.DAY, -(30)),
fieldLabel : Ext.getStore('MessageResources').getMessage('REPORT_FROMDATE'),
labelAlign : 'right',
format : 'd/m/Y',
name : 'fromdate'
}, {
xtype : 'tbspacer',
width : 10
}, {
xtype : 'datefield',
fieldLabel : Ext.getStore('MessageResources').getMessage('REPORT_TODATE'),
labelAlign : 'right',
value : Ext.Date.add(new Date(), Ext.Date.DAY, -(1)),
format : 'd/m/Y',
name : 'todate',
maxValue : Ext.Date.add(new Date(), Ext.Date.DAY, -(1))
}]
}, {
xtype : 'toolbar',
layout : 'hbox',
dock : 'top',
flex : 1,
items : [{
xtype : 'button',
text : Ext.getStore('MessageResources').getMessage('REPORT_DAILY'),
toggleGroup : 'metricbutton',
pressed : true,
enableToggle : true,
allowDepress : false,
name : 1
}, {
xtype : 'button',
text : Ext.getStore('MessageResources').getMessage('REPORT_WEEKLY'),
toggleGroup : 'metricbutton',
enableToggle : true,
allowDepress : false,
name : 2
}, {
xtype : 'button',
text : Ext.getStore('MessageResources').getMessage('REPORT_MONTHLY'),
toggleGroup : 'metricbutton',
enableToggle : true,
allowDepress : false,
name : 3
}, {
xtype : 'tbspacer',
width : 10
}, {
xtype : 'button',
itemId : 'goButton',
autoHeight : true,
text : Ext.getStore('MessageResources').getMessage('REPORT_GO_BUTTON')
}]
}]
}];
this.callParent();
this.on('afterrender', function(component) {
var channelCombo = component.down('combobox[name=channelCombo]');
var firstRec = channelCombo.store.getAt(0);
if (firstRec) {
channelCombo.setValue(firstRec);
}
});
var campaignCombo = this.down('combobox[name=campaigncombo]');
campaignCombo.on('select', campReportView, this, {
single : true,
delay : 100
});
}

});

Please help.






layout crashes on panel collapse/expand responsiveConfig

I can't select item when i load my store

Hello, Sorry my english is so bad lol !

My grid panel :



Code:



new Ext.grid.GridPanel({
title: "Utilisateurs",
layout: 'fit',
style: marginElement,
columns: mesColonnesUtil,
id: 'gridPanelUtil',
width: '70%',
colspan:2,
collapsible: false,
layout: 'fit',
autoWidth: true,
monitorResize: true,
height: 200,
store: storeUtil,
stripeRows: true,
selModel: new Ext.grid.RowSelectionModel({
singleSelect: true
}),
listeners: {
click: function () {
this.selModel.getSelected();


}
}
}),

My store :


Code:



var storeUtil = new Ext.data.JsonStore({ proxy: proxyGrUtil,
baseParams: { method: 'storeUtil', gr: '' },
autoLoad: true,
fields: ["Nom", "Prenom", "LDAPUser"],
root: "rows",
totalProperty: "total",
successProperty: "success"
});

My combobox with select event, i load my grid panel with params :


Code:



xtype: 'combo',
store: storeGrUtil,
id: 'comboGrUtil_GrUtil',
width: 300,
valueField: "id",
displayField: "lib",
triggerAction: 'all',
mode: 'local',
listeners: {
select: function () {
Ext.getCmp('gridPanelUtil').store.load({
params: {
gr: Ext.getCmp('comboGrUtil_GrUtil').getValue() // this the value of items selected combobox
}
});

After this event, I can't select a row in my grid panel, why ?

I don't understand.

Help me please.

Pour les français qui passerais pas là :

J'ai un grid panel, que je recharge après que j'ai sélectionné un élément dans ma combobox.

Mais après cela, je ne peut plus sélectionner de ligne dans mon grid panel, je ne comprend pas pourquoi.

Merci !






I can't select item when i load my store

Focus after expanding combo



  1. Thank you for reporting this bug. We will make it our priority to review this report.







  2. Default Focus after expanding combo



    Focus after expanding combo





    Hello.

    Please open example: http://ift.tt/1Gt0uCH

    Test case:

    1. Expand combo "Open ME"

    2. Click in combo "Focus ME".


    Blue border added to combo "Focus ME". In result both combos has blue border.


    Result:


    bug.png















Focus after expanding combo

Same file shared across 2+ projects

Hi,

I would like to have the same file(s) shared across multiple projects. Therefore, when one updates, the others do to. I have achieved this by creating symbolic links off of the master copy.


The master copy is updated in Architect as part of a project.


In the other projects, Architect does not pick up the changes to the files, as I believe there are additional meta data files that need to also be kept up to date.


What else do I need to do to allow this to work?


Thanks!






Same file shared across 2+ projects

mardi 24 février 2015

Old filters still exists when binding 'filters' config of the store



  1. Thank you for reporting this bug. We will make it our priority to review this report.







  2. Default Old filters still exists when binding 'filters' config of the store



    Old filters still exists when binding 'filters' config of the store





    Hello.

    Seems that there is bug when binding 'filters' config option of the store via viewmodel like this:



    Code:



    viewModel: {
    stores: {
    testStore: {
    type: 'mystore',
    filters : '{filtersFormula}'
    },
    formulas: {
    filtersFormula: {
    ...
    }
    }
    }
    }

    Fiddle: http://ift.tt/1wn0vYq

    Please inspect console 'filterchange' log message after changing 3 times of the combo. All filters still exists.

    The next override can help to solve this issue:



    Code:



    Ext.define('Spa.override.data.AbstractStore',{
    override: 'Ext.data.AbstractStore',
    applyFilters: function (filters, filtersCollection) {
    if (filtersCollection) filtersCollection.clear();
    return this.callParent(arguments);
    }
    });














Old filters still exists when binding 'filters' config of the store

ListItem is somehow disabled again after call to enable()

So far I have this working with the code below, but when I call "me.enable()" from ListItem.updateRecord(), the dom element looks enabled (x-deckitem-disabled class is removed, isDisabled() returns false), but the item is being re-enabled somewhere after the call to updateRecord().


Can I prevent the item from being disabled? Is there a better way to do this? Possibly to bind the list item's enabled/disabled state to the 'isPurchased' value in the model?



Code:



Ext.define('Deck', {
extend: 'Ext.data.Model',
config: {
fields: ['edition_title', 'game_title', 'sku', 'isPurchased', 'cards']
}
});

Ext.define('Speakeasy.view.DeckItem', {
extend: 'Ext.dataview.component.ListItem',
alias: 'widget.deckitem',
config: {
layout: {
type: 'vbox',
pack: 'justify',
// align: 'center',
},
hideAnimation: 'slideOut',
disabled: true,
items: [
{
xtype: 'component',
itemId: 'titleCmp',
__itemTpl: new Ext.XTemplate(
'<tpl for=".">',
'<tpl if="isPurchased">',
'<span class="deck-price">{price}</span>',
'</tpl>',
'</tpl>'
),
docked: 'left'
},
{
cls: 'buy-button-container',
xtype: 'container',
docked: 'right',
items: [
{
xtype: 'button',
text: 'Buy',
itemId: 'buy-button',
cls: 'buy-button',
hideAnimation: 'fadeOut',
showAnimation: 'slideIn',
handler: function(x, e) {
var sku = this.up('deckitem').getRecord().get('sku');
decksController.Purchase(sku);
e.stopEvent();
}
}
]
}
]
},
updateRecord: function(record) {
var me = this;
var buyButton = me.down('#buy-button');
if(record.get('isPurchased')) {
buyButton.hide();
if(me.isDisabled())
me.enable();
} else {
buyButton.show();
if(!me.isDisabled())
me.disabled();
}


if(record.get('price')) {
buyButton.setText(record.get('price'));
} else {
buyButton.setText(buyButton.getInitialConfig('text'));
}


me.callParent(arguments);
}
});


Ext.define('Speakeasy.view.Decks', {
extend: 'Ext.List',
xtype: 'decks',
alias: 'widget.decksview',
requires: [
'Ext.TitleBar',
'Ext.data.Store'
],
config: {
id: 'decksview',
itemId: 'decksview',
tabBarPosition: 'bottom',
layout: {
type: 'fit'
},
defaultType: 'deckitem',
// useComponents: true,
grouped: true,
store: {
model: 'Deck',
sorters: 'game_title',
fields: ['sku', 'edition_title', 'game_title'],
grouper: {
groupFn: function(record) {
var title = record.get('game_title');
if(title.split(' ')[0].toLowerCase().indexOf('the') == 0) {
return title.split(' ')[1][0];
} else {
return title[0];
}
}
},
data: Speakeasy.DECKS_LIST
},


itemTpl: '{game_title}',


items: [
{
docked: 'top',
xtype: 'titlebar',
title: 'Speakeasy',
// items: {
// xtype: 'button',
// text: 'Log Off',
// itemId: 'logOffButton',
// align: 'right'
// }
}
],


listeners: [
{
delegate: '#logOffButton',
event: 'tap',
fn: 'onLogOffButtonTap'
}
]
},


initialize: function() {
this.callParent(arguments);
// this is here to still allow a click to the child buy button
this.addBeforeListener('select', function(list, model, x, y, z) {
if(model.get('isPurchased') == false)
return false;
});
},


onLogOffButtonTap: function() {
this.fireEvent('signOffCommand');
}
});





ListItem is somehow disabled again after call to enable()

Remove row from a treegrid

I have a treegrid exactly like the Kitchen Sink Tree Grid example:

http://ift.tt/1agf7yT

t


his grid actually extends Ext.tree.Panel and uses Ext.data.TreeStore

So how can I remove a row? With a regular grid using Ext.data.Store I can just get the selected row using SelectionModel().getSelection() and pass the returned record into the store.remove( ) but I dont see any such method for a treestore.


thanks..







Remove row from a treegrid

development life-cycle with CMD

How do you detect a change in a sortable list?

Hello,

I am using a list with the sortable list plugin. I am able to reorder the list. But, I am unable to detect or get the updated order of the list. I have yet to find away after googling for 4 hours. Using hand coded sencha touch I could listen for the 'dragsort' event. I have yet to find away to add it to architect. Any help will be appriciated.


Thanks






How do you detect a change in a sortable list?

Extjs 5.1.0: Grouped Column Chart Renderer does not fill the colors as wanted


Code:



{
xtype: 'cartesian',
height: 250,
width: 400,
insetPadding: 20,
store: 'GroupChartStore',
theme: 'Base:gradients',
axes: [
{
type: 'category',
fields: [
'week'
],
label: {
rotate: {
degrees: 315
}
},
title: 'Week End',
position: 'bottom'
},
{
type: 'numeric',
fields: [
'red',
'yellow',
'green'
],
majorTickSteps: 4,
position: 'left',
title: 'Number of Occurences'
}
],
series: [
{
type: 'bar',
renderer: function(sprite, record, attributes, index, store) {
var fields = ['red','yellow','green']; // This array is the same as yField config of the series
var theFill = fields[index % fields.length]; // Get the name of the field being rendered based on the column index
return Ext.apply(attributes,{
fill: theFill // Apply the color
});
},
label: {
field: [
'red',
'yellow',
'green'
],
display: 'insideEnd',
orientation: 'horizontal'
},
xField: 'week',
yField: [
'red',
'yellow',
'green'
],
stacked: false
}
]
}

Hi,

I have a grouped column chart with renderer to fill the colors of each column separately. My renderer is working fine in Extjs 4.2; however, when I upgraded to Extjs 5.1, it does not work anymore. I want the 1st column to color as 'red', 2nd column as 'yellow', and 3rd column as 'green' for each of the data point in the chart. However, I only get 1 color (either 'red', 'yellow', or 'green') for all three columns in each of the data point (a group of 3 columns).

Please help me if you can. My renderer function is in above code block for you to see.

Thanks so much for your help!

-Dong






Extjs 5.1.0: Grouped Column Chart Renderer does not fill the colors as wanted

custom attributes with architect

how do I create the following custom attribute (mnuContext) in my view controller class using architect?

Code:



Ext.define('SolarUI.view.case.CaseViewController', {
extend: 'Ext.app.ViewController',
alias: 'controller.casesCtrl',

.
.
.
.
mnuContext: new Ext.menu.Menu({
items: [{
id: 'do-something',
text: 'Do something'
}],
listeners: {
itemclick: function(item) {
switch (item.id) {
case 'do-something':
break;
}
}
}
}),

showView: function(view) {
.
.
.
.
},



when trying with architect by adding a custom property I get the following mess:

Code:



config: {
mnuContext: 'new Ext.menu.Menu({\n items: [{\n id: \'do-something\',\n text: \'Do something\'\n }],\n listeners: {\n itemclick: function(item) {\n switch (item.id) {\n case \'do-something\':\n break;\n }\n }\n }\n })'
},





custom attributes with architect

process for creating right-click context menu on grid using architect

Does anyone have a clue on what the process for adding a grid right-click context menu using architect? I can set it up just fine without architect.

I can add the context menu listener using architect resulting in the following:


in grid panel code



Code:



listeners: {
itemcontextmenu: 'onGridpanelItemContextMenu'
},



in view controller code:



Code:



onGridpanelItemContextMenu: function(dataview, record, item, index, e, eOpts) {
e.stopEvent();
mnuContext.showAt(event.xy);
},

Now how do i create the following custom menu attribute in my view controller?

Code:



var mnuContext =newExt.menu.Menu({ items:[{ id:'do-something', text:'Do something'}], listeners:{ itemclick:function(item){switch(item.id){case'do-something':break;}}}});


basically, how can/should I create any custom attribute/property inside a class managed by architect?

Thanks in advance for any help.






process for creating right-click context menu on grid using architect