Roundcube Community Forum

 

not able to drag email to sub folders / user created folder

Started by sukisen, July 24, 2019, 06:30:24 AM

Previous topic - Next topic

sukisen

Looks like we are missing some configuration in our custom skin

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

sukisen

Appeal to forum members - I really need some pointers on this

SKaero

Are you using the default that come with Roundcube or a custom skin?

sukisen

Hi - Using custom skin. I want some pointers on where and how to set the mboxid

JohnDoh

do you only have an issue when copying a message not moving it?
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

sukisen

hi John - If i drag and drop mails from the message list to sub folder, it is not working for user created folders / sub folders.
However, if i select a message and then click on more > moveto... , I can both copy /move the mails from message list to use created folder/subfolder.
When dragging a mail using mouse left drag for some reason the mbox.id is not getting mapped for user created folders.
I tested with an alert in the app.js script and the object value gets passed ONLY for default folders like inbox,spam,delete.
However, since it works if i select a mail and try using more > moveto... I do feel I can re-use some code somewhere, but am not able to determine how the mbox.id is being set/passed...

JohnDoh

its very hard to suggest anything. your best bet is to look through the commits to one of the core skins since when ever you made your skin.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...