git-svn-id: https://msi/svn/firstRepo/WebClient/branches/NewRelease@77 0f545695-f87b-41b6-9a03-7f16563b5454

This commit is contained in:
2016-03-06 22:02:12 +00:00
parent a804de5c5d
commit 137b074d85
15 changed files with 196 additions and 756 deletions
+13 -8
View File
@@ -1,4 +1,4 @@
AddHandler application/x-httpd-php .html .htm
#AddHandler application/x-httpd-php .html .htm
<ifModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
@@ -24,13 +24,18 @@ AddOutputFilterByType DEFLATE text/css application/x-javascript text/html text/r
<ifModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^index.html$ index.php [L]
RewriteRule ^js/libs/(.*)\.[0-9]+\.js$ /WebClient/js/libs/$1.js [L]
RewriteRule ^js/(.*)\.[0-9]+\.js$ /WebClient/js/$1.js [L]
RewriteRule ^css/(.*)\.[0-9]+\.css$ /WebClient/css/$1.css [L]
RewriteRule ^Resources/img/(.*)\.[0-9]+\.png$ /WebClient/Resources/img/$1.png [L]
RewriteRule ^Resources/img/(.*)\.[0-9]+\.gif$ /WebClient/Resources/img/$1.gif [L]
RewriteRule ^Resources/icons/(.*)\.[0-9]+\.png$ /WebClient/Resources/icons/$1.png [L]
RewriteBase /
#RewriteRule ^index.html$ index.php [L]
RewriteRule ^.*js/libs/(.*)\.[0-9]+\.js$ /WebClient/js/libs/$1.js [L]
RewriteRule ^.*js/(.*)\.[0-9]+\.js$ /WebClient/js/$1.js [L]
RewriteRule ^r.*/.*js/(.*).js$ /WebClient/js/$1.js [L]
RewriteRule ^r.*/.*js/(.*).html$ /WebClient/js/$1.html [L]
RewriteRule ^.*css/(.*)\.[0-9]+\.css$ /WebClient/css/$1.css [L]
RewriteRule ^r.*/.*css/(.*).gif$ /WebClient/css/$1.gif [L]
#RewriteRule ^/Resources/img/(.*)\.[0-9]+\.png$ /WebClient/Resources/img/$1.png [L]
#RewriteRule ^/Resources/img/(.*)\.[0-9]+\.gif$ /WebClient/Resources/img/$1.gif [L]
#RewriteRule ^/Resources/icons/(.*)\.[0-9]+\.png$ /WebClient/Resources/icons/$1.png [L]
RewriteRule ^r(.*)/$ /WebClient/index.php?ricetta=$1 [L]
</ifModule>
<ifModule mod_headers.c>
+31 -684
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,5 +1,5 @@
@import url("jquery.mobile.icons.min.css");
@import url("IlLievitario.min.css");
@import url("IlLievitario.css");
@import url("loadingStyle.css");
@import url("base.style.css");
@import url("metroHome.css");
+1 -1
View File
File diff suppressed because one or more lines are too long
+50 -6
View File
@@ -11,13 +11,57 @@
<!-- Meta tag per FB-->
<meta property="og:locale" content="it_IT"/>
<meta property="og:site_name" content="Il Lievitario"/>
<meta property="og:title" content="Il Lievitario"/>
<meta itemprop="name" content="Home - Il Lievitario"/>
<meta property="og:url" content="http://app.gruppolapastamadre.it"/>
<meta property="og:type" content="website"/>
<meta property="og:image" content="http://app.gruppolapastamadre.it/previewLink.png"/>
<meta property="og:description" content="Ricettario web del il Gruppo la pasta madre" />
<meta property="description" content="Ricettario web del il Gruppo la pasta madre" />
<?php
require_once "../Service_Manut/config.inc.php";
// inclusione del file contenente la classe
require_once "../Service_Manut/MySqlClass.php";
require_once "../Service_Manut/utility.php";
$ogFbTitle = "Home - Il Lievitario";
$ogFbUrl = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
$ogFbType = "website";
$ogFbImage = "http://app.gruppolapastamadre.it/previewLink.png";
$ogFbDescription = "Ricettario web del il Gruppo la pasta madre";
if(!empty($_GET["ricetta"]))
{
$ricetta = $_GET['ricetta'];
$ogFbUrl .= "#ricetta/" . $ricetta;
$ogFbType = "article";
$mysqlconnetion = new MysqlClass;
$query = "SELECT categorie.name AS categoria_name, " .
"titolo, procedimento, autore FROM ricette " .
"INNER JOIN categorie ON categorie.ID = ricette.id_categoria WHERE ricette.ID = " . $ricetta;
$retObj = $mysqlconnetion->queryToObject($query);
$ogFbTitle = urldecode($retObj[0]["titolo"]);
$ogFbTitle = $ogFbTitle . " di " . urldecode($retObj[0]["autore"]);
$ogFbDescription = "Categoria: " . $retObj[0]["categoria_name"] . " Descrizione: " . substr(strip_tags(html_entity_decode($retObj[0]["procedimento"], ENT_COMPAT | ENT_HTML401, 'ISO-8859-1')), 0, 200);
$query = "select medium_link, type_format from immagini where immagini.id_ricette = " . $ricetta . " and bCover = 1";
$retObj = $mysqlconnetion->queryToObject($query);
$ogFbImage2 = str_replace("?dl=0", "",$retObj[0]["medium_link"]);
$ogFbTypeFormat = $retObj[0]["type_format"];
if($ogFbImage2 != ""){
echo "<meta property='og:image' content='" . $ogFbImage2 . "'/>";
echo "<meta property='og:image:type' content='" . $ogFbTypeFormat . "'/>";
}
else{
echo "<meta property='og:image' content='" . $ogFbImage . "'/>";
}
}
else{
echo "<meta property='og:image' content='" . $ogFbImage . "'/>";
}
?>
<meta property="fb:app_id" content="1466942266882168" />
<meta property="og:title" content="<?php echo $ogFbTitle; ?>"/>
<meta property="og:url" content="<?php echo $ogFbUrl; ?>"/>
<meta property="og:type" content="<?php echo $ogFbType; ?>"/>
<meta property="og:description" content="<?php echo $ogFbDescription; ?>" />
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css" >
<link rel="stylesheet" href="css/style.min.<?php echo filemtime('css/style.min.css'); ?>.css">
<link href='http://fonts.googleapis.com/css?family=Pompiere' rel='stylesheet' type='text/css'>
+2 -1
View File
@@ -1,9 +1,10 @@
var myManifest = {
Debug: (window.location.port !== ""),
Name: "Il Lievitario",
Version: "3.0.4.4",
Version: "3.0.6.0",
Author: "Denis Ironi",
Settings: {
ShowStartMessage: true,
DefaultURL: (window.location.port === "" ? "http://" + window.location.host + "/Service": "http://" + window.location.hostname + ":" + window.location.port + "/Service_Manut"),
JQueryVersion: "1.11.1",
JQueryMobileVersion: "1.4.5",
@@ -1,8 +1,8 @@
<% if(data.items.length == 0){ %>
<h1>Nessuna ricetta trovata</h1>
<h1>Nessuna ricetta trovata</h1>
<%} else { for (var i = 0; i < data.items.length; i++) { %>
<% var item = data.items[i]; %>
<li><a href="#ricetta/<%= item.ricetta_id%>" class="ui-btn ui-btn-icon-right ui-icon-carat-r ui-li-has-thumb">
<li><a href="r<%= item.ricetta_id%>/#ricetta/<%= item.ricetta_id%>" class="ui-btn ui-btn-icon-right ui-icon-carat-r ui-li-has-thumb">
<div class="imageRic">
<% if(item.firstImage !== ""){ %>
<img data-src='<%=myManifest.Settings.DefaultURL%>/api/photo/thumbnail/<%=item.firstImage%>'>
+12 -1
View File
@@ -23,10 +23,15 @@ define(['jquery', 'underscore', 'backbone', 'text!modules/home/homeViewTemplate.
}
},
events: {
"click #noSpacc": "noSpacc",
},
freeWall: null,
noSpacc: function(){
window.localStorage.setItem("noSpacc", 1);
},
calculateSize: function(){
var size = 100;
var widthDevice = (window.innerWidth > 0) ? window.innerWidth : screen.width;
@@ -137,7 +142,13 @@ define(['jquery', 'underscore', 'backbone', 'text!modules/home/homeViewTemplate.
{
this.changePicture(Profile.data.picture);
}
if(myManifest.Settings.ShowStartMessage &&
Profile.data.isSpacc === "0" &&
window.localStorage.getItem("noSpacc") === null)
{
this.$el.find("#nomeUtente").text(Profile.data.name);
this.$el.find("#messaggioSpacciatore").popup("open");
}
//Debug.writeMessage(myManifest.Agent.ua);
},
onClosing: function () {
+6 -10
View File
@@ -46,19 +46,15 @@
</div>
</div>
</div>
<!--<div data-role="popup" id="nuovoGruppo" data-history="false" data-dismissible="false">
<div data-role="header"><h1>IMPORTANTE</h1></div>
<div data-role="popup" id="messaggioSpacciatore" data-history="false" data-dismissible="false">
<div data-role="header"><h1>Messaggio per la comunità</h1></div>
    <div role="main" class="ui-content">
<p style="text-align: center;font-style: italic;">
<img src="https://dl.dropboxusercontent.com/s/xnbrbbe7eejkfv2/festa.png"><br><br>
Le admin <br><br><b>Alessia, Elena e Francesca</b><br><br>hanno RIFONDATO IL GRUPPO!!<br>
<br>"<b>Gruppo La Pasta Madre</b>"<br>
<br>vuoi chiedere di diventare membro?
<br>Se sei già membro premi si e poi torna indietro con il browser
Ciao <b id="nomeUtente"></b> visualizzi questo messaggio perchè fai parte di questo grande gruppo<br><br>Ci chiedavamo se volessi diventare <i>"Spacciatore di Pasta madre"</i>
</p>
<p style="text-align: center;">
<a id="goFbGroup" href="#" class="ui-btn ui-corner-all ui-shadow ui-btn-inline ui-btn-b" data-rel="back">Si</a>
<a href="#" class="ui-btn ui-corner-all ui-shadow ui-btn-inline ui-btn-b" data-rel="back" data-transition="flow">No</a>
<a id="goFbGroup" href="#settingsView1" class="ui-btn ui-corner-all ui-shadow ui-btn-inline ui-btn-d">Si</a>
<a href="#" id="noSpacc" class="ui-btn ui-corner-all ui-shadow ui-btn-inline ui-btn-d" data-rel="back" data-transition="flow">No</a>
</p>
</div>
</div>-->
</div>
+5 -11
View File
@@ -15,18 +15,12 @@
%>
<div id="contentIngredienti" data-role="content">
<h1>Ingredienti</h1>
<center><p id='ingredienti'>
<% _.each(ingredienti, function(ingrediente) {
var liStyle = "";
var qty = ": " + ingrediente.quantita;
var nome_ingr = ingrediente.nome_ingrediente;
if(ingrediente.id_tipo_ingredienti == 22)
{
liStyle="list-style-type: none;";
qty = "";
nome_ingr = "";
} %> <li style="<%= liStyle %>"><b><%= nome_ingr %></b><%= qty %> <%= ingrediente.unita %> <%= unescape(ingrediente.note) %></li><br> <% }); %>
</p></center>
if(ingrediente.id_tipo_ingredienti == 152)/*Intestazione*/{%>
<h2 class="intestazione"><%= unescape(ingrediente.note) %></h2>
<%}else if(ingrediente.id_tipo_ingredienti == 22)/*Nota-Paragrafo*/{%>
<p class="nota"><%= unescape(ingrediente.note) %></p>
<%}else{%><li class="ingrediente"><div class="nomeIngrediente"><%= ingrediente.nome_ingrediente %></div><%= ": " + ingrediente.quantita %> <%= ingrediente.unita %><div class="notaIngrediente"> <%= unescape(ingrediente.note) %></div></li><%}}); %>
<p style="font-size: xx-small;font-weight: lighter;">La proprietà del materiale pubblicato nel Lievitario , salvo diversa indicazione, è dei rispettivi autori. E vietata la ripubblicazione, anche parziale, di tutto il materiale pubblicato nel sito Lievitario senza preventiva autorizzazione scritta.</p>
</div>
<div id="contentProcedimento" data-role="content" style="display: none;">
+2 -2
View File
@@ -124,7 +124,7 @@ define(['jquery', 'underscore', 'backbone', 'text!modules/maps/mapsViewTemplate.
markers.push(new google.maps.Marker({
map: self.map,
icon: icon,
title: place.name,
title: unescape(place.name),
position: place.geometry.location
}));
@@ -173,7 +173,7 @@ define(['jquery', 'underscore', 'backbone', 'text!modules/maps/mapsViewTemplate.
position: new google.maps.LatLng(ele.Latitudine, ele.Longitudine),
icon: ele.TipoPM == "4"?self.iconPMGF:self.iconPM,
//label: ele.Name,
title: ele.Name,
title: $("<div/>").html(unescape(ele.Name)).text(),
map: self.map
});
+2 -19
View File
@@ -2,7 +2,7 @@
<h1>Nessuna ricetta trovata</h1>
<%} else { for (var i = 0; i < data.length; i++) { %>
<% var item = data[i]; %>
<li><a href="#ricetta/<%= item.ricetta_id%>" class="ui-btn ui-btn-icon-right ui-icon-carat-r ui-li-has-thumb">
<li><a href="r<%= item.ricetta_id%>/#ricetta/<%= item.ricetta_id%>" class="ui-btn ui-btn-icon-right ui-icon-carat-r ui-li-has-thumb">
<div class="imageRic">
<% if(item.firstImage !== ""){ %>
<img src='<%=myManifest.Settings.DefaultURL%>/api/photo/thumbnail/<%=item.firstImage%>'>
@@ -11,24 +11,7 @@
<div class="contentItem">
<div class='ricettaTitolo'><%= unescape(item.titolo)%> - <%= unescape(item.categoria_name)%></div>
<div class='ricettaAutore'><%= unescape(item.autore) %></div>
<br><div class='ricettaAutore'>Diff.:&nbsp;&nbsp;</div>
<div id="valutazione">
<div role="text" data-role="none" aria-label="Molto Semplice" class="star-rating rater-0 star star-rating-applied star-rating-live <% if(parseInt(item.difficolta)>=1){%>star-rating-on<%}%>">
<div data-role="none" title="Molto Semplice">1</div>
</div>
<div data-role="none" role="text" aria-label="Semplice" class="star-rating rater-0 star star-rating-applied star-rating-live <% if(parseInt(item.difficolta)>=2){%>star-rating-on<%}%>">
<div data-role="none" title="Semplice">2</div>
</div>
<div data-role="none" role="text" aria-label="Normale" class="star-rating rater-0 star star-rating-applied star-rating-live <% if(parseInt(item.difficolta)>=3){%>star-rating-on<%}%>">
<div data-role="none" title="Normale">3</div>
</div>
<div data-role="none" role="text" aria-label="Difficile" class="star-rating rater-0 star star-rating-applied star-rating-live <% if(parseInt(item.difficolta)>=4){%>star-rating-on<%}%>">
<div data-role="none" title="Difficile">4</div>
</div>
<div data-role="none" role="text" aria-label="Molto Difficile" class="star-rating rater-0 star star-rating-applied star-rating-live <% if(parseInt(item.difficolta)>=5){%>star-rating-on<%}%>">
<div data-role="none" title="Molto Difficile">5</div>
</div>
</div>
<br><div class='ricettaAutore'>Diff.:&nbsp;&nbsp;</div><div id="valDiff" data-role="none" class="cappelli cappelli-<%=item.difficolta%>"></div>
</div>
</a></li>
<% }} %>
+57 -1
View File
@@ -6,10 +6,12 @@ define(['jquery', 'underscore', 'backbone','text!modules/settings/settingsViewTe
//initialize template
template:_.template(settingsViewTemplate),
_flagSave: false,
activateTab: 0,
initialize: function () {
initialize: function (tab) {
var self = this;
this.id = "SettingsView";
this.activateTab = tab;
SettingsView.__super__.initialize.call(this);
},
@@ -133,8 +135,45 @@ define(['jquery', 'underscore', 'backbone','text!modules/settings/settingsViewTe
});
}
},
onShowing: function (){
if (!Profile.isConnected()) {
$('h1').hide();
$('[data-role="tabs"]').hide();
$('#saveBtn').hide();
return;
}
if(this.activateTab === "1"){
var contents = this.$el.find('div[data-role="tabs"] > .ui-content');
var navbars = this.$el.find('div[data-role="navbar"] a');
$(contents[0]).hide();
$(navbars[0]).removeClass('ui-btn-active');
$(navbars[0]).removeClass('ui-state-persist');
$(contents[1]).show();
$(navbars[1]).addClass('ui-btn-active');
$(navbars[1]).addClass('ui-state-persist');
}
},
onShowed: function(){
var self = this;
if(this.activateTab === "1"){
var intervalID = setInterval(function(){
$('[for="spacc-PMChk"]').attr("style", "border: 4px red solid; border-style: dashed;");
}, 500);
var intervalID2 = setInterval(function(){
$('[for="spacc-PMChk"]').attr("style", "border: 4px red solid; border-style: solid;");
}, 1000);
setTimeout(function(){
clearInterval(intervalID);
clearInterval(intervalID2);
$('[for="spacc-PMChk"]').attr("style", "");
}, 5000);
}
if(Profile.data.isSpacc==="0"){
this.$el.find('#mapSpacc > :not(.ui-checkbox:has(#spacc-PMChk))').hide();
}
@@ -193,6 +232,17 @@ define(['jquery', 'underscore', 'backbone','text!modules/settings/settingsViewTe
}
else
this.$el.find('#mapSpacc > :not(.ui-checkbox:has(#spacc-PMChk))').hide();
if(this.$el.find('#stato').val() !== "ITALIA")
{
this.$el.find('#provTxt').parent().show();
this.$el.find('#prov').parent().hide();
}
else
{
this.$el.find('#provTxt').parent().hide();
this.$el.find('#prov').parent().show();
}
},
//render the content into div of view
@@ -208,12 +258,18 @@ define(['jquery', 'underscore', 'backbone','text!modules/settings/settingsViewTe
this.$el.append(this.footer.$el);
}
var navbars = this.$el.find('div[data-role="navbar"] a');
$(navbars[0]).addClass('ui-btn-active');
$(navbars[0]).addClass('ui-state-persist');
this.$el.find('#nResult').val(Profile.data.risRic);
this.$el.find('#theme').val(Profile.data.tema);
this.$el.find('#spacc-PMChk').prop('checked', Profile.data.isSpacc==="0"?false:true);
this.$el.find('#email').val(Profile.data.email);
this.$el.find('#stato').val(Profile.data.dataSpacc.stato);
this.$el.find('#provTxt').parent().hide();
this.$el.find('#prov').parent().hide();
if(this.$el.find('#stato').val() !== "ITALIA")
{
this.$el.find('#provTxt').parent().show();
@@ -60,6 +60,7 @@
<option value='ROMANIA'>Romania</option>
<option value='SLOVACCHIA'>Slovacchia</option>
<option value='SLOVENIA'>Slovenia</option>
<option value='SUDAFRICA'>SudAfrica</option>
<option value='SPAGNA'>Spagna</option>
<option value='USA'>Stati Uniti D'America</option>
<option value='SVEZIA'>Svezia</option>
+5 -3
View File
@@ -55,7 +55,7 @@ define(['jquery', 'underscore', 'backbone',
'searchView': 'showSearch',
'mapsView': 'showMaps',
'debugView': 'showDebug',
'settingsView': 'showSettings',
'settingsView(:tab)': 'showSettings',
'donationView': 'showDonation',
'search/:nresult/:categoria/:difficolta/:autore/*titolo': 'searchFn',
'converterView': 'showConverter',
@@ -71,8 +71,10 @@ define(['jquery', 'underscore', 'backbone',
homeView.render();
this.changePage(homeView);
},
showSettings: function (actions) {
var settingsView = new SettingsView();
showSettings: function (tab) {
if(tab==null)
tab = 0;
var settingsView = new SettingsView(tab);
settingsView.render();
this.changePage(settingsView);
},