PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.1
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.1
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 4.1.7.3.1 4.1.7.3.2 4.2.0 All 139 releases
learnpress / assets / js / dist / admin / pages / themes-addons.js

themes-addons.js in LearnPress – WordPress LMS Plugin for Create and Sell Online Courses 4.4.1, at assets/js/dist/admin/pages/themes-addons.js

158 lines 6.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /******/ (() => { // webpackBootstrap
2 /******/ "use strict";
3 /******/ var __webpack_modules__ = ({
4
5 /***/ "./assets/src/apps/js/admin/pages/addons/search-lp-addons-themes.js"
6 /*!**************************************************************************!*\
7 !*** ./assets/src/apps/js/admin/pages/addons/search-lp-addons-themes.js ***!
8 \**************************************************************************/
9 (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
10
11 __webpack_require__.r(__webpack_exports__);
12 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
13 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
14 /* harmony export */ });
15 (function ($) {
16 let timer = null,
17 $wraps = null,
18 $cloneWraps = null;
19 const onSearch = function (keyword) {
20 if (!$cloneWraps) {
21 $cloneWraps = $wraps.clone();
22 }
23 const keywords = keyword.toLowerCase().split(/\s+/).filter(function (a, b) {
24 return a.length >= 3;
25 });
26 const foundItems = function ($w1, $w2) {
27 return $w1.find('.plugin-card').each(function () {
28 const $item = $(this),
29 itemText = $item.find('.item-title').text().toLowerCase(),
30 itemDesc = $item.find('.column-description, .theme-description').text();
31 const found = function () {
32 const reg = new RegExp(keywords.join('|'), 'ig');
33 return itemText.match(reg) || itemDesc.match(reg);
34 };
35 if (keywords.length) {
36 if (found()) {
37 const $clone = $item.clone();
38 $w2.append($clone);
39 }
40 } else {
41 $w2.append($item.clone());
42 }
43 });
44 };
45 $wraps.each(function (i) {
46 const $this = $(this).html(''),
47 $items = foundItems($cloneWraps.eq(i), $this),
48 count = $this.children().length;
49 $this.prev('h2').find('span').html(count);
50 });
51 };
52 $(document).on('keyup', '.lp-search-addon', function (e) {
53 timer && clearTimeout(timer);
54 timer = setTimeout(onSearch, 300, e.target.value);
55 });
56 $(function () {
57 $wraps = $('.addons-browse');
58 });
59 })(jQuery);
60 const searchThemesAddons = () => {};
61 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (searchThemesAddons);
62
63 /***/ }
64
65 /******/ });
66 /************************************************************************/
67 /******/ // The module cache
68 /******/ const __webpack_module_cache__ = {};
69 /******/
70 /******/ // The require function
71 /******/ function __webpack_require__(moduleId) {
72 /******/ // Check if module is in cache
73 /******/ const cachedModule = __webpack_module_cache__[moduleId];
74 /******/ if (cachedModule !== undefined) {
75 /******/ return cachedModule.exports;
76 /******/ }
77 /******/ // Create a new module (and put it into the cache)
78 /******/ const module = __webpack_module_cache__[moduleId] = {
79 /******/ // no module.id needed
80 /******/ // no module.loaded needed
81 /******/ exports: {}
82 /******/ };
83 /******/
84 /******/ // Execute the module function
85 /******/ if (!(moduleId in __webpack_modules__)) {
86 /******/ delete __webpack_module_cache__[moduleId];
87 /******/ const e = new Error("Cannot find module '" + moduleId + "'");
88 /******/ e.code = 'MODULE_NOT_FOUND';
89 /******/ throw e;
90 /******/ }
91 /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
92 /******/
93 /******/ // Return the exports of the module
94 /******/ return module.exports;
95 /******/ }
96 /******/
97 /************************************************************************/
98 /******/ /* webpack/runtime/define property getters */
99 /******/ (() => {
100 /******/ // define getter/value functions for harmony exports
101 /******/ __webpack_require__.d = (exports, definition) => {
102 /******/ if(Array.isArray(definition)) {
103 /******/ var i = 0;
104 /******/ while(i < definition.length) {
105 /******/ var key = definition[i++];
106 /******/ var binding = definition[i++];
107 /******/ if(!__webpack_require__.o(exports, key)) {
108 /******/ if(binding === 0) {
109 /******/ Object.defineProperty(exports, key, { enumerable: true, value: definition[i++] });
110 /******/ } else {
111 /******/ Object.defineProperty(exports, key, { enumerable: true, get: binding });
112 /******/ }
113 /******/ } else if(binding === 0) { i++; }
114 /******/ }
115 /******/ } else {
116 /******/ for(var key in definition) {
117 /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
118 /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
119 /******/ }
120 /******/ }
121 /******/ }
122 /******/ };
123 /******/ })();
124 /******/
125 /******/ /* webpack/runtime/hasOwnProperty shorthand */
126 /******/ (() => {
127 /******/ __webpack_require__.o = (obj, prop) => (Object.hasOwn(obj, prop))
128 /******/ })();
129 /******/
130 /******/ /* webpack/runtime/make namespace object */
131 /******/ (() => {
132 /******/ // define __esModule on exports
133 /******/ __webpack_require__.r = (exports) => {
134 /******/ if(Symbol.toStringTag) {
135 /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
136 /******/ }
137 /******/ Object.defineProperty(exports, '__esModule', { value: true });
138 /******/ };
139 /******/ })();
140 /******/
141 /************************************************************************/
142 let __webpack_exports__ = {};
143 // This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk.
144 (() => {
145 /*!*********************************************************!*\
146 !*** ./assets/src/apps/js/admin/pages/themes-addons.js ***!
147 \*********************************************************/
148 __webpack_require__.r(__webpack_exports__);
149 /* harmony import */ var _addons_search_lp_addons_themes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./addons/search-lp-addons-themes */ "./assets/src/apps/js/admin/pages/addons/search-lp-addons-themes.js");
150
151 document.addEventListener('DOMContentLoaded', function (event) {
152 (0,_addons_search_lp_addons_themes__WEBPACK_IMPORTED_MODULE_0__["default"])();
153 });
154 })();
155
156 /******/ })()
157 ;
158 //# sourceMappingURL=themes-addons.js.map