sencha-touch-2

Cookie not saved in sencha touch 2 application

旧城冷巷雨未停 提交于 2019-12-04 18:10:55
Upon receiving a server response with valid "set-cookie" value in my response header, application does not save the cookie. Rails server on heroku is setup for CORS (cross domain ajax requests). Access-Control-Allow-Credentials = True and methods = POST, GET. Login request, for which the response contains set-cookie, is as follows: Ext.Ajax.request({ url: 'http://myurl/log_user_in.json', params: { username: user, password: pass, app_id: id }, method: "POST" }); Need help on why the application does not save the cookie. ie. executing document.cookie , after getting "set-cookie" results in

Listener to Tab Item Click in Sencha

蹲街弑〆低调 提交于 2019-12-04 16:33:44
In my application, I'm using a tab panel with 5 items in it. Each item holds around 6 panels added in card layout. When I'm at the last panel inside a tab item, I need to get back to the initial panel by clicking on the bottom tab panel (somewhat similar to a normal tab view controller in iOS). I have came across some solutions I found here , but it seems to work only when I switch between the tabs. In fact I want to listen to the click event on the same tab icon. How can I do this? I have worked on your problem. I think this is exactly what you want. Hope this helps. If not so, please leave a

Navigation View Sencha Touch 2

家住魔仙堡 提交于 2019-12-04 15:37:12
I have a problem with my NavigationView in Sencha Touch 2. When I push the 'back' button, then I can't navigate more than one window. I navigate using view.push() and view.pop(). view.js: Ext.define('MyApp.view.view', { extend: 'Ext.navigation.View', alias: 'widget.View', config: { id: 'nvView', items: [ { xtype: 'toolbar', docked: 'bottom', layout: { align: 'center', pack: 'center', type: 'hbox' }, items: [ { xtype: 'button', iconAlign: 'center', iconCls: 'info', iconMask: true, text: 'Ayuda' }, { xtype: 'button', iconAlign: 'center', iconCls: 'compose', iconMask: true, text: 'Guardar' }, {

how to animate transition from right to left on Sencha Touch 2?

微笑、不失礼 提交于 2019-12-04 14:47:54
问题 I want to animate the transition when a card is activate on a Panel. any idea please? The main.setActiveItem(1) is changing the card but I want to animate the transition from right to left (not the default from left to right) I have this function: buttonBackImageDetalle: function(button, e, options) { var main = this.getMain(); //Ext.fx.Animation.setDirection('right'); main.setActiveItem(1); console.log('<-- back'); } Thanks for your time! 回答1: Try this: main.animateActiveItem(1, {type:

Sencha list scrolling with keyboard

无人久伴 提交于 2019-12-04 14:16:57
问题 I am using sencha list in my application. It is a scrollable list. I want to scroll the list by up , down key and hand gesture in keyboard. Does anyone know how to do it? Please help me. This is my code: { xtype: 'list', pinHeaders: false, variableHeights: false, itemTpl: '<div>' + '<div>{name}</div>' + '</div>', store: 'myStore', grouped: true, onItemDisclosure: true } 回答1: Check out this fiddle https://fiddle.sencha.com/#fiddle/53t You can add a document eventlistener on keydown event in

How to properly activate an MVC View in Sencha Touch V2

我只是一个虾纸丫 提交于 2019-12-04 13:41:07
I'm running Sencha Touch V2 beta and I'm looking at the most recent documentation . I've followed the Ext.application instructions and am trying to properly lay out my MVC application. Unfortunately I can't figure out how to actually load up a View with this approach. index.js Ext.application({ name: 'rpc', defaultUrl: 'home/index', controllers: ['home'], //note: define controllers here launch: function () { console.log('Ext.application ~ launch'), Ext.create('Ext.TabPanel', { id: 'rpc-rootPanel', fullscreen: true, tabBarPosition: 'bottom', items: [{ title: 'Home', iconCls: 'home' }] }); Ext

Add (right) Button to Sencha Navigation View

匆匆过客 提交于 2019-12-04 13:26:33
问题 I want to dynamically add a (right aligned) button to the active navigation view depending on view Im showing. Is there any proper way to do it? I found many half good examples online, but didnt get them to work. Here is what I tried: Ext.define('Sencha.view.user.Login', { extend:'Ext.navigation.View', //fullscreen: true, xtype: 'loginview', requires:[ 'Ext.form.FieldSet', 'Ext.field.Email', 'Ext.field.Password' ], config: { title: 'Log in', iconCls: 'use', cls: 'kidsbackground', scrollable:

Authentication on Sencha Touch and remote Server

被刻印的时光 ゝ 提交于 2019-12-04 13:01:14
问题 I would like to have your feedback regarding Authentication mechanism for an Application using PhoneGap and Sencha Touch and a Server in .NET with Active Directory. So we need to store User credentials on the Mobile Device so a User does not have to re-enter Login and Psw, every time he wish to use the application. 01 - IDEA - Cookies For my understanding Sencha Touch does not have directly any libraries for managing Cookies. In order to use cookies I should install "Sencha Ext Js" the base

Sencha Touch 2.2.0 loads very slowly. Is it normal?

北城以北 提交于 2019-12-04 11:57:48
I am new to Sencha Touch. I have set up page from the examples. However it loads very slowly. Is it normal? What can be done to decrease the load time? Here is the page http://m.odtu.lu/odtu/ As @TDeBailleul said, you need to minify & aggregate project JS files to get it load fast because loading time is directly proportional to number of bytes transferred and number of requests triggered. Sencha Cmd provides the tool to minify & package your app for batter performance using this command : sencha app build package Since you are new to Sencha touch, spend good time in understanding Sencha Cmd

Button inside of an input field Sencha Touch 2.0

和自甴很熟 提交于 2019-12-04 10:58:56
What I try to achieve is something alike this: Only then in a Sencha Touch application. I have achieved an input field with a button next to it but not a button inside of a input field. Is there a way to get this functionality in Sencha Touch 2? (without using css to float the button above the input. you can achieve this, let's try: { xtype: 'textfield', component: { xtype: 'container', layout: 'hbox', items: [ { xtype: 'textfield', flex: 3, }, { xtype: 'button', flex: 1, text: 'test' } ]}, }, Explanation : component is a special config for input fields and by default, it's set to {xtype: