Hi Dave,

Thanks for the feedback and clarification.  It makes sense.  I guess I
could use this to represent hierarchical structure in a linear bread crumb
view:

videos\presentations\San_Francisco_202002

Looking at the back end code for validation:

package org.apache.roller.weblogger.ui.struts2.editor;

public class MediaFileView extends MediaFileBase {
    public String createNewDirectory() {
        boolean dirCreated = false;
        if (StringUtils.isEmpty(this.newDirectoryName)) {
            addError("mediaFile.error.view.dirNameEmpty");
        } else if (this.newDirectoryName.contains("/")) {
            addError("mediaFile.error.view.dirNameInvalid");
        } else {
// ...
        }
    }
}

I'm just curious about reason(s) why it checks to contain '/' when it's
just another character in a string in the SQL back end while this character
'\' works...  Also, from this screen shot:

[image: image.png]

I think the button 'Delete folder' is misleading because, intuitively, it
represents deleting the 'default' directory instead of the 'imgs'
directory.  However, the 'default' directory is grey-ed out because there
are no files to select for (delete or move to) actions.  Even when there
are files, that drop down is only selectable when at least one file is
selected.  In either case, I still think that 'Delete folder' button is
still misleading.  I made the following changes in WEB-INF/jsps/editor:

--- MediaFileView.jsp.ori       2020-02-22 16:11:17.461733000 -0800
+++ MediaFileView.jsp.patch     2020-02-22 16:13:38.513752000 -0800
@@ -130,6 +130,10 @@
             <s:select id="sortByMenu" name="sortBy" list="sortOptions"
listKey="key" listValue="value"
                       onchange="document.mediaFileViewForm.submit();"/>

+            <s:if test="currentDirectory.name != 'default' && !pager">
+                <s:submit value="%{getText('mediaFileView.deleteFolder')}"
cssClass="btn"
+                          action="mediaFileView!deleteFolder"
onclick="onDeleteFolder();return false;"/>
+            </s:if>
         </div>


@@ -293,11 +297,6 @@

                 <s:select id="moveTargetMenu" name="selectedDirectory"
cssStyle="display: inline; width: 15em"
                           list="allDirectories" listKey="id"
listValue="name"/>
-
-                <s:if test="currentDirectory.name != 'default' && !pager">
-                    <s:submit
value="%{getText('mediaFileView.deleteFolder')}" cssClass="btn"
-                              action="mediaFileView!deleteFolder"
onclick="onDeleteFolder();return false;"/>
-                </s:if>

             </div>

for what I think is a more user friendly UI:

[image: image.png]

Thanks,
Tommy


On Sat, Feb 22, 2020 at 2:03 PM Dave <snoopd...@gmail.com> wrote:

> Roller did once have a media file folder hierarchy but at one point we
> decided to simplify that and only allow one level of grouping. You can use
> "Add a new folder" to add a new folder, but you cannot add folders inside
> that folder.
>
> Dave
>
>
>
> On Sat, Feb 22, 2020 at 4:30 PM Tommy Pham <tommy...@gmail.com> wrote:
>
> > Hello everyone,
> >
> > I'm don't think that roller has any hierarchical directory structure for
> > the media files such as:
> >
> > + default (root)
> > |---- images
> > |     |---- CES_2020
> > |     |---- EEE_2020
> > |     |---- Auto_2020
> > |---- documents
> > |---- videos
> > |     |---- presentations
> > |           |---- San_Francisco_202002
> >
> > which doesn't seem to be supported in the SQL backend:
> >
> > CREATE TABLE `roller_mediafiledir` (
> >  `id` varchar(48) NOT NULL,
> >  `name` varchar(255) NOT NULL,
> >  `description` varchar(255) DEFAULT NULL,
> >  `websiteid` varchar(48) NOT NULL,
> > -- `parentid` varchar(48) NOT NULL COMMENT 'missing to support hierarchy'
> >  PRIMARY KEY (`id`),
> > -- KEY `parentid `  (`parentid `) --  missing to support hierarchy
> >  KEY `mf_weblogid_fk` (`websiteid`)
> > )
> >
> > Would someone please confirm?  If the hierarchical structure is not
> > supported, how can I go about requesting this feature since it makes
> > organization of the media files easier?
> >
> > Thanks,
> > Tommy
> >
>

Reply via email to