Created
April 19, 2010 05:58
-
-
Save michaeltwofish/370785 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function action_admin_header($theme) | |
{ | |
if ( $theme->page == 'themes' ) { | |
$js = <<<JS | |
$(document).ready(function() { | |
$('#twitter input:checkbox').bind('change', function() { | |
var disable_twitter_username = $('#twitter input:checked').length == 0; | |
$('#twitter_username input').attr('disabled', disable_twitter_username); | |
}); | |
$('#twitter input:checkbox').change(); | |
}); | |
JS; | |
Stack::add('admin_header_javascript', $js, 'theme_options'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment