Author Topic: cPanel Filters Plugin  (Read 9722 times)

Offline cornfeed

  • Newbie
  • *
  • Posts: 8
cPanel Filters Plugin
« on: December 06, 2011, 11:03:57 PM »
I have been working on a new plugin for the last week that will allow people to manage their cpanel filters from within the roundcube settings area.
I based everything off of managesieve and sieverules.
So far everything looks pretty good, and I have everything working except the save function.
From what I can tell, the plugin is not adding a gui_object properly.

In the Javascript, when I try to set the form field "_fid" to the value of the selected list item, rcmail.gui_objects turns up null.

Here is a link to the code

I would also be open to any suggested cleanups, but am first concerned with getting this save function to work properly.

Thanks in advance

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,882
    • SKaero - Custom Roundcube development
cPanel Filters Plugin
« Reply #1 on: December 07, 2011, 02:42:11 AM »
I haven't had time to test the code but you may want to try using jQuery to set the value of the field:
Code: [Select]
$('input[name=_fid]').val(value);

Offline cornfeed

  • Newbie
  • *
  • Posts: 8
cPanel Filters Plugin
« Reply #2 on: December 07, 2011, 03:29:48 PM »
That did it, thanks.
Still curious why it can not find the object though....

Offline cornfeed

  • Newbie
  • *
  • Posts: 8
cPanel Filters Plugin
« Reply #3 on: December 13, 2011, 08:19:57 AM »
So I have almost everything completely working except the save function. I can save the filters, but I have no clue how to handle the page refresh.

Any ideas will be appreciated. I have moved the code in prep for adding to the Wiki. https://github.com/cornfeed/cpanel_filters
Thanks
« Last Edit: December 13, 2011, 12:27:43 PM by cornfeed »

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,882
    • SKaero - Custom Roundcube development
cPanel Filters Plugin
« Reply #4 on: December 14, 2011, 06:46:43 AM »
What do you want the page refresh do to?

Offline cornfeed

  • Newbie
  • *
  • Posts: 8
cPanel Filters Plugin
« Reply #5 on: December 14, 2011, 07:50:41 PM »
Currently: When you hit save, it loads the settings page inside the frame used for my filterediting and then reloads the whole page.
What I Want: Save, Update the list on the left hand side, and then reload the same filter for further editing.

Right now the plugin is *functional* with jquery validation and a small bit of server side validation.

Offline niculin

  • Newbie
  • *
  • Posts: 5
cPanel Filters Plugin
« Reply #6 on: February 10, 2012, 12:08:27 PM »
this project is still alive? it's a very good plugin!

Offline maryus_soryn

  • Newbie
  • *
  • Posts: 1
cPanel Filters Plugin
« Reply #7 on: February 21, 2012, 06:43:16 AM »
The link doesn't work .

Can you copy the plugyn again please?

Thank you

Offline paZ

  • Jr. Member
  • **
  • Posts: 11
Re: cPanel Filters Plugin
« Reply #8 on: September 14, 2012, 12:45:03 PM »
the right link is https://github.com/cornfeed/cpanel_filters

By the way..with the new skin of Roundcube cpanel_filters is unusable :( (with the old skin works perfectly).
ALSO there is a bug that i found, when you deliver to a mail in a folder, the plugin add every time the INBOX. prefix also when the folder isn't in the INBOX. but is in the root.

(sorry for english)
best regards
paZ