| 1 |
<?php |
| 2 |
if ( ! defined( 'ABSPATH' ) ) { |
| 3 |
exit; // Exit if accessed directly |
| 4 |
} |
| 5 |
wp_enqueue_script('jquery'); |
| 6 |
wp_enqueue_script('jquery-ui-core'); |
| 7 |
wp_enqueue_script('jquery-ui-sortable'); |
| 8 |
wp_enqueue_script('jquery-ui-datepicker' ); |
| 9 |
wp_enqueue_editor(); |
| 10 |
|
| 11 |
wp_enqueue_style('wppm-bootstrap-css'); |
| 12 |
wp_enqueue_style('wppm-jquery-ui'); |
| 13 |
wp_enqueue_style('wppm-public-css'); |
| 14 |
wp_enqueue_style('wppm-admin-css'); |
| 15 |
wp_enqueue_style('wppm-modal-css'); |
| 16 |
wp_enqueue_style('wppm-flatpickr-css'); |
| 17 |
wp_enqueue_style('wppm-select2-css'); |
| 18 |
wp_enqueue_style('wppm-gpopover-css'); |
| 19 |
wp_enqueue_style('wppm-dragula-css'); |
| 20 |
|
| 21 |
wp_enqueue_script('wppm-admin'); |
| 22 |
wp_enqueue_script('wppm-public'); |
| 23 |
wp_enqueue_script('wppm-modal'); |
| 24 |
wp_enqueue_script('wppm-flatpickr-js'); |
| 25 |
wp_enqueue_script('wppm-select2-js'); |
| 26 |
wp_enqueue_script('wppm-gpopover-js'); |
| 27 |
wp_enqueue_script('wppm-dragula-js'); |
| 28 |
wp_enqueue_script('wppm-datatable-js'); |
| 29 |
wp_enqueue_script('wppm-datatable-css'); |
| 30 |
?> |
| 31 |
<div class="wppm_bootstrap"> |
| 32 |
<div id="wppm_project_container"></div> |
| 33 |
<div id="wppm_alert_success" class="alert alert-success wppm_alert" style="display:none;" role="alert"> |
| 34 |
<img src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/success.svg'); ?>" alt="success"> <span class="wppm_alert_text"></span> |
| 35 |
</div> |
| 36 |
<div id="wppm_alert_error" class="alert alert-danger wppm_alert" style="display:none;" role="alert"> |
| 37 |
<img src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/warning-triangle.svg'); ?>" alt="warning-triangle"> <span class="wppm_alert_text"></span> |
| 38 |
</div> |
| 39 |
</div> |
| 40 |
<!-- Pop-up snippet start --> |
| 41 |
<div id="wppm_popup_background" style="display:none;"></div> |
| 42 |
<div id="wppm_popup_container" style="display:none;"> |
| 43 |
<div class="wppm_bootstrap"> |
| 44 |
<div class="row"> |
| 45 |
<div id="wppm_popup" class="col-xs-10 col-xs-offset-1 col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 col-lg-6 col-lg-offset-3"> |
| 46 |
<div id="wppm_popup_title" class="row" ><h3><?php echo esc_html_e('Modal Title','taskbuilder');?></h3></div> |
| 47 |
<div id="wppm_popup_body" class="row"><?php echo esc_html_e('I am body!','taskbuilder');?></div> |
| 48 |
<div id="wppm_popup_footer" class="row"> |
| 49 |
<button type="button" class="btn wppm_popup_close"><?php echo esc_html_e('Close','taskbuilder');?></button> |
| 50 |
<button type="button" class="btn wppm_popup_action"><?php echo esc_html_e('Save Changes','taskbuilder');?></button> |
| 51 |
</div> |
| 52 |
</div> |
| 53 |
</div> |
| 54 |
</div> |
| 55 |
</div> |
| 56 |
<!-- Pop-up snippet end --> |
| 57 |
<?php |
| 58 |
add_action('wp_footer', 'wppm_page_inline_script', 999999999999999999); |
| 59 |
do_action('wppm_after_shortcode_loaded'); |
| 60 |
if(!function_exists('wppm_page_inline_script')) { |
| 61 |
function wppm_page_inline_script() { ?> |
| 62 |
<script type="text/javascript"> |
| 63 |
jQuery( document ).ready( function( jQuery ) { |
| 64 |
<?php if(is_user_logged_in()){ ?> |
| 65 |
wppm_get_project_list(); |
| 66 |
<?php } else{ ?> |
| 67 |
wppm_sign_in(); |
| 68 |
<?php }?> |
| 69 |
}); |
| 70 |
</script> |
| 71 |
<?php } |
| 72 |
} |
| 73 |
?> |