function eventon_shortcode_button($context)
{
    global $pagenow, $typenow, $post;
    if ($typenow == 'post' && !empty($_GET['post'])) {
        $typenow = $post->post_type;
    } elseif (empty($typenow) && !empty($_GET['post'])) {
        $post = get_post($_GET['post']);
        $typenow = $post->post_type;
    }
    if ($typenow == '' || $typenow == "ajde_events") {
        return;
    }
    //our popup's title
    $text = '[ ] ADD EVENTON';
    $title = 'eventON Shortcode generator';
    //append the icon
    $context .= "<a id='evo_shortcode_btn' class='eventon_popup_trig evo_admin_btn btn_prime' title='{$title}' href='#'>{$text}</a>";
    eventon_shortcode_pop_content();
    return $context;
}
    function form($instance)
    {
        global $eventon;
        extract($instance);
        $evo_title = !empty($evo_title) ? $evo_title : null;
        $evo_shortcodeW = !empty($evo_shortcodeW) ? $evo_shortcodeW : null;
        // HTML
        eventon_shortcode_pop_content();
        ?>
		<div id='eventon_widget_settings' class='eventon_widget_settings'>
			<div class='eventon_widget_top'><p></p></div>
			
			<div class='evo_widget_outter evowig'>				
				<div class='evo_wig_item'>					
					<input id="<?php 
        echo $this->get_field_id('evo_title');
        ?>
" name="<?php 
        echo $this->get_field_name('evo_title');
        ?>
" type="text" 
					value="<?php 
        echo esc_attr($evo_title);
        ?>
" placeholder='Widget Title' title='Widget Title'/>					
				</div>
			</div>
			<p><a id='evo_shortcode_btn' class='eventon_popup_trig evo_admin_btn btn_prime' title='<?php 
        _e('eventON Shortcode generator', 'eventon');
        ?>
' href='#'>[ add eventon ]</a></p>
			<p class='evo_widget_textarea'><textarea name="<?php 
        echo $this->get_field_name('evo_shortcodeW');
        ?>
" id="<?php 
        echo $this->get_field_id('evo_shortcodeW');
        ?>
"><?php 
        echo esc_attr($evo_shortcodeW);
        ?>
</textarea><br/><label><?php 
        _e('EventOn Calendar Shortcode', 'eventon');
        $eventon->throw_guide('Use the Eventon Shortcode Generator to create a shortcode based on your requirements, and paste it in here.', 'L');
        ?>
</label></p>
		
		</div>
		<?php 
    }
    function content_shortcodes()
    {
        ob_start();
        ?>
			<p>Use the "Generate shortcode" button to open lightbox shortcode generator to create your desired calendar shortcode.</p><br/>
			
			<a id="evo_shortcode_btn" class="eventon_popup_trig evo_admin_btn btn_prime" title="eventON Shortcode generator" href="#" data-textbox='evo_set_shortcodes'>[ ] Generate shortcode</a><br/>
			<p id='evo_set_shortcodes'></p>

			<p style='padding-top:10px'><b>Other common shortcodes</b></p>
			<p>[add_eventon] -- Default month calendar</p>
			<p>[add_eventon_list number_of_months="5" hide_empty_months="yes" ] -- 5 months events list with empty months hidden from view</p>
			<p>[add_eventon_list number_of_months="5" month_incre="-5" ] -- Show list of 5 past months</p>

		<?php 
        // throw shortcode popup codes
        eventon_shortcode_pop_content();
        return ob_get_clean();
    }