made copy-to-clipboard more usefull
This commit is contained in:
@@ -25,3 +25,7 @@ td.left {
|
|||||||
td.right {
|
td.right {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
td.blue {
|
||||||
|
color: #208dd6;
|
||||||
|
}
|
||||||
+4
-1
@@ -12,7 +12,7 @@
|
|||||||
<tr><td class="white right">Org</td><td class="white left">{{ flower.organization }}</td> </tr>
|
<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">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">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>
|
<tr><td class="white">{{ flower.dateCreated[:10] }}</td><td></td> </tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
@@ -36,6 +36,9 @@ function myCopyFunction() {
|
|||||||
navigator.clipboard.writeText(copyText.getAttribute("value"));
|
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>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user