1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
/**
* DO NOT EDIT THIS FILE.
* See the following change record for more information,
* https://www.drupal.org/node/2815083
* @preserve
**/
(function ($, Drupal, drupalSettings) {
Drupal.color = {
logoChanged: false,
bgChanged: false,
callback: function callback(context, settings, $form) {
var $colorPreview = $form.find('.color-preview');
var $colorPalette = $form.find('.js-color-palette');
$colorPreview.find('.color-preview-top-head *, .color-preview-footer-wrapper *').css('color', $colorPalette.find('input[name="palette[topnav]"]').val());
$colorPreview.find('.color-preview-footer-wrapper, .color-preview-top-head').css('background-color', $colorPalette.find('input[name="palette[footer]"]').val());
$colorPreview.find('.color-preview-main h2, .color-preview .preview-content, .color-preview-content h1, .preview-content ').css('color', $colorPalette.find('input[name="palette[text]"]').val());
$colorPreview.find('.color-preview-content a, .color-preview-main-menu-links a, .color-preview-main-menu-links a:hover').css('color', $colorPalette.find('input[name="palette[link]"]').val());
$colorPreview.find('.color-preview-site-name').css('color', $colorPalette.find('input[name="palette[footer]"]').val());
$colorPreview.find('.color-preview-main-menu').css('background-color', $colorPalette.find('input[name="palette[top]"]').val());
$colorPreview.find('.color-preview-main-menu-links li a').css('color', $colorPalette.find('input[name="palette[nav-text]"]').val());
$colorPreview.find('.color-preview-block ').css('background-color', $colorPalette.find('input[name="palette[sidebar]"]').val());
$colorPreview.find('.color-preview-main').css('background-color', $colorPalette.find('input[name="palette[bg]"]').val());
$colorPreview.find('.color-preview-main-menu-links li a:hover,.color-preview-main-menu-links li a:focus').css('background-color', $colorPalette.find('input[name="palette[nav-hover]"]').val());
}
};
})(jQuery, Drupal, drupalSettings);
|