From: <die...@us...> - 2011-02-16 18:26:30
|
Revision: 3342 http://openutils.svn.sourceforge.net/openutils/?rev=3342&view=rev Author: diego_schivo Date: 2011-02-16 18:26:23 +0000 (Wed, 16 Feb 2011) Log Message: ----------- MEDIA-218 search fields initialization Modified Paths: -------------- trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaBrowserPage.html trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/checkbox.ftl trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/date.ftl trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/input.ftl trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/path.ftl trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/radio.ftl trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/select.ftl Modified: trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaBrowserPage.html =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaBrowserPage.html 2011-02-16 17:59:28 UTC (rev 3341) +++ trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaBrowserPage.html 2011-02-16 18:26:23 UTC (rev 3342) @@ -137,7 +137,7 @@ setTimeout(function() { setTreeCollapsed(false); frames['mediaTreeView'].location.href = getTreeUrl(); - frames['advancedSearchView'].location.href = "${this.request.contextPath}/.magnolia/pages/media-advsearchform.html?selectMedia="+selectMedia+"&playlistUUID=${this.playlistUUID!''}"; + frames['advancedSearchView'].location.href = "${this.request.contextPath}/.magnolia/pages/media-advsearchform.html?selectMedia="+selectMedia+"&playlistUUID=${this.playlistUUID!''}&query=hello&type=video&type=document"; if (openPath != null && openPath != "null" && openPath.length > 0) { reloadFolder(openPath); Modified: trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/checkbox.ftl =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/checkbox.ftl 2011-02-16 17:59:28 UTC (rev 3341) +++ trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/checkbox.ftl 2011-02-16 18:26:23 UTC (rev 3342) @@ -5,7 +5,7 @@ [#list filter.options as option] <div class="inner-row"> - <input type="checkbox" id="${filterKey}_${option.value}" name="${filterKey}" value="${option.value}" /> + <input type="checkbox" id="${filterKey}_${option.value}" name="${filterKey}" value="${option.value}"[#if ((this.request.getParameterValues(filterKey)![])?seq_contains(option.value))] checked="checked"[/#if] /> <label for="${filterKey}_${option.value}">[@msgIfAvail option.label /]</span> </div> [/#list] Modified: trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/date.ftl =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/date.ftl 2011-02-16 17:59:28 UTC (rev 3341) +++ trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/date.ftl 2011-02-16 18:26:23 UTC (rev 3342) @@ -3,7 +3,7 @@ <label for="${filterKey}">[@msgIfAvail filter.label /]</label> [/#if] - <input type="text" name="${filterKey}" id="${filterKey}" value="" class="input-date" /> + <input type="text" name="${filterKey}" id="${filterKey}" value="${this.request.getParameter(filterKey)!''}" class="input-date" /> <span class="mgnlControlButton" id="butt_${filterKey}" onclick="cal_butt_${filterKey}.show()">${this.msgs['buttons.date']}</span> <script type="text/javascript"> // <![CDATA[ Modified: trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/input.ftl =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/input.ftl 2011-02-16 17:59:28 UTC (rev 3341) +++ trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/input.ftl 2011-02-16 18:26:23 UTC (rev 3342) @@ -3,7 +3,7 @@ <label for="${filterKey}">[@msgIfAvail filter.label /]</label> [/#if] - <input type="text" name="${filterKey}" value="" class="text" /> + <input type="text" name="${filterKey}" value="${this.request.getParameter(filterKey)!''}" class="text" /> <br /> [@rendersFilter filter.subfilters /] Modified: trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/path.ftl =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/path.ftl 2011-02-16 17:59:28 UTC (rev 3341) +++ trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/path.ftl 2011-02-16 18:26:23 UTC (rev 3342) @@ -3,7 +3,7 @@ <label for="${filterKey}">[@msgIfAvail filter.label /]</label> [/#if] - <input type="text" name="${filterKey}" id="${filterKey}" value="" class="input-path" /> + <input type="text" name="${filterKey}" id="${filterKey}" value="${this.request.getParameter(filterKey)!''}" class="input-path" /> <span class="mgnlControlButton" id="butt_${filterKey}" onclick="mgnlDialogLinkOpenBrowser('${filterKey}', 'media', '')">${this.msgs['buttons.select']}</span> [@rendersFilter filter.subfilters /] Modified: trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/radio.ftl =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/radio.ftl 2011-02-16 17:59:28 UTC (rev 3341) +++ trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/radio.ftl 2011-02-16 18:26:23 UTC (rev 3342) @@ -5,7 +5,7 @@ [#list filter.options as option] <div class="inner-row"> - <input type="radio" id="${filterKey}_${option.value}" name="${filterKey}" value="${option.value}" [#if option.defaultValue?? & option.defaultValue]checked="checked"[/#if] /> + <input type="radio" id="${filterKey}_${option.value}" name="${filterKey}" value="${option.value}" [#if (!this.request.getParameter(filterKey)?has_content & option.defaultValue?? & option.defaultValue) || (this.request.getParameter(filterKey)?has_content & this.request.getParameter(filterKey) == option.value)]checked="checked"[/#if] /> <label for="${filterKey}_${option.value}">[@msgIfAvail option.label /]</span> </div> [/#list] Modified: trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/select.ftl =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/select.ftl 2011-02-16 17:59:28 UTC (rev 3341) +++ trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/select.ftl 2011-02-16 18:26:23 UTC (rev 3342) @@ -5,7 +5,7 @@ <select name="${filterKey}" id="${filterKey}"> [#list filter.options as option] - <option value="${option.value}" [#if option.defaultValue?? & option.defaultValue]selected="selected"[/#if]>[@msgIfAvail option.label /]</option> + <option value="${option.value}" [#if (!this.request.getParameter(filterKey)?has_content & option.defaultValue?? & option.defaultValue) || (this.request.getParameter(filterKey)?has_content & this.request.getParameter(filterKey) == option.value)]selected="selected"[/#if]>[@msgIfAvail option.label /]</option> [/#list] </select> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |