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

This commit is contained in:
2015-12-09 13:37:59 +00:00
parent 7c29b2d8b1
commit 00411c823b
6 changed files with 18 additions and 4 deletions
+2 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,7 +1,7 @@
var myManifest = { var myManifest = {
Debug: (window.location.port !== ""), Debug: (window.location.port !== ""),
Name: "Il Lievitario", Name: "Il Lievitario",
Version: "2.9.0.1", Version: "2.9.0.2",
Author: "Denis Ironi", Author: "Denis Ironi",
Settings: { Settings: {
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"),
+3
View File
@@ -26,6 +26,9 @@ define(['jquery', 'underscore', 'backbone', 'text!modules/index/indexViewTemplat
} }
});*/ });*/
}, },
onShowed: function(){
$('body').scrollTop(0);
},
//render the content into div of view //render the content into div of view
render: function () { render: function () {
if (this.created === true) if (this.created === true)
+10
View File
@@ -53,6 +53,9 @@ define(['jquery', 'underscore', 'backbone', 'text!modules/item/itemViewTemplate.
} }
); );
}, },
onShowed: function(){
$('body').scrollTop(0);
},
//render the content into div of view //render the content into div of view
render: function () { render: function () {
if (this.fetchedIngredienti && this.fetchedRicetta) if (this.fetchedIngredienti && this.fetchedRicetta)
@@ -69,9 +72,14 @@ define(['jquery', 'underscore', 'backbone', 'text!modules/item/itemViewTemplate.
ingredienti: self.collIngredienti.toJSON() ingredienti: self.collIngredienti.toJSON()
})); }));
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');
for (var i = self.$arrayContent.length - 1; i >= 0; i--) {
self.scrollPositions.push(0);
};
var favBtn = self.$el.find('#favoriteBtn'); var favBtn = self.$el.find('#favoriteBtn');
if (exist > 0) if (exist > 0)
favBtn.addClass('ui-disabled'); favBtn.addClass('ui-disabled');
@@ -108,8 +116,10 @@ define(['jquery', 'underscore', 'backbone', 'text!modules/item/itemViewTemplate.
{ {
if (this.$arrayContent.length > newIndex && newIndex >= 0) if (this.$arrayContent.length > newIndex && newIndex >= 0)
{ {
this.scrollPositions[this.indexContent] = $('body').scrollTop();
this.indexContent = newIndex; this.indexContent = newIndex;
this.switchContent(); this.switchContent();
$('body').scrollTop(this.scrollPositions[this.indexContent]);
} }
}, },
switchContent: function () { switchContent: function () {