made copy-to-clipboard more usefull
This commit is contained in:
@@ -25,3 +25,7 @@ td.left {
|
||||
td.right {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
td.blue {
|
||||
color: #208dd6;
|
||||
}
|
||||
+5
-2
@@ -12,7 +12,7 @@
|
||||
<tr><td class="white right">Org</td><td class="white left">{{ flower.organization }}</td> </tr>
|
||||
<tr><td class="white right">You</td><td class="white left">{{ flower.myName }}</td> </tr>
|
||||
<tr><td class="white right">Login</td><td class="white left">{{ flower.myID }}</td> </tr>
|
||||
<tr><td class="white right">Hash</td><td class="white left"><div id="secret" value="{{ flower.mySecret }}" onclick="myCopyFunction()">{{ flower.mySecret }}</div></td></tr>
|
||||
<tr><td class="white right">Hash</td><td id="secrettd" class="white left"><div id="secret" value="{{ flower.mySecret }}" onclick="myCopyFunction()">{{ flower.mySecret }}</div></td></tr>
|
||||
<tr><td class="white">{{ flower.dateCreated[:10] }}</td><td></td> </tr>
|
||||
</table>
|
||||
|
||||
@@ -35,7 +35,10 @@ function myCopyFunction() {
|
||||
// Copy the text inside the text field
|
||||
navigator.clipboard.writeText(copyText.getAttribute("value"));
|
||||
|
||||
//alert("Copied the text: "+copyText.getAttribute("value"));
|
||||
// alert("Copied the text: "+copyText.getAttribute("value"));
|
||||
|
||||
$("#secrettd").removeClass("white");
|
||||
$("#secrettd").addClass("blue");
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user