PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.2
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.2
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.2, at assets/js/dist/admin/pages/themes-addons.js

143 lines 5.5 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 /******/ var __webpack_module_cache__ = {};
69 /******/
70 /******/ // The require function
71 /******/ function __webpack_require__(moduleId) {
72 /******/ // Check if module is in cache
73 /******/ var 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 /******/ var 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 /******/ var 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 functions for harmony exports
101 /******/ __webpack_require__.d = (exports, definition) => {
102 /******/ for(var key in definition) {
103 /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
104 /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
105 /******/ }
106 /******/ }
107 /******/ };
108 /******/ })();
109 /******/
110 /******/ /* webpack/runtime/hasOwnProperty shorthand */
111 /******/ (() => {
112 /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
113 /******/ })();
114 /******/
115 /******/ /* webpack/runtime/make namespace object */
116 /******/ (() => {
117 /******/ // define __esModule on exports
118 /******/ __webpack_require__.r = (exports) => {
119 /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
120 /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
121 /******/ }
122 /******/ Object.defineProperty(exports, '__esModule', { value: true });
123 /******/ };
124 /******/ })();
125 /******/
126 /************************************************************************/
127 var __webpack_exports__ = {};
128 // This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk.
129 (() => {
130 /*!*********************************************************!*\
131 !*** ./assets/src/apps/js/admin/pages/themes-addons.js ***!
132 \*********************************************************/
133 __webpack_require__.r(__webpack_exports__);
134 /* 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");
135
136 document.addEventListener('DOMContentLoaded', function (event) {
137 (0,_addons_search_lp_addons_themes__WEBPACK_IMPORTED_MODULE_0__["default"])();
138 });
139 })();
140
141 /******/ })()
142 ;
143 //# sourceMappingURL=themes-addons.js.map