git-svn-id: https://msi/svn/firstRepo/WebClient/branches/NewRelease@43 0f545695-f87b-41b6-9a03-7f16563b5454
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 3.0 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.9 KiB |
@@ -18,6 +18,7 @@
|
|||||||
<link rel="apple-touch-icon" sizes="144x144" href="https://dl.dropboxusercontent.com/s/pj3fk1lgc4cefwx/Icon~ipad%402x.png" />
|
<link rel="apple-touch-icon" sizes="144x144" href="https://dl.dropboxusercontent.com/s/pj3fk1lgc4cefwx/Icon~ipad%402x.png" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, minimal-ui"/>
|
<meta name="viewport" content="width=device-width, initial-scale=1, minimal-ui"/>
|
||||||
<meta http-equiv="Access-Control-Allow-Origin" content="*"/>
|
<meta http-equiv="Access-Control-Allow-Origin" content="*"/>
|
||||||
|
<script src="https://maps.googleapis.com/maps/api/js"></script>
|
||||||
<script type='text/javascript' src="js/common.min.<?php echo filemtime('js/common.min.js'); ?>.js"></script>
|
<script type='text/javascript' src="js/common.min.<?php echo filemtime('js/common.min.js'); ?>.js"></script>
|
||||||
<script type='text/javascript'>
|
<script type='text/javascript'>
|
||||||
<?php echo file_get_contents("js/manifest.js"); ?>
|
<?php echo file_get_contents("js/manifest.js"); ?>
|
||||||
|
|||||||
+10
-1
@@ -241,7 +241,16 @@ define(['jquery', 'backbone'],
|
|||||||
"keyStore": this.getKeySave(),
|
"keyStore": this.getKeySave(),
|
||||||
"tema": this.data.tema,
|
"tema": this.data.tema,
|
||||||
"risRic": this.data.risRic,
|
"risRic": this.data.risRic,
|
||||||
"type": this.data.type
|
"type": this.data.type,
|
||||||
|
"email": this.data.email,
|
||||||
|
"isSpacc": this.data.isSpacc,
|
||||||
|
"prov": this.data.dataSpacc.provincia,
|
||||||
|
"comune": this.data.dataSpacc.comune,
|
||||||
|
"cap": this.data.dataSpacc.cap,
|
||||||
|
"tipopm": this.data.dataSpacc.tipopm,
|
||||||
|
"privacy": this.data.dataSpacc.privacy,
|
||||||
|
"lng": this.data.dataSpacc.long,
|
||||||
|
"lat": this.data.dataSpacc.lat
|
||||||
};
|
};
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
var myManifest = {
|
var myManifest = {
|
||||||
Debug: (window.location.port !== ""),
|
Debug: (window.location.port !== ""),
|
||||||
Name: "Il Lievitario",
|
Name: "Il Lievitario",
|
||||||
Version: "2.9.0.2",
|
Version: "2.9.2.0",
|
||||||
Author: "Denis Ironi",
|
Author: "Denis Ironi",
|
||||||
Settings: {
|
Settings: {
|
||||||
DefaultURL: (window.location.port === "" ? "http://" + window.location.host + "/Service": "http://" + window.location.hostname + ":" + window.location.port + "/Service_Manut"),
|
DefaultURL: (window.location.port === "" ? "http://" + window.location.host + "/Service": "http://" + window.location.hostname + ":" + window.location.port + "/Service_Manut"),
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<%} else { for (var i = 0; i < data.length; i++) { %>
|
<%} else { for (var i = 0; i < data.length; i++) { %>
|
||||||
<% var item = data[i]; %>
|
<% var item = data[i]; %>
|
||||||
<li><a href="#ricetta/<%= item.ricetta_id%>" class="ui-btn ui-btn-icon-right ui-icon-carat-r">
|
<li><a href="#ricetta/<%= item.ricetta_id%>" class="ui-btn ui-btn-icon-right ui-icon-carat-r">
|
||||||
<img src="Resources\img\ricettaND_80.png">
|
<!--<img src="Resources\img\ricettaND_80.png">-->
|
||||||
<div class='ricettaTitolo'><%= unescape(item.titolo) %></div>
|
<div class='ricettaTitolo'><%= unescape(item.titolo) %></div>
|
||||||
<div class='ricettaAutore'><%= unescape(item.autore) %></div>
|
<div class='ricettaAutore'><%= unescape(item.autore) %></div>
|
||||||
<br><div class='ricettaAutore'>Diff.: </div>
|
<br><div class='ricettaAutore'>Diff.: </div>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<div id="categoryListContent" data-role="content">
|
<div id="categoryListContent" data-role="content">
|
||||||
<h1>Indice <%= categoryName %></h1>
|
<h1>Indice <%= categoryName %></h1>
|
||||||
<ul id="allRicette" data-role="listview" data-autodividers="true" data-alpha="true" data-inset="true">
|
<ul id="allRicette" data-role="listview" data-autodividers="true" data-alpha="true" data-inset="true">
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
<div style="text-align: center;">
|
<div style="text-align: center;">
|
||||||
<% if(profile.data.name){ %>
|
<% if(profile.data.name){ %>
|
||||||
<h2 id="benvenuto">Bentornat<% if(profile.data.gender=="male"){%>o<%}else{%>a<%}%><br><%=profile.data.name %></h2><% }else{ %>
|
<h3 id="benvenuto">Bentornat<% if(profile.data.gender=="male"){%>o<%}else{%>a<%}%> <%=profile.data.name %></h3><% }else{ %>
|
||||||
<h2 id="benvenuto">Benarrivata/o nel nostro ricettario</h2>
|
<h3 id="benvenuto">Benarrivata/o nel nostro ricettario</h3>
|
||||||
<% } %>
|
<% } %>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@@ -37,6 +37,12 @@
|
|||||||
<span>Blog</span>
|
<span>Blog</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="itemMenuHomeMetro <%= customClassTheme %> blogClass">
|
||||||
|
<div>
|
||||||
|
<a href="#mapsView" data-role="none"></a>
|
||||||
|
<span>Mappa Spacciatori</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<div id="content">
|
||||||
|
<div id="siteNotice">
|
||||||
|
</div>
|
||||||
|
<h1 id="firstHeading" class="firstHeading"><%= item.Name%></h1>
|
||||||
|
<div id="bodyContent">
|
||||||
|
<p>Tipo di Lievito: <% if(item.TipoPM==1){%>Pasta Madre Solida<%} else if(item.TipoPM==2){%>Li.Co.Li.<%}else{%>Entrambi<%}%><br>
|
||||||
|
Contatta a: <a href="mailto:<%= item.Email%>"><%= item.Email%></a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,101 @@
|
|||||||
|
define(['jquery', 'underscore', 'backbone', 'text!modules/maps/mapsViewTemplate.html', 'text!modules/maps/infoWindowTemplate.html', 'modules/base/baseView', 'classes/profile'],
|
||||||
|
function ($, _, Backbone, mapsViewTemplate, infoWindowTemplate, BaseView, Profile) {
|
||||||
|
|
||||||
|
var MapsView = BaseView.extend({
|
||||||
|
|
||||||
|
map: null,
|
||||||
|
markers: [],
|
||||||
|
//initialize template
|
||||||
|
template: _.template(mapsViewTemplate),
|
||||||
|
infoWindowtemplate: _.template(infoWindowTemplate),
|
||||||
|
|
||||||
|
initialize: function () {
|
||||||
|
this.id = "MapsView";
|
||||||
|
MapsView.__super__.initialize.call(this);
|
||||||
|
},
|
||||||
|
onShowed: function(){
|
||||||
|
var self = this;
|
||||||
|
var drawMap = function(LatLng){
|
||||||
|
var myOptions = {
|
||||||
|
zoom: 10,
|
||||||
|
center: LatLng,
|
||||||
|
mapTypeId: google.maps.MapTypeId.ROADMAP
|
||||||
|
};
|
||||||
|
self.map = new google.maps.Map($("#map-canvas")[0], myOptions);
|
||||||
|
|
||||||
|
var iconPM = {
|
||||||
|
url: "http://app.gruppolapastamadre.it/icon.png",
|
||||||
|
scaledSize: new google.maps.Size(24, 24)
|
||||||
|
};
|
||||||
|
|
||||||
|
self.map.addListener('bounds_changed', function() {
|
||||||
|
var bound = self.map.getBounds();
|
||||||
|
var latLngFrom = bound.getNorthEast();
|
||||||
|
var latLngTo = bound.getSouthWest();
|
||||||
|
$.ajax({
|
||||||
|
url: myManifest.Settings.DefaultURL + "/api/spacciatori/bound/" + latLngFrom.lat() + "/"+ latLngFrom.lng() + "/" + latLngTo.lat() + "/"+ latLngTo.lng(),
|
||||||
|
//dataType: "json",
|
||||||
|
//async: false,
|
||||||
|
type: 'GET',
|
||||||
|
success: function (resp) {
|
||||||
|
resp.forEach(function(ele, index){
|
||||||
|
if(!self.markers["|" + ele.Latitudine+ "|" + ele.Longitudine+ "|"])
|
||||||
|
{
|
||||||
|
var marker = new google.maps.Marker({
|
||||||
|
position: new google.maps.LatLng(ele.Latitudine, ele.Longitudine),
|
||||||
|
icon: iconPM,
|
||||||
|
//label: ele.Name,
|
||||||
|
title: ele.Name,
|
||||||
|
map: self.map
|
||||||
|
});
|
||||||
|
self.markers["|" + ele.Latitudine+ "|" + ele.Longitudine+ "|"] = marker;
|
||||||
|
|
||||||
|
var infowindow = new google.maps.InfoWindow({
|
||||||
|
content: self.infoWindowtemplate({item: ele})
|
||||||
|
});
|
||||||
|
|
||||||
|
marker.addListener('click', function() {
|
||||||
|
infowindow.open(self.map, marker);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
var defaultLatLng = new google.maps.LatLng(34.0983425, -118.3267434); // Default to Hollywood, CA when no geolocation support
|
||||||
|
if ( navigator.geolocation ) {
|
||||||
|
function success(pos) {
|
||||||
|
// Location found, show map with these coordinates
|
||||||
|
drawMap(new google.maps.LatLng(pos.coords.latitude, pos.coords.longitude));
|
||||||
|
}
|
||||||
|
function fail(error) {
|
||||||
|
drawMap(defaultLatLng); // Failed to find location, show default map
|
||||||
|
}
|
||||||
|
// Find the users current position. Cache the location for 5 minutes, timeout after 6 seconds
|
||||||
|
navigator.geolocation.getCurrentPosition(success, fail, {maximumAge: 500000, enableHighAccuracy:true, timeout: 6000});
|
||||||
|
} else {
|
||||||
|
drawMap(defaultLatLng); // No geolocation support, show default map
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//render the content into div of view
|
||||||
|
render: function () {
|
||||||
|
if (this.created === true)
|
||||||
|
{
|
||||||
|
//this.header.title = "pippo";
|
||||||
|
MapsView.__super__.render.call(this);
|
||||||
|
//this.el is the root element of Backbone.View. By default, it is a div.
|
||||||
|
//$el is cached jQuery object for the view's element.
|
||||||
|
//append the compiled template into view div container
|
||||||
|
this.$el.append(this.header.$el);
|
||||||
|
this.$el.append(this.template({app: myManifest, profile: Profile}));
|
||||||
|
this.$el.append(this.footer.$el);
|
||||||
|
this.$el.find("#infoBtn").addClass("ui-btn-active");
|
||||||
|
}
|
||||||
|
//$("#homeBtn").addClass("ui-btn-active");
|
||||||
|
//return to enable chained calls
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return MapsView;
|
||||||
|
});
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<div data-role="content">
|
||||||
|
<div id="map-canvas" style="height: 100%; width: 350px;">
|
||||||
|
<!-- map loads here... -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -5,6 +5,7 @@ define(['jquery', 'underscore', 'backbone','text!modules/settings/settingsViewTe
|
|||||||
|
|
||||||
//initialize template
|
//initialize template
|
||||||
template:_.template(settingsViewTemplate),
|
template:_.template(settingsViewTemplate),
|
||||||
|
_flagSave: false,
|
||||||
|
|
||||||
initialize: function () {
|
initialize: function () {
|
||||||
var self = this;
|
var self = this;
|
||||||
@@ -18,6 +19,12 @@ define(['jquery', 'underscore', 'backbone','text!modules/settings/settingsViewTe
|
|||||||
},
|
},
|
||||||
|
|
||||||
saveBtn:function(e){
|
saveBtn:function(e){
|
||||||
|
var self = this;
|
||||||
|
|
||||||
|
if(self._flagSave)
|
||||||
|
return;
|
||||||
|
|
||||||
|
self._flagSave = true;
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
Profile.data.risRic = this.$el.find('#nResult').val();
|
Profile.data.risRic = this.$el.find('#nResult').val();
|
||||||
Profile.data.tema = this.$el.find('#theme').val();
|
Profile.data.tema = this.$el.find('#theme').val();
|
||||||
@@ -33,6 +40,26 @@ define(['jquery', 'underscore', 'backbone','text!modules/settings/settingsViewTe
|
|||||||
Profile.data.dataSpacc.tipopm = this.$el.find('#tPM').val();
|
Profile.data.dataSpacc.tipopm = this.$el.find('#tPM').val();
|
||||||
Profile.data.dataSpacc.privacy = this.$el.find('#privacyChk').prop('checked')?"1":"0";
|
Profile.data.dataSpacc.privacy = this.$el.find('#privacyChk').prop('checked')?"1":"0";
|
||||||
|
|
||||||
|
if(Profile.data.email === "" ||
|
||||||
|
Profile.data.dataSpacc.provincia === "" ||
|
||||||
|
Profile.data.dataSpacc.comune === "" ||
|
||||||
|
Profile.data.dataSpacc.cap === "" ||
|
||||||
|
Profile.data.dataSpacc.tipopm === "")
|
||||||
|
{
|
||||||
|
this.$el.find('#messaggio').html("<center><h1>ATTENZIONE</h1> devono essere settate tutte i campi</center>");
|
||||||
|
this.$el.find('#popupDialog').popup("open");
|
||||||
|
self._flagSave = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(Profile.data.dataSpacc.privacy==="0")
|
||||||
|
{
|
||||||
|
this.$el.find('#messaggio').html("<center><h1>ATTENZIONE</h1> per proseguire si DEVE accettare l'informativa privacy</center>");
|
||||||
|
this.$el.find('#popupDialog').popup("open");
|
||||||
|
self._flagSave = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "http://maps.google.com/maps/api/geocode/json?address=" +
|
url: "http://maps.google.com/maps/api/geocode/json?address=" +
|
||||||
Profile.data.dataSpacc.comune + "+" +
|
Profile.data.dataSpacc.comune + "+" +
|
||||||
@@ -40,14 +67,23 @@ define(['jquery', 'underscore', 'backbone','text!modules/settings/settingsViewTe
|
|||||||
Profile.data.dataSpacc.provincia + "+italia&sensor=false",
|
Profile.data.dataSpacc.provincia + "+italia&sensor=false",
|
||||||
Type: "GET"
|
Type: "GET"
|
||||||
}).then(function ( response ) {
|
}).then(function ( response ) {
|
||||||
|
if(response.results.length == 1)
|
||||||
|
{
|
||||||
|
Profile.data.dataSpacc.lat = response.results[0].geometry.location.lat;
|
||||||
|
Profile.data.dataSpacc.long = response.results[0].geometry.location.lng;
|
||||||
|
Profile.updateProfile(function(){
|
||||||
|
self._flagSave = false;
|
||||||
|
Backbone.history.loadUrl(Backbone.history.getFragment());
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Profile.updateProfile(function(){
|
Profile.updateProfile(function(){
|
||||||
Backbone.history.loadUrl();
|
self._flagSave = false;
|
||||||
|
Backbone.history.loadUrl(Backbone.history.getFragment());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -151,6 +151,7 @@
|
|||||||
<select name="tPM" id="tPM">
|
<select name="tPM" id="tPM">
|
||||||
<option value="1" selected="true">Solida</option>
|
<option value="1" selected="true">Solida</option>
|
||||||
<option value="2">Liquida/Licoli</option>
|
<option value="2">Liquida/Licoli</option>
|
||||||
|
<option value="3">Entrambe</option>
|
||||||
</select>
|
</select>
|
||||||
<label>Infomativa privacy, AUTORIZZAZIONE DATI PERSONALI
|
<label>Infomativa privacy, AUTORIZZAZIONE DATI PERSONALI
|
||||||
ai sensi e per gli effetti degli artt. 13 e 23 del D.Lgs. n. 196/2003, acconsento al trattamento e alla pubblicazione dei dati personali forniti a seguito della
|
ai sensi e per gli effetti degli artt. 13 e 23 del D.Lgs. n. 196/2003, acconsento al trattamento e alla pubblicazione dei dati personali forniti a seguito della
|
||||||
@@ -165,4 +166,16 @@ segnalazione inoltrata.</label>
|
|||||||
Impostazione di sincronizzazione
|
Impostazione di sincronizzazione
|
||||||
<a id="syncBtn" href="#syncView" button="true" class="ui-link ui-btn ui-icon-custom ui-btn-icon-left">Sincronizzazione</a>
|
<a id="syncBtn" href="#syncView" button="true" class="ui-link ui-btn ui-icon-custom ui-btn-icon-left">Sincronizzazione</a>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div data-role="popup" id="popupDialog">
|
||||||
|
<div data-role="header">
|
||||||
|
<h1>Avvertimento</h1>
|
||||||
|
</div>
|
||||||
|
<div role="main" class="ui-content">
|
||||||
|
<p id="messaggio" style="text-align: center;font-style: italic;">
|
||||||
|
</p>
|
||||||
|
<p style="text-align: center;">
|
||||||
|
<a href="" class="ui-btn ui-corner-all ui-shadow ui-btn-inline ui-icon-check" data-rel="back">Ok</a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
+8
-2
@@ -2,7 +2,7 @@ define(['jquery', 'underscore', 'backbone',
|
|||||||
'modules/home/home', 'modules/faq/faq', 'modules/index/index', 'modules/category/category', 'modules/item/item',
|
'modules/home/home', 'modules/faq/faq', 'modules/index/index', 'modules/category/category', 'modules/item/item',
|
||||||
'modules/about/about', 'modules/search/search', 'modules/search/found', 'modules/more/more', 'modules/note/note',
|
'modules/about/about', 'modules/search/search', 'modules/search/found', 'modules/more/more', 'modules/note/note',
|
||||||
'modules/sync/sync', 'modules/converter/converter', 'modules/donation/donation', 'modules/settings/settings',
|
'modules/sync/sync', 'modules/converter/converter', 'modules/donation/donation', 'modules/settings/settings',
|
||||||
'modules/debug/debug',
|
'modules/debug/debug','modules/maps/maps',
|
||||||
'model/note/noteCollection', 'model/category/categoryCollection', 'model/categoryItem/categoryItemCollection',
|
'model/note/noteCollection', 'model/category/categoryCollection', 'model/categoryItem/categoryItemCollection',
|
||||||
'model/item/itemCollection', 'model/item/ingredientiCollection', 'model/categoryItem/foundItemCollection',
|
'model/item/itemCollection', 'model/item/ingredientiCollection', 'model/categoryItem/foundItemCollection',
|
||||||
'classes/cache', 'libs/fastclick',
|
'classes/cache', 'libs/fastclick',
|
||||||
@@ -11,7 +11,7 @@ define(['jquery', 'underscore', 'backbone',
|
|||||||
HomeView, FaqView, IndexView, CategoryView, ItemView,
|
HomeView, FaqView, IndexView, CategoryView, ItemView,
|
||||||
AboutView, SearchView, FoundView, MoreView, NoteView,
|
AboutView, SearchView, FoundView, MoreView, NoteView,
|
||||||
SyncView, ConverterView, DonationView, SettingsView,
|
SyncView, ConverterView, DonationView, SettingsView,
|
||||||
DebugView,
|
DebugView, MapsView,
|
||||||
NoteCollection, CategoryCollection, CategoryItemCollection,
|
NoteCollection, CategoryCollection, CategoryItemCollection,
|
||||||
ItemCollection, IngredientiCollection, FoundItemCollection,
|
ItemCollection, IngredientiCollection, FoundItemCollection,
|
||||||
Cache, FastClick) {
|
Cache, FastClick) {
|
||||||
@@ -53,6 +53,7 @@ define(['jquery', 'underscore', 'backbone',
|
|||||||
'syncView(/)*founded': 'showSync',
|
'syncView(/)*founded': 'showSync',
|
||||||
'noteView': 'showNote',
|
'noteView': 'showNote',
|
||||||
'searchView': 'showSearch',
|
'searchView': 'showSearch',
|
||||||
|
'mapsView': 'showMaps',
|
||||||
'debugView': 'showDebug',
|
'debugView': 'showDebug',
|
||||||
'settingsView': 'showSettings',
|
'settingsView': 'showSettings',
|
||||||
'donationView': 'showDonation',
|
'donationView': 'showDonation',
|
||||||
@@ -163,6 +164,11 @@ define(['jquery', 'underscore', 'backbone',
|
|||||||
debugView.render();
|
debugView.render();
|
||||||
this.changePage(debugView);
|
this.changePage(debugView);
|
||||||
},
|
},
|
||||||
|
showMaps: function(){
|
||||||
|
var mapsView = new MapsView();
|
||||||
|
mapsView.render();
|
||||||
|
this.changePage(mapsView);
|
||||||
|
},
|
||||||
showSearch: function () {
|
showSearch: function () {
|
||||||
var categories = new CategoryCollection();
|
var categories = new CategoryCollection();
|
||||||
// will render home view and navigate to homeView
|
// will render home view and navigate to homeView
|
||||||
|
|||||||
Reference in New Issue
Block a user