mirror of
https://repository.entgra.net/community/device-mgt-plugins.git
synced 2025-09-16 23:42:15 +00:00
Fixing android sense download issue
This commit is contained in:
parent
d58b8f1f53
commit
6cbbb75c45
@ -35,27 +35,6 @@ function setPopupMaxHeight() {
|
||||
function showPopup() {
|
||||
$(modalPopup).modal('show');
|
||||
setPopupMaxHeight();
|
||||
$('#downloadForm').validate({
|
||||
rules: {
|
||||
deviceName: {
|
||||
minlength: 4,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
highlight: function (element) {
|
||||
$(element).closest('.control-group').removeClass('success').addClass('error');
|
||||
},
|
||||
success: function (element) {
|
||||
$(element).closest('.control-group').removeClass('error').addClass('success');
|
||||
$('label[for=deviceName]').remove();
|
||||
}
|
||||
});
|
||||
var deviceType = "";
|
||||
$('.deviceType').each(function () {
|
||||
if (this.value != "") {
|
||||
deviceType = this.value;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
@ -81,22 +60,13 @@ function attachEvents() {
|
||||
* when a user clicks on "Download" link
|
||||
* on Device Management page in WSO2 DC Console.
|
||||
*/
|
||||
$("a.download-link").click(function () {
|
||||
$(modalPopupContent).html($('#download-device-modal-content').html());
|
||||
showPopup();
|
||||
var deviceName;
|
||||
$("a#download-device-download-link").click(function () {
|
||||
$('.new-device-name').each(function () {
|
||||
if (this.value != "") {
|
||||
deviceName = this.value;
|
||||
}
|
||||
});
|
||||
$('label[for=deviceName]').remove();
|
||||
});
|
||||
|
||||
$("a#download-device-cancel-link").click(function () {
|
||||
hidePopup();
|
||||
});
|
||||
|
||||
$(".download-link").click(function(){
|
||||
toggleEnrollment();
|
||||
});
|
||||
|
||||
function toggleEnrollment(){
|
||||
$(modalPopupContent).html($("#qr-code-modal").html());
|
||||
generateQRCode(modalPopupContent + " .qr-code");
|
||||
showPopup();
|
||||
}
|
||||
}
|
||||
@ -60,21 +60,6 @@
|
||||
<i class="fw fw-mobile fw-inverse fw-lg"></i> Enroll Device</a>
|
||||
<br/><br/>
|
||||
|
||||
<div id="download-device-modal-content-links" class="hide">
|
||||
<div class="modal-content">
|
||||
<div class="row">
|
||||
<div class="col-md-7 col-centered center-container">
|
||||
<h3>Please download the file from following link(Press CTRL+C).</h3>
|
||||
<br/>
|
||||
<div>
|
||||
<input id="download-device-url" style="color:#3f3f3f;padding:5px"
|
||||
type="text" value="" placeholder="Type here" size="60">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="device-400-content" class="hide">
|
||||
<div class="modal-content">
|
||||
<div class="row">
|
||||
@ -242,35 +227,85 @@
|
||||
</div>
|
||||
|
||||
<div id="qr-code-modal" data-enrollment-url="{{hostName}}{{@unit.publicUri}}/asset/androidsense.apk" class="hidden">
|
||||
<div class="content">
|
||||
<div class="modal-header">
|
||||
<h4 class="pull-left modal-title">
|
||||
<span class="fw-stack">
|
||||
<i class="fw fw-mobile fw-stack-2x"></i>
|
||||
<span class="fw-stack fw-move-right fw-move-bottom">
|
||||
<i class="fw fw-ring fw-stack-2x"></i>
|
||||
<i class="fw fw-circle fw-stack-2x fw-stroke text-info"></i>
|
||||
<i class="fw fw-add fw-stack-1x fw-inverse"></i>
|
||||
</span>
|
||||
</span>
|
||||
Add your new mobile device to {{@app.conf.appName}}
|
||||
</h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><i class="fw fw-cancel"></i></button>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="modal-body add-margin-top-2x add-margin-bottom-2x">
|
||||
<div class="panel-body col-centered text-center">
|
||||
<h5>
|
||||
Please scan the following QR code using your new <b>Android</b>, <b>iPhone</b> or <b>Windows</b> mobile device.
|
||||
</h5>
|
||||
<br>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<div class="qr-code"></div>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<h5>
|
||||
Not having a QR code scanner in your device?
|
||||
<br><br>
|
||||
Try following link
|
||||
<br><br>
|
||||
<b>{{hostName}}{{@unit.publicUri}}/asset/androidsense.apk</b>
|
||||
<br><br>
|
||||
on your device's Internet browser instead.
|
||||
</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div class="buttons">
|
||||
<a href="javascript:hidePopup()" class="btn-operations btn-default">Ok</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!--<div class="content">-->
|
||||
<!--<div class="row">-->
|
||||
<!--<div class="col-lg-5 col-md-6 col-centered">-->
|
||||
<!--<h3>Scan QR code to start enrollment</h3>-->
|
||||
<!--<p>Please scan the QR code using your mobile device to retrieve enrollment URL.</p>-->
|
||||
<!--<div class="panel panel-default">-->
|
||||
<!--<div class="panel-body col-centered">-->
|
||||
<!--<div class="qr-code"></div>-->
|
||||
<!--<br>-->
|
||||
<!--<h5>-->
|
||||
<!--Not having a QR code scanner in your device?-->
|
||||
<!--<br><br>-->
|
||||
<!--Try following link-->
|
||||
<!--<br><br>-->
|
||||
<!--<b>{{hostName}}/{{@unit.publicUri}}/asset/androidsense.apk</b>-->
|
||||
<!--<br><br>-->
|
||||
<!--on your device's Internet browser instead.-->
|
||||
<!--</h5>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<div id="device-agent-downloading-content" class="hide">
|
||||
<div class="modal-content">
|
||||
<div class="row">
|
||||
<div class="col-lg-5 col-md-6 col-centered">
|
||||
<h3>Scan QR code to start enrollment</h3>
|
||||
<p>Please scan the QR code using your mobile device to retrieve enrollment URL.</p>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body col-centered">
|
||||
<div class="qr-code"></div>
|
||||
</div>
|
||||
</div>
|
||||
<form id="downloadForm" method="GET"
|
||||
action="{{hostName}}{{@unit.publicUri}}/asset/androidsense.apk">
|
||||
<div class="buttons" style="padding-bottom: 0px">
|
||||
<input class="btn btn-operations" type="submit" value="Download Now">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="device-agent-downloading-content" class="hide">
|
||||
<div class="modal-content">
|
||||
<div class="row">
|
||||
<div class="col-md-7 col-centered center-container">
|
||||
<h3>Device Agent will downloading shortly.</h3>
|
||||
</div>
|
||||
<div class="col-md-7 col-centered center-container">
|
||||
<h3>Device Agent will downloading shortly.</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{#zone "topCss"}}
|
||||
{{css "css/styles.css"}}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user