PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.10
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.10
4.4.10 4.4.9.1 4.4.9 4.4.8 4.4.7 4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 4.4.0 4.3.9.1 4.3.9 4.3.8 4.3.7 4.1.6.9 4.1.6.9.1 4.1.6.9.2 4.1.6.9.3 4.1.6.9.4 4.1.7 4.1.7.1 4.1.7.2 4.1.7.3 All 142 releases
← All changes | assets/src/apps/js/frontend/single-curriculum/index.js +50 -50 4.3.8 → 4.4.10 View file →
@@ -1,50 +1,50 @@
1 -const $ = jQuery;
2 -import { Component } from '@wordpress/element';
3 -import { searchCourseContent } from './components/search';
4 -import { Sidebar } from './components/sidebar';
5 -import { progressBar } from './components/progress';
6 -import { commentForm } from './components/comment';
7 -import { itemsProgress } from './components/items-progress';
8 -
9 -import './components/compatible';
10 -
11 -class SingleCurriculums extends Component {
12 - checkCourseDurationExpire() {
13 - const elCourseItemIsBlockeds = document.getElementsByName( 'lp-course-timestamp-remaining' );
14 -
15 - if ( elCourseItemIsBlockeds.length ) {
16 - const elCourseItemIsBlocked = elCourseItemIsBlockeds[ 0 ];
17 - const timeDuration = elCourseItemIsBlocked.value; // value is second
18 -
19 - if ( timeDuration < ( 60 * 60 * 24 ) ) { // compare with 1 day
20 - setTimeout(
21 - function() {
22 - window.location.reload( true );
23 - },
24 - timeDuration * 1000
25 - );
26 - }
27 - }
28 - }
29 - render() {
30 - return (
31 - <div></div>
32 - );
33 - }
34 -}
35 -
36 -export default SingleCurriculums;
37 -
38 -document.addEventListener( 'DOMContentLoaded', () => {
39 - LP.Hook.doAction( 'lp-compatible-builder' );
40 -
41 - searchCourseContent();
42 - Sidebar();
43 - progressBar();
44 - //commentForm();
45 - itemsProgress();
46 -
47 - // Check duration expire of course
48 - const singleCurriculums = new SingleCurriculums();
49 - singleCurriculums.checkCourseDurationExpire();
50 -} );
1 +const $ = jQuery;
2 +import { Component } from '@wordpress/element';
3 +import { searchCourseContent } from './components/search';
4 +import { Sidebar } from './components/sidebar';
5 +import { progressBar } from './components/progress';
6 +import { commentForm } from './components/comment';
7 +import { itemsProgress } from './components/items-progress';
8 +
9 +import './components/compatible';
10 +
11 +class SingleCurriculums extends Component {
12 + checkCourseDurationExpire() {
13 + const elCourseItemIsBlockeds = document.getElementsByName( 'lp-course-timestamp-remaining' );
14 +
15 + if ( elCourseItemIsBlockeds.length ) {
16 + const elCourseItemIsBlocked = elCourseItemIsBlockeds[ 0 ];
17 + const timeDuration = elCourseItemIsBlocked.value; // value is second
18 +
19 + if ( timeDuration < ( 60 * 60 * 24 ) ) { // compare with 1 day
20 + setTimeout(
21 + function() {
22 + window.location.reload( true );
23 + },
24 + timeDuration * 1000
25 + );
26 + }
27 + }
28 + }
29 + render() {
30 + return (
31 + <div></div>
32 + );
33 + }
34 +}
35 +
36 +export default SingleCurriculums;
37 +
38 +document.addEventListener( 'DOMContentLoaded', () => {
39 + LP.Hook.doAction( 'lp-compatible-builder' );
40 +
41 + searchCourseContent();
42 + Sidebar();
43 + progressBar();
44 + //commentForm();
45 + itemsProgress();
46 +
47 + // Check duration expire of course
48 + const singleCurriculums = new SingleCurriculums();
49 + singleCurriculums.checkCourseDurationExpire();
50 +} );