@Override
protected Map<String, String> getGalleryOpenParams(
CmsObject cms,
CmsMessages widgetDialog,
I_CmsWidgetParameter param,
String resource,
long hashId) {
Map<String, String> result = super.getGalleryOpenParams(cms, widgetDialog, param, resource, hashId);
StringBuffer currentElement = new StringBuffer("'+document.getElementById('");
if (param != null) {
currentElement.append(PREFIX_IMAGE).append(param.getId());
}
currentElement.append("').getAttribute('value')+'");
if (param != null) {
if (getWidgetConfiguration(cms, widgetDialog, param).isShowFormat()) {
currentElement.append("%3F__scale%3D'+document.getElementById('");
currentElement.append(PREFIX_SCALE).append(param.getId()).append("').getAttribute('value')+'");
currentElement.append("%26format%3D'+escape(document.getElementById('").append(PREFIX_FORMAT).append(
param.getId()).append("')[document.getElementById('").append(PREFIX_FORMAT).append(
param.getId()).append("').selectedIndex].value)+'");
}
}
result.put(I_CmsGalleryProviderConstants.CONFIG_CURRENT_ELEMENT, currentElement.toString());
return result;
}