diff --git a/admin/calendar.php b/admin/calendar.php
index fc35fad8..5a7d0762 100644
--- a/admin/calendar.php
+++ b/admin/calendar.php
@@ -83,11 +83,15 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
+
+
+
+
-
-
+
diff --git a/js/modsForHesk-javascript.js b/js/modsForHesk-javascript.js
index e204823d..706abbe0 100644
--- a/js/modsForHesk-javascript.js
+++ b/js/modsForHesk-javascript.js
@@ -70,6 +70,21 @@ var loadJquery = function()
$('.colorpicker-trigger').colorpicker({
format: 'hex'
});
+
+ // Generic select/deselect all. Use this instead of selectAll()/deselctAll()
+ $('[data-select-all]').click(function() {
+ var toggle = $(this).attr('data-select-all');
+ $('[data-select-target="' + toggle + '"]').prop('checked', true)
+ .prop('selected', true)
+ .trigger('change');
+ });
+
+ $('[data-deselect-all]').click(function() {
+ var toggle = $(this).attr('data-deselect-all');
+ $('[data-select-target="' + toggle + '"]').prop('checked', false)
+ .prop('selected', false)
+ .trigger('change');
+ });
};
function calculateGrayCount(background) {
@@ -85,10 +100,12 @@ var setIcon = function(icon) {
$('[data-toggle="iconpicker"]').iconpicker('setIcon', icon);
}
+// Deprecated. Use data-select-all="id" instead
function selectAll(id) {
$('#' + id + ' option').prop('selected', true);
}
+// Deprecated. Use data-deselect-all="id" instead
function deselectAll(id) {
$('#' + id + ' option').prop('selected', false);
}
diff --git a/language/en/text.php b/language/en/text.php
index 1a687e4c..6b8b4814 100644
--- a/language/en/text.php
+++ b/language/en/text.php
@@ -105,6 +105,8 @@ $hesklang['tickets_only'] = 'Tickets only';
$hesklang['events_only'] = 'Events only';
$hesklang['events'] = 'Events';
$hesklang['add_files'] = ' Add File';
+$hesklang['select_all_title_case'] = 'Select All';
+$hesklang['deselect_all_title_case'] = 'Deselect All';
// ADDED OR MODIFIED IN Mods for HESK 2.5.2
$hesklang['manage_statuses'] = 'Manage Statuses';