summaryrefslogtreecommitdiff
path: root/html/content/js/Plugins/quantity.js
diff options
context:
space:
mode:
authorGeorge Halkiadakis <gchalkiadakis@sklavenitis.co.gr>2023-03-12 23:57:48 +0200
committerGeorge Halkiadakis <gchalkiadakis@sklavenitis.co.gr>2023-03-12 23:57:48 +0200
commit7aa203150fc1a2ec79c681c13f0d486d531746eb (patch)
treef09ba9f69ccd434e9c7fdeb41807fc8008784d8a /html/content/js/Plugins/quantity.js
parent221af3a2e035bd6689294509feb52f286d3bd5be (diff)
downloadclassroom-7aa203150fc1a2ec79c681c13f0d486d531746eb.tar.gz
classroom-7aa203150fc1a2ec79c681c13f0d486d531746eb.tar.bz2
classroom-7aa203150fc1a2ec79c681c13f0d486d531746eb.zip
error pages; js system to support back/front-end
Diffstat (limited to 'html/content/js/Plugins/quantity.js')
-rw-r--r--html/content/js/Plugins/quantity.js55
1 files changed, 0 insertions, 55 deletions
diff --git a/html/content/js/Plugins/quantity.js b/html/content/js/Plugins/quantity.js
deleted file mode 100644
index f124c63..0000000
--- a/html/content/js/Plugins/quantity.js
+++ /dev/null
@@ -1,55 +0,0 @@
-$$plugins.define('quantity', ['dom'], function (element, options, dom) {
- //const plugin = this,
- // increaseButton = element.querySelector('.quantity__btn--inc'),
- // decreaseButton = element.querySelector('.quantity__btn--dec'),
- // input = element.querySelector('input'),
- // maxQuantity = options.MaxQuantity,
- // minQuantity = options.MinQuantity || 1;
-
- //let currentValue = parseInt(input.value);
-
- //checkButtons();
- //plugin.on('click', increaseButton, updateValue);
- //plugin.on('click', decreaseButton, updateValue);
-
- //function updateValue(e) {
- // const button = dom.closest(e.target, '[data-ref="quantity-control"]'),
- // previousValue = currentValue;
- // if (!button || button.classList.contains('disabled')) {
- // return false;
- // }
- // if (button === increaseButton) {
- // currentValue += 1;
- // } else {
- // currentValue -= 1;
- // }
-
- // console.log(button)
- // input.value = currentValue;
- // checkButtons();
- // if (options.ItemId) {
- // plugin.emit('cart:quantity.changed', {
- // quantity: currentValue,
- // item: options.ItemId,
- // element: e.target,
- // fail: function onFail() {
- // currentValue = previousValue;
- // }
- // });
- // }
- //}
-
- //function checkButtons() {
- // if (currentValue > minQuantity) {
- // decreaseButton.classList.remove('disabled');
- // } else {
- // decreaseButton.classList.add('disabled');
- // }
-
- // if (currentValue < maxQuantity) {
- // increaseButton.classList.remove('disabled');
- // } else {
- // increaseButton.classList.add('disabled');
- // }
- //}
-});