Upload form customization
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-05-2013 11:42 AM
Hello everyone!
Is there someone who knows how to customize the upload form to allow the user to select the content type for the document before upload it?
I've tried modifying flash-upload.get.js in
/opt/alfresco/tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/upload
adding in model.contentTypes= my custom model like this
<blockcode>
/**
* Custom content types
*/
function getContentTypes()
{
// TODO: Data webscript call to return list of available types
var contentTypes = [
{
id: "cm:content",
value: "cm_content"
},
{
id: "trffer",
value: "tr_offer"
}];
return contentTypes;
}
model.contentTypes = getContentTypes();
function main()
{
// Widget instantiation metadata…
var flashUpload = {
id : "FlashUpload",
name : "Alfresco.FlashUpload"
};
model.widgets = [flashUpload];
}
main();
</blockcode>
but when i upload a file the dropdown button to chose the type continue to not be shown.
Is there someone who knows how to customize the upload form to allow the user to select the content type for the document before upload it?
I've tried modifying flash-upload.get.js in
/opt/alfresco/tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/upload
adding in model.contentTypes= my custom model like this
<blockcode>
/**
* Custom content types
*/
function getContentTypes()
{
// TODO: Data webscript call to return list of available types
var contentTypes = [
{
id: "cm:content",
value: "cm_content"
},
{
id: "trffer",
value: "tr_offer"
}];
return contentTypes;
}
model.contentTypes = getContentTypes();
function main()
{
// Widget instantiation metadata…
var flashUpload = {
id : "FlashUpload",
name : "Alfresco.FlashUpload"
};
model.widgets = [flashUpload];
}
main();
</blockcode>
but when i upload a file the dropdown button to chose the type continue to not be shown.
Labels:
- Labels:
-
Archive
4 REPLIES 4
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-06-2013 07:41 AM
Hi,
You could take a look at this blog post from Ixxus from some time ago: http://www.ixxus.co.uk/blog/2011/09/customising-upload-files-dialog-alfresco-share
You could take a look at this blog post from Ixxus from some time ago: http://www.ixxus.co.uk/blog/2011/09/customising-upload-files-dialog-alfresco-share
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-06-2013 07:44 AM
BTW a more concise article can be found here: http://tribloom.com/blogs/michael/2011/05/03/share-dynamic-forms
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-06-2013 09:19 AM
Thank you for suggestions but i've already seen and followed those article but it still doesn't work.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-19-2014 09:02 AM
Refer following forum post (for Alfresco 4.2.x):
http://forums.alfresco.com/forum/developer-discussions/alfresco-share-development/set-current-conten...
http://forums.alfresco.com/forum/developer-discussions/alfresco-share-development/set-current-conten...