improve image resizing (thumbnail) and add crop option
This commit is contained in:
@@ -275,17 +275,17 @@ function setThumbnails(bShow)
|
||||
|
||||
function getImageUrl(sImageName, bThumbnail)
|
||||
{
|
||||
bThumbnail = bThumbnail || false;
|
||||
|
||||
//Stored image
|
||||
var sImageUrl = (bThumbnail?databap.consts.image_folder_thumb:databap.consts.image_folder)+sImageName;
|
||||
if(file_exists(sImageUrl))
|
||||
if(!file_exists(sImageUrl))
|
||||
{
|
||||
return sImageUrl;
|
||||
//Temp image
|
||||
sImageUrl = databap.consts.image_folder_tmp+sImageName;
|
||||
if(!file_exists(sImageUrl)) sImageUrl = '';
|
||||
}
|
||||
sImageUrl = databap.consts.image_folder_tmp+sImageName;
|
||||
if(file_exists(sImageUrl))
|
||||
{
|
||||
return sImageUrl;
|
||||
}
|
||||
return '';
|
||||
return sImageUrl;
|
||||
}
|
||||
|
||||
function addStep(stepId, sPosition, sDesc)
|
||||
@@ -451,9 +451,8 @@ function saveProcedure()
|
||||
databap.addSuccessIcon();
|
||||
//setDisplay('read');
|
||||
|
||||
//Unblock exit
|
||||
//Unblock exit & go
|
||||
databap.tmp('started', false);
|
||||
|
||||
databap.goToInternalLink('proc', proc_info.proc_id);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user