Author: mfang
Date: 2009-06-02 09:12:24 +0200 (Tue, 02 Jun 2009)
New Revision: 35547
Modified:
CMSContainer/trunk/CMSContainer/cmsc/contentrepository/src/webapp/editors/resources/attachmentsearch.jsp
CMSContainer/trunk/CMSContainer/cmsc/contentrepository/src/webapp/editors/resources/imagesearch.jsp
CMSContainer/trunk/CMSContainer/cmsc/contentrepository/src/webapp/editors/resources/urlsearch.jsp
Log:
CMSC-1006 Create a 'pages' tag for using inside the Editors and use it by
default for paging
Modified:
CMSContainer/trunk/CMSContainer/cmsc/contentrepository/src/webapp/editors/resources/attachmentsearch.jsp
===================================================================
---
CMSContainer/trunk/CMSContainer/cmsc/contentrepository/src/webapp/editors/resources/attachmentsearch.jsp
2009-06-02 06:22:09 UTC (rev 35546)
+++
CMSContainer/trunk/CMSContainer/cmsc/contentrepository/src/webapp/editors/resources/attachmentsearch.jsp
2009-06-02 07:12:24 UTC (rev 35547)
@@ -1,5 +1,6 @@
<%...@page language="java" contentType="text/html;charset=utf-8"
%><%...@include file="globals.jsp"
+%><%@ taglib prefix="edit" tagdir="/WEB-INF/tags/edit"
%><%...@page
import="java.util.Iterator,com.finalist.cmsc.mmbase.PropertiesUtil"
%><mm:content type="text/html" encoding="UTF-8" expires="0">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
@@ -74,9 +75,9 @@
var attachmentMode = document.getElementsByTagName("option");
for(i = 0; i < attachmentMode.length; i++){
if(attachmentMode[i].selected &
attachmentMode[i].id=="a_list"){
- document.location.href =
'../../repository/HighFrequencyAsset.do?action=often&offset=0&channelid='+channelid+'&assetShow=list&assettypes=attachments&strict=${strict}';
+ document.location.href =
'../../repository/HighFrequencyAsset.do?action=often&offset=0&pager.offset=0&channelid='+channelid+'&assetShow=list&assettypes=attachments&strict=${strict}';
}else if(attachmentMode[i].selected &
attachmentMode[i].id=="a_thumbnail"){
- document.location.href =
'../../repository/HighFrequencyAsset.do?action=often&offset=0&channelid='+channelid+'&assetShow=thumbnail&assettypes=attachments&strict=${strict}';
+ document.location.href =
'../../repository/HighFrequencyAsset.do?action=often&offset=0&pager.offset=0&channelid='+channelid+'&assetShow=thumbnail&assettypes=attachments&strict=${strict}';
}
}
}
@@ -87,6 +88,7 @@
<mm:cloud jspvar="cloud" loginpage="../../editors/login.jsp">
<mm:import externid="action">search</mm:import><%-- either often or search --%>
<mm:import externid="assetShow">list</mm:import><%-- either list or thumbnail
--%>
+<c:set var="pagerDOToffset"><%=request.getParameter("pager.offset")%></c:set>
<c:if test="${action eq 'search'}">
<div class="tabs"><!-- actieve TAB -->
<div class="tab_active">
@@ -126,6 +128,7 @@
<html:hidden property="assetShow" value="${assetShow}"/>
<html:hidden property="strict" value="${strict}"/>
<html:hidden property="offset"/>
+ <html:hidden property="pager.offset" value="${pagerDOToffset}"/>
<c:if test="${action eq 'often'}">
<html:hidden property="assettypes" value="attachments"/>
<html:hidden property="channelid" value="${channelid}"/>
@@ -156,7 +159,7 @@
<mm:import externid="resultCount" jspvar="resultCount"
vartype="Integer">0</mm:import>
<mm:import externid="offset" jspvar="offset"
vartype="Integer">0</mm:import>
<c:if test="${resultCount > 0}">
- <%...@include file="../repository/searchpages.jsp" %>
+ <edit:pages search="true" totalElements="${resultCount}"
offset="${offset}"/>
<c:if test="${assetShow eq 'thumbnail'}">
<div id="assetList" class="hover" style="width:100%" href="">
@@ -276,7 +279,7 @@
</c:if>
<div style="clear:both" ></div>
<c:if test="${resultCount > 0}">
- <%...@include file="../repository/searchpages.jsp" %>
+ <edit:pages search="true" totalElements="${resultCount}"
offset="${offset}"/>
</c:if>
</div>
<c:if test="${action == 'often'}">
@@ -284,7 +287,7 @@
<mm:url page="/editors/repository/select/SelectorChannel.do"
id="select_channel_url" write="false" />
<mm:url
page="/editors/resources/AttachmentInitAction.do?action=search&strict=${strict}"
id="search_attachment_url" write="false" />
<mm:url
page="/editors/resources/attachmentupload.jsp?uploadedNodes=0&channelid=${channelid}&strict=${strict}"
id="new_attachment_url" write="false" />
- <mm:url
page="/editors/repository/HighFrequencyAsset.do?action=often&assetShow=${assetShow}&offset=0&channelid=all&assettypes=attachments&strict=${strict}"
id="often_show_attachments" write="false"/>
+ <mm:url
page="/editors/repository/HighFrequencyAsset.do?action=often&assetShow=${assetShow}&offset=0&pager.offset=0&channelid=all&assettypes=attachments&strict=${strict}"
id="often_show_attachments" write="false"/>
<ul class="shortcuts">
<li><a href="${often_show_attachments}"><fmt:message
key="attachmentselect.link.allchannel" /></a></li>
<li><a onclick="openPopupWindow('selectchannel', 340,
400);" target="selectchannel" href="${select_channel_url}"><fmt:message
key="attachmentselect.link.channel" /></a></li>
Modified:
CMSContainer/trunk/CMSContainer/cmsc/contentrepository/src/webapp/editors/resources/imagesearch.jsp
===================================================================
---
CMSContainer/trunk/CMSContainer/cmsc/contentrepository/src/webapp/editors/resources/imagesearch.jsp
2009-06-02 06:22:09 UTC (rev 35546)
+++
CMSContainer/trunk/CMSContainer/cmsc/contentrepository/src/webapp/editors/resources/imagesearch.jsp
2009-06-02 07:12:24 UTC (rev 35547)
@@ -1,5 +1,6 @@
<%...@page language="java" contentType="text/html;charset=utf-8"
%><%...@include file="globals.jsp"
+%><%@ taglib prefix="edit" tagdir="/WEB-INF/tags/edit"
%><%...@page
import="java.util.Iterator,com.finalist.cmsc.mmbase.PropertiesUtil"
%><mm:content type="text/html" encoding="UTF-8" expires="0">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
@@ -87,6 +88,7 @@
<mm:cloud jspvar="cloud" loginpage="../../editors/login.jsp">
<mm:import externid="action">search</mm:import><%-- either often or search --%>
<mm:import externid="assetShow">list</mm:import><%-- either list or thumbnail
--%>
+<c:set var="pagerDOToffset"><%=request.getParameter("pager.offset")%></c:set>
<c:if test="${action eq 'search'}">
<div class="tabs"><!-- actieve TAB -->
@@ -127,6 +129,7 @@
<html:hidden property="assetShow" value="${assetShow}"/>
<html:hidden property="strict" value="${strict}"/>
<html:hidden property="offset"/>
+ <html:hidden property="pager.offset" value="${pagerDOToffset}"/>
<c:if test="${action eq 'often'}">
<html:hidden property="assettypes" value="images"/>
<html:hidden property="channelid" value="${channelid}"/>
@@ -157,7 +160,7 @@
<mm:import externid="resultCount" jspvar="resultCount"
vartype="Integer">0</mm:import>
<mm:import externid="offset" jspvar="offset"
vartype="Integer">0</mm:import>
<c:if test="${resultCount > 0}">
- <%...@include file="../repository/searchpages.jsp" %>
+ <edit:pages search="true" totalElements="${resultCount}"
offset="${offset}"/>
<c:if test="${assetShow eq 'thumbnail'}">
<div id="assetList" class="hover" style="width:100%" href="">
@@ -253,7 +256,7 @@
</c:if>
<div style="clear:both" ></div>
<c:if test="${resultCount > 0}">
- <%...@include file="../repository/searchpages.jsp" %>
+ <edit:pages search="true" totalElements="${resultCount}"
offset="${offset}"/>
</c:if>
</div>
<c:if test="${action == 'often'}">
@@ -261,7 +264,7 @@
<mm:url page="/editors/repository/select/SelectorChannel.do"
id="select_channel_url" write="false" />
<mm:url
page="/editors/resources/ImageInitAction.do?action=search&strict=${strict}"
id="search_image_url" write="false" />
<mm:url
page="/editors/resources/imageupload.jsp?uploadedNodes=0&channelid=${channelid}&strict=${strict}"
id="new_image_url" write="false" />
- <mm:url
page="/editors/repository/HighFrequencyAsset.do?action=often&assetShow=${assetShow}&offset=0&channelid=all&assettypes=images&strict=${strict}"
id="often_show_images" write="false"/>
+ <mm:url
page="/editors/repository/HighFrequencyAsset.do?action=often&assetShow=${assetShow}&offset=0&pager.offset=0&channelid=all&assettypes=images&strict=${strict}"
id="often_show_images" write="false"/>
<ul class="shortcuts">
<li><a href="${often_show_images}"><fmt:message
key="imageselect.link.allchannel" /></a></li>
<li><a onclick="openPopupWindow('selectchannel', 340, 400);"
target="selectchannel" href="${select_channel_url}"><fmt:message
key="imageselect.link.channel" /></a></li>
Modified:
CMSContainer/trunk/CMSContainer/cmsc/contentrepository/src/webapp/editors/resources/urlsearch.jsp
===================================================================
---
CMSContainer/trunk/CMSContainer/cmsc/contentrepository/src/webapp/editors/resources/urlsearch.jsp
2009-06-02 06:22:09 UTC (rev 35546)
+++
CMSContainer/trunk/CMSContainer/cmsc/contentrepository/src/webapp/editors/resources/urlsearch.jsp
2009-06-02 07:12:24 UTC (rev 35547)
@@ -1,5 +1,6 @@
<%...@page language="java" contentType="text/html;charset=utf-8"
%><%...@include file="globals.jsp"
+%><%@ taglib prefix="edit" tagdir="/WEB-INF/tags/edit"
%><%...@page
import="java.util.Iterator,com.finalist.cmsc.mmbase.PropertiesUtil"
%><mm:content type="text/html" encoding="UTF-8" expires="0">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
@@ -73,9 +74,9 @@
var urlMode = document.getElementsByTagName("option");
for(i = 0; i < urlMode.length; i++){
if(urlMode[i].selected & urlMode[i].id=="a_list"){
- document.location.href =
'../../repository/HighFrequencyAsset.do?action=often&offset=0&channelid='+channelid+'&assetShow=list&assettypes=urls&strict=${strict}';
+ document.location.href =
'../../repository/HighFrequencyAsset.do?action=often&offset=0&pager.offset=0&channelid='+channelid+'&assetShow=list&assettypes=urls&strict=${strict}';
}else if(urlMode[i].selected & urlMode[i].id=="a_thumbnail"){
- document.location.href =
'../../repository/HighFrequencyAsset.do?action=often&offset=0&channelid='+channelid+'&assetShow=thumbnail&assettypes=urls&strict=${strict}';
+ document.location.href =
'../../repository/HighFrequencyAsset.do?action=often&offset=0&pager.offset=0&channelid='+channelid+'&assetShow=thumbnail&assettypes=urls&strict=${strict}';
}
}
}
@@ -86,6 +87,7 @@
<mm:cloud jspvar="cloud" loginpage="../../editors/login.jsp">
<mm:import externid="action">search</mm:import><%-- either often or search --%>
<mm:import externid="assetShow">list</mm:import><%-- either list or thumbnail
--%>
+<c:set var="pagerDOToffset"><%=request.getParameter("pager.offset")%></c:set>
<c:if test="${action eq 'search'}">
<div class="tabs"><!-- actieve TAB -->
@@ -126,6 +128,7 @@
<html:hidden property="assetShow" value="${assetShow}"/>
<html:hidden property="strict" value="${strict}"/>
<html:hidden property="offset"/>
+ <html:hidden property="pager.offset" value="${pagerDOToffset}"/>
<c:if test="${action eq 'often'}">
<html:hidden property="assettypes" value="urls"/>
<html:hidden property="channelid" value="${channelid}"/>
@@ -157,7 +160,7 @@
<mm:import externid="resultCount" jspvar="resultCount"
vartype="Integer">0</mm:import>
<mm:import externid="offset" jspvar="offset"
vartype="Integer">0</mm:import>
<c:if test="${resultCount > 0}">
- <%...@include file="../repository/searchpages.jsp" %>
+ <edit:pages search="true" totalElements="${resultCount}"
offset="${offset}"/>
<c:if test="${assetShow eq 'thumbnail'}">
<div id="assetList" class="hover" style="width:100%" href="">
@@ -263,7 +266,7 @@
<fmt:message key="urlsearch.noresult" />
</c:if>
<c:if test="${resultCount > 0}">
-<%...@include file="../repository/searchpages.jsp" %>
+<edit:pages search="true" totalElements="${resultCount}" offset="${offset}"/>
</c:if>
</div>
<c:if test="${action == 'often'}">
@@ -271,7 +274,7 @@
<mm:url page="/editors/repository/select/SelectorChannel.do"
id="select_channel_url" write="false" />
<mm:url
page="/editors/resources/UrlInitAction.do?action=search&strict=${strict}"
id="search_url_url" write="false" />
<mm:url
page="/editors/resources/urlcreate.jsp?createdNode=0&channelid=${channelid}&strict=${strict}"
id="new_url_url" write="false" />
-<mm:url
page="/editors/repository/HighFrequencyAsset.do?action=often&assetShow=${assetShow}&offset=0&channelid=all&assettypes=urls&strict=${strict}"
id="often_show_urls" write="false"/>
+<mm:url
page="/editors/repository/HighFrequencyAsset.do?action=often&assetShow=${assetShow}&offset=0&pager.offset=o&channelid=all&assettypes=urls&strict=${strict}"
id="often_show_urls" write="false"/>
<ul class="shortcuts">
<li><a href="${often_show_urls}"><fmt:message
key="urlselect.link.allchannel" /></a></li>
<li><a onclick="openPopupWindow('selectchannel', 340, 400);"
target="selectchannel" href="${select_channel_url}"><fmt:message
key="urlselect.link.channel" /></a></li>
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs