Update of
/var/cvs/contributions/CMSContainer/cmsc/contentrepository/src/webapp/editors/resources
In directory
james.mmbase.org:/tmp/cvs-serv6025/cmsc/contentrepository/src/webapp/editors/resources
Modified Files:
imagesearch.jsp
Log Message:
CMSC-681 Asset Maintenance Listview is missing.
See also:
http://cvs.mmbase.org/viewcvs/contributions/CMSContainer/cmsc/contentrepository/src/webapp/editors/resources
See also: http://www.mmbase.org/jira/browse/CMSC-681
Index: imagesearch.jsp
===================================================================
RCS file:
/var/cvs/contributions/CMSContainer/cmsc/contentrepository/src/webapp/editors/resources/imagesearch.jsp,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -b -r1.40 -r1.41
--- imagesearch.jsp 24 Dec 2008 06:04:01 -0000 1.40
+++ imagesearch.jsp 25 Dec 2008 08:43:59 -0000 1.41
@@ -7,31 +7,18 @@
<cmscedit:head title="images.title">
<script src="../repository/search.js" type="text/javascript"></script>
<script type="text/javascript">
- function changeOftenMode(channelid, offset){
- if(offset==null){
- offset=0;
- }
- var imageMode = document.getElementsByTagName("option");
- for(i = 0; i < imageMode.length; i++){
- if(imageMode[i].selected & imageMode[i].id=="a_list"){
- document.location.href =
'../repository/HighFrequencyImg.do?action=often&offset='+offset+'&channelid='+channelid+'&show=list';
- }else if(imageMode[i].selected & imageMode[i].id=="a_thumbnail"){
- document.location.href =
'../repository/HighFrequencyImg.do?action=often&offset='+offset+'&channelid='+channelid+'&show=thumbnail';
- }
- }
- }
- function changeSearchMode(offset){
- if(offset==null){
- offset=0;
- }
- var imageMode = document.getElementsByTagName("option");
- for(i = 0; i < imageMode.length; i++){
- if(imageMode[i].selected & imageMode[i].id=="a_list"){
- document.location.href =
'../resources/ImageInitAction.do?action=search&offset='+offset+'&show=list';
- }else if(imageMode[i].selected & imageMode[i].id=="a_thumbnail"){
- document.location.href =
'../resources/ImageInitAction.do?action=search&offset='+offset+'&show=thumbnail';
+ function setShowMode() {
+ var showMode = document.getElementsByTagName("option");
+ var imageShow;
+ for(i = 0; i < showMode.length; i++){
+ if(showMode[i].selected & showMode[i].id=="a_list"){
+ imageShow="list";
+ }else if(showMode[i].selected & showMode[i].id=="a_thumbnail"){
+ imageShow="thumbnail";
}
}
+ document.forms[0].imageShow.value = imageShow;
+ document.forms[0].submit();
}
function showInfo(objectnumber) {
openPopupWindow('imageinfo', '900', '500',
@@ -39,6 +26,11 @@
}
function initParentHref(elem) {
+ if(elem.id=='selected'){
+ elem.parentNode.setAttribute('href', '');
+ elem.id ='';
+ return;
+ }
elem.parentNode.setAttribute('href', elem.getAttribute('href'));
var oldSelected = document.getElementById('selected');
if(oldSelected){
@@ -76,9 +68,9 @@
var imageMode = document.getElementsByTagName("option");
for(i = 0; i < imageMode.length; i++){
if(imageMode[i].selected & imageMode[i].id=="a_list"){
- document.location.href =
'../../repository/HighFrequencyImg.do?action=often&offset=0&channelid='+channelid+'&show=list';
+ document.location.href =
'../../repository/HighFrequencyImg.do?action=often&offset=0&channelid='+channelid+'&imageShow=list';
}else if(imageMode[i].selected &
imageMode[i].id=="a_thumbnail"){
- document.location.href =
'../../repository/HighFrequencyImg.do?action=often&offset=0&channelid='+channelid+'&show=thumbnail';
+ document.location.href =
'../../repository/HighFrequencyImg.do?action=often&offset=0&channelid='+channelid+'&imageShow=thumbnail';
}
}
}
@@ -88,6 +80,7 @@
<body>
<mm:cloud jspvar="cloud" loginpage="../../editors/login.jsp">
<mm:import externid="action">search</mm:import><%-- either often or search --%>
+<mm:import externid="imageShow">list</mm:import><%-- either list or thumbnail
--%>
<div class="editor" style="height:555px">
<c:choose>
<c:when test="${action eq 'search'}">
@@ -114,7 +107,7 @@
<div class="body" <c:if test="${action ==
'often'}">style="display:none"</c:if> >
<html:form action="${formAction}" method="post">
<html:hidden property="action" value="${action}"/>
- <html:hidden property="show" value="${show}"/>
+ <html:hidden property="imageShow" value="${imageShow}"/>
<html:hidden property="offset"/>
<c:if test="${action eq 'often'}">
<html:hidden property="channelid" value="${channelid}"/>
@@ -130,13 +123,12 @@
<div class="ruler_green">
<div><c:out value="${channelMsg}" /></div>
` </div>
- <select name="imageMode" id="imageMode"
- onchange="javascript:<c:if test="${action eq
'search'}">changeSearchMode(${offset})</c:if><c:if test="${action eq
'often'}">changeOftenMode('${channelid}', <mm:write value='${offset}'
write='true'>0</mm:write>)</c:if>">
- <c:if test="${show eq 'list'}">
+ <select name="imageMode" id="imageMode"
onchange="javascript:setShowMode()">
+ <c:if test="${imageShow eq 'list'}">
<option id="a_list"
selected="selected">list</option>
<option id="a_thumbnail">thumbnail</option>
</c:if>
- <c:if test="${show eq 'thumbnail'}">
+ <c:if test="${imageShow eq 'thumbnail'}">
<option id="a_list">list</option>
<option id="a_thumbnail"
selected="selected">thumbnail</option>
</c:if>
@@ -148,7 +140,7 @@
<c:if test="${resultCount > 0}">
<%...@include file="../repository/searchpages.jsp" %>
- <c:if test="${show eq 'thumbnail'}">
+ <c:if test="${imageShow eq 'thumbnail'}">
<div id="imgList" class="hover" style="width:100%" href="">
<mm:listnodes referid="results">
<mm:field name="description" escape="js-single-quotes"
jspvar="description">
@@ -158,14 +150,14 @@
<mm:import
id="url">javascript:selectElement('<mm:field name="number"/>', '<mm:field
name="title" escape="js-single-quotes"/>','<mm:image />','<mm:field
name="width"/>','<mm:field name="height"/>', '<%=description%>');</mm:import>
</mm:field>
<div class="grid" href="<mm:write referid="url"/>"
onclick="initParentHref(this)" title="double click to show the info">
- <div class="thumbnail" ondblclick="showInfo('<mm:field
name="number"/>')"><mm:image mode="img" template="s(100x100)"/></div>
+ <div class="thumbnail" ondblclick="showInfo('<mm:field
name="number"/>')"><mm:image mode="img" template="s(120x100)"/></div>
<div class="imgInfo"><mm:field
name="title"/><br/><mm:field name="itype"/></div>
</div>
</mm:listnodes>
</div>
</c:if>
- <c:if test="${show eq 'list'}">
+ <c:if test="${imageShow eq 'list'}">
<table>
<tr class="listheader">
<th width="55"></th>
@@ -203,7 +195,7 @@
<td
onMouseDown="objClick(this);"><mm:field name="itype" /></td>
<td
onMouseDown="objClick(this);"><a
href="javascript:showInfo(<mm:field name="number" />)"><img
-
src="<mm:image template="s(100x100)"/>" alt="" /></a></td>
+
src="<mm:image template="s(120x100)"/>" alt="" /></a></td>
</tr>
<c:set
var="useSwapStyle">${!useSwapStyle}</c:set>
</mm:listnodes>
@@ -224,7 +216,7 @@
<mm:url page="/editors/repository/select/SelectorChannel.do"
id="select_channel_url" write="false" />
<mm:url page="/editors/resources/ImageInitAction.do?action=search"
id="search_image_url" write="false" />
<mm:url page="/editors/resources/imageupload.jsp?channelid=${channelid}"
id="new_image_url" write="false" />
- <mm:url
page="/editors/repository/HighFrequencyImg.do?action=often&show=${show}&offset=0&channelid=all"
id="often_show_images" write="false"/>
+ <mm:url
page="/editors/repository/HighFrequencyImg.do?action=often&imageShow=${imageShow}&offset=0&channelid=all"
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>
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs