Moved modals some round, and added donation-modal

This commit is contained in:
Kasper Rynning-Tønnesen
2017-11-29 20:02:42 +01:00
parent 41f71a2f95
commit 8d7d3ebabc
6 changed files with 111 additions and 67 deletions

View File

@@ -147,6 +147,8 @@ $().ready(function(){
});
}
$("#donate").modal();
socket.on("connect", function(){
if(connect_error){
connect_error = false;
@@ -1024,6 +1026,17 @@ function seekToClick(e){
}
}
$(document).on("click", "#bitcoin-address", function(e) {
var copyTextarea = document.querySelector('#bitcoin-address');
copyTextarea.select();
var successful = document.execCommand('copy');
if(successful) {
Materialize.toast("Copied!", 2000, "green lighten");
} else {
Materialize.toast("Error copying..", 2000, "red lighten");
}
});
$(document).on("click", ".pagination-results a", function(e) {
e.preventDefault();
var that = $(this);
@@ -1310,6 +1323,11 @@ $(document).on("click", ".first_page", function(e){
List.dynamicContentPage(-10);
});
$(document).on("click", ".donate-button", function(e) {
e.preventDefault();
$("#donate").modal("open");
});
$(document).on('click', '#toast-container', function(){
before_toast();
});