Produced by Araxis Merge on 2020-08-14 00:01:34 +0000. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | Porto v3.2.3/Magento 2.x/Porto Theme/app/code/Mageplaza/LayeredNavigation/view/frontend/web/js/price | slider.js | 2016-09-26 19:15:52 +0000 |
| 2 | 2020-08-14 00:01:34 +0000 |
| Description | Between Files 1 and 2 | |
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 0 | 0 |
| Changed | 0 | 0 |
| Inserted | 0 | 0 |
| Removed | 1 | 48 |
| Whitespace | Consecutive whitespace is treated as a single space |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
| Active line-pairing rules |
No regular expressions were active.
| 1 | /** | |||||
| 2 | * Copyright � 2016 Mageplaza. All rights reserved. | |||||
| 3 | * See https://www.mageplaza.com/LICENSE.txt for license details. | |||||
| 4 | */ | |||||
| 5 | define([ | |||||
| 6 | 'jquery', | |||||
| 7 | 'Magento_Catalog/js/price-utils', | |||||
| 8 | 'jquery/ui', | |||||
| 9 | 'Mageplaza_LayeredNavigation/js/layer' | |||||
| 10 | ], function($, ultil) { | |||||
| 11 | "use strict"; | |||||
| 12 | ||||||
| 13 | $.widget('mageplaza.layerSlider', $.mageplaza.layer, { | |||||
| 14 | options: { | |||||
| 15 | sliderElement: '#ln_price_slider', | |||||
| 16 | textElement: '#ln_price_text' | |||||
| 17 | }, | |||||
| 18 | _create: function () { | |||||
| 19 | var self = this; | |||||
| 20 | $(this.options.sliderElement).slider({ | |||||
| 21 | min: self.options.minValue, | |||||
| 22 | max: self.options.maxValue, | |||||
| 23 | values: [self.options.selectedFrom, self.options.selectedTo], | |||||
| 24 | slide: function( event, ui ) { | |||||
| 25 | self.displayText(ui.values[0], ui.values[1]); | |||||
| 26 | }, | |||||
| 27 | change: function(event, ui) { | |||||
| 28 | self.ajaxSubmit(self.getUrl(ui.values[0], ui.values[1])); | |||||
| 29 | } | |||||
| 30 | }); | |||||
| 31 | this.displayText(this.options.selectedFrom, this.options.selectedTo); | |||||
| 32 | }, | |||||
| 33 | ||||||
| 34 | getUrl: function(from, to){ | |||||
| 35 | return this.options.ajaxUrl.replace(encodeURI('{price_start}'), from).replace(encodeURI('{price_end}'), to); | |||||
| 36 | }, | |||||
| 37 | ||||||
| 38 | displayText: function(from, to){ | |||||
| 39 | $(this.options.textElement).html(this.formatPrice(from) + ' - ' + this.formatPrice(to)); | |||||
| 40 | }, | |||||
| 41 | ||||||
| 42 | formatPrice: function(value) { | |||||
| 43 | return ultil.formatPrice(value, this.options.priceFormat); | |||||
| 44 | } | |||||
| 45 | }); | |||||
| 46 | ||||||
| 47 | return $.mageplaza.layerSlider; | |||||
| 48 | }); |
Araxis Merge (but not the data content of this report) is Copyright © 1993–2019 Araxis Ltd (www.araxis.com). All rights reserved.