|
@@ -63,7 +63,20 @@ function displayLastUpdateDate() {
|
|
|
function alterContent(url) {
|
|
|
var paginacorrente = $("body").pagecontainer("getActivePage").attr("id");
|
|
|
|
|
|
- switch (url) {
|
|
|
+ var oldUrl = url;
|
|
|
+
|
|
|
+ $( "#outside" ).panel( "close" );
|
|
|
+ // Alter the url according to the anchor's href attribute, and
|
|
|
+ // store the data-foo attribute information with the url
|
|
|
+ $.mobile.navigate(url);
|
|
|
+
|
|
|
+ //Se si lancia il loader prima che sia cambiata pagina il loader scompare,
|
|
|
+ // ritardando invece che appaia, quando appare è già sulla pagina in cambiata
|
|
|
+// setTimeout(function () {
|
|
|
+// $.mobile.loading('show');
|
|
|
+// }, 300);
|
|
|
+
|
|
|
+ switch (oldUrl) {
|
|
|
case '#index':
|
|
|
$("#navheader").addClass("hide");
|
|
|
$("#navfooter").addClass("hide");
|
|
@@ -108,10 +121,10 @@ function alterContent(url) {
|
|
|
myJsonRandomPost('#titolosingleR', '#mostracontentsingleR');
|
|
|
break;
|
|
|
}
|
|
|
- $( "#outside" ).panel( "close" );
|
|
|
- // Alter the url according to the anchor's href attribute, and
|
|
|
- // store the data-foo attribute information with the url
|
|
|
- $.mobile.navigate(url);
|
|
|
+// $( "#outside" ).panel( "close" );
|
|
|
+// // Alter the url according to the anchor's href attribute, and
|
|
|
+// // store the data-foo attribute information with the url
|
|
|
+// $.mobile.navigate(url);
|
|
|
}
|
|
|
/*///////////////utilities//////////////http://stackoverflow.com/questions/901115/how-can-i-get-query-string-values-in-javascript*/
|
|
|
function getParameterByName(name, url) {
|
|
@@ -147,6 +160,10 @@ function initMainPage() {
|
|
|
document.addEventListener("deviceready", onDeviceReady, false);
|
|
|
//le cose all'inizio
|
|
|
|
|
|
+$(document).on("pagecontainershow", function (e, ui) {
|
|
|
+ $.mobile.loading('show');
|
|
|
+});
|
|
|
+
|
|
|
$(document).on("mobileinit", function () {
|
|
|
$("body").pagecontainer({
|
|
|
defaults: true
|