From ece55e1016913155f72f01570db07219a8d22ce1 Mon Sep 17 00:00:00 2001 From: Shabirmean Date: Wed, 13 Jan 2016 11:35:33 +0530 Subject: [PATCH] Small changes to the sample CoffeeCup sample --- .../public/js/download.js | 12 +++++------- .../type-view.hbs | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/modules/samples/connectedcup/feature/connectedcup-feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.type-view/public/js/download.js b/modules/samples/connectedcup/feature/connectedcup-feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.type-view/public/js/download.js index d402f631..cf43d758 100644 --- a/modules/samples/connectedcup/feature/connectedcup-feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.type-view/public/js/download.js +++ b/modules/samples/connectedcup/feature/connectedcup-feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.type-view/public/js/download.js @@ -136,22 +136,20 @@ function downloadAgent() { var $inputs = $('#downloadForm :input'); - // not sure if you wanted this, but I thought I'd add it. - // get an associative array of just the values. var values = {}; $inputs.each(function() { values[this.name] = $(this).val(); }); - console.log($inputs); - console.log($inputs[0].value); - console.log($inputs[1].value); + var connectedCupRegisterURL = "/connectedcup_mgt/connectedcup/cup/register?" + + "name=" + payload.name + "&owner=" + payload.owner; - var payload = {} + var payload = {}; payload.name = $inputs[0].value; payload.owner = $inputs[1].value; + invokerUtil.post( - "/connectedcup_mgt/connectedcup/cup/register?name=" + payload.name + "&owner=" + payload.owner, + connectedCupRegisterURL, payload, function (data, textStatus, jqxhr) { hidePopup(); diff --git a/modules/samples/connectedcup/feature/connectedcup-feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.type-view/type-view.hbs b/modules/samples/connectedcup/feature/connectedcup-feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.type-view/type-view.hbs index dbce7a03..385d4a61 100644 --- a/modules/samples/connectedcup/feature/connectedcup-feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.type-view/type-view.hbs +++ b/modules/samples/connectedcup/feature/connectedcup-feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.type-view/type-view.hbs @@ -34,7 +34,7 @@