Compare commits
2 commits
39d5e46bbf
...
666d32a63b
Author | SHA1 | Date | |
---|---|---|---|
666d32a63b | |||
1920be90e4 |
5 changed files with 33 additions and 11 deletions
|
@ -54,11 +54,12 @@ EVENTS.getDataAndLoad = function (type) {
|
|||
var evDesc = ai1ec.event.getDescription(event);
|
||||
var evUrl = ai1ec.event.getUrl(event);
|
||||
var evGeo = ai1ec.event.getGeo(event);
|
||||
var evImg = ai1ec.event.getImage(event);
|
||||
|
||||
var evInitDate = EVENTS.formatDate(ai1ec.event.getInitDate(event), EVENTS.storeDateFormat);
|
||||
var evEndDate = EVENTS.formatDate(ai1ec.event.getEndDate(event), EVENTS.storeDateFormat);
|
||||
|
||||
FONTE.dbHandler.executeSql('INSERT INTO ' + table + ' VALUES (?,?,?,?,?,?,?)', [evId, evTitle, evDesc, evInitDate, evEndDate, evUrl, evGeo],
|
||||
FONTE.dbHandler.executeSql('INSERT INTO ' + table + ' VALUES (?,?,?,?,?,?,?,?)', [evId, evTitle, evDesc, evInitDate, evEndDate, evUrl, evGeo, evImg],
|
||||
//onSuccess
|
||||
function (resultSet) {
|
||||
n_evs_ins++;
|
||||
|
|
|
@ -56,10 +56,14 @@ var ai1ec = (function(){
|
|||
return event.geo || "";
|
||||
},
|
||||
|
||||
//Regole per gli evebti ripetitivi
|
||||
//Regole per gli eventi ripetitivi
|
||||
getRule : function(event) {
|
||||
return event.rrule || "";
|
||||
},
|
||||
|
||||
getImage : function(event){
|
||||
return event['x-wp-images-url'] || "";
|
||||
},
|
||||
};
|
||||
|
||||
var getXmlData = function(url, catId, callback) {
|
||||
|
|
|
@ -46,7 +46,7 @@ PROJECT.labs = [
|
|||
"conoscenza autoproducendo dal basso strumenti alternativi ed infrastrutture "+
|
||||
"autonome di comunicazione per una partecipazione politica consapevole.",
|
||||
when : [
|
||||
{day: "Mer", hour: ["20:00", "23:00"], title:"Hacklabbo" },
|
||||
{day: "Mer", hour: ["21:00", "24:00"], title:"Hacklabbo" },
|
||||
],
|
||||
old_event: "", //un vecchio evento
|
||||
site: "http://liste.indivia.net/listinfo/hacklabbo", //sito personale
|
||||
|
@ -60,7 +60,7 @@ PROJECT.labs = [
|
|||
"sociale, di incontro, confronto e condivisione, un veicolo sperimentale e "+
|
||||
"creativo per la trasmissione della cultura e della politica.",
|
||||
when : [
|
||||
{day: "Giov", hour: ["18:00", "23:00"], title:"Apertura spazio Infoshock" },
|
||||
{day: "Giov", hour: ["20:00", "23:00"], title:"Apertura spazio Infoshock" },
|
||||
],
|
||||
old_event: "", //un vecchio evento
|
||||
site: "https://infoshockxm24.noblogs.org", //sito personale
|
||||
|
@ -74,7 +74,9 @@ PROJECT.labs = [
|
|||
"applicare la creazione legata al mondo del visuale. La serigrafia come "+
|
||||
"tecnica di stampa manuale legata al mondo d.i.y. si pone in maniera "+
|
||||
"opposta alle logiche della produzione industriale massiva e omologante.",
|
||||
when : [],
|
||||
when : [
|
||||
{day: "Mer", hour: ["19:30", "22:00"], title:"Apertura serigrafia"},
|
||||
],
|
||||
old_event: "", //un vecchio evento
|
||||
site: "", //sito personale
|
||||
contatto : "serixm@autistici.org", //email
|
||||
|
@ -88,14 +90,15 @@ PROJECT.labs = [
|
|||
"tecnica di stampa manuale legata al mondo d.i.y. si pone in maniera "+
|
||||
"opposta alle logiche della produzione industriale massiva e omologante.",
|
||||
when : [
|
||||
{day: "Mar", hour: ["18:30", "20:30"], title:"Hata Yoga"},
|
||||
{day: "Mar", hour: ["18:30", "20:00"], title:"Hata Yoga"},
|
||||
{day: "Mer", hour: ["20:30", "22:30"], title:"Hata Yoga meditativa"},
|
||||
{day: "Gio", hour: ["18:30", "21:00"], title:"Hata Yoga"},
|
||||
{day: "Lun", hour: ["20:30", "22:30"], title:"Hata Yoga meditativa"},
|
||||
{day: "Gio", hour: ["18:30", "20:00"], title:"Hata Yoga"},
|
||||
{day: "Lun", hour: ["19:00", "21:00"], title:"Tessuti aerei"},
|
||||
{day: "Mer", hour: ["19:00", "21:00"], title:"Tessuti aerei"},
|
||||
{day: "Ven", hour: ["19:00", "21:00"], title:"Tessuti aerei"},
|
||||
{day: "Sab", hour: ["15:00", "17:00"], title:"Shiatsu"},
|
||||
{day: "Lun", hour: ["15:00", "17:00"], title:"Acrobalance"}
|
||||
//{day: "Lun", hour: ["15:00", "17:00"], title:"Acrobalance"}
|
||||
],
|
||||
old_event: "", //un vecchio evento
|
||||
site: "http://liste.indivia.net/listinfo/pallestra", //sito personale
|
||||
|
|
|
@ -300,11 +300,15 @@ function drawEvent(div_title, div_content, resultSet){
|
|||
var id = val.id;
|
||||
var title = val.title;
|
||||
var url = val.url;
|
||||
var content = val.description;
|
||||
var content = entityToHtml(val.description);
|
||||
var geo = val.geo;
|
||||
var imgUrlThumb = getImageUrl(val.img, 'thumb');
|
||||
|
||||
$(div_title).html(title);
|
||||
$(div_content).html("<small>" + evInitDate +"-" + evEndDate +"</small><p>" + content + "</p>");
|
||||
var img = imgUrlThumb != "" ? "<a href='" + getImageUrl(val.img, 'large') + "'>" +
|
||||
"<img src='" + imgUrlThumb + "'/>" +
|
||||
"</a><br>" : "";
|
||||
$(div_content).html(img + "<small>" + evInitDate +"-" + evEndDate +"</small><p>" + content + "</p>");
|
||||
renderShareButton(div_content, title, url, evInitDate + " "+ evEndDate);
|
||||
}
|
||||
}
|
||||
|
@ -375,7 +379,8 @@ function createDB() {
|
|||
//FONTE.dbHandler.executeSql('CREATE TABLE IF NOT EXISTS xm24_tags (id INTEGER PRIMARY KEY, title, tag)');
|
||||
//FONTE.dbHandler.executeSql('CREATE TABLE IF NOT EXISTS xm24_tags_to_posts (id, tagid)');
|
||||
//FONTE.dbHandler.executeSql('CREATE TABLE IF NOT EXISTS xm24_pages (id INTEGER PRIMARY KEY, title, date, page)');
|
||||
FONTE.dbHandler.executeSql('CREATE TABLE IF NOT EXISTS xm24_events_single (id INTEGER PRIMARY KEY, title, description, initDate, endDate, url, geo)');
|
||||
FONTE.dbHandler.executeSql('DROP TABLE IF EXISTS xm24_events_single');
|
||||
FONTE.dbHandler.executeSql('CREATE TABLE IF NOT EXISTS xm24_events_single (id INTEGER PRIMARY KEY, title, description, initDate, endDate, url, geo, img)');
|
||||
//FONTE.dbHandler.executeSql('CREATE TABLE IF NOT EXISTS xm24_tags_to_events (id, tagid)');
|
||||
//FONTE.dbHandler.executeSql('CREATE TABLE IF NOT EXISTS xm24_events_repeat (id INTEGER PRIMARY KEY, title, description, initDate, endDate, url, geo)');
|
||||
}, function () {
|
||||
|
|
|
@ -59,6 +59,15 @@ function entityToHtml(string) {
|
|||
return string;
|
||||
}
|
||||
|
||||
function getImageUrl(str, dim) {
|
||||
var sstr = str.split(";");
|
||||
for(var i = 0; i < sstr.length; i++) {
|
||||
if(sstr[i].indexOf(dim) > -1){
|
||||
return sstr[i +1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var entity_table = {
|
||||
// 34: """, // Quotation mark. Not required
|
||||
38: "&", // Ampersand. Applied before everything else in the application
|
||||
|
|
Loading…
Reference in a new issue