From: Sven Schöling Date: Thu, 9 Jun 2016 12:43:35 +0000 (+0200) Subject: Order: javascript Kleinigkeiten X-Git-Tag: release-3.4.1~78 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=7ede2933981323a1619a3b5ece3cc1f60a532a40;p=kivitendo-erp.git Order: javascript Kleinigkeiten --- diff --git a/js/kivi.Order.js b/js/kivi.Order.js index d933def6f..ad84d98e0 100644 --- a/js/kivi.Order.js +++ b/js/kivi.Order.js @@ -1,12 +1,12 @@ namespace('kivi.Order', function(ns) { ns.check_cv = function() { if ($('#type').val() == 'sales_order') { - if ($('#order_customer_id').val() == '') { + if ($('#order_customer_id').val() === '') { alert(kivi.t8('Please select a customer.')); return false; } } else { - if ($('#order_vendor_id').val() == '') { + if ($('#order_vendor_id').val() === '') { alert(kivi.t8('Please select a vendor.')); return false; } @@ -199,14 +199,14 @@ namespace('kivi.Order', function(ns) { kivi.run_once_for('.row_entry', 'on_kbd_click_show_hide', function(elt) { $(elt).keydown(function(event) { var row; - if(event.keyCode == 40 && event.shiftKey == true) { + if(event.keyCode == 40 && event.shiftKey === true) { // shift arrow down event.preventDefault(); row = $(event.target).parents(".row_entry").first(); $(row).children().not(':first').show(); return false; } - if(event.keyCode == 38 && event.shiftKey == true) { + if(event.keyCode == 38 && event.shiftKey === true) { // shift arrow up event.preventDefault(); row = $(event.target).parents(".row_entry").first(); @@ -246,7 +246,7 @@ namespace('kivi.Order', function(ns) { } else { dir = "1"; src = "image/down.png"; - }; + } $('#' + order_by + '_header_id a').append('' + kivi.t8('sort items') + ''); @@ -269,7 +269,7 @@ namespace('kivi.Order', function(ns) { }; ns.add_item = function() { - if ($('#add_item_parts_id').val() == '') return; + if ($('#add_item_parts_id').val() === '') return; if (!ns.check_cv()) return; $('#row_table_id thead a img').remove(); @@ -379,7 +379,7 @@ namespace('kivi.Order', function(ns) { var editable_div_elt = $(row).find('[name="editable_price"]'); var not_editable_div_elt = $(row).find('[name="not_editable_price"]'); - if (price_editable == 1 && source == '') { + if (price_editable == 1 && source === '') { // editable $(editable_div_elt).show(); $(not_editable_div_elt).hide(); @@ -414,7 +414,7 @@ namespace('kivi.Order', function(ns) { var editable_div_elt = $(row).find('[name="editable_discount"]'); var not_editable_div_elt = $(row).find('[name="not_editable_discount"]'); - if (price_editable == 1 && source == '') { + if (price_editable == 1 && source === '') { // editable $(editable_div_elt).show(); $(not_editable_div_elt).hide();