Skip to content
This repository has been archived by the owner on Aug 25, 2021. It is now read-only.

Commit

Permalink
Thickbox height fix
Browse files Browse the repository at this point in the history
  • Loading branch information
FoolsRun committed Apr 17, 2014
1 parent afbe86a commit c6e32dd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion includes/actions-filters.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function add_bootstrap_button() {

//append the icon
printf(
'<a title="%1$s" href="%2$s" class="thickbox button add_media" style="padding-left: 0px; padding-right: 0px;"><span class="bs_bootstrap-logo wp-media-buttons-icon"></span></a>',
'<a title="%1$s" href="%2$s" class="thickbox button add_media bootstrap-shortcodes-button" style="padding-left: 0px; padding-right: 0px;"><span class="bs_bootstrap-logo wp-media-buttons-icon"></span></a>',
esc_attr( $title ),
esc_url( '#TB_inline?width=640&height=650&inlineId=' . $popup_id )
//sprintf( '<img src="%s" style="height: 20px; position: relative; top: -2px;">', esc_url( $img ) )
Expand Down
10 changes: 10 additions & 0 deletions includes/bootstrap-shortcodes-help.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,16 @@ function retitle($match) {
win.send_to_editor(paras);
});
});
</script>
<script type="text/javascript">
jQuery( '.bootstrap-shortcodes-button' ).each( function( index, value ) {
var h = window.innerHeight * .85;
var href = jQuery( this ).attr('href');
var find = 'height=650';
var replace = '&height='+h;
href = href.replace( find, replace )
jQuery( this ).attr( 'href', href );
} );
</script>
<div style="display:none;" id="bootstrap-shortcodes-help-popup">
<div id="bootstrap-shortcodes-help">
Expand Down

0 comments on commit c6e32dd

Please sign in to comment.