From 43c124500586e73d176e9cadb2f224abb979150e Mon Sep 17 00:00:00 2001 From: hexstudy Date: Mon, 8 Feb 2016 22:10:13 +0000 Subject: [PATCH] git-svn-id: https://msi/svn/firstRepo/WebClient/branches/NewRelease@60 0f545695-f87b-41b6-9a03-7f16563b5454 --- js/app.js | 5 ++++- js/manifest.js | 2 +- js/modules/category/categoryItemTemplate.html | 4 ++-- js/modules/item/item.js | 14 +++++++------- js/modules/item/itemViewTemplate.html | 8 ++++---- js/modules/settings/settings.js | 2 +- 6 files changed, 19 insertions(+), 16 deletions(-) diff --git a/js/app.js b/js/app.js index 92a8212..cc12145 100644 --- a/js/app.js +++ b/js/app.js @@ -51,9 +51,12 @@ define(['jquery', 'underscore', 'backbone', 'router', 'classes/profile', 'classe gender = json.gender; } - if(gender !== "") + if(gender === undefined) gender = "unknown"; + if(email === undefined) + email = ""; + Debug.writeMessage('Your name is ' + json.name + ' in the social ' + auth.network + ", ID=" + id + ", DisplayName: "+ displayName + ", email:"+ email); Profile._loadProfile(id, function (retVal) { diff --git a/js/manifest.js b/js/manifest.js index 86b3b19..7e4756e 100644 --- a/js/manifest.js +++ b/js/manifest.js @@ -1,7 +1,7 @@ var myManifest = { Debug: (window.location.port !== ""), Name: "Il Lievitario", - Version: "3.1.1.0", + Version: "3.0.1.5", Author: "Denis Ironi", Settings: { DefaultURL: (window.location.port === "" ? "http://" + window.location.host + "/Service": "http://" + window.location.hostname + ":" + window.location.port + "/Service_Manut"), diff --git a/js/modules/category/categoryItemTemplate.html b/js/modules/category/categoryItemTemplate.html index 2dd1295..df9fc19 100644 --- a/js/modules/category/categoryItemTemplate.html +++ b/js/modules/category/categoryItemTemplate.html @@ -4,9 +4,9 @@ <% var item = data.items[i]; %>
  • <% if(item.firstImage === ""){ %> - + <%}else{%> - + <%}%>
    <%= unescape(item.titolo) %>
    <%= unescape(item.autore) %>
    diff --git a/js/modules/item/item.js b/js/modules/item/item.js index 0550ae9..d024063 100644 --- a/js/modules/item/item.js +++ b/js/modules/item/item.js @@ -58,7 +58,7 @@ define(['jquery', 'underscore', 'backbone', 'text!modules/item/itemViewTemplate. var self = this; $('body').scrollTop(0); - this.galleryWall = new Freewall("#Gallery"); + /*this.galleryWall = new Freewall("#Gallery"); this.galleryWall.reset({ selector: '.brick', animate: true, @@ -69,7 +69,7 @@ define(['jquery', 'underscore', 'backbone', 'text!modules/item/itemViewTemplate. } }); - var imgurl = Images.getThumb(48); + var imgurl = Images.getThumb(48);*/ /*var images = this.galleryWall.container.find('.brick'); images.find('img').load(function() { @@ -94,14 +94,14 @@ define(['jquery', 'underscore', 'backbone', 'text!modules/item/itemViewTemplate. ricetta: self.collRicetta.toJSON()[0], ingredienti: self.collIngredienti.toJSON(), profile: Profile, - images: Images, + //images: Images, })); self.scrollPositions = []; 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 = self.$el.find('#contentFoto a'); self.$el.find('#contentFoto a img').load(function(){ 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--) { self.scrollPositions.push(0); }; @@ -181,8 +181,8 @@ define(['jquery', 'underscore', 'backbone', 'text!modules/item/itemViewTemplate. $(this.$arrayContent[this.indexContent]).show(); $(this.$arrayNavBar[this.indexContent]).addClass('ui-btn-active'); $(this.$arrayNavBar[this.indexContent]).addClass('ui-state-persist'); - if(this.indexContent == 2) - this.galleryWall.fitWidth(); + /*if(this.indexContent == 2) + this.galleryWall.fitWidth();*/ } }); return ItemView; diff --git a/js/modules/item/itemViewTemplate.html b/js/modules/item/itemViewTemplate.html index 84625e5..bd4ef15 100644 --- a/js/modules/item/itemViewTemplate.html +++ b/js/modules/item/itemViewTemplate.html @@ -34,7 +34,7 @@

    <%= ricetta.procedimento%>

    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.

    -
    <% if(ricetta.autore.length > 0){ %> diff --git a/js/modules/settings/settings.js b/js/modules/settings/settings.js index 201a6e5..d34aa19 100644 --- a/js/modules/settings/settings.js +++ b/js/modules/settings/settings.js @@ -92,7 +92,7 @@ define(['jquery', 'underscore', 'backbone','text!modules/settings/settingsViewTe Profile.data.dataSpacc.provincia + "+" + Profile.data.dataSpacc.stato + "&sensor=false",                 Type: "GET"             }).then(function ( response ) { - if(response.results.length == 1) + if(response.results.length > 0) { Profile.data.dataSpacc.lat = response.results[0].geometry.location.lat; Profile.data.dataSpacc.long = response.results[0].geometry.location.lng;