| @@ -1,4 +1,4 @@ | ||
| 1 | 1 | /******/ (() => { // webpackBootstrap |
| 2 | 2 | /******/ "use strict"; |
| 3 | 3 | /******/ var __webpack_modules__ = ({ |
| 4 | 4 | |
| @@ -50,23 +50,22 @@ | ||
| 50 | 50 | } |
| 51 | 51 | }, 1); |
| 52 | 52 | |
| 53 | 53 | // For case multiple ul list instructors on a page. |
| 54 | - /*document.addEventListener( 'DOMContentLoaded', function( event ) { | |
| 55 | - const elListInstructors = document.querySelectorAll( '.lp-list-instructors:not(.detected)' ); | |
| 56 | - if ( elListInstructors.length > 0 ) { | |
| 57 | - elListInstructors.forEach( function( el ) { | |
| 58 | - const elUlListInstructors = el.querySelector( '.ul-list-instructors' ); | |
| 59 | - query = { paged: 1 }; | |
| 60 | - getInstructors( query, true, function( res ) { | |
| 61 | - elUlListInstructors.innerHTML = res.data.content; | |
| 62 | - | |
| 63 | - if ( res.data.pagination !== undefined ) { | |
| 64 | - el.insertAdjacentHTML( 'beforeend', res.data.pagination ); | |
| 65 | - } | |
| 66 | - } ); | |
| 67 | - } ); | |
| 68 | - } | |
| 54 | + /*document.addEventListener( 'DOMContentLoaded', function( event ) { | |
| 55 | + const elListInstructors = document.querySelectorAll( '.lp-list-instructors:not(.detected)' ); | |
| 56 | + if ( elListInstructors.length > 0 ) { | |
| 57 | + elListInstructors.forEach( function( el ) { | |
| 58 | + const elUlListInstructors = el.querySelector( '.ul-list-instructors' ); | |
| 59 | + query = { paged: 1 }; | |
| 60 | + getInstructors( query, true, function( res ) { | |
| 61 | + elUlListInstructors.innerHTML = res.data.content; | |
| 62 | + if ( res.data.pagination !== undefined ) { | |
| 63 | + el.insertAdjacentHTML( 'beforeend', res.data.pagination ); | |
| 64 | + } | |
| 65 | + } ); | |
| 66 | + } ); | |
| 67 | + } | |
| 69 | 68 | } );*/ |
| 70 | 69 | |
| 71 | 70 | pagination(); |
| 72 | 71 | } |
| @@ -156,16 +155,16 @@ | ||
| 156 | 155 | /* harmony export */ lpSetLoadingEl: () => (/* binding */ lpSetLoadingEl), |
| 157 | 156 | /* harmony export */ lpShowHideEl: () => (/* binding */ lpShowHideEl), |
| 158 | 157 | /* harmony export */ toggleCollapse: () => (/* binding */ toggleCollapse) |
| 159 | 158 | /* harmony export */ }); |
| 160 | -/** | |
| 161 | - * Utils functions | |
| 162 | - * | |
| 163 | - * @param url | |
| 164 | - * @param data | |
| 165 | - * @param functions | |
| 166 | - * @since 4.2.5.1 | |
| 167 | - * @version 1.0.3 | |
| 159 | +/** | |
| 160 | + * Utils functions | |
| 161 | + * | |
| 162 | + * @param url | |
| 163 | + * @param data | |
| 164 | + * @param functions | |
| 165 | + * @since 4.2.5.1 | |
| 166 | + * @version 1.0.3 | |
| 168 | 167 | */ |
| 169 | 168 | const lpClassName = { |
| 170 | 169 | hidden: 'lp-hidden', |
| 171 | 170 | loading: 'loading', |
| @@ -194,12 +193,12 @@ | ||
| 194 | 193 | } |
| 195 | 194 | }); |
| 196 | 195 | }; |
| 197 | 196 | |
| 198 | -/** | |
| 199 | - * Get current URL without params. | |
| 200 | - * | |
| 201 | - * @since 4.2.5.1 | |
| 197 | +/** | |
| 198 | + * Get current URL without params. | |
| 199 | + * | |
| 200 | + * @since 4.2.5.1 | |
| 202 | 201 | */ |
| 203 | 202 | const lpGetCurrentURLNoParam = () => { |
| 204 | 203 | let currentUrl = window.location.href; |
| 205 | 204 | const hasParams = currentUrl.includes('?'); |
| @@ -215,14 +214,14 @@ | ||
| 215 | 214 | }); |
| 216 | 215 | return url; |
| 217 | 216 | }; |
| 218 | 217 | |
| 219 | -/** | |
| 220 | - * Listen element viewed. | |
| 221 | - * | |
| 222 | - * @param el | |
| 223 | - * @param callback | |
| 224 | - * @since 4.2.5.8 | |
| 218 | +/** | |
| 219 | + * Listen element viewed. | |
| 220 | + * | |
| 221 | + * @param el | |
| 222 | + * @param callback | |
| 223 | + * @since 4.2.5.8 | |
| 225 | 224 | */ |
| 226 | 225 | const listenElementViewed = (el, callback) => { |
| 227 | 226 | const observerSeeItem = new IntersectionObserver(function (entries) { |
| 228 | 227 | for (const entry of entries) { |
| @@ -233,13 +232,13 @@ | ||
| 233 | 232 | }); |
| 234 | 233 | observerSeeItem.observe(el); |
| 235 | 234 | }; |
| 236 | 235 | |
| 237 | -/** | |
| 238 | - * Listen element created. | |
| 239 | - * | |
| 240 | - * @param callback | |
| 241 | - * @since 4.2.5.8 | |
| 236 | +/** | |
| 237 | + * Listen element created. | |
| 238 | + * | |
| 239 | + * @param callback | |
| 240 | + * @since 4.2.5.8 | |
| 242 | 241 | */ |
| 243 | 242 | const listenElementCreated = callback => { |
| 244 | 243 | const observerCreateItem = new MutationObserver(function (mutations) { |
| 245 | 244 | mutations.forEach(function (mutation) { |
| @@ -258,14 +257,14 @@ | ||
| 258 | 257 | }); |
| 259 | 258 | // End. |
| 260 | 259 | }; |
| 261 | 260 | |
| 262 | -/** | |
| 263 | - * Listen element created. | |
| 264 | - * | |
| 265 | - * @param selector | |
| 266 | - * @param callback | |
| 267 | - * @since 4.2.7.1 | |
| 261 | +/** | |
| 262 | + * Listen element created. | |
| 263 | + * | |
| 264 | + * @param selector | |
| 265 | + * @param callback | |
| 266 | + * @since 4.2.7.1 | |
| 268 | 267 | */ |
| 269 | 268 | const lpOnElementReady = (selector, callback) => { |
| 270 | 269 | const element = document.querySelector(selector); |
| 271 | 270 | if (element) { |