Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

289 lines
28KB

  1. (self["webpackChunk"] = self["webpackChunk"] || []).push([["adminlte-main"],{
  2. /***/ "../LaClicBundle/SovBundle/Resources/assets/app/adminlte/main/app.main.js":
  3. /*!********************************************************************************!*\
  4. !*** ../LaClicBundle/SovBundle/Resources/assets/app/adminlte/main/app.main.js ***!
  5. \********************************************************************************/
  6. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  7. "use strict";
  8. __webpack_require__.r(__webpack_exports__);
  9. /* harmony import */ var _init_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./init.js */ "../LaClicBundle/SovBundle/Resources/assets/app/adminlte/main/init.js");
  10. /* harmony import */ var _init_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_init_js__WEBPACK_IMPORTED_MODULE_0__);
  11. /* harmony import */ var _common_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./common.scss */ "../LaClicBundle/SovBundle/Resources/assets/app/adminlte/main/common.scss");
  12. /***/ }),
  13. /***/ "../LaClicBundle/SovBundle/Resources/assets/app/adminlte/main/init.js":
  14. /*!****************************************************************************!*\
  15. !*** ../LaClicBundle/SovBundle/Resources/assets/app/adminlte/main/init.js ***!
  16. \****************************************************************************/
  17. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  18. __webpack_require__(/*! core-js/modules/es.regexp.exec.js */ "./node_modules/core-js/modules/es.regexp.exec.js");
  19. __webpack_require__(/*! core-js/modules/es.string.replace.js */ "./node_modules/core-js/modules/es.string.replace.js");
  20. window.addEventListener('load', function (event) {
  21. SovNotification.init();
  22. SovWidgets.setDateRange();
  23. $('.btn-confirm-js, .action-confirm').click(function () {
  24. return confirm('Êtes-vous sûr de vouloir réaliser cette action ?');
  25. });
  26. /* Tooltip */
  27. $('[data-toggle="tooltip"]').tooltip();
  28. /* Select2 */
  29. if ($('.form-select, .select2, select.form-control').length) {
  30. $('form .form-widget>select.form-control, .select2, .form-select').each(function (i, elm) {
  31. if (!$(this).hasClass('disable-select2')) {
  32. SovWidgets.setSelect2($(elm));
  33. }
  34. });
  35. $('form select.form-control').each(function (i, elm) {
  36. if (!$(this).hasClass('disable-select2')) {
  37. SovWidgets.setSelect2($(elm));
  38. }
  39. });
  40. }
  41. $('.action-delete').on('click', function (e) {
  42. e.preventDefault();
  43. var formAction = $(this).attr('formaction');
  44. $('#modal-delete').modal({
  45. backdrop: true,
  46. keyboard: true
  47. }).off('click', '#modal-delete-button').on('click', '#modal-delete-button', function () {
  48. var deleteForm = $('#delete-form');
  49. deleteForm.attr('action', formAction);
  50. deleteForm.submit();
  51. });
  52. });
  53. var elements = $('.lc-ckeditor');
  54. if (elements.length) {
  55. for (var i = 0; i < elements.length; ++i) {
  56. if ($(elements[i]).data('config') === 'simple_config') {
  57. CKEDITOR.replace(elements[i], {
  58. "toolbar": [{
  59. items: ['Bold', 'Italic', 'Underline', 'Strike']
  60. }, {
  61. items: ["TextColor"]
  62. }],
  63. "language": "fr",
  64. 'height': 100
  65. });
  66. } else {
  67. CKEDITOR.replace(elements[i], {
  68. "toolbar": [{
  69. name: "styles",
  70. items: ["Format", 'Bold', 'Italic', 'Underline', 'Strike', "Link", "BulletedList"]
  71. }, {
  72. items: ["TextColor"]
  73. }, {
  74. name: 'paragraph',
  75. items: ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock']
  76. }, {
  77. name: 'insert',
  78. items: ['Image', 'SpecialChar']
  79. }, {
  80. name: "document",
  81. items: ["Source"]
  82. }],
  83. "language": "fr"
  84. });
  85. }
  86. }
  87. }
  88. SovWidgets.setAutoCompleteField();
  89. });
  90. /***/ }),
  91. /***/ "./node_modules/core-js/internals/get-substitution.js":
  92. /*!************************************************************!*\
  93. !*** ./node_modules/core-js/internals/get-substitution.js ***!
  94. \************************************************************/
  95. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  96. var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");
  97. var floor = Math.floor;
  98. var replace = ''.replace;
  99. var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
  100. var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
  101. // `GetSubstitution` abstract operation
  102. // https://tc39.es/ecma262/#sec-getsubstitution
  103. module.exports = function (matched, str, position, captures, namedCaptures, replacement) {
  104. var tailPos = position + matched.length;
  105. var m = captures.length;
  106. var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
  107. if (namedCaptures !== undefined) {
  108. namedCaptures = toObject(namedCaptures);
  109. symbols = SUBSTITUTION_SYMBOLS;
  110. }
  111. return replace.call(replacement, symbols, function (match, ch) {
  112. var capture;
  113. switch (ch.charAt(0)) {
  114. case '$': return '$';
  115. case '&': return matched;
  116. case '`': return str.slice(0, position);
  117. case "'": return str.slice(tailPos);
  118. case '<':
  119. capture = namedCaptures[ch.slice(1, -1)];
  120. break;
  121. default: // \d\d?
  122. var n = +ch;
  123. if (n === 0) return match;
  124. if (n > m) {
  125. var f = floor(n / 10);
  126. if (f === 0) return match;
  127. if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
  128. return match;
  129. }
  130. capture = captures[n - 1];
  131. }
  132. return capture === undefined ? '' : capture;
  133. });
  134. };
  135. /***/ }),
  136. /***/ "./node_modules/core-js/modules/es.string.replace.js":
  137. /*!***********************************************************!*\
  138. !*** ./node_modules/core-js/modules/es.string.replace.js ***!
  139. \***********************************************************/
  140. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  141. "use strict";
  142. var fixRegExpWellKnownSymbolLogic = __webpack_require__(/*! ../internals/fix-regexp-well-known-symbol-logic */ "./node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js");
  143. var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
  144. var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
  145. var toInteger = __webpack_require__(/*! ../internals/to-integer */ "./node_modules/core-js/internals/to-integer.js");
  146. var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "./node_modules/core-js/internals/require-object-coercible.js");
  147. var advanceStringIndex = __webpack_require__(/*! ../internals/advance-string-index */ "./node_modules/core-js/internals/advance-string-index.js");
  148. var getSubstitution = __webpack_require__(/*! ../internals/get-substitution */ "./node_modules/core-js/internals/get-substitution.js");
  149. var regExpExec = __webpack_require__(/*! ../internals/regexp-exec-abstract */ "./node_modules/core-js/internals/regexp-exec-abstract.js");
  150. var max = Math.max;
  151. var min = Math.min;
  152. var maybeToString = function (it) {
  153. return it === undefined ? it : String(it);
  154. };
  155. // @@replace logic
  156. fixRegExpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative, reason) {
  157. var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = reason.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE;
  158. var REPLACE_KEEPS_$0 = reason.REPLACE_KEEPS_$0;
  159. var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
  160. return [
  161. // `String.prototype.replace` method
  162. // https://tc39.es/ecma262/#sec-string.prototype.replace
  163. function replace(searchValue, replaceValue) {
  164. var O = requireObjectCoercible(this);
  165. var replacer = searchValue == undefined ? undefined : searchValue[REPLACE];
  166. return replacer !== undefined
  167. ? replacer.call(searchValue, O, replaceValue)
  168. : nativeReplace.call(String(O), searchValue, replaceValue);
  169. },
  170. // `RegExp.prototype[@@replace]` method
  171. // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
  172. function (regexp, replaceValue) {
  173. if (
  174. (!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE && REPLACE_KEEPS_$0) ||
  175. (typeof replaceValue === 'string' && replaceValue.indexOf(UNSAFE_SUBSTITUTE) === -1)
  176. ) {
  177. var res = maybeCallNative(nativeReplace, regexp, this, replaceValue);
  178. if (res.done) return res.value;
  179. }
  180. var rx = anObject(regexp);
  181. var S = String(this);
  182. var functionalReplace = typeof replaceValue === 'function';
  183. if (!functionalReplace) replaceValue = String(replaceValue);
  184. var global = rx.global;
  185. if (global) {
  186. var fullUnicode = rx.unicode;
  187. rx.lastIndex = 0;
  188. }
  189. var results = [];
  190. while (true) {
  191. var result = regExpExec(rx, S);
  192. if (result === null) break;
  193. results.push(result);
  194. if (!global) break;
  195. var matchStr = String(result[0]);
  196. if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
  197. }
  198. var accumulatedResult = '';
  199. var nextSourcePosition = 0;
  200. for (var i = 0; i < results.length; i++) {
  201. result = results[i];
  202. var matched = String(result[0]);
  203. var position = max(min(toInteger(result.index), S.length), 0);
  204. var captures = [];
  205. // NOTE: This is equivalent to
  206. // captures = result.slice(1).map(maybeToString)
  207. // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
  208. // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
  209. // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
  210. for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));
  211. var namedCaptures = result.groups;
  212. if (functionalReplace) {
  213. var replacerArgs = [matched].concat(captures, position, S);
  214. if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);
  215. var replacement = String(replaceValue.apply(undefined, replacerArgs));
  216. } else {
  217. replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
  218. }
  219. if (position >= nextSourcePosition) {
  220. accumulatedResult += S.slice(nextSourcePosition, position) + replacement;
  221. nextSourcePosition = position + matched.length;
  222. }
  223. }
  224. return accumulatedResult + S.slice(nextSourcePosition);
  225. }
  226. ];
  227. });
  228. /***/ }),
  229. /***/ "../LaClicBundle/SovBundle/Resources/assets/app/adminlte/main/common.scss":
  230. /*!********************************************************************************!*\
  231. !*** ../LaClicBundle/SovBundle/Resources/assets/app/adminlte/main/common.scss ***!
  232. \********************************************************************************/
  233. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  234. "use strict";
  235. __webpack_require__.r(__webpack_exports__);
  236. // extracted by mini-css-extract-plugin
  237. /***/ })
  238. },
  239. /******/ __webpack_require__ => { // webpackRuntimeModules
  240. /******/ "use strict";
  241. /******/
  242. /******/ var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
  243. /******/ __webpack_require__.O(0, ["vendors-node_modules_core-js_internals_export_js","vendors-node_modules_core-js_internals_advance-string-index_js-node_modules_core-js_internals-bed4a0"], () => (__webpack_exec__("../LaClicBundle/SovBundle/Resources/assets/app/adminlte/main/app.main.js")));
  244. /******/ var __webpack_exports__ = __webpack_require__.O();
  245. /******/ }
  246. ]);
  247. //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi4vTGFDbGljQnVuZGxlL1NvdkJ1bmRsZS9SZXNvdXJjZXMvYXNzZXRzL2FwcC9hZG1pbmx0ZS9tYWluL2FwcC5tYWluLmpzIiwid2VicGFjazovLy8uLi9MYUNsaWNCdW5kbGUvU292QnVuZGxlL1Jlc291cmNlcy9hc3NldHMvYXBwL2FkbWlubHRlL21haW4vaW5pdC5qcyIsIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvZ2V0LXN1YnN0aXR1dGlvbi5qcyIsIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzLnN0cmluZy5yZXBsYWNlLmpzIiwid2VicGFjazovLy8uLi9MYUNsaWNCdW5kbGUvU292QnVuZGxlL1Jlc291cmNlcy9hc3NldHMvYXBwL2FkbWlub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aycsIGZ1bmN0aW9uIChlKSB7XG4gICAgICAgIGUucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgY29uc3QgZm9ybUFjdGlvbiA9ICQodGhpcykuYXR0cignZm9ybWFjdGlvbicpO1xuXG4gICAgICAgICQoJyNtb2RhbC1kZWxldGUnKS5tb2RhbCh7YmFja2Ryb3A6IHRydWUsIGtleWJvYXJkOiB0cnVlfSlcbiAgICAgICAgICAgIC5vZmYoJ2NsaWNrJywgJyNtb2RhbC1kZWxldGUtYnV0dG9uJylcbiAgICAgICAgICAgIC5vbignY2xpY2snLCAnI21vZGFsLWRlbGV0ZS1idXR0b24nLCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgbGV0IGRlbGV0ZUZvcm0gPSAkKCcjZGVsZXRlLWZvcm0nKTtcbiAgICAgICAgICAgICAgICBkZWxldGVGb3JtLmF0dHIoJ2FjdGlvbicsIGZvcm1BY3Rpb24pO1xuICAgICAgICAgICAgICAgIGRlbGV0ZUZvcm0uc3VibWl0KCk7XG4gICAgICAgICAgICB9KTtcbiAgICB9KTtcblxuXG4gICAgdmFyIGVsZW1lbnRzID0gJCgnLmxjLWNrZWRpdG9yJyk7XG5cbiAgICBpZiAoZWxlbWVudHMubGVuZ3RoKSB7XG4gICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgZWxlbWVudHMubGVuZ3RoOyArK2kpIHtcbiAgICAgICAgICAgIGlmICgkKGVsZW1lbnRzW2ldKS5kYXRhKCdjb25maWcnKSA9PT0gJ3NpbXBsZV9jb25maWcnKSB7XG4gICAgICAgICAgICAgICAgQ0tFRElUT1IucmVwbGFjZShlbGVtZW50c1tpXSwge1xuICAgICAgICAgICAgICAgICAgICBcInRvb2xiYXJcIjogW1xuICAgICAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1zOiBbJ0JvbGQnLCAnSXRhbGljJywgJ1VuZGVybGluZScsICdTdHJpa2UnXVxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtczogW1wiVGV4dENvbG9yXCJdXG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgICAgICAgIFwibGFuZ3VhZ2VcIjogXCJmclwiLFxuICAgICAgICAgICAgICAgICAgICAnaGVpZ2h0JzogMTAwXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIENLRURJVE9SLnJlcGxhY2UoZWxlbWVudHNbaV0sIHtcbiAgICAgICAgICAgICAgICAgICAgXCJ0b29sYmFyXCI6IFtcbiAgICAgICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuYW1lOiBcInN0eWxlc1wiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1zOiBbXCJGb3JtYXRcIiwgJ0JvbGQnLCAnSXRhbGljJywgJ1VuZGVybGluZScsICdTdHJpa2UnLCBcIkxpbmtcIiwgXCJCdWxsZXRlZExpc3RcIl1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbXM6IFtcIlRleHRDb2xvclwiXVxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHtuYW1lOiAncGFyYWdyYXBoJywgaXRlbXM6IFsnSnVzdGlmeUxlZnQnLCAnSnVzdGlmeUNlbnRlcicsICdKdXN0aWZ5UmlnaHQnLCAnSnVzdGlmeUJsb2NrJ119LFxuICAgICAgICAgICAgICAgICAgICAgICAge25hbWU6ICdpbnNlcnQnLCBpdGVtczogWydJbWFnZScsICdTcGVjaWFsQ2hhciddfSxcbiAgICAgICAgICAgICAg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