This is an automated email from the git hooks/post-receive script. New commit to branch refonteUI-2017 in repository bow. See https://gitlab.nuiton.org/chorem/bow.git commit 355c96782683e15abc6dc73ff65ea5905e78ee5c Author: kaufmann <kaufmann@codelutin.com> Date: Wed Feb 5 11:25:09 2020 +0100 Fusion des champs de recherche en un seul. Fonctionnement temporaire à améliorer --- bow-ui/pom.xml | 1 + bow-ui/src/main/webapp/WEB-INF/decorators/main.jsp | 2 ++ bow-ui/src/main/webapp/js/search.js | 39 ++++++++++++++++++++++ 3 files changed, 42 insertions(+) diff --git a/bow-ui/pom.xml b/bow-ui/pom.xml index 0959e3b..e556557 100644 --- a/bow-ui/pom.xml +++ b/bow-ui/pom.xml @@ -402,6 +402,7 @@ <jsSourceDir>js</jsSourceDir> <jsSourceFiles> <jsSourceFile>bookmark.js</jsSourceFile> + <jsSourceFile>search.js</jsSourceFile> </jsSourceFiles> <jsFinalFile>bow.js</jsFinalFile> <jsEngine>CLOSURE</jsEngine> diff --git a/bow-ui/src/main/webapp/WEB-INF/decorators/main.jsp b/bow-ui/src/main/webapp/WEB-INF/decorators/main.jsp index 1e85270..89bf2f1 100644 --- a/bow-ui/src/main/webapp/WEB-INF/decorators/main.jsp +++ b/bow-ui/src/main/webapp/WEB-INF/decorators/main.jsp @@ -56,6 +56,8 @@ <s:url var="bookmarkJS" value="/js/bookmark.js" /> <script type="text/javascript" src="${bookmarkJS}"></script> + <s:url var="searchJS" value="/js/search.js" /> + <script type="text/javascript" src="${searchJS}"></script> </head> <body> <%@include file="/WEB-INF/jsp/inc/sidebar.jsp" %> diff --git a/bow-ui/src/main/webapp/js/search.js b/bow-ui/src/main/webapp/js/search.js new file mode 100644 index 0000000..36757ec --- /dev/null +++ b/bow-ui/src/main/webapp/js/search.js @@ -0,0 +1,39 @@ +/* + * #%L + * BOW UI + * %% + * Copyright (C) 2010 - 2011 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero 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 Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * #L% + */ + +/* FIXME LK : Solution temporaire pour tester la nouvelle UI */ +function searchBookmarks (search) { + var searchValue = document.getElementById("searchForm_searchInput").value, + searchType = document.getElementById("searchType").value; + + document.getElementById("searchForm_q").value = ""; + document.getElementById("searchForm_tagLine").value = ""; + document.getElementById("searchForm_fullTextLine").value = ""; + document.getElementById("searchForm\_" + searchType).value = searchValue; + + if ("q" == searchType) { + document.getElementById("searchForm").action = "openSearchResult.action"; + } else { + document.getElementById("searchForm").action = "home.action"; + } + + document.getElementById("searchForm").submit(); +} -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.