set clipboard behavior on all pages

This commit is contained in:
Son NK 2019-08-16 11:56:22 +02:00
parent aeb4108570
commit 83abbe5406
6 changed files with 12 additions and 66 deletions

View File

@ -215,15 +215,6 @@
localStorage.setItem("introShown", "yes")
}
clipboard.on('success', function (e) {
notie.alert({
type: "success",
text: "Copied to clipboard",
time: 1,
});
e.clearSelection();
});
$(".delete-email").on("click", function (e) {
notie.confirm({

View File

@ -112,7 +112,6 @@
</button>
</span>
</div>
</div>
<div class="form-group">
@ -177,16 +176,5 @@
currentElement.parent().parent().remove();
});
var clipboard = new ClipboardJS('.clipboard');
clipboard.on('success', function (e) {
notie.alert({
type: "success",
text: "Copied to clipboard",
time: 2,
});
e.clearSelection();
});
</script>
{% endblock %}

View File

@ -104,18 +104,6 @@
{% block script %}
<script>
var clipboard = new ClipboardJS('.btn');
clipboard.on('success', function (e) {
notie.alert({
type: "success",
text: "Copied to clipboard",
time: 1,
});
e.clearSelection();
});
$(".delete-client").on("click", function (e) {
notie.confirm({
text: "This operation is not reversible, please confirm",

View File

@ -120,21 +120,4 @@
</a>
</div>
{% endblock %}
{% block script %}
<script>
var clipboard = new ClipboardJS('.clipboard');
clipboard.on('success', function (e) {
notie.alert({
type: "success",
text: "Copied to clipboard",
time: 1,
});
e.clearSelection();
});
</script>
{% endblock %}

View File

@ -85,19 +85,3 @@
{% endblock %}
{% block script %}
<script>
var clipboard = new ClipboardJS('.clipboard');
clipboard.on('success', function (e) {
notie.alert({
type: "success",
text: "Copied to clipboard",
time: 1,
});
e.clearSelection();
});
</script>
{% endblock %}

View File

@ -105,6 +105,18 @@
overlayClickDismiss: false,
});
var clipboard = new ClipboardJS('.clipboard');
clipboard.on('success', function (e) {
notie.alert({
type: "success",
text: "Copied to clipboard",
time: 2,
});
e.clearSelection();
});
</script>
<!-- For additional script -->