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

This commit is contained in:
2016-01-29 16:51:39 +00:00
parent 06e9b5867f
commit 52ea2f542e
10 changed files with 101 additions and 72 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

+28
View File
@@ -233,3 +233,31 @@ label.error {
  -webkit-border-bottom-right-radius: inherit;
  border-bottom-right-radius: inherit;
}
.thmbImg
{
border: 2px solid #cdcdcd!important;
border-radius: 15px;
width: 76px;
height: 76px;
}
.emptyItemList
{
content:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAMAAAC5zwKfAAAATlBMVEUAAADT09PMzMy+vr7KysrPz8/Q0NDOzs7V1dXY2NjS0tK7u7vJycnExMTCwsK2trba2tq/v7/i4uLb29vGxsaysrLc3NysrKympqafn5/59uVfAAAAAXRSTlMAQObYZgAAATlJREFUWMPt18luwzAMRVHzWSKpwUPsTP3/H23iIAWstJtSCLLQ2Qjg4kIrgeqapmma5h3S6AQ/fJ6MPReUxT8xYhhMvahMyO4uu5xdFKgYemlm7AYXFpCh6CMXkxxhKZIeislAAAj/DlL6JWi4I1H/GiyKdYIgrhQ8RjwoKgWDbIDQVwmeVr7z5CWagqXkvNqCpUnJEgSkvCJZgkp8Loq9JTgoAKoY/FoAaMVgtwRejzWD3RHPZ2eZrMG9OUjdIEs41QwmBY1Vgu5xSIQsNYK08v24rgDOV3twDG57/9QDYJiDUwBAmFzEjag56Ag3HBibcDEGT4odGoxBnmknkDGYDv3OOBmDrz4pmLo/JCLbslQ6KNnWuRJHb1o4S+A5GVbiQgaxRsvSXhDW4EzfioK4MXVN0zRN8wbf0o0Kwdr1WXcAAAAASUVORK5CYII=')
}
.freewallGallery {
margin: 15px;
}
.brick img {
margin: 0;
display: block;
}
.imageborder {
border: 2px solid #3b5998!important;
border-radius: 15px;
width: 100%;
}
+24 -58
View File
@@ -1,28 +1,29 @@
/*-------------Customize by Screen Dimensions---------------------*/
@media screen and (orientation:landscape) {
@media screen and (min-width : 320px) and (max-device-width : 736px) and (orientation: portrait){
div.ricettaTitolo{
font-size: 13px;
}
@media only screen
and (min-width : 1700px)
and (max-width : 1980px) {
div.ricettaAutore{
font-size: 12px;
}
}
@media only screen and (min-width : 1700px) and (max-width : 1980px) {
.itemMenuHomeMetro a{
background-size: 250px 250px!important;
height: 300px;
}
}
@media screen
and (min-width : 1281px)
and (max-width : 1700px) {
@media screen and (min-width : 1281px) and (max-width : 1700px) {
.itemMenuHomeMetro a{
background-size: 200px 200px!important;
height: 220px;
}
}
@media screen
and (min-width : 1100px)
and (max-width : 1280px) {
@media screen and (min-width : 1100px) and (max-width : 1280px) {
.itemMenuHomeMetro a{
background-size: 180px 180px!important;
height: 200px;
@@ -32,9 +33,7 @@ and (max-width : 1280px) {
/*
iPhone 5 in portrait & landscape
*/
@media only screen
and (min-device-width : 320px)
and (max-device-width : 568px) {
@media only screen and (min-device-width : 320px) and (max-device-width : 568px) {
.itemMenuHomeMetro {
width: 100px;
height: 100px;
@@ -49,19 +48,14 @@ and (max-device-width : 568px) {
/*
iPhone 2G-4S in portrait & landscape
*/
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
@media only screen and (min-device-width : 320px) and (max-device-width : 480px) {
.itemMenuHomeMetro {
width: 100px;
height: 100px;
}
}
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px)
and (orientation: portrait) {
@media only screen and (min-device-width : 320px) and (max-device-width : 480px) and (orientation: portrait) {
.itemMenuHomeMetro a{
background-size: 70px 70px!important;
@@ -69,10 +63,7 @@ and (orientation: portrait) {
}
}
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px)
and (orientation: landscape){
@media only screen and (min-device-width : 320px) and (max-device-width : 480px) and (orientation: landscape){
.itemMenuHomeMetro a{
background-size: 75px 75px!important;
@@ -83,19 +74,14 @@ and (orientation: landscape){
/*
iPhone 6 in portrait & landscape
*/
@media only screen
and (min-device-width : 375px)
and (max-device-width : 667px) {
@media only screen and (min-device-width : 375px) and (max-device-width : 667px) {
.itemMenuHomeMetro {
width: 100px;
height: 100px;
}
}
@media only screen
and (min-device-width : 375px)
and (max-device-width : 667px)
and (orientation: portrait) {
@media only screen and (min-device-width : 375px) and (max-device-width : 667px) and (orientation: portrait) {
.itemMenuHomeMetro a{
background-size: 85px 85px!important;
@@ -103,10 +89,7 @@ and (orientation: portrait) {
}
}
@media only screen
and (min-device-width : 375px)
and (max-device-width : 667px)
and (orientation: landscape) {
@media only screen and (min-device-width : 375px) and (max-device-width : 667px) and (orientation: landscape) {
.itemMenuHomeMetro a{
background-size: 85px 85px!important;
height: 100px;
@@ -116,29 +99,21 @@ and (orientation: landscape) {
/*
iPhone 6 Plus in portrait & landscape
*/
@media only screen
and (min-device-width : 414px)
and (max-device-width : 736px) {
@media only screen and (min-device-width : 414px) and (max-device-width : 736px) {
.itemMenuHomeMetro {
width: 145px;
height: 145px;
}
}
@media only screen
and (min-device-width : 414px)
and (max-device-width : 736px)
and (orientation: portrait) {
@media only screen and (min-device-width : 414px) and (max-device-width : 736px) and (orientation: portrait) {
.itemMenuHomeMetro a{
background-size: 140px 140px!important;
height: 180px;
}
}
@media only screen
and (min-device-width : 414px)
and (max-device-width : 736px)
and (orientation: landscape) {
@media only screen and (min-device-width : 414px) and (max-device-width : 736px) and (orientation: landscape) {
.itemMenuHomeMetro a{
background-size: 55px 55px!important;
height: 70px;
@@ -149,30 +124,21 @@ and (orientation: landscape) {
Ipad
*/
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px){
@media only screen and (min-device-width : 768px) and (max-device-width : 1024px){
.itemMenuHomeMetro {
width: 145px;
height: 145px;
}
}
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px)
and (orientation: portrait) {
@media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation: portrait) {
.itemMenuHomeMetro a{
background-size: 200px 200px!important;
height: 240px;
}
}
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px)
and (orientation: landscape)
{
@media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation: landscape){
.itemMenuHomeMetro a{
background-size: 110px 110px!important;
height: 140px;
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,7 +1,7 @@
var myManifest = {
Debug: (window.location.port !== ""),
Name: "Il Lievitario",
Version: "2.9.4.1",
Version: "2.9.5.3",
Author: "Denis Ironi",
Settings: {
DefaultURL: (window.location.port === "" ? "http://" + window.location.host + "/Service": "http://" + window.location.hostname + ":" + window.location.port + "/Service_Manut"),
@@ -4,9 +4,9 @@
<% var item = data[i]; %>
<li><a href="#ricetta/<%= item.ricetta_id%>" class="ui-btn ui-btn-icon-right ui-icon-carat-r">
<% if(item.firstImage === ""){ %>
<img src='Resources\img\ricettaND_80.png'>
<img class="thmbImg emptyItemList">
<%}else{%>
<img src='<%=myManifest.Settings.DefaultURL%>/api/photo/thumbnail/<%=item.firstImage%>'>
<img class="thmbImg" src='<%=myManifest.Settings.DefaultURL%>/api/photo/thumbnail/<%=item.firstImage%>'>
<%}%>
<div class='ricettaTitolo'><%= unescape(item.titolo) %></div>
<div class='ricettaAutore'><%= unescape(item.autore) %></div>
+22
View File
@@ -73,6 +73,8 @@ define(['jquery', 'underscore', 'backbone', 'text!modules/item/itemViewTemplate.
images.find('img').load(function() {
self.galleryWall.fitWidth();
});
$.mobile.loading('hide');
},
//render the content into div of view
render: function () {
@@ -94,6 +96,26 @@ define(['jquery', 'underscore', 'backbone', 'text!modules/item/itemViewTemplate.
self.$arrayContent = self.$el.find('div[data-role="content"]');
self.$arrayNavBar = self.$el.find('div[data-role="navbar"] a');
self.$photos = self.$el.find('#contentFoto a');
self.$photos.on("click", function(e){
e.preventDefault();
$.mobile.loading('show', {
text: 'Caricamento immagine...',
textVisible: true,
//theme: 'z',
html: ""
});
var photoID = $(this).attr("data-photoid");
self.$el.find('#photoFull').attr("src" , myManifest.Settings.DefaultURL + "/api/photo/" + photoID);
self.$el.find('#photoFull').load(function(){
$.mobile.loading('hide');
self.$el.find('#fullPhotoPopupDialog').popup("open");
});
});
for (var i = self.$arrayContent.length - 1; i >= 0; i--) {
self.scrollPositions.push(0);
};
+16 -9
View File
@@ -3,15 +3,16 @@
<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>
<style>
.freewallGallery {
margin: 15px;
<%
var widthImg = 320;
if( myManifest.Agent.device.type != "" )
{
//prendo la larghezza del viewport e sottraggo il 10%, poi divito per le due colonne
widthImg = (myManifest.Settings.Device.Width - (myManifest.Settings.Device.Width / 10)) / 2;
if(widthImg>320)
widthImg = 320;
}
.brick img {
margin: 0;
display: block;
}
</style>
%>
<div id="contentIngredienti" data-role="content">
<h1>Ingredienti</h1>
<center><p id='ingredienti'>
@@ -37,7 +38,7 @@
<h1>Foto</h1>
<div id="Gallery" class="freewallGallery">
<% _.each(ricetta.foto, function(fotoID) {%>
<div class='brick' style='width:250px;'><img src='<%=myManifest.Settings.DefaultURL%>/api/photo/<%=fotoID.ID%>' style="width: 100%;"></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"></a></div>
<%});%>
</div>
</div>
@@ -60,6 +61,12 @@
<h1 id="linkFonte" style="padding: 0px;"><a target="_blank" href="<%= ricetta.link_fonte%>">Link Fonte</a></h1>
<% }%>
</div>
<div data-role="popup" id="fullPhotoPopupDialog">
<a href="#" data-rel="back" class="ui-btn ui-corner-all ui-shadow ui-btn-a ui-icon-delete ui-btn-icon-notext ui-btn-right">Close</a>
<div role="main" class="ui-content">
<img id="photoFull" src='' style="width: 100%;">
</div>
</div>
<div data-role="popup" id="popupDialog">
<div data-role="header">
<h1>Informazione</h1>
+6
View File
@@ -139,6 +139,12 @@ define(['jquery', 'underscore', 'backbone',
//categoryView.bind('renderCompleted:Category',this.changePage,this);
},
showItem: function (itemId) {
$.mobile.loading('show', {
text: 'Caricamento ricetta...',
textVisible: true,
//theme: 'z',
html: ""
});
var item = new ItemCollection({ricettaId: itemId});
var ingr = new IngredientiCollection({ricettaId: itemId});
// will render home view and navigate to homeView