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

This commit is contained in:
2014-12-10 15:06:13 +00:00
parent 876ee18579
commit f57f55e2a9
58 changed files with 873 additions and 487 deletions
+21 -3
View File
@@ -1,5 +1,7 @@
define(['jquery', 'underscore', 'backbone','text!modules/home/homeViewTemplate.html', 'modules/base/baseView', 'classes/profile'],
function($, _, Backbone, homeViewTemplate, BaseView, Profile){
define(['jquery', 'underscore', 'backbone','text!modules/home/homeViewTemplate.html',
'modules/base/baseView', 'classes/profile', 'classes/utility', 'model/lastRicette/lastRicetteCollection', 'modules/lastricette/lastRicette'],
function($, _, Backbone, homeViewTemplate,
BaseView, Profile, Utility, LastRicetteCollection, LastRicette ){
var HomeView = BaseView.extend({
@@ -12,7 +14,8 @@ define(['jquery', 'underscore', 'backbone','text!modules/home/homeViewTemplate.h
},
events: {
"click #goFbGroup": "goFbGroup"
"click #goFbGroup": "goFbGroup",
"click #notifyBtn": "onNotifyBtn"
},
goFbGroup: function(){
@@ -20,6 +23,14 @@ define(['jquery', 'underscore', 'backbone','text!modules/home/homeViewTemplate.h
window.location.href = "https://www.facebook.com/groups/732844273469518/";
},
onNotifyBtn:function(){
var lastricette = new LastRicetteCollection();
// will render home view and navigate to homeView
var lastRicetteView=new LastRicette({ collection: lastricette});
//indexView.render();
lastRicetteView.bind('renderCompleted:Categories',Utility.changePage,this);
},
onShowed: function()
{
if(window.localStorage.getItem("goFbGroup") !== "1")
@@ -38,6 +49,13 @@ define(['jquery', 'underscore', 'backbone','text!modules/home/homeViewTemplate.h
this.$el.append(this.footer.$el);
this.$el.find("#homeBtn").addClass("ui-btn-active");
var lastNumRicette = Profile.getLastNumRicette();
//if( lastNumRicette > 0)
{
this.$el.find('#notifyBtn').closest('.ui-btn').show();
this.$el.find('#notifyBtn').addClass("notification");
this.$el.find('.circle').text(12);
}
//$("#homeBtn").addClass("ui-btn-active");
//return to enable chained calls
return this;
+3 -3
View File
@@ -1,15 +1,15 @@
<div data-role="content">
<div style="text-align: center;">
<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>
<% } %>
<img id="sfondo" src="https://dl.dropboxusercontent.com/s/6qrdp9mbi1rb92k/sfondo.png">
<img id="sfondo" src="https://dl.dropboxusercontent.com/s/6qrdp9mbi1rb92k/sfondo.png">
</div>
</div>
<div data-role="popup" id="nuovoGruppo" data-history="false" data-dismissible="false">
<div data-role="header"><h1>IMPORTANTE</h1></div>
    <div role="main" class="ui-content">
<div role="main" class="ui-content">
<p style="text-align: center;font-style: italic;">
<img src="https://dl.dropboxusercontent.com/s/xnbrbbe7eejkfv2/festa.png"><br><br>
Le admin <br><br><b>Alessia, Elena e Francesca</b><br><br>hanno RIFONDATO IL GRUPPO!!<br>