Showing 374 changed files with 4,081 additions and 3,619 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ System requirements
-------------------

* Web server
* PHP 5.3.7+ with GDlib, DOM, Phar and SOAP
* PHP 5.4.0+ with GDlib, DOM, Phar and SOAP
* MySQL 5.0.3+


Expand Down
60 changes: 60 additions & 0 deletions assets/contao/js/core-uncompressed.js
Original file line number Diff line number Diff line change
Expand Up @@ -2032,6 +2032,65 @@ var Backend =
});
},

/**
* Allow to toggle checkboxes clicking a row
*
* @author Kamil Kuzminski
*/
enableToggleCheckboxes: function() {
var container = $('tl_select'),
checkboxes = [], start, thisIndex, startIndex, status, from, to,
shiftToggle = function(el) {
thisIndex = checkboxes.indexOf(el);
startIndex = checkboxes.indexOf(start);
from = Math.min(thisIndex, startIndex);
to = Math.max(thisIndex, startIndex);
status = checkboxes[startIndex].checked ? true : false;

for (from; from<=to; from++) {
checkboxes[from].checked = status;
}
};

if (container) {
checkboxes = container.getElements('input[type="checkbox"]');
}

// Row click
$$('.toggle_select').each(function(el) {
el.addEvent('click', function(e) {
var input = $(el).getElement('input[type="checkbox"]');

if (!input) {
return;
}

if (e.shift && start) {
shiftToggle(input);
} else {
input.checked = input.checked ? '' : 'checked';

if (input.get('onclick') == 'Backend.toggleCheckboxes(this)') {
Backend.toggleCheckboxes(input); // see #6399
}
}

start = input;
});
});

// Checkbox click
checkboxes.each(function(el) {
el.addEvent('click', function(e) {
if (e.shift && start) {
shiftToggle(this);
}

start = this;
});
});
},

/**
* Allow to mark the important part of an image
*
Expand Down Expand Up @@ -2181,6 +2240,7 @@ window.addEvent('domready', function() {
Backend.convertEnableModules();
Backend.makeWizardsSortable();
Backend.enableImageSizeWidgets();
Backend.enableToggleCheckboxes();

// Chosen
if (Elements.chosen != undefined) {
Expand Down
Loading