Fix for EasyUI bug with footer refresh

This commit is contained in:
Rick Falkvinge
2019-01-29 20:33:28 +01:00
parent 14005ea58e
commit e89da88852
3 changed files with 39 additions and 0 deletions
+18
View File
@@ -627,6 +627,15 @@ namespace Resources {
}
}
/// <summary>
/// Looks up a localized string similar to There are no payments on record.
/// </summary>
internal static string Financial_NoPaymentHistory {
get {
return ResourceManager.GetString("Financial_NoPaymentHistory", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Invoices.
/// </summary>
@@ -1203,6 +1212,15 @@ namespace Resources {
}
}
/// <summary>
/// Looks up a localized string similar to No records.
/// </summary>
internal static string Global_EmptySet {
get {
return ResourceManager.GetString("Global_EmptySet", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to You are entering the &lt;strong&gt;Sandbox&lt;/strong&gt; organization.&lt;br/&gt;&lt;br/&gt;This is a safe environment where you can play around with Swarmops without risking any damage to production data. Have fun all you want, and return to your production environment when you&apos;re done experimenting..
/// </summary>
+7
View File
@@ -1018,6 +1018,9 @@
<data name="Financial_CurrentBalance" xml:space="preserve">
<value>Current Balance</value>
</data>
<data name="Financial_NoPaymentHistory" xml:space="preserve">
<value>There are no payments on record</value>
</data>
<data name="Financial_Owed" xml:space="preserve">
<value>Owed</value>
<comment>As in, "Amount Owed"</comment>
@@ -1065,6 +1068,10 @@
<value>Closed</value>
<comment>As in "record closed"</comment>
</data>
<data name="Global_EmptySet" xml:space="preserve">
<value>No records</value>
<comment>There are no records of the requested type</comment>
</data>
<data name="Global_Item" xml:space="preserve">
<value>Item</value>
<comment>As in "record", "list item", something listed</comment>
@@ -183,6 +183,20 @@ namespace Swarmops.Frontend.Automation
StringBuilder result = new StringBuilder(16384);
result.Append("[");
if (items.Any())
{
// Must return something in body to refresh footer - EasyUI bug
result.AppendFormat(
"\"id\":\"NoRecords\",\"name\":\"{0}\",\"description\":\"{1}\"",
JsonSanitize(Resources.Global.Global_EmptySet),
JsonSanitize(Resources.Global.Financial_NoPaymentHistory)
);
result.Append("}]");
return result.ToString();
}
foreach (PaymentHistoryLineItem item in items)
{
result.Append("{");