Format the source code

In order to equivalent with WSO2 coding standards modified the source code
revert-70aa11f8
lasantha 7 years ago
parent 18b1f7830d
commit 0ce103e1ad

@ -74,13 +74,13 @@ if (!user) {
} else { } else {
result = 400; result = 400;
} }
}else if (uriMatcher.match("/{context}/api/devices/sketch/generate_link")) { } else if (uriMatcher.match("/{context}/api/devices/sketch/generate_link")) {
if (!request.getContent()){ if (!request.getContent()){
log.error("Request Payload Is Empty"); log.error("Request Payload Is Empty");
// HTTP status code 400 refers to - Bad request. // HTTP status code 400 refers to - Bad request.
result = 400; result = 400;
}else{ } else{
deviceType = request.getContent()["deviceType"]; deviceType = request.getContent()["deviceType"];
queryString = "?deviceName=" + request.getContent()["deviceName"] +"&deviceType="+ queryString = "?deviceName=" + request.getContent()["deviceName"] +"&deviceType="+
request.getContent()["deviceType"]+"&sketchType="+request.getContent()["sketchType"]; request.getContent()["deviceType"]+"&sketchType="+request.getContent()["sketchType"];

@ -52,22 +52,21 @@ function submitForm(formId) {
uriencodedQueryStr += prefix + input.attr("id") + "=" + input.val(); uriencodedQueryStr += prefix + input.attr("id") + "=" + input.val();
} else if (input.data("param-type") == "form") { } else if (input.data("param-type") == "form") {
var prefix = (uriencodedFormStr == "") ? "" : "&"; var prefix = (uriencodedFormStr == "") ? "" : "&";
if (input.attr("type") == "checkbox" || input.attr("type") == "radio"){ if (input.attr("type") == "checkbox" || input.attr("type") == "radio") {
if (isItemSelected == undefined) {
if (isItemSelected == undefined){
isItemSelected = false; isItemSelected = false;
} }
if (input.is(':checked')){ if (input.is(':checked')) {
isItemSelected = true; isItemSelected = true;
uriencodedFormStr += prefix + input.attr("name") + "=" + input.val(); uriencodedFormStr += prefix + input.attr("name") + "=" + input.val();
} }
}else{ } else {
uriencodedFormStr += prefix + input.attr("id") + "=" + input.val(); uriencodedFormStr += prefix + input.attr("id") + "=" + input.val();
} }
} }
}); });
if (isItemSelected === false){ if (isItemSelected === false) {
title.html("Please Select One Option"); title.html("Please Select One Option");
statusIcon.attr("class", defaultStatusClasses + " fw-error"); statusIcon.attr("class", defaultStatusClasses + " fw-error");
$(modalPopupContent).html(content.html()); $(modalPopupContent).html(content.html());

Loading…
Cancel
Save