Merge pull request #200 from zoff-music/feature/delete-all-songs-confirmation

Added confirmationprompt on delete all songs
This commit is contained in:
Kasper Rynning-Tønnesen
2017-11-02 13:12:14 +01:00
committed by GitHub
2 changed files with 6 additions and 5 deletions

View File

@@ -1027,10 +1027,11 @@ function seekToClick(e){
$(document).on("click", ".accept-delete", function(e) {
e.preventDefault();
var delete_id = $(this).attr("data-video-id");
/*var delete_id = $(this).attr("data-video-id");
if(delete_id) {
List.vote(delete_id, 'del');
}
}*/
socket.emit("delete_all", {channel: chan.toLowerCase(), adminpass: adminpass == "" ? "" : Crypt.crypt_pass(adminpass), pass: embed ? '' : Crypt.crypt_pass(Crypt.get_userpass(chan.toLowerCase()))});
$("#delete_song_alert").modal("close");
});
@@ -1272,7 +1273,7 @@ $(document).on("click", ".close-user-password", function() {
$(document).on("click", ".delete-all-songs", function(e){
e.preventDefault();
socket.emit("delete_all", {channel: chan.toLowerCase(), adminpass: adminpass == "" ? "" : Crypt.crypt_pass(adminpass), pass: embed ? '' : Crypt.crypt_pass(Crypt.get_userpass(chan.toLowerCase()))});
$("#delete_song_alert").modal("open");
});
$(document).on("click", ".not-exported-container .not-exported-element #extra-export-container-text .extra-add-text", function(){

View File

@@ -96,8 +96,8 @@
</div>
<div id="delete_song_alert" class="modal">
<div class="modal-content">
<h5>Delete song</h5>
<p>Are you sure you want to delete <span id="delete_song_title"></span>?</p>
<h5>Delete songs</h5>
<p>Are you sure you want to delete all the songs in the channel?</p>
</div>
<div class="modal-footer">
<a href="#!" class="waves-effect waves-red btn-flat accept-delete right red-text">Delete</a>