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

This commit is contained in:
2015-12-04 16:02:46 +00:00
parent 282ad76c48
commit 7c29b2d8b1
32 changed files with 10051 additions and 3807 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
<br>
<center>
<h1 style='font-size: xx-large;'><%= app.Name %><sup style='font-size: medium;'>&copy;</sup></h1>
<p>Copyright 2014<br>Lievitario è un marchio registrato</p>
<p>Copyright 2015<br>Lievitario è un marchio registrato</p>
<br>Applicazione Ricettario del <br><br>'<i><b>Gruppo La Pasta Madre</b></i>'<br><br>
<b>Versione:</b> <%= app.Version %><br><br>
<b>Sviluppatore:</b> <%= app.Author %><br><br>
+4 -1
View File
@@ -47,6 +47,9 @@ define(['jquery', 'underscore', 'backbone', 'text!modules/category/categoryViewT
$.mobile.loading('hide');
},
onShowed: function(){
$('body').scrollTop(0);
},
//render the content into div of view
render: function () {
@@ -62,7 +65,7 @@ define(['jquery', 'underscore', 'backbone', 'text!modules/category/categoryViewT
this.$el.append(this.footer.$el);
//return to enable chained calls
}
this.$el.find("#indexBtn").addClass("ui-btn-active");
this.$el.find("#indexBtn").addClass("ui-btn-active");
return this;
}
});
+44
View File
@@ -0,0 +1,44 @@
define(['jquery', 'underscore', 'backbone', 'text!modules/debug/debugViewTemplate.html', 'modules/base/baseView', 'classes/debug'],
function ($, _, Backbone, debugViewTemplate, BaseView, Debug) {
var DebugView = BaseView.extend({
//initialize template
template: _.template(debugViewTemplate),
initialize: function () {
this.id = "DebugView";
DebugView.__super__.initialize.call(this);
},
events: {
"click #clearDebug": "clrDebugBtn"
},
onShowed:function(){
this.$el.find('#debugInfo').height(350);
},
clrDebugBtn: function(){
Debug.clearMessage();
this.$el.find('#debugInfo').val('');
},
//render the content into div of view
render: function () {
if (this.created === true)
{
//this.header.title = "pippo";
DebugView.__super__.render.call(this);
//this.el is the root element of Backbone.View. By default, it is a div.
//$el is cached jQuery object for the view's element.
//append the compiled template into view div container
this.$el.append(this.header.$el);
this.$el.append(this.template());
this.$el.append(this.footer.$el);
this.$el.find("#moreBtn").addClass("ui-btn-active");
}
this.$el.find('#debugInfo').val(Debug.readMessage());
//$("#homeBtn").addClass("ui-btn-active");
//return to enable chained calls
return this;
}
});
return DebugView;
});
+5
View File
@@ -0,0 +1,5 @@
<div data-role="content">
<h1>Messaggi Debug</h1>
<textarea id="debugInfo" rows="15" style="height: auto;"></textarea>
<button id="clearDebug">Cancella Messaggi Debug</button>
</div>
+99 -18
View File
@@ -25,36 +25,117 @@ define(['jquery', 'underscore', 'backbone', 'text!modules/home/homeViewTemplate.
events: {
//"click #goFbGroup": "goFbGroup"
},
//goFbGroup: function () {
// window.localStorage.setItem("goFbGroup", 1);
// window.location.href = "https://www.facebook.com/groups/732844273469518/";
//},
freeWall: null,
onShowed: function ()
{
var self = this;
var size = $('.itemMenuHomeMetro').first().css("width").replace("px", "");
if (parseInt(size) === 0)
freeWall: null,
calculateSize: function(){
var size = 100;
var widthDevice = (window.innerWidth > 0) ? window.innerWidth : screen.width;
if(window.matchMedia("(orientation: portrait)").matches)
{
size = $('.itemMenuHomeMetro').first().attr("lastSize");
}
$('.itemMenuHomeMetro').first().attr("lastSize", size);
if(widthDevice > 1800)
{
size = 350;
}
else if(widthDevice >= 900)
{
size = 200;
}
else if(widthDevice >= 700)
{
size = 250;
}
else if(widthDevice >= 600)
{
size = 200;
}
else if(widthDevice >= 320)
{
size = 120;
}
else
{
size = 100;
}
}
else {
if(widthDevice >= 1700)
{
size = 350;
}
else if(widthDevice >= 1500)
{
size = 300;
}
else if(widthDevice >= 1400)
{
size = 245;
}
else if(widthDevice >= 1200)
{
size = 250;
}
else if(widthDevice >= 900)
{
size = 180;
}
else if(widthDevice >= 700)
{
size = 140;
}
else if(widthDevice >= 690)
{
size = 120;
}
else if(widthDevice >= 640)
{
size = 125;
}
else if(widthDevice >= 550)
{
size = 100;
}
else if(widthDevice >= 400)
{
size = 85;
}
else
{
size = 60;
}
}
return size;
},
setupFreeWall: function(){
var self = this;
//$('.itemMenuHomeMetro').first().attr("lastSize", size);
if (this.freeWall === null) {
this.freeWall = new freewall("#menuHomeMetro");
}
this.freeWall.reset({
selector: '.itemMenuHomeMetro',
animate: true,
cellW: size,
cellH: size,
cellW: self.calculateSize,
cellH: self.calculateSize,
onResize: function () {
this.refresh();
Debug.writeMessage("onResize");
//this.refresh();
this.fitWidth();
//Debug.writeMessage("onResize");
}
});
this.freeWall.fitWidth();
},
onShowed: function ()
{
var self = this;
$( window ).on( "orientationchange", function( event ) {
});
self.setupFreeWall();
if (Profile.data.picture !== null)
{
+2 -2
View File
@@ -1,8 +1,8 @@
<div data-role="content">
<div style="text-align: center;">
<% if(profile.data.name){ %>
<h2 id="benvenuto">Bentornat<% if(profile.data.gender=="male"){%>o<%}else{%>a<%}%>
<br><%=profile.data.name %></h2>
<h2 id="benvenuto">Bentornat<% if(profile.data.gender=="male"){%>o<%}else{%>a<%}%><br><%=profile.data.name %></h2><% }else{ %>
<h2 id="benvenuto">Benarrivata/o nel nostro ricettario</h2>
<% } %>
</div>
<div>
+1 -2
View File
@@ -25,8 +25,7 @@ define(['jquery', 'underscore', 'backbone', 'text!modules/sync/syncViewTemplate.
},
resetBtn: function (e) {
e.preventDefault();
Profile.setKeySave(null);
window.localStorage.setItem("hello", null);
Profile.resetProfile();
this.updateLoginBtn();
//Backbone.history.loadUrl();
},