fixed auto scrolling bug when a new panel is opened

git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12578 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
nagoon97 2013-01-23 02:56:34 +00:00
parent f6a00de24c
commit ea06e64eb4
2 changed files with 23 additions and 3 deletions

View file

@ -1033,6 +1033,7 @@ jQuery(function($){
if(ev.keyCode === 27){ if(ev.keyCode === 27){
$msgBox.find("._cancel").click(); $msgBox.find("._cancel").click();
ev.preventDefault();
} }
}); });
@ -2426,9 +2427,29 @@ jQuery(function($){
//----------------menu selector end //----------------menu selector end
jQuery(function($){ jQuery(function($){
_alert = alert;
alert = function(){ alert = function(){
return $.xeMsgBox.alert.apply($.xeMsgBox, arguments); return $.xeMsgBox.alert.apply($.xeMsgBox, arguments);
} }
setTimeout(function(){$('div.message.info').fadeOut(1000);}, 2500); setTimeout(function(){$('div.message.info').fadeOut(1000);}, 2500);
}); });
jQuery(function($){
$(document.body).on('keydown', 'input', function(ev){
var $container, $btn;
if(ev.keyCode === 13){
$container = $(ev.target).parent();
while($container){
$btn = $container.find('button.x_btn-primary');
if($btn.length>0){
ev.preventDefault();
$btn.click();
break;
}
$container = $container.parent();
}
}
});
});

View file

@ -1386,7 +1386,7 @@ jQuery(function($){
}); });
function scrollToRight(){ function scrollToRight(){
$('#site').scrollTo($('#site').width(), 0, {duration: 0 } ); $('#site').scrollTo($('#site')[0].scrollWidth, 0, {duration: 0 } );
} }
function scrollToTop($Area){ function scrollToTop($Area){
@ -3246,7 +3246,6 @@ jQuery(function($){
} }
); );
}) })
scrollToRight(); scrollToRight();
}); });
}); });