jQuery(document).ready(function() { var blos_nr_actions_required = blosLiteWelcomeScreenObject.nr_actions_required; if ( (typeof blos_nr_actions_required !== 'undefined') && (blos_nr_actions_required != '0') ) { jQuery('li.blos-w-red-tab a').append('' + blos_nr_actions_required + ''); } jQuery(".blos-dismiss-required-action").click(function(){ var id= jQuery(this).attr('id'); console.log(id); jQuery.ajax({ type : "GET", data : { action: 'blos_dismiss_required_action',dismiss_id : id }, dataType : "html", url : blosLiteWelcomeScreenObject.ajaxurl, beforeSend : function(data,settings){ jQuery('.blos-tab-pane#actions_required h1').append('

' + blosLiteWelcomeScreenObject.no_required_actions_text + '
'); } else { jQuery('.blos-actions-count').text(parseInt(blos_lite_actions_count) - 1); } } }, error : function(jqXHR, textStatus, errorThrown) { console.log(jqXHR + " :: " + textStatus + " :: " + errorThrown); } }); }); function blos_welcome_page_tabs(event) { jQuery(event).parent().addClass("active"); jQuery(event).parent().siblings().removeClass("active"); var tab = jQuery(event).attr("href"); jQuery(".blos-tab-pane").not(tab).css("display", "none"); jQuery(tab).fadeIn(); } var blos_actions_anchor = location.hash; if( (typeof blos_actions_anchor !== 'undefined') && (blos_actions_anchor != '') ) { blos_welcome_page_tabs('a[href="'+ blos_actions_anchor +'"]'); } jQuery(".blos-nav-tabs a").click(function(event) { event.preventDefault(); blos_welcome_page_tabs(this); }); $tab = jQuery('.blos-tab-content > div'); $admin_menu_height = jQuery('#adminmenu').height(); if( (typeof $tab !== 'undefined') && (typeof $admin_menu_height !== 'undefined') ) { $newheight = $admin_menu_height - 180; $tab.css('min-height',$newheight); } });