mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Document preview
- Added a cache token to avoid cache issues - Maximizes the panel to fit the window Uploader Possibility to generate multiple thumbnails on upload git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@10012 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -3,7 +3,7 @@ var content = null;
|
|||||||
var mimetype = null;
|
var mimetype = null;
|
||||||
var siteId = null;
|
var siteId = null;
|
||||||
var containerId = null;
|
var containerId = null;
|
||||||
var thumbnailName = null;
|
var thumbnailNames = null;
|
||||||
|
|
||||||
// Upload specific
|
// Upload specific
|
||||||
var uploadDirectory = null;
|
var uploadDirectory = null;
|
||||||
@@ -75,8 +75,8 @@ for each (field in formdata.fields)
|
|||||||
overwrite = field.value == "true";
|
overwrite = field.value == "true";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "thumbnail":
|
case "thumbnails":
|
||||||
thumbnailName = field.value;
|
thumbnailNames = field.value;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -193,10 +193,18 @@ else
|
|||||||
// Save new file
|
// Save new file
|
||||||
newFile.save();
|
newFile.save();
|
||||||
// Create thumbnail?
|
// Create thumbnail?
|
||||||
if (thumbnailName && thumbnailService.isThumbnailNameRegistered(thumbnailName))
|
if (thumbnailNames != null)
|
||||||
|
{
|
||||||
|
var thumbnails = thumbnailNames.split(",");
|
||||||
|
for (var i = 0; i < thumbnails.length; i++)
|
||||||
|
{
|
||||||
|
var thumbnailName = thumbnails[i];
|
||||||
|
if(thumbnailName != "" && thumbnailService.isThumbnailNameRegistered(thumbnailName))
|
||||||
{
|
{
|
||||||
newFile.createThumbnail(thumbnailName, true);
|
newFile.createThumbnail(thumbnailName, true);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
model.document = newFile;
|
model.document = newFile;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user