sencha-touch

How to link buttons in toolbar in Sencha touch?

不羁岁月 提交于 2019-12-23 03:40:14
问题 I have multiple buttons loading up in the button toolbar I need those buttons to go to different links. However, I have not been able to figure it out. Below is what I tried to do but it does not work. //Below are three buttons that need to go to three different links var buttonsGroup1 = new Ext.Button({ text: 'MESSAGES', handler: tapHandler }); var buttonsGroup2 = new Ext.Button({ text: 'HOLDS', handler: tap2Handler }); var buttonsGroup3 = new Ext.Button({ text: 'FINANCIALS', handler:

How can I create a resizeable text area in Sencha Touch?

雨燕双飞 提交于 2019-12-23 03:21:33
问题 I have an application in Sencha Touch where I have a textareafield. In Chrome, this is resizeable, but not when using an iPhone (I haven't tried on an Android device). I need to have a text input area where people can enter text anything from one or two words long to many sentences. So I need this to either automatically resize ; have some way of manually resizing it; or some way of scrolling within it. So far I have been unable to do any of these with Sencha Touch. I would really appreciate

Page Navigation in Sencha Touch?

感情迁移 提交于 2019-12-23 02:43:34
问题 I am new to Sencha Touch, and wonder how page navigation works. so far, the best i found was something like: var redirect = 'page2.html'; window.location = redirect; and to prevent unnecessary fetching, cache all .js and style using app.manifest. Any recommendation? Is there a way similar to page navigation in JQuery mobile? 回答1: As far as I'm aware, Sencha Touch does not support page navigation the way jQuery mobile does. If you really have to redirect (and make a page refresh), then I

how to manage custom layouts in sencha touch 2

自作多情 提交于 2019-12-23 01:58:12
问题 Hi I'm working on the following panel: Ext.define("GS.view.BoxesPanel", { extend : 'Ext.dataview.component.DataItem', xtype : 'boxesPanel', alias : "widget.boxespanel", config : { xtype : 'panel', layout : 'vbox', width : '60%', align : 'center', items : [{ xtype : 'panel', flex : 2, layout : 'hbox', height : '70%', margin: '10 10 10 10', items : [{ xtype : 'panel', flex : 1, items : [] }, { xtype : 'panel', flex : 1, layout : 'vbox', items : [] }, { xtype : 'panel', flex : 1, layout : 'vbox'

Tap event for Ext.carousel.Carousel

廉价感情. 提交于 2019-12-23 00:48:56
问题 There seems to be no tap event for Ext.carousel.Carousel. How can I make a carousel respond to tap events? (tap, itemtap etc.) 回答1: Tap events do not work on the components directly. Instead they work fine on component's element. So, for your case you can use it like this: In your controller's "control", control : { // Your carousel reference "carousel" : { initialize : function(carousel){ carousel.element.on('tap', function(e, el){ // Here you will get the target element console.log(e.target

When ever app does ajax request i want to add load mask

醉酒当歌 提交于 2019-12-22 17:29:11
问题 In my sencha application, When ever app does ajax request i want to add load mask and after request complete i need to remove load mask. I tried below code but, its not working for me var mask = new Ext.LoadMask(Ext.getBody(), {msg:"Loading..."}); Ext.Ajax.on('beforerequest', function(){ mask.show(); }); Ext.Ajax.on('requestcomplete', function(){ mask.hide(); }); 回答1: To show load mask you can use: Ext.Viewport.mask({ xtype: 'loadmask' }); And hide the load mask inside the success function of

Login screen only first time in native app in sencha

余生长醉 提交于 2019-12-22 17:08:31
问题 i am working on a native app in sencha touch . i want to create a login view which should be visible only first time. any suggestion how to solve it. Activation.js Ext.define('FOS.view.Activation', { extend: 'Ext.form.Panel', alias: "widget.activationview", requires: ['Ext.form.FieldSet', 'Ext.form.Password', 'Ext.Label', 'Ext.Img', 'Ext.util.DelayedTask'], config: { title: 'Login', items: [ { xtype: 'label', html: 'Activation failed. Please enter the correct credentials.', itemId:

Sencha Touch: Clicking a button rapidly will push a view twice

旧巷老猫 提交于 2019-12-22 10:55:27
问题 Say I have a button that triggers a push of a new view. I noticed that if I click it more than once, fast enough, it will push the same view twice. You can mimic this behavior using their official docs on this page, where they have a live sample: http://docs.sencha.com/touch/2-0/#!/guide/navigation_view the clear question is, simply how to prevent it? 回答1: Masking successfully prevents double tapping problem. In my code I'm using two functions for mask/unmask navigation container: /** * Mask

JavaScript error when running an application example in Sencha Touch 2.2.1

对着背影说爱祢 提交于 2019-12-22 10:39:31
问题 I am starting to develop a mobile application with the lastet Sencha Touch 2.2.1 on Windows 8. I did the following steps in http://docs.sencha.com/touch/2.2.1/#!/guide/getting_started. I started a HTTP Server with command: sencha fs web -port 8000 start -map [dir_name] . When I have opened an application example at http://localhost:8000/examples/ , it showed properly then I clicked some list. Chrome showed white screen page and error messages in the console: Uncaught TypeError: Cannot read

Getting a loaded store in extjs4

北城余情 提交于 2019-12-22 10:29:06
问题 I am getting null while I try to obtain a loaded store from the controller. The load is a successful one too. I verified that. I have the store as follows. Ext.define('GridApp.store.schemedatastore',{ extend: 'Ext.data.Store', model: 'GridApp.model.schemedatamodel', autoLoad: true, alias: 'store.schemedata', storeId: 'schemedatastoreid', constructor:function(){ console.log('Calling parent'); this.callParent(arguments); }, listeners: { load:function(store,records,isSuccessful){ if(isSuccessful