Author SHA1 Message Date
hexstudy 658d1a229a git-svn-id: https://msi/svn/firstRepo/WebClient/branches/Manut_3.0.1@81 0f545695-f87b-41b6-9a03-7f16563b5454 2016-05-15 12:19:21 +00:00
hexstudy 728b139ca3 git-svn-id: https://msi/svn/firstRepo/WebClient/branches/Manut_3.0.1@80 0f545695-f87b-41b6-9a03-7f16563b5454 2016-04-04 16:01:28 +00:00
hexstudy 78f63f0cf1 git-svn-id: https://msi/svn/firstRepo/WebClient/branches/Manut_3.0.1@78 0f545695-f87b-41b6-9a03-7f16563b5454 2016-03-13 17:21:58 +00:00
hexstudy 8ba6571a7b git-svn-id: https://msi/svn/firstRepo/WebClient/branches/Manut_3.0.1@77 0f545695-f87b-41b6-9a03-7f16563b5454 2016-03-06 22:02:12 +00:00
hexstudy 2e557160f9 git-svn-id: https://msi/svn/firstRepo/WebClient/branches/Manut_3.0.1@76 0f545695-f87b-41b6-9a03-7f16563b5454 2016-03-05 15:34:08 +00:00
hexstudy fca2915242 git-svn-id: https://msi/svn/firstRepo/WebClient/branches/Manut_3.0.1@73 0f545695-f87b-41b6-9a03-7f16563b5454 2016-03-03 22:21:10 +00:00
hexstudy 9a8359a8dc git-svn-id: https://msi/svn/firstRepo/WebClient/branches/Manut_3.0.1@72 0f545695-f87b-41b6-9a03-7f16563b5454 2016-03-02 20:28:31 +00:00
hexstudy 2affad28f1 git-svn-id: https://msi/svn/firstRepo/WebClient/branches/Manut_3.0.1@71 0f545695-f87b-41b6-9a03-7f16563b5454 2016-03-01 14:20:31 +00:00
hexstudy edb59bed85 git-svn-id: https://msi/svn/firstRepo/WebClient/branches/Manut_3.0.1@69 0f545695-f87b-41b6-9a03-7f16563b5454 2016-02-17 16:34:01 +00:00
hexstudy 939e42f8fc git-svn-id: https://msi/svn/firstRepo/WebClient/branches/Manut_3.0.1@67 0f545695-f87b-41b6-9a03-7f16563b5454 2016-02-15 21:44:07 +00:00
hexstudy 46a2a29aad git-svn-id: https://msi/svn/firstRepo/WebClient/branches/Manut_3.0.1@65 0f545695-f87b-41b6-9a03-7f16563b5454 2016-02-11 15:57:03 +00:00
hexstudy b205668910 git-svn-id: https://msi/svn/firstRepo/WebClient/branches/Manut_3.0.1@64 0f545695-f87b-41b6-9a03-7f16563b5454 2016-02-09 08:14:16 +00:00
hexstudy 327c2e577d git-svn-id: https://msi/svn/firstRepo/WebClient/branches/Manut_3.0.1@63 0f545695-f87b-41b6-9a03-7f16563b5454 2016-02-09 08:10:01 +00:00
hexstudy 46023ef8ed git-svn-id: https://msi/svn/firstRepo/WebClient/branches/Manut_3.0.1@61 0f545695-f87b-41b6-9a03-7f16563b5454 2016-02-09 08:06:04 +00:00
27 changed files with 1688 additions and 1091 deletions
+13 -8
View File
@@ -1,4 +1,4 @@
AddHandler application/x-httpd-php .html .htm #AddHandler application/x-httpd-php .html .htm
<ifModule mod_gzip.c> <ifModule mod_gzip.c>
mod_gzip_on Yes mod_gzip_on Yes
mod_gzip_dechunk Yes mod_gzip_dechunk Yes
@@ -24,13 +24,18 @@ 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] RewriteBase /
RewriteRule ^js/libs/(.*)\.[0-9]+\.js$ /WebClient/js/libs/$1.js [L] #RewriteRule ^index.html$ index.php [L]
RewriteRule ^js/(.*)\.[0-9]+\.js$ /WebClient/js/$1.js [L] RewriteRule ^.*js/libs/(.*)\.[0-9]+\.js$ /WebClient_Manut/js/libs/$1.js [L]
RewriteRule ^css/(.*)\.[0-9]+\.css$ /WebClient/css/$1.css [L] RewriteRule ^.*js/(.*)\.[0-9]+\.js$ /WebClient_Manut/js/$1.js [L]
RewriteRule ^Resources/img/(.*)\.[0-9]+\.png$ /WebClient/Resources/img/$1.png [L] RewriteRule ^r.*/.*js/(.*).js$ /WebClient_Manut/js/$1.js [L]
RewriteRule ^Resources/img/(.*)\.[0-9]+\.gif$ /WebClient/Resources/img/$1.gif [L] RewriteRule ^r.*/.*js/(.*).html$ /WebClient_Manut/js/$1.html [L]
RewriteRule ^Resources/icons/(.*)\.[0-9]+\.png$ /WebClient/Resources/icons/$1.png [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>
<ifModule mod_headers.c> <ifModule mod_headers.c>
+1 -1
View File
@@ -1,4 +1,4 @@
call uglifyjs .\js\libs\hello.min.js .\js\libs\ua-parser.min.js -o .\js\common.min.js call uglifyjs .\js\libs\hello.min.js .\js\libs\ua-parser.min.js .\js\libs\markerclusterer.js -o .\js\common.min.js
REM node r.js -o app.build_dev.js REM node r.js -o app.build_dev.js
node r.js -o app.build_prod.js node r.js -o app.build_prod.js
REM call cleancss -o .\css\loadingStyle.min.css .\css\loadingStyle.css REM call cleancss -o .\css\loadingStyle.min.css .\css\loadingStyle.css
+31 -684
View File
File diff suppressed because one or more lines are too long
-217
View File
File diff suppressed because one or more lines are too long
+6 -9
View File
@@ -234,19 +234,16 @@ label.error {
  border-bottom-right-radius: inherit;   border-bottom-right-radius: inherit;
} }
.imageRic{ .thmbImg
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{
padding-left: 80px; .emptyItemList
{
content:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAMAAAC5zwKfAAAATlBMVEUAAADT09PMzMy+vr7KysrPz8/Q0NDOzs7V1dXY2NjS0tK7u7vJycnExMTCwsK2trba2tq/v7/i4uLb29vGxsaysrLc3NysrKympqafn5/59uVfAAAAAXRSTlMAQObYZgAAATlJREFUWMPt18luwzAMRVHzWSKpwUPsTP3/H23iIAWstJtSCLLQ2Qjg4kIrgeqapmma5h3S6AQ/fJ6MPReUxT8xYhhMvahMyO4uu5xdFKgYemlm7AYXFpCh6CMXkxxhKZIeislAAAj/DlL6JWi4I1H/GiyKdYIgrhQ8RjwoKgWDbIDQVwmeVr7z5CWagqXkvNqCpUnJEgSkvCJZgkp8Loq9JTgoAKoY/FoAaMVgtwRejzWD3RHPZ2eZrMG9OUjdIEs41QwmBY1Vgu5xSIQsNYK08v24rgDOV3twDG57/9QDYJiDUwBAmFzEjag56Ag3HBibcDEGT4odGoxBnmknkDGYDv3OOBmDrz4pmLo/JCLbslQ6KNnWuRJHb1o4S+A5GVbiQgaxRsvSXhDW4EzfioK4MXVN0zRN8wbf0o0Kwdr1WXcAAAAASUVORK5CYII=')
} }
.freewallGallery { .freewallGallery {
+1 -1
View File
@@ -1,5 +1,5 @@
@import url("jquery.mobile.icons.min.css"); @import url("jquery.mobile.icons.min.css");
@import url("IlLievitario.min.css"); @import url("IlLievitario.css");
@import url("loadingStyle.css"); @import url("loadingStyle.css");
@import url("base.style.css"); @import url("base.style.css");
@import url("metroHome.css"); @import url("metroHome.css");
+1 -1
View File
File diff suppressed because one or more lines are too long
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

+17 -10
View File
@@ -8,16 +8,23 @@
<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 tag per FB-->
<meta property="og:locale" content="it_IT"/> <meta property="og:locale" content="it_IT"/>
<meta property="og:site_name" content="Il Lievitario"/> <meta property="og:site_name" content="Il Lievitario"/>
<meta property="og:title" content="Il Lievitario"/> <meta itemprop="name" content="Home - Il Lievitario"/>
<meta itemprop="name" content="Home - Il Lievitario"/> <?php
<meta property="og:url" content="http://app.gruppolapastamadre.it"/> $ogFbTitle = "Home - Il Lievitario";
<meta property="og:type" content="website"/> $ogFbUrl = "";
<meta property="og:image" content="http://app.gruppolapastamadre.it/previewLink.png"/> $ogFbType = "website";
<meta property="og:description" content="Ricettario web del il Gruppo la pasta madre" /> $ogFbImage = "http://app.gruppolapastamadre.it/previewLink.png";
<meta property="description" content="Ricettario web del il Gruppo la pasta madre" /> $ogFbDescription = "Ricettario web del il Gruppo la pasta madre";
?>
<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="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'>
+82
View File
@@ -0,0 +1,82 @@
/*
* 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
View File
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
+2 -1
View File
@@ -1,9 +1,10 @@
var myManifest = { var myManifest = {
Debug: (window.location.port !== ""), Debug: (window.location.port !== ""),
Name: "Il Lievitario", Name: "Il Lievitario",
Version: "3.0.4.0", Version: "3.0.5.2",
Author: "Denis Ironi", Author: "Denis Ironi",
Settings: { Settings: {
ShowStartMessage: true,
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"),
JQueryVersion: "1.11.1", JQueryVersion: "1.11.1",
JQueryMobileVersion: "1.4.5", JQueryMobileVersion: "1.4.5",
@@ -7,7 +7,6 @@ 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
View File
@@ -7,7 +7,6 @@ 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
+3 -3
View File
@@ -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'], 'text!modules/category/categoryItemTemplate.html', 'modules/base/baseView', 'libs/fastclick', 'classes/debug', 'classes/images'],
function ($, _, Backbone, categoryViewTemplate, categoryItemTemplate, BaseView, FastClick, Debug) { function ($, _, Backbone, categoryViewTemplate, categoryItemTemplate, BaseView, FastClick, Debug, Images) {
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(),
myManifest: myManifest images: Images
}); });
$(html).appendTo($ul).enhanceWithin(); $(html).appendTo($ul).enhanceWithin();
+22 -24
View File
@@ -3,31 +3,29 @@
<%} 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">
<div class="imageRic"> <% if(item.firstImage === ""){ %>
<% if(item.firstImage !== ""){ %> <!--<img class="thmbImg emptyItemList">-->
<img src='<%=myManifest.Settings.DefaultURL%>/api/photo/thumbnail/<%=item.firstImage%>'> <%}else{%>
<!--<img class="thmbImg" src='<%=data.images.getThumb(item.firstImage)%>'>-->
<%}%> <%}%>
</div> <div class='ricettaTitolo'><%= unescape(item.titolo) %></div>
<div class="contentItem"> <div class='ricettaAutore'><%= unescape(item.autore) %></div>
<div class='ricettaTitolo'><%= unescape(item.titolo) %></div> <br><div class='ricettaAutore'>Diff.:&nbsp;&nbsp;</div>
<div class='ricettaAutore'><%= unescape(item.autore) %></div> <div id="valutazione">
<br><div class='ricettaAutore'>Diff.:&nbsp;&nbsp;</div> <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 id="valutazione"> <div data-role="none" title="Molto Semplice">1</div>
<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>
<div data-role="none" title="Molto Semplice">1</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> <div data-role="none" title="Semplice">2</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>
<div data-role="none" title="Semplice">2</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> <div data-role="none" title="Normale">3</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>
<div data-role="none" title="Normale">3</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> <div data-role="none" title="Difficile">4</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>
<div data-role="none" title="Difficile">4</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> <div data-role="none" title="Molto Difficile">5</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>
</div> </div>
</a></li> </a></li>
+13 -3
View File
@@ -23,10 +23,15 @@ define(['jquery', 'underscore', 'backbone', 'text!modules/home/homeViewTemplate.
} }
}, },
events: { events: {
"click #noSpacc": "noSpacc",
}, },
freeWall: null, freeWall: null,
noSpacc: function(){
window.localStorage.setItem("noSpacc", 1);
},
calculateSize: function(){ calculateSize: function(){
var size = 100; var size = 100;
var widthDevice = (window.innerWidth > 0) ? window.innerWidth : screen.width; var widthDevice = (window.innerWidth > 0) ? window.innerWidth : screen.width;
@@ -125,8 +130,7 @@ define(['jquery', 'underscore', 'backbone', 'text!modules/home/homeViewTemplate.
} }
}); });
this.freeWall.fitWidth(); this.freeWall.fitWidth();
}, },
onShowed: function () onShowed: function ()
{ {
var self = this; var self = this;
@@ -137,7 +141,13 @@ define(['jquery', 'underscore', 'backbone', 'text!modules/home/homeViewTemplate.
{ {
this.changePicture(Profile.data.picture); this.changePicture(Profile.data.picture);
} }
if(myManifest.Settings.ShowStartMessage &&
Profile.data.isSpacc === "0" &&
window.localStorage.getItem("noSpacc") === null)
{
this.$el.find("#nomeUtente").text(Profile.data.name);
this.$el.find("#messaggioSpacciatore").popup("open");
}
//Debug.writeMessage(myManifest.Agent.ua); //Debug.writeMessage(myManifest.Agent.ua);
}, },
onClosing: function () { onClosing: function () {
+6 -10
View File
@@ -46,19 +46,15 @@
</div> </div>
</div> </div>
</div> </div>
<!--<div data-role="popup" id="nuovoGruppo" data-history="false" data-dismissible="false"> <div data-role="popup" id="messaggioSpacciatore" data-history="false" data-dismissible="false">
<div data-role="header"><h1>IMPORTANTE</h1></div> <div data-role="header"><h1>Messaggio per la comunità</h1></div>
    <div role="main" class="ui-content">     <div role="main" class="ui-content">
<p style="text-align: center;font-style: italic;"> <p style="text-align: center;font-style: italic;">
<img src="https://dl.dropboxusercontent.com/s/xnbrbbe7eejkfv2/festa.png"><br><br> Ciao <b id="nomeUtente"></b> visualizzi questo messaggio perchè fai parte di questo grande gruppo<br><br>Ci chiedavamo se volessi diventare <i>"Spacciatore di Pasta madre"</i>
Le admin <br><br><b>Alessia, Elena e Francesca</b><br><br>hanno RIFONDATO IL GRUPPO!!<br>
<br>"<b>Gruppo La Pasta Madre</b>"<br>
<br>vuoi chiedere di diventare membro?
<br>Se sei già membro premi si e poi torna indietro con il browser
</p> </p>
<p style="text-align: center;"> <p style="text-align: center;">
<a id="goFbGroup" href="#" class="ui-btn ui-corner-all ui-shadow ui-btn-inline ui-btn-b" data-rel="back">Si</a> <a id="goFbGroup" href="#settingsView1" class="ui-btn ui-corner-all ui-shadow ui-btn-inline ui-btn-d">Si</a>
<a href="#" class="ui-btn ui-corner-all ui-shadow ui-btn-inline ui-btn-b" data-rel="back" data-transition="flow">No</a> <a href="#" id="noSpacc" class="ui-btn ui-corner-all ui-shadow ui-btn-inline ui-btn-d" data-rel="back" data-transition="flow">No</a>
</p> </p>
</div> </div>
</div>--> </div>
+12 -9
View File
@@ -1,5 +1,5 @@
define(['jquery', 'underscore', 'backbone', 'text!modules/item/itemViewTemplate.html', 'modules/base/baseView', 'classes/profile', 'jQueryPlugins'], define(['jquery', 'underscore', 'backbone', 'text!modules/item/itemViewTemplate.html', 'modules/base/baseView', 'classes/profile', 'classes/images', 'jQueryPlugins'],
function ($, _, Backbone, itemViewTemplate, BaseView, Profile) { function ($, _, Backbone, itemViewTemplate, BaseView, Profile, Images) {
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,10 +69,12 @@ define(['jquery', 'underscore', 'backbone', 'text!modules/item/itemViewTemplate.
} }
}); });
var images = this.galleryWall.container.find('.brick'); var imgurl = Images.getThumb(48);*/
/*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');
@@ -95,13 +97,14 @@ define(['jquery', 'underscore', 'backbone', 'text!modules/item/itemViewTemplate.
ricetta: ric, 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 +130,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 +184,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;
+9 -38
View File
@@ -3,30 +3,14 @@
<h3 id='titoloRicetta'><%= unescape(ricetta.titolo)%></h3> <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> <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> </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"> <div id="contentIngredienti" data-role="content">
<h1>Ingredienti</h1> <h1>Ingredienti</h1>
<center><p id='ingredienti'> <% _.each(ingredienti, function(ingrediente) {
<% _.each(ingredienti, function(ingrediente) { if(ingrediente.id_tipo_ingredienti == 152)/*Intestazione*/{%>
var liStyle = ""; <h2 class="intestazione"><%= unescape(ingrediente.note) %></h2>
var qty = ": " + ingrediente.quantita; <%}else if(ingrediente.id_tipo_ingredienti == 22)/*Nota-Paragrafo*/{%>
var nome_ingr = ingrediente.nome_ingrediente; <p class="nota"><%= unescape(ingrediente.note) %></p>
if(ingrediente.id_tipo_ingredienti == 22) <%}else{%><li class="ingrediente"><div class="nomeIngrediente"><%= ingrediente.nome_ingrediente %></div><%= ": " + ingrediente.quantita %> <%= ingrediente.unita %><div class="notaIngrediente"> <%= unescape(ingrediente.note) %></div></li><%}}); %>
{
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>
<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="contentProcedimento" data-role="content" style="display: none;"> <div id="contentProcedimento" data-role="content" style="display: none;">
@@ -34,26 +18,13 @@
<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;">
<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='<%=myManifest.Settings.DefaultURL%>/api/photo/medium/<%=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="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){ %>
+78 -35
View File
@@ -5,6 +5,8 @@ define(['jquery', 'underscore', 'backbone', 'text!modules/maps/mapsViewTemplate.
map: null, map: null,
markers: [], markers: [],
openedInfoWindows: [],
markerClicked: false,
//initialize template //initialize template
template: _.template(mapsViewTemplate), template: _.template(mapsViewTemplate),
infoWindowtemplate: _.template(infoWindowTemplate), infoWindowtemplate: _.template(infoWindowTemplate),
@@ -76,11 +78,15 @@ define(['jquery', 'underscore', 'backbone', 'text!modules/maps/mapsViewTemplate.
mapTypeControl: false, mapTypeControl: false,
zoomControlOptions: { zoomControlOptions: {
position: google.maps.ControlPosition.RIGHT_CENTER position: google.maps.ControlPosition.RIGHT_CENTER
}, }
        };         };
$("#map-canvas").width(document.documentElement.clientWidth - 32/*Padding content*/); self.$el.find("#map-canvas").width(document.documentElement.clientWidth - 32/*Padding content*/);
$("#map-canvas").height(document.documentElement.clientHeight - 151 - self.$el.find('#searchPanel').height()); self.$el.find("#map-canvas").height(document.documentElement.clientHeight - 151 - self.$el.find('#searchPanel').height());
self.map = new google.maps.Map($("#map-canvas")[0], myOptions); self.map = new google.maps.Map(self.$el.find("#map-canvas")[0], myOptions);
self.map.addListener("dragend", function(){
self.markerClicked = true;
});
// Create the search box and link it to the UI element. // Create the search box and link it to the UI element.
var input = $('<input id="pac-input" data-role="none" class="controls" type="text" placeholder="Ricerca località..." style="display:none;">')[0]; var input = $('<input id="pac-input" data-role="none" class="controls" type="text" placeholder="Ricerca località..." style="display:none;">')[0];
@@ -124,7 +130,7 @@ define(['jquery', 'underscore', 'backbone', 'text!modules/maps/mapsViewTemplate.
markers.push(new google.maps.Marker({ markers.push(new google.maps.Marker({
map: self.map, map: self.map,
icon: icon, icon: icon,
title: place.name, title: unescape(place.name),
position: place.geometry.location position: place.geometry.location
})); }));
@@ -140,32 +146,47 @@ define(['jquery', 'underscore', 'backbone', 'text!modules/maps/mapsViewTemplate.
self.map.addListener('bounds_changed', function() { self.map.addListener('bounds_changed', function() {
var bound = self.map.getBounds(); var bound = self.map.getBounds();
searchBox.setBounds(bound); searchBox.setBounds(bound);
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){
var key = "|" + ele.Latitudine+ "|" + ele.Longitudine+ "|";
if(!self.markers[key])
{
self._makeMarker(ele, key);
}
else if(!self.markers[key][ele.ID])
{
ele.Latitudine = parseFloat(ele.Latitudine) + (Math.random() / 500);
ele.Longitudine = parseFloat(ele.Longitudine) + (Math.random() / 500);
self._makeMarker(ele, key);
}
});
}
});
}); });
$("#pac-input").show(); $("#pac-input").show();
var markersArray = [];
var latLngFrom = new google.maps.LatLng(85, -180);
var latLngTo = new google.maps.LatLng(-85, 180);
$.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){
var key = "|" + ele.Latitudine+ "|" + ele.Longitudine+ "|";
if(!self.markers[key])
{
markersArray.push(self._makeMarker(ele, key));
}
else if(!self.markers[key][ele.ID])
{
ele.Latitudine = parseFloat(ele.Latitudine) + (Math.random() / 500);
ele.Longitudine = parseFloat(ele.Longitudine) + (Math.random() / 500);
markersArray.push(self._makeMarker(ele, key));
}
});
markerClusterer = new MarkerClusterer(self.map, markersArray, {
maxZoom: 15
// ,styles: {
// url: '../images/pin.png',
// height: 48,
// width: 30,
// anchor: [-18, 0],
// textColor: '#ffffff',
// textSize: 10,
// iconAnchor: [15, 48]
// }
});
}
});
}, },
_makeMarker: function(ele,key){ _makeMarker: function(ele,key){
var self = this; var self = this;
@@ -173,8 +194,8 @@ define(['jquery', 'underscore', 'backbone', 'text!modules/maps/mapsViewTemplate.
position: new google.maps.LatLng(ele.Latitudine, ele.Longitudine), position: new google.maps.LatLng(ele.Latitudine, ele.Longitudine),
icon: ele.TipoPM == "4"?self.iconPMGF:self.iconPM, icon: ele.TipoPM == "4"?self.iconPMGF:self.iconPM,
//label: ele.Name, //label: ele.Name,
title: ele.Name, title: $("<div/>").html(unescape(ele.Name)).text(),
map: self.map //map: self.map
}); });
if(!self.markers[key]) if(!self.markers[key])
@@ -183,24 +204,34 @@ define(['jquery', 'underscore', 'backbone', 'text!modules/maps/mapsViewTemplate.
self.markers[key][ele.ID] = marker; self.markers[key][ele.ID] = marker;
var infowindow = new google.maps.InfoWindow({ var infowindow = new google.maps.InfoWindow({
content: self.infoWindowtemplate({item: ele}) content: self.infoWindowtemplate({item: ele}),
closeclick: function(){
var index = openedInfoWindows.indexOf(this);
if (index > -1) {
self.openedInfoWindows.splice(index, 1);
}
}
}); });
marker.addListener('click', function() { marker.addListener('click', function() {
self.markerClicked = true;
self.openedInfoWindows.push(infowindow);
infowindow.open(self.map, marker); infowindow.open(self.map, marker);
}); });
return marker;
}, },
onShowed: function(){ onShowed: function(){
if(this.map) if(this.map)
return; return;
var self = this; var self = this;
$( window ).resize( function(){ $( window ).resize( function(){
$("#map-canvas").width(document.documentElement.clientWidth - 32/*Padding content*/); $("#map-canvas").width(document.documentElement.clientWidth - 32/*Padding content*/);
$("#map-canvas").height(document.documentElement.clientHeight - 151 - self.$el.find('#searchPanel').height()); $("#map-canvas").height(document.documentElement.clientHeight - 151 - self.$el.find('#searchPanel').height());
}); });
if ( navigator.geolocation ) { if ( navigator.geolocation ) {
        function success(pos) {         function success(pos) {
            // Location found, show map with these coordinates             // Location found, show map with these coordinates
@@ -214,6 +245,18 @@ define(['jquery', 'underscore', 'backbone', 'text!modules/maps/mapsViewTemplate.
    } else {     } else {
self._drawMap(self.defaultLatLng);  // No geolocation support, show default map self._drawMap(self.defaultLatLng);  // No geolocation support, show default map
    }     }
$("#map-canvas").click(function(){
if(self.markerClicked){
self.markerClicked = false;
return;
}
self.openedInfoWindows.forEach(function(item, index){
item.close();
});
self.openedInfoWindows = [];
});
}, },
onClosing: function(){ onClosing: function(){
var self = this; var self = this;
+18 -25
View File
@@ -3,31 +3,24 @@
<%} 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 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">
<div class="imageRic"> <div class='ricettaTitolo'><%= unescape(item.titolo) %></div>
<% if(item.firstImage !== ""){ %> <div class='ricettaAutore'><%= unescape(item.autore) %></div>
<img src='<%=myManifest.Settings.DefaultURL%>/api/photo/thumbnail/<%=item.firstImage%>'> <br><div class='ricettaAutore'>Diff.:&nbsp;&nbsp;</div>
<%}%> <div id="valutazione">
</div> <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 class="contentItem"> <div data-role="none" title="Molto Semplice">1</div>
<div class='ricettaTitolo'><%= unescape(item.titolo)%> - <%= unescape(item.categoria_name)%></div> </div>
<div class='ricettaAutore'><%= unescape(item.autore) %></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<%}%>">
<br><div class='ricettaAutore'>Diff.:&nbsp;&nbsp;</div> <div data-role="none" title="Semplice">2</div>
<div id="valutazione"> </div>
<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" 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="Molto Semplice">1</div> <div data-role="none" title="Normale">3</div>
</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" 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="Semplice">2</div> <div data-role="none" title="Difficile">4</div>
</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" 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="Normale">3</div> <div data-role="none" title="Molto Difficile">5</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>
</div> </div>
</a></li> </a></li>
+2 -1
View File
@@ -63,7 +63,8 @@ define(['jquery', 'underscore', 'backbone','text!modules/search/searchViewTempla
this.$el.append(this.template()); 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); if(Profile.data.risRic)
this.$el.find('#nResult').val(Profile.data.risRic);
this.trigger("renderCompleted:Search", this); this.trigger("renderCompleted:Search", this);
this.$el.find("#searchBtn").addClass("ui-btn-active"); this.$el.find("#searchBtn").addClass("ui-btn-active");
return this; return this;
+57 -1
View File
@@ -6,10 +6,12 @@ define(['jquery', 'underscore', 'backbone','text!modules/settings/settingsViewTe
//initialize template //initialize template
template:_.template(settingsViewTemplate), template:_.template(settingsViewTemplate),
_flagSave: false, _flagSave: false,
activateTab: 0,
initialize: function () { initialize: function (tab) {
var self = this; var self = this;
this.id = "SettingsView"; this.id = "SettingsView";
this.activateTab = tab;
SettingsView.__super__.initialize.call(this); SettingsView.__super__.initialize.call(this);
}, },
@@ -133,8 +135,45 @@ define(['jquery', 'underscore', 'backbone','text!modules/settings/settingsViewTe
}); });
} }
}, },
onShowing: function (){
if (!Profile.isConnected()) {
$('h1').hide();
$('[data-role="tabs"]').hide();
$('#saveBtn').hide();
return;
}
if(this.activateTab === "1"){
var contents = this.$el.find('div[data-role="tabs"] > .ui-content');
var navbars = this.$el.find('div[data-role="navbar"] a');
$(contents[0]).hide();
$(navbars[0]).removeClass('ui-btn-active');
$(navbars[0]).removeClass('ui-state-persist');
$(contents[1]).show();
$(navbars[1]).addClass('ui-btn-active');
$(navbars[1]).addClass('ui-state-persist');
}
},
onShowed: function(){ onShowed: function(){
var self = this; var self = this;
if(this.activateTab === "1"){
var intervalID = setInterval(function(){
$('[for="spacc-PMChk"]').attr("style", "border: 4px red solid; border-style: dashed;");
}, 500);
var intervalID2 = setInterval(function(){
$('[for="spacc-PMChk"]').attr("style", "border: 4px red solid; border-style: solid;");
}, 1000);
setTimeout(function(){
clearInterval(intervalID);
clearInterval(intervalID2);
$('[for="spacc-PMChk"]').attr("style", "");
}, 5000);
}
if(Profile.data.isSpacc==="0"){ if(Profile.data.isSpacc==="0"){
this.$el.find('#mapSpacc > :not(.ui-checkbox:has(#spacc-PMChk))').hide(); this.$el.find('#mapSpacc > :not(.ui-checkbox:has(#spacc-PMChk))').hide();
} }
@@ -193,6 +232,17 @@ define(['jquery', 'underscore', 'backbone','text!modules/settings/settingsViewTe
} }
else else
this.$el.find('#mapSpacc > :not(.ui-checkbox:has(#spacc-PMChk))').hide(); 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 //render the content into div of view
@@ -207,6 +257,10 @@ define(['jquery', 'underscore', 'backbone','text!modules/settings/settingsViewTe
this.$el.append(this.template()); this.$el.append(this.template());
this.$el.append(this.footer.$el); this.$el.append(this.footer.$el);
} }
var navbars = this.$el.find('div[data-role="navbar"] a');
$(navbars[0]).addClass('ui-btn-active');
$(navbars[0]).addClass('ui-state-persist');
this.$el.find('#nResult').val(Profile.data.risRic); this.$el.find('#nResult').val(Profile.data.risRic);
this.$el.find('#theme').val(Profile.data.tema); this.$el.find('#theme').val(Profile.data.tema);
@@ -214,6 +268,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('#spacc-PMChk').prop('checked', Profile.data.isSpacc==="0"?false:true);
this.$el.find('#email').val(Profile.data.email); this.$el.find('#email').val(Profile.data.email);
this.$el.find('#stato').val(Profile.data.dataSpacc.stato); 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") if(this.$el.find('#stato').val() !== "ITALIA")
{ {
this.$el.find('#provTxt').parent().show(); this.$el.find('#provTxt').parent().show();
@@ -11,10 +11,9 @@
<label for="nResult">Numero Risultati Ricerca:</label> <label for="nResult">Numero Risultati Ricerca:</label>
<select name="nResult" id="nResult"> <select name="nResult" id="nResult">
<option value="10" selected="true">10</option> <option value="10" selected="true">10</option>
<option value="15">15</option> <option value="25">25</option>
<option value="20">20</option> <option value="50">50</option>
<option value="25">25</option> <option value="100">100</option>
<option value="30">30</option>
</select> </select>
<label for="theme">Tema Grafico:</label> <label for="theme">Tema Grafico:</label>
<select name="theme" id="theme"> <select name="theme" id="theme">
@@ -60,6 +59,7 @@
<option value='ROMANIA'>Romania</option> <option value='ROMANIA'>Romania</option>
<option value='SLOVACCHIA'>Slovacchia</option> <option value='SLOVACCHIA'>Slovacchia</option>
<option value='SLOVENIA'>Slovenia</option> <option value='SLOVENIA'>Slovenia</option>
<option value='SUDAFRICA'>SudAfrica</option>
<option value='SPAGNA'>Spagna</option> <option value='SPAGNA'>Spagna</option>
<option value='USA'>Stati Uniti D'America</option> <option value='USA'>Stati Uniti D'America</option>
<option value='SVEZIA'>Svezia</option> <option value='SVEZIA'>Svezia</option>
+6 -3
View File
@@ -55,7 +55,7 @@ define(['jquery', 'underscore', 'backbone',
'searchView': 'showSearch', 'searchView': 'showSearch',
'mapsView': 'showMaps', 'mapsView': 'showMaps',
'debugView': 'showDebug', 'debugView': 'showDebug',
'settingsView': 'showSettings', 'settingsView(:tab)': 'showSettings',
'donationView': 'showDonation', 'donationView': 'showDonation',
'search/:nresult/:categoria/:difficolta/:autore/*titolo': 'searchFn', 'search/:nresult/:categoria/:difficolta/:autore/*titolo': 'searchFn',
'converterView': 'showConverter', 'converterView': 'showConverter',
@@ -71,8 +71,10 @@ define(['jquery', 'underscore', 'backbone',
homeView.render(); homeView.render();
this.changePage(homeView); this.changePage(homeView);
}, },
showSettings: function (actions) { showSettings: function (tab) {
var settingsView = new SettingsView(); if(tab==null)
tab = 0;
var settingsView = new SettingsView(tab);
settingsView.render(); settingsView.render();
this.changePage(settingsView); this.changePage(settingsView);
}, },
@@ -172,6 +174,7 @@ define(['jquery', 'underscore', 'backbone',
this.changePage(mapsView); this.changePage(mapsView);
}, },
showSearch: function () { showSearch: function () {
// will render home view and navigate to homeView
var searchView = new SearchView(); var searchView = new SearchView();
searchView.render(); searchView.render();
this.changePage(searchView); this.changePage(searchView);