Rimosso bottone indietro dalle pagine principali info/events

This commit is contained in:
gine 2017-03-19 12:38:23 +01:00
parent feb6162f57
commit d83901f74b
2 changed files with 64 additions and 67 deletions

View file

@ -75,7 +75,7 @@
<ul> <ul>
<!--li><a href="#">&#60; precedente</a></li--> <!--li><a href="#">&#60; precedente</a></li-->
<li><a data-rel="back" href="#" data-ajax="false"><h3>BACK</h3></a></li> <li><a data-rel="back" href="#" data-ajax="false"><h3>INDIETRO</h3></a></li>
<!--li><a href="#">successiva &#62;</a></li--> <!--li><a href="#">successiva &#62;</a></li-->
</ul> </ul>
</div> </div>

View file

@ -65,15 +65,14 @@ function alterContent(url) {
break; break;
case '#info': case '#info':
$("#navheader").removeClass("hide"); $("#navheader").removeClass("hide");
$("#navfooter").removeClass("hide"); $("#navfooter").addClass("hide");
myJsonCategory(8, "#mostralistainfo"); myJsonCategory(8, "#mostralistainfo");
break; break;
case '#events': case '#events':
$("#navheader").removeClass("hide"); $("#navheader").removeClass("hide");
$("#navfooter").removeClass("hide"); $("#navfooter").addClass("hide");
//$("#navfooter").removeClass("hide");
EVENTS.render(); EVENTS.render();
// ai1ec.remote.getAllEvents(ai1ec.cats.single);
// ai1ec.remote.getLastEvents(ai1ec.cats.single);
break; break;
case '#aggiorna': case '#aggiorna':
$("#navheader").removeClass("hide"); $("#navheader").removeClass("hide");
@ -142,74 +141,73 @@ function setFirstRun() {
document.addEventListener("deviceready", onDeviceReady, false); document.addEventListener("deviceready", onDeviceReady, false);
//le cose all'inizio //le cose all'inizio
$(document).on("mobileinit", function () {
$("body").pagecontainer({
$(document).on("mobileinit", function () { defaults: true
$("body").pagecontainer({
defaults: true
});
$(".ui-loader").loader({
defaults: true
});
$("input").button();
}); });
$(".ui-loader").loader({
defaults: true
});
$("input").button();
});
$(document).on("pagecontainerchange", function () {    
$(document).on("pagecontainerchange", function () {     var current = $(".ui-page-active").prop("id");     // Remove active class from nav buttons
if(current == 'info' || current == 'events'){
var current = $(".ui-page-active").prop("id");     // Remove active class from nav buttons $("#navfooter").addClass("hide");
     }
console.log("current" + current);
$("[data-role='navbar'] a.ui-btn-active").removeClass("ui-btn-active");     // Add active class to current nav button console.log("current" + current);
     $("[data-role='navbar'] a.ui-btn-active").removeClass("ui-btn-active");     // Add active class to current nav button
$("[data-role='navbar'] a").each(function () {     
var href = $(this).prop("href");         $("[data-role='navbar'] a").each(function () {
if (href.indexOf(current, href.length - current.length) !== -1) {             var href = $(this).prop("href");        
$(this).addClass("ui-btn-active");         if (href.indexOf(current, href.length - current.length) !== -1) {            
}     $(this).addClass("ui-btn-active");        
}); }    
}); });
$(document).on("pagecreate", function () { });
$("body > [data-role='panel']").panel();
$("body > [data-role='panel'] [data-role='listview']").listview(); $(document).on("pagecreate", function () {
$("body > [data-role='header']").toolbar(); $("body > [data-role='panel']").panel();
$("body > [data-role='footer']").toolbar(); $("body > [data-role='panel'] [data-role='listview']").listview();
$("body > [data-role='navbar']").navbar(); $("body > [data-role='header']").toolbar();
$("#navfooter").navbar(); $("body > [data-role='footer']").toolbar();
postInList(); $("body > [data-role='navbar']").navbar();
}); $("#navfooter").navbar();
postInList();
/*per inizio navigazione*/ });
var Site = function () {
this.homepage = "#index"; // the default page that is loaded /*per inizio navigazione*/
this.init(); var Site = function () {
}; this.homepage = "#index"; // the default page that is loaded
this.init();
Site.prototype.init = function () { };
var self = this; Site.prototype.init = function () {
$(document).ready(function () { var self = this;
// default page if no hash given $(document).ready(function () {
// this changes the hash, so the event is fired
// no need to call self.navigate // default page if no hash given
// this changes the hash, so the event is fired
// no need to call self.navigate
window.location.hash = self.homepage;
});
}; window.location.hash = self.homepage;
// On document ready
$(function () {
// intercettaUrl();
// new Site();
// $(".minibox").click(function () {});
}); });
};
// On document ready
$(function () {
// intercettaUrl();
// new Site();
// $(".minibox").click(function () {});
});
function onDeviceReady() { function onDeviceReady() {
// console.log('deviceready'); // console.log('deviceready');
@ -227,8 +225,6 @@ function onDeviceReady() {
alterContent("#info"); alterContent("#info");
}; };
function overlayblock() { function overlayblock() {
$(".overlaynero").toggleClass("hide"); $(".overlaynero").toggleClass("hide");
} }
@ -286,6 +282,7 @@ function postInList() {
$(":mobile-pagecontainer").pagecontainer("load", '#singleQpost' + idOra, { $(":mobile-pagecontainer").pagecontainer("load", '#singleQpost' + idOra, {
showLoadMsg: false showLoadMsg: false
}); });
$("#navfooter").removeClass("hide");
location.hash = '#singleQpost?id=' + idOra; location.hash = '#singleQpost?id=' + idOra;
}); });
}; };