Skip to content

Commit 52938dc

Browse files
committed
merge branch single_course_model
2 parents c0be6ec + 262cf0c commit 52938dc

File tree

126 files changed

+8377
-2906
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+8377
-2906
lines changed

assets/dist/css/instructor.css

Lines changed: 662 additions & 0 deletions
Large diffs are not rendered by default.

assets/dist/css/instructors.css

Lines changed: 295 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,295 @@
1+
/**
2+
* Style for instructor page
3+
*/
4+
:root {
5+
--lp-cotainer-max-with: var(--lp-container-max-width);
6+
}
7+
8+
.wp-block-group {
9+
--lp-container-max-width: var(--wp--style--global--wide-size);
10+
}
11+
12+
/**
13+
* Styles for all page of LP
14+
*
15+
* @since 4.2.3
16+
* @version 1.0.0
17+
*/
18+
/**
19+
* Mixin
20+
*/
21+
@-webkit-keyframes rotating4 {
22+
from {
23+
-webkit-transform: rotate(0deg);
24+
-o-transform: rotate(0deg);
25+
transform: rotate(0deg);
26+
}
27+
to {
28+
-webkit-transform: rotate(360deg);
29+
-o-transform: rotate(360deg);
30+
transform: rotate(360deg);
31+
}
32+
}
33+
@keyframes rotating4 {
34+
from {
35+
-ms-transform: rotate(0deg);
36+
-moz-transform: rotate(0deg);
37+
-webkit-transform: rotate(0deg);
38+
-o-transform: rotate(0deg);
39+
transform: rotate(0deg);
40+
}
41+
to {
42+
-ms-transform: rotate(360deg);
43+
-moz-transform: rotate(360deg);
44+
-webkit-transform: rotate(360deg);
45+
-o-transform: rotate(360deg);
46+
transform: rotate(360deg);
47+
}
48+
}
49+
@-webkit-keyframes animation4 {
50+
from {
51+
left: -40%;
52+
width: 40%;
53+
}
54+
to {
55+
left: 100%;
56+
width: 10%;
57+
}
58+
}
59+
@keyframes animation4 {
60+
from {
61+
left: -40%;
62+
width: 40%;
63+
}
64+
to {
65+
left: 100%;
66+
width: 10%;
67+
}
68+
}
69+
/**
70+
* Style for instructor page
71+
*/
72+
* {
73+
box-sizing: border-box;
74+
margin: 0;
75+
padding: 0;
76+
}
77+
78+
/* start reset css */
79+
body {
80+
background: #fff;
81+
}
82+
body.learnpress-page {
83+
overflow-x: hidden;
84+
}
85+
86+
button {
87+
cursor: pointer;
88+
}
89+
90+
input, button, select, textarea {
91+
outline: none;
92+
}
93+
94+
/*html {
95+
overflow-x: hidden;
96+
}*/
97+
a {
98+
-webkit-transition: 0.3s;
99+
-moz-transition: 0.3s;
100+
-ms-transition: 0.3s;
101+
-o-transition: 0.3s;
102+
transition: 0.3s;
103+
text-decoration: none;
104+
}
105+
106+
p {
107+
margin-bottom: 1em;
108+
}
109+
p:last-child {
110+
margin: 0;
111+
}
112+
113+
.lp-content-area {
114+
max-width: var(--lp-container-max-width) !important;
115+
margin: 0 auto;
116+
padding-right: var(--lp-cotainer-padding);
117+
padding-left: var(--lp-cotainer-padding);
118+
}
119+
.lp-content-area.learn-press-message {
120+
margin-bottom: 24px;
121+
padding-left: 15px;
122+
padding-right: 15px;
123+
}
124+
125+
.lp-ico svg {
126+
width: 20px;
127+
height: 20px;
128+
}
129+
130+
.lp-button {
131+
border: 1px solid var(--lp-border-color, #E2E0DB);
132+
border-radius: var(--lp-border-radius, 5px);
133+
padding: 8px 16px;
134+
}
135+
.lp-button.loading {
136+
pointer-events: none;
137+
opacity: 0.8;
138+
}
139+
.lp-button.loading:before {
140+
display: inline-block;
141+
font-family: "lp-icon";
142+
content: "\f110";
143+
animation: lp-rotating 1s linear infinite;
144+
margin-right: 5px;
145+
font-variant: normal;
146+
text-transform: none;
147+
line-height: 1;
148+
-webkit-font-smoothing: antialiased;
149+
-moz-osx-font-smoothing: grayscale;
150+
vertical-align: middle;
151+
margin-top: -2px;
152+
}
153+
154+
.lp-hidden {
155+
display: none !important;
156+
}
157+
158+
/**
159+
* Style for instructor page
160+
*/
161+
/**
162+
* Styles for all page of LP
163+
*
164+
* @since 4.2.3
165+
* @version 1.0.0
166+
*/
167+
/**
168+
* Instructors page.
169+
*
170+
* @since 4.2.3
171+
* @version 1.0.0
172+
*/
173+
body .entry-content.has-global-padding {
174+
padding-left: 0;
175+
padding-right: 0;
176+
}
177+
body .wp-site-blocks {
178+
padding-left: 0;
179+
padding-right: 0;
180+
}
181+
182+
.learnpress-v4 .lp-content-area {
183+
--lp-container-max-width: inherit;
184+
--lp-cotainer-padding: 0;
185+
}
186+
.learnpress-v4 .lp-single-course .lp-content-area {
187+
padding-right: 15px;
188+
padding-left: 15px;
189+
}
190+
191+
.lp-list-instructors {
192+
--lp-instructor-item-padding: 20px;
193+
--lp-instructor-border-color: #c3c4c7;
194+
--lp-instructor-minmax-column: 250px;
195+
}
196+
.lp-list-instructors .ul-list-instructors {
197+
display: grid;
198+
grid-template-columns: repeat(auto-fill, minmax(var(--lp-instructor-minmax-column), 1fr));
199+
gap: 30px;
200+
padding: 0 !important;
201+
margin: 0 0 30px 0;
202+
list-style: none;
203+
}
204+
.lp-list-instructors .ul-list-instructors > ul.lp-skeleton-animation {
205+
grid-column: span 4;
206+
}
207+
.lp-list-instructors .ul-list-instructors li.no-instructor {
208+
grid-column: span 4;
209+
}
210+
.lp-list-instructors .ul-list-instructors li.item-instructor {
211+
border: 1px solid var(--lp-instructor-border-color);
212+
padding: var(--lp-instructor-item-padding);
213+
list-style: none;
214+
border-radius: var(--lp-border-radius, 5px);
215+
}
216+
.lp-list-instructors .ul-list-instructors li.item-instructor .instructor-avatar {
217+
margin-bottom: 12px;
218+
}
219+
.lp-list-instructors .ul-list-instructors li.item-instructor .instructor-display-name {
220+
display: block;
221+
margin-bottom: 12px;
222+
font-size: 1.2em;
223+
line-height: 1.3;
224+
font-weight: bold;
225+
}
226+
.lp-list-instructors .ul-list-instructors li.item-instructor .instructor-avatar img {
227+
width: 100%;
228+
border-radius: var(--lp-border-radius, 5px);
229+
}
230+
.lp-list-instructors .ul-list-instructors li.item-instructor .instructor-info {
231+
display: flex;
232+
column-gap: 16px;
233+
margin-bottom: 12px;
234+
flex-wrap: wrap;
235+
row-gap: 8px;
236+
}
237+
.lp-list-instructors .ul-list-instructors li.item-instructor .instructor-info > div {
238+
display: flex;
239+
align-items: center;
240+
column-gap: 10px;
241+
}
242+
.lp-list-instructors .ul-list-instructors li.item-instructor .instructor-info > div span {
243+
display: inline-flex;
244+
white-space: nowrap;
245+
}
246+
.lp-list-instructors .ul-list-instructors li.item-instructor .instructor-info > div .lp-ico {
247+
color: var(--lp-primary-color);
248+
}
249+
.lp-list-instructors .ul-list-instructors li.item-instructor .instructor-btn-view {
250+
padding: 8px 24px;
251+
border-radius: var(--lp-border-radius, 5px);
252+
color: var(--lp-color-base, #333);
253+
border: 1px solid var(--lp-color-base, #333);
254+
transition: all 0.3s;
255+
display: block;
256+
background: transparent;
257+
text-decoration: none;
258+
text-align: center;
259+
}
260+
.lp-list-instructors .ul-list-instructors li.item-instructor .instructor-btn-view:hover {
261+
background: var(--lp-primary-color);
262+
color: var(--lp-color-white, #fff);
263+
border-color: var(--lp-primary-color);
264+
}
265+
266+
.learn-press-pagination {
267+
margin: 20px 0;
268+
text-align: center;
269+
}
270+
.learn-press-pagination .page-numbers {
271+
display: inline-block;
272+
margin: 0;
273+
padding: 0;
274+
border: 0;
275+
outline: 0;
276+
background: transparent;
277+
list-style: none;
278+
}
279+
.learn-press-pagination .page-numbers > li {
280+
display: inline-block;
281+
margin: 0;
282+
}
283+
.learn-press-pagination .page-numbers > li .page-numbers {
284+
float: unset;
285+
padding: 0 12px;
286+
color: #666;
287+
text-decoration: none;
288+
}
289+
.learn-press-pagination .page-numbers > li .page-numbers.current {
290+
color: var(--lp-primary-color);
291+
font-weight: 400;
292+
}
293+
.learn-press-pagination .page-numbers > li .page-numbers:hover {
294+
color: var(--lp-primary-color);
295+
}

assets/src/apps/js/admin/pages/tools.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import resetData from './tools/reset-data';
2727
isRunning = true;
2828

2929
$.ajax( {
30+
method: 'POST',
3031
url: $button.attr( 'href' ),
3132
data: $( '.lp-install-sample__options' ).serializeJSON(),
3233
success( response ) {

assets/src/apps/js/frontend/material.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,12 @@ export default function lpMaterialsLoad() {
1717
const getResponse = async ( ele, page = 1 ) => {
1818
const course_id = parseInt( ele.dataset.courseId ),
1919
item_id = parseInt( ele.dataset.itemId );
20+
const elListMaterial = ele.closest( '.lp-list-material' );
2021
const elementMaterial = ele.querySelector( '.course-material-table' );
2122
const loadMoreBtn = document.querySelector( '.lp-loadmore-material' );
2223
const elListItems = document.querySelector( '.lp-list-material' );
24+
const elSkeleton = ele.querySelector( '.lp-skeleton-animation' );
25+
2326
try {
2427
const response = await apiFetch( {
2528
path: `lp/v1/material/by-item`,
@@ -32,15 +35,16 @@ export default function lpMaterialsLoad() {
3235
} );
3336
const { data, status, message } = response;
3437

38+
if ( elSkeleton ) {
39+
elSkeleton.remove();
40+
}
41+
3542
if ( status !== 'success' ) {
36-
return console.log( message );
43+
elListMaterial.insertAdjacentHTML( 'beforeend', message );
44+
return;
3745
}
3846

3947
if ( data.items && data.items.length > 0 ) {
40-
if ( ele.querySelector( '.lp-skeleton-animation' ) ) {
41-
ele.querySelector( '.lp-skeleton-animation' ).remove();
42-
}
43-
4448
elementMaterial.style.display = 'table';
4549
elementMaterial.querySelector( 'tbody' ).insertAdjacentHTML( 'beforeend', data.items );
4650
} else {

assets/src/apps/js/frontend/quiz/components/content/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Quizz Content.
2+
* Quiz Content.
33
* Edit: Use React hook.
44
*
55
* @author nhamdv - ThimPress

assets/src/apps/js/frontend/single-course.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import TabsDragScroll from './tabs-scroll';
88
import { lpSetLoadingEl } from '../../../js/utils.js';
99
import Toastify from 'toastify-js';
1010
import 'toastify-js/src/toastify.css';
11+
import LPCopyToClipboard from '../../../js/frontend/copy-to-clipboard.js';
1112

1213
export default SingleCourse;
1314

@@ -412,6 +413,7 @@ document.addEventListener( 'DOMContentLoaded', function() {
412413
lpMaterialsLoad();
413414
//courseCurriculumSkeleton();
414415
TabsDragScroll();
416+
LPCopyToClipboard();
415417
} );
416418

417419
const detectedElCurriculum = setInterval( function() {

assets/src/js/frontend/checkout.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ window.lpCheckout = {
8181
const callBack = {
8282
success: ( response ) => {
8383
response = lpAjaxParseJsonOld( response );
84-
const { messages, result } = response;
84+
const { message, result } = response;
8585
if ( 'success' !== result ) {
86-
window.lpCheckout.showErrors( formCheckout, 'error', messages );
86+
window.lpCheckout.showErrors( formCheckout, 'error', message );
8787
} else {
8888
window.location.href = response.redirect;
8989
}

0 commit comments

Comments
 (0)