summaryrefslogtreecommitdiff
path: root/color/preview.js
diff options
context:
space:
mode:
authorsanjeevi012019-07-05 15:30:52 +0530
committersanjeevi012019-07-05 15:33:36 +0530
commit85a9d81638d240f3fa9ed01cb139ef33243b379b (patch)
tree5de2a278bd0b3e8c979defa73b24470a56055a3c /color/preview.js
parente5a79b1f0f70eb0bc413c5b85139617dbe84b07d (diff)
downloadfossee_istos-85a9d81638d240f3fa9ed01cb139ef33243b379b.tar.gz
fossee_istos-85a9d81638d240f3fa9ed01cb139ef33243b379b.tar.bz2
fossee_istos-85a9d81638d240f3fa9ed01cb139ef33243b379b.zip
Initial commit
Diffstat (limited to 'color/preview.js')
-rwxr-xr-xcolor/preview.js31
1 files changed, 31 insertions, 0 deletions
diff --git a/color/preview.js b/color/preview.js
new file mode 100755
index 0000000..c5b2aa9
--- /dev/null
+++ b/color/preview.js
@@ -0,0 +1,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); \ No newline at end of file