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 } 104 105 $(elm.self).addClass('iqitcompare-added'); 106 107 var $notification = $('#iqitcompare-notification'); 108 $notification.addClass('ns-show'); 109 110 setTimeout(function () { 111 $notification.removeClass('ns-show'); 112 }, 3500); 113 }).fail(function (resp) { 114 prestashop.emit('handleError', { eventType: 'clickIqitCompareAdd', resp: resp }); 115 }); 116 }); 117 118 prestashop.on('clickIqitCompareRemove', function (elm) { 119 120 var data = { 121 'process': 'remove', 122 'ajax': 1, 123 'idProduct': elm.dataset.idProduct 124 }; 125 126 $.post(elm.dataset.url, data, null, 'json').then(function (resp) { 127 $('.js-iqitcompare-product-' + elm.dataset.idProduct).remove(); 128 iqitcompare.nbProducts--; 129 $('#iqitcompare-nb').text(iqitcompare.nbProducts); 130 131 if (iqitcompare.nbProducts == 0) { 132 $('#iqitcompare-table').remove(); 133 $('#iqitcompare-warning').removeClass('hidden-xs-up'); 134 } 135 }).fail(function (resp) { 136 prestashop.emit('handleError', { eventType: 'clickIqitCompareRemove', resp: resp }); 137 }); 138 }); 139 140 prestashop.on('clickIqitCompareRemoveAll', function (elm) { 141 142 var data = { 143 'process': 'removeAll', 144 'ajax': 1 145 }; 146 147 $.post(elm.dataset.url, data, null, 'json').then(function (resp) { 148 149 $('#iqitcompare-nb').text(0); 150 $('#iqitcompare-table').remove(); 151 $('#iqitcompare-warning').removeClass('hidden-xs-up'); 152 }).fail(function (resp) { 153 prestashop.emit('handleError', { eventType: 'clickIqitCompareRemove', resp: resp }); 154 }); 155 }); 156 }); 157 158/***/ }), 159/* 2 */
160/***/ (function(module, exports) { 161 162 // removed by extract-text-webpack-plugin 163 164/***/ }) 165/******/ ]); 166//# 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.