Thomas Bruederli
2012-08-04 f86ee5e424a07aec32f896535496444c56e28701
plugins/jqueryui/jqueryui.php
@@ -24,7 +24,7 @@
        $this->include_script("js/jquery-ui-$version.custom.min.js");
        // include UI stylesheet
        $skin = $rcmail->config->get('skin', 'default');
        $skin = $rcmail->config->get('skin');
        $ui_map = $rcmail->config->get('jquery_ui_skin_map', array());
        $ui_theme = $ui_map[$skin] ? $ui_map[$skin] : $skin;
@@ -32,7 +32,17 @@
            $this->include_stylesheet("themes/$ui_theme/jquery-ui-$version.custom.css");
        }
        else {
            $this->include_stylesheet("themes/default/jquery-ui-$version.custom.css");
            $this->include_stylesheet("themes/larry/jquery-ui-$version.custom.css");
        }
        if ($ui_theme == 'larry') {
            // 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);
                }
            });", 'foot');
        }
        // jquery UI localization