diff options
Diffstat (limited to 'python')
| -rw-r--r-- | python/Dawn/static/dawn.js | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/python/Dawn/static/dawn.js b/python/Dawn/static/dawn.js index 6ae28f43..dc7c4d0a 100644 --- a/python/Dawn/static/dawn.js +++ b/python/Dawn/static/dawn.js @@ -25,6 +25,44 @@ $(function() { $('#maturity').val(data['maturity']); }); }); + $('#folder').change(function() { + if ($('#swap_type').val() == 'CD_INDEX') { + switch ($(this).val()) { + case 'IGOPTDEL': + case 'HYOPTDEL': + $('#portfolio').val('OPTIONS'); + break; + case 'SER_ITRXCURVE': + case 'SER_IGCURVE': + $('#portfolio').val('CURVE'); + break; + case 'HYEQY': + case 'HYMEZ': + case 'HYSNR': + case 'HYINX': + case 'IGEQY': + case 'IGMEZ': + case 'IGSNR': + case 'IGINX': + case 'BSPK': + $('#portfolio').val('TRANCHE'); + break; + case 'HEDGE_CLO': + $('#portfolio').val('CLO'); + break; + case 'HEDGE_MAC': + $('#portfolio').val('HEDGE_MAC'); + break; + case 'HEDGE_CSO': + $('#portfolio').val('STRUCTURED'); + break; + case 'HEDGE_MBS': + case 'MBSCDS': + $('#portfolio').val('MORTGAGES'); + break; + } + } + }); $('#swap_type').change(function() { var to_hide, to_show; switch ($(this).val()) { @@ -41,6 +79,7 @@ $(function() { $('#clearing_facility').val(''); $('#initial_margin_percentage').parent().parent().css('display', 'block'); $('#account_code').parent().parent().css('display', 'none'); + $('#portfolio').val('TRANCHE'); break; case 'CD_INDEX': to_hide = ['attach', 'detach', 'initial_margin_percentage', @@ -51,6 +90,7 @@ $(function() { $('#clearing_facility').parent().parent().css('display', 'block'); $('#clearing_facility').val('ICE-CREDIT'); $('#account_code').parent().parent().css('display', 'block'); + $('#folder').change(); break; case 'ABS_CDS': to_hide = ['attach', 'detach', @@ -61,6 +101,7 @@ $(function() { $('#initial_margin_percentage').parent().parent().css('display', 'block'); $('#clearing_facility').parent().parent().css('display', 'none'); $('#clearing_facility').val(''); + $('#portfolio').val('MORTGAGES'); break; case 'CD_BASKET_TRANCHE': to_show = ['attach', 'detach', 'initial_margin_percentage', @@ -70,6 +111,7 @@ $(function() { }); $('#clearing_facility').parent().parent().css('display', 'none'); $('#clearing_facility').val(''); + $('#portfolio').val('TRANCHE'); break; case 'SWAPTION': to_hide = ['fixed_rate', 'index_ref', 'security_desc', |
