dpillot 2005/10/03 17:43:23 CEST
Modified files:
core/src/webapp/jsp/jahia/engines/importexport contentpick.jsp
Log:
bug fix
Revision Changes Path
1.16 +73 -50
jahia/core/src/webapp/jsp/jahia/engines/importexport/contentpick.jsp
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/core/src/webapp/jsp/jahia/engines/importexport/contentpick.jsp.diff?r1=1.15&r2=1.16&f=h
Index: contentpick.jsp
===================================================================
RCS file:
/home/cvs/repository/jahia/core/src/webapp/jsp/jahia/engines/importexport/contentpick.jsp,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- contentpick.jsp 30 Sep 2005 17:46:31 -0000 1.15
+++ contentpick.jsp 3 Oct 2005 15:43:22 -0000 1.16
@@ -12,23 +12,56 @@
<%@ taglib uri="JahiaLib" prefix="jahia" %>
<%
/**
- * @version $Id: contentpick.jsp,v 1.15 2005/09/30 17:46:31 dpillot Exp $
+ * @version $Id: contentpick.jsp,v 1.16 2005/10/03 15:43:22 dpillot Exp $
*/
HashMap engineMap = (HashMap)
request.getAttribute("org.jahia.engines.EngineHashMap");
JahiaSearchResult sr = (JahiaSearchResult)
engineMap.get("searchResults");
String theScreen = (String) engineMap.get("screen");
- //used to order the results
+ //parameter to order the results (def:score)
String orderBy = (String) engineMap.get("orderby");
-
+ // # of sites
+ int sitecount=Integer.parseInt((String)engineMap.get("sitecount"));
%>
+<!-- css specific for contentpicker -->
+<style type="text/css">
+
+ .switchcontent {
+ display: none;
+ margin: 3px;
+ width: 100%;
+ font-size: 12px;
+ font-family: Arial, sans-serif;
+ text-align: justify;
+ margin-bottom: 4px;
+ padding: 2px 2px;
+ background-color: #eee;
-<div class="menuwrapper">
-<div class="content">
-<div id="editor">
+ }
+
+ .switchcontent1 {
+ display: block;
+ margin: 3px;
+ width: 100%;
+ font-size: 12px;
+ font-family: Arial, sans-serif;
+ text-align: justify;
+ margin-bottom: 4px;
+ padding: 2px 2px;
+ background-color: #eee;
+
+ }
+</style>
+
+
+<div class="menuwrapper"><!-- menuwrapper-->
+<div class="content"><!-- content -->
+<div id="editor"><!--editor-->
sort by <%=orderBy%><br/>
-<script language="javascript">
+screen <%=theScreen%><br/>
+<jahia:serverHttpPath/><br/>
+<script type="text/javascript">
function orderby(param) {
document.mainForm.orderby.value = param;
@@ -70,38 +103,17 @@
// search function to preprocess and check validity of queries
function goSearch() {
-
+ //alert("searching....");
handleActionChange("contentPick");
}
-
-</script>
-<style type="text/css">
- .switchcontent {
- display: none;
- margin: 3px;
- width: 100%;
- font-size: 12px;
- font-family: Arial, sans-serif;
- text-align: justify;
- margin-bottom: 4px;
- padding: 2px 2px;
- background-color: #eee;
-
+ //
+ function viewDoc(path){
+ //alert(path);
+ opener.location=path;
}
- .switchcontent1 {
- display: block;
- margin: 3px;
- width: 100%;
- font-size: 12px;
- font-family: Arial, sans-serif;
- text-align: justify;
- margin-bottom: 4px;
- padding: 2px 2px;
- background-color: #eee;
+</script>
- }
-</style>
<input type="hidden" name="orderby" value="score"/>
<table border=0><tr><td>
@@ -109,11 +121,17 @@
<a href="javascript:expandcontent('sc2')"><img
src="/jahia/jsp/jahia/engines/images/adding.png" width="16"
height="16"
border="0"></a>
-
- <select name="searchSite">
+ <!-- query -->
+ <INPUT name="query" size=50
value="<%=engineMap.get("searchString")%>"/>
<%
int count = 0;
Enumeration enum = (Enumeration) engineMap.get("sites");
+ if(sitecount>1){
+ // looping on all sites
+ %>
+ <select name="searchSite">
+ <%
+
while (enum.hasMoreElements()) {
JahiaSite jahiaSite = (JahiaSite) enum.nextElement();
count++;
@@ -122,14 +140,17 @@
<%
}
- // all is available if needed
- if(count>1) {
+ //end looping
%>
<option value="all">all</option>
+ </select>
+ <%
+ } else {
+ JahiaSite jahiaSite = (JahiaSite) enum.nextElement();
+ %>
+ on site <b><%=jahiaSite.getSiteKey() %></b>
+ <input type="hidden" name="searchSite"
value="<%=jahiaSite.getID() %>"/>
<% } %>
- </select> <INPUT size=50
value="<%=engineMap.get("searchString")%>"
-
name="search"
-
onKeyPress="return submitenter(this,event)"/>
</div>
@@ -205,7 +226,7 @@
JahiaSearchHit thisHit =
(JahiaSearchHit) sr.results().get(i);
%>
<tr>
- <td class="text"><a
href="<%=thisHit.getURL()%>"><b><%=thisHit.getTeaser()%></b></a>
+ <td class="text"><a
href="javascript:viewDoc('<jahia:serverHttpPath/><%=thisHit.getURL()%>')"><b><%=thisHit.getTeaser()%></b></a>
</td>
<td
class="text"><%=thisHit.getParsedObject().getValue("creator")%></td>
<td
class="text"><%=thisHit.getParsedObject().getValue("lastcontributor")%></td>
@@ -261,17 +282,19 @@
%>
</TBODY>
</TABLE>
-</div>
-</div>
-<!--tools menu-->
-<div class="menu">
- <%@ include file="../tools.inc" %>
-</div>
+</div><!-- end editor part -->
+</div><!-- end content part -->
-<div class="clearing"> </div>
+<%@ include file="../tools.inc" %>
+
+
+<div class="clearing"> <!--clearing--></div>
</div>
<% /**
* $Log: contentpick.jsp,v $
+ * Revision 1.16 2005/10/03 15:43:22 dpillot
+ * bug fix
+ *
* Revision 1.15 2005/09/30 17:46:31 dpillot
* bug fix
*