git-svn-id: https://msi/svn/firstRepo/WebClient/branches/NewRelease@33 0f545695-f87b-41b6-9a03-7f16563b5454
This commit is contained in:
@@ -3,22 +3,45 @@ function($, _, Backbone, Footer, Header, Profile){
|
||||
|
||||
var BaseView = Backbone.View.extend({
|
||||
|
||||
id: "",
|
||||
header: null,
|
||||
footer: null,
|
||||
created: true,
|
||||
|
||||
initialize: function () {
|
||||
this.header = new Header({ title: "Il Lievitario"});
|
||||
this.footer = new Footer();
|
||||
this.footer = new Footer();
|
||||
if( this.id !== "")
|
||||
{
|
||||
var el = $('#' + this.id);
|
||||
if(el.length !== 0)
|
||||
{
|
||||
this.created = false;
|
||||
this.setElement(el);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
render: function(){
|
||||
this.header.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);
|
||||
isStayInPage:function(){
|
||||
return true;
|
||||
},
|
||||
|
||||
render: function(){
|
||||
if(this.created === true)
|
||||
{
|
||||
this.header.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);
|
||||
}
|
||||
},
|
||||
onShowed: null
|
||||
onShowing: null,
|
||||
onShowed: null,
|
||||
onClosing: null,
|
||||
onClosed: null
|
||||
});
|
||||
return BaseView;
|
||||
});
|
||||
Reference in New Issue
Block a user