1/******/ (function(modules) { // webpackBootstrap 2/******/ // The module cache 3/******/ var installedModules = {}; 4/******/ 5/******/ // The require function 6/******/ function __webpack_require__(moduleId) { 7/******/ 8/******/ // Check if module is in cache 9/******/ if(installedModules[moduleId]) 10/******/ return installedModules[moduleId].exports; 11/******/ 12/******/ // Create a new module (and put it into the cache) 13/******/ var module = installedModules[moduleId] = { 14/******/ exports: {}, 15/******/ id: moduleId, 16/******/ loaded: false 17/******/ }; 18/******/ 19/******/ // Execute the module function 20/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 21/******/ 22/******/ // Flag the module as loaded 23/******/ module.loaded = true; 24/******/ 25/******/ // Return the exports of the module 26/******/ return module.exports; 27/******/ } 28/******/ 29/******/ 30/******/ // expose the modules object (__webpack_modules__) 31/******/ __webpack_require__.m = modules; 32/******/ 33/******/ // expose the module cache 34/******/ __webpack_require__.c = installedModules; 35/******/ 36/******/ // __webpack_public_path__ 37/******/ __webpack_require__.p = ""; 38/******/ 39/******/ // Load entry module and return exports 40/******/ return __webpack_require__(0); 41/******/ }) 42/************************************************************************/ 43/******/ ([ 44/* 0 */ 45/***/ (function(module, exports, __webpack_require__) { 46 47 'use strict'; 48 49 __webpack_require__(1); 50 51 __webpack_require__(2); 52 53/***/ }), 54/* 1 */ 55/***/ (function(module, exports) { 56 57 'use strict'; 58 59 $(document).ready(function () { 60 61 $('#iqitcompare-nb').text(iqitcompare.nbProducts); 62 63 $('body').on('click', '.js-iqitcompare-add', function (event) { 64 var self = this; 65 prestashop.emit('clickIqitCompareAdd', { 66 dataset: self.dataset, 67 self: self 68 }); 69 event.preventDefault(); 70 }); 71 72 $('body').on('click', '.js-iqitcompare-remove', function (event) { 73 74 var self = this; 75 prestashop.emit('clickIqitCompareRemove', { 76 dataset: self.dataset 77 }); 78 event.preventDefault(); 79 }); 80 81 $('body').on('click', '.js-iqitcompare-remove-all', function (event) { 82 83 var self = this; 84 prestashop.emit('clickIqitCompareRemoveAll', { 85 dataset: self.dataset 86 }); 87 event.preventDefault(); 88 }); 89 90 prestashop.on('clickIqitCompareAdd', function (elm) { 91 92 var data = { 93 'process': 'add', 94 'ajax': 1, 95 'idProduct': elm.dataset.idProduct 96 }; 97 98 $.post(elm.dataset.url, data, null, 'json').then(function (resp) { 99 100 if (resp.success) { 101 iqitcompare.nbProducts++; 102 $('#iqitcompare-nb').text(iqitcompare.nbProducts); 103 $('#iqitcompare-floating-wrapper').replaceWith($(resp.floatCompare)); 104 } 105 106 $(elm.self).addClass('iqitcompare-added'); 107 108 var $notification = $('#iqitcompare-notification'); 109 $notification.addClass('ns-show'); 110 111 setTimeout(function () { 112 $notification.removeClass('ns-show'); 113 }, 3500); 114 }).fail(function (resp) { 115 prestashop.emit('handleError', { eventType: 'clickIqitCompareAdd', resp: resp }); 116 }); 117 }); 118 119 prestashop.on('clickIqitCompareRemove', function (elm) { 120 121 var data = { 122 'process': 'remove', 123 'ajax': 1, 124 'idProduct': elm.dataset.idProduct 125 }; 126 127 $.post(elm.dataset.url, data, null, 'json').then(function (resp) { 128 $('.js-iqitcompare-product-' + elm.dataset.idProduct).remove(); 129 iqitcompare.nbProducts--; 130 $('#iqitcompare-nb').text(iqitcompare.nbProducts); 131 132 if (iqitcompare.nbProducts == 0) { 133 $('#iqitcompare-table').remove(); 134 $('#iqitcompare-warning').removeClass('hidden-xs-up'); 135 } 136 }).fail(function (resp) { 137 prestashop.emit('handleError', { eventType: 'clickIqitCompareRemove', resp: resp }); 138 }); 139 }); 140 141 prestashop.on('clickIqitCompareRemoveAll', function (elm) { 142 143 var data = { 144 'process': 'removeAll', 145 'ajax': 1 146 }; 147 148 $.post(elm.dataset.url, data, null, 'json').then(function (resp) { 149 150 $('#iqitcompare-nb').text(0); 151 $('#iqitcompare-table').remove(); 152 $('#iqitcompare-warning').removeClass('hidden-xs-up'); 153 }).fail(function (resp) { 154 prestashop.emit('handleError', { eventType: 'clickIqitCompareRemove', resp: resp }); 155 }); 156 }); 157 }); 158 159/***/ }), 160/* 2 */
161/***/ (function(module, exports) { 162 163 // removed by extract-text-webpack-plugin 164 165/***/ }) 166/******/ ]); 167//# sourceMappingURL=front.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.