From: <fg...@us...> - 2008-07-29 07:55:32
|
Revision: 901 http://openutils.svn.sourceforge.net/openutils/?rev=901&view=rev Author: fgiust Date: 2008-07-29 07:55:41 +0000 (Tue, 29 Jul 2008) Log Message: ----------- grid control now works properly also with fields containing non-standard chars in their name Modified Paths: -------------- trunk/openutils-mgnlcontrols/src/main/java/net/sourceforge/openutils/mgnlcontrols/dialog/ConfigurableFreemarkerDialog.java trunk/openutils-mgnlcontrols/src/main/resources/dialogs/grid.ftl trunk/openutils-mgnlcontrols/src/site/changes/changes.xml Modified: trunk/openutils-mgnlcontrols/src/main/java/net/sourceforge/openutils/mgnlcontrols/dialog/ConfigurableFreemarkerDialog.java =================================================================== --- trunk/openutils-mgnlcontrols/src/main/java/net/sourceforge/openutils/mgnlcontrols/dialog/ConfigurableFreemarkerDialog.java 2008-07-27 09:20:48 UTC (rev 900) +++ trunk/openutils-mgnlcontrols/src/main/java/net/sourceforge/openutils/mgnlcontrols/dialog/ConfigurableFreemarkerDialog.java 2008-07-29 07:55:41 UTC (rev 901) @@ -65,6 +65,8 @@ private Map configuration; + private String uuid; + /** * {@inheritDoc} */ @@ -109,6 +111,7 @@ protected Map getSubNodes(Content node) throws RepositoryException, AccessDeniedException { + this.uuid = node.getUUID(); Map values = new LinkedHashMap(); // cycles on properties and stores them in map @@ -172,6 +175,7 @@ parameters.put("request", this.getRequest()); parameters.put("debug", SystemProperty.getBooleanProperty("magnolia.develop")); parameters.put("configuration", this.configuration); + parameters.put("uuid", this.uuid); parameters.put("alreadyrendered", getRequest().getAttribute(alreadyRenderedKey) != null); this.drawHtmlPre(out); Modified: trunk/openutils-mgnlcontrols/src/main/resources/dialogs/grid.ftl =================================================================== --- trunk/openutils-mgnlcontrols/src/main/resources/dialogs/grid.ftl 2008-07-27 09:20:48 UTC (rev 900) +++ trunk/openutils-mgnlcontrols/src/main/resources/dialogs/grid.ftl 2008-07-29 07:55:41 UTC (rev 901) @@ -8,13 +8,19 @@ [/#if] <script type="text/javascript" src="${request.contextPath}/.resources/controls/js/LinkField.js"></script> <script type="text/javascript" src="${request.contextPath}/.resources/controls/js/CheckColumn.js"></script> + <script type="text/javascript" src="${request.contextPath}/.resources/controls/js/PipeComboBox.js"></script> <link rel="stylesheet" type="text/css" href="${request.contextPath}/.resources/ext/css/ext-all.css" /> <link rel="stylesheet" type="text/css" href="${request.contextPath}/.resources/controls/css/grid.css" /> [/#if] +[#assign key = uuid?replace("-", "")] + <input type="hidden" id="${name}" name="${name}" value="${value}"/> +<div id="grid-container-${name}"> + <div id="grid-${name}"></div> +</div> [#list configuration.columns?values as colmap] [#if (colmap.type?? && colmap.type = 'combo')] @@ -29,7 +35,7 @@ <script type="text/javascript"> // <![CDATA[ -function loadTable${name}(action) { +function loadTable${key}(action) { var numOfRows= ${configuration.rows}; var hidden = document.getElementById('${name}'); @@ -73,7 +79,7 @@ editor: new Ed(new LinkField({ })) [#elseif (colmap.type?? && colmap.type = 'combo')] - editor: new Ed(new fm.ComboBox({ + editor: new Ed(new [#if (colmap.pipe?? && colmap.pipe = 'true')]PipeComboBox[#else]fm.ComboBox[/#if]({ typeAhead: true, triggerAction: 'all', transform: 'combo-${name}', @@ -120,7 +126,7 @@ icon: '${request.contextPath}/.resources/controls/img/icon-paste.png', iconCls: 'button-paste', handler: function() { - mgnlOpenWindow('/.resources/controls/clipboard.html?name=${name}', 320, 200); + mgnlOpenWindow('/.resources/controls/clipboard.html?name=${key}', 320, 200); } }], viewConfig: { @@ -157,7 +163,7 @@ hidden._grid = grid; } -function paste${name}(text) { +function paste${key}(text) { var hidden = document.getElementById('${name}'); var grid = hidden._grid; var rows, i, I; @@ -221,10 +227,11 @@ } Ext.onReady(function(){ - loadTable${name}('load','${name}'); + loadTable${key}('load','${name}'); }); // ]]> </script> + Modified: trunk/openutils-mgnlcontrols/src/site/changes/changes.xml =================================================================== --- trunk/openutils-mgnlcontrols/src/site/changes/changes.xml 2008-07-27 09:20:48 UTC (rev 900) +++ trunk/openutils-mgnlcontrols/src/site/changes/changes.xml 2008-07-29 07:55:41 UTC (rev 901) @@ -8,6 +8,10 @@ <author email="fgiust(at)users.sourceforge.net">Fabrizio Giustina</author> </properties> <body> + <release version="3.5.5" date="2008-07-29" description=""> + <action type="fix" dev="fgiust">grid control now works properly also with fields containing non-standard chars + in their name</action> + </release> <release version="3.5.4" date="2008-07-21" description=""> <action type="fix" dev="fgiust">esternal javascript are now included only once when using multiple grid controls in the same dialog</action> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |