From 03f3d24114b56f55aba941e7ca5ef39437a9353b Mon Sep 17 00:00:00 2001 From: riccardo Date: Wed, 22 Jun 2011 13:43:03 +0200 Subject: [PATCH] fixed popup bug and some code missing ";" --- telemeta/htdocs/js/playerLoader.js | 6 +-- telemeta/htdocs/js/popupdiv.js | 56 +++++++++------------- telemeta/htdocs/timeside/js/player.js | 6 +-- telemeta/htdocs/timeside/js/rulermarker.js | 12 ++--- 4 files changed, 35 insertions(+), 45 deletions(-) diff --git a/telemeta/htdocs/js/playerLoader.js b/telemeta/htdocs/js/playerLoader.js index 9343a9a9..5c39d49a 100644 --- a/telemeta/htdocs/js/playerLoader.js +++ b/telemeta/htdocs/js/playerLoader.js @@ -362,12 +362,12 @@ function loadPlayer(analizerUrl, soundUrl, soundImgSize, itemId, visualizers, cu var confirmExit = function(){ var markerUnsaved=0; map.each(function(i,marker){ - if(!marker.isSavedOnServer){ + if(!marker.isSavedOnServer || marker.isEditable){ markerUnsaved++; } }); if(markerUnsaved>0){ - return gettrans('there is at least one unsaved marker') +' ('+ markerUnsaved+ '). '+ + return gettrans('there are unsaved or modified markers') +' ('+ markerUnsaved+ '). '+ gettrans('If you exit the page you will loose your changes'); } @@ -382,7 +382,7 @@ function loadPlayer(analizerUrl, soundUrl, soundImgSize, itemId, visualizers, cu //a number N means: popup stays maximum N seconds on the screen if(POPUP_TIMEOUT){ var popupdiv = new PopupDiv({ - focusable: true, + //focusable: false, titleClass: 'markersdivTitle', //showClose:true, diff --git a/telemeta/htdocs/js/popupdiv.js b/telemeta/htdocs/js/popupdiv.js index 4784fa95..fde0afd6 100644 --- a/telemeta/htdocs/js/popupdiv.js +++ b/telemeta/htdocs/js/popupdiv.js @@ -1011,17 +1011,18 @@ function PopupDiv() { 'top':bounds.y+'px' }); - // var topDiv =subdivs.eq(0); - // var centralDiv = subdivs.eq(1); - // var bottomDiv = subdivs.eq(2); - // console.log('presize'); - // console.log('width: '+ topDiv.width()+' css-minWidth: ' +topDiv.css('minWidth')+' css-width: ' +topDiv.css('width')+' css-maxWidth: ' +topDiv.css('maxWidth')); - // console.log('width: '+centralDiv.width()+' css-minWidth: ' +centralDiv.css('minWidth')+' css-width: ' +centralDiv.css('width')+' css-maxWidth: ' +centralDiv.css('maxWidth')); - // console.log('width: '+bottomDiv.width()+' css-minWidth: ' +bottomDiv.css('minWidth')+' css-width: ' +bottomDiv.css('width')+' css-maxWidth: ' +bottomDiv.css('maxWidth')); - // console.log(' ' ); +// var topDiv =subdivs.eq(0); +// var centralDiv = subdivs.eq(1); +// var bottomDiv = subdivs.eq(2); +// console.log('presize'); +// console.log('width: '+ topDiv.width()+' css-minWidth: ' +topDiv.css('minWidth')+' css-width: ' +topDiv.css('width')+' css-maxWidth: ' +topDiv.css('maxWidth')); +// console.log('width: '+centralDiv.width()+' css-minWidth: ' +centralDiv.css('minWidth')+' css-width: ' +centralDiv.css('width')+' css-maxWidth: ' +centralDiv.css('maxWidth')); +// console.log('width: '+bottomDiv.width()+' css-minWidth: ' +bottomDiv.css('minWidth')+' css-width: ' +bottomDiv.css('width')+' css-maxWidth: ' +bottomDiv.css('maxWidth')); +// console.log(' ' ); }; p.postSizeFcn = function(){ + //set title and close button to span whole width, if necessary //closeButton.outerWidth should be zero if this.showClose = false //titleInput.outerWidth(true) should be equal to titleInput.width(), as margins borders and padding are zero, however we want to calculate it safely @@ -1041,28 +1042,19 @@ function PopupDiv() { var maxWidth = div.width(); var width = centralDiv.outerWidth(true); - if(maxHeight<=0 || maxWidth<=0){ - //centralDiv.hide(); - return; - } - // if(maxHeight0){ + centralDiv.css('height',maxHeight+'px'); + } //same for width - centralDiv.css('width',maxWidth+'px'); + //centralDiv.css('width',maxWidth+'px'); - //TODO: check padding margins border or set them to zero in preSizeFcn!!!!!! - - - // centralDiv.css('width',maxWidth+'px'); - // if(maxWidth