From dfee4543f3946a3622833f234bd2f1bbb41610ee Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Sun, 4 Mar 2018 10:45:50 +0100 Subject: [PATCH] Minor cosmetic problem --- Site/Controls/v5/Financial/ComboBudgets.ascx | 27 +++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/Site/Controls/v5/Financial/ComboBudgets.ascx b/Site/Controls/v5/Financial/ComboBudgets.ascx index 9d1d28df..940b1173 100644 --- a/Site/Controls/v5/Financial/ComboBudgets.ascx +++ b/Site/Controls/v5/Financial/ComboBudgets.ascx @@ -56,24 +56,27 @@ var comboBudgetsDropInit = comboBudgetsDropInit || SwarmopsJS.unescape('<%=this.Localized_DropInit%>'); // declare or redeclare function <%=this.ClientID %>_val(newValue) { - if (newValue === undefined) { + if (newValue === undefined) + { // getter return $('#<%=this.ClientID %>_DropBudgets').combotree('getValue'); + } else { + // setter + + if (newValue > 0) + { + $('#<%=this.ClientID %>_DropBudgets').combotree('setValue', newValue); } else { - // setter - - if (newValue > 0) { - $('#<%=this.ClientID %>_DropBudgets').combotree('setValue', newValue); - } else { - $('#<%=this.ClientID %>_DropBudgets').combotree('setValue', { - id: 0, - text: comboBudgetsDropInit - }); - } - + $('#<%=this.ClientID %>_DropBudgets').combotree('setValue', 0); + $('#<%=this.ClientID %>_SpanBudgets span.combo input.textbox-text').val(comboBudgetsDropInit); } } + } + + + +