From: Ivan Kohler Date: Wed, 17 Jun 2015 00:11:31 +0000 (-0700) Subject: UI spring cleaning: animate company/spouse/contact hide/unhide X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=f251853b702c5886659d4e0fadc67f52e1369d90;p=freeside.git UI spring cleaning: animate company/spouse/contact hide/unhide --- diff --git a/httemplate/edit/cust_main/basics.html b/httemplate/edit/cust_main/basics.html index 2ca6f65a5..e484c732d 100644 --- a/httemplate/edit/cust_main/basics.html +++ b/httemplate/edit/cust_main/basics.html @@ -25,15 +25,21 @@ function rescom_changed(what) { if ( what.checked == (what.value == 'Commercial' ) ) { - document.getElementById('company_row').style.display = ''; - document.getElementById('contacts_div').style.display = ''; - document.getElementById('spouse_row').style.display = 'none'; + $('#company_label').slideDown(); + $('#company_input').slideDown(); + $('#contacts_div').slideDown(); + $('#spouse_label').slideUp(); + $('#spouse_last_input').slideUp(); + $('#spouse_first_input').slideUp(); } else { if ( document.getElementById('company').value.length == 0 ) { - document.getElementById('company_row').style.display = 'none'; + $('#company_label').slideUp(); + $('#company_input').slideUp(); } - document.getElementById('contacts_div').style.display = 'none'; - document.getElementById('spouse_row').style.display = ''; + $('#contacts_div').slideUp(); + $('#spouse_label').slideDown(); + $('#spouse_last_input').slideDown(); + $('#spouse_first_input').slideDown(); } } diff --git a/httemplate/edit/cust_main/company.html b/httemplate/edit/cust_main/company.html index 50c4f709b..3341d8011 100644 --- a/httemplate/edit/cust_main/company.html +++ b/httemplate/edit/cust_main/company.html @@ -1,7 +1,8 @@ % my $cust_main = shift; -company ? '' : 'STYLE="display:none"' %>> - <% mt('Company') |h %> - company ? '' : 'STYLE="display:none"'; + +
><% mt('Company') |h %>
+
> - +
diff --git a/httemplate/edit/cust_main/name.html b/httemplate/edit/cust_main/name.html index bc55801cf..13bd09764 100644 --- a/httemplate/edit/cust_main/name.html +++ b/httemplate/edit/cust_main/name.html @@ -1,6 +1,6 @@ <%def .namepart> % my ($field, $value, $label, $extra) = @_; -
+
>
<% mt($label) %>
@@ -21,7 +21,7 @@ % if ( $conf->exists('cust_main-enable_spouse') ) { - <% mt('Spouse\'s name') |h %> +
<% mt('Spouse\'s name') |h %>
<& .namepart, 'spouse_last', $cust_main->spouse_last, 'Last', ',' &> <& .namepart, 'spouse_first', $cust_main->spouse_first, 'First' &>