Update of 
/var/cvs/contributions/CMSContainer/cmsc/contentrepository/src/webapp/editors/repository
In directory james.mmbase.org:/tmp/cvs-serv12413/src/webapp/editors/repository

Modified Files:
        asset.jsp 
Log Message:
CMSC-681(Improve the thumbnail showing.)


See also: 
http://cvs.mmbase.org/viewcvs/contributions/CMSContainer/cmsc/contentrepository/src/webapp/editors/repository
See also: http://www.mmbase.org/jira/browse/CMSC-681


Index: asset.jsp
===================================================================
RCS file: 
/var/cvs/contributions/CMSContainer/cmsc/contentrepository/src/webapp/editors/repository/asset.jsp,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -b -r1.25 -r1.26
--- asset.jsp   25 Dec 2008 08:41:32 -0000      1.25
+++ asset.jsp   29 Dec 2008 03:15:30 -0000      1.26
@@ -11,14 +11,15 @@
          referid="parentchannel"/>&direction=up</mm:import>
 
          <cmscedit:head title="images.title">
+            <link rel="stylesheet" href="<cmsc:staticurl 
page='../css/thumbnail.css'/>" type="text/css">
    <script type="text/javascript">
       function showEditItems(id){
          document.getElementById('asset-info-'+id).style.display = 'block';
-         document.getElementById('asset-info-'+id).style.display = 2001;
+                  document.getElementById('asset-info-'+id).style.zIndex = 
2001;
       }
       function hideEditItems(id){
          document.getElementById('asset-info-'+id).style.display = 'none';
-         document.getElementById('asset-info-'+id).style.display = 2000;
+                  document.getElementById('asset-info-'+id).style.zIndex = 
2000;
       }
       function changeMode(offset){
          if(offset==null){
@@ -47,7 +48,7 @@
    <script src="../repository/asset.js" language="JavaScript" 
type="text/javascript"></script>
          </cmscedit:head>
 
-<div class="editor">
+         <div class="editor">
    <div class="body">
       <!-- check to see if we have workflow, this is done by looking if the 
editors for the workflow are on the HD -->
       <c:set var="hasWorkflow" value="false"/>
@@ -76,24 +77,24 @@
       <% } %>
    </div>
 
-<div class="ruler_green">
+            <div class="ruler_green">
    <div>
       <fmt:message key="asset.asset">
          <fmt:param><mm:field name="path"/></fmt:param>
       </fmt:message>
    </div>
-</div>
+            </div>
 
-<div class="body" >
+            <div class="body" >
    <div style="padding-left:11px">
       <select name="assesMode" id="assetMode" 
onchange="javascript:changeMode(${param.offset})">
          <c:if test="${show eq 'list'}">
-            <option id="a_list" selected="selected">list</option>
-            <option id = "a_thumbnail" >thumbnail</option>
+                        <option id="a_list" selected="selected"><fmt:message 
key="asset.image.list"/></option>
+                        <option id = "a_thumbnail" ><fmt:message 
key="asset.image.thumbnail"/></option>
          </c:if>
          <c:if test="${show eq 'thumbnail'}">
-            <option id="a_list">list</option>
-            <option id = "a_thumbnail" selected="selected" >thumbnail</option>
+                        <option id="a_list"><fmt:message 
key="asset.image.list"/></option>
+                        <option id = "a_thumbnail" selected="selected" 
><fmt:message key="asset.image.thumbnail"/></option>
          </c:if>
       </select>
       <div style="padding-left:100px;display:inline;font-size:12px;">
@@ -227,37 +228,44 @@
       </c:if>
          <div width="100%;float:left;">
             <mm:listnodes referid="elements">
-               <div style="width:160px; 
height:180px;float:left;text-align:center;" 
onMouseOut="javascript:hideEditItems(<mm:field name='number'/>)" 
onMouseOver="showEditItems(<mm:field name='number'/>)">
-               <div style="clear:both;float:left;width:77%;height:33px;">
+                     <div class="thumbnail_show" 
onMouseOut="javascript:hideEditItems(<mm:field name='number'/>)" 
onMouseOver="showEditItems(<mm:field name='number'/>)">
+                        <div class="thumbnail_operation">
                   <div class="asset-info" id="asset-info-<mm:field 
name='number'/>" style="display: none; position: relative; border: 1px solid 
#eaedff" >
                      <%@ include file="icons.jspf" %>
                   </div>
                </div>
-                  <div 
style="width:100%;height:100px;text-align:center;padding:0px 10px 5px 
5px;vertical-align:middle;display:block;float:left;" >
-                     <div style="width:80%;height:100px;text-align:center;">
-                        <a href="javascript:showInfo(<mm:field name="number" 
/>)">
+                        <div class="thumbnail_body" >
+                           <div class="thumbnail_img" 
onMouseOver="this.style.background = 'yellow';" 
onMouseOut="this.style.background = 'white';">
+                              <a href="javascript:showInfo('<mm:nodeinfo 
type="type"/>', '<mm:field name="number" />')">
                            <c:set var="typedef" ><mm:nodeinfo 
type="type"/></c:set>
                            <c:if test="${typedef eq 'images'}">
                               <img src="<mm:image template="s(120x100)"/>" 
alt=""/>
                            </c:if> 
                            <c:if test="${typedef eq 'attachments'}">
-                              <img src="../gfx/alert_green_left.gif" 
alt=""/>change
+                                    <c:set var="filename"><mm:field 
name="filename"/></c:set>
+                                    <c:set 
var="subfix">${fn:substringAfter(filename, '.')}</c:set>
+                                    <mm:haspage 
page="../gfx/${subfix}${'.gif'}" inverse="false">
+                                       <img src="../gfx/${subfix}${'.gif'}" 
alt=""/>
+                                    </mm:haspage> 
+                                    <mm:haspage 
page="../gfx/${subfix}${'.gif'}" inverse="true">
+                                       <img src="../gfx/otherAttach.gif" 
alt=""/>
+                                    </mm:haspage>
                            </c:if>
                            <c:if test="${typedef eq 'urls'}">
-                              need to add
+                                    <img src="../gfx/url.gif" alt=""/>
                            </c:if>
                         </a>
                      </div>
-                     <div style="width:80%;text-align:center;margin:0px 0px 
0px 0px;padding-top:0px;padding-right:0px;overflow-x:hidden;">
+                           <div class="thumnail_info">
                         <c:set var="typedef" ><mm:nodeinfo 
type="type"/></c:set>
                         <c:if test="${typedef eq 'images'}">
                            <mm:field name="title"/><br/><mm:field 
name="itype"/>
                         </c:if>
                         <c:if test="${typedef eq 'attachments'}">
-                           need to change
+                                 <mm:field name="title"/>
                         </c:if>
                         <c:if test="${typedef eq 'urls'}">
-                           need to add
+                                 <mm:field name="name"/>
                         </c:if>
                      </div>
                   </div>
@@ -267,9 +275,9 @@
          </div>
    </c:if>
    <%@ include file="../pages.jsp" %>
-</div>
-</mm:node>
-</div>
+         </div>
+      </mm:node>
+   </div>
 
       </html:html>
    </mm:cloud>
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to