Skip to content

Commit

Permalink
replace custom dialog css with built-in dialog css to avoid conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigoprimo committed Jan 26, 2014
1 parent b3b42ab commit ea7a67a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
5 changes: 2 additions & 3 deletions media.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
Expand Down
4 changes: 4 additions & 0 deletions media/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ div.social_connect_ui img {
width: 32px;
}

.social_connect_wordpress_form {
margin: 5px;
}

.social_connect_wordpress_form input {
height: 18px;
}
Expand Down
7 changes: 5 additions & 2 deletions media/js/connect.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit ea7a67a

Please sign in to comment.