diff --git a/Site5/Master-v5.master b/Site5/Master-v5.master index a42b0456..21ac8387 100644 --- a/Site5/Master-v5.master +++ b/Site5/Master-v5.master @@ -10,8 +10,7 @@ - - + diff --git a/Site5/Pages/v5/Ledgers/AccountPlan.aspx b/Site5/Pages/v5/Ledgers/AccountPlan.aspx index 66b53441..59a18eb3 100644 --- a/Site5/Pages/v5/Ledgers/AccountPlan.aspx +++ b/Site5/Pages/v5/Ledgers/AccountPlan.aspx @@ -72,18 +72,29 @@ window.scrollTo(0, 0); $('body').css('overflow-y', 'hidden'); $('#divModalCover').fadeIn(); - - $.ajax({ + + if (!checkboxesInitialized) { + // This is a weird construct, but comes from the switchbuttons needing to be visible when initialized + setTimeout(function() { + $('.EditCheck').switchbutton({ + checkedLabel: '<%=Resources.Global.Global_On.ToUpperInvariant() %>', + uncheckedLabel: '<%=Resources.Global.Global_Off.ToUpperInvariant() %>' + }); + }, 1); + checkboxesInitialized = true; + } + + $.ajax({ type: "POST", url: "AccountPlan.aspx/GetAccountData", data: "{'accountId': '" + escape(accountId) + "'}", contentType: "application/json; charset=utf-8", dataType: "json", success: function (msg) { - /* - $('#CheckAccountActive').switchButton( {checked: msg.d.Open }); - $('#CheckAccountExpensable').switchButton( {checked: msg.d.Expensable }); - $('#CheckAccountAdministrative').switchButton( {checked: msg.d.Administrative });*/ + + $("#CheckAccountActive").prop("checked", msg.d.Open).change(); + $("#CheckAccountExpensable").prop("checked", msg.d.Expensable).change(); + $("#CheckAccountAdministrative").prop("checked", msg.d.Administrative).change(); modalAccountName = msg.d.AccountName; $('#TextAccountName').val(msg.d.AccountName); @@ -91,6 +102,7 @@ modalAccountBudget = msg.d.Budget; $('#TextAccountBudget').val(msg.d.Budget); + $('#SpanTextCurrency').text(msg.d.CurrencyCode); $('#SpanEditBalance').text(msg.d.Balance); //var parentAccountNode = accountTree.tree('find', msg.d.ParentAccountId); @@ -207,12 +219,6 @@ }); }); - $('.EditCheck').switchbutton( - /*{ - checkedLabel: "<% =Resources.Global.Global_On.ToUpperInvariant() %>", - uncheckedLabel: "<% =Resources.Global.Global_Off.ToUpperInvariant() %>" - }*/); - }); function modalShow() { @@ -256,7 +262,7 @@ var accountType = ''; var accountDirty = false; - + var checkboxesInitialized = false; @@ -308,9 +314,9 @@