From 765f97f5a0adaaa3637fceca80ace04a1fd64b88 Mon Sep 17 00:00:00 2001 From: Imesh Chandrasiri Date: Mon, 19 Dec 2016 11:27:01 +0530 Subject: [PATCH] email invite sender changes --- .../invite-modal.hbs | 6 ++++++ .../public/js/invite-modal.js | 13 +++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.email.invite-modal/invite-modal.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.email.invite-modal/invite-modal.hbs index 5353b4d8df..5a435b4ec9 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.email.invite-modal/invite-modal.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.email.invite-modal/invite-modal.hbs @@ -69,6 +69,12 @@ {{css "css/invite-modal-styles.css"}} {{/zone}} + +{{#zone "topJs"}} + +{{/zone}} + + {{#zone "bottomJs"}} {{js "js/invite-modal.js"}} {{/zone}} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.email.invite-modal/public/js/invite-modal.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.email.invite-modal/public/js/invite-modal.js index 7f8e42816d..d33527418d 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.email.invite-modal/public/js/invite-modal.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.email.invite-modal/public/js/invite-modal.js @@ -36,7 +36,10 @@ function validateEmail(email) { */ function sendInvites(){ var emailObj = $('.modal-content #choose_usr_email').select2('data'), - emailArr = []; + emailArr = [], + deviceEmailObj = {}; + + console.log(deviceTypeView); if(emailObj.length <= 0){ console.log('no values to print'); @@ -47,6 +50,12 @@ function sendInvites(){ emailArr.push(el.text); }) + deviceEmailObj = { + "deviceType" : deviceTypeView, + "emailList" : emailArr + } + + hidePopup(); - console.log(emailArr); + console.log(deviceEmailObj); } \ No newline at end of file