Beispiel #1
0
    function page_footer()
    {
        parent::page_footer();
        ?>
<script type="text/javascript">
	jQuery(document).ready(function () {
		/* upload logo and images */
		jQuery('.upload_button').click(function () {
			formfield = jQuery(this).attr('rel');
			tb_show('', 'media-upload.php?type=image&amp;post_id=0&amp;TB_iframe=true');
			return false;
		});

		/* send the uploaded image url to the field */
		window.send_to_editor = function (html) {
			imgurl = jQuery('img', html).attr('src'); // get the image url
			imgoutput = '<img src="' + imgurl + '" />'; //get the html to output for the image preview
			jQuery('#' + formfield).val(imgurl);
			jQuery('#' + formfield + '_image').html(imgoutput);
			tb_remove();
		};
	});
</script>
<?php 
    }
    function page_footer()
    {
        parent::page_footer();
        ?>
<script type="text/javascript">
jQuery(document).ready(function($) {
	if ( $("form input[name^='system_info']").length ) {
		$('form input[type=submit]').val('<?php 
        esc_attr_e('Download Report', APP_TD);
        ?>
');
		$('form p.submit').append('<input type="hidden" name="download_system_info" value="1" />');
	}
});
</script>
<?php 
    }
 function __construct($options)
 {
     if ($this->conditional_create_page()) {
         parent::__construct($options);
     } else {
         $this->setup();
         add_action('admin_init', array($this, 'tab_register'));
     }
 }