modifications for materialize
This commit is contained in:
Vendored
+9
-11
@@ -27,17 +27,6 @@ $(".confirm-logout").click(function() {
|
||||
});
|
||||
});
|
||||
|
||||
$('#confirmDeletionModal').on('show.bs.modal', function (event) {
|
||||
event.stopPropagation();
|
||||
var button = $(event.relatedTarget) // Button that triggered the modal
|
||||
var data = button.data() // Extract info from data-* attributes
|
||||
// If necessary, you could initiate an AJAX request here (and then do the updating in a callback).
|
||||
// Update the modal's content. We'll use jQuery here, but you could use a data binding library or other methods instead.
|
||||
var modal = $(this)
|
||||
modal.find('#identifier').text(data.identifier);
|
||||
modal.find('#confirmDeletionButton').data('url',data.url);
|
||||
});
|
||||
|
||||
$("#confirmDeletionButton").click(function() {
|
||||
var data = $(this).data();
|
||||
$.ajax({
|
||||
@@ -50,4 +39,13 @@ $("#confirmDeletionButton").click(function() {
|
||||
window.location.href = data;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('.modal').modal({
|
||||
ready: function(modal,trigger){
|
||||
var data = trigger.data();
|
||||
|
||||
modal.find('#identifier').text(data.identifier);
|
||||
modal.find('#confirmDeletionButton').data('url', data.url);
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user