cancel
Showing results for 
Search instead for 
Did you mean: 

how to enlarge edit properties form

ltardioli
Champ in-the-making
Champ in-the-making
I need to enlarge the edit properties form and I've tried the firebug to find out which CSS class to change, but I didnt find.
It seems that this property is defined in inline HTML.

<div id="template_x002e_documentlist_x002e_documentlibrary_x0023_default-editDetails-alf-id34-form-container" class="form-container yui-module yui-overlay yui-panel" style="visibility: inherit; width: 90em;">

This width element seems to control the size.

I was thinkin if there a way to change the size according the form.
For exemple, if I'm editing the model X so the size of the form is X.

Maybe I can use a FTL template to generate my form, but is that the best way?
Any ideas?

Thanks!
3 REPLIES 3

ltardioli
Champ in-the-making
Champ in-the-making
Anybody?

steven_okennedy
Star Contributor
Star Contributor
Hi ltardioli,

Unfortunately, there isn't a clean way to do this in Share at the minute as far as I'm aware (as of 4.0.2 anyway).  The form service itself is not responsible for the dialog that is used to show the edit properties popup.  An Alfresco.module.SimpleDialog is created by the document-edit-properties action and the results of the form service call are rendered as the contents of this Simple Dialog.

The problem is that the size of the dialog seems to be hardcoded in the javascript function that creates this dialog and it's set to 40em (share/components\documentlibrary/actions.js -> onActionDetails function).

var editDetails = new Alfresco.module.SimpleDialog(this.id + "-editDetails-" + Alfresco.util.generateDomId());         editDetails.setOptions(         {            width: "40em",            templateUrl: templateUrl,            actionUrl: null,            destroyOnHide: true,…‍‍‍‍‍‍‍‍‍‍‍

So all of your edit properties forms have to be 40em wide unless you override this function with an extension.  And, if you just do a simple override, then the new wider form will be used for the edit properties form for document types no matter whether they need this extra width or not. 

Quite an annoying limitation, unless I'm missing something

Regards

Steven

ltardioli
Champ in-the-making
Champ in-the-making
Hi Steven!
Thanks for reply!

I did what you said and it worked. But when I did I was with share debbug mode on. At the moment I turned off the debbug mode it stoped to work.

I found another javascript file with the same code you posted:

var editDetails = new Alfresco.module.SimpleDialog(this.id + "-editDetails-" + Alfresco.util.generateDomId());         editDetails.setOptions(         {            width: "40em",            templateUrl: templateUrl,            actionUrl: null,            destroyOnHide: true,‍‍‍‍‍‍‍‍

I changed and works fine.

The file is ../share/js/documentlibrary-actions.js.

I have no idea why actions.js didnt work without debbug mode.

Ps: I changed the actions-min.js too.