The Gitlab instance will be restarted on Monday April 28th at 2AM. There will be a short interruption of service.

Skip to content
Snippets Groups Projects
Commit bdc126f6 authored by Chris Hallberg's avatar Chris Hallberg
Browse files

Lightbox fixes 2: Acknowledgements for deletion and emptying of cart and...

Lightbox fixes 2: Acknowledgements for deletion and emptying of cart and email. Select all checkbox behavior fixed, now unselects when an item is unselected.
parent 05f3c829
No related merge requests found
......@@ -123,6 +123,11 @@ $(document).ready(function() {
$('.checkbox-select-all').change(function() {
$(this).closest('form').find('.checkbox-select-item').attr('checked', this.checked);
});
$(modal).find('.checkbox-select-item').change(function() {
if(!this.checked) {
$(this).closest('form').find('.checkbox-select-all').attr('checked', false);
}
});
// handle QR code links
$('a.qrcodeLink').click(function() {
......
......@@ -423,6 +423,11 @@ function registerModalEvents(modal) {
$(modal).find('.checkbox-select-all').change(function() {
$(this).closest('.modal-body').find('.checkbox-select-item').attr('checked', this.checked);
});
$(modal).find('.checkbox-select-item').change(function() {
if(!this.checked) { // Uncheck all selected if one is unselected
$(this).closest('.modal-body').find('.checkbox-select-all').attr('checked', false);
}
});
// Highlight which submit button clicked
$(modal).find("form input[type=submit]").click(function() {
$(this).attr("clicked", "true");
......@@ -441,7 +446,7 @@ function registerModalEvents(modal) {
function registerModalForms(modal) {
// Default
$(modal).find('form').submit(function(){
ajaxSubmit($(this), closeLightbox);
ajaxSubmit($(this), changeModalContent);
return false;
});
// Action specific
......@@ -479,10 +484,6 @@ function registerModalForms(modal) {
ajaxLogin(this);
return false;
});
$(modal).find('form[name="newList"]').unbind('submit').submit(function(){
ajaxSubmit($(this), changeModalContent);
return false;
});
}
/**
* This is where you add click events to open the lightbox.
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment