From: <die...@us...> - 2011-01-13 15:18:36
|
Revision: 3238 http://openutils.svn.sourceforge.net/openutils/?rev=3238&view=rev Author: diego_schivo Date: 2011-01-13 15:18:29 +0000 (Thu, 13 Jan 2011) Log Message: ----------- PIRMEDIA-202 path search Modified Paths: -------------- trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media-nooverwrite/config.modules.media.config.search.xml trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/advancedSearch.css trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/lang/messages.properties trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/lang/messages_it.properties trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaAdvancedSearchFormPage.html Added Paths: ----------- trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/advancedsearch/SearchFilterPath.java trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/path.ftl Removed Paths: ------------- trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/advancedsearch/SearchFilterBasePath.java Deleted: trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/advancedsearch/SearchFilterBasePath.java =================================================================== --- trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/advancedsearch/SearchFilterBasePath.java 2011-01-13 11:58:42 UTC (rev 3237) +++ trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/advancedsearch/SearchFilterBasePath.java 2011-01-13 15:18:29 UTC (rev 3238) @@ -1,54 +0,0 @@ -/** - * - * Magnolia SimpleMedia Module (http://www.openmindlab.com/lab/products/media.html) - * Copyright (C)2008 - 2010, Openmind S.r.l. http://www.openmindonline.it - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -package net.sourceforge.openutils.mgnlmedia.media.advancedsearch; - -import javax.servlet.http.HttpServletRequest; - -import org.apache.commons.lang.StringUtils; - - -/** - * @author ADMIN - * @version $Id: $ - */ -public class SearchFilterBasePath extends SearchFilterAbstract -{ - - /** - * {@inheritDoc} - */ - @Override - public String getBasePath(String parameter, HttpServletRequest request) - { - String[] values = (String[]) request.getParameterMap().get(parameter); - - String basePath = super.getBasePath(parameter, request); - - if (values != null && values.length > 0) - { - String value = values[0]; - if (StringUtils.isNotBlank(value)) - { - basePath = value; - } - } - return basePath; - } -} Added: trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/advancedsearch/SearchFilterPath.java =================================================================== --- trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/advancedsearch/SearchFilterPath.java (rev 0) +++ trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/advancedsearch/SearchFilterPath.java 2011-01-13 15:18:29 UTC (rev 3238) @@ -0,0 +1,54 @@ +/** + * + * Magnolia SimpleMedia Module (http://www.openmindlab.com/lab/products/media.html) + * Copyright (C)2008 - 2010, Openmind S.r.l. http://www.openmindonline.it + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +package net.sourceforge.openutils.mgnlmedia.media.advancedsearch; + +import javax.servlet.http.HttpServletRequest; + +import org.apache.commons.lang.StringUtils; + + +/** + * @author ADMIN + * @version $Id: $ + */ +public class SearchFilterPath extends SearchFilterAbstract +{ + + /** + * {@inheritDoc} + */ + @Override + public String getBasePath(String parameter, HttpServletRequest request) + { + String[] values = (String[]) request.getParameterMap().get(parameter); + + String basePath = super.getBasePath(parameter, request); + + if (values != null && values.length > 0) + { + String value = values[0]; + if (StringUtils.isNotBlank(value)) + { + basePath = value; + } + } + return basePath; + } +} Modified: trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media-nooverwrite/config.modules.media.config.search.xml =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media-nooverwrite/config.modules.media.config.search.xml 2011-01-13 11:58:42 UTC (rev 3237) +++ trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media-nooverwrite/config.modules.media.config.search.xml 2011-01-13 15:18:29 UTC (rev 3238) @@ -767,7 +767,7 @@ </sv:property> </sv:node> </sv:node> - <sv:node sv:name="basePath"> + <sv:node sv:name="path"> <sv:property sv:name="jcr:primaryType" sv:type="Name"> <sv:value>mgnl:contentNode</sv:value> </sv:property> @@ -778,7 +778,7 @@ <sv:value>83d5b5a1-a66f-4c25-a9ed-c83c0d3ad61c</sv:value> </sv:property> <sv:property sv:name="class" sv:type="String"> - <sv:value>net.sourceforge.openutils.mgnlmedia.media.advancedsearch.SearchFilterBasePath</sv:value> + <sv:value>net.sourceforge.openutils.mgnlmedia.media.advancedsearch.SearchFilterPath</sv:value> </sv:property> <sv:property sv:name="control" sv:type="String"> <sv:value>input</sv:value> Modified: trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/advancedSearch.css =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/advancedSearch.css 2011-01-13 11:58:42 UTC (rev 3237) +++ trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/advancedSearch.css 2011-01-13 15:18:29 UTC (rev 3238) @@ -4,7 +4,7 @@ line-height: 14px; } -input.text,input.input-date,select { +input.text,input.input-date,input.input-path,select { padding: 2px; border: solid 1px #999; width: 97%; @@ -45,6 +45,10 @@ width: 70%; } +.row .input-path { + width: 60%; +} + .row .inner-row input { float: left; display: inline; Modified: trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/lang/messages.properties =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/lang/messages.properties 2011-01-13 11:58:42 UTC (rev 3237) +++ trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/lang/messages.properties 2011-01-13 15:18:29 UTC (rev 3238) @@ -82,6 +82,7 @@ buttons.cancel=Cancel buttons.date=Date buttons.search=Search +buttons.select=Select dialog.filenopreview.extensions=Valid file extensions: dialog.filenopreview.error.extension=File extension for field {0} not valid Modified: trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/lang/messages_it.properties =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/lang/messages_it.properties 2011-01-13 11:58:42 UTC (rev 3237) +++ trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/lang/messages_it.properties 2011-01-13 15:18:29 UTC (rev 3238) @@ -83,6 +83,7 @@ buttons.cancel=Annulla buttons.date=Data buttons.search=Cerca +buttons.select=Seleziona dialog.filenopreview.extensions=Estensioni valide: dialog.filenopreview.error.extension=Estensione del file per il campo {0} non valida Modified: trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaAdvancedSearchFormPage.html =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaAdvancedSearchFormPage.html 2011-01-13 11:58:42 UTC (rev 3237) +++ trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaAdvancedSearchFormPage.html 2011-01-13 15:18:29 UTC (rev 3238) @@ -4,6 +4,8 @@ <link href="${this.request.contextPath}/.resources/admin-css/admin-all.css" type="text/css" rel="stylesheet" /> <link title="Aqua" href="${this.request.contextPath}/.resources/calendar/skins/aqua/theme.css" media="all" type="text/css" rel="stylesheet" /> <link rel="stylesheet" type="text/css" href="${this.request.contextPath}/.resources/media/css/advancedSearch.css" /> + <script type="text/javascript" src="${this.request.contextPath}/.magnolia/pages/javascript.js"></script> + <script type="text/javascript" src="${this.request.contextPath}/.resources/admin-js/dialogs/dialogs.js"></script> <script type="text/javascript" src="${this.request.contextPath}/.resources/calendar/calendar.js"></script> <script src="${this.request.contextPath}/.resources/calendar/lang/calendar-en.js" type="text/javascript"></script> <script src="${this.request.contextPath}/.resources/calendar/calendar-setup.js" type="text/javascript"></script> Added: trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/path.ftl =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/path.ftl (rev 0) +++ trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/path.ftl 2011-01-13 15:18:29 UTC (rev 3238) @@ -0,0 +1,10 @@ +<div class="row"> + [#if filter.label??] + <label for="${filterKey}">[@msgIfAvail filter.label /]</label> + [/#if] + + <input type="text" name="${filterKey}" id="${filterKey}" value="" class="input-path" /> + <span class="mgnlControlButton" id="butt_${filterKey}" onclick="mgnlDialogLinkOpenBrowser('${filterKey}', 'media', '')">${this.msgs['buttons.select']}</span> + + [@rendersFilter filter.subfilters /] +</div> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |