Changeset 3443355
- Timestamp:
- 01/20/2026 03:03:04 PM (7 weeks ago)
- Location:
- super-easy-stock-manager/trunk
- Files:
-
- 17 edited
-
include/classes/sesm-admin.php (modified) (1 diff)
-
include/classes/sesm-ajax.php (modified) (4 diffs)
-
include/classes/sesm.php (modified) (2 diffs)
-
languages/sesm.pot (modified) (11 diffs)
-
languages/super-easy-stock-manager-de_DE-da4784d5d8d4d14c4e162b2d484bd899.json (modified) (1 diff)
-
languages/super-easy-stock-manager-de_DE.mo (modified) (previous)
-
languages/super-easy-stock-manager-de_DE.po (modified) (11 diffs)
-
license.txt (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
scripts/sesm-app.js (modified) (15 diffs)
-
scripts/sesm-app.min.js (modified) (1 diff)
-
style/sesm-main.css (modified) (14 diffs)
-
style/sesm-main.css.map (modified) (1 diff)
-
style/sesm-main.scss (modified) (5 diffs)
-
super-easy-stock-manager.php (modified) (3 diffs)
-
templates/frontend/item-update-stock.html (modified) (1 diff)
-
templates/frontend/item.html (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
super-easy-stock-manager/trunk/include/classes/sesm-admin.php
r2827548 r3443355 1 1 <?php 2 2 3 4 5 3 /** 6 7 4 * Plugin Name: Super Easy Stock Manager 8 9 5 * Class description: Placeholder. For Options in the future. 10 11 6 * Author: Dan's Art 12 13 7 * Author URI: http://dev.dans-art.ch 14 15 8 */ 16 17 9 Class Super_Easy_Stock_Manager_Admin extends Super_Easy_Stock_Manager_Helper 18 19 10 { 20 11 21 12 22 23 24 25 13 /** 26 27 14 * Does nothing so far... maybe there will be some Backend functionalities. 28 29 15 */ 30 31 16 public function __construct() 32 33 17 { 34 35 18 } 36 37 19 } 38 -
super-easy-stock-manager/trunk/include/classes/sesm-ajax.php
r2837173 r3443355 49 49 $result['description'] = substr($product->get_short_description(), 0, 250); 50 50 $result['image'] = $product->get_image('thumbnail'); 51 $result['weight'] = $product->get_weight() ?: 0;51 $result['weight'] = wc_format_weight( $product->get_weight()); 52 52 $result['attributes'] = wc_get_formatted_variation($product, true); 53 53 $result['product_url'] = get_edit_post_link($product_parent_id); 54 $result['product_variations'] = $this->load_product_variations($product); 54 55 } 55 56 return $result; … … 126 127 $result['manage_stock'] = $product->get_manage_stock(); 127 128 $result['template'] = 'updateStock'; 128 $old_quant = $product->get_stock_quantity(); 129 129 130 $manage_stock = $product->get_manage_stock(); 130 131 if ($manage_stock !== true) { … … 132 133 $old_quant = 0; 133 134 } 134 $increase = ($quantity > 0) ? true : false;135 135 $quant_positive = abs($quantity); 136 $new_quant = ($increase) ? $old_quant + $quant_positive : $old_quant - $quant_positive; 137 $result['from_quant'] = $old_quant; 138 $result['to_quant'] = $new_quant; 139 if ($increase) { 140 $result['change_txt'] = sprintf(__('The stock has been increased by %d to %d', 'super-easy-stock-manager'), $quant_positive, $new_quant); 141 $result['direction'] = 'increase'; 142 } else { 143 $result['change_txt'] = sprintf(__('The stock has been decreased by %d to %d', 'super-easy-stock-manager'), $quant_positive, $new_quant); 144 $result['direction'] = 'decrease'; 145 } 146 $product->set_stock_quantity($new_quant); 136 137 $result['change_txt'] = sprintf(__('The stock has set to %d', 'super-easy-stock-manager'), $quant_positive); 138 139 $product->set_stock_quantity($quant_positive); 147 140 //Saves the changes to the product / variation 148 141 $result['save_status'] = $product->save(); … … 303 296 } 304 297 } 298 299 /** 300 * Loads the siblings of a product variation. 301 * 302 * @param WC_Product $product 303 * @return array The Product variations with quantity and attributes 304 */ 305 public function load_product_variations($product) 306 { 307 $children_arr = []; 308 if($product -> get_type() === 'variation'){ 309 $parent_id = $product -> get_parent_id(); 310 $parent = wc_get_product($parent_id); 311 $children = $parent -> get_children(); 312 foreach($children as $child_id){ 313 $child = wc_get_product( $child_id ); 314 $attributes = wc_get_formatted_variation($child, true); 315 316 317 $children_arr[$child -> get_id()] = array( 318 "stock" => $child -> get_stock_quantity() . ' ' . __('pcs','super-easy-stock-manager'), 319 "attributes" => $attributes 320 ); 321 } 322 } 323 return $children_arr; 324 } 305 325 /** 306 326 * Checks if SKU is found in PostMeta. If true, the user has to update the lookup-tables. -
super-easy-stock-manager/trunk/include/classes/sesm.php
r2827548 r3443355 36 36 add_action('wp_enqueue_scripts', function () { 37 37 $script = (WP_DEBUG === true) ? 'sesm-app.js' : 'sesm-app.min.js'; 38 //$script = 'sesm-app.js'; //@todo: Change on production 38 39 $version = $this->load_version(); 39 40 wp_enqueue_script('sesm-main-script', SESM_MAIN_URL . 'scripts/' . $script, ['jquery', 'wp-i18n'], $version, true); … … 43 44 //Add the styles 44 45 if ($use_style) { 45 add_action('wp_ head', function () {46 $style = 'sesm-main. min.css';46 add_action('wp_enqueue_scripts', function () { 47 $style = 'sesm-main.css'; 47 48 $version = $this->load_version(); 48 49 wp_enqueue_style('sesm-main-style', SESM_MAIN_URL . 'style/' . $style, [], $version); -
super-easy-stock-manager/trunk/languages/sesm.pot
r2827721 r3443355 4 4 "Project-Id-Version: Super Easy Stock Manager\n" 5 5 "Report-Msgid-Bugs-To: \n" 6 "POT-Creation-Date: 202 2-12-02 13:52+0000\n"6 "POT-Creation-Date: 2023-12-28 14:35+0000\n" 7 7 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 8 8 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 17 17 "X-Domain: sesm" 18 18 19 #: include/classes/sesm-ajax.php:2 9419 #: include/classes/sesm-ajax.php:289 20 20 msgid "" 21 21 "Could not load the Product. Please update the lookup tables. <br/>" … … 31 31 msgstr "" 32 32 33 #: include/classes/sesm-ajax.php:3 5933 #: include/classes/sesm-ajax.php:381 34 34 msgid "Error" 35 35 msgstr "" … … 39 39 msgstr "" 40 40 41 #: include/classes/sesm-ajax.php:2 8141 #: include/classes/sesm-ajax.php:276 42 42 msgid "Info" 43 43 msgstr "" 44 44 45 #: include/classes/sesm-ajax.php:1 19 include/classes/sesm-ajax.php:23745 #: include/classes/sesm-ajax.php:122 include/classes/sesm-ajax.php:232 46 46 msgid "Input must be a number" 47 47 msgstr "" 48 48 49 #: scripts/sesm-app.js:1 7149 #: scripts/sesm-app.js:184 50 50 msgid "Input SKU" 51 51 msgstr "" 52 52 53 #: include/classes/sesm-ajax.php:28 653 #: include/classes/sesm-ajax.php:281 54 54 msgid "No SKU provided" 55 55 msgstr "" 56 56 57 #: include/classes/sesm-ajax.php:3 6157 #: include/classes/sesm-ajax.php:383 58 58 msgid "No value set!" 59 59 msgstr "" 60 60 61 #: include/classes/sesm-ajax.php:20 561 #: include/classes/sesm-ajax.php:200 62 62 msgid "Old and new prices are the same, nothing has been changed" 63 63 msgstr "" 64 64 65 #: scripts/sesm-app.js:49 65 #: scripts/sesm-app.js:388 66 msgid "Other variants of this product" 67 msgstr "" 68 69 #: include/classes/sesm-ajax.php:318 70 msgid "pcs" 71 msgstr "" 72 73 #: scripts/sesm-app.js:62 66 74 msgid "Price" 67 75 msgstr "" … … 75 83 msgstr "" 76 84 77 #: include/classes/sesm-ajax.php:29 685 #: include/classes/sesm-ajax.php:291 78 86 #, php-format 79 87 msgid "Product not found for SKU: %s" 80 88 msgstr "" 81 89 82 #: include/classes/sesm-ajax.php:3 3790 #: include/classes/sesm-ajax.php:359 83 91 msgid "Product with Variations" 84 92 msgstr "" 85 93 86 #: scripts/sesm-app.js: 5194 #: scripts/sesm-app.js:64 87 95 msgid "Quantity" 88 96 msgstr "" 89 97 90 #: include/classes/sesm-ajax.php:19 798 #: include/classes/sesm-ajax.php:192 91 99 msgid "Regular price set to 0" 92 100 msgstr "" 93 101 94 #: include/classes/sesm-ajax.php:18 5102 #: include/classes/sesm-ajax.php:180 95 103 msgid "Sale price has to be smaller than the regular price!" 96 104 msgstr "" 97 105 98 #: include/classes/sesm-ajax.php: 200106 #: include/classes/sesm-ajax.php:195 99 107 msgid "Sale price set to 0" 100 108 msgstr "" … … 104 112 msgstr "" 105 113 106 #: include/classes/sesm-ajax.php:3 33114 #: include/classes/sesm-ajax.php:355 107 115 msgid "Simple Product" 108 116 msgstr "" 109 117 110 #: scripts/sesm-app.js: 52118 #: scripts/sesm-app.js:65 111 119 msgid "SKU" 112 120 msgstr "" 113 121 114 #: scripts/sesm-app.js:3 71122 #: scripts/sesm-app.js:380 115 123 msgid "Stock management got activated" 116 124 msgstr "" … … 124 132 msgstr "" 125 133 126 #: scripts/sesm-app.js: 483134 #: scripts/sesm-app.js:513 127 135 msgid "" 128 136 "The Price contains invalid characters. Only 0-9, comma (,) and period (.) " … … 130 138 msgstr "" 131 139 132 #: scripts/sesm-app.js: 479140 #: scripts/sesm-app.js:509 133 141 msgid "" 134 142 "The Quantity contains invalid characters. Only 0-9, comma (,) and period (.) " … … 136 144 msgstr "" 137 145 138 #: include/classes/sesm-ajax.php:141 139 #, php-format 140 msgid "The stock has been decreased by %d to %d" 146 #: include/classes/sesm-ajax.php:137 147 msgid "The stock has set to %d" 141 148 msgstr "" 142 149 143 #: include/classes/sesm-ajax.php:138 144 #, php-format 145 msgid "The stock has been increased by %d to %d" 146 msgstr "" 147 148 #: include/classes/sesm-ajax.php:341 150 #: include/classes/sesm-ajax.php:363 149 151 msgid "Variation of Product" 150 152 msgstr "" 151 153 152 #: include/classes/sesm-ajax.php:7 0 include/classes/sesm-ajax.php:184154 #: include/classes/sesm-ajax.php:73 include/classes/sesm-ajax.php:179 153 155 msgid "Warning" 154 156 msgstr "" 155 157 156 #: scripts/sesm-app.js: 50158 #: scripts/sesm-app.js:63 157 159 msgid "Weight" 158 160 msgstr "" 159 161 160 #: include/classes/sesm.php:8 4 include/classes/sesm.php:102162 #: include/classes/sesm.php:85 include/classes/sesm.php:103 161 163 msgid "" 162 164 "WooCommerce seems not to be installed. Please Install or activate " … … 164 166 msgstr "" 165 167 166 #: include/classes/sesm.php:10 6168 #: include/classes/sesm.php:107 167 169 msgid "You are not allowed to edit products!" 168 170 msgstr "" 169 171 170 #: include/classes/sesm.php:8 1172 #: include/classes/sesm.php:82 171 173 msgid "" 172 174 "You are not allowed to edit products. Please contact the system " … … 174 176 msgstr "" 175 177 176 #: include/classes/sesm.php:9 8178 #: include/classes/sesm.php:99 177 179 msgid "You are not logged in. Please sign-in to use this function" 178 180 msgstr "" 179 181 180 #: include/classes/sesm-ajax.php:7 1182 #: include/classes/sesm-ajax.php:74 181 183 msgid "" 182 184 "You can't change the values of that product, because it has variations. " -
super-easy-stock-manager/trunk/languages/super-easy-stock-manager-de_DE-da4784d5d8d4d14c4e162b2d484bd899.json
r2827721 r3443355 1 {"translation-revision-date":"202 2-12-02 13:53+0000","generator":"Loco https:\/\/localise.biz\/","source":"scripts\/sesm-app.min.js","domain":"super-easy-stock-manager","locale_data":{"super-easy-stock-manager":{"":{"domain":"super-easy-stock-manager","lang":"de_DE","plural-forms":"nplurals=2; plural=n != 1;"},"Input SKU":["Artikelnummer eingeben"],"Price":["Preis"],"Quantity":["Anzahl"],"SKU":["Artikelnummer"],"Stock management got activated":["Lagerverwaltung wurde aktiviert"],"The Price contains invalid characters. Only 0-9, comma (,) and period (.) are allowed":["Der Preis enth\u00e4lt ung\u00fcltige Zeichen. Es sind nur die Zahlen von 0-9, Komma (,) und Punkt (.) erlaubt."],"The Quantity contains invalid characters. Only 0-9, comma (,) and period (.) are allowed":["Die Anzahl enth\u00e4lt ung\u00fcltige Zeichen. Es sind nur die Zahlen von 0-9, Komma (,) und Punkt (.) erlaubt."],"Weight":["Gewicht"]}}}1 {"translation-revision-date":"2023-12-28 14:36+0000","generator":"Loco https:\/\/localise.biz\/","source":"scripts\/sesm-app.min.js","domain":"super-easy-stock-manager","locale_data":{"super-easy-stock-manager":{"":{"domain":"super-easy-stock-manager","lang":"de_DE","plural-forms":"nplurals=2; plural=n != 1;"},"Input SKU":["Artikelnummer eingeben"],"Other variants of this product":["Andere Varianten dieses Produkts"],"Price":["Preis"],"Quantity":["Anzahl"],"SKU":["Artikelnummer"],"Stock management got activated":["Lagerverwaltung wurde aktiviert"],"The Price contains invalid characters. Only 0-9, comma (,) and period (.) are allowed":["Der Preis enth\u00e4lt ung\u00fcltige Zeichen. Es sind nur die Zahlen von 0-9, Komma (,) und Punkt (.) erlaubt."],"The Quantity contains invalid characters. Only 0-9, comma (,) and period (.) are allowed":["Die Anzahl enth\u00e4lt ung\u00fcltige Zeichen. Es sind nur die Zahlen von 0-9, Komma (,) und Punkt (.) erlaubt."],"Weight":["Gewicht"]}}} -
super-easy-stock-manager/trunk/languages/super-easy-stock-manager-de_DE.po
r2827721 r3443355 4 4 "Report-Msgid-Bugs-To: \n" 5 5 "POT-Creation-Date: 2020-10-31 20:56+0000\n" 6 "PO-Revision-Date: 202 2-12-02 13:53+0000\n"6 "PO-Revision-Date: 2023-12-28 14:36+0000\n" 7 7 "Last-Translator: \n" 8 8 "Language-Team: Deutsch\n" … … 15 15 "X-Loco-Version: 2.6.3; wp-6.1.1" 16 16 17 #: include/classes/sesm-ajax.php:2 9417 #: include/classes/sesm-ajax.php:289 18 18 msgid "" 19 19 "Could not load the Product. Please update the lookup tables. <br/>" … … 31 31 msgstr "Menge zum hinzufügen oder entfernen eingeben" 32 32 33 #: include/classes/sesm-ajax.php:3 5933 #: include/classes/sesm-ajax.php:381 34 34 msgid "Error" 35 35 msgstr "Fehler" … … 39 39 msgstr "http://dev.dans-art.ch" 40 40 41 #: include/classes/sesm-ajax.php:2 8141 #: include/classes/sesm-ajax.php:276 42 42 msgid "Info" 43 43 msgstr "Info" 44 44 45 #: include/classes/sesm-ajax.php:1 19 include/classes/sesm-ajax.php:23745 #: include/classes/sesm-ajax.php:122 include/classes/sesm-ajax.php:232 46 46 msgid "Input must be a number" 47 47 msgstr "Eingabe muss eine Nummer sein" 48 48 49 #: scripts/sesm-app.js:1 7149 #: scripts/sesm-app.js:184 50 50 msgid "Input SKU" 51 51 msgstr "Artikelnummer eingeben" 52 52 53 #: include/classes/sesm-ajax.php:28 653 #: include/classes/sesm-ajax.php:281 54 54 msgid "No SKU provided" 55 55 msgstr "Keine Artikelnummer übergeben." 56 56 57 #: include/classes/sesm-ajax.php:3 6157 #: include/classes/sesm-ajax.php:383 58 58 msgid "No value set!" 59 59 msgstr "Keinen Wert gesetzt!" 60 60 61 #: include/classes/sesm-ajax.php:20 561 #: include/classes/sesm-ajax.php:200 62 62 msgid "Old and new prices are the same, nothing has been changed" 63 63 msgstr "Alter und neuer Preis haben sich nicht geändert." 64 64 65 #: scripts/sesm-app.js:49 65 #: scripts/sesm-app.js:388 66 msgid "Other variants of this product" 67 msgstr "Andere Varianten dieses Produkts" 68 69 #: include/classes/sesm-ajax.php:318 70 msgid "pcs" 71 msgstr "stk" 72 73 #: scripts/sesm-app.js:62 66 74 msgid "Price" 67 75 msgstr "Preis" … … 75 83 msgstr "Angebots Preis" 76 84 77 #: include/classes/sesm-ajax.php:29 685 #: include/classes/sesm-ajax.php:291 78 86 #, php-format 79 87 msgid "Product not found for SKU: %s" 80 88 msgstr "Kein Produkt für die Artikelnummer \"%s\" gefunden" 81 89 82 #: include/classes/sesm-ajax.php:3 3790 #: include/classes/sesm-ajax.php:359 83 91 msgid "Product with Variations" 84 92 msgstr "Produkt mit Varianten" 85 93 86 #: scripts/sesm-app.js: 5194 #: scripts/sesm-app.js:64 87 95 msgid "Quantity" 88 96 msgstr "Anzahl" 89 97 90 #: include/classes/sesm-ajax.php:19 798 #: include/classes/sesm-ajax.php:192 91 99 msgid "Regular price set to 0" 92 100 msgstr "Normalpreis auf 0 gesetzt" 93 101 94 #: include/classes/sesm-ajax.php:18 5102 #: include/classes/sesm-ajax.php:180 95 103 msgid "Sale price has to be smaller than the regular price!" 96 104 msgstr "Der Angebotspreis muss kleiner sein, als der normale Preis" 97 105 98 #: include/classes/sesm-ajax.php: 200106 #: include/classes/sesm-ajax.php:195 99 107 msgid "Sale price set to 0" 100 108 msgstr "Angebotspreis auf 0 gesetzt" … … 104 112 msgstr "Scanne einen Barcode oder gib die Artikelnummer ein und drücke Enter" 105 113 106 #: include/classes/sesm-ajax.php:3 33114 #: include/classes/sesm-ajax.php:355 107 115 msgid "Simple Product" 108 116 msgstr "Einfaches Produkt" 109 117 110 #: scripts/sesm-app.js: 52118 #: scripts/sesm-app.js:65 111 119 msgid "SKU" 112 120 msgstr "Artikelnummer" 113 121 114 #: scripts/sesm-app.js:3 71122 #: scripts/sesm-app.js:380 115 123 msgid "Stock management got activated" 116 124 msgstr "Lagerverwaltung wurde aktiviert" … … 124 132 msgstr "Super einfache Lagerverwaltung" 125 133 126 #: scripts/sesm-app.js: 483134 #: scripts/sesm-app.js:513 127 135 msgid "" 128 136 "The Price contains invalid characters. Only 0-9, comma (,) and period (.) " … … 132 140 ") und Punkt (.) erlaubt." 133 141 134 #: scripts/sesm-app.js: 479142 #: scripts/sesm-app.js:509 135 143 msgid "" 136 144 "The Quantity contains invalid characters. Only 0-9, comma (,) and period (.) " … … 140 148 "(,) und Punkt (.) erlaubt." 141 149 142 #: include/classes/sesm-ajax.php:141 143 #, php-format 144 msgid "The stock has been decreased by %d to %d" 145 msgstr "Der Lagerbestand wurde um %d reduziert auf insgesamt %d Stück." 146 147 #: include/classes/sesm-ajax.php:138 148 #, php-format 149 msgid "The stock has been increased by %d to %d" 150 msgstr "Der Lagerbestand wurde um %d erhöht auf insgesamt %d Stück." 151 152 #: include/classes/sesm-ajax.php:341 150 #: include/classes/sesm-ajax.php:137 151 msgid "The stock has set to %d" 152 msgstr "Die Anzahl wurde auf %d gesetzt" 153 154 #: include/classes/sesm-ajax.php:363 153 155 msgid "Variation of Product" 154 156 msgstr "Variante eines Produkts" 155 157 156 #: include/classes/sesm-ajax.php:7 0 include/classes/sesm-ajax.php:184158 #: include/classes/sesm-ajax.php:73 include/classes/sesm-ajax.php:179 157 159 msgid "Warning" 158 160 msgstr "Warnung" 159 161 160 #: scripts/sesm-app.js: 50162 #: scripts/sesm-app.js:63 161 163 msgid "Weight" 162 164 msgstr "Gewicht" 163 165 164 #: include/classes/sesm.php:8 4 include/classes/sesm.php:102166 #: include/classes/sesm.php:85 include/classes/sesm.php:103 165 167 #| msgid "" 166 168 #| "WooCommerce seems not to be installed. Please install or activate " … … 173 175 "aktiviere WooCommerce um dieses Plugin zu nutzen." 174 176 175 #: include/classes/sesm.php:10 6177 #: include/classes/sesm.php:107 176 178 msgid "You are not allowed to edit products!" 177 179 msgstr "Du bist nicht berechtigt, Produkte zu bearbeiten!" 178 180 179 #: include/classes/sesm.php:8 1181 #: include/classes/sesm.php:82 180 182 msgid "" 181 183 "You are not allowed to edit products. Please contact the system " … … 185 187 "System-Administrator, um die benötigten Rechte zu erhalten." 186 188 187 #: include/classes/sesm.php:9 8189 #: include/classes/sesm.php:99 188 190 msgid "You are not logged in. Please sign-in to use this function" 189 191 msgstr "" 190 192 "Du bist nicht eingeloggt. Bitte melde dich an, um diese Funktion zu nutzen." 191 193 192 #: include/classes/sesm-ajax.php:7 1194 #: include/classes/sesm-ajax.php:74 193 195 msgid "" 194 196 "You can't change the values of that product, because it has variations. " -
super-easy-stock-manager/trunk/license.txt
r2827548 r3443355 1 1 Super Easy Stock Manager 2 2 3 4 5 3 Copyright 2020 by Dan's Art 6 4 7 8 9 5 This program is free software; you can redistribute it and/or modify 10 11 6 it under the terms of the GNU General Public License as published by 12 13 7 the Free Software Foundation; either version 2 of the License, or 14 15 8 (at your option) any later version. 16 9 17 18 19 10 This program is distributed in the hope that it will be useful, 20 21 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 22 23 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 24 25 13 GNU General Public License for more details. 26 14 27 28 29 15 You should have received a copy of the GNU General Public License 30 31 16 along with this program; if not, write to the Free Software 32 33 17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 34 18 35 36 37 19 This program incorporates work covered by the following copyright and 38 39 20 permission notices: 40 21 41 42 43 22 WordPress - Web publishing software 44 23 45 46 47 24 Copyright 2003-2017 by the contributors 48 25 49 50 51 26 WordPress is released under the GPL 52 27 53 54 55 28 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 56 29 57 58 59 30 GNU GENERAL PUBLIC LICENSE 60 61 31 Version 2, June 1991 62 32 63 64 65 33 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 66 67 34 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 68 35 69 70 71 36 Everyone is permitted to copy and distribute verbatim copies 72 73 37 of this license document, but changing it is not allowed. 74 38 75 76 77 39 Preamble 78 40 79 80 81 41 The licenses for most software are designed to take away your 82 83 42 freedom to share and change it. By contrast, the GNU General Public 84 85 43 License is intended to guarantee your freedom to share and change free 86 87 44 software--to make sure the software is free for all its users. This 88 89 45 General Public License applies to most of the Free Software 90 91 46 Foundation's software and to any other program whose authors commit to 92 93 47 using it. (Some other Free Software Foundation software is covered by 94 95 48 the GNU Library General Public License instead.) You can apply it to 96 97 49 your programs, too. 98 50 99 100 101 51 When we speak of free software, we are referring to freedom, not 102 103 52 price. Our General Public Licenses are designed to make sure that you 104 105 53 have the freedom to distribute copies of free software (and charge for 106 107 54 this service if you wish), that you receive source code or can get it 108 109 55 if you want it, that you can change the software or use pieces of it 110 111 56 in new free programs; and that you know you can do these things. 112 57 113 114 115 58 To protect your rights, we need to make restrictions that forbid 116 117 59 anyone to deny you these rights or to ask you to surrender the rights. 118 119 60 These restrictions translate to certain responsibilities for you if you 120 121 61 distribute copies of the software, or if you modify it. 122 62 123 124 125 63 For example, if you distribute copies of such a program, whether 126 127 64 gratis or for a fee, you must give the recipients all the rights that 128 129 65 you have. You must make sure that they, too, receive or can get the 130 131 66 source code. And you must show them these terms so they know their 132 133 67 rights. 134 68 135 136 137 69 We protect your rights with two steps: (1) copyright the software, and 138 139 70 (2) offer you this license which gives you legal permission to copy, 140 141 71 distribute and/or modify the software. 142 72 143 144 145 73 Also, for each author's protection and ours, we want to make certain 146 147 74 that everyone understands that there is no warranty for this free 148 149 75 software. If the software is modified by someone else and passed on, we 150 151 76 want its recipients to know that what they have is not the original, so 152 153 77 that any problems introduced by others will not reflect on the original 154 155 78 authors' reputations. 156 79 157 158 159 80 Finally, any free program is threatened constantly by software 160 161 81 patents. We wish to avoid the danger that redistributors of a free 162 163 82 program will individually obtain patent licenses, in effect making the 164 165 83 program proprietary. To prevent this, we have made it clear that any 166 167 84 patent must be licensed for everyone's free use or not licensed at all. 168 85 169 170 171 86 The precise terms and conditions for copying, distribution and 172 173 87 modification follow. 174 88 175 176 177 89 GNU GENERAL PUBLIC LICENSE 178 179 90 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 180 91 181 182 183 92 0. This License applies to any program or other work which contains 184 185 93 a notice placed by the copyright holder saying it may be distributed 186 187 94 under the terms of this General Public License. The "Program", below, 188 189 95 refers to any such program or work, and a "work based on the Program" 190 191 96 means either the Program or any derivative work under copyright law: 192 193 97 that is to say, a work containing the Program or a portion of it, 194 195 98 either verbatim or with modifications and/or translated into another 196 197 99 language. (Hereinafter, translation is included without limitation in 198 199 100 the term "modification".) Each licensee is addressed as "you". 200 101 201 202 203 102 Activities other than copying, distribution and modification are not 204 205 103 covered by this License; they are outside its scope. The act of 206 207 104 running the Program is not restricted, and the output from the Program 208 209 105 is covered only if its contents constitute a work based on the 210 211 106 Program (independent of having been made by running the Program). 212 213 107 Whether that is true depends on what the Program does. 214 108 215 216 217 109 1. You may copy and distribute verbatim copies of the Program's 218 219 110 source code as you receive it, in any medium, provided that you 220 221 111 conspicuously and appropriately publish on each copy an appropriate 222 223 112 copyright notice and disclaimer of warranty; keep intact all the 224 225 113 notices that refer to this License and to the absence of any warranty; 226 227 114 and give any other recipients of the Program a copy of this License 228 229 115 along with the Program. 230 116 231 232 233 117 You may charge a fee for the physical act of transferring a copy, and 234 235 118 you may at your option offer warranty protection in exchange for a fee. 236 119 237 238 239 120 2. You may modify your copy or copies of the Program or any portion 240 241 121 of it, thus forming a work based on the Program, and copy and 242 243 122 distribute such modifications or work under the terms of Section 1 244 245 123 above, provided that you also meet all of these conditions: 246 124 247 248 249 125 a) You must cause the modified files to carry prominent notices 250 251 126 stating that you changed the files and the date of any change. 252 127 253 254 255 128 b) You must cause any work that you distribute or publish, that in 256 257 129 whole or in part contains or is derived from the Program or any 258 259 130 part thereof, to be licensed as a whole at no charge to all third 260 261 131 parties under the terms of this License. 262 132 263 264 265 133 c) If the modified program normally reads commands interactively 266 267 134 when run, you must cause it, when started running for such 268 269 135 interactive use in the most ordinary way, to print or display an 270 271 136 announcement including an appropriate copyright notice and a 272 273 137 notice that there is no warranty (or else, saying that you provide 274 275 138 a warranty) and that users may redistribute the program under 276 277 139 these conditions, and telling the user how to view a copy of this 278 279 140 License. (Exception: if the Program itself is interactive but 280 281 141 does not normally print such an announcement, your work based on 282 283 142 the Program is not required to print an announcement.) 284 143 285 286 287 144 These requirements apply to the modified work as a whole. If 288 289 145 identifiable sections of that work are not derived from the Program, 290 291 146 and can be reasonably considered independent and separate works in 292 293 147 themselves, then this License, and its terms, do not apply to those 294 295 148 sections when you distribute them as separate works. But when you 296 297 149 distribute the same sections as part of a whole which is a work based 298 299 150 on the Program, the distribution of the whole must be on the terms of 300 301 151 this License, whose permissions for other licensees extend to the 302 303 152 entire whole, and thus to each and every part regardless of who wrote it. 304 305 153 Thus, it is not the intent of this section to claim rights or contest 306 307 154 your rights to work written entirely by you; rather, the intent is to 308 309 155 exercise the right to control the distribution of derivative or 310 311 156 collective works based on the Program. 312 157 313 314 315 158 In addition, mere aggregation of another work not based on the Program 316 317 159 with the Program (or with a work based on the Program) on a volume of 318 319 160 a storage or distribution medium does not bring the other work under 320 321 161 the scope of this License. 322 162 323 324 325 163 3. You may copy and distribute the Program (or a work based on it, 326 327 164 under Section 2) in object code or executable form under the terms of 328 329 165 Sections 1 and 2 above provided that you also do one of the following: 330 166 331 332 333 167 a) Accompany it with the complete corresponding machine-readable 334 335 168 source code, which must be distributed under the terms of Sections 336 337 169 1 and 2 above on a medium customarily used for software interchange; or, 338 170 339 340 341 171 b) Accompany it with a written offer, valid for at least three 342 343 172 years, to give any third party, for a charge no more than your 344 345 173 cost of physically performing source distribution, a complete 346 347 174 machine-readable copy of the corresponding source code, to be 348 349 175 distributed under the terms of Sections 1 and 2 above on a medium 350 351 176 customarily used for software interchange; or, 352 177 353 354 355 178 c) Accompany it with the information you received as to the offer 356 357 179 to distribute corresponding source code. (This alternative is 358 359 180 allowed only for noncommercial distribution and only if you 360 361 181 received the program in object code or executable form with such 362 363 182 an offer, in accord with Subsection b above.) 364 183 365 366 367 184 The source code for a work means the preferred form of the work for 368 369 185 making modifications to it. For an executable work, complete source 370 371 186 code means all the source code for all modules it contains, plus any 372 373 187 associated interface definition files, plus the scripts used to 374 375 188 control compilation and installation of the executable. However, as a 376 377 189 special exception, the source code distributed need not include 378 379 190 anything that is normally distributed (in either source or binary 380 381 191 form) with the major components (compiler, kernel, and so on) of the 382 383 192 operating system on which the executable runs, unless that component 384 385 193 itself accompanies the executable. 386 194 387 388 389 195 If distribution of executable or object code is made by offering 390 391 196 access to copy from a designated place, then offering equivalent 392 393 197 access to copy the source code from the same place counts as 394 395 198 distribution of the source code, even though third parties are not 396 397 199 compelled to copy the source along with the object code. 398 200 399 400 401 201 4. You may not copy, modify, sublicense, or distribute the Program 402 403 202 except as expressly provided under this License. Any attempt 404 405 203 otherwise to copy, modify, sublicense or distribute the Program is 406 407 204 void, and will automatically terminate your rights under this License. 408 409 205 However, parties who have received copies, or rights, from you under 410 411 206 this License will not have their licenses terminated so long as such 412 413 207 parties remain in full compliance. 414 208 415 416 417 209 5. You are not required to accept this License, since you have not 418 419 210 signed it. However, nothing else grants you permission to modify or 420 421 211 distribute the Program or its derivative works. These actions are 422 423 212 prohibited by law if you do not accept this License. Therefore, by 424 425 213 modifying or distributing the Program (or any work based on the 426 427 214 Program), you indicate your acceptance of this License to do so, and 428 429 215 all its terms and conditions for copying, distributing or modifying 430 431 216 the Program or works based on it. 432 217 433 434 435 218 6. Each time you redistribute the Program (or any work based on the 436 437 219 Program), the recipient automatically receives a license from the 438 439 220 original licensor to copy, distribute or modify the Program subject to 440 441 221 these terms and conditions. You may not impose any further 442 443 222 restrictions on the recipients' exercise of the rights granted herein. 444 445 223 You are not responsible for enforcing compliance by third parties to 446 447 224 this License. 448 225 449 450 451 226 7. If, as a consequence of a court judgment or allegation of patent 452 453 227 infringement or for any other reason (not limited to patent issues), 454 455 228 conditions are imposed on you (whether by court order, agreement or 456 457 229 otherwise) that contradict the conditions of this License, they do not 458 459 230 excuse you from the conditions of this License. If you cannot 460 461 231 distribute so as to satisfy simultaneously your obligations under this 462 463 232 License and any other pertinent obligations, then as a consequence you 464 465 233 may not distribute the Program at all. For example, if a patent 466 467 234 license would not permit royalty-free redistribution of the Program by 468 469 235 all those who receive copies directly or indirectly through you, then 470 471 236 the only way you could satisfy both it and this License would be to 472 473 237 refrain entirely from distribution of the Program. 474 238 475 476 477 239 If any portion of this section is held invalid or unenforceable under 478 479 240 any particular circumstance, the balance of the section is intended to 480 481 241 apply and the section as a whole is intended to apply in other 482 483 242 circumstances. 484 243 485 486 487 244 It is not the purpose of this section to induce you to infringe any 488 489 245 patents or other property right claims or to contest validity of any 490 491 246 such claims; this section has the sole purpose of protecting the 492 493 247 integrity of the free software distribution system, which is 494 495 248 implemented by public license practices. Many people have made 496 497 249 generous contributions to the wide range of software distributed 498 499 250 through that system in reliance on consistent application of that 500 501 251 system; it is up to the author/donor to decide if he or she is willing 502 503 252 to distribute software through any other system and a licensee cannot 504 505 253 impose that choice. 506 254 507 508 509 255 This section is intended to make thoroughly clear what is believed to 510 511 256 be a consequence of the rest of this License. 512 257 513 514 515 258 8. If the distribution and/or use of the Program is restricted in 516 517 259 certain countries either by patents or by copyrighted interfaces, the 518 519 260 original copyright holder who places the Program under this License 520 521 261 may add an explicit geographical distribution limitation excluding 522 523 262 those countries, so that distribution is permitted only in or among 524 525 263 countries not thus excluded. In such case, this License incorporates 526 527 264 the limitation as if written in the body of this License. 528 265 529 530 531 266 9. The Free Software Foundation may publish revised and/or new versions 532 533 267 of the General Public License from time to time. Such new versions will 534 535 268 be similar in spirit to the present version, but may differ in detail to 536 537 269 address new problems or concerns. 538 270 539 540 541 271 Each version is given a distinguishing version number. If the Program 542 543 272 specifies a version number of this License which applies to it and "any 544 545 273 later version", you have the option of following the terms and conditions 546 547 274 either of that version or of any later version published by the Free 548 549 275 Software Foundation. If the Program does not specify a version number of 550 551 276 this License, you may choose any version ever published by the Free Software 552 553 277 Foundation. 554 278 555 556 557 279 10. If you wish to incorporate parts of the Program into other free 558 559 280 programs whose distribution conditions are different, write to the author 560 561 281 to ask for permission. For software which is copyrighted by the Free 562 563 282 Software Foundation, write to the Free Software Foundation; we sometimes 564 565 283 make exceptions for this. Our decision will be guided by the two goals 566 567 284 of preserving the free status of all derivatives of our free software and 568 569 285 of promoting the sharing and reuse of software generally. 570 286 571 572 573 287 NO WARRANTY 574 288 575 576 577 289 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 578 579 290 FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 580 581 291 OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 582 583 292 PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 584 585 293 OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 586 587 294 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 588 589 295 TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 590 591 296 PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 592 593 297 REPAIR OR CORRECTION. 594 298 595 596 597 299 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 598 599 300 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 600 601 301 REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 602 603 302 INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 604 605 303 OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 606 607 304 TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 608 609 305 YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 610 611 306 PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 612 613 307 POSSIBILITY OF SUCH DAMAGES. 614 308 615 616 617 309 END OF TERMS AND CONDITIONS 618 -
super-easy-stock-manager/trunk/readme.txt
r2837173 r3443355 7 7 Tested up to: 6.1.1 8 8 Requires PHP: 7.4 9 Stable tag: 1.3.6 9 Stable tag: 1.4.1 10 11 Requires Plugins: woocommerce 10 12 WC requires at least: 4.7.0 11 WC tested up to: 7.1.013 WC tested up to: 10.4.3 12 14 License: GPLv3 or later 13 15 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 56 58 57 59 == Changelog == 60 = [1.4.1] 2026-01-20 = 61 - Fixed: Style was not correctly enqueued 62 - Tested up to WP 6.9 63 64 = [1.4] 2023-12-28 = 65 - Update stock sets the given amount instead of updating it 66 - Style improvements 67 58 68 = [1.3.6] 2022-12-21 = 59 69 - Added numeric keyboard input for mobile devices -
super-easy-stock-manager/trunk/scripts/sesm-app.js
r2837173 r3443355 17 17 */ 18 18 construct() { 19 jQuery(document).ready(async function () {19 jQuery(document).ready(async function () { 20 20 // Check if the container for the plugin exists. If not, it skips the rest 21 21 if (jQuery('#sesm_container').length !== 1) { … … 40 40 sesmScripts.activate_sesm(); 41 41 42 sesmScripts.is_mobile(); 42 43 if (!sesmScripts.is_mobile()) { 44 // Re-focus to the input field every 2 seconds 45 let autofocus = setInterval(function () { 46 if ( 47 document.activeElement.id !== 'sesm_quant' && 48 document.activeElement.id !== 'sesm_price_reg' && 49 document.activeElement.id !== 'sesm_price_sale' 50 ) { 51 jQuery('#sesm_sku_input').focus(); 52 } 53 }, 2000); 54 } 43 55 }); 44 56 } … … 72 84 */ 73 85 add_event_listener() { 74 jQuery('#sesm_buttons button').click(function (item) {86 jQuery('#sesm_buttons button').click(function (item) { 75 87 sesmScripts.sesm_do = jQuery(item.currentTarget).data('do'); 76 88 … … 115 127 // Open scan application 116 128 sesmScripts.scanner = new Html5QrcodeScanner( 117 'scanner-container',118 {119 fps: 10,120 qrbox: {width: 250, height: 250},121 useBarCodeDetectorIfSupported: true,122 rememberLastUsedCamera: true,123 showTorchButtonIfSupported: true,124 defaultZoomValueIfSupported: 2,125 });129 'scanner-container', 130 { 131 fps: 10, 132 qrbox: { width: 250, height: 250 }, 133 useBarCodeDetectorIfSupported: true, 134 rememberLastUsedCamera: true, 135 showTorchButtonIfSupported: true, 136 defaultZoomValueIfSupported: 2, 137 }); 126 138 127 139 sesmScripts.scanner.render(sesmScripts.onScanSuccess, sesmScripts.onScanFailure); … … 136 148 }); 137 149 138 jQuery(document).on('keyup', async function (s) {150 jQuery(document).on('keyup', async function (s) { 139 151 if (s.which == 13) { 140 152 sesmScripts.fire_ajax(); 141 153 } 142 154 }), 143 jQuery('#add_quant_btn').click(function() {144 sesmScripts.changeQuantity(true);145 }),146 jQuery('#remove_quant_btn').click(function() {147 sesmScripts.changeQuantity(false);148 });155 jQuery('#add_quant_btn').click(function () { 156 sesmScripts.changeQuantity(true); 157 }), 158 jQuery('#remove_quant_btn').click(function () { 159 sesmScripts.changeQuantity(false); 160 }); 149 161 150 162 /** … … 226 238 jQuery('#mobile-scan-container').css('display', 'flex'); 227 239 jQuery('#mobile-scan-container').css('bottom', -jQuery('#mobile-scan-container').height()); 228 jQuery('#mobile-scan-container').animate({ 'bottom': 0}, 200);240 jQuery('#mobile-scan-container').animate({ 'bottom': 0 }, 200); 229 241 } 230 242 … … 253 265 if (jQuery('#selection-indicator')[0].offsetLeft === padding) { 254 266 animationDuration = 0; // Move instantly if not in position yet 255 jQuery('#selection-indicator').animate({ opacity: 1}, animationDuration);267 jQuery('#selection-indicator').animate({ opacity: 1 }, animationDuration); 256 268 } 257 269 jQuery('#selection-indicator').animate({ 258 270 left: finalLeft, 259 271 }, 260 animationDuration);272 animationDuration); 261 273 } 262 274 … … 278 290 } 279 291 280 jQuery.each(jsonData, function (key, value) {292 jQuery.each(jsonData, function (key, value) { 281 293 value = sesmScripts.format_value(key, value, jsonData); 282 294 template = template.replaceAll('{{' + key + '}}', value); 283 295 }); 284 296 285 jQuery.each(this.field_names, function (key, value) {297 jQuery.each(this.field_names, function (key, value) { 286 298 value = sesmScripts.format_value(key, value); 287 299 template = template.replaceAll('{{' + key + '}}', value); … … 290 302 jQuery('#sesm_history').addClass('active'); 291 303 jQuery('#sesm_history').prepend(template); 292 jQuery('#sesm_history article').first().animate({ opacity: 1, height: '100%'}, 500);304 jQuery('#sesm_history article').first().animate({ opacity: 1, height: '100%' }, 500); 293 305 } 294 306 … … 363 375 case 'regular_price': 364 376 return (!jsonData.sale_price) ? value + ' ' + jsonData.currency : '<span class="strikethrough">' + value + ' ' + jsonData.currency + '</span>'; 365 366 case 'weight':367 return value + ' kg';368 369 377 case 'sale_price': 370 378 return (!jsonData.sale_price) ? '' : value + ' ' + jsonData.currency; … … 376 384 case 'to_sale': 377 385 return sesmScripts.format_price_change(jsonData.from_sale, jsonData.to_sale, jsonData, fieldName); 386 case 'product_variations': 387 const list = sesmScripts.format_product_variations(jsonData.product_variations); 388 const title = __('Other variants of this product', 'super-easy-stock-manager'); 389 return (!this.empty(list)) ? `<details><summary>${title}</summary><ul>${list}</ul></details>` : ''; 378 390 default: 379 391 return value; … … 392 404 const priceLength = (jsonData.from_regular + jsonData.to_regular + jsonData.currency).length; 393 405 const priceLengthSale = (jsonData.from_sale + jsonData.to_sale + jsonData.currency).length; 394 const priceNotice = (fieldName === 'to_regular') ? jsonData.regular_notice:jsonData.sale_notice;406 const priceNotice = (fieldName === 'to_regular') ? jsonData.regular_notice : jsonData.sale_notice; 395 407 396 408 if (!sesmScripts.empty(priceNotice)) { … … 411 423 if (fieldName === 'to_regular') { 412 424 return '<div class="' + classLongContent + ' ' + 413 isSingleRegularClass + '"><span class="from_price strikethrough">' + fromPrice + ' ' +414 jsonData.currency + '</span><span class="to_price">' + toPrice + ' ' + jsonData.currency + '</span></div>';425 isSingleRegularClass + '"><span class="from_price strikethrough">' + fromPrice + ' ' + 426 jsonData.currency + '</span><span class="to_price">' + toPrice + ' ' + jsonData.currency + '</span></div>'; 415 427 } else { 416 428 return '<div class="' + classLongContent + ' ' + 417 isSingleSaleClass + '"><span class="from_price strikethrough">' + fromPrice+ ' ' + 418 jsonData.currency + '</span><span class="to_price">' + toPrice + ' ' + jsonData.currency + '</span></div>'; 419 } 429 isSingleSaleClass + '"><span class="from_price strikethrough">' + fromPrice + ' ' + 430 jsonData.currency + '</span><span class="to_price">' + toPrice + ' ' + jsonData.currency + '</span></div>'; 431 } 432 } 433 434 /** 435 * 436 * @param {object} variations The variations as an object 437 * @return {string} 438 */ 439 format_product_variations(variations) { 440 let variationsList = ''; 441 for (let key in variations) { 442 if (variations.hasOwnProperty(key)) { // Check if the property is part of the object and not its prototype chain 443 const attributes = sesmScripts.format_attributes(variations[key]); 444 const stock = variations[key].stock; 445 variationsList += `<li><span>${attributes}</span><span>${stock}</span></li>`; 446 } 447 } 448 return variationsList; 420 449 } 421 450 … … 491 520 return false; 492 521 } 493 const tooltip = sesmScripts.template.apply_template(sesmScripts.template.loaded_templates.errortooltip, { error: message, id: id});522 const tooltip = sesmScripts.template.apply_template(sesmScripts.template.loaded_templates.errortooltip, { error: message, id: id }); 494 523 if (jQuery('#input-error-' + id).length === 0) { 495 524 jQuery('#' + id).before(tooltip); … … 528 557 } 529 558 } 530 const { __, _x, _n, _nx} = wp.i18n; // Map the functions to the wp translation script559 const { __, _x, _n, _nx } = wp.i18n; // Map the functions to the wp translation script 531 560 532 561 const sesmScripts = new SesmMain; -
super-easy-stock-manager/trunk/scripts/sesm-app.min.js
r2837173 r3443355 1 "use strict";class SesmMain{sesm_do="";field_names={};scanner={};version="1.3.6";construct(){jQuery(document).ready((async function(){if(1!==jQuery("#sesm_container").length)return!1; await import("./modules/ajax.js").then(module=>{sesmScripts.ajax=new module.SesmAjax}),await import("./modules/template.js").then(module=>{sesmScripts.template=new module.SesmTemplate}),await sesmScripts.template.load_default_templates(),sesmScripts.load_field_names(),sesmScripts.add_event_listener(),sesmScripts.activate_sesm(),sesmScripts.is_mobile()}))}load_field_names(){this.field_names.price_title=__("Price","super-easy-stock-manager"),this.field_names.weight_title=__("Weight","super-easy-stock-manager"),this.field_names.quantity_title=__("Quantity","super-easy-stock-manager"),this.field_names.sku_title=__("SKU","super-easy-stock-manager"),this.field_names.iconclass=""}is_mobile(){return jQuery(window).width()<500||!!/Mobi|Android/i.test(navigator.userAgent)}add_event_listener(){jQuery("#sesm_buttons button").click((function(item){switch(sesmScripts.sesm_do=jQuery(item.currentTarget).data("do"),jQuery("#sesm_input .quant_flex_group").hide(),jQuery("#sesm_input .price_flex_group").hide(),jQuery("#sesm_buttons button.button-active").removeClass("button-active"),jQuery("#sesm_sku_input").slideDown("fast"),jQuery("#sesm_container #selection-indicator").slideDown("fast"),jQuery(item.currentTarget).addClass("button-active"),sesmScripts.is_mobile()?sesmScripts.show_scan_container():jQuery("#sesm_sku_input").focus(),sesmScripts.move_selection_indicator(),sesmScripts.sesm_do){case"add_quantities":jQuery(".sesm_options .quant_flex_group").slideDown("fast");break;case"update_price":jQuery(".sesm_options .price_flex_group").slideDown("fast")}})),jQuery("#scan-button").click(()=>{jQuery("#scan-button").hide(),jQuery("#scan-button-active").show(),sesmScripts.scanner=new Html5QrcodeScanner("scanner-container",{fps:10,qrbox:{width:250,height:250},useBarCodeDetectorIfSupported:!0,rememberLastUsedCamera:!0,showTorchButtonIfSupported:!0,defaultZoomValueIfSupported:2}),sesmScripts.scanner.render(sesmScripts.onScanSuccess,sesmScripts.onScanFailure)}),jQuery("#scan-button-active").click(()=>{jQuery("#scan-button").show(),jQuery("#scan-button-active").hide(),sesmScripts.scanner.clear()}),jQuery(document).on("keyup",(async function(s){13==s.which&&sesmScripts.fire_ajax()})),jQuery("#add_quant_btn").click((function(){sesmScripts.changeQuantity(!0)})),jQuery("#remove_quant_btn").click((function(){sesmScripts.changeQuantity(!1)})),jQuery("#sesm_container input").keyup(e=>{if(9===e.which||16===e.which||17===e.which)return;const value=e.currentTarget.value,id=e.currentTarget.id;sesmScripts.validate_input(value,id)?sesmScripts.remove_input_errors("#input-error-"+id):sesmScripts.show_input_error(id)}),jQuery(window).resize(()=>{sesmScripts.move_selection_indicator(0),sesmScripts.is_mobile()&&jQuery("#sesm_sku_input").attr("placeholder",__("Input SKU","super-easy-stock-manager"))})}async fire_ajax(){const ajaxResult=await sesmScripts.ajax.do_ajax();sesmScripts.empty(ajaxResult)?console.log("Failed to add to history: "+ajaxResult):sesmScripts.addToHistory(jQuery.parseJSON(ajaxResult))}onScanSuccess(code){if(sesmScripts.empty(code))return!1;jQuery("#sesm_sku_input").val(code),sesmScripts.scanner.clear(),jQuery("#scan-button").show(),jQuery("#scan-button-active").hide(),sesmScripts.fire_ajax(),console.log(code)}onScanFailure(message){console.log(message)}show_scan_container(){"flex"!==jQuery("#mobile-scan-container").css("display")&&(jQuery("#mobile-scan-container").css("display","flex"),jQuery("#mobile-scan-container").css("bottom",-jQuery("#mobile-scan-container").height()),jQuery("#mobile-scan-container").animate({bottom:0},200))}activate_sesm(){jQuery("#sesm_buttons").slideDown("fast")}move_selection_indicator(animationDuration=200){if(0===jQuery("#sesm_buttons .button-active").length)return;const activePosition=jQuery("#sesm_buttons .button-active")[0].offsetLeft,activeCenter=jQuery("#sesm_buttons .button-active").width()/2,padding=Number.parseInt(jQuery("#sesm_container").css("padding-left")),finalLeft=activePosition-padding+activeCenter;jQuery("#selection-indicator")[0].offsetLeft===padding&&(animationDuration=0,jQuery("#selection-indicator").animate({opacity:1},animationDuration)),jQuery("#selection-indicator").animate({left:finalLeft},animationDuration)}addToHistory(jsonData){let template=this.get_template_by_state(jsonData.template);this.empty(template)&&jQuery("#sesm_history").prepend(__(`Template "${jsonData.template}" not loaded`,"super-easy-stock-manager")),this.set_icon_class(jsonData.template);const attr=this.format_attributes(jsonData);this.empty(attr)||(jsonData.attributes=attr),jQuery.each(jsonData,(function(key,value){value=sesmScripts.format_value(key,value,jsonData),template=template.replaceAll("{{"+key+"}}",value)})),jQuery.each(this.field_names,(function(key,value){value=sesmScripts.format_value(key,value),template=template.replaceAll("{{"+key+"}}",value)})),jQuery("#sesm_history").addClass("active"),jQuery("#sesm_history").prepend(template),jQuery("#sesm_history article").first().animate({opacity:1,height:"100%"},500)}get_template_by_state(template){switch(template){case"error":return sesmScripts.template.loaded_templates.error;case"updateStock":return sesmScripts.template.loaded_templates.updatestock;case"updatePrice":return sesmScripts.template.loaded_templates.updateprice;default:return sesmScripts.template.loaded_templates.item}}set_icon_class(template){let classname="";switch(template){case"get":classname="fas fa-question";break;case"updateStock":classname="fas fa-box-open";break;case"updatePrice":classname="far fa-money-bill-alt"}this.field_names.iconclass=classname}format_attributes(jsonData){return this.empty(jsonData.attributes)?"":jsonData.attributes.replace(", ","<br/>")}format_value(fieldName,value,jsonData){switch(fieldName){case"stock_quantity":const number=parseInt(value);return number<1?"<span class='red'>"+number+"</span>":value;case"regular_price":return jsonData.sale_price?'<span class="strikethrough">'+value+" "+jsonData.currency+"</span>":value+" "+jsonData.currency;case"weight":return value+" kg";case"sale_price":return jsonData.sale_price?value+" "+jsonData.currency:"";case"manage_stock":return!1!==value?"":__("Stock management got activated","super-easy-stock-manager");case"to_regular":return sesmScripts.format_price_change(jsonData.from_regular,jsonData.to_regular,jsonData,fieldName);case"to_sale":return sesmScripts.format_price_change(jsonData.from_sale,jsonData.to_sale,jsonData,fieldName);default:return value}}format_price_change(fromPrice,toPrice,jsonData,fieldName){const priceLength=(jsonData.from_regular+jsonData.to_regular+jsonData.currency).length,priceLengthSale=(jsonData.from_sale+jsonData.to_sale+jsonData.currency).length,priceNotice="to_regular"===fieldName?jsonData.regular_notice:jsonData.sale_notice;if(!sesmScripts.empty(priceNotice))return'<div class="info-text">'+priceNotice+"</div>";if(fromPrice===toPrice)return"";if(sesmScripts.empty(toPrice))return"";const classLongContent=priceLength+priceLengthSale>7||jsonData.to_sale>0?"content-long":"",isSingleRegularClass=0===jsonData.to_sale?"single":"",isSingleSaleClass=0===jsonData.to_regular?"single":"";return"to_regular"===fieldName?'<div class="'+classLongContent+" "+isSingleRegularClass+'"><span class="from_price strikethrough">'+fromPrice+" "+jsonData.currency+'</span><span class="to_price">'+toPrice+" "+jsonData.currency+"</span></div>":'<div class="'+classLongContent+" "+isSingleSaleClass+'"><span class="from_price strikethrough">'+fromPrice+" "+jsonData.currency+'</span><span class="to_price">'+toPrice+" "+jsonData.currency+"</span></div>"}changeQuantity(add){const quant=this.empty(jQuery("#sesm_quant").val())?0:parseInt(jQuery("#sesm_quant").val());let newQuant=0;newQuant=!0===add?quant+1==0?1:quant+1:quant-1==0?-1:quant-1,newQuant=Number.isInteger(newQuant)?newQuant:0,jQuery("#sesm_quant").val(newQuant),jQuery("#sesm_sku_input").focus()}validate_input(value,type){let regex="";const allowEmpty=!0;switch(type){case"sesm_quant":regex=/^[0-9\.,]{1,}$/g;break;case"sesm_price_reg":case"sesm_price_sale":regex=/^[0-9\.,]{1,}$/g}return!!sesmScripts.empty(value)||!sesmScripts.empty(regex)&&null!==regex.exec(value)}show_input_error(id){let message="";switch(id){case"sesm_quant":message=__("The Quantity contains invalid characters. Only 0-9, comma (,) and period (.) are allowed","super-easy-stock-manager");break;case"sesm_price_reg":case"sesm_price_sale":message=__("The Price contains invalid characters. Only 0-9, comma (,) and period (.) are allowed","super-easy-stock-manager")}if(sesmScripts.empty(message))return!1;const tooltip=sesmScripts.template.apply_template(sesmScripts.template.loaded_templates.errortooltip,{error:message,id:id});0===jQuery("#input-error-"+id).length&&jQuery("#"+id).before(tooltip)}remove_input_errors(item=".input-error-field"){jQuery("#sesm_container "+item).remove()}empty(value){return null===value||(void 0===value||0===value.length)}}const{__:__,_x:_x,_n:_n,_nx:_nx}=wp.i18n,sesmScripts=new SesmMain;sesmScripts.construct();1 "use strict";class SesmMain{sesm_do="";field_names={};scanner={};version="1.3.6";construct(){jQuery(document).ready((async function(){if(1!==jQuery("#sesm_container").length)return!1;if(await import("./modules/ajax.js").then(module=>{sesmScripts.ajax=new module.SesmAjax}),await import("./modules/template.js").then(module=>{sesmScripts.template=new module.SesmTemplate}),await sesmScripts.template.load_default_templates(),sesmScripts.load_field_names(),sesmScripts.add_event_listener(),sesmScripts.activate_sesm(),!sesmScripts.is_mobile()){let autofocus=setInterval((function(){"sesm_quant"!==document.activeElement.id&&"sesm_price_reg"!==document.activeElement.id&&"sesm_price_sale"!==document.activeElement.id&&jQuery("#sesm_sku_input").focus()}),2e3)}}))}load_field_names(){this.field_names.price_title=__("Price","super-easy-stock-manager"),this.field_names.weight_title=__("Weight","super-easy-stock-manager"),this.field_names.quantity_title=__("Quantity","super-easy-stock-manager"),this.field_names.sku_title=__("SKU","super-easy-stock-manager"),this.field_names.iconclass=""}is_mobile(){return jQuery(window).width()<500||!!/Mobi|Android/i.test(navigator.userAgent)}add_event_listener(){jQuery("#sesm_buttons button").click((function(item){switch(sesmScripts.sesm_do=jQuery(item.currentTarget).data("do"),jQuery("#sesm_input .quant_flex_group").hide(),jQuery("#sesm_input .price_flex_group").hide(),jQuery("#sesm_buttons button.button-active").removeClass("button-active"),jQuery("#sesm_sku_input").slideDown("fast"),jQuery("#sesm_container #selection-indicator").slideDown("fast"),jQuery(item.currentTarget).addClass("button-active"),sesmScripts.is_mobile()?sesmScripts.show_scan_container():jQuery("#sesm_sku_input").focus(),sesmScripts.move_selection_indicator(),sesmScripts.sesm_do){case"add_quantities":jQuery(".sesm_options .quant_flex_group").slideDown("fast");break;case"update_price":jQuery(".sesm_options .price_flex_group").slideDown("fast")}})),jQuery("#scan-button").click(()=>{jQuery("#scan-button").hide(),jQuery("#scan-button-active").show(),sesmScripts.scanner=new Html5QrcodeScanner("scanner-container",{fps:10,qrbox:{width:250,height:250},useBarCodeDetectorIfSupported:!0,rememberLastUsedCamera:!0,showTorchButtonIfSupported:!0,defaultZoomValueIfSupported:2}),sesmScripts.scanner.render(sesmScripts.onScanSuccess,sesmScripts.onScanFailure)}),jQuery("#scan-button-active").click(()=>{jQuery("#scan-button").show(),jQuery("#scan-button-active").hide(),sesmScripts.scanner.clear()}),jQuery(document).on("keyup",(async function(s){13==s.which&&sesmScripts.fire_ajax()})),jQuery("#add_quant_btn").click((function(){sesmScripts.changeQuantity(!0)})),jQuery("#remove_quant_btn").click((function(){sesmScripts.changeQuantity(!1)})),jQuery("#sesm_container input").keyup(e=>{if(9===e.which||16===e.which||17===e.which)return;const value=e.currentTarget.value,id=e.currentTarget.id;sesmScripts.validate_input(value,id)?sesmScripts.remove_input_errors("#input-error-"+id):sesmScripts.show_input_error(id)}),jQuery(window).resize(()=>{sesmScripts.move_selection_indicator(0),sesmScripts.is_mobile()&&jQuery("#sesm_sku_input").attr("placeholder",__("Input SKU","super-easy-stock-manager"))})}async fire_ajax(){const ajaxResult=await sesmScripts.ajax.do_ajax();sesmScripts.empty(ajaxResult)?console.log("Failed to add to history: "+ajaxResult):sesmScripts.addToHistory(jQuery.parseJSON(ajaxResult))}onScanSuccess(code){if(sesmScripts.empty(code))return!1;jQuery("#sesm_sku_input").val(code),sesmScripts.scanner.clear(),jQuery("#scan-button").show(),jQuery("#scan-button-active").hide(),sesmScripts.fire_ajax(),console.log(code)}onScanFailure(message){console.log(message)}show_scan_container(){"flex"!==jQuery("#mobile-scan-container").css("display")&&(jQuery("#mobile-scan-container").css("display","flex"),jQuery("#mobile-scan-container").css("bottom",-jQuery("#mobile-scan-container").height()),jQuery("#mobile-scan-container").animate({bottom:0},200))}activate_sesm(){jQuery("#sesm_buttons").slideDown("fast")}move_selection_indicator(animationDuration=200){if(0===jQuery("#sesm_buttons .button-active").length)return;const activePosition=jQuery("#sesm_buttons .button-active")[0].offsetLeft,activeCenter=jQuery("#sesm_buttons .button-active").width()/2,padding=Number.parseInt(jQuery("#sesm_container").css("padding-left")),finalLeft=activePosition-padding+activeCenter;jQuery("#selection-indicator")[0].offsetLeft===padding&&(animationDuration=0,jQuery("#selection-indicator").animate({opacity:1},animationDuration)),jQuery("#selection-indicator").animate({left:finalLeft},animationDuration)}addToHistory(jsonData){let template=this.get_template_by_state(jsonData.template);this.empty(template)&&jQuery("#sesm_history").prepend(__(`Template "${jsonData.template}" not loaded`,"super-easy-stock-manager")),this.set_icon_class(jsonData.template);const attr=this.format_attributes(jsonData);this.empty(attr)||(jsonData.attributes=attr),jQuery.each(jsonData,(function(key,value){value=sesmScripts.format_value(key,value,jsonData),template=template.replaceAll("{{"+key+"}}",value)})),jQuery.each(this.field_names,(function(key,value){value=sesmScripts.format_value(key,value),template=template.replaceAll("{{"+key+"}}",value)})),jQuery("#sesm_history").addClass("active"),jQuery("#sesm_history").prepend(template),jQuery("#sesm_history article").first().animate({opacity:1,height:"100%"},500)}get_template_by_state(template){switch(template){case"error":return sesmScripts.template.loaded_templates.error;case"updateStock":return sesmScripts.template.loaded_templates.updatestock;case"updatePrice":return sesmScripts.template.loaded_templates.updateprice;default:return sesmScripts.template.loaded_templates.item}}set_icon_class(template){let classname="";switch(template){case"get":classname="fas fa-question";break;case"updateStock":classname="fas fa-box-open";break;case"updatePrice":classname="far fa-money-bill-alt"}this.field_names.iconclass=classname}format_attributes(jsonData){return this.empty(jsonData.attributes)?"":jsonData.attributes.replace(", ","<br/>")}format_value(fieldName,value,jsonData){switch(fieldName){case"stock_quantity":const number=parseInt(value);return number<1?"<span class='red'>"+number+"</span>":value;case"regular_price":return jsonData.sale_price?'<span class="strikethrough">'+value+" "+jsonData.currency+"</span>":value+" "+jsonData.currency;case"sale_price":return jsonData.sale_price?value+" "+jsonData.currency:"";case"manage_stock":return!1!==value?"":__("Stock management got activated","super-easy-stock-manager");case"to_regular":return sesmScripts.format_price_change(jsonData.from_regular,jsonData.to_regular,jsonData,fieldName);case"to_sale":return sesmScripts.format_price_change(jsonData.from_sale,jsonData.to_sale,jsonData,fieldName);case"product_variations":const list=sesmScripts.format_product_variations(jsonData.product_variations),title=__("Other variants of this product","super-easy-stock-manager");return this.empty(list)?"":`<details><summary>${title}</summary><ul>${list}</ul></details>`;default:return value}}format_price_change(fromPrice,toPrice,jsonData,fieldName){const priceLength=(jsonData.from_regular+jsonData.to_regular+jsonData.currency).length,priceLengthSale=(jsonData.from_sale+jsonData.to_sale+jsonData.currency).length,priceNotice="to_regular"===fieldName?jsonData.regular_notice:jsonData.sale_notice;if(!sesmScripts.empty(priceNotice))return'<div class="info-text">'+priceNotice+"</div>";if(fromPrice===toPrice)return"";if(sesmScripts.empty(toPrice))return"";const classLongContent=priceLength+priceLengthSale>7||jsonData.to_sale>0?"content-long":"",isSingleRegularClass=0===jsonData.to_sale?"single":"",isSingleSaleClass=0===jsonData.to_regular?"single":"";return"to_regular"===fieldName?'<div class="'+classLongContent+" "+isSingleRegularClass+'"><span class="from_price strikethrough">'+fromPrice+" "+jsonData.currency+'</span><span class="to_price">'+toPrice+" "+jsonData.currency+"</span></div>":'<div class="'+classLongContent+" "+isSingleSaleClass+'"><span class="from_price strikethrough">'+fromPrice+" "+jsonData.currency+'</span><span class="to_price">'+toPrice+" "+jsonData.currency+"</span></div>"}format_product_variations(variations){let variationsList="";for(let key in variations)if(variations.hasOwnProperty(key)){const attributes=sesmScripts.format_attributes(variations[key]),stock=variations[key].stock;variationsList+=`<li><span>${attributes}</span><span>${stock}</span></li>`}return variationsList}changeQuantity(add){const quant=this.empty(jQuery("#sesm_quant").val())?0:parseInt(jQuery("#sesm_quant").val());let newQuant=0;newQuant=!0===add?quant+1==0?1:quant+1:quant-1==0?-1:quant-1,newQuant=Number.isInteger(newQuant)?newQuant:0,jQuery("#sesm_quant").val(newQuant),jQuery("#sesm_sku_input").focus()}validate_input(value,type){let regex="";const allowEmpty=!0;switch(type){case"sesm_quant":regex=/^[0-9\.,]{1,}$/g;break;case"sesm_price_reg":case"sesm_price_sale":regex=/^[0-9\.,]{1,}$/g}return!!sesmScripts.empty(value)||!sesmScripts.empty(regex)&&null!==regex.exec(value)}show_input_error(id){let message="";switch(id){case"sesm_quant":message=__("The Quantity contains invalid characters. Only 0-9, comma (,) and period (.) are allowed","super-easy-stock-manager");break;case"sesm_price_reg":case"sesm_price_sale":message=__("The Price contains invalid characters. Only 0-9, comma (,) and period (.) are allowed","super-easy-stock-manager")}if(sesmScripts.empty(message))return!1;const tooltip=sesmScripts.template.apply_template(sesmScripts.template.loaded_templates.errortooltip,{error:message,id:id});0===jQuery("#input-error-"+id).length&&jQuery("#"+id).before(tooltip)}remove_input_errors(item=".input-error-field"){jQuery("#sesm_container "+item).remove()}empty(value){return null===value||(void 0===value||0===value.length)}}const{__:__,_x:_x,_n:_n,_nx:_nx}=wp.i18n,sesmScripts=new SesmMain;sesmScripts.construct(); -
super-easy-stock-manager/trunk/style/sesm-main.css
r2827548 r3443355 7 7 --sesm-button-color: rgb(255, 182, 0); 8 8 --sesm-button-text-color: rgb(0, 0, 0); 9 --sesm-button-text-color-disabled: rgb(117, 117, 117); 9 10 --sesm-button-border: rgb(0 0 0); 10 11 --sesm-box-border: rgb(189, 189, 189); … … 12 13 --sesm-border-radius: 5px; 13 14 --sesm-error-color: rgb(255, 0, 0); 15 --sesm-scan-container-height: 80px; 16 --sesm-white: white; 14 17 } 15 18 … … 36 39 } 37 40 } 38 39 #sesm_container { 40 padding: 1rem; 41 body main #sesm_container { 42 padding: 1em; 43 font-size: 16px; 44 color: var(--sesm-button-text-color); 45 position: relative; 46 margin-bottom: calc(var(--sesm-scan-container-height) + 2rem); 47 } 48 body main #sesm_container #selection-indicator { 49 display: block; 50 width: 4px; 51 height: 1.55em; 52 background-color: var(--sesm-button-border); 53 left: 0; 54 top: 0; 55 opacity: 0; 56 position: relative; 57 } 58 body main #sesm_container #mobile-scan-container { 59 width: 100%; 60 height: var(--sesm-scan-container-height); 61 position: fixed; 62 bottom: 0; 63 left: 0; 64 display: flex; 65 justify-content: center; 66 align-items: center; 67 background-color: var(--sesm-button-color); 68 display: none; 69 } 70 body main #sesm_container #mobile-scan-container #scan-button-active { 71 display: none; 72 } 73 body main #sesm_container #mobile-scan-container .scan-button-style { 74 display: flex; 75 justify-content: center; 76 align-items: center; 77 flex-direction: row; 78 border: 1px solid var(--sesm-button-border); 79 cursor: pointer; 80 width: 4em; 81 height: 1.5em; 82 font-size: 2em; 83 gap: 0.25em; 84 background-color: var(--sesm-button-color); 85 border-radius: 1em; 86 } 87 body main #sesm_container #mobile-scan-container #scanner-container { 88 position: absolute !important; 89 left: 0; 90 display: block; 91 width: 100%; 92 bottom: var(--sesm-scan-container-height); 93 background-color: var(--sesm-button-color); 94 border: none !important; 95 /* Style of the camera interface*/ 96 } 97 body main #sesm_container #mobile-scan-container #scanner-container #scanner-container__dashboard_section_csr { 98 height: 2.5em; 99 color: transparent; 100 /* Workaround to hide the camera count*/ 101 } 102 body main #sesm_container #mobile-scan-container #scanner-container #html5-qrcode-anchor-scan-type-change { 103 display: none !important; 104 } 105 body main #sesm_container #mobile-scan-container #scanner-container #html5-qrcode-button-camera-start, 106 body main #sesm_container #mobile-scan-container #scanner-container #html5-qrcode-button-camera-stop { 107 position: absolute; 108 right: 4%; 109 width: 45%; 110 height: 3em; 111 border-radius: 2em; 112 background-color: var(--sesm-button-color); 113 border: solid 1px var(--sesm-button-border); 114 color: var(--sesm-button-text-color); 115 font-size: 1.2em; 116 } 117 body main #sesm_container #mobile-scan-container #scanner-container #html5-qrcode-select-camera { 118 position: absolute; 119 left: 4%; 120 width: 45%; 121 height: 3em; 122 border-radius: 2em; 123 background-color: var(--sesm-button-color); 124 border: solid 1px var(--sesm-button-border); 125 color: var(--sesm-button-text-color); 126 font-size: 1.2em; 127 padding-left: 1em; 128 } 129 body main #sesm_container #mobile-scan-container #scanner-container #html5-qrcode-select-camera:disabled { 130 color: var(--sesm-button-text-color-disabled); 131 border: solid 1px var(--sesm-button-text-color-disabled); 41 132 } 42 133 … … 44 135 display: grid; 45 136 grid-template-columns: auto auto auto; 46 column-gap: 3em;47 justify-content: center;48 padding-bottom: 1.5rem;49 } 50 137 -moz-column-gap: 3em; 138 column-gap: 3em; 139 justify-content: center; 140 padding-bottom: 0; 141 } 51 142 #sesm_buttons > button { 52 font-size: 3rem;53 width: 6.5rem;54 height: 6.5rem;143 font-size: 2em; 144 width: 3em; 145 height: 3em; 55 146 border-radius: 50%; 56 147 background-color: var(--sesm-button-color); 57 border: solid 1px var(--sesm-button-border);148 border: solid 2px var(--sesm-button-border); 58 149 position: relative; 59 150 cursor: pointer; 60 } 61 62 #sesm_buttons #selection-indicator { 63 display: none; 64 width: 0.2rem; 65 height: 2rem; 66 position: absolute; 67 background-color: var(--sesm-button-border); 68 left: 2.9rem; 69 top: 6.2rem; 70 z-index: -1; 151 padding: 0; 71 152 } 72 153 … … 75 156 margin: 0 auto; 76 157 } 77 78 158 #sesm_input .sesm_options > div { 79 margin-bottom: 1rem; 80 } 81 159 margin-bottom: 1em; 160 } 161 #sesm_input .sesm_options .input-error-field { 162 position: absolute; 163 width: 100%; 164 bottom: 4em; 165 display: flex; 166 align-items: center; 167 justify-content: center; 168 font-size: 1em; 169 color: black; 170 } 171 #sesm_input .sesm_options .input-error-field .error-message { 172 background-color: var(--sesm-white); 173 border: 2px solid var(--sesm-error-color); 174 padding: 1em; 175 border-radius: var(--sesm-border-radius); 176 text-align: center; 177 width: 80%; 178 } 179 #sesm_input .sesm_options .input-error-field::after { 180 content: ""; 181 background-color: var(--sesm-error-color); 182 rotate: 45deg; 183 width: 1em; 184 height: 1em; 185 display: block; 186 position: absolute; 187 bottom: -0.5em; 188 z-index: -1; 189 left: 50%; 190 } 82 191 #sesm_input .price_flex_group > div { 83 192 display: flex; … … 85 194 text-align: center; 86 195 width: 50%; 87 } 88 196 position: relative; 197 } 89 198 #sesm_input .price_flex_group { 90 199 display: flex; 91 gap: 1 rem;200 gap: 1em; 92 201 justify-content: space-between; 93 } 94 202 position: relative; 203 } 95 204 #sesm_input input { 96 205 width: 99%; 97 height: 2 rem;206 height: 2.5em; 98 207 border-radius: var(--sesm-border-radius); 99 208 text-align: center; 100 font-size: 1.2rem; 101 } 102 209 font-size: 1.2em; 210 border: 1px solid var(--sesm-button-border); 211 box-shadow: inset 1px 2px 7px rgba(0, 0, 0, 0.167); 212 } 103 213 #sesm_input input:focus-visible { 104 214 outline-color: var(--sesm-button-color); 105 215 outline-style: solid; 106 outline-width: 0.2 rem;216 outline-width: 0.2em; 107 217 outline-offset: -3px; 108 218 } 109 110 219 #sesm_input #sesm_sku_input { 111 margin-bottom: 1 rem;112 } 113 220 margin-bottom: 1em; 221 width: 100%; 222 } 114 223 #sesm_input #sesm_sku_input_loader.active { 115 224 display: block; 116 225 background-color: var(--sesm-button-color); 117 height: 0.5 rem;226 height: 0.5em; 118 227 width: 0%; 119 228 left: 0%; 120 229 position: relative; 121 top: -1.3 rem;230 top: -1.3em; 122 231 animation: bounce 3s; 123 } 124 232 animation-iteration-count: 100; 233 } 125 234 #sesm_input .quant_flex_group { 126 235 display: flex; 127 236 justify-content: space-between; 128 gap: 0.5 rem;129 } 130 237 gap: 0.5em; 238 position: relative; 239 } 131 240 #sesm_input .quant_flex_group .options_button { 132 font-size: 1rem; 133 width: 3em; 241 font-size: 1em; 242 min-width: 3em; 243 min-height: 3em; 244 padding: 0; 134 245 border-radius: var(--sesm-border-radius); 135 246 background-color: var(--sesm-button-color); 136 247 border: solid 1px var(--sesm-button-border); 137 } 138 248 cursor: pointer; 249 } 139 250 #sesm_input .sesm_label.add_quantities { 140 251 display: block; … … 148 259 gap: 1em; 149 260 } 150 151 261 #sesm_history dl { 152 262 margin: 0; … … 154 264 flex-direction: column; 155 265 } 156 157 266 #sesm_history dt { 158 267 font-weight: bold; 159 268 } 160 161 269 #sesm_history .content > dl:first-child() { 162 270 margin-bottom: 0; 163 271 } 164 165 272 #sesm_history .content > dl:last-child() { 166 273 margin-top: 0; 167 274 } 168 169 275 #sesm_history dd { 170 margin-left: 0; 171 } 172 276 margin: 0; 277 } 278 #sesm_history .meta-block > * { 279 margin-bottom: 0.25em; 280 } 173 281 #sesm_history .content .two-column-grid { 174 282 display: grid; 175 283 grid-template-columns: 1fr 1fr; 176 284 } 177 178 285 #sesm_history .content .two-column-grid dl:last-child { 179 286 text-align: right; 180 287 } 181 182 #sesm_history h2 { 183 font-size: 1.5rem; 288 #sesm_history .content { 289 min-height: 19em; 290 display: flex; 291 flex-direction: column; 292 justify-content: space-between; 293 } 294 #sesm_history .content h2 { 295 font-size: 1.5em; 296 min-height: 3em; 297 font-weight: bold; 184 298 margin-top: 0; 185 299 margin-bottom: 0; 186 } 187 188 #sesm_history h3 { 189 margin-top: 0.2rem; 190 margin-bottom: 0.1rem; 191 font-size: 1rem; 192 } 193 194 #sesm_history h4 { 195 font-size: 1.1rem; 196 } 197 198 #sesm_history h4.attr { 199 font-size: 1rem; 200 min-height: 3.5rem; 201 } 202 300 color: var(--sesm-button-text-color); 301 word-break: break-word; 302 } 303 #sesm_history .content h3 { 304 margin-top: 0.2em; 305 margin-bottom: 0.1em; 306 font-size: 1em; 307 font-weight: bold; 308 color: var(--sesm-button-text-color); 309 word-break: break-word; 310 } 311 #sesm_history .content h4 { 312 font-size: 1.1em; 313 color: var(--sesm-button-text-color); 314 word-break: break-word; 315 } 316 #sesm_history .content h4.attr { 317 font-size: 1em; 318 font-weight: normal; 319 margin: 0; 320 } 321 #sesm_history .content h4.description { 322 margin: 0; 323 } 203 324 #sesm_history article { 204 padding: 0 1.3 rem;325 padding: 0 1.3em 1.3em 1.3em; 205 326 max-width: 100%; 206 327 position: relative; … … 209 330 background-color: var(--sesm-background); 210 331 } 211 212 332 #sesm_history article.item { 213 333 opacity: 0; 214 334 height: 0%; 215 335 } 216 217 336 #sesm_history article.item .image-con { 218 height: 5 rem;337 height: 5em; 219 338 border-radius: var(--sesm-border-radius); 220 339 overflow: hidden; … … 222 341 align-items: center; 223 342 justify-content: center; 224 margin-top: 1.3rem; 225 } 226 343 margin-top: 1.3em; 344 } 227 345 #sesm_history article.item .image-con img { 228 346 height: 100%; … … 230 348 border-radius: var(--sesm-border-radius); 231 349 } 232 233 350 #sesm_history article.item .strikethrough { 234 351 text-decoration: line-through; 235 padding-right: 0.5rem; 236 } 237 352 padding-right: 0.5em; 353 } 238 354 #sesm_history article.item.update .text-con { 239 355 display: flex; … … 242 358 text-align: center; 243 359 flex-direction: column; 244 width: 100%;360 width: 60%; 245 361 border-radius: var(--sesm-border-radius); 246 362 border: 1px solid var(--sesm-button-border); 247 height: 5 rem;248 margin-top: 1.3 rem;249 } 250 363 height: 5em; 364 margin-top: 1.3em; 365 padding: 0 20%; 366 } 251 367 #sesm_history article.item.update.price .big-text { 252 font-size: 1.5 rem;368 font-size: 1.5em; 253 369 display: flex; 254 370 flex-direction: column; 255 371 font-weight: bold; 256 372 } 257 373 #sesm_history article.item.update.price .info-text { 374 font-size: 0.7em; 375 font-weight: normal; 376 } 258 377 #sesm_history article.item.update.stock .big-text { 259 font-size: 1.5rem; 260 } 261 262 #sesm_history article.item.update.price .big-text .content-long, 263 #sesm_history article.item.update.stock .big-text .content-long { 264 font-size: 1.2rem; 265 } 266 267 #sesm_history article.item.update .big-text .single { 268 display: flex; 269 flex-direction: column; 270 } 271 272 #sesm_history article.item.update .big-text .single .strikethrough { 378 font-size: 1.5em; 379 } 380 #sesm_history article.item.update.price .big-text .content-long, #sesm_history article.item.update.stock .big-text .content-long { 381 font-size: 0.8em; 382 } 383 #sesm_history article.item.update.price .big-text .single, #sesm_history article.item.update.stock .big-text .single { 384 display: flex; 385 flex-direction: column; 386 font-size: 1.2em; 387 } 388 #sesm_history article.item.update.price .big-text .single .strikethrough, #sesm_history article.item.update.stock .big-text .single .strikethrough { 273 389 padding-right: 0; 274 390 } 275 276 391 #sesm_history article.item.error .text-con { 277 392 width: 90%; 278 393 border-radius: var(--sesm-border-radius); 279 394 border: 1px solid var(--sesm-button-border); 280 height: 5 rem;281 display: flex; 282 justify-content: center; 283 align-items: center; 284 margin-bottom: 1 rem;395 height: 5em; 396 display: flex; 397 justify-content: center; 398 align-items: center; 399 margin-bottom: 1em; 285 400 margin-left: 5%; 286 401 margin-right: 5%; 287 margin-top: 5%; 288 } 289 402 margin-top: 1em; 403 } 290 404 #sesm_history article.item.error .title { 291 font-size: 2rem; 292 } 293 294 #sesm_history article .content { 295 min-height: 19rem; 296 } 297 405 font-size: 2em; 406 } 407 #sesm_history article .children-block summary { 408 font-weight: bold; 409 font-size: 1rem; 410 cursor: pointer; 411 } 412 #sesm_history article .children-block ul { 413 list-style-type: disc; 414 } 415 #sesm_history article .children-block li { 416 display: flex; 417 justify-content: space-between; 418 margin-bottom: 0.5em; 419 align-items: end; 420 border-bottom: 1px solid var(--sesm-button-color); 421 } 422 #sesm_history article:not(.error) .icon i:hover::before { 423 content: "\f044"; 424 font-weight: 700; 425 } 298 426 #sesm_history .icon { 299 427 display: flex; 300 428 justify-content: center; 429 align-items: center; 301 430 position: absolute; 302 right: 0.5rem; 303 top: 0.5rem; 304 padding: 0.5rem; 305 height: 2rem; 306 width: 2rem; 307 font-size: 2rem; 308 border-radius: var(--sesm-border-radius); 309 background-color: var(--sesm-button-color); 431 right: 0.2em; 432 top: 0.2em; 433 padding: 0.25em; 434 height: 2em; 435 width: 2em; 436 font-size: 2em; 437 border-radius: var(--sesm-border-radius); 438 background-color: var(--sesm-button-color); 439 height: 1.5em; 440 width: 1.5em; 441 } 442 #sesm_history .icon i { 443 font-size: 1em; 444 color: var(--sesm-button-text-color); 310 445 } 311 446 … … 316 451 } 317 452 #sesm_buttons { 318 gap: 1.5 rem;453 gap: 1.5em; 319 454 } 320 455 #sesm_buttons > button { 321 width: 4rem; 322 height: 4rem; 323 font-size: 2rem; 456 width: 2em; 457 height: 2em; 458 font-size: 2em; 459 border-width: 1px; 460 } 461 #sesm_input input { 462 height: 2em; 324 463 } 325 464 #sesm_input .sesm_options { 326 465 width: 100%; 327 466 } 328 #sesm_buttons #selection-indicator { 329 left: 1.7rem; 330 top: 3.5rem; 331 } 332 } 333 467 #sesm_input .sesm_options .quant_flex_group .options_button { 468 min-width: 2.5em; 469 min-height: 2.5em; 470 } 471 #sesm_container #selection-indicator { 472 height: 1em; 473 } 474 } 334 475 @media screen and (min-width: 501px) and (max-width: 850px) { 335 476 #sesm_history { … … 337 478 grid-template-columns: 1fr 1fr; 338 479 } 339 } 340 /*# sourceMappingURL=sesm-main.css.map */ 480 }/*# sourceMappingURL=sesm-main.css.map */ -
super-easy-stock-manager/trunk/style/sesm-main.css.map
r2827548 r3443355 1 { 2 "version": 3, 3 "mappings": "AAAA;;;;EAIE;AAEF,AAAA,IAAI,CAAC;EAED,mBAAmB,CAAA,iBAAC;EACpB,wBAAwB,CAAA,aAAC;EACzB,oBAAoB,CAAA,WAAC;EACrB,iBAAiB,CAAA,mBAAC;EAClB,iBAAiB,CAAA,wBAAC;EAClB,oBAAoB,CAAA,IAAC;EACrB,kBAAkB,CAAA,eAAC;CACtB;;AAED,UAAU,CAAV,MAAU;EACN,EAAE;IACE,KAAK,EAAE,EAAE;IACT,IAAI,EAAE,CAAC;;EAGX,GAAG;IACC,KAAK,EAAE,IAAI;IACX,IAAI,EAAE,CAAC;;EAGX,GAAG;IACC,KAAK,EAAE,EAAE;IACT,IAAI,EAAE,IAAI;;EAGd,GAAG;IACC,KAAK,EAAE,IAAI;IACX,IAAI,EAAE,EAAE;;EAGZ,IAAI;IACA,KAAK,EAAE,EAAE;IACT,IAAI,EAAE,EAAE;;;;AAKhB,AAAA,eAAe,CAAC;EACZ,OAAO,EAAE,IAAI;CAChB;;AAED,AAAA,aAAa,CAAC;EACV,OAAO,EAAE,IAAI;EACb,qBAAqB,EAAE,cAAc;EACrC,UAAU,EAAE,GAAG;EACf,eAAe,EAAE,MAAM;EACvB,cAAc,EAAE,MAAM;CAyBzB;;AA9BD,AAOI,aAPS,GAOP,MAAM,CAAC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C,MAAM,MAAM,SAAS,EAAE,KAAK;EAC/B,AAAA,aAAa,CAAC;IACV,OAAO,EAAE,IAAI;IACb,qBAAqB,EAAE,GAAG;GAC7B;EAED,AAAA,aAAa,CAAC;IACV,GAAG,EAAE,MAAM;GACd;EAED,AAAA,aAAa,GAAC,MAAM,CAAC;IACjB,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,IAAI;IACZ,SAAS,EAAE,IAAI;GAClB;EAED,AAAA,WAAW,CAAC,aAAa,CAAC;IACtB,KAAK,EAAE,IAAI;GACd;EAED,AAAA,aAAa,CAAC,oBAAoB,CAAC;IAC/B,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE,MAAM;GACd;;;AAIL,MAAM,CAAC,MAAM,MAAM,SAAS,EAAE,KAAK,OAAO,SAAS,EAAE,KAAK;EACtD,AAAA,aAAa,CAAC;IACV,OAAO,EAAE,IAAI;IACb,qBAAqB,EAAE,OAAO;GACjC", 4 "sources": [ 5 "sesm-main.scss" 6 ], 7 "names": [], 8 "file": "sesm-main.css" 9 } 1 {"version":3,"sources":["sesm-main.scss","sesm-main.css"],"names":[],"mappings":"AAAA;;;;CAAA;AAMA;EAEI,qCAAA;EACA,sCAAA;EACA,qDAAA;EACA,gCAAA;EACA,qCAAA;EACA,0CAAA;EACA,yBAAA;EACA,kCAAA;EACA,kCAAA;EACA,mBAAA;ACDJ;;ADMA;EACI;IACI,SAAA;IACA,OAAA;ECHN;EDME;IACI,WAAA;IACA,OAAA;ECJN;EDOE;IACI,SAAA;IACA,UAAA;ECLN;EDQE;IACI,WAAA;IACA,QAAA;ECNN;EDSE;IACI,SAAA;IACA,QAAA;ECPN;AACF;ADWA;EACI,YAAA;EACA,eAAA;EACA,oCAAA;EACA,kBAAA;EACA,6DAAA;ACTJ;ADWI;EACI,cAAA;EACA,UAAA;EACA,cAAA;EACA,2CAAA;EACA,OAAA;EACA,MAAA;EACA,UAAA;EACA,kBAAA;ACTR;ADYI;EACI,WAAA;EACA,yCAAA;EAC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2FQ;EACI,gBAAA;EACA,gBAAA;ACzFZ;AD6FI;EACI,aAAA;EACA,uBAAA;EACA,mBAAA;EACA,kBAAA;EACA,YAAA;EACA,UAAA;EACA,eAAA;EACA,WAAA;EACA,UAAA;EACA,cAAA;EACA,wCAAA;EACA,0CAAA;EACA,aAAA;EACA,YAAA;AC3FR;AD6FQ;EACI,cAAA;EACA,oCAAA;AC3FZ;;ADoGA;EACI;IACI,aAAA;IACA,0BAAA;ECjGN;EDoGE;IACI,UAAA;EClGN;EDqGE;IACI,UAAA;IACA,WAAA;IACA,cAAA;IACA,iBAAA;ECnGN;EDsGE;IACI,WAAA;ECpGN;EDuGE;IACI,WAAA;ECrGN;EDyGU;IACI,gBAAA;IACA,iBAAA;ECvGd;ED6GE;IACI,WAAA;EC3GN;AACF;AD+GA;EACI;IACI,aAAA;IACA,8BAAA;EC7GN;AACF","file":"sesm-main.css"} -
super-easy-stock-manager/trunk/style/sesm-main.scss
r2837173 r3443355 49 49 50 50 51 #sesm_container {51 body main #sesm_container { 52 52 padding: 1em; 53 53 font-size: 16px; 54 54 color: var(--sesm-button-text-color); 55 55 position: relative; 56 margin-bottom: 3em;56 margin-bottom: calc(var(--sesm-scan-container-height) + 2rem); 57 57 58 58 #selection-indicator { … … 352 352 h2 { 353 353 font-size: 1.5em; 354 height: 3em;354 min-height: 3em; 355 355 font-weight: bold; 356 356 margin-top: 0; … … 364 364 margin-bottom: 0.1em; 365 365 font-size: 1em; 366 font-weight: normal;366 font-weight: bold; 367 367 color: var(--sesm-button-text-color); 368 368 word-break: break-word; … … 387 387 388 388 article { 389 padding: 0 1.3em ;389 padding: 0 1.3em 1.3em 1.3em; 390 390 max-width: 100%; 391 391 position: relative; … … 488 488 } 489 489 490 .children-block{ 491 summary{ 492 font-weight: bold; 493 font-size: 1rem; 494 cursor: pointer; 495 } 496 ul{ 497 list-style-type: disc; 498 } 499 li{ 500 display: flex; 501 justify-content: space-between; 502 margin-bottom: 0.5em; 503 align-items: end; 504 border-bottom: 1px solid var(--sesm-button-color); 505 } 506 } 507 490 508 } 491 509 -
super-easy-stock-manager/trunk/super-easy-stock-manager.php
r2837173 r3443355 4 4 * Plugin Name: Super Easy Stock Manager 5 5 * Description: Stock Management with ease! 6 * Version: 1. 3.67 * Stable tag: 1. 3.66 * Version: 1.4.1 7 * Stable tag: 1.4.1 8 8 * Author: Dan's Art 9 9 * Author URI: http://dev.dans-art.ch … … 17 17 * 18 18 * Requires at least: 5.4.0 19 * Tested up to: 6.1.1 19 * Tested up to: 6.9 20 * WC requires at least: 4.7.0 21 * WC tested up to: 10.4.3 22 * Requires Plugins: woocommerce 20 23 * 21 24 * Text Domain: super-easy-stock-manager … … 44 47 define('SESM_MAIN_URL', plugin_dir_url(__FILE__)); 45 48 46 $sesm = new Super_Easy_Stock_Manager(); 49 add_action('init', function () { 50 $sesm = new Super_Easy_Stock_Manager(); 51 }); -
super-easy-stock-manager/trunk/templates/frontend/item-update-stock.html
r2837173 r3443355 5 5 <div class="text-con"> 6 6 <div class="big-text"> 7 {{ from_quant}} <i class="fa-solid fa-arrow-right"></i> {{to_quant}}7 {{stock_quantity}} 8 8 </div> 9 9 <div class="info-text"> -
super-easy-stock-manager/trunk/templates/frontend/item.html
r2837173 r3443355 32 32 </dl> 33 33 </div> 34 <div class="children-block"> 35 {{product_variations}} 36 </div> 34 37 </div> 35 38
Note: See TracChangeset
for help on using the changeset viewer.