Author Topic: viewing and creating sub folders  (Read 488 times)

Offline sukisen

  • Jr. Member
  • **
  • Posts: 12
viewing and creating sub folders
« on: July 11, 2019, 04:27:31 PM »
Facing issues on sub folder after upgrading to rcb 1.3.6

1st clip - default inbox view, here it appears as expected - namely test folder 3 under test folder 8 under test folder 7
2nd clip - view after clicking settings - ONLY main test folder 7 is visible.

To solve this and after reading the forums i applied this code to config.inc.php
$config['imap_root'] = 'null';
$config['imap_delimiter'] = '#';

Now see the next 2 screen clips
3rd clip - folders appears like object notation - test folder 7 under that test folder 7.test folder 8 and then under that test folder 3. This is all in one vertical alignment, and looks worse than without applying code in config.inc.php in inbox view.
However 4th clip - after clicking settings view, At least we get the same structure as clip 3 and are able to see the sub folder tree unlike 2nd clip.
clip 5 - I click on add folder icon. I can create a new master folder but how to create a new sun folder, say another sub folder under test folder 8?

So, I have 2 issues here the view after clicking settings( it should list the sub folders unlike clip 2) and the folder.subfolder notation looks very odd
2nd issue is of course how do i create a new sub folder after clicking settings, this flows from the 5th clip.

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,275
Re: viewing and creating sub folders
« Reply #1 on: July 12, 2019, 01:22:07 AM »
Quote
To solve this and after reading the forums i applied this code to config.inc.php
$config['imap_root'] = 'null';
$config['imap_delimiter'] = '#';
Are you sure these settings are correct for your environment? In images 3 and 4 it looks like your IMAP delimiter is dot (.)

I see you are using a third party skin and since your issues are limited to the Folders section in Settings - the fact that the folders are shown correctly in the Mail screen suggests that Roundcube is interpreting your folder structure correctly - I suggest you try one of the core skins (Classic or Larry) and check the folder section then. This should show if its a config issue, or a skin issue.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline sukisen

  • Jr. Member
  • **
  • Posts: 12
Re: viewing and creating sub folders
« Reply #2 on: July 12, 2019, 03:26:27 AM »
Hi John,
Firstly, many thanks for your quick reply
Yes i am using a third party skin.  I checked with Larry and classic skins and creating / viewing sub folders is working for both.
Ref. the delimiter, this is a strange one. I agree that the delimiter looks like it should be a dot, but it is not. So if i just trim down the code and only specify the following
$config['imap_delimiter'] = '#';
I get the object notation views in inbox and after clicking the settings button.

I realize that this is a problem of the custom skin we are using (there is no modification needed in config.inc.php for laary & classic skins), what I want to know is which js/css in larry does the create sub folder (with parent folder etc.) does these functionality get triggered from?
I tried deleting multiple js / css from the source of the folder creation page , but am getting very confused.

If I can get some pointers as to which js/css/php the create folder functionality gets triggered from I can do some investigations and retro fit that in my custom skin.

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,275
Re: viewing and creating sub folders
« Reply #3 on: July 13, 2019, 03:00:49 AM »
what version of roundcube is your skin based on? You you try having a look at the commit logs and the changes done to the folders template in Larry since you last updated your skin. It might show you what you need to change https://github.com/roundcube/roundcubemail/commits/release-1.3/skins/larry/templates/folders.html
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline sukisen

  • Jr. Member
  • **
  • Posts: 12
Re: viewing and creating sub folders
« Reply #4 on: July 24, 2019, 06:28:27 AM »
Hi John,
Thanks for the help. The issue was with the custom skin ui.js
Below items were added to the custom skin , which prevented us from viewing / saving into sub folders
$('label[for="_path"]').parent().parent().remove();
   $('label[for="_foldertype"]').parent().parent().hide();
   $('label[for="_viewmode"]').parent().parent().hide();
   $("#mailboxroot").hide();

Unfortunately, while testing I am facing new issue, maybe i will post a separate question for that
From the main mail message view , I am not able to drag mails into any user created folder/subfolder. This however works when I drag a mail to the default folder, say for example I drag  a mail into the spam folder.
But if i create a new folder , say test and a sub folder under than , say test folder, I am not able to drag an email to the user created sub folders.
Now, under programs>js>app.js there is the below code
// copy selected messages to the specified mailbox
  this.copy_messages = function(mbox, event)
  {
    if (mbox && typeof mbox === 'object')
      mbox = mbox.id;
    else if (!mbox)
      return this.folder_selector(event, function(folder) { ref.command('copy', folder); });

   Here, what I have seen is that the mobx = mbox.id is not getting assigned for the created folder / sub folders but it does get assigned for any of the default folders, like Inbox, Delete etc.
Not able to figure out how to pass the  mbox.id for user created folders/ sub folders