From 0ce103e1ad33617f640d5c03b57477f2b5adb4db Mon Sep 17 00:00:00 2001 From: lasantha Date: Wed, 28 Feb 2018 19:53:28 +0530 Subject: [PATCH] Format the source code In order to equivalent with WSO2 coding standards modified the source code --- .../jaggeryapps/devicemgt/api/device-api.jag | 4 ++-- .../public/js/operation-bar.js | 11 +++++------ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/api/device-api.jag b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/api/device-api.jag index 84a9b98bdc..a214f536e9 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/api/device-api.jag +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/api/device-api.jag @@ -74,13 +74,13 @@ if (!user) { } else { 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()){ log.error("Request Payload Is Empty"); // HTTP status code 400 refers to - Bad request. result = 400; - }else{ + } else{ deviceType = request.getContent()["deviceType"]; queryString = "?deviceName=" + request.getContent()["deviceName"] +"&deviceType="+ request.getContent()["deviceType"]+"&sketchType="+request.getContent()["sketchType"]; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.operation-bar/public/js/operation-bar.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.operation-bar/public/js/operation-bar.js index a892a32ff8..8d1a9475be 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.operation-bar/public/js/operation-bar.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.operation-bar/public/js/operation-bar.js @@ -52,22 +52,21 @@ function submitForm(formId) { uriencodedQueryStr += prefix + input.attr("id") + "=" + input.val(); } else if (input.data("param-type") == "form") { var prefix = (uriencodedFormStr == "") ? "" : "&"; - if (input.attr("type") == "checkbox" || input.attr("type") == "radio"){ - - if (isItemSelected == undefined){ + if (input.attr("type") == "checkbox" || input.attr("type") == "radio") { + if (isItemSelected == undefined) { isItemSelected = false; } - if (input.is(':checked')){ + if (input.is(':checked')) { isItemSelected = true; uriencodedFormStr += prefix + input.attr("name") + "=" + input.val(); } - }else{ + } else { uriencodedFormStr += prefix + input.attr("id") + "=" + input.val(); } } }); - if (isItemSelected === false){ + if (isItemSelected === false) { title.html("Please Select One Option"); statusIcon.attr("class", defaultStatusClasses + " fw-error"); $(modalPopupContent).html(content.html());