Author Topic: jquery-ui for roundcube plugins  (Read 13948 times)

Offline corbosman

  • Sr. Member
  • ****
  • Posts: 260
jquery-ui for roundcube plugins
« 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. 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.



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
« Last Edit: May 02, 2011, 05:19:38 PM by corbosman »

Offline corbosman

  • Sr. Member
  • ****
  • Posts: 260
jquery-ui for roundcube plugins
« Reply #1 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

Offline corbosman

  • Sr. Member
  • ****
  • Posts: 260
jquery-ui for roundcube plugins
« Reply #2 on: August 01, 2010, 07:03:14 AM »
This plugin should be compatible with the upcoming 0.4-stable version of roundcube

Offline corbosman

  • Sr. Member
  • ****
  • Posts: 260
jquery-ui for roundcube plugins
« Reply #3 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
« Last Edit: December 19, 2010, 11:19:45 PM by rosali »

Offline corbosman

  • Sr. Member
  • ****
  • Posts: 260
jquery-ui for roundcube plugins
« Reply #4 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.