- }\r
- \r
- //Select the can\r
- $.ajax({\r
- url : mctx.api + "actuators",\r
- data : {name : "can_select", set : can_number}\r
- }).done(function (data) {\r
- if (!result.checkStatus(data)) {\r
- return;\r
- }\r
- \r
- //Enable the can\r
- $.ajax({\r
- url : mctx.api + 'actuators',\r
- data : {name : "can_enable", set : 1}\r
- }).done(function (data) {\r
- if (!result.checkStatus(data)) {\r
- return;\r
- }\r
- result.html(" ");\r
- toggleControls(true);\r
- }).always(function () {\r
- $(group).removeAttr('disabled');\r
- });\r
- }).fail(function () {\r
- $(group).removeAttr('disabled');\r
+ }
+
+ //Enable the can
+ $.ajax({
+ url : mctx.api + 'actuators',
+ data : {name : "can_enable", set : 1}
+ }).done(function (data) {
+ if (!result.checkStatus(data)) {
+ $(group).removeAttr('disabled');
+ return;
+ }
+ result.html(" ");
+ toggleControls(true);
+ }).fail(function () {
+ $(group).removeAttr('disabled');
+ });
+ }).fail(function () {
+ $(group).removeAttr('disabled');