Version 15.59.3

This commit is contained in:
Antonio Cañas Vargas 2015-12-06 16:14:18 +01:00
parent 4abf527f15
commit 1eab745262
4 changed files with 23 additions and 16 deletions

View File

@ -1345,8 +1345,8 @@ a:hover img.CENTRE_PHOTO_SHOW
box-sizing:border-box;
position:absolute;
z-index:1000;
left:-203px;
top:-375px;
left:-300px;
top:-400px;
padding:6px;
background-color:rgba(255,255,255,0.8);
border-width:1px;

View File

@ -414,27 +414,34 @@ function readLastClicksData() {
}
// Zoom a user's photograph
function zoom(imagen,urlPhoto,shortName) {
var xPos = imagen.offsetLeft;
var yPos = imagen.offsetTop;
var tempEl = imagen.offsetParent;
function zoom(img,urlPhoto,shortName) {
var zoomImgWidth = 186; // big photo
var zoomImgHeight = 248; // big photo
var padding = 7; // padding around big photo including border
var xPos = img.offsetLeft;
var yPos = img.offsetTop;
var tempEl = img.offsetParent;
while (tempEl != null) {
xPos += tempEl.offsetLeft;
yPos += tempEl.offsetTop;
tempEl = tempEl.offsetParent;
}
xPos -= (187+15);
yPos -= ((250+15)/2);
if (yPos < 0)
yPos = 0;
if (xPos - (zoomImgWidth + padding*2) >= 0)
xPos -= (zoomImgWidth + padding*2); // zoom at left of the photo
else
xPos += img.width + 1; // zoom at right of the photo
yPos = yPos + img.height - zoomImgHeight - padding;
if (yPos < 0)
yPos = 0;
document.getElementById('zoomLyr').style.left = xPos + 'px';
document.getElementById('zoomLyr').style.top = yPos + 'px';
document.getElementById('zoomLyr').style.top = yPos + 'px';
document.getElementById('zoomImg').src = urlPhoto;
document.getElementById('zoomTxt').innerHTML = '<span class="ZOOM_TXT">' + shortName + '</span>';
}
// Exit from zooming a user's photograph
function noZoom(imagen) {
function noZoom() {
var xPos = -(187+15);
var yPos = -(250+15+110);
document.getElementById('zoomTxt').innerHTML = '';

View File

@ -94,7 +94,6 @@
----------Otros
....Etc.....
*/
// TODO: If photo zoom is out of the screen at left, put on right
// TODO: Change link to Degree in Statistics > Visits > By degree to internal Degree
// TODO: Link to user's country in public profile
// TODO: Show guests in connected users.
@ -111,12 +110,13 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 15.59.2 (2015/12/06)"
#define Log_PLATFORM_VERSION "SWAD 15.59.3 (2015/12/06)"
#define CSS_FILE "swad15.57.css"
// Number of lines (includes comments but not blank lines) has been got with the following command:
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h sql/swad*.sql | tail -1
/*
Version 15.59.3: Dec 06, 2015 If photo zoom is out of the screen at left, it is shown at right of the photo. (186445 lines)
Version 15.59.2: Dec 06, 2015 Courses with year not applicable are listed at the end. (186439 lines)
Version 15.59.1: Dec 06, 2015 Removed unused code related to year for optional courses. (186405 lines)
1 change necessary in database:

View File

@ -1079,7 +1079,7 @@ void Pho_ShowUsrPhoto (const struct UsrData *UsrDat,const char *PhotoURL,
Str_ReplaceSpecialCharByCodes (SpecialSurnames,2*Usr_MAX_BYTES_NAME_SPEC_CHAR+1);
strcat (SpecialShortName,"<br />");
strcat (SpecialShortName,SpecialSurnames);
fprintf (Gbl.F.Out," onmouseover=\"zoom(this,'%s','%s')\" onmouseout=\"noZoom(this);\"",
fprintf (Gbl.F.Out," onmouseover=\"zoom(this,'%s','%s')\" onmouseout=\"noZoom();\"",
PhotoURL,SpecialShortName);
}
@ -2256,7 +2256,7 @@ static void Pho_ShowDegreeAvgPhotoAndStat (struct Degree *Deg,Pho_AvgPhotoSeeOrP
NumStdsWithPhoto,Txt_photos,
NumStds > 0 ? (int) (((NumStdsWithPhoto * 100.0) / NumStds) + 0.5) :
0);
fprintf (Gbl.F.Out," onmouseover=\"zoom(this,'%s','%s')\" onmouseout=\"noZoom(this);\"",
fprintf (Gbl.F.Out," onmouseover=\"zoom(this,'%s','%s')\" onmouseout=\"noZoom();\"",
PhotoURL,PhotoCaption);
}
}