MY sencha touch funziona perfettamente in tutti i browser, tuttavia quando salvi l'url sulla schermata principale dell'iPad. Non verrà caricato e mostra solo una schermata vuota. Non ricevo errori JS e non viene visualizzato nulla durante il debug. Heres un campione della app:Sencha Touch non in fase di inizializzazione
script type="text/javascript">
var rootPanel;
if (navigator.userAgent.match(/iPad/i)) {
viewport = document.querySelector("meta[name=viewport]");
viewport.setAttribute('content', 'width=980');
}
Ext.application({
launch: function() {
var contactForm = Ext.create('Ext.form.FormPanel', {
standardSubmit: true,
fullscreen: true,
items: [{
xtype: 'titlebar',
title: 'My App',
docked: 'top'
}, {
xtype: 'fieldset',
items: [{
xtype: 'textfield',
name: 'LoginName',
label: 'Login Name:'
}, {
xtype: 'passwordfield',
name: 'Password',
label: 'Password:'
},
{
xtype: 'hiddenfield',
name: 'ReturnUrl',
value: '/returnUser.html'
}] // items
}, {
xtype: 'toolbar',
layout: {
pack: 'center'
}, // layout
ui: 'plain',
items: [{
xtype: 'button',
text: 'Reset',
ui: 'decline',
handler: function (btn, evt) {
Ext.Msg.confirm('', 'Are you sure you want to reset this form?', function (btn) {
if (btn === 'yes') {
contactForm.setValues({
LoginName: '',
Password: ''
}); // contactForm()
} // switch
}); // confirm()
}
}, {
xtype: 'button',
text: 'Submit',
ui: 'confirm',
handler: function (btn, evt) {
var values = contactForm.getValues();
contactForm.submit({
url: 'Login',
method: 'POST',
waitTitle: 'Connecting',
waitMsg: 'Sending data...',
success: function (form, result) {
Ext.Msg.alert('Login succeeded!', result.response.reason);
},
failure: function (form, result) {
Ext.Msg.alert('Login Failed!', result.response.reason);
}
});
} // handler
}] // items (toolbar)
}] // items (formpanel)
}); // create()
} // launch
}); // application()
$(document).ready(function() {
});
ho messo un avviso nel metodo lancio di Ext.Application
ma non li dimostra. Quando inserisco un avviso nella funzione document.ready
, viene visualizzato. Dovrei anche notarlo DO funziona sul browser ipad, non solo quando lanciato dall'icona sulla schermata iniziale.
Pazzo ... forse un problema di cache? Non sono nemmeno sicuro da dove iniziare a fare il debug. – jakerella
elimina l'icona e ricrearla, quindi prova – 1Mayur
@jakerella Ho provato a svuotare il cache e non ho avuto fortuna. Ho anche provato ad aggiungere la funzione cache.manifest HTML per memorizzare le risorse in cache e non ha funzionato né – ninjasense