Commit f848da06 authored by Maxim Kadushkin's avatar Maxim Kadushkin

[PPE embed] fix bug 33446

parent 5f99081e
...@@ -274,12 +274,20 @@ var ApplicationController = new(function(){ ...@@ -274,12 +274,20 @@ var ApplicationController = new(function(){
if ( e.keyCode == 13 ){ if ( e.keyCode == 13 ){
var newPage = parseInt($('#page-number').val()); var newPage = parseInt($('#page-number').val());
if ( newPage > maxPages ) newPage = maxPages; else if ( isNaN(newPage) ) {
if ( newPage < 2 || isNaN(newPage) ) newPage = 1; $('#page-number').val(currentPage + 1);
} else {
if ( isplaymode ) if ( newPage > maxPages ) newPage = maxPages; else
api.DemonstrationGoToSlide(newPage-1); else if ( newPage < 2 ) newPage = 1;
api.goToPage(newPage-1);
if ( newPage == currentPage + 1 ) {
$('#page-number').val( newPage );
} else
if (isplaymode) {
currentPage = newPage - 1;
api.DemonstrationGoToSlide(newPage - 1);
} else api.goToPage(newPage - 1);
}
$pagenum.blur(); $pagenum.blur();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment