duplicate copy to clipboard functionality for welcome.html

This commit is contained in:
Adrian Tiberius 2016-09-19 19:22:23 +03:00
parent 274abaebce
commit 309713807c
4 changed files with 17 additions and 6 deletions

View File

@ -192,7 +192,7 @@ p {
width: 240px;
height: auto; }
input[type=email] {
input[type=email], input.input-email {
padding: 15px;
padding-right: 45px;
width: 100%;
@ -203,6 +203,9 @@ input[type=email] {
background-color: #fff;
font-size: 14px; }
input.input-email {
text-align: center; }
.email {
position: relative;
margin: 0 auto;

View File

@ -119,9 +119,13 @@ $(function() {
} catch (err) {
succeeded = false;
}
if (!succeeded) {
// Browser doesn't support execCommand
if (succeeded) {
var text = shareLinkInput.val();
var copytext = 'Copied to clipboard';
shareLinkInput.val(copytext);
setTimeout(function() {
shareLinkInput.val(text);
}, 500);
}
});
});

View File

@ -177,7 +177,7 @@ p {
}
}
input[type=email] {
input[type=email], input.input-email {
padding: 15px;
padding-right: 45px;
width: 100%;
@ -188,6 +188,10 @@ input[type=email] {
font-size: 14px;
}
input.input-email {
text-align: center;
}
.email {
position: relative;
margin: 0 auto;

View File

@ -108,7 +108,7 @@
<p>Or share your unique link:</p><br/>
<div class="status-email" style="width:314px;margin:auto">
<input id="shareLinkInput" type="email" value="" >
<input id="shareLinkInput" type="text" class="input-email" value="" >
<div class="email">
</div>