− and - are not the same character in DOM classes

This commit is contained in:
Falkvinge
2017-05-14 14:06:15 +02:00
parent 8827541dcc
commit 8dbbe4f019
4 changed files with 16 additions and 10 deletions
+1 -1
View File
@@ -54,7 +54,7 @@
$('#imageLoadIndicator').show();
$('div.datagrid').css('opacity', 0.4);
$('#tableProfitLoss').treegid('reload');
//$('#tableProfitLoss').treegrid('reload');
});
@@ -55,7 +55,7 @@
$('#imageLoadIndicator').show();
$('div.datagrid').css('opacity', 0.4);
$('#tableAnnualReport').treegid('reload');
//$('#tableAnnualReport').treegrid('reload');
});
@@ -118,14 +118,20 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers
if (expanded || treeValue != 0 && singleValue == 0)
{
return string.Format (CultureInfo.CurrentCulture,
"\"<span class='annualreportdata-collapsed-{0}' " + (expanded? "style='display:none'": "") + ">" + sigma + " {1:" + format + "}</span><span class='annualreportdata-expanded-{0}' " + (!expanded ? "style='display:none'" : "") + ">&nbsp;</span>\"",
accountId, treeValue/100.00)
.Replace("---", "<span style='color:#CCC'>&mdash;</span>")
.Replace("-", "&minus;");
"\"<span class='annualreportdata-collapsed-{0}' " + (expanded? "style='display:none'": "") + ">" + sigma + " " + FormatSingleString(treeValue, format) + "</span>" +
"<span class='annualreportdata-expanded-{0}' " + (!expanded ? "style='display:none'" : "") + ">&nbsp;</span>\"",
accountId);
}
return string.Format (CultureInfo.CurrentCulture,
"\"<span class='annualreportdata-collapsed-{0}'>" + sigma + " {1:" + format + "}</span><span class='annualreportdata-expanded-{0}' style='display:none'>{2:" + format + "}</span>\"",
accountId, treeValue/100.0, singleValue/100.0)
return string.Format(CultureInfo.CurrentCulture,
"\"<span class='annualreportdata-collapsed-{0}'>" + sigma + " " + FormatSingleString(treeValue, format) + " " + "</span>" +
"<span class='annualreportdata-expanded-{0}' style='display:none'>" + FormatSingleString(singleValue, format) + "</span>\"",
accountId);
}
private string FormatSingleString(Int64 centsValue, string format = "N0")
{
return String.Format("{0:" + format + "}", centsValue / 100.0)
.Replace("---", "<span style='color:#CCC'>&mdash;</span>")
.Replace("-", "&minus;");
}
@@ -57,7 +57,7 @@
$('#imageLoadIndicator').show();
$('div.datagrid').css('opacity', 0.4);
$('#tableProfitLoss').treegid('reload');
//$('#tableProfitLoss').treegrid('reload');
});