Compare commits

...

9 commits

Author SHA1 Message Date
Andrea Condoluci
87c95fc7c1 sistemata pipe 2017-03-18 17:54:19 +01:00
Andrea Condoluci
e9e4f5e4aa stiamo merge-ando da fix-home 2017-03-18 17:50:12 +01:00
Andrea Condoluci
dc92642224 fix lista articoli 2017-03-18 17:41:43 +01:00
Andrea Condoluci
21e630bded coloriiiiiiii 2017-03-18 17:35:50 +01:00
Andrea Condoluci
68ef906864 sistemato menu ii 2017-03-18 17:26:03 +01:00
Andrea Condoluci
8d062dd222 sistemato menu 2017-03-18 17:23:46 +01:00
Andrea Condoluci
792335686c sistemato spacing titolo 2017-03-18 17:14:26 +01:00
Andrea Condoluci
ebeb7a6605 navbar con logo 2017-03-18 16:47:49 +01:00
Andrea Condoluci
fee0615860 pagina info listata 2017-03-18 16:15:57 +01:00
4 changed files with 388 additions and 349 deletions

File diff suppressed because it is too large Load diff

View file

@ -25,13 +25,13 @@
<!-- WARNING: for iOS 7, remove the width=device-width and height=device-height attributes. See https://issues.apache.org/jira/browse/CB-4323 --> <!-- WARNING: for iOS 7, remove the width=device-width and height=device-height attributes. See https://issues.apache.org/jira/browse/CB-4323 -->
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" /> <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
<!--meta http-equiv="Content-Security-Policy" content="default-src * 'self' gap: ; frame-src * 'self' gap: http: ; style-src * 'self' 'unsafe-inline' 'unsafe-eval'; script-src * 'self' 'unsafe-inline' 'unsafe-eval'; " /--> <!--meta http-equiv="Content-Security-Policy" content="default-src * 'self' gap: ; frame-src * 'self' gap: http: ; style-src * 'self' 'unsafe-inline' 'unsafe-eval'; script-src * 'self' 'unsafe-inline' 'unsafe-eval'; " /-->
<title>I love xm24</title> <title>I love xm24</title>
<link rel="stylesheet" type="text/css" href="css/index.css" /> <link rel="stylesheet" type="text/css" href="css/index.css" />
<link rel="stylesheet" type="text/css" href="css/toastr.css" /> <link rel="stylesheet" type="text/css" href="css/toastr.css" />
<link rel="stylesheet" href="css/themes/default/jquery.mobile-1.4.5.min.css" /> <link rel="stylesheet" href="css/themes/default/jquery.mobile-1.4.5.min.css" />
<script type="text/javascript" src="js/vendor/jquery-1.10.2.min.js"></script> <script type="text/javascript" src="js/vendor/jquery-1.10.2.min.js"></script>
<!--script src="js/swipe-page.js"></script--> <!--script src="js/swipe-page.js"></script-->
@ -46,89 +46,18 @@
<script type="text/javascript" src="cordova.js"></script> <script type="text/javascript" src="cordova.js"></script>
<script type="text/javascript" src="js/push.js"></script> <script type="text/javascript" src="js/push.js"></script>
<script type="text/javascript" src="js/share.js"></script> <script type="text/javascript" src="js/share.js"></script>
<script type="text/javascript">
$(document).on("mobileinit", function () {
$("body").pagecontainer({
defaults: true
});
$(".ui-loader").loader({
defaults: true
});
$("input").button();
});
$(document).on("pagecontainerchange", function () {    
var current = $(".ui-page-active").prop("id");     // Remove active class from nav buttons
    
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");        
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();
$("body > [data-role='header']").toolbar();
$("body > [data-role='footer']").toolbar();
$("body > [data-role='navbar']").navbar();
$("#navfooter").navbar();
postInList();
});
/*per inizio navigazione*/
var Site = function () {
this.homepage = "#index"; // the default page that is loaded
this.init();
};
Site.prototype.init = function () {
var self = this;
$(document).ready(function () {
// 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;
});
};
// On document ready
$(function () {
intercettaUrl();
new Site();
$(".minibox").click(function () {
});
});
</script>
</head> </head>
<body> <body>
<!--panel --> <!--panel -->
<div data-role="panel" data-position="right" id="outside" data-theme="a" data-position-fixed="true" data-display="overlay" data-swipe-close="true"> <div data-role="panel" data-position="right" id="outside" data-theme="a" data-position-fixed="true" data-display="overlay" data-swipe-close="true">
<p><img src="image/xm-logo.png" class="rwd" /></p> <p><img src="image/ilovexm24_puzzle-300x300.jpg" class="panel_logo" /></p>
<ul data-role="listview"> <ul data-role="listview">
<li><a class="nav" href="#ilove">I love XM24</a></li>
<li><a class="nav" href="#info">Info</a></li> <li><a class="nav" href="#info">Info</a></li>
<li><a class="nav" href="#ilove">I love XM24</a></li>
<li><a class="nav" href="#events">Events</a></li>
<li><a class="nav" href="#about">About</a></li>
<li> <li>
<input type="text" class="cerca" value="" placeholder="Cerca" data-clear-btn="true" /> <input type="text" class="cerca" value="" placeholder="Cerca" data-clear-btn="true" />
</li> </li>
@ -151,18 +80,20 @@
</div> </div>
<!--/navbar --> <!--/navbar -->
<div data-role="header" data-position="fixed" id="navheader" class="hide"> <div data-role="header" data-position="fixed" id="navheader">
<div data-role="navbar" id="nav2" data-iconpos="left" data-theme="a"> <div data-role="navbar" id="nav2" data-iconpos="left" data-theme="a">
<ul class="downnav"> <ul class="downnav">
<li><a class="ui-mini nav" href="#index">Home</a> </li> <li><a class="ui-mini" href="#outside" data-icon="bars">
<li><a class="ui-mini" href="#outside">Menù</a> </li> <img src="image/xm-logo.png" class="rwd" />
</a>
</li>
</ul> </ul>
</div> </div>
</div> </div>
<!-- /header --> <!-- /header -->
<!-- Home page --> <!-- Home page -->
<div data-role="page" id="index" data-dom-cache="true" data-theme="a" class="ui-page"> <!-- <div data-role="page" id="index" data-dom-cache="true" data-theme="a" class="ui-page">
<center><p><img src="image/xm-logo.png" class="rwd" /></p> <center><p><img src="image/xm-logo.png" class="rwd" /></p>
<ul data-role="listview" data-inset="true"> <ul data-role="listview" data-inset="true">
<li> <li>
@ -170,7 +101,7 @@
<img src="./image/ilovexm24_puzzle-300x300.jpg" class="ui-li-thumb"> <img src="./image/ilovexm24_puzzle-300x300.jpg" class="ui-li-thumb">
<h2>I love XM24</h2> <h2>I love XM24</h2>
<p>Bla blabla</p> <p>Bla blabla</p>
<!--p class="ui-li-aside">iOS</p--> <!-p class="ui-li-aside">iOS</p-=>
</a> </a>
</li> </li>
<li> <li>
@ -178,7 +109,7 @@
<img src="./image/xm24-particolare2.jpeg" class="ui-li-thumb"> <img src="./image/xm24-particolare2.jpeg" class="ui-li-thumb">
<h2>Info e comunicati</h2> <h2>Info e comunicati</h2>
<p>Bla Bla blabla</p> <p>Bla Bla blabla</p>
<!--p class="ui-li-aside">BlackBerry</p--> <!--p class="ui-li-aside">BlackBerry</p-=>
</a> </a>
</li> </li>
<li> <li>
@ -190,11 +121,11 @@
</li> </li>
</ul> </ul>
</center> </center>
<!--a class="minibox orange nav" href="#eventi"> Eventi</a> <!=-a class="minibox orange nav" href="#eventi"> Eventi</a>
<a class="minibox green nav" href="#lab"> Laboratori</a> <a class="minibox green nav" href="#lab"> Laboratori</a>
<a class="minibox green nav" href="#ultime"> News</a> <a class="minibox green nav" href="#ultime"> News</a>
<a class="minibox green nav" href="#tag"> Tag</a> <a class="minibox green nav" href="#tag"> Tag</a>
<a class="minibox blue nav" href="#quotidiano"> Un post a caso</a--> <a class="minibox blue nav" href="#quotidiano"> Un post a caso</a ==>
<br/ style="clear:both;"> <br/ style="clear:both;">
<div id="aggiornahome">Aggiorna i contenuti dal sito XM24 di tanto in tanto. <div id="aggiornahome">Aggiorna i contenuti dal sito XM24 di tanto in tanto.
@ -225,8 +156,21 @@
<input type="button" value="OK" onclick='$("#benvenuta").popup("close");alterContent(#info);' /> <input type="button" value="OK" onclick='$("#benvenuta").popup("close");alterContent(#info);' />
</div> </div>
</div> </div> -->
<div data-role="page" id="info" data-prev="index" data-next="" data-dom-cache="true" data-theme="a" class="ui-page">
<div role="main" class="ui-content">
<!-- <center><p><img src="image/xm-logo.png" class="rwd" /></p></center> -->
<div class="ui-body">
<p class="introlettera">Info e comunicati</p>
<p id="mostralistainfo" class="listatovirgole listevoci">
<img class="gifloader" src="./image/ajax_loader_red_512.gif" />
</p>
</div>
<!-- chiude body-->
</div>
<!--chiude content -->
</div>
</div> </div>
<div data-role="page" id="events" data-prev="index" data-next="" data-dom-cache="true" data-theme="a" class="ui-page"> <div data-role="page" id="events" data-prev="index" data-next="" data-dom-cache="true" data-theme="a" class="ui-page">
@ -256,20 +200,7 @@
<!--chiude content --> <!--chiude content -->
</div> </div>
<!-- chiude pagina --> <!-- chiude pagina -->
<div data-role="page" id="info" data-prev="index" data-next="" data-dom-cache="true" data-theme="a" class="ui-page">
<div role="main" class="ui-content">
<div class="ui-body">
<p class="introlettera">Info e comunicati</p>
<p id="mostralistainfo" class="listatovirgole listevoci">
<img class="gifloader" src="./image/ajax_loader_red_512.gif" />
</p>
</div>
<!-- chiude body-->
</div>
<!--chiude content -->
</div>
<!-- chiude pagina --> <!-- chiude pagina -->
<div data-role="page" id="quotidiano" data-transition="slide" data-prev="index" data-next="" data-dom-cache="true" data-theme="a" class="ui-page"> <div data-role="page" id="quotidiano" data-transition="slide" data-prev="index" data-next="" data-dom-cache="true" data-theme="a" class="ui-page">
<div role="main" class="ui-content"> <div role="main" class="ui-content">
@ -295,7 +226,7 @@
<p> <p>
Aggiorna i contenuti dal sito XM24 di tanto in tanto. Aggiorna i contenuti dal sito XM24 di tanto in tanto.
<br/> Per iniziare da capo e riscaricare tutti i contenuti clicca su reset. </p> <br/> Per iniziare da capo e riscaricare tutti i contenuti clicca su reset. </p>
<center> <center>
<img src="./image/icona_aggiorna.png" id="aggiorna" /> <img src="./image/icona_aggiorna.png" id="aggiorna" />
@ -312,14 +243,14 @@
</fieldset> </fieldset>
</center> </center>
<p id="boxdata" style="display:none;">I tuoi diritti sono stati aggiornati l'ultima volta il <span id="datadiritti">2016/07/18</span> alle <span id="datadirittiora">00:00</span>.</p> <p id="boxdata" style="display:none;">I tuoi diritti sono stati aggiornati l'ultima volta il <span id="datadiritti">2016/07/18</span> alle <span id="datadirittiora">00:00</span>.</p>
<img src="image/icona_aggiorna.gif" style="visibility:hidden;" id="aggiornamento" /> <img src="image/icona_aggiorna.gif" style="visibility:hidden;" id="aggiornamento" />
</div> </div>
</div> </div>
</div> </div>
chiude pagina --> chiude pagina -->
<div data-role="page" id="singleQpost" data-prev="index" data-next="" data-dom-cache="true" data-theme="a" class="ui-page"> <div data-role="page" id="singleQpost" data-prev="index" data-next="" data-dom-cache="true" data-theme="a" class="ui-page">

View file

@ -108,6 +108,7 @@ function getParameterByName(name, url) {
function display_results(contenitore, messaggio) { function display_results(contenitore, messaggio) {
$(contenitore).text(messaggio); $(contenitore).text(messaggio);
}; };
$(function () { $(function () {
$("form").submit(function () { $("form").submit(function () {
return false; return false;
@ -135,23 +136,98 @@ function setFirstRun() {
} }
} }
}; };
/*per link in browser di default */ /*per link in browser di default */
document.addEventListener("deviceready", onDeviceReady, false); document.addEventListener("deviceready", onDeviceReady, false);
//le cose all'inizio //le cose all'inizio
$(document).on("mobileinit", function () {
$("body").pagecontainer({
defaults: true
});
$(".ui-loader").loader({
defaults: true
});
$("input").button();
});
$(document).on("pagecontainerchange", function () {    
var current = $(".ui-page-active").prop("id");     // Remove active class from nav buttons
    
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");        
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();
$("body > [data-role='header']").toolbar();
$("body > [data-role='footer']").toolbar();
$("body > [data-role='navbar']").navbar();
$("#navfooter").navbar();
postInList();
});
/*per inizio navigazione*/
var Site = function () {
this.homepage = "#index"; // the default page that is loaded
this.init();
};
Site.prototype.init = function () {
var self = this;
$(document).ready(function () {
// 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;
});
};
// On document ready
$(function () {
// intercettaUrl();
// new Site();
// $(".minibox").click(function () {});
});
function onDeviceReady() { function onDeviceReady() {
// console.log('deviceready'); // console.log('deviceready');
createDB(); createDB();
setFirstRun(); setFirstRun();
$("#navheader").addClass("hide");
$("#navfooter").addClass("hide");
$("a.nav").on("click", function (event) { $("a.nav").on("click", function (event) {
// Prevent the usual navigation behavior // Prevent the usual navigation behavior
event.preventDefault(); event.preventDefault();
hrefseguente = $(this).attr("href"); hrefseguente = $(this).attr("href");
alterContent(hrefseguente); alterContent(hrefseguente);
}); });
// eliminare le due righe:
$("body > [data-role='header']").toolbar();
$("[data-role='navbar']").navbar();
alterContent("#info");
}; };
function overlayblock() { function overlayblock() {
$(".overlaynero").toggleClass("hide"); $(".overlaynero").toggleClass("hide");
} }
@ -159,7 +235,7 @@ function overlayblock() {
function checkConnection(code, msgConnect) { function checkConnection(code, msgConnect) {
var msgTitle = "Non sei connesso"; var msgTitle = "Non sei connesso";
msgConnect = msgConnect || "Occore essere connessi per poter ricevere i nuovi articoli"; msgConnect = msgConnect || "Occore essere connessi per poter ricevere i nuovi articoli";
var networkState = navigator.connection.type; var networkState = navigator.connection.type;
var states = {}; var states = {};
states[Connection.UNKNOWN] = 'Unknown connection'; states[Connection.UNKNOWN] = 'Unknown connection';
@ -497,9 +573,9 @@ function cercaMe() {
var dTime = new Date(time); var dTime = new Date(time);
if (dTime.getTime() <= lastUpdateDate) { if (dTime.getTime() <= lastUpdateDate) {
//key mi dice l'indice' //key mi dice l'indice'
items.push("<li><a href='#singleQpost' data-post='" + id + "'>" + title + "</a><br/><small>" + cleanTime + "</small>|</li>"); items.push("<li><a href='#singleQpost' data-post='" + id + "'>" + title + "</a><br/><small>" + cleanTime + "</small></li>");
} else { } else {
items.push("<p><a href='#' onclick='aggiornaora();' style='color:#666;' data-post='" + id + "'>" + title + "</a><br/><small>" + cleanTime + "</small>|</p>"); items.push("<p><a href='#' onclick='aggiornaora();' style='color:#666;' data-post='" + id + "'>" + title + "</a><br/><small>" + cleanTime + "</small></p>");
} }
}); });
$("<ul/>", { $("<ul/>", {
@ -575,11 +651,11 @@ function JSONErrorHandler(jqXHR, textStatus, errorThrown) {
function cerca() { function cerca() {
var ret = checkConnection('ERR_CERCA'); var ret = checkConnection('ERR_CERCA');
if (ret) { if (ret) {
cercaMe(); cercaMe();
} }
return ret; return ret;
}; };
@ -592,7 +668,7 @@ function mostraEsperto() {
if (ret) { if (ret) {
myJsonPage(2167, '#espertotitle', '#mostraesperto'); myJsonPage(2167, '#espertotitle', '#mostraesperto');
} }
return ret; return ret;
}; };
@ -601,7 +677,7 @@ function checkAndUpdate() {
if (ret) { if (ret) {
update(); update();
} }
return ret; return ret;
}; };
@ -609,7 +685,7 @@ function checkAndReset() {
var ret = checkConnection('ERR_ESPERTO'); var ret = checkConnection('ERR_ESPERTO');
if (ret) { if (ret) {
resetAndUpdate(); resetAndUpdate();
} }
return ret; return ret;
}; };

View file

@ -22,10 +22,10 @@ function myJsonCategory(Qcategory, div, addTagCategory) {
} }
}); });
//key mi dice l'indice' //key mi dice l'indice'
items.push("<li class='"+ cattag +"'><a href='#singleQpost' data-post='" + id + "'>" + title + "</a><br/><small>" + cleanTime + "</small>|<span>" + tag + "</span>|</li>"); items.push("<li class='"+ cattag +"'><a href='#singleQpost' data-post='" + id + "'>" + title + "</a><br/><small>" + cleanTime + "</small><span>" + tag + "</span>|</li>");
} }
else {*/ else {*/
items.push("<li><a href='#singleQpost' data-post='" + id + "'>" + title + "</a><br/><small>" + cleanTime + "</small>|</li>"); items.push("<li><a href='#singleQpost' data-post='" + id + "'>" + title + "</a><br/><small>" + cleanTime + "</small></li>");
} }
$("<ul/>", { $("<ul/>", {
@ -56,7 +56,7 @@ function myJsonLastPage(div) {
var splitTime = time.split("T"); var splitTime = time.split("T");
var cleanTime = splitTime[0]; var cleanTime = splitTime[0];
//key mi dice l'indice' //key mi dice l'indice'
items.push("<li><a href='#singleQpost' data-post='" + id + "'>" + title + "</a><br/><small>" + cleanTime + "</small>|"); items.push("<li><a href='#singleQpost' data-post='" + id + "'>" + title + "</a><br/><small>" + cleanTime + "</small>");
} }
$("<ul/>", { $("<ul/>", {
"class": "my-new-list" "class": "my-new-list"
@ -92,7 +92,7 @@ function myJsonCategoryPaginated(Qcategory, div, pageNumber) {
var splitTime = time.split("T"); var splitTime = time.split("T");
var cleanTime = splitTime[0]; var cleanTime = splitTime[0];
//key mi dice l'indice' //key mi dice l'indice'
items.push("<li><a href='#singleQpost' data-post='" + id + "'>" + title + "</a><br/><small>" + cleanTime + "</small>|</li>"); items.push("<li><a href='#singleQpost' data-post='" + id + "'>" + title + "</a><br/><small>" + cleanTime + "</small></li>");
} }
$("<ul/>", { $("<ul/>", {
"class": "my-new-list" "class": "my-new-list"