More responsive interface with auto resize (#10)

This commit is contained in:
RainLoop Team 2013-12-30 01:13:35 +04:00
parent acf80b96a3
commit 17b2afcf22
32 changed files with 1093 additions and 296 deletions

View file

@ -260,4 +260,54 @@ AbstractApp.prototype.bootstart = function ()
_.delay(function () {
Utils.windowResize();
}, 1000);
ssm.addState({
id: 'mobile',
maxWidth: 767,
onEnter: function(){
$html.addClass('ssm-state-mobile');
},
onLeave: function(){
$html.removeClass('ssm-state-mobile');
}
});
ssm.addState({
id: 'tablet',
minWidth: 768,
maxWidth: 1023,
onEnter: function(){
$html.addClass('ssm-state-tablet');
},
onLeave: function(){
$html.removeClass('ssm-state-tablet');
}
});
ssm.addState({
id: 'desktop',
minWidth: 1000,
maxWidth: 1366,
onEnter: function(){
$html.addClass('ssm-state-desktop');
},
onLeave: function(){
$html.removeClass('ssm-state-desktop');
}
});
ssm.addState({
id: 'desktop-large',
minWidth: 1367,
onEnter: function(){
$html.addClass('ssm-state-desktop-large');
},
onLeave: function(){
$html.removeClass('ssm-state-desktop-large');
}
});
_.delay(function () {
ssm.ready();
}, 500);
};