From d31133e60954de2513e1e720532d8709235d0b90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Fri, 2 Apr 2010 08:50:51 +0200 Subject: [PATCH] Whitespace cleanup. --- js/functions.js | 47 +++++++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/js/functions.js b/js/functions.js index 6605487e3..02d1bbeba 100644 --- a/js/functions.js +++ b/js/functions.js @@ -576,26 +576,25 @@ function validateConnection(form_name, form_obj) { // All the text fields are checked excluding the port field because the default port can be used. if ((form_name.elements[i].type == 'text') && (form_name.elements[i].name != 'src_port') && (form_name.elements[i].name != 'trg_port')) { - check = true; + check = true; check = emptyFormElements(form_obj, form_name.elements[i].name); - - if (check==false) { - element = form_name.elements[i].name; - if (form_name.elements[i].name == 'src_host') { - src_hostfilled = false; - continue; - } - if (form_name.elements[i].name == 'trg_host') { - trg_hostfilled = false; - continue; - } - if ((form_name.elements[i].name == 'src_socket' && src_hostfilled==false) || (form_name.elements[i].name == 'trg_socket' && trg_hostfilled==false)) - break; - else - continue; - break; - } - } + if (check==false) { + element = form_name.elements[i].name; + if (form_name.elements[i].name == 'src_host') { + src_hostfilled = false; + continue; + } + if (form_name.elements[i].name == 'trg_host') { + trg_hostfilled = false; + continue; + } + if ((form_name.elements[i].name == 'src_socket' && src_hostfilled==false) || (form_name.elements[i].name == 'trg_socket' && trg_hostfilled==false)) + break; + else + continue; + break; + } + } } if (!check) { form_obj.reset(); @@ -1686,10 +1685,10 @@ $(document).ready(function(){ */ function divShowHideFunc(ahref, id) { - $(ahref).addEvent('click', function() { - if ($(id).getStyle('display')=="none") - $(id).tween('display', 'block'); - else - $(id).tween('display', 'none'); + $(ahref).addEvent('click', function() { + if ($(id).getStyle('display')=="none") + $(id).tween('display', 'block'); + else + $(id).tween('display', 'none'); }); }