adding download popup

Rasika Perera 9 years ago
parent f2f85cdf5c
commit 580a80bcab

@ -56,14 +56,6 @@ function showPopup() {
deviceType = this.value; deviceType = this.value;
} }
}); });
if (deviceType == 'virtual_firealarm'){
$('.sketchType').remove();
$('input[name="sketchType"][value="virtual_firealarm"]').prop('checked', true);
$("label[for='virtual_firealarm']").text("Simple Agent");
$("label[for='virtual_firealarm_advanced']").text("Advanced Agent");
}else{
$('.sketchTypes').remove();
}
} }
/* /*

@ -38,60 +38,37 @@
<div id="download-device-modal-content" class="hide"> <div id="download-device-modal-content" class="hide">
<div class="modal-content"> <div class="modal-content">
<div class="row"> <div class="row">
<div class="col-md-7 col-centered center-container"> <div class="col-md-7 center-container">
<h3>Name your device and download the agent from following link.</h3> <h3>Name your device and download the agent from following link.dsfsdfdsf</h3>
<br/> <br/>
<form id="downloadForm" method="GET" action="{{@app.context}}/api/devices/sketch/download"> <form id="downloadForm" method="GET" action="{{@app.context}}/api/devices/sketch/download">
<div class="control-group"> <div class="control-group">
<div class="controls"> <div class="controls">
<input class="new-device-name" style="color:#3f3f3f;padding:5px" <input class="new-device-name" style="color:#3f3f3f;padding:5px"
type="text" type="text"
placeholder="Ex. Lobby_Firealarm" placeholder="Ex. Lobby_Firealarm"
name="deviceName" size="60" required> name="deviceName" size="60" required>
<br/> <br/><br/>
<input type="hidden" class="deviceType" name="deviceType" <input type="hidden" class="deviceType" name="deviceType" value="virtual_firealarm"/>
value="virtual_firealarm"/> <input type="radio" name="sketchType" value="simple_agent" id="simple_agent"> <label for="simple_agent">Simple Agent</label> &nbsp;&nbsp;
<input type="hidden" class="sketchType" name="sketchType" <input type="radio" name="sketchType" value="advanced_agent" id="advanced_agent"> <label for="advanced_agent">Advanced Agent</label>
value="virtual_firealarm"/>
<div class="sketchTypes" style=" padding-top: 20px; padding-bottom: 5px; font-size: 18px;">
<input type="radio" name="sketchType" id="virtual_firealarm"
value="virtual_firealarm"><label for="virtual_firealarm">virtual_firealarm</label>
</div> </div>
</div> </div>
</div> <div class="buttons" style="padding-bottom: 0px">
<br/> <a class="btn btn-operations" onclick="downloadAgent()">Download
Now</a>
<div class="buttons"> &nbsp;&nbsp;
<a class="btn-operations" onclick="downloadAgent()">Download <a href="#" id="download-device-download-link" class="btn btn-operations">
Now</a> &nbsp;&nbsp;&nbsp;&nbsp;Copy Link&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp; </a>
<a href="#" id="download-device-download-link" class="blue-button"> &nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;Copy Link&nbsp;&nbsp;&nbsp;&nbsp; </div>
</a>
&nbsp;&nbsp;
</div>
</form> </form>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<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 id="device-400-content" class="hide">
<div class="modal-content"> <div class="modal-content">
<div class="row"> <div class="row">
@ -237,43 +214,46 @@
</div> </div>
</div> </div>
<style type="text/css">
.circle { {{#zone "topCss"}}
background: none repeat scroll 0 0 #191919; <style type="text/css">
border-radius: 50px; .circle {
height: 50px; background: none repeat scroll 0 0 #191919;
padding: 10px; border-radius: 50px;
width: 50px; height: 50px;
color: #fff; padding: 10px;
} width: 50px;
.padding-top-double { color: #fff;
padding-top: 20px; }
} .padding-top-double {
.padding-double { padding-top: 20px;
padding: 20px; }
} .padding-double {
.grey { padding: 20px;
color: #333; }
} .grey {
hr { color: #333;
display: block; }
height: 1px; hr {
border: 0; display: block;
border-top: 1px solid #7f7f7f; height: 1px;
margin: 1em 0; border: 0;
padding: 0; border-top: 1px solid #7f7f7f;
opacity: 0.2; margin: 1em 0;
} padding: 0;
.light-grey { opacity: 0.2;
color: #7c7c7c; }
} .light-grey {
.uppercase { color: #7c7c7c;
text-transform: uppercase; }
} .uppercase {
.grey-bg { text-transform: uppercase;
background-color: #f6f4f4; }
} .grey-bg {
</style> background-color: #f6f4f4;
}
</style>
{{/zone}}
{{#zone "bottomJs"}} {{#zone "bottomJs"}}
{{js "/js/download.js"}} {{js "/js/download.js"}}
@ -288,7 +268,7 @@
function toggleEnrollment(){ function toggleEnrollment(){
$(".modalpopup-content").html($("#qr-code-modal").html()); $(".modalpopup-content").html($("#qr-code-modal").html());
//generateQRCode(".modalpopup-content .qr-code"); //generateQRCode(".modalpopup-content .qr-code");
showPopup(); //showPopup();
} }
</script> </script>

Loading…
Cancel
Save