Roundcube Community Forum

Third Party Contributions => API Based Plugins => Topic started by: corbosman on July 04, 2010, 09:12:57 AM

Title: jquery-ui for roundcube plugins
Post by: corbosman on July 04, 2010, 09:12:57 AM
Hi all, I've made a new plugin that adds jquery-ui to roundcube. This allows plugin developers to use jquery-ui without having to load it themselves. The benefit of using 1 central jquery-ui library is that there won't be conflicts between plugins that load their own versions of jquery-ui.

If you use jquery-ui in your plugin, it may be better to use this plugin as a requirement. I will make versions of this plugin of all stable releases of jquery-ui going forward.

This plugin supports the jquery theme 'smoothness'. This theme is the closest to the roundcube theme, and therefore was chosen as the default theme for jquery-ui.  It is possible however for plugin authors to override the smoothness theme and use their own theme. Since multiple plugins can add UI elements to a page, this has to be done in a specific (but relatively easy) way.

First go to the jquery-ui download page (http://jqueryui.com/download). On the right side of the screen, you can pick the theme you want. Click on "Advanced Theme Settings" and now provide a scope for your plugin. A scope is simply a class that you need to add to your UI elements.

(http://grab.by/grabs/4e8ad094b62de9b0e5a24985c0a1e5f4.png)

In the above example, I have picked the darkness theme, and added the class ".my_plugin" to it.

Now download the css, and add it to your plugin like this:


$this->include_stylesheet("..path to css../darkness/jquery-ui-1.8.2.custom.css");


Finally, make sure you add the ".my_plugin" class to the elements that you want to use the darkness theme on. For instance, when using the jquery-dialog element, you can pass this class using the 'dialogClass' option.

You can get the plugin here:  Roundcube Plugins | Underwater World (http://underwa.ter.net/roundcube-plugins/)
Title: jquery-ui for roundcube plugins
Post by: corbosman on July 11, 2010, 06:00:29 AM
Ive released version 1.8.2.1. This version allows for localization of the datepicker module

Get it here:  Roundcube Plugins | Underwater World (http://underwa.ter.net/roundcube-plugins/)
Title: jquery-ui for roundcube plugins
Post by: corbosman on August 01, 2010, 07:03:14 AM
This plugin should be compatible with the upcoming 0.4-stable version of roundcube
Title: jquery-ui for roundcube plugins
Post by: corbosman on December 18, 2010, 06:23:56 AM
Hi all, ive uploaded a new version of jquery-ui. This new version uses jquery-1.8.6. There also is support for other themes. Right now only the groupvice theme is supported, but if you have a theme and want a specific jquery-ui theme to match your theme, let me know and we can sort it out.

Thanks to Rosali for supplying most of the changes in this version.

Get it here:  Roundcube Plugins | Underwater World (http://underwa.ter.net/roundcube-plugins/)
Title: jquery-ui for roundcube plugins
Post by: corbosman on May 02, 2011, 05:07:24 PM
As of RC 0.6 this plugin has been incorporated into roundcube core. This plugin is now deprecated going forward. Please only use my plugin for roundcube versions below 0.6.