Converted to JsonParameters

This commit is contained in:
Rick Falkvinge
2014-11-18 14:49:40 +01:00
parent f8c4af4276
commit 57cc27a3ef
2 changed files with 8 additions and 3 deletions
+7 -2
View File
@@ -4,7 +4,6 @@
<asp:Content ID="Content1" ContentPlaceHolderID="PlaceHolderHead" Runat="Server">
<script src="/Scripts/jquery.switchButton.js" language="javascript" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="/Style/jquery.switchButton.css" />
<script type="text/javascript">
@@ -100,7 +99,13 @@
.change(function() {
if (!suppressSwitchChangeAction) {
$(this).parent().css('box-shadow', '0 0 1px 0 #FFFFC0');
var callParameters = "{'accountId': '" + escape(accountId) + "', 'switchName':'" + $(this).attr("rel") + "','switchValue':'" + $(this).prop('checked') + "'}";
var jsonData = {};
jsonData.accountId = escape(accountId);
jsonData.switchName = $(this).attr("rel");
jsonData.switchValue = $(this).prop('checked');
var callParameters = $.toJSON(jsonData);
// If changing Active, set Expensable.Enabled to Active.Checked. If false, set Expensable.Checked to false, too
+1 -1
View File
@@ -58,7 +58,7 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers
this.DbVersionRequired = 2; // Account reparenting
this.EasyUIControlsUsed = EasyUIControl.DataGrid | EasyUIControl.Tree;
this.IncludedControlsUsed |= IncludedControl.SwitchButton | IncludedControl.JsonParameters;
}