{{^hasdata}}
{{#str}} restoredefaultnone, tool_analytics {{/str}}
{{/hasdata}}
{{#hasdata}}
{{#str}} restoredefaultinfo, tool_analytics {{/str}}
{{/hasdata}}
{{#js}}
require(['jquery'], function($) {
// Toggle the visibility of the indicators list.
$('#restorablemodelslist').on('click', '[data-widget="toggle"]', function(e) {
e.preventDefault();
var toggle = $(e.currentTarget);
var listid = toggle.attr('aria-controls');
$(document.getElementById(listid)).toggle();
if (toggle.attr('aria-expanded') == 'false') {
toggle.attr('aria-expanded', 'true');
} else {
toggle.attr('aria-expanded', 'false');
}
});
// Selecting all / all in component checkboxes.
$('#restorablemodelslist').on('click', '[data-select]', function(e) {
e.preventDefault();
var handler = $(e.currentTarget);
var component = handler.attr('data-select');
if (component == '*') {
$('input[data-component]').prop('checked', true);
} else {
$('input[data-component="' + component + '"]').prop('checked', true);
}
});
});
{{/js}}