Hi all,
I have been trying to add an item directly (from the page, not from
adminCenrtral) in the data type I have created. I managed to call the
dialog and to create the new item, but after clicking the save button,
the dialog is closed, but the page (from which I called the dialog) is
replaced with the adminTree view of the data type.
After "pocking" around the code, I managed to find that this is due to
calling the getJsExecutedAfterSaving() method from DataDialog class.
This method calls javascript
opener.mgnl.data.DataTree.reloadAfterEdit('" + this.itemType + "', '"
+ this.path + "')
that explicitly calls to reload the tree view of the data type:
reloadAfterEdit : function(type, path){
document.location = contextPath + "/.magnolia/trees/" + type +
".html?mgnlCK=" + mgnlGetCacheKiller() + "&pathSelected=" + path;
}
My question is: Is this really necessary? Since it does not do
anything special (but to reload the exact view of the type), why not
use mgnlReloadOpener() javascript function, since it reloads the
opener, whoever it is? I tried this, and it is acting exactly as I
expect. When I call the dialog from the page, after save it reloads
the page, and when I call it from the adminCentral it return the exact
path of the data type.
Regards,
Vasko
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------