From f414f2368887ddc2ee4a76df075a2aaccd2d3365 Mon Sep 17 00:00:00 2001 From: Rasika Perera Date: Tue, 23 Jan 2018 15:19:02 +0530 Subject: [PATCH] Fixing https://github.com/wso2/product-iots/issues/1623 --- .../device-view.hbs | 130 ------------------ .../operation-bar.hbs | 18 +-- .../public/js/operation-bar.js | 24 ++-- 3 files changed, 21 insertions(+), 151 deletions(-) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/device-view.hbs b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/device-view.hbs index 1c0081a93..a1f1a3862 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/device-view.hbs +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/device-view.hbs @@ -219,136 +219,6 @@ -
- - -
-
- - - - - - -
-
-
-
-
- -
- - -
-
- {{#if device.location}} - {{unit "cdmf.unit.geo-dashboard" device=device noGeoFencing=false hideSearch=true}} - {{else}} -
-

- - Device location information is not available. -

-
-

-

-

- {{/if}} -
-
-
- -
- - -
-
- - - - - - -
-
-

- - No applications found. -

-

Please try refreshing in a while.

-
-
-
-
-
- {{/zone}} diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.operation-bar/operation-bar.hbs b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.operation-bar/operation-bar.hbs index 9fbb3b5fe..9bf60dd44 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.operation-bar/operation-bar.hbs +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.operation-bar/operation-bar.hbs @@ -76,9 +76,9 @@
-
@@ -144,14 +144,14 @@
{{/equal}} {{/each}} - - - - + + + diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.operation-bar/public/js/operation-bar.js b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.operation-bar/public/js/operation-bar.js index 99c542810..c5fdd4a53 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.operation-bar/public/js/operation-bar.js +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.operation-bar/public/js/operation-bar.js @@ -30,9 +30,9 @@ function operationSelect(selection) { showPopup(); } -var resetLoader = function () { - $("#btnSend").removeClass("hidden"); - $('#lbl-execution').addClass("hidden"); +var resetLoader = function (formId) { + $('#' + formId + ' .btnSend').removeClass("hidden"); + $('#' + formId + ' .lbl-execution').addClass("hidden"); }; /** @@ -111,8 +111,8 @@ function fillUserName() { } function submitForm(formId) { - $("#btnSend").addClass("hidden"); - $("#lbl-execution").removeClass("hidden"); + $('#' + formId + " .btnSend").addClass("hidden"); + $('#' + formId + " .lbl-execution").removeClass("hidden"); var form = $("#" + formId); var uri = form.attr("action"); var deviceId = form.data("device-id"); @@ -172,7 +172,7 @@ function submitForm(formId) { statusIcon.attr("class", defaultStatusClasses + " fw-check"); description.html(res); // console.log("success!"); - resetLoader(); + resetLoader(formId); $(modalPopupContent).html(content.html()); }; var errorCallBack = function (response) { @@ -187,7 +187,7 @@ function submitForm(formId) { } description.html(reason); // console.log("Error!"); - resetLoader(); + resetLoader(formId); $(modalPopupContent).html(content.html()); }; //executing http request @@ -205,11 +205,11 @@ function submitForm(formId) { title.html("An Error Occurred!"); statusIcon.attr("class", defaultStatusClasses + " fw-error"); description.html("This operation requires http method: " + httpMethod + " which is not supported yet!"); - resetLoader(); + resetLoader(formId); $(modalPopupContent).html(content.html()); } } else { - resetLoader(); + resetLoader(formId); $(".modal #operation-error-msg span").text(validaterString); $(".modal #operation-error-msg").removeClass("hidden"); } @@ -222,13 +222,13 @@ $(document).on('submit', 'form', function (e) { method: "post" }); - var btnSubmit = $('#btnSend', this); + var btnSubmit = $('.btnSend', this); btnSubmit.addClass('hidden'); - var lblSending = $('#lblSending', this); + var lblSending = $('.lblSending', this); lblSending.removeClass('hidden'); - var lblSent = $('#lblSent', this); + var lblSent = $('.lblSent', this); postOperationRequest.done(function (data) { lblSending.addClass('hidden'); lblSent.removeClass('hidden');