From 286abc633c0e7d65eea0130ad1402587bc4cfd23 Mon Sep 17 00:00:00 2001 From: banana Date: Fri, 29 Oct 2021 13:21:28 -0500 Subject: [PATCH] add items --- web/staff/op_tools/add_items.py | 1 + web/staff/op_tools/add_items_js.py | 25 ++++++++++++++----------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/web/staff/op_tools/add_items.py b/web/staff/op_tools/add_items.py index c55d096..fa6a483 100755 --- a/web/staff/op_tools/add_items.py +++ b/web/staff/op_tools/add_items.py @@ -77,6 +77,7 @@ else: print('''

Not all required fields were filled out

''') + print('''
''') print('''item name*: ''') print('''item size*: size unit*: '; newpricerow += '
'; - $('#main', window.parent.main.document).append(newpricerow); - $('#'+price_id+'_table',window.parent.main.document).append(newrow); + $('#main', document).append(newpricerow); + $('#'+price_id+'_table',document).append(newrow); } - $('.price',window.parent.main.document).keypress(parent.main.handlePriceChange); - $('.ditemid', window.parent.main.document).keypress(parent.main.handleDItemChange); - $('.casesize', window.parent.main.document).keypress(parent.main.handleCaseSizeChange); - $('.casecost', window.parent.main.document).keypress(parent.main.handleCaseCostChange); - $('.group', window.parent.main.document).keypress(parent.main.handleGroupChange); - $('.amt', window.parent.main.document).keypress(parent.main.handleAmtChange); + // $('.price',document).keypress(parent.main.handlePriceChange); + // $('.ditemid', document).keypress(parent.main.handleDItemChange); + // $('.casesize', document).keypress(parent.main.handleCaseSizeChange); + // $('.casecost', document).keypress(parent.main.handleCaseCostChange); + // $('.group', document).keypress(parent.main.handleGroupChange); + // $('.amt', document).keypress(parent.main.handleAmtChange); +// commented out bc idk what is happening -CR 10/29/21 +$('#msg').text('Item ' + item_id + ' added.'); $('#name').val(''); $('#itemsize').val(''); @@ -125,7 +127,8 @@ $('#case_size').val(''); $('#price').val(''); - parent.main.updateMargins(price_id); + +// parent.main.updateMargins(price_id); } else{ alert(data); @@ -138,7 +141,7 @@ - +print('''
''') print('''item name*: ''') print('''item size*: size unit*: