|
@@ -143,6 +143,7 @@
|
|
try{
|
|
try{
|
|
if(($(this).hasClass('topbar-home') || $(this).hasClass('topbar-back'))&&$(window).width()<767){
|
|
if(($(this).hasClass('topbar-home') || $(this).hasClass('topbar-back'))&&$(window).width()<767){
|
|
$('#topbar').children('div.topbar-right,div.topbar-left').toggle();
|
|
$('#topbar').children('div.topbar-right,div.topbar-left').toggle();
|
|
|
|
+ $('#topbar').resize();
|
|
}else if($(this).hasClass('topbar-history')){
|
|
}else if($(this).hasClass('topbar-history')){
|
|
History.back();
|
|
History.back();
|
|
}else{
|
|
}else{
|
|
@@ -164,6 +165,9 @@
|
|
setKey(null);
|
|
setKey(null);
|
|
}
|
|
}
|
|
$(document).ready(function(){
|
|
$(document).ready(function(){
|
|
|
|
+ if(!exists($.support.touch)){
|
|
|
|
+ $.support.touch = 'ontouchstart' in window || 'onmsgesturechange' in window;
|
|
|
|
+ }
|
|
$(window).on('statechange',function(){
|
|
$(window).on('statechange',function(){
|
|
getNewState();
|
|
getNewState();
|
|
if(!equal(State.data,Old)){
|
|
if(!equal(State.data,Old)){
|
|
@@ -224,24 +228,27 @@
|
|
flag('load',false);
|
|
flag('load',false);
|
|
});
|
|
});
|
|
},'json');
|
|
},'json');
|
|
- if(!$.support.touch){
|
|
+ $('#content').niceScroll({
|
|
- $('#content').niceScroll({
|
|
+ cursorwidth: 10,
|
|
- cursorwidth: 10,
|
|
+ nativeparentscrolling: false,
|
|
- nativeparentscrolling: false,
|
|
+ preservenativescrolling: false
|
|
- preservenativescrolling: false
|
|
+ });
|
|
- });
|
|
+ document.addEventListener('touchmove',function(e){
|
|
- document.addEventListener('touchmove',function(e){
|
|
+ e.preventDefault();
|
|
- e.preventDefault();
|
|
+ });
|
|
- });
|
|
|
|
- }
|
|
|
|
});
|
|
});
|
|
$(window).resize(function(){
|
|
$(window).resize(function(){
|
|
if($(window).width()>767){
|
|
if($(window).width()>767){
|
|
$('#topbar div.topbar-right, #topbar div.topbar-left').css({
|
|
$('#topbar div.topbar-right, #topbar div.topbar-left').css({
|
|
'display': ''
|
|
'display': ''
|
|
});
|
|
});
|
|
|
|
+ }else{
|
|
|
|
+ $('#content').height($('body').height()-$('#topbar').height());
|
|
$('#content').getNiceScroll().resize();
|
|
$('#content').getNiceScroll().resize();
|
|
}
|
|
}
|
|
|
|
+ }).resize();
|
|
|
|
+ $('#topbar').resize(function(){
|
|
|
|
+ $(window).resize();
|
|
});
|
|
});
|
|
shortcut.add('f12',function(){
|
|
shortcut.add('f12',function(){
|
|
if(!flag('firebug-lite')){
|
|
if(!flag('firebug-lite')){
|