Compare commits
6
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
752046fd09 | ||
|
|
507ba6f2b7 | ||
|
|
3732d06a0c | ||
|
|
342b485088 | ||
|
|
133cc438a8 | ||
|
|
dd76c9dc52 |
@@ -25,12 +25,12 @@ AddOutputFilterByType DEFLATE text/css application/x-javascript text/html text/r
|
|||||||
<ifModule mod_rewrite.c>
|
<ifModule mod_rewrite.c>
|
||||||
RewriteEngine On
|
RewriteEngine On
|
||||||
RewriteRule ^index.html$ index.php [L]
|
RewriteRule ^index.html$ index.php [L]
|
||||||
RewriteRule ^js/libs/(.*)\.[0-9]+\.js$ /WebClient_Manut/js/libs/$1.js [L]
|
RewriteRule ^js/libs/(.*)\.[0-9]+\.js$ /WebClient/js/libs/$1.js [L]
|
||||||
RewriteRule ^js/(.*)\.[0-9]+\.js$ /WebClient_Manut/js/$1.js [L]
|
RewriteRule ^js/(.*)\.[0-9]+\.js$ /WebClient/js/$1.js [L]
|
||||||
RewriteRule ^css/(.*)\.[0-9]+\.css$ /WebClient_Manut/css/$1.css [L]
|
RewriteRule ^css/(.*)\.[0-9]+\.css$ /WebClient/css/$1.css [L]
|
||||||
RewriteRule ^Resources/img/(.*)\.[0-9]+\.png$ /WebClient_Manut/Resources/img/$1.png [L]
|
RewriteRule ^Resources/img/(.*)\.[0-9]+\.png$ /WebClient/Resources/img/$1.png [L]
|
||||||
RewriteRule ^Resources/img/(.*)\.[0-9]+\.gif$ /WebClient_Manut/Resources/img/$1.gif [L]
|
RewriteRule ^Resources/img/(.*)\.[0-9]+\.gif$ /WebClient/Resources/img/$1.gif [L]
|
||||||
RewriteRule ^Resources/icons/(.*)\.[0-9]+\.png$ /WebClient_Manut/Resources/icons/$1.png [L]
|
RewriteRule ^Resources/icons/(.*)\.[0-9]+\.png$ /WebClient/Resources/icons/$1.png [L]
|
||||||
</ifModule>
|
</ifModule>
|
||||||
|
|
||||||
<ifModule mod_headers.c>
|
<ifModule mod_headers.c>
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
baseUrl: "js",
|
baseUrl: "js",
|
||||||
//- this is the directory that the new files will be. it will be created if it doesn't exist
|
//- this is the directory that the new files will be. it will be created if it doesn't exist
|
||||||
dir: "./app-build_prod",
|
dir: "./app-build_prod",
|
||||||
|
removeCombined: true,
|
||||||
paths: {
|
paths: {
|
||||||
jquery: 'empty:',
|
jquery: 'empty:',
|
||||||
underscore: 'libs/underscore-min',
|
underscore: 'libs/underscore-min',
|
||||||
|
|||||||
+9
-6
@@ -234,16 +234,19 @@ label.error {
|
|||||||
border-bottom-right-radius: inherit;
|
border-bottom-right-radius: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
.thmbImg
|
.imageRic{
|
||||||
{
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
max-width: 5em;
|
||||||
border-right: 2px solid #cdcdcd!important;
|
border-right: 2px solid #cdcdcd!important;
|
||||||
width: 80px;
|
width: 80px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAMAAAC5zwKfAAAATlBMVEUAAADT09PMzMy+vr7KysrPz8/Q0NDOzs7V1dXY2NjS0tK7u7vJycnExMTCwsK2trba2tq/v7/i4uLb29vGxsaysrLc3NysrKympqafn5/59uVfAAAAAXRSTlMAQObYZgAAATlJREFUWMPt18luwzAMRVHzWSKpwUPsTP3/H23iIAWstJtSCLLQ2Qjg4kIrgeqapmma5h3S6AQ/fJ6MPReUxT8xYhhMvahMyO4uu5xdFKgYemlm7AYXFpCh6CMXkxxhKZIeislAAAj/DlL6JWi4I1H/GiyKdYIgrhQ8RjwoKgWDbIDQVwmeVr7z5CWagqXkvNqCpUnJEgSkvCJZgkp8Loq9JTgoAKoY/FoAaMVgtwRejzWD3RHPZ2eZrMG9OUjdIEs41QwmBY1Vgu5xSIQsNYK08v24rgDOV3twDG57/9QDYJiDUwBAmFzEjag56Ag3HBibcDEGT4odGoxBnmknkDGYDv3OOBmDrz4pmLo/JCLbslQ6KNnWuRJHb1o4S+A5GVbiQgaxRsvSXhDW4EzfioK4MXVN0zRN8wbf0o0Kwdr1WXcAAAAASUVORK5CYII=') 50% 50% no-repeat;
|
||||||
|
background-size: 80px 80px;
|
||||||
}
|
}
|
||||||
|
.contentItem{
|
||||||
.emptyItemList
|
padding-left: 80px;
|
||||||
{
|
|
||||||
content:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAMAAAC5zwKfAAAATlBMVEUAAADT09PMzMy+vr7KysrPz8/Q0NDOzs7V1dXY2NjS0tK7u7vJycnExMTCwsK2trba2tq/v7/i4uLb29vGxsaysrLc3NysrKympqafn5/59uVfAAAAAXRSTlMAQObYZgAAATlJREFUWMPt18luwzAMRVHzWSKpwUPsTP3/H23iIAWstJtSCLLQ2Qjg4kIrgeqapmma5h3S6AQ/fJ6MPReUxT8xYhhMvahMyO4uu5xdFKgYemlm7AYXFpCh6CMXkxxhKZIeislAAAj/DlL6JWi4I1H/GiyKdYIgrhQ8RjwoKgWDbIDQVwmeVr7z5CWagqXkvNqCpUnJEgSkvCJZgkp8Loq9JTgoAKoY/FoAaMVgtwRejzWD3RHPZ2eZrMG9OUjdIEs41QwmBY1Vgu5xSIQsNYK08v24rgDOV3twDG57/9QDYJiDUwBAmFzEjag56Ag3HBibcDEGT4odGoxBnmknkDGYDv3OOBmDrz4pmLo/JCLbslQ6KNnWuRJHb1o4S+A5GVbiQgaxRsvSXhDW4EzfioK4MXVN0zRN8wbf0o0Kwdr1WXcAAAAASUVORK5CYII=')
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.freewallGallery {
|
.freewallGallery {
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Binary file not shown.
|
After Width: | Height: | Size: 26 KiB |
@@ -8,6 +8,16 @@
|
|||||||
<meta name="mobile-web-app-capable" content="yes">
|
<meta name="mobile-web-app-capable" content="yes">
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
<meta name="format-detection" content="telephone=no">
|
<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 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" />
|
||||||
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css" >
|
<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 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'>
|
<link href='http://fonts.googleapis.com/css?family=Pompiere' rel='stylesheet' type='text/css'>
|
||||||
|
|||||||
@@ -1,82 +0,0 @@
|
|||||||
/*
|
|
||||||
* To change this license header, choose License Headers in Project Properties.
|
|
||||||
* To change this template file, choose Tools | Templates
|
|
||||||
* and open the template in the editor.
|
|
||||||
*/
|
|
||||||
|
|
||||||
define(['jquery', 'backbone'],
|
|
||||||
function ($, Backbone) {
|
|
||||||
|
|
||||||
var Images = {
|
|
||||||
prefix: "images",
|
|
||||||
getThumb: function (id) {
|
|
||||||
var val = this._get(id);
|
|
||||||
if(val.thumb !== "")
|
|
||||||
return val.thumb;
|
|
||||||
|
|
||||||
var response = $.ajax({
|
|
||||||
url: myManifest.Settings.DefaultURL + "/api/photo/thumbnail/" + id + "/1",
|
|
||||||
type: 'GET',
|
|
||||||
async: false
|
|
||||||
}).responseText;
|
|
||||||
val.thumb = response;
|
|
||||||
this._set(id, val);
|
|
||||||
return val.thumb;
|
|
||||||
},
|
|
||||||
getMedium: function (id) {
|
|
||||||
var val = this._get(id);
|
|
||||||
if(val.medium !== "")
|
|
||||||
return val.medium;
|
|
||||||
|
|
||||||
var response = $.ajax({
|
|
||||||
url: myManifest.Settings.DefaultURL + "/api/photo/medium/" + id + "/1",
|
|
||||||
type: 'GET',
|
|
||||||
async: false
|
|
||||||
}).responseText;
|
|
||||||
val.medium = response;
|
|
||||||
this._set(id, val);
|
|
||||||
return val.medium;
|
|
||||||
},
|
|
||||||
getFull: function (id) {
|
|
||||||
var val = this._get(id);
|
|
||||||
if(val.full !== "")
|
|
||||||
return val.full;
|
|
||||||
|
|
||||||
var response = $.ajax({
|
|
||||||
url: myManifest.Settings.DefaultURL + "/api/photo/" + id + "/1",
|
|
||||||
type: 'GET',
|
|
||||||
async: false
|
|
||||||
}).responseText;
|
|
||||||
val.full = response;
|
|
||||||
this._set(id, val);
|
|
||||||
return val.full;
|
|
||||||
},
|
|
||||||
_set:function(id, item){
|
|
||||||
var list = JSON.parse(window.localStorage.getItem(this.prefix));
|
|
||||||
if(list !== null)
|
|
||||||
{
|
|
||||||
list[id] = item;
|
|
||||||
window.localStorage.setItem(this.prefix, JSON.stringify(list));
|
|
||||||
}
|
|
||||||
},
|
|
||||||
_get:function(id){
|
|
||||||
var ret = null;
|
|
||||||
var item = JSON.parse(window.localStorage.getItem(this.prefix));
|
|
||||||
if(item === null){
|
|
||||||
item = {};
|
|
||||||
window.localStorage.setItem(this.prefix, JSON.stringify(item));
|
|
||||||
ret = { thumb: "", medium: "", full:""};
|
|
||||||
}
|
|
||||||
else if(item[id] === undefined){
|
|
||||||
ret = { thumb: "", medium: "", full:""};
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
ret = item[id];
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
return Images;
|
|
||||||
});
|
|
||||||
+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: "3.0.1.5",
|
Version: "3.0.4.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"),
|
||||||
|
|||||||
@@ -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;
|
|
||||||
});
|
|
||||||
|
|
||||||
@@ -7,6 +7,7 @@ function ($, _, Backbone){
|
|||||||
ricetta_id: "",
|
ricetta_id: "",
|
||||||
titolo: '',
|
titolo: '',
|
||||||
autore: '',
|
autore: '',
|
||||||
|
firstImage: "",
|
||||||
valutazione: 0,
|
valutazione: 0,
|
||||||
difficolta: 0,
|
difficolta: 0,
|
||||||
categoria_name: 0
|
categoria_name: 0
|
||||||
|
|||||||
@@ -10,7 +10,8 @@ define(['app', 'jquery', 'underscore', 'backbone', 'model/categoryItem/searchIte
|
|||||||
this.dataFilter = {
|
this.dataFilter = {
|
||||||
titolo: options.titolo,
|
titolo: options.titolo,
|
||||||
difficolta: options.difficolta,
|
difficolta: options.difficolta,
|
||||||
categoryId: options.categoryId
|
categoryId: options.categoryId,
|
||||||
|
autore: options.autore
|
||||||
};
|
};
|
||||||
this.numItems = options.nResult;
|
this.numItems = options.nResult;
|
||||||
this.indexItems = options.indexItems;
|
this.indexItems = options.indexItems;
|
||||||
@@ -32,7 +33,7 @@ define(['app', 'jquery', 'underscore', 'backbone', 'model/categoryItem/searchIte
|
|||||||
this.numItems +
|
this.numItems +
|
||||||
"/" + this.indexItems +
|
"/" + this.indexItems +
|
||||||
"/" + this.dataFilter.categoryId +
|
"/" + this.dataFilter.categoryId +
|
||||||
"/" + this.dataFilter.difficolta;
|
"/" + this.dataFilter.difficolta+ "/" + this.dataFilter.autore;
|
||||||
if(this.dataFilter.titolo !== null)
|
if(this.dataFilter.titolo !== null)
|
||||||
u += "/" + this.dataFilter.titolo;
|
u += "/" + this.dataFilter.titolo;
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ function ($, _, Backbone){
|
|||||||
ricetta_id: "",
|
ricetta_id: "",
|
||||||
titolo: '',
|
titolo: '',
|
||||||
autore: '',
|
autore: '',
|
||||||
|
firstImage: "",
|
||||||
valutazione: 0,
|
valutazione: 0,
|
||||||
difficolta: 0,
|
difficolta: 0,
|
||||||
categoria_name: 0
|
categoria_name: 0
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
define(['jquery', 'underscore', 'backbone', 'text!modules/category/categoryViewTemplate.html',
|
define(['jquery', 'underscore', 'backbone', 'text!modules/category/categoryViewTemplate.html',
|
||||||
'text!modules/category/categoryItemTemplate.html', 'modules/base/baseView', 'libs/fastclick', 'classes/debug', 'classes/images'],
|
'text!modules/category/categoryItemTemplate.html', 'modules/base/baseView', 'libs/fastclick', 'classes/debug'],
|
||||||
function ($, _, Backbone, categoryViewTemplate, categoryItemTemplate, BaseView, FastClick, Debug, Images) {
|
function ($, _, Backbone, categoryViewTemplate, categoryItemTemplate, BaseView, FastClick, Debug) {
|
||||||
|
|
||||||
var CategoryView = BaseView.extend({
|
var CategoryView = BaseView.extend({
|
||||||
collection: null,
|
collection: null,
|
||||||
@@ -39,7 +39,7 @@ define(['jquery', 'underscore', 'backbone', 'text!modules/category/categoryViewT
|
|||||||
});*/
|
});*/
|
||||||
html = this.itemtemplate({
|
html = this.itemtemplate({
|
||||||
items: this.collection.toJSON(),
|
items: this.collection.toJSON(),
|
||||||
images: Images
|
myManifest: myManifest
|
||||||
});
|
});
|
||||||
|
|
||||||
$(html).appendTo($ul).enhanceWithin();
|
$(html).appendTo($ul).enhanceWithin();
|
||||||
|
|||||||
@@ -3,11 +3,12 @@
|
|||||||
<%} else { for (var i = 0; i < data.items.length; i++) { %>
|
<%} else { for (var i = 0; i < data.items.length; i++) { %>
|
||||||
<% var item = data.items[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="#ricetta/<%= item.ricetta_id%>" class="ui-btn ui-btn-icon-right ui-icon-carat-r ui-li-has-thumb">
|
||||||
<% if(item.firstImage === ""){ %>
|
<div class="imageRic">
|
||||||
<!--<img class="thmbImg emptyItemList">-->
|
<% if(item.firstImage !== ""){ %>
|
||||||
<%}else{%>
|
<img src='<%=myManifest.Settings.DefaultURL%>/api/photo/thumbnail/<%=item.firstImage%>'>
|
||||||
<!--<img class="thmbImg" src='<%=data.images.getThumb(item.firstImage)%>'>-->
|
|
||||||
<%}%>
|
<%}%>
|
||||||
|
</div>
|
||||||
|
<div class="contentItem">
|
||||||
<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>
|
||||||
@@ -28,5 +29,6 @@
|
|||||||
<div data-role="none" title="Molto Difficile">5</div>
|
<div data-role="none" title="Molto Difficile">5</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</a></li>
|
</a></li>
|
||||||
<% }} %>
|
<% }} %>
|
||||||
+13
-13
@@ -1,5 +1,5 @@
|
|||||||
define(['jquery', 'underscore', 'backbone', 'text!modules/item/itemViewTemplate.html', 'modules/base/baseView', 'classes/profile', 'classes/images', 'jQueryPlugins'],
|
define(['jquery', 'underscore', 'backbone', 'text!modules/item/itemViewTemplate.html', 'modules/base/baseView', 'classes/profile', 'jQueryPlugins'],
|
||||||
function ($, _, Backbone, itemViewTemplate, BaseView, Profile, Images) {
|
function ($, _, Backbone, itemViewTemplate, BaseView, Profile) {
|
||||||
|
|
||||||
var ItemView = BaseView.extend({
|
var ItemView = BaseView.extend({
|
||||||
collRicetta: null,
|
collRicetta: null,
|
||||||
@@ -58,7 +58,7 @@ define(['jquery', 'underscore', 'backbone', 'text!modules/item/itemViewTemplate.
|
|||||||
var self = this;
|
var self = this;
|
||||||
$('body').scrollTop(0);
|
$('body').scrollTop(0);
|
||||||
|
|
||||||
/*this.galleryWall = new Freewall("#Gallery");
|
this.galleryWall = new Freewall("#Gallery");
|
||||||
this.galleryWall.reset({
|
this.galleryWall.reset({
|
||||||
selector: '.brick',
|
selector: '.brick',
|
||||||
animate: true,
|
animate: true,
|
||||||
@@ -69,12 +69,10 @@ define(['jquery', 'underscore', 'backbone', 'text!modules/item/itemViewTemplate.
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var imgurl = Images.getThumb(48);*/
|
var images = this.galleryWall.container.find('.brick');
|
||||||
|
|
||||||
/*var images = this.galleryWall.container.find('.brick');
|
|
||||||
images.find('img').load(function() {
|
images.find('img').load(function() {
|
||||||
self.galleryWall.fitWidth();
|
self.galleryWall.fitWidth();
|
||||||
});*/
|
});
|
||||||
|
|
||||||
|
|
||||||
$.mobile.loading('hide');
|
$.mobile.loading('hide');
|
||||||
@@ -90,18 +88,20 @@ define(['jquery', 'underscore', 'backbone', 'text!modules/item/itemViewTemplate.
|
|||||||
var countImgLoaded = 0;
|
var countImgLoaded = 0;
|
||||||
Profile.existRicettaBloccoNote(ric.ricetta_id,
|
Profile.existRicettaBloccoNote(ric.ricetta_id,
|
||||||
function (exist) {
|
function (exist) {
|
||||||
|
|
||||||
|
var ric = self.collRicetta.toJSON()[0];
|
||||||
|
|
||||||
self.$el.append(self.template({
|
self.$el.append(self.template({
|
||||||
ricetta: self.collRicetta.toJSON()[0],
|
ricetta: ric,
|
||||||
ingredienti: self.collIngredienti.toJSON(),
|
ingredienti: self.collIngredienti.toJSON(),
|
||||||
profile: Profile,
|
profile: Profile,
|
||||||
//images: Images,
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
self.scrollPositions = [];
|
self.scrollPositions = [];
|
||||||
self.$arrayContent = self.$el.find('div[data-role="content"]');
|
self.$arrayContent = self.$el.find('div[data-role="content"]');
|
||||||
self.$arrayNavBar = self.$el.find('div[data-role="navbar"] a');
|
self.$arrayNavBar = self.$el.find('div[data-role="navbar"] a');
|
||||||
|
|
||||||
/*self.$photos = self.$el.find('#contentFoto a');
|
self.$photos = self.$el.find('#contentFoto a');
|
||||||
self.$el.find('#contentFoto a img').load(function(){
|
self.$el.find('#contentFoto a img').load(function(){
|
||||||
countImgLoaded++;
|
countImgLoaded++;
|
||||||
if(self.$photos.length == countImgLoaded)
|
if(self.$photos.length == countImgLoaded)
|
||||||
@@ -127,7 +127,7 @@ define(['jquery', 'underscore', 'backbone', 'text!modules/item/itemViewTemplate.
|
|||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
*/
|
|
||||||
for (var i = self.$arrayContent.length - 1; i >= 0; i--) {
|
for (var i = self.$arrayContent.length - 1; i >= 0; i--) {
|
||||||
self.scrollPositions.push(0);
|
self.scrollPositions.push(0);
|
||||||
};
|
};
|
||||||
@@ -181,8 +181,8 @@ define(['jquery', 'underscore', 'backbone', 'text!modules/item/itemViewTemplate.
|
|||||||
$(this.$arrayContent[this.indexContent]).show();
|
$(this.$arrayContent[this.indexContent]).show();
|
||||||
$(this.$arrayNavBar[this.indexContent]).addClass('ui-btn-active');
|
$(this.$arrayNavBar[this.indexContent]).addClass('ui-btn-active');
|
||||||
$(this.$arrayNavBar[this.indexContent]).addClass('ui-state-persist');
|
$(this.$arrayNavBar[this.indexContent]).addClass('ui-state-persist');
|
||||||
/*if(this.indexContent == 2)
|
if(this.indexContent == 2)
|
||||||
this.galleryWall.fitWidth();*/
|
this.galleryWall.fitWidth();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return ItemView;
|
return ItemView;
|
||||||
|
|||||||
@@ -34,25 +34,26 @@
|
|||||||
<p id='procedimento'><%= ricetta.procedimento%></p>
|
<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>
|
<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>
|
||||||
<!--<div id="contentFoto" data-role="content" style="display: none;">
|
<div id="contentFoto" data-role="content" style="display: none;">
|
||||||
<h1>Foto</h1>
|
<h1>Foto</h1>
|
||||||
<div id="Gallery" class="freewallGallery">
|
<div id="Gallery" class="freewallGallery">
|
||||||
<% _.each(ricetta.foto, function(fotoID) {%>
|
<% _.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 class='brick' style='width:<%=widthImg%>px;'><a id="photo_<%=fotoID.ID%>" data-role="none" data-photoid="<%=fotoID.ID%>" href="">
|
||||||
|
<img src='<%=myManifest.Settings.DefaultURL%>/api/photo/medium/<%=fotoID.ID%>' class="imageborder imageborder-<%=profile.data.tema%>"></a></div>
|
||||||
<%});%>
|
<%});%>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="contentVideo" data-role="content" data-theme="d" style="display: none;" data-iscroll>
|
<div id="contentVideo" data-role="content" data-theme="d" style="display: none;" data-iscroll>
|
||||||
<h1>Video</h1>
|
<h1>Video</h1>
|
||||||
<p id='video'></p>
|
<p id='video'></p>
|
||||||
</div>-->
|
</div>
|
||||||
<div data-role="footer" data-position="fixed" data-tap-toggle="false">
|
<div data-role="footer" data-position="fixed" data-tap-toggle="false">
|
||||||
<div data-role="navbar">
|
<div data-role="navbar">
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="" class="ui-btn-active ui-state-persist">Ingredienti</a></li>
|
<li><a href="" class="ui-btn-active ui-state-persist">Ingredienti</a></li>
|
||||||
<li><a href="">Procedimento</a></li>
|
<li><a href="">Procedimento</a></li>
|
||||||
<!--<li><a href="">Foto</a></li>
|
<li><a href="">Foto</a></li>
|
||||||
<li><a href="">Video</a></li>-->
|
<!--<li><a href="">Video</a></li>-->
|
||||||
</ul>
|
</ul>
|
||||||
</div><!-- /navbar -->
|
</div><!-- /navbar -->
|
||||||
<% if(ricetta.autore.length > 0){ %>
|
<% if(ricetta.autore.length > 0){ %>
|
||||||
|
|||||||
@@ -2,7 +2,33 @@
|
|||||||
<h1>Nessuna ricetta trovata</h1>
|
<h1>Nessuna ricetta trovata</h1>
|
||||||
<%} 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 ui-li-has-thumb">
|
||||||
<div class='ricettaTitolo'><%= unescape(item.titolo) %> - <%= unescape(item.categoria_name) %></div><div class='ricettaAutore'><%= unescape(item.autore) %></div>
|
<div class="imageRic">
|
||||||
</a></li>
|
<% if(item.firstImage !== ""){ %>
|
||||||
|
<img src='<%=myManifest.Settings.DefaultURL%>/api/photo/thumbnail/<%=item.firstImage%>'>
|
||||||
|
<%}%>
|
||||||
|
</div>
|
||||||
|
<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.: </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>
|
||||||
|
</div>
|
||||||
|
</a></li>
|
||||||
<% }} %>
|
<% }} %>
|
||||||
@@ -9,9 +9,6 @@ define(['jquery', 'underscore', 'backbone','text!modules/search/searchViewTempla
|
|||||||
this.id = "SearchView";
|
this.id = "SearchView";
|
||||||
var self = this;
|
var self = this;
|
||||||
SearchView.__super__.initialize.call(this);
|
SearchView.__super__.initialize.call(this);
|
||||||
this.collection = options.collection;
|
|
||||||
this.collection.fetch({ success: function () { self.render(); } });
|
|
||||||
//this.header.title = "pippo";
|
|
||||||
},
|
},
|
||||||
|
|
||||||
events: {
|
events: {
|
||||||
@@ -21,6 +18,7 @@ define(['jquery', 'underscore', 'backbone','text!modules/search/searchViewTempla
|
|||||||
performSearch: function (e) {
|
performSearch: function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var titolo = $('#titolo').val();
|
var titolo = $('#titolo').val();
|
||||||
|
var autore = $('#autore').val();
|
||||||
var categoria = $('#categoria').val();
|
var categoria = $('#categoria').val();
|
||||||
var nResult = $('#nResult').val();
|
var nResult = $('#nResult').val();
|
||||||
var diffi = $('#difficoltaFrm').serialize();
|
var diffi = $('#difficoltaFrm').serialize();
|
||||||
@@ -28,7 +26,10 @@ define(['jquery', 'underscore', 'backbone','text!modules/search/searchViewTempla
|
|||||||
if (diffi === "") {
|
if (diffi === "") {
|
||||||
diffi = "0";
|
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(){
|
onShowed: function(){
|
||||||
@@ -59,7 +60,7 @@ define(['jquery', 'underscore', 'backbone','text!modules/search/searchViewTempla
|
|||||||
{
|
{
|
||||||
SearchView.__super__.render.call(this);
|
SearchView.__super__.render.call(this);
|
||||||
this.$el.append(this.header.$el);
|
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);
|
this.$el.append(this.footer.$el);
|
||||||
}
|
}
|
||||||
this.$el.find('#nResult').val(Profile.data.risRic);
|
this.$el.find('#nResult').val(Profile.data.risRic);
|
||||||
|
|||||||
@@ -31,14 +31,8 @@
|
|||||||
<option value="50">50</option>
|
<option value="50">50</option>
|
||||||
<option value="100">100</option>
|
<option value="100">100</option>
|
||||||
</select>
|
</select>
|
||||||
<!--
|
<label for="autore">Autore:</label>
|
||||||
<label for="author">Autore:</label>
|
<input type="text" name="autore" id="autore" placeholder="Autore..." value="" data-clear-btn="true" ><br>
|
||||||
<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>-->
|
|
||||||
<br><br>
|
<br><br>
|
||||||
<center><a href="" id="search" button="true" class="ui-btn ui-corner-all">Cerca</a></center>
|
<center><a href="" id="search" button="true" class="ui-btn ui-corner-all">Cerca</a></center>
|
||||||
</div>
|
</div>
|
||||||
+8
-10
@@ -4,7 +4,7 @@ define(['jquery', 'underscore', 'backbone',
|
|||||||
'modules/sync/sync', 'modules/donation/donation','modules/settings/settings',
|
'modules/sync/sync', 'modules/donation/donation','modules/settings/settings',
|
||||||
'modules/debug/debug','modules/maps/maps',
|
'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/authors/authorCollection',
|
'model/item/itemCollection', 'model/item/ingredientiCollection', 'model/categoryItem/foundItemCollection',
|
||||||
'classes/cache', 'libs/fastclick',
|
'classes/cache', 'libs/fastclick',
|
||||||
'jqm', 'jQueryPlugins'],
|
'jqm', 'jQueryPlugins'],
|
||||||
function ($, _, Backbone,
|
function ($, _, Backbone,
|
||||||
@@ -13,7 +13,7 @@ define(['jquery', 'underscore', 'backbone',
|
|||||||
SyncView, DonationView, SettingsView,
|
SyncView, DonationView, SettingsView,
|
||||||
DebugView, MapsView,
|
DebugView, MapsView,
|
||||||
NoteCollection, CategoryCollection, CategoryItemCollection,
|
NoteCollection, CategoryCollection, CategoryItemCollection,
|
||||||
ItemCollection, IngredientiCollection, FoundItemCollection, AuthorCollection,
|
ItemCollection, IngredientiCollection, FoundItemCollection,
|
||||||
Cache, FastClick) {
|
Cache, FastClick) {
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
@@ -57,7 +57,7 @@ define(['jquery', 'underscore', 'backbone',
|
|||||||
'debugView': 'showDebug',
|
'debugView': 'showDebug',
|
||||||
'settingsView': 'showSettings',
|
'settingsView': 'showSettings',
|
||||||
'donationView': 'showDonation',
|
'donationView': 'showDonation',
|
||||||
'search/:nresult/:categoria/:difficolta/*titolo': 'searchFn',
|
'search/:nresult/:categoria/:difficolta/:autore/*titolo': 'searchFn',
|
||||||
'converterView': 'showConverter',
|
'converterView': 'showConverter',
|
||||||
'moreView': 'showMore',
|
'moreView': 'showMore',
|
||||||
'*actions': 'defaultAction' //default action
|
'*actions': 'defaultAction' //default action
|
||||||
@@ -172,14 +172,12 @@ define(['jquery', 'underscore', 'backbone',
|
|||||||
this.changePage(mapsView);
|
this.changePage(mapsView);
|
||||||
},
|
},
|
||||||
showSearch: function () {
|
showSearch: function () {
|
||||||
var authors = new AuthorCollection();
|
var searchView = new SearchView();
|
||||||
// will render home view and navigate to homeView
|
searchView.render();
|
||||||
var searchView = new SearchView({collection: authors});
|
this.changePage(searchView);
|
||||||
//indexView.render();
|
|
||||||
searchView.bind('renderCompleted:Search', this.changePage, this);
|
|
||||||
},
|
},
|
||||||
searchFn: function (nresult, categoria, difficolta, titolo) {
|
searchFn: function (nresult, categoria, difficolta, autore, titolo) {
|
||||||
var foundedItems = new FoundItemCollection({categoryId: categoria, difficolta: difficolta, titolo: titolo, nResult: nresult, indexItems: 0});
|
var foundedItems = new FoundItemCollection({categoryId: categoria, difficolta: difficolta, titolo: titolo, autore: autore, nResult: nresult, indexItems: 0});
|
||||||
var foundView = new FoundView({collection: foundedItems});
|
var foundView = new FoundView({collection: foundedItems});
|
||||||
|
|
||||||
foundView.render();
|
foundView.render();
|
||||||
|
|||||||
Reference in New Issue
Block a user