Update of
/var/cvs/contributions/CMSContainer/cmsc/contentrepository/src/webapp/editors/repository
In directory james.mmbase.org:/tmp/cvs-serv29148/webapp/editors/repository
Modified Files:
content.js content.jsp search.js search.jsp
Log Message:
CMSC-280,Contentchannel screen does not give as much sort options as in
searching in the library
See also:
http://cvs.mmbase.org/viewcvs/contributions/CMSContainer/cmsc/contentrepository/src/webapp/editors/repository
See also: http://www.mmbase.org/jira/browse/CMSC-280
Index: content.js
===================================================================
RCS file:
/var/cvs/contributions/CMSContainer/cmsc/contentrepository/src/webapp/editors/repository/content.js,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- content.js 30 Jan 2008 10:40:28 -0000 1.5
+++ content.js 4 Jun 2008 05:18:09 -0000 1.6
@@ -39,6 +39,16 @@
document.location = url;
}
+function sortByType(channel){
+ var url = 'Content.do?orderby=otype&parentchannel=' + channel;
+ document.location = url;
+ }
+
+function sortByTitle(channel){
+ var url = 'Content.do?orderby=title&parentchannel=' + channel;
+ document.location = url;
+ }
+
var moveContentNumber;
var moveParentChannel;
function moveContent(objectNumber, parentChannel) {
Index: content.jsp
===================================================================
RCS file:
/var/cvs/contributions/CMSContainer/cmsc/contentrepository/src/webapp/editors/repository/content.jsp,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- content.jsp 10 Apr 2008 16:38:30 -0000 1.23
+++ content.jsp 4 Jun 2008 05:18:09 -0000 1.24
@@ -18,7 +18,6 @@
</c:if>
addLoadEvent(alphaImages);
</script>
-
<mm:cloud jspvar="cloud" rank="basic user" loginpage="../login.jsp">
<mm:import externid="parentchannel" jspvar="parentchannel" vartype="Integer"
from="parameters" required="true"/>
<mm:import jspvar="returnurl"
id="returnurl">/editors/repository/Content.do?parentchannel=<mm:write
@@ -124,8 +123,10 @@
<thead>
<tr>
<th></th>
- <th><fmt:message key="content.typecolumn"/></th>
- <th><fmt:message key="content.titlecolumn"/></th>
+ <th><a href="javascript:sortByType('<mm:write referid="parentchannel"
/>')" class="headerlink">
+ <fmt:message key="content.typecolumn"/></a></th>
+ <th><a href="javascript:sortByTitle('<mm:write referid="parentchannel"
/>')" class="headerlink">
+ <fmt:message key="content.titlecolumn"/></a></th>
<th><fmt:message key="content.authorcolumn"/></th>
<th><fmt:message key="content.lastmodifiedcolumn"/></th>
<th><fmt:message key="content.numbercolumn"/></th>
Index: search.js
===================================================================
RCS file:
/var/cvs/contributions/CMSContainer/cmsc/contentrepository/src/webapp/editors/repository/search.js,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- search.js 12 Dec 2006 09:38:26 -0000 1.4
+++ search.js 4 Jun 2008 05:18:09 -0000 1.5
@@ -4,7 +4,9 @@
}
function orderBy(orderColumn) {
+
var oldOrderColumn = document.forms[0].order.value;
+
if (oldOrderColumn == orderColumn) {
// order column is not changed so change direction
var oldDirection = document.forms[0].direction.value;
@@ -19,6 +21,7 @@
document.forms[0].order.value = orderColumn;
document.forms[0].direction.value = '1';
}
+
document.forms[0].submit();
}
Index: search.jsp
===================================================================
RCS file:
/var/cvs/contributions/CMSContainer/cmsc/contentrepository/src/webapp/editors/repository/search.jsp,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- search.jsp 8 Apr 2008 15:33:52 -0000 1.19
+++ search.jsp 4 Jun 2008 05:18:09 -0000 1.20
@@ -339,8 +339,8 @@
<input type="checkbox"
onclick="selectAll(this.checked, 'linkForm', 'link_');" value="on"
name="selectall" />
</mm:compare>
</th>
- <th><a href="#" class="headerlink"
onclick="orderBy('otype');"><fmt:message key="locate.typecolumn" /></a></th>
- <th><a href="#" class="headerlink"
onclick="orderBy('title');" ><fmt:message key="locate.titlecolumn" /></a></th>
+ <th><a href="javascript:orderBy('otype')" class="headerlink"
><fmt:message key="locate.typecolumn" /></a></th>
+ <th><a href="javascript:orderBy('title')" class="headerlink"
><fmt:message key="locate.titlecolumn" /></a></th>
<th><fmt:message key="locate.creationchannelcolumn" /></th>
<th><fmt:message key="locate.authorcolumn" /></th>
<th><fmt:message key="locate.lastmodifiedcolumn" /></th>
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs