| | |
| | | * |
| | | * Provide the jQuery UI library with according themes. |
| | | * |
| | | * @version 1.8.18 |
| | | * @version 1.9.1 |
| | | * @author Cor Bosman <roundcube@wa.ter.net> |
| | | * @author Thomas Bruederli <roundcube@gmail.com> |
| | | * @license GNU GPLv3+ |
| | | */ |
| | | class jqueryui extends rcube_plugin |
| | | { |
| | |
| | | |
| | | public function init() |
| | | { |
| | | $version = '1.8.18'; |
| | | $version = '1.9.1'; |
| | | |
| | | $rcmail = rcmail::get_instance(); |
| | | $this->load_config(); |
| | |
| | | // patch dialog position function in order to fully fit the close button into the window |
| | | $rcmail->output->add_script("jQuery.extend(jQuery.ui.dialog.prototype.options.position, { |
| | | using: function(pos) { |
| | | var topOffset = $(this).css(pos).offset().top - 12; |
| | | if (topOffset < 0) $(this).css('top', pos.top - topOffset); |
| | | var me = jQuery(this), |
| | | offset = me.css(pos).offset(), |
| | | topOffset = offset.top - 12; |
| | | if (topOffset < 0) |
| | | me.css('top', pos.top - topOffset); |
| | | if (offset.left + me.outerWidth() + 12 > jQuery(window).width()) |
| | | me.css('left', pos.left - 12); |
| | | } |
| | | });", 'foot'); |
| | | } |