roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject svn commit: r829302 [5/5] - in /roller/trunk/apps/weblogger: docs/installguide/ docs/installguide/generated/ docs/installguide/generated/html/ docs/templateguide/ docs/templateguide/generated/ docs/templateguide/generated/html/ docs/userguide/ docs/use...
Date Sat, 24 Oct 2009 03:13:17 GMT
Modified: roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/config/roller.properties
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/config/roller.properties?rev=829302&r1=829301&r2=829302&view=diff
==============================================================================
--- roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/config/roller.properties
(original)
+++ roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/config/roller.properties
Sat Oct 24 03:12:56 2009
@@ -708,6 +708,10 @@
 # Experimental, deprecated and "undocumented" settings
 #-----------------------------------------------------------------------------
 
+# Enable an Export page that allows users to export entries and media files
+# for a format that is compatible with Movable Type and Wordpress.
+weblog.export.enabled=false
+
 # Atom Publishing Protocol (APP) - this is an incomplete and untested 
 # implementation of an unfinished IETF specification. 
 # Intended only for interoperability testing. DO NOT ENABLE IN PRODUCTION!
@@ -721,6 +725,3 @@
 # Intended only for interoperability testing. DO NOT ENABLE IN PRODUCTION!
 webservices.adminprotocol.enabled=false
 
-# If you are using the Hibernate backend (deprecated as of Roller 4.0), 
-# you MUST override this to use a database other than MySQL4
-hibernate.dialect=org.hibernate.dialect.MySQLDialect

Modified: roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/struts2/editor/MediaFileAdd.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/struts2/editor/MediaFileAdd.java?rev=829302&r1=829301&r2=829302&view=diff
==============================================================================
--- roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/struts2/editor/MediaFileAdd.java
(original)
+++ roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/struts2/editor/MediaFileAdd.java
Sat Oct 24 03:12:56 2009
@@ -120,7 +120,7 @@
             MediaFileManager manager = WebloggerFactory.getWeblogger().getMediaFileManager();
 
             RollerMessages errors = new RollerMessages();
-            List<String> uploaded = new ArrayList();
+            List<MediaFile> uploaded = new ArrayList();
             File[] uploads = getUploadedFiles();
 
             if (uploads != null && uploads.length > 0) {
@@ -158,8 +158,8 @@
                         mediaFile.setLength(     this.uploadedFiles[i].length());
                         mediaFile.setInputStream(new FileInputStream(this.uploadedFiles[i]));
                         mediaFile.setContentType(this.uploadedFilesContentType[i]);
-
-                        manager.createMediaFile(getActionWeblog(), mediaFile);
+                        
+                        manager.createMediaFile(getActionWeblog(), mediaFile, errors);
                         WebloggerFactory.getWeblogger().flush();
 
                         if (mediaFile.isImageFile()) {
@@ -168,8 +168,8 @@
                             newFiles.add(mediaFile);
                         }
 
-                    } catch (FileIOException ex) {
-                        addError("uploadFiles.error.upload", bean.getName());
+                        uploaded.add(mediaFile);
+
                     } catch (Exception e) {
                         log.error("Error saving new entry", e);
                         // TODO: i18n
@@ -182,15 +182,16 @@
                     addError(msg.getKey(), Arrays.asList(msg.getArgs()));
                 }
 
-                if (uploaded.size() > 0) {
+                if (uploaded.size() > 0 && !this.errorsExist()) {
                     addMessage("uploadFiles.uploadedFiles");
-
-                    for (String upload : uploaded) {
-                        addMessage("uploadFiles.uploadedFile",
-                            WebloggerFactory.getWeblogger().getUrlStrategy()
-                                .getWeblogResourceURL(getActionWeblog(), upload, true));
+                    for (MediaFile upload : uploaded) {
+                        addMessage("uploadFiles.uploadedFile", upload.getPermalink());
                     }
+
+                } else {
+                    return INPUT;
                 }
+
                 this.pageTitle = "mediaFileAddSuccess.title";
                 return SUCCESS;
             }

Modified: roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/struts2/editor/MediaFileView.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/struts2/editor/MediaFileView.java?rev=829302&r1=829301&r2=829302&view=diff
==============================================================================
--- roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/struts2/editor/MediaFileView.java
(original)
+++ roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/struts2/editor/MediaFileView.java
Sat Oct 24 03:12:56 2009
@@ -266,11 +266,12 @@
 
         directoryHierarchy.add(new KeyValueObject("/", "root"));
         String fullPath = this.currentDirectory.getPath();
+        String dpath = "";
         if (fullPath.length() > 1) {
             String[] directoryNames = fullPath.substring(1).split("/");
             for (String directoryName : directoryNames) {
-                directoryPath = directoryPath + "/" + directoryName;
-                directoryHierarchy.add(new KeyValueObject(directoryPath, directoryName));
+                dpath = dpath + "/" + directoryName;
+                directoryHierarchy.add(new KeyValueObject(dpath, directoryName));
             }
         }
         return directoryHierarchy;

Modified: roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/struts2/editor/WeblogExport.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/struts2/editor/WeblogExport.java?rev=829302&r1=829301&r2=829302&view=diff
==============================================================================
--- roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/struts2/editor/WeblogExport.java
(original)
+++ roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/struts2/editor/WeblogExport.java
Sat Oct 24 03:12:56 2009
@@ -33,11 +33,13 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.roller.RollerException;
 import org.apache.roller.weblogger.WebloggerException;
 import org.apache.roller.weblogger.business.MediaFileManager;
 import org.apache.roller.weblogger.business.URLStrategy;
 import org.apache.roller.weblogger.business.WeblogEntryManager;
 import org.apache.roller.weblogger.business.WebloggerFactory;
+import org.apache.roller.weblogger.config.WebloggerConfig;
 import org.apache.roller.weblogger.pojos.MediaFile;
 import org.apache.roller.weblogger.pojos.MediaFileDirectory;
 import org.apache.roller.weblogger.pojos.WeblogEntry;
@@ -109,7 +111,12 @@
      * Simply triggers the display of the export options UI.
      */
     @Override
-    public String execute() {
+    public String execute() throws WebloggerException {
+
+        if (!WebloggerConfig.getBooleanProperty("weblog.export.enabled")) {
+            throw new WebloggerException("ERROR: export is disabled");
+        }
+
         // We need to gather some more info before we can attempt an export
         return INPUT;
     }
@@ -120,7 +127,12 @@
      *
      * Currently the only file format supported is mtimport.
      */
-    public void exportEntries() {
+    public void exportEntries() throws WebloggerException {
+
+        if (!WebloggerConfig.getBooleanProperty("weblog.export.enabled")) {
+            throw new WebloggerException("ERROR: export is disabled");
+        }
+        
         try {
             WeblogEntryManager wmgr =
                     WebloggerFactory.getWeblogger().getWeblogEntryManager();

Modified: roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/struts2/editor/editor-menu.xml
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/struts2/editor/editor-menu.xml?rev=829302&r1=829301&r2=829302&view=diff
==============================================================================
--- roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/struts2/editor/editor-menu.xml
(original)
+++ roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/struts2/editor/editor-menu.xml
Sat Oct 24 03:12:56 2009
@@ -60,6 +60,7 @@
                    subactions="mediaFileAdd,mediaFileHierarchicalView,mediaFileSearch" />
 
         <menu-item action="weblogExport"
+                   enabledProperty="weblog.export.enabled"
                    name="tabbedmenu.weblog.export"
                    roles="editor"
                    perms="author"

Modified: roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/webservices/atomprotocol/MediaCollection.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/webservices/atomprotocol/MediaCollection.java?rev=829302&r1=829301&r2=829302&view=diff
==============================================================================
--- roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/webservices/atomprotocol/MediaCollection.java
(original)
+++ roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/webservices/atomprotocol/MediaCollection.java
Sat Oct 24 03:12:56 2009
@@ -60,6 +60,7 @@
 import org.apache.roller.weblogger.pojos.MediaFileDirectory;
 import org.apache.roller.weblogger.pojos.User;
 import org.apache.roller.weblogger.pojos.Weblog;
+import org.apache.roller.weblogger.util.RollerMessages;
 import org.apache.roller.weblogger.util.Utilities;
 
 
@@ -138,7 +139,12 @@
                     mf.setInputStream(fis);
                     mf.setLength(tempFile.length());
 
-                    fileMgr.createMediaFile(website, mf);
+                    RollerMessages errors = new RollerMessages();
+                    fileMgr.createMediaFile(website, mf, errors);
+                    if (errors.getErrorCount() > 0) {
+                        throw new AtomException(errors.toString());
+                    }
+
                     roller.flush();
                     
                     fis.close();

Modified: roller/trunk/apps/weblogger/web/WEB-INF/classes/ApplicationResources.properties
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/web/WEB-INF/classes/ApplicationResources.properties?rev=829302&r1=829301&r2=829302&view=diff
==============================================================================
--- roller/trunk/apps/weblogger/web/WEB-INF/classes/ApplicationResources.properties (original)
+++ roller/trunk/apps/weblogger/web/WEB-INF/classes/ApplicationResources.properties Sat Oct
24 03:12:56 2009
@@ -513,8 +513,8 @@
 error.upload.dirmax=You cannot exceed the maximum directory size of {0} MB.
 error.upload.disabled=File Upload has been turned off
 error.upload.file=No file selected
-error.upload.filemax=File larger than maximum allowed: {0} MB
-error.upload.forbiddenFile=You can only upload files with these extensions and content-types:
{0}
+error.upload.filemax=File <b>{0}</b> larger than maximum <b>{1}</b>
MB allowed
+error.upload.forbiddenFile=File <b>{0}</b> content-type <b>{1}</b>
not allowed
 error.upload.badPath=Bad path: file-upload only supports one level of subdirectory
 
 error.general=ERROR: Unexpected Exception [{0}] has been logged.
@@ -993,7 +993,7 @@
 mediaFileSuccess.subtitle=Create a new weblog entry?
 mediaFileSuccess.pageTip=Your upload was successful. If you would like to \
 create a new weblog entry including your newly uploaded files then use the \
-form below to select the file(s) to be included. For images, we'll include \
+form below to select the file(s) to be included. For images, we will include \
 them in your post as thumbnails. For other file types you can choose one to \
 be attached to the new post as an enclosure (i.e. a podcast).
 mediaFileSuccess.uploaded=Uploaded Successfully
@@ -1004,7 +1004,7 @@
 click the button to create your new weblog entry.
 mediaFileSuccess.noEnclosure=No enclosure
 mediaFileSuccess.selectEnclosure=You can select one file (or none) to be \
-included in the weblog entry as an RSS/Atom enclosure (i.e. as a podcast): \
+included in the weblog entry as an RSS/Atom enclosure (i.e. as a podcast):
 mediaFileSuccess.selectImages=Select the the images that you would like to \
 include in your new weblog entry:
 
@@ -1043,7 +1043,7 @@
 mediaFileEdit.includeGalleryHelp=Check this box if you would like this media \
 file included in the new media file RSS and Atom feeds for your weblog.
 mediaFileEdit.updateFileContents=Update File Contents
-
+mediaFileEdit.clickToView=Click to view in new window
 mediaFile.createWeblogPost=Post in weblog
 mediaFile.createPodcastPost=Post in weblog as podcast
 
@@ -1066,7 +1066,6 @@
 mediaFileView.tabular=Tabular
 mediaFileView.hierarchical=Hierarhical
 mediaFileView.sortby=Sort by:
-mediaFileView.create=Create
 
 mediaFileView.deleteSelected=Delete selected
 mediaFileView.moveSelected=Move selected
@@ -1095,7 +1094,11 @@
 mediaFileView.tags=Tags
 mediaFileView.addMediaFile=Add Media File
 mediaFileView.actions=Actions
-mediaFileView.newDirName=New Directory Name
+
+mediaFileView.addDirectory=Add New Directory
+mediaFileView.directoryName=Name:
+mediaFileView.create=Create
+mediaFileView.search=Search Media Files
 
 mediaFileView.searchTitle=Search Results
 mediaFileView.matchingResults=Found <b>{0}</b> matching results.

Modified: roller/trunk/apps/weblogger/web/WEB-INF/jsps/editor/EntriesSidebar.jsp
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/web/WEB-INF/jsps/editor/EntriesSidebar.jsp?rev=829302&r1=829301&r2=829302&view=diff
==============================================================================
--- roller/trunk/apps/weblogger/web/WEB-INF/jsps/editor/EntriesSidebar.jsp (original)
+++ roller/trunk/apps/weblogger/web/WEB-INF/jsps/editor/EntriesSidebar.jsp Sat Oct 24 03:12:56
2009
@@ -20,55 +20,55 @@
 <div class="sidebarFade">
     <div class="menu-tr">
         <div class="menu-tl">
-            
+
             <div class="sidebarInner">
-                
+
                 <h3><s:text name="weblogEntryQuery.sidebarTitle" /></h3>
                 <hr size="1" noshade="noshade" />
-                
+
                 <p><s:text name="weblogEntryQuery.sidebarDescription" /></p>
-                
+
                 <s:form action="entries">
                     <s:hidden name="weblog" />
                     <s:hidden name="bean.count" />
                     <s:hidden name="bean.offset" />
-                    
+
                     <%-- ========================================================= --%>
                     <%-- filter by category --%>
-  
+
                     <div class="sideformrow">
                         <label for="categoryId" class="sideformrow">
-                        <s:text name="weblogEntryQuery.label.category" /></label>
         
+                        <s:text name="weblogEntryQuery.label.category" /></label>
                         <s:select name="bean.categoryPath" list="categories" listKey="path"
listValue="name" size="1" />
                     </div>
                     <br />
                     <br />
-                    
+
                     <%-- ========================================================= --%>
                     <%-- filter by tag --%>
-  
+
                     <div class="sideformrow">
                         <label for="tags" class="sideformrow">
-                        <s:text name="weblogEntryQuery.label.tags" /></label>
         
+                        <s:text name="weblogEntryQuery.label.tags" /></label>
                         <s:textfield name="bean.tagsAsString" size="14" />
                     </div>
                     <br />
-                    <br />    
-                    
+                    <br />
+
                     <%-- ========================================================= --%>
                     <%-- filter by text --%>
-  
+
                     <div class="sideformrow">
                         <label for="text" class="sideformrow">
-                        <s:text name="weblogEntryQuery.label.text" /></label>
         
+                        <s:text name="weblogEntryQuery.label.text" /></label>
                         <s:textfield name="bean.text" size="14" />
                     </div>
                     <br />
-                    <br />    
-                    
+                    <br />
+
                     <%-- ========================================================= --%>
                     <%-- filter by date --%>
-                    
+
                     <div class="sideformrow">
                         <label for="startDateString" class="sideformrow"><s:text
name="weblogEntryQuery.label.startDate" />:</label>
                         <script type="text/javascript" >
@@ -86,7 +86,7 @@
                            onclick="calStart.select(document.getElementById('entries_bean_startDateString'),'anchorCalStart','MM/dd/yy');
return false">
                         <img src='<s:url value="/images/calendar.png"/>' class="calIcon"
alt="Calendar" /></a>
                     </div>
-                    
+
                     <div class="sideformrow">
                         <label for="endDateString" class="sideformrow"><s:text name="weblogEntryQuery.label.endDate"
/>:</label>
                         <script type="text/javascript" >
@@ -106,7 +106,7 @@
                     </div>
                     <br />
                     <br />
-                    
+
                     <%-- ========================================================= --%>
                     <%-- filter by status --%>
 
@@ -119,12 +119,12 @@
                             <br />
                             <br />
                             <br />
-                        </label> 
+                        </label>
                         <div>
                             <s:radio theme="roller" name="bean.status" list="statusOptions"
listKey="key" listValue="value" />
                         </div>
                     </div>
-                    
+
                     <%-- ========================================================= --%>
                     <%-- sort by --%>
 
@@ -133,21 +133,21 @@
                             <s:text name="weblogEntryQuery.label.sortby" />:
                             <br />
                             <br />
-                        </label> 
+                        </label>
                         <div>
                             <s:radio theme="roller" name="bean.sortBy" list="sortByOptions"
listKey="key" listValue="value" />
                         </div>
                     </div>
-                    
+
                     <%-- ========================================================= --%>
                     <%-- search button --%>
-  
+
                     <br />
-                    
+
                     <s:submit key="weblogEntryQuery.button.query" />
-                    
+
                 </s:form>
-                
+
                 <br />
                 <br />
             </div> <!-- sidebarInner -->

Modified: roller/trunk/apps/weblogger/web/WEB-INF/jsps/editor/MediaFileAddSuccess.jsp
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/web/WEB-INF/jsps/editor/MediaFileAddSuccess.jsp?rev=829302&r1=829301&r2=829302&view=diff
==============================================================================
--- roller/trunk/apps/weblogger/web/WEB-INF/jsps/editor/MediaFileAddSuccess.jsp (original)
+++ roller/trunk/apps/weblogger/web/WEB-INF/jsps/editor/MediaFileAddSuccess.jsp Sat Oct 24
03:12:56 2009
@@ -80,17 +80,20 @@
         <table class="mediaFileTable">
             <s:iterator value="newImages" id="newImage">
             <tr>
-                <td>
+                <td width="5%">
                     <%-- checkbox for file --%>
                     <input type="checkbox"
                            name="selectedImages"
                            value="<s:property value="#newImage.id"/>"/>
                 </td>
-                <td>
-                    <%-- description of file --%>
-                    <img align="left" class="mediaFileImage"
+
+                <td width="15%">
+                    <img align="center" class="mediaFileImage"
                          src='<s:property value="%{#newImage.thumbnailURL}" />' alt="thumbnail"
/>
+                </td>
 
+                <td width="80%">
+                    <%-- description of file --%>
                     <span class="label"><s:text name="mediaFileSuccess.name" /></span>
                     <s:property value="%{#newImage.name}" /><br />
 
@@ -119,12 +122,12 @@
         <table class="mediaFileTable">
             <s:iterator value="newFiles" id="newFile">
             <tr>
-                <td>
+                <td width="20%">
                     <%-- radio button for file --%>
                     <input type="radio" name="enclosure"
                        onchange="setEnclosure('<s:property value="%{#newFile.permalink}"
/>')" />
                 </td>
-                <td>
+                <td width="80%">
                     <%-- description of file --%>
                     <s:property value="%{#newFile.name}" />
                 </td>

Modified: roller/trunk/apps/weblogger/web/WEB-INF/jsps/editor/MediaFileEdit.jsp
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/web/WEB-INF/jsps/editor/MediaFileEdit.jsp?rev=829302&r1=829301&r2=829302&view=diff
==============================================================================
--- roller/trunk/apps/weblogger/web/WEB-INF/jsps/editor/MediaFileEdit.jsp (original)
+++ roller/trunk/apps/weblogger/web/WEB-INF/jsps/editor/MediaFileEdit.jsp Sat Oct 24 03:12:56
2009
@@ -20,7 +20,10 @@
 
 <s:if test="bean.isImage">
     <div class="mediaFileThumbnail">
-        <img align="right" alt="thumbnail" src='<s:property value="bean.thumbnailURL"
/>' />
+        <a href='<s:property value="bean.permalink" />' target="_blank">
+            <img align="right" alt="thumbnail" src='<s:property value="bean.thumbnailURL"
/>'
+                 title='<s:text name="mediaFileEdit.clickToView" />' />
+        </a>
     </div>
 </s:if>
 

Modified: roller/trunk/apps/weblogger/web/WEB-INF/jsps/editor/MediaFileSidebar.jsp
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/web/WEB-INF/jsps/editor/MediaFileSidebar.jsp?rev=829302&r1=829301&r2=829302&view=diff
==============================================================================
--- roller/trunk/apps/weblogger/web/WEB-INF/jsps/editor/MediaFileSidebar.jsp (original)
+++ roller/trunk/apps/weblogger/web/WEB-INF/jsps/editor/MediaFileSidebar.jsp Sat Oct 24 03:12:56
2009
@@ -22,10 +22,12 @@
         <div class="menu-tl">
             <div class="sidebarInner">
 
+                <br />
                 <b><s:text name="mediaFileSidebar.actions" /></b>
                 <br />
                 <br />
 
+                <img src='<s:url value="/images/image_add.png"/>' border="0"alt="icon"
/>
                 <s:url id="mediaFileAddURL" action="mediaFileAdd">
                     <s:param name="weblog" value="%{actionWeblog.handle}" />
                     <s:param name="directoryPath" value="%{directoryPath}" />
@@ -35,10 +37,29 @@
                     <s:text name="mediaFileSidebar.add" />
                 </a>
 
-                <hr size="1" noshade="noshade" />
+              <s:if test="!pager">
+
+                <%-- Only show Create New Directory control when NOT showing search results
--%>
+                <br /><br />
+                <div>
+                    <img src='<s:url value="/images/folder_add.png"/>' border="0"alt="icon"
/>
+                    <s:text name="mediaFileView.addDirectory" /><br />
+                    <div style="padding-left:2em; padding-top:1em">
+                        <s:text name="mediaFileView.directoryName" />
+                        <input type="text" id="newDirectoryName" name="newDirectoryName"
size="10" maxlength="25" />
+                        <input type="button" id="newDirectoryButton"
+                            value='<s:text name="mediaFileView.create" />' onclick="onCreateDirectory()"
/>
+                    </div>
+                </div>
+              </s:if>
+
                 <br />
+                <hr size="1" noshade="noshade" />
                 <br />
 
+                <b><s:text name="mediaFileView.search" /></b>
+                <br />
+                <br />
 
                 <s:form id="mediaFileSearchForm" name="mediaFileSearchForm"
                         action="mediaFileView!search" onsubmit="editorCleanup()">
@@ -118,14 +139,22 @@
 
 <script type="text/javascript">
 
-function maintainSearchButtonState(e) {
-    if ( jQuery.trim($("#beanName").get(0).value).length == 0
-     &&  jQuery.trim($("#beanTags").get(0).value).length == 0
-     && (jQuery.trim($("#beanSize").get(0).value).length == 0 || $("#beanSize").get(0).value
== 0)
-     && ($("#beanType").get(0).value.length == 0 || $("#beanType").get(0).value ==
"mediaFileView.any")) {
-        $("#searchButton").attr("disabled", true);
+function onCreateDirectory() {
+    document.mediaFileViewForm.newDirectoryName.value = $("#newDirectoryName").get(0).value;
+    document.mediaFileViewForm.action='<s:url action="mediaFileView!createNewDirectory"
/>';
+    document.mediaFileViewForm.submit();
+}
+
+$("#newDirectoryButton").ready(function () {
+    $("#newDirectoryName").bind("keyup", maintainDirectoryButtonState);
+    $("#newDirectoryButton").attr("disabled", true);
+});
+
+function maintainDirectoryButtonState(e) {
+    if ( jQuery.trim($("#newDirectoryName").get(0).value).length == 0) {
+        $("#newDirectoryButton").attr("disabled", true);
     } else {
-        $("#searchButton").attr("disabled", false);
+        $("#newDirectoryButton").attr("disabled", false);
     }
 }
 
@@ -143,4 +172,15 @@
     });
 });
 
+function maintainSearchButtonState(e) {
+    if ( jQuery.trim($("#beanName").get(0).value).length == 0
+     &&  jQuery.trim($("#beanTags").get(0).value).length == 0
+     && (jQuery.trim($("#beanSize").get(0).value).length == 0 || $("#beanSize").get(0).value
== 0)
+     && ($("#beanType").get(0).value.length == 0 || $("#beanType").get(0).value ==
"mediaFileView.any")) {
+        $("#searchButton").attr("disabled", true);
+    } else {
+        $("#searchButton").attr("disabled", false);
+    }
+}
+
 </script>

Modified: roller/trunk/apps/weblogger/web/WEB-INF/jsps/editor/MediaFileView.jsp
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/web/WEB-INF/jsps/editor/MediaFileView.jsp?rev=829302&r1=829301&r2=829302&view=diff
==============================================================================
--- roller/trunk/apps/weblogger/web/WEB-INF/jsps/editor/MediaFileView.jsp (original)
+++ roller/trunk/apps/weblogger/web/WEB-INF/jsps/editor/MediaFileView.jsp Sat Oct 24 03:12:56
2009
@@ -38,6 +38,7 @@
         clear:left;
         width:130px;
         margin-left:5px;
+        margin-top:3px;
         font-size:11px;
     }
     .highlight {
@@ -69,12 +70,7 @@
 <script type="text/javascript">
 
     function onSelectDirectory(id) {
-        window.location = "?directoryId=" + id + "&weblog=" + '<s:property value="actionWeblog.handle"
/>';
-    }
-
-    function onCreateDirectory() {
-        document.mediaFileViewForm.action='<s:url action="mediaFileView!createNewDirectory"
/>';
-        document.mediaFileViewForm.submit();
+        window.location = "<s:url action="mediaFileView" />?directoryId=" + id + "&weblog="
+ '<s:property value="actionWeblog.handle" />';
     }
 
     function onDeleteSelected() {
@@ -158,6 +154,29 @@
         YAHOO.mediaFileEditor.lightbox.render(document.body);
     });
 
+    <%-- code to toggle buttons on/off as media file/directory selections change --%>
+
+    $(document).ready(function() {
+        $("#deleteButton").attr('disabled',true)
+        $("#moveButton").attr('disabled',true)
+        $("#moveTargetMenu").attr('disabled',true)
+
+        $("input[type=checkbox]").change(function() {
+            var count = 0;
+            $("input[type=checkbox]").each(function(index, element) {
+                if (element.checked) count++;
+            });
+            if (count == 0) {
+                $("#deleteButton").attr('disabled',true)
+                $("#moveButton").attr('disabled',true)
+                $("#moveTargetMenu").attr('disabled',true)
+            } else {
+                $("#deleteButton").attr('disabled',false)
+                $("#moveButton").attr('disabled',false)
+                $("#moveTargetMenu").attr('disabled',false)
+            }
+        });
+    });
 </script>
 
 
@@ -269,6 +288,7 @@
   <s:form id="mediaFileViewForm" name="mediaFileViewForm" action="mediaFileView">
     <s:hidden name="weblog" />
     <s:hidden name="directoryId" />
+    <s:hidden name="newDirectoryName" />
     <input type="hidden" name="mediaFileId" value="" />
 
     <div class="control">
@@ -354,13 +374,14 @@
                             <s:if test="#mediaFile.imageFile">
                                 <img border="0" src='<s:property value="%{#mediaFile.thumbnailURL}"
/>'
                                      width='<s:property value="#mediaFile.thumbnailWidth"/>'
-                                     height='<s:property value="#mediaFile.thumbnailHeight"/>'
/>
+                                     height='<s:property value="#mediaFile.thumbnailHeight"/>'
+                                     title='<s:property value="#mediaFile.name" />'
/>
                             </s:if>
 
                             <s:else>
                                 <s:url id="mediaFileURL" value="/images/page.png"></s:url>
                                 <img border="0" src='<s:property value="%{mediaFileURL}"
/>'
-                                     style="padding:40px 50px;" />
+                                     style="padding:40px 50px;" alt="logo" />
                             </s:else>
 
                         </div>
@@ -374,13 +395,13 @@
                             <input type="hidden" id="mediafileidentity"
                                    value="<s:property value='#mediaFile.id'/>" />
 
-                            <str:truncateNicely lower="40" upper="50">
+                            <str:truncateNicely lower="47" upper="47">
                                 <s:property value="#mediaFile.name" />
                             </str:truncateNicely>
 
                             <span class="button" id="addbutton-<s:property value='#mediaFile.id'
/>">
                                 <img id="addbutton-img<s:property value='#mediaFile.id'
/>"
-                                     src="<s:url value="/images/add.png"/>" />
+                                     src="<s:url value="/images/add.png"/>"  alt="logo"
/>
                             </span>
 
                        </div>
@@ -408,7 +429,8 @@
                             <s:if test="#mediaFile.imageFile">
                                 <img border="0" src='<s:property value="%{#mediaFile.thumbnailURL}"
/>'
                                      width='<s:property value="#mediaFile.thumbnailWidth"/>'
-                                     height='<s:property value="#mediaFile.thumbnailHeight"/>'
/>
+                                     height='<s:property value="#mediaFile.thumbnailHeight"/>'
+                                     title='<s:property value="#mediaFile.name" />'
/>
                             </s:if>
 
                             <s:else>
@@ -450,21 +472,6 @@
 
     <div style="clear:left;"></div>
 
-
-  <s:if test="!pager">
-    <br/>
-    <br/>
-    <br/>
-
-    <%-- Only show Create New Directory control when NOT showing search results --%>
-
-    <div>
-        <s:text name="mediaFileView.newDirName" />
-        <input type="text" id="newDirectoryName" name="newDirectoryName" size="30" />
-        <input type="button" value='<s:text name="mediaFileView.create" />' onclick="onCreateDirectory()"
/>
-    </div>
-  </s:if>
-
 </s:form>
 
 </s:if>
@@ -472,33 +479,6 @@
 
 <%-- ***************************************************************** --%>
 
-<%-- code to toggle buttons on/off as media file/directory selections change --%>
-
-<script type="text/javascript">
-    $(document).ready(function() {
-        $("#deleteButton").attr('disabled',true)
-        $("#moveButton").attr('disabled',true)
-        $("#moveTargetMenu").attr('disabled',true)
-
-        $("input[type=checkbox]").change(function() {
-            var count = 0;
-            $("input[type=checkbox]").each(function(index, element) {
-                if (element.checked) count++;
-            });
-            if (count == 0) {
-                $("#deleteButton").attr('disabled',true)
-                $("#moveButton").attr('disabled',true)
-                $("#moveTargetMenu").attr('disabled',true)
-            } else {
-                $("#deleteButton").attr('disabled',false)
-                $("#moveButton").attr('disabled',false)
-                $("#moveTargetMenu").attr('disabled',false)
-            }
-        });
-    });
-</script>
-
-
 <div id="mediafile_edit_lightbox" style="visibility:hidden">
     <div class="hd">Media File Editor</div>
     <div class="bd">
@@ -512,3 +492,7 @@
     </div>
     <div class="ft"></div>
 </div>
+
+<br/>
+<br/>
+<br/>
\ No newline at end of file

Modified: roller/trunk/apps/weblogger/web/WEB-INF/jsps/tiles/messages.jsp
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/web/WEB-INF/jsps/tiles/messages.jsp?rev=829302&r1=829301&r2=829302&view=diff
==============================================================================
--- roller/trunk/apps/weblogger/web/WEB-INF/jsps/tiles/messages.jsp (original)
+++ roller/trunk/apps/weblogger/web/WEB-INF/jsps/tiles/messages.jsp Sat Oct 24 03:12:56 2009
@@ -20,7 +20,7 @@
 <%-- Success Messages --%>
 <s:if test="!actionMessages.isEmpty">
     <div id="messages" class="messages">
-        <s:actionmessage />
+        <s:actionmessage escape="false" />
     </div>
 </s:if>
 
@@ -29,11 +29,11 @@
     <div id="errors" class="errors">
         <ul>
             <s:iterator id="actionError" value="actionErrors">
-                <li><s:property value="#actionError" /></li>
+                <li><s:property value="#actionError" escape="false" /></li>
             </s:iterator>
             <s:iterator id="fieldErrorName" value="fieldErrors.keySet()">
                 <s:iterator id="fieldErrorValue" value="fieldErrors[#fieldErrorName]">
-                    <li><s:property value="#fieldErrorValue" /></li>
+                    <li><s:property value="#fieldErrorValue" escape="false" /></li>
                 </s:iterator>
             </s:iterator>
         </ul>

Added: roller/trunk/apps/weblogger/web/images/image_add.png
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/web/images/image_add.png?rev=829302&view=auto
==============================================================================
Binary file - no diff available.

Propchange: roller/trunk/apps/weblogger/web/images/image_add.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: roller/trunk/apps/weblogger/web/roller-ui/styles/roller.css
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/web/roller-ui/styles/roller.css?rev=829302&r1=829301&r2=829302&view=diff
==============================================================================
--- roller/trunk/apps/weblogger/web/roller-ui/styles/roller.css (original)
+++ roller/trunk/apps/weblogger/web/roller-ui/styles/roller.css Sat Oct 24 03:12:56 2009
@@ -71,6 +71,9 @@
     width: 88px;
     margin-right: 5px;
 }
+label {
+   line-height: 1.5em;
+}
 
 /* ----------------------------------------------------------------------
 Page element styles: boxes and borders, etc.
@@ -98,7 +101,7 @@
     padding: 5px;
 }
 .sidebarInner {
-    padding: 5px;
+    padding: 0.5em 0.5em 0.5em 1em;
 }
 .sidebarBody ul {
     margin: 0px;
@@ -246,6 +249,7 @@
     text-align: left;
     width: 30%;
     padding-right: 1em;
+    padding-top: 1em;
     font-size: smaller;
 }
 



Mime
View raw message