roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ghu...@apache.org
Subject svn commit: r1602839 - in /roller/trunk/app/src/main: java/org/apache/roller/weblogger/pojos/ java/org/apache/roller/weblogger/ui/struts2/editor/ resources/ webapp/WEB-INF/jsps/editor/
Date Mon, 16 Jun 2014 10:42:46 GMT
Author: ghuber
Date: Mon Jun 16 10:42:46 2014
New Revision: 1602839

URL: http://svn.apache.org/r1602839
Log:
Fix for media file sort. See ROL-2006.

Modified:
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/MediaFileComparator.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/MediaFileView.java
    roller/trunk/app/src/main/resources/ApplicationResources.properties
    roller/trunk/app/src/main/webapp/WEB-INF/jsps/editor/MediaFileView.jsp

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/MediaFileComparator.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/MediaFileComparator.java?rev=1602839&r1=1602838&r2=1602839&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/MediaFileComparator.java
(original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/MediaFileComparator.java
Mon Jun 16 10:42:46 2014
@@ -50,7 +50,7 @@ public class MediaFileComparator impleme
 		switch (this.type) {
 		    case NAME: return file1.getName().compareTo(file2.getName());
 		    case TYPE: return file1.getContentType().compareTo(file2.getContentType());
-		    // Do descending comparison by default for date field
+		    // Do last uploaded first comparison by default for date field
 		    case DATE_UPLOADED: return file2.getDateUploaded().compareTo(file1.getDateUploaded());
 
 		    default: return 0;
 		}

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/MediaFileView.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/MediaFileView.java?rev=1602839&r1=1602838&r2=1602839&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/MediaFileView.java
(original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/MediaFileView.java
Mon Jun 16 10:42:46 2014
@@ -31,10 +31,8 @@ import org.apache.roller.weblogger.busin
 import org.apache.roller.weblogger.business.WebloggerFactory;
 import org.apache.roller.weblogger.pojos.MediaFile;
 import org.apache.roller.weblogger.pojos.MediaFileComparator;
-import org.apache.roller.weblogger.pojos.MediaFileDirectory;
-import org.apache.roller.weblogger.pojos.MediaFileDirectoryComparator;
 import org.apache.roller.weblogger.pojos.MediaFileComparator.MediaFileComparatorType;
-import org.apache.roller.weblogger.pojos.MediaFileDirectoryComparator.DirectoryComparatorType;
+import org.apache.roller.weblogger.pojos.MediaFileDirectory;
 import org.apache.roller.weblogger.pojos.MediaFileFilter;
 import org.apache.roller.weblogger.ui.struts2.pagers.MediaFilePager;
 import org.apache.roller.weblogger.ui.struts2.util.KeyValueObject;
@@ -86,7 +84,13 @@ public class MediaFileView extends Media
         this.actionName = "mediaFileView";
         this.desiredMenu = "editor";
         this.pageTitle = "mediaFileView.title";
+    }
 
+    /**
+     * Prepares view action
+     */
+    public void myPrepare() {
+        
         if (SIZE_FILTER_TYPES == null) {
 
             SIZE_FILTER_TYPES = Arrays.asList(
@@ -109,16 +113,11 @@ public class MediaFileView extends Media
                 new KeyValueObject("mediaFileView.mb",    getText("mediaFileView.mb")));
 
             SORT_OPTIONS = Arrays.asList(
-                new KeyValueObject("mediaFileView.name", getText("mediaFileView.name")),
-                new KeyValueObject("mediaFileView.date", getText("mediaFileView.date")),
-                new KeyValueObject("mediaFileView.type", getText("mediaFileView.type")));
+                new KeyValueObject("name", getText("mediaFileView.name")),
+                new KeyValueObject("date_uploaded", getText("mediaFileView.date")),
+                new KeyValueObject("type", getText("mediaFileView.type")));
         }
-    }
-
-    /**
-     * Prepares view action
-     */
-    public void myPrepare() {
+        
         refreshAllDirectories();
     }
 

Modified: roller/trunk/app/src/main/resources/ApplicationResources.properties
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/resources/ApplicationResources.properties?rev=1602839&r1=1602838&r2=1602839&view=diff
==============================================================================
--- roller/trunk/app/src/main/resources/ApplicationResources.properties (original)
+++ roller/trunk/app/src/main/resources/ApplicationResources.properties Mon Jun 16 10:42:46
2014
@@ -1118,7 +1118,7 @@ mediaFileView.others=Others
 mediaFileView.kb=KB
 mediaFileView.mb=MB
 mediaFileView.bytes=Bytes
-mediaFileView.name=Folder
+mediaFileView.name=Name
 mediaFileView.date=Date
 mediaFileView.type=Type
 mediaFileView.size=Size
@@ -1142,7 +1142,7 @@ mediaFileView.filesTagged=Files with tag
 
 mediaFileView.noFiles=No files in this folder.
 
-mediaFileView.folderName=Folder:
+mediaFileView.folderName=Folder
 mediaFileView.reset=Reset
 
 

Modified: roller/trunk/app/src/main/webapp/WEB-INF/jsps/editor/MediaFileView.jsp
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/WEB-INF/jsps/editor/MediaFileView.jsp?rev=1602839&r1=1602838&r2=1602839&view=diff
==============================================================================
--- roller/trunk/app/src/main/webapp/WEB-INF/jsps/editor/MediaFileView.jsp (original)
+++ roller/trunk/app/src/main/webapp/WEB-INF/jsps/editor/MediaFileView.jsp Mon Jun 16 10:42:46
2014
@@ -291,7 +291,7 @@
 <s:else>
 
     <p class="subtitle">
-        <s:text name="mediaFileView.name"/>: <s:text name="currentDirectory.name"
/>
+        <s:text name="mediaFileView.folderName"/>: <s:text name="currentDirectory.name"
/>
     </p>
     <p class="pagetip">
         <s:text name="mediaFileView.dirPageTip" />



Mime
View raw message