adding click listener for the course completion overlay
authorAnthony Talarico <talarico@gaslightmedia.com>
Mon, 30 Jul 2018 18:24:36 +0000 (14:24 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Mon, 30 Jul 2018 18:24:36 +0000 (14:24 -0400)
assets/js/glm-dev.js
content-single.php
glm-dev/js/glm-dev.js
single.php

index 020bd16..fbad748 100644 (file)
@@ -1 +1 @@
-jQuery(function(t){t(".glm-badge-alert").on("click",function(){t(this).fadeOut("slow"),"glm-badge-overlay"===t(this).parent().attr("id")&&t(this).parent().fadeOut("slow")})});
\ No newline at end of file
+jQuery(function(t){t(".glm-badge-alert").on("click",function(){t(this).fadeOut("slow"),"glm-badge-overlay"===t(this).parent().attr("id")&&t(this).parent().fadeOut("slow")}),t("#glm-badge-overlay").on("click",function(){t(this).fadeOut("slow")})});
\ No newline at end of file
index 1466166..6c649ed 100644 (file)
@@ -4,7 +4,7 @@
  */
 global $post;
 $pt = $post->post_type;
-$ld_types = array('sfwd-courses','sfwd-lesses','sfwd-quiz');
+$ld_types = array('sfwd-courses','sfwd-lessons','sfwd-quiz','sfwd-topic');
 $post_date = of_get_option('post_date');
 $post_footer = of_get_option('post_footer');
 $post_date_class = ((!empty($post_date) && $post_date == ' ') || has_post_thumbnail()) ? " no-date" : "";
@@ -32,7 +32,7 @@ $lesson_content = $lessons_page->post_content;
 
        <div class="entry-content">
         <?php if( $pt === 'sfwd-courses'){ ?>
-            <p> <?php echo $lesson_content; ?> </p>
+            <p> <?php //echo $lesson_content; ?> </p>
         <?php } ?>
                <?php the_content(); ?>
                <?php
index f62d342..dc305f8 100644 (file)
@@ -1,9 +1,11 @@
 jQuery(function($){ 
     $(".glm-badge-alert").on("click", function(){
-
         $(this).fadeOut("slow");
         if($(this).parent().attr("id") === "glm-badge-overlay"){
             $(this).parent().fadeOut('slow');
         }
     });
+    $("#glm-badge-overlay").on("click", function(){
+        $(this).fadeOut("slow");
+    })
 });
\ No newline at end of file
index 0bd2ae3..366475e 100644 (file)
@@ -7,7 +7,7 @@
 global $post;
 $pt = $post->post_type;
 $title = $post->post_name;
-$ld_types = array('sfwd-courses','sfwd-lessons','sfwd-quiz');
+$ld_types = array('sfwd-courses','sfwd-lessons','sfwd-quiz','sfwd-topic');
 if(in_array($pt, $ld_types)){
     $fw = 'full-width';
 }else {
@@ -22,7 +22,7 @@ get_header(); ?>
                <?php while ( have_posts() ) : the_post(); ?>
 
                        <?php get_template_part( 'content', 'single' ); 
-           
             if(!in_array($pt, $ld_types)){
                 
                 $post_pagination = of_get_option('post_pagination');