Compare commits
9
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fca2915242 | ||
|
|
9a8359a8dc | ||
|
|
2affad28f1 | ||
|
|
edb59bed85 | ||
|
|
939e42f8fc | ||
|
|
46a2a29aad | ||
|
|
b205668910 | ||
|
|
327c2e577d | ||
|
|
46023ef8ed |
@@ -21,6 +21,7 @@
|
||||
baseUrl: "js",
|
||||
//- this is the directory that the new files will be. it will be created if it doesn't exist
|
||||
dir: "./app-build_prod",
|
||||
removeCombined: true,
|
||||
paths: {
|
||||
jquery: 'empty:',
|
||||
underscore: 'libs/underscore-min',
|
||||
|
||||
+31
-684
File diff suppressed because one or more lines are too long
Vendored
-217
File diff suppressed because one or more lines are too long
+1
-1
@@ -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");
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -8,6 +8,27 @@
|
||||
<meta name="mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="format-detection" content="telephone=no">
|
||||
<!-- Meta tag per FB-->
|
||||
<meta property="og:locale" content="it_IT"/>
|
||||
<meta property="og:site_name" content="Il Lievitario"/>
|
||||
<meta itemprop="name" content="Home - Il Lievitario"/>
|
||||
<?php
|
||||
$reqURI = $_SERVER['REQUEST_URI'];
|
||||
$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";
|
||||
echo $_SERVER['REQUEST_URI'];
|
||||
if(strpos($reqURI, "/#ricetta/") !== false)
|
||||
{}
|
||||
?>
|
||||
<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:image" content="<?php echo $ogFbImage; ?>"/>
|
||||
<meta property="og:description" content="<?php echo $ogFbDescription; ?>" />
|
||||
<meta property="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'>
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
var myManifest = {
|
||||
Debug: (window.location.port !== ""),
|
||||
Name: "Il Lievitario",
|
||||
Version: "3.0.1.5",
|
||||
Version: "3.0.3.8",
|
||||
Author: "Denis Ironi",
|
||||
Settings: {
|
||||
DefaultURL: (window.location.port === "" ? "http://" + window.location.host + "/Service": "http://" + window.location.hostname + ":" + window.location.port + "/Service_Manut"),
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
define(['app', 'jquery', 'underscore', 'backbone', 'model/authors/authorModel'],
|
||||
function (app, $, _, Backbone, Author) {
|
||||
|
||||
var Authors = Backbone.Collection.extend({
|
||||
// Book is the model of the collection
|
||||
model: Author,
|
||||
url: function () {
|
||||
return myManifest.Settings.DefaultURL + "/api/ricette/authors";
|
||||
}
|
||||
});
|
||||
|
||||
return Authors;
|
||||
});
|
||||
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
define(['jquery', 'underscore', 'backbone'],
|
||||
function ($, _, Backbone){
|
||||
|
||||
var Author=Backbone.Model.extend({
|
||||
//default attributes
|
||||
defaults:{
|
||||
name:''
|
||||
}
|
||||
});
|
||||
|
||||
return Author;
|
||||
});
|
||||
|
||||
@@ -10,7 +10,8 @@ define(['app', 'jquery', 'underscore', 'backbone', 'model/categoryItem/searchIte
|
||||
this.dataFilter = {
|
||||
titolo: options.titolo,
|
||||
difficolta: options.difficolta,
|
||||
categoryId: options.categoryId
|
||||
categoryId: options.categoryId,
|
||||
autore: options.autore
|
||||
};
|
||||
this.numItems = options.nResult;
|
||||
this.indexItems = options.indexItems;
|
||||
@@ -32,7 +33,7 @@ define(['app', 'jquery', 'underscore', 'backbone', 'model/categoryItem/searchIte
|
||||
this.numItems +
|
||||
"/" + this.indexItems +
|
||||
"/" + this.dataFilter.categoryId +
|
||||
"/" + this.dataFilter.difficolta;
|
||||
"/" + this.dataFilter.difficolta+ "/" + this.dataFilter.autore;
|
||||
if(this.dataFilter.titolo !== null)
|
||||
u += "/" + this.dataFilter.titolo;
|
||||
|
||||
|
||||
@@ -90,8 +90,11 @@ define(['jquery', 'underscore', 'backbone', 'text!modules/item/itemViewTemplate.
|
||||
var countImgLoaded = 0;
|
||||
Profile.existRicettaBloccoNote(ric.ricetta_id,
|
||||
function (exist) {
|
||||
|
||||
var ric = self.collRicetta.toJSON()[0];
|
||||
|
||||
self.$el.append(self.template({
|
||||
ricetta: self.collRicetta.toJSON()[0],
|
||||
ricetta: ric,
|
||||
ingredienti: self.collIngredienti.toJSON(),
|
||||
profile: Profile,
|
||||
//images: Images,
|
||||
|
||||
@@ -3,30 +3,14 @@
|
||||
<h3 id='titoloRicetta'><%= unescape(ricetta.titolo)%></h3>
|
||||
<a id="backBtn" href="#" class="nav-glyphish-example ui-btn ui-icon-myHome ui-btn-icon-notext ui-btn-right" data-icon="custom"></a>
|
||||
</div>
|
||||
<%
|
||||
var widthImg = 320;
|
||||
if( myManifest.Agent.device.type != "" )
|
||||
{
|
||||
/*prendo la larghezza del viewport e sottraggo il 10perc, poi divito per le due colonne*/
|
||||
widthImg = (myManifest.Settings.Device.Width - (myManifest.Settings.Device.Width / 10)) / 2;
|
||||
if(widthImg>320)
|
||||
widthImg = 320;
|
||||
}
|
||||
%>
|
||||
<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;">
|
||||
@@ -34,18 +18,6 @@
|
||||
<p id='procedimento'><%= ricetta.procedimento%></p>
|
||||
<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="contentFoto" data-role="content" style="display: none;">
|
||||
<h1>Foto</h1>
|
||||
<div id="Gallery" class="freewallGallery">
|
||||
<% _.each(ricetta.foto, function(fotoID) {%>
|
||||
<div class='brick' style='width:<%=widthImg%>px;'><a id="photo_<%=fotoID.ID%>" data-role="none" data-photoid="<%=fotoID.ID%>" href=""><img src='<%=images.getMedium(fotoID.ID)%>' class="imageborder imageborder-<%=profile.data.tema%>"></a></div>
|
||||
<%});%>
|
||||
</div>
|
||||
</div>
|
||||
<div id="contentVideo" data-role="content" data-theme="d" style="display: none;" data-iscroll>
|
||||
<h1>Video</h1>
|
||||
<p id='video'></p>
|
||||
</div>-->
|
||||
<div data-role="footer" data-position="fixed" data-tap-toggle="false">
|
||||
<div data-role="navbar">
|
||||
<ul>
|
||||
|
||||
@@ -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,7 +2,26 @@
|
||||
<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">
|
||||
<div class='ricettaTitolo'><%= unescape(item.titolo) %> - <%= unescape(item.categoria_name) %></div><div class='ricettaAutore'><%= unescape(item.autore) %></div>
|
||||
<li><a href="#ricetta/<%= item.ricetta_id%>" class="ui-btn ui-btn-icon-right ui-icon-carat-r ui-li-has-thumb">
|
||||
<div class='ricettaTitolo'><%= unescape(item.titolo) %></div>
|
||||
<div class='ricettaAutore'><%= unescape(item.autore) %></div>
|
||||
<br><div class='ricettaAutore'>Diff.: </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>
|
||||
</a></li>
|
||||
<% }} %>
|
||||
@@ -9,9 +9,6 @@ define(['jquery', 'underscore', 'backbone','text!modules/search/searchViewTempla
|
||||
this.id = "SearchView";
|
||||
var self = this;
|
||||
SearchView.__super__.initialize.call(this);
|
||||
this.collection = options.collection;
|
||||
this.collection.fetch({ success: function () { self.render(); } });
|
||||
//this.header.title = "pippo";
|
||||
},
|
||||
|
||||
events: {
|
||||
@@ -21,6 +18,7 @@ define(['jquery', 'underscore', 'backbone','text!modules/search/searchViewTempla
|
||||
performSearch: function (e) {
|
||||
e.preventDefault();
|
||||
var titolo = $('#titolo').val();
|
||||
var autore = $('#autore').val();
|
||||
var categoria = $('#categoria').val();
|
||||
var nResult = $('#nResult').val();
|
||||
var diffi = $('#difficoltaFrm').serialize();
|
||||
@@ -28,7 +26,10 @@ define(['jquery', 'underscore', 'backbone','text!modules/search/searchViewTempla
|
||||
if (diffi === "") {
|
||||
diffi = "0";
|
||||
}
|
||||
Backbone.history.navigate('search/' + nResult + "/"+ categoria + "/" + diffi + "/" + titolo, { trigger: true });
|
||||
if (autore === "" || autore == undefined) {
|
||||
autore = "_";
|
||||
}
|
||||
Backbone.history.navigate('search/' + nResult + "/"+ categoria + "/" + diffi + "/" + autore + "/"+titolo, { trigger: true });
|
||||
},
|
||||
|
||||
onShowed: function(){
|
||||
@@ -59,9 +60,10 @@ define(['jquery', 'underscore', 'backbone','text!modules/search/searchViewTempla
|
||||
{
|
||||
SearchView.__super__.render.call(this);
|
||||
this.$el.append(this.header.$el);
|
||||
this.$el.append(this.template({data:this.collection.toJSON()}));
|
||||
this.$el.append(this.template());
|
||||
this.$el.append(this.footer.$el);
|
||||
}
|
||||
if(Profile.data.risRic)
|
||||
this.$el.find('#nResult').val(Profile.data.risRic);
|
||||
this.trigger("renderCompleted:Search", this);
|
||||
this.$el.find("#searchBtn").addClass("ui-btn-active");
|
||||
|
||||
@@ -31,14 +31,8 @@
|
||||
<option value="50">50</option>
|
||||
<option value="100">100</option>
|
||||
</select>
|
||||
<!--
|
||||
<label for="author">Autore:</label>
|
||||
<select name="author" id="author" >
|
||||
<% for (var i = 0; i < data.length; i++) { %>
|
||||
<% var item = unescape(data[i].autore); %>
|
||||
<option value="<%=item%>"><%=item%></option>
|
||||
<%}%>
|
||||
</select>-->
|
||||
<label for="autore">Autore:</label>
|
||||
<input type="text" name="autore" id="autore" placeholder="Autore..." value="" data-clear-btn="true" ><br>
|
||||
<br><br>
|
||||
<center><a href="" id="search" button="true" class="ui-btn ui-corner-all">Cerca</a></center>
|
||||
</div>
|
||||
@@ -193,6 +193,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
|
||||
@@ -214,6 +225,8 @@ define(['jquery', 'underscore', 'backbone','text!modules/settings/settingsViewTe
|
||||
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();
|
||||
|
||||
+8
-9
@@ -4,7 +4,7 @@ define(['jquery', 'underscore', 'backbone',
|
||||
'modules/sync/sync', 'modules/donation/donation','modules/settings/settings',
|
||||
'modules/debug/debug','modules/maps/maps',
|
||||
'model/note/noteCollection', 'model/category/categoryCollection', 'model/categoryItem/categoryItemCollection',
|
||||
'model/item/itemCollection', 'model/item/ingredientiCollection', 'model/categoryItem/foundItemCollection','model/authors/authorCollection',
|
||||
'model/item/itemCollection', 'model/item/ingredientiCollection', 'model/categoryItem/foundItemCollection',
|
||||
'classes/cache', 'libs/fastclick',
|
||||
'jqm', 'jQueryPlugins'],
|
||||
function ($, _, Backbone,
|
||||
@@ -13,7 +13,7 @@ define(['jquery', 'underscore', 'backbone',
|
||||
SyncView, DonationView, SettingsView,
|
||||
DebugView, MapsView,
|
||||
NoteCollection, CategoryCollection, CategoryItemCollection,
|
||||
ItemCollection, IngredientiCollection, FoundItemCollection, AuthorCollection,
|
||||
ItemCollection, IngredientiCollection, FoundItemCollection,
|
||||
Cache, FastClick) {
|
||||
|
||||
'use strict';
|
||||
@@ -57,7 +57,7 @@ define(['jquery', 'underscore', 'backbone',
|
||||
'debugView': 'showDebug',
|
||||
'settingsView': 'showSettings',
|
||||
'donationView': 'showDonation',
|
||||
'search/:nresult/:categoria/:difficolta/*titolo': 'searchFn',
|
||||
'search/:nresult/:categoria/:difficolta/:autore/*titolo': 'searchFn',
|
||||
'converterView': 'showConverter',
|
||||
'moreView': 'showMore',
|
||||
'*actions': 'defaultAction' //default action
|
||||
@@ -172,14 +172,13 @@ define(['jquery', 'underscore', 'backbone',
|
||||
this.changePage(mapsView);
|
||||
},
|
||||
showSearch: function () {
|
||||
var authors = new AuthorCollection();
|
||||
// will render home view and navigate to homeView
|
||||
var searchView = new SearchView({collection: authors});
|
||||
//indexView.render();
|
||||
searchView.bind('renderCompleted:Search', this.changePage, this);
|
||||
var searchView = new SearchView();
|
||||
searchView.render();
|
||||
this.changePage(searchView);
|
||||
},
|
||||
searchFn: function (nresult, categoria, difficolta, titolo) {
|
||||
var foundedItems = new FoundItemCollection({categoryId: categoria, difficolta: difficolta, titolo: titolo, nResult: nresult, indexItems: 0});
|
||||
searchFn: function (nresult, categoria, difficolta, autore, titolo) {
|
||||
var foundedItems = new FoundItemCollection({categoryId: categoria, difficolta: difficolta, titolo: titolo, autore: autore, nResult: nresult, indexItems: 0});
|
||||
var foundView = new FoundView({collection: foundedItems});
|
||||
|
||||
foundView.render();
|
||||
|
||||
Reference in New Issue
Block a user