Fixed an introduced issue with the edit screen. Finished the press time

implementation.
This commit is contained in:
Admin
2017-06-21 16:22:03 -05:00
parent 63ac729967
commit 3d4724ac57
3 changed files with 5 additions and 5 deletions

View File

@@ -1936,12 +1936,12 @@ app.controller('HarmonyController', function ($scope, $location, bridgeService,
var postCmd = "\"}";
if(onpresstime !== undefined && onpresstime !== "0")
postCmd = "\",\"pressTime\":" + onpresstime + "}";
onpayload = "{\"device\":\"" + harmonydevice.device.id + "\",\"button\":\"" + actionOn.command + "\",\"hub\":\"" + harmonydevice.hub + "\"}";
onpayload = "{\"device\":\"" + harmonydevice.device.id + "\",\"button\":\"" + actionOn.command + "\",\"hub\":\"" + harmonydevice.hub + postCmd;
if(offpresstime !== undefined && offpresstime !== "0")
postCmd = "\",\"pressTime\":" + offpresstime + "}";
else
postCmd = "\"}";
offpayload = "{\"device\":\"" + harmonydevice.device.id + "\",\"button\":\"" + actionOff.command + "\",\"hub\":\"" + harmonydevice.hub + "\"}";
offpayload = "{\"device\":\"" + harmonydevice.device.id + "\",\"button\":\"" + actionOff.command + "\",\"hub\":\"" + harmonydevice.hub + postCmd;
bridgeService.buildUrls(onpayload, null, offpayload, true, actionOn.command, harmonydevice.device.label, harmonydevice.hub, "button", "harmonyButton", null, null);
$scope.device = bridgeService.state.device;
@@ -3065,7 +3065,7 @@ app.controller('EditController', function ($scope, $location, bridgeService) {
$scope.onDevices = null;
$scope.dimDevices = null;
$scope.offDevices = null;
if ($scope.devicec && $scope.device.name !== undefined) {
if ($scope.device !== undefined && $scope.device.name !== undefined) {
if($scope.bridge.device.onUrl !== undefined)
$scope.onDevices = bridgeService.getCallObjects($scope.bridge.device.onUrl);
if($scope.bridge.device.dimUrl !== undefined)