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
+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)
{