Race condition fix for Account Plan
This commit is contained in:
@@ -2,12 +2,15 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
$('#<%=this.ClientID %>_DropBudgets').combotree({
|
||||
$('#<%= this.ClientID %>_DropBudgets').combotree({
|
||||
animate: true,
|
||||
height: 30,
|
||||
onLoadSuccess: function() {
|
||||
$("#<%= this.ClientID%>_SpanBudgets span.combo input.combo-text").val("<%=Resources.Global.Global_DropInits_SelectFinancialAccount%>");
|
||||
<%
|
||||
onLoadSuccess: function () {
|
||||
<%
|
||||
if (!SuppressPrompt)
|
||||
{
|
||||
Response.Write ("$('#" + this.ClientID + "_SpanBudgets span.combo input.combo-text').val(\"" + Resources.Global.Global_DropInits_SelectFinancialAccount + "\");");
|
||||
}
|
||||
if (!String.IsNullOrEmpty(this.OnClientLoaded))
|
||||
{
|
||||
Response.Write(this.OnClientLoaded + "();");
|
||||
|
||||
@@ -18,6 +18,8 @@ namespace Swarmops.Controls.Financial
|
||||
|
||||
public AccountListType ListType { get; set; }
|
||||
|
||||
public bool SuppressPrompt { get; set; }
|
||||
|
||||
protected string DataUrl
|
||||
{
|
||||
get
|
||||
|
||||
@@ -478,7 +478,7 @@
|
||||
function setAccountTreeText (text) {
|
||||
var accountTree = $('#<%=DropParents.ClientID %>_DropBudgets');
|
||||
var currentText = accountTree.combotree('getText');
|
||||
if (currentText.length < 3) {
|
||||
if (currentText.length < 3 && parentAccountName.length > 2) {
|
||||
accountTree.combotree('setText', parentAccountName);
|
||||
$('span#<%= DropParents.ClientID %>_SpanBudgets span input.combo-text').css('background-color', '#FFF');
|
||||
} else if (!accountTreeLoaded) {
|
||||
@@ -521,7 +521,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
ac
|
||||
function onAccountTreeLoaded() {
|
||||
var accountTree = $('#<%=DropParents.ClientID %>_DropBudgets');
|
||||
// accountTree.combotree('select', 0); // clear any previous selection
|
||||
@@ -604,7 +604,7 @@
|
||||
<DialogCode>
|
||||
<h2 id="HeaderModal"><asp:Literal ID="LiteralHeaderEditingAccount" runat="server"/></h2>
|
||||
<div id="DivModalFields" class="entryFields"><input type="text" id="TextAccountName" /> <br />
|
||||
<Swarmops5:ComboBudgets ID="DropParents" runat="server" OnClientLoaded="onAccountTreeLoaded" OnClientSelect="onAccountTreeSelect" /> <br/>
|
||||
<Swarmops5:ComboBudgets ID="DropParents" runat="server" OnClientLoaded="onAccountTreeLoaded" SuppressPrompt="True" OnClientSelect="onAccountTreeSelect" /> <br/>
|
||||
<div id="DivEditProfitLossControls"> <br/>
|
||||
<Swarmops5:ComboPeople ID="DropOwner" OnClientSelect="onOwnerChange" runat="server" /> <br/>
|
||||
<input type="text" id="TextAccountBudget" style="text-align: right"/> <br/>
|
||||
|
||||
Reference in New Issue
Block a user