11 changed files with 112 additions and 41 deletions
+10 -10
View File
@@ -26,16 +26,16 @@ AddOutputFilterByType DEFLATE text/css application/x-javascript text/html text/r
RewriteEngine On
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]
RewriteRule ^.*js/libs/(.*)\.[0-9]+\.js$ /WebClient_Manut/js/libs/$1.js [L]
RewriteRule ^.*js/(.*)\.[0-9]+\.js$ /WebClient_Manut/js/$1.js [L]
RewriteRule ^r.*/.*js/(.*).js$ /WebClient_Manut/js/$1.js [L]
RewriteRule ^r.*/.*js/(.*).html$ /WebClient_Manut/js/$1.html [L]
RewriteRule ^.*css/(.*)\.[0-9]+\.css$ /WebClient_Manut/css/$1.css [L]
RewriteRule ^r.*/.*css/(.*).gif$ /WebClient_Manut/css/$1.gif [L]
#RewriteRule ^/Resources/img/(.*)\.[0-9]+\.png$ /WebClient_Manut/Resources/img/$1.png [L]
#RewriteRule ^/Resources/img/(.*)\.[0-9]+\.gif$ /WebClient_Manut/Resources/img/$1.gif [L]
#RewriteRule ^/Resources/icons/(.*)\.[0-9]+\.png$ /WebClient_Manut/Resources/icons/$1.png [L]
RewriteRule ^r(.*)/$ /WebClient_Manut/index.php?ricetta=$1 [L]
</ifModule>
<ifModule mod_headers.c>
+30
View File
@@ -320,4 +320,34 @@ label.error {
.cappelli-5{
background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAAQCAMAAAC2lwjzAAAA1VBMVEUAAADYBATUBQVKEhLpAgLnAgL0AQHvAQFzDw+AERHPBQXoAwPmAgLCBgbFBQWzBwe1BgajCgrDBgaFDw9OFBS1BgaKDQ2YDAyuCQm0CAjFBgb6AABxERHqAgLPBQXoAgLSBQWdCgrhAgJrERHEBgbABgasCAiiCQljEhKBDg6gCQl0ERG6BwcYGBi1CAiyCAg1Fxe4CAjABgZ3EBCiCws4GBhwERHSBQW0CgqHCgpJFhYxExNyDAxdDQ3/AAD8AAD0AQH3AQHtAgLcBATwAgLgAwP5AQHDLfveAAAAPnRSTlMA/v0H/v757hsK/v76+OvIooqFdFZJJP7+/v7s6+vq5t/e19bNubSop5+alY5zc3JgXlJNRT87MzAvLRoUEx15MDIAAADNSURBVDjLrc1HloNADEVRFQUGnFO7c845dzt+qQB7/0sy2McrUL2jydVAIkreb1rtl5//8ZzK9E67tWXEzfg4vuv1//SmySkbbgiAKJOzX7Vpr8aMAGWZC/lZbfoSYLvIVw08ql1+qI5XzuGiodo0OmdscuXcW7UpvS2AFTZdjfQm2zORM+wYEn+qXTWo52E9PCzCZj/1YXpjAJwFB53Ei20X24oPL6bkQkQYQMd6MU1P9gNjTMYDPyb7eh2Ik+XRt9q7ZsOHy1b7aeHHa6BIpJhrAv6ZAAAAAElFTkSuQmCC') 50% 50% no-repeat;
}
.noti_bubble {
position: absolute;
top: 0px;
right: 2px;
/*
padding: 2px;
background-color: red;
color: white;
font-weight: 700;
font-size: .75em;
border-radius: 50%;
width: 15px;
text-align: center;*/
background: radial-gradient( center -9px, circle closest-side, #395184 0, #38c 26px );
background: -moz-radial-gradient( center -9px, circle closest-side, #395184 0, #38c 26px );
background: -ms-radial-gradient( center -9px, circle closest-side, #395184 0, #38c 26px );
background: -o-radial-gradient( center -9px, circle closest-side, #395184 0, #38c 26px );
background: -webkit-radial-gradient( center -9px, circle closest-side, #395184 0, #38c 26px );
background-color: #38c;
border: 1px solid white;
border-radius: 12px; /* must be 1/2 of ( border-width*2 + width ) */
box-shadow: 1px 1px 1px black;
color: white;
font: bold 17px/15px Helvetica, Verdana, Tahoma;
height: 18px; /* height + padding-top must equal width */
padding-top: 2px; /* height + padding-top must equal width */
text-align: center;
width: 20px;
}
+1 -1
View File
File diff suppressed because one or more lines are too long
+6 -3
View File
@@ -1,5 +1,5 @@
define(['jquery', 'underscore', 'backbone', 'controls/footer/footer', 'controls/header/header', 'classes/profile'],
function($, _, Backbone, Footer, Header, Profile){
define(['jquery', 'underscore', 'backbone', 'controls/footer/footer', 'controls/header/header', 'classes/profile', 'text!modules/base/popupInAppDlg.html'],
function($, _, Backbone, Footer, Header, Profile, popupInAppDlgTemplate){
var BaseView = Backbone.View.extend({
@@ -7,6 +7,7 @@ function($, _, Backbone, Footer, Header, Profile){
header: null,
footer: null,
created: true,
popupInAppDlgTmpl: _.template(popupInAppDlgTemplate),
initialize: function () {
this.header = new Header({ title: "Il Lievitario"});
@@ -30,12 +31,14 @@ function($, _, Backbone, Footer, Header, Profile){
if(this.created === true)
{
this.header.render();
this.footer.render();
this.footer.render();
//add the attribute 'data-role="page" ' for each view's div
this.$el.attr('data-role', 'page');
this.$el.attr('data-theme', Profile.data.tema);
this.$el.attr('stay-in-page', this.isStayInPage());
this.$el.attr('id', this.id);
this.$el.append(this.popupInAppDlgTmpl());
}
},
onShowing: null,
+15
View File
@@ -0,0 +1,15 @@
<div data-role="popup" id="inAppDlg">
<div data-role="header">
<h1>Attenzione</h1>
</div>
<div role="main" class="ui-content">
<p style="text-align: center;font-style: italic;"><strong>IMPORTANTE</strong><br><br>
Si stà utilizzando il lievitario all'interno dell'applicazione FB, non si garantisce il corretto funzionamento.<br>
Si prega di utilizzare il lievitario all'interno dei browser del dispositivo.<br><br>
E' possibile disattivare il caricamento all'interno dell'applicazione Facebook seguendo le istruzioni riportate <a href="http://www.wired.it/mobile/app/2015/05/04/facebook-twitter-come-disattivare-browser/">QUI</a>
</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>
@@ -4,9 +4,10 @@
<% var item = data.items[i]; %>
<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 !== ""){ %>
<% if(item.firstImage !== ""){ %>
<img data-src='<%=myManifest.Settings.DefaultURL%>/api/photo/thumbnail/<%=item.firstImage%>'>
<%}%>
<div class="noti_bubble"><%=item.countImages%></div>
<%}%>
</div>
<div class="contentItem">
<div class='ricettaTitolo'><%= unescape(item.titolo) %></div>
+39 -17
View File
@@ -7,6 +7,7 @@ define(['jquery', 'underscore', 'backbone', 'text!modules/item/itemViewTemplate.
fetchedRicetta: false,
fetchedIngredienti: false,
galleryWall: null,
currentPhotoIndex: null,
//initialize template
template: _.template(itemViewTemplate),
initialize: function (options) {
@@ -59,6 +60,7 @@ define(['jquery', 'underscore', 'backbone', 'text!modules/item/itemViewTemplate.
if (!Profile.isConnected())
{
self.$el.find('#optionPopupDialog').popup("close");
self.$el.find('#popupDialog').popup("open");
return;
}
@@ -95,6 +97,23 @@ define(['jquery', 'underscore', 'backbone', 'text!modules/item/itemViewTemplate.
self.switchContent();
$.mobile.loading('hide');
},
loadImage: function(){
var self = this;
$.mobile.loading('show', {
text: 'Caricamento immagine...',
textVisible: true,
//theme: 'z',
html: ""
});
var photoID = $(self.$photos[self.currentPhotoIndex]).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");
});
},
//render the content into div of view
render: function () {
if (this.fetchedIngredienti && this.fetchedRicetta)
@@ -128,22 +147,9 @@ define(['jquery', 'underscore', 'backbone', 'text!modules/item/itemViewTemplate.
});
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");
});
e.preventDefault();
self.currentPhotoIndex = self.$photos.index(this);
self.loadImage();
});
for (var i = self.$arrayContent.length - 1; i >= 0; i--) {
@@ -167,7 +173,23 @@ define(['jquery', 'underscore', 'backbone', 'text!modules/item/itemViewTemplate.
self.$arrayContent.on("swiperight", function (e) {
var index = jQuery.inArray(this, self.$arrayContent);
self.goToContent(index - 1);
});
});
self.$el.find('#fullPhotoPopupDialog div').
on("swiperight", function (e) {
self.currentPhotoIndex--;
if(self.currentPhotoIndex < 0)
self.currentPhotoIndex = 0;
else
self.loadImage();
}).on("swipeleft", function (e) {
self.currentPhotoIndex++;
if(self.currentPhotoIndex > self.$photos.length - 1)
self.currentPhotoIndex = self.$photos.length -1;
else
self.loadImage();
});
if(myManifest.Agent.browser.name != "Safari" || myManifest.Agent.browser.name != "Mobile Safari"){
new Clipboard('#copyBtn', {
+1 -1
View File
@@ -93,7 +93,7 @@
Questa funzionalità è disponibile solo se si è abilitata la Sincronizzazione tramite Facebook o Google.
</p>
<p style="text-align: center;">
<a id="syncBtn" href="#syncView" class="ui-btn ui-corner-all ui-btn-inline ui-shadow ui-icon-custom ui-btn-icon-left">Sincronizza</a>
<a id="syncBtn" href="/#syncView" class="ui-btn ui-corner-all ui-btn-inline ui-shadow ui-icon-custom ui-btn-icon-left">Sincronizza</a>
<a href="" class="ui-btn ui-corner-all ui-shadow ui-btn-inline ui-icon-check" data-rel="back">Cancel</a>
</p>
</div>
+1 -1
View File
@@ -3,7 +3,7 @@
<%} else { for (var i = 0; i < data.length; i++) { %>
<% var item = data[i]; %>
<li>
<a href="#ricetta/<%= item.ricetta_id%>">
<a href="r<%= item.ricetta_id%>/#ricetta/<%= item.ricetta_id%>">
<div id="itemID" style="display: none;"><%= item.ricetta_id%></div>
<div class='ricettaTitolo'><%= unescape(item.titolo) %></div>
<div class='ricettaAutore'><%= unescape(item.autore) %></div>
+3 -3
View File
@@ -36,9 +36,9 @@ define(['jquery', 'underscore', 'backbone',
if (self.activeView.onShowed !== null)
self.activeView.onShowed();
// if (self.fastClickInstance !== null)
// self.fastClickInstance.destroy();
// self.fastClickInstance = FastClick.attach(document.body);
if( /FB_IAB|FB4A|FBAV/i.test(myManifest.Agent.ua) ) {
self.activeView.$el.find('#inAppDlg').popup("open");
}
});
},
//define routes and mapping route to the function
+3 -3
View File
@@ -1,4 +1,4 @@
MAJOR=3
MAJOR=4
MINOR=0
PATCH=9
BUILD=9
PATCH=2
BUILD=0