From ea7a67ae8d233fde474d261f2ebc3e7332e734b6 Mon Sep 17 00:00:00 2001 From: Rodrigo Primo Date: Sun, 26 Jan 2014 12:04:57 -0200 Subject: [PATCH] replace custom dialog css with built-in dialog css to avoid conflicts see http://wordpress.org/support/topic/why-does-social-connect-load-external-stylesheets?replies=1#post-5149583 --- media.php | 5 ++--- media/css/style.css | 4 ++++ media/js/connect.js | 7 +++++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/media.php b/media.php index 324ffde..bb113e6 100644 --- a/media.php +++ b/media.php @@ -3,15 +3,14 @@ function sc_add_stylesheets(){ if( !wp_style_is( 'social_connect', 'registered' ) ) { wp_register_style( "social_connect", SOCIAL_CONNECT_PLUGIN_URL . "/media/css/style.css" ); - wp_register_style( "jquery-ui", 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/themes/smoothness/jquery-ui.css' ); } if ( did_action( 'wp_print_styles' ) ) { wp_print_styles( 'social_connect' ); - wp_print_styles( 'jquery-ui' ); + wp_print_styles( 'wp-jquery-ui-dialog' ); } else { wp_enqueue_style( "social_connect" ); - wp_enqueue_style( "jquery-ui" ); + wp_enqueue_style( "wp-jquery-ui-dialog" ); } } add_action( 'login_head', 'sc_add_stylesheets' ); diff --git a/media/css/style.css b/media/css/style.css index ea07952..eab306e 100644 --- a/media/css/style.css +++ b/media/css/style.css @@ -4,6 +4,10 @@ div.social_connect_ui img { width: 32px; } +.social_connect_wordpress_form { + margin: 5px; +} + .social_connect_wordpress_form input { height: 18px; } diff --git a/media/js/connect.js b/media/js/connect.js index 049955f..10c63e4 100644 --- a/media/js/connect.js +++ b/media/js/connect.js @@ -2,10 +2,13 @@ jQuery.noConflict(); (function($) { $(function() { // ready to roll - if (social_connect_data.wordpress_enabled) { var _social_connect_wordpress_form = $($('.social_connect_wordpress_form')[0]); - _social_connect_wordpress_form.dialog({ autoOpen: false, modal: true, dialogClass: 'social-connect-dialog', resizable: false, maxHeight: 400, width:350, maxWidth: 600 }); + _social_connect_wordpress_form.dialog({ + 'dialogClass' : 'wp-dialog', + 'modal' : true, + 'autoOpen' : false, + }); } var _do_google_connect = function() {