Small changes to the sample CoffeeCup sample

application-manager-new
Shabirmean 9 years ago
parent 078f7675bf
commit ece55e1016

@ -136,22 +136,20 @@ function downloadAgent() {
var $inputs = $('#downloadForm :input'); 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 = {}; var values = {};
$inputs.each(function() { $inputs.each(function() {
values[this.name] = $(this).val(); values[this.name] = $(this).val();
}); });
console.log($inputs); var connectedCupRegisterURL = "/connectedcup_mgt/connectedcup/cup/register?" +
console.log($inputs[0].value); "name=" + payload.name + "&owner=" + payload.owner;
console.log($inputs[1].value);
var payload = {} var payload = {};
payload.name = $inputs[0].value; payload.name = $inputs[0].value;
payload.owner = $inputs[1].value; payload.owner = $inputs[1].value;
invokerUtil.post( invokerUtil.post(
"/connectedcup_mgt/connectedcup/cup/register?name=" + payload.name + "&owner=" + payload.owner, connectedCupRegisterURL,
payload, payload,
function (data, textStatus, jqxhr) { function (data, textStatus, jqxhr) {
hidePopup(); hidePopup();

@ -34,7 +34,7 @@
<div class="controls"> <div class="controls">
<input class="connectedCupName" style="color:#3f3f3f;padding:5px" <input class="connectedCupName" style="color:#3f3f3f;padding:5px"
type="text" type="text"
placeholder="Ex. Lobby_DigitalDisplay" placeholder="Ex. Office_CoffeeCup"
name="name" size="60" required> name="name" size="60" required>
<br/> <br/>
<input type="hidden" class="owner" name="owner" value={{@user.username}} /> <input type="hidden" class="owner" name="owner" value={{@user.username}} />

Loading…
Cancel
Save