summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwebchick2017-11-30 20:29:41 (GMT)
committerwebchick2017-11-30 20:30:36 (GMT)
commit9b874acf9f12f385c1ba684efee9cc21c73db442 (patch)
treeac55bc69e9ce0e23eba7cb5d40970147f42ac07a
parent9bcfe6d59f16720eb7e536cca6a4f852174fac16 (diff)
Issue #2915784 by dawehner, drpal, justafish, tedbow, xjm: 1/3 JS codestyle: camelcase
-rw-r--r--core/misc/machine-name.es6.js6
-rw-r--r--core/misc/machine-name.js6
-rw-r--r--core/misc/vertical-tabs.es6.js28
-rw-r--r--core/misc/vertical-tabs.js28
-rw-r--r--core/modules/block/js/block.admin.es6.js8
-rw-r--r--core/modules/block/js/block.admin.js8
-rw-r--r--core/modules/block/js/block.es6.js12
-rw-r--r--core/modules/block/js/block.js10
-rw-r--r--core/modules/content_translation/content_translation.admin.es6.js17
-rw-r--r--core/modules/content_translation/content_translation.admin.js17
-rw-r--r--core/modules/editor/js/editor.es6.js4
-rw-r--r--core/modules/editor/js/editor.js4
-rw-r--r--core/modules/menu_ui/menu_ui.es6.js26
-rw-r--r--core/modules/menu_ui/menu_ui.js26
-rw-r--r--core/themes/bartik/color/preview.es6.js6
-rw-r--r--core/themes/bartik/color/preview.js6
16 files changed, 107 insertions, 105 deletions
diff --git a/core/misc/machine-name.es6.js b/core/misc/machine-name.es6.js
index 2695b56..ee7f528 100644
--- a/core/misc/machine-name.es6.js
+++ b/core/misc/machine-name.es6.js
@@ -86,11 +86,11 @@
}
}
- Object.keys(settings.machineName).forEach((source_id) => {
+ Object.keys(settings.machineName).forEach((sourceId) => {
let machine = '';
- const options = settings.machineName[source_id];
+ const options = settings.machineName[sourceId];
- const $source = $context.find(source_id).addClass('machine-name-source').once('machine-name');
+ const $source = $context.find(sourceId).addClass('machine-name-source').once('machine-name');
const $target = $context.find(options.target).addClass('machine-name-target');
const $suffix = $context.find(options.suffix);
const $wrapper = $target.closest('.js-form-item');
diff --git a/core/misc/machine-name.js b/core/misc/machine-name.js
index 6e0661b..636250f 100644
--- a/core/misc/machine-name.js
+++ b/core/misc/machine-name.js
@@ -49,11 +49,11 @@
}
}
- Object.keys(settings.machineName).forEach(function (source_id) {
+ Object.keys(settings.machineName).forEach(function (sourceId) {
var machine = '';
- var options = settings.machineName[source_id];
+ var options = settings.machineName[sourceId];
- var $source = $context.find(source_id).addClass('machine-name-source').once('machine-name');
+ var $source = $context.find(sourceId).addClass('machine-name-source').once('machine-name');
var $target = $context.find(options.target).addClass('machine-name-target');
var $suffix = $context.find(options.suffix);
var $wrapper = $target.closest('.js-form-item');
diff --git a/core/misc/vertical-tabs.es6.js b/core/misc/vertical-tabs.es6.js
index c5980c4..61ea218 100644
--- a/core/misc/vertical-tabs.es6.js
+++ b/core/misc/vertical-tabs.es6.js
@@ -61,7 +61,7 @@
$(context).find('[data-vertical-tabs-panes]').once('vertical-tabs').each(function () {
const $this = $(this).addClass('vertical-tabs__panes');
const focusID = $this.find(':hidden.vertical-tabs__active-tab').val();
- let tab_focus;
+ let tabFocus;
// Check if there are some details that can be converted to
// vertical-tabs.
@@ -71,45 +71,45 @@
}
// Create the tab column.
- const tab_list = $('<ul class="vertical-tabs__menu"></ul>');
- $this.wrap('<div class="vertical-tabs clearfix"></div>').before(tab_list);
+ const tabList = $('<ul class="vertical-tabs__menu"></ul>');
+ $this.wrap('<div class="vertical-tabs clearfix"></div>').before(tabList);
// Transform each details into a tab.
$details.each(function () {
const $that = $(this);
- const vertical_tab = new Drupal.verticalTab({
+ const verticalTab = new Drupal.verticalTab({
title: $that.find('> summary').text(),
details: $that,
});
- tab_list.append(vertical_tab.item);
+ tabList.append(verticalTab.item);
$that
.removeClass('collapsed')
// prop() can't be used on browsers not supporting details element,
// the style won't apply to them if prop() is used.
.attr('open', true)
.addClass('vertical-tabs__pane')
- .data('verticalTab', vertical_tab);
+ .data('verticalTab', verticalTab);
if (this.id === focusID) {
- tab_focus = $that;
+ tabFocus = $that;
}
});
- $(tab_list).find('> li').eq(0).addClass('first');
- $(tab_list).find('> li').eq(-1).addClass('last');
+ $(tabList).find('> li').eq(0).addClass('first');
+ $(tabList).find('> li').eq(-1).addClass('last');
- if (!tab_focus) {
+ if (!tabFocus) {
// If the current URL has a fragment and one of the tabs contains an
// element that matches the URL fragment, activate that tab.
const $locationHash = $this.find(window.location.hash);
if (window.location.hash && $locationHash.length) {
- tab_focus = $locationHash.closest('.vertical-tabs__pane');
+ tabFocus = $locationHash.closest('.vertical-tabs__pane');
}
else {
- tab_focus = $this.find('> .vertical-tabs__pane').eq(0);
+ tabFocus = $this.find('> .vertical-tabs__pane').eq(0);
}
}
- if (tab_focus.length) {
- tab_focus.data('verticalTab').focus();
+ if (tabFocus.length) {
+ tabFocus.data('verticalTab').focus();
}
});
},
diff --git a/core/misc/vertical-tabs.js b/core/misc/vertical-tabs.js
index ea89e85..1827007 100644
--- a/core/misc/vertical-tabs.js
+++ b/core/misc/vertical-tabs.js
@@ -26,42 +26,42 @@
$(context).find('[data-vertical-tabs-panes]').once('vertical-tabs').each(function () {
var $this = $(this).addClass('vertical-tabs__panes');
var focusID = $this.find(':hidden.vertical-tabs__active-tab').val();
- var tab_focus = void 0;
+ var tabFocus = void 0;
var $details = $this.find('> details');
if ($details.length === 0) {
return;
}
- var tab_list = $('<ul class="vertical-tabs__menu"></ul>');
- $this.wrap('<div class="vertical-tabs clearfix"></div>').before(tab_list);
+ var tabList = $('<ul class="vertical-tabs__menu"></ul>');
+ $this.wrap('<div class="vertical-tabs clearfix"></div>').before(tabList);
$details.each(function () {
var $that = $(this);
- var vertical_tab = new Drupal.verticalTab({
+ var verticalTab = new Drupal.verticalTab({
title: $that.find('> summary').text(),
details: $that
});
- tab_list.append(vertical_tab.item);
- $that.removeClass('collapsed').attr('open', true).addClass('vertical-tabs__pane').data('verticalTab', vertical_tab);
+ tabList.append(verticalTab.item);
+ $that.removeClass('collapsed').attr('open', true).addClass('vertical-tabs__pane').data('verticalTab', verticalTab);
if (this.id === focusID) {
- tab_focus = $that;
+ tabFocus = $that;
}
});
- $(tab_list).find('> li').eq(0).addClass('first');
- $(tab_list).find('> li').eq(-1).addClass('last');
+ $(tabList).find('> li').eq(0).addClass('first');
+ $(tabList).find('> li').eq(-1).addClass('last');
- if (!tab_focus) {
+ if (!tabFocus) {
var $locationHash = $this.find(window.location.hash);
if (window.location.hash && $locationHash.length) {
- tab_focus = $locationHash.closest('.vertical-tabs__pane');
+ tabFocus = $locationHash.closest('.vertical-tabs__pane');
} else {
- tab_focus = $this.find('> .vertical-tabs__pane').eq(0);
+ tabFocus = $this.find('> .vertical-tabs__pane').eq(0);
}
}
- if (tab_focus.length) {
- tab_focus.data('verticalTab').focus();
+ if (tabFocus.length) {
+ tabFocus.data('verticalTab').focus();
}
});
}
diff --git a/core/modules/block/js/block.admin.es6.js b/core/modules/block/js/block.admin.es6.js
index 86a3e36..780ea12 100644
--- a/core/modules/block/js/block.admin.es6.js
+++ b/core/modules/block/js/block.admin.es6.js
@@ -24,7 +24,7 @@
attach(context, settings) {
const $input = $('input.block-filter-text').once('block-filter-text');
const $table = $($input.attr('data-element'));
- let $filter_rows;
+ let $filterRows;
/**
* Filters the block list.
@@ -52,7 +52,7 @@
// Filter if the length of the query is at least 2 characters.
if (query.length >= 2) {
- $filter_rows.each(toggleBlockEntry);
+ $filterRows.each(toggleBlockEntry);
Drupal.announce(
Drupal.formatPlural(
$table.find('tr:visible').length - 1,
@@ -62,14 +62,14 @@
);
}
else {
- $filter_rows.each(function (index) {
+ $filterRows.each(function (index) {
$(this).parent().parent().show();
});
}
}
if ($table.length) {
- $filter_rows = $table.find('div.block-filter-text-source');
+ $filterRows = $table.find('div.block-filter-text-source');
$input.on('keyup', debounce(filterBlockList, 200));
}
},
diff --git a/core/modules/block/js/block.admin.js b/core/modules/block/js/block.admin.js
index afc9b0b..7cafed1 100644
--- a/core/modules/block/js/block.admin.js
+++ b/core/modules/block/js/block.admin.js
@@ -10,7 +10,7 @@
attach: function attach(context, settings) {
var $input = $('input.block-filter-text').once('block-filter-text');
var $table = $($input.attr('data-element'));
- var $filter_rows = void 0;
+ var $filterRows = void 0;
function filterBlockList(e) {
var query = $(e.target).val().toLowerCase();
@@ -23,17 +23,17 @@
}
if (query.length >= 2) {
- $filter_rows.each(toggleBlockEntry);
+ $filterRows.each(toggleBlockEntry);
Drupal.announce(Drupal.formatPlural($table.find('tr:visible').length - 1, '1 block is available in the modified list.', '@count blocks are available in the modified list.'));
} else {
- $filter_rows.each(function (index) {
+ $filterRows.each(function (index) {
$(this).parent().parent().show();
});
}
}
if ($table.length) {
- $filter_rows = $table.find('div.block-filter-text-source');
+ $filterRows = $table.find('div.block-filter-text-source');
$input.on('keyup', debounce(filterBlockList, 200));
}
}
diff --git a/core/modules/block/js/block.es6.js b/core/modules/block/js/block.es6.js
index 3d1802a..0bde2ad 100644
--- a/core/modules/block/js/block.es6.js
+++ b/core/modules/block/js/block.es6.js
@@ -195,14 +195,14 @@
// Find the correct region and insert the row as the last in the
// region.
tableDrag.rowObject = new tableDrag.row(row[0]);
- const region_message = table.find(`.region-${select[0].value}-message`);
- const region_items = region_message.nextUntil('.region-message, .region-title');
- if (region_items.length) {
- region_items.last().after(row);
+ const regionMessage = table.find(`.region-${select[0].value}-message`);
+ const regionItems = regionMessage.nextUntil('.region-message, .region-title');
+ if (regionItems.length) {
+ regionItems.last().after(row);
}
- // We found that region_message is the last row.
+ // We found that regionMessage is the last row.
else {
- region_message.after(row);
+ regionMessage.after(row);
}
updateBlockWeights(table, select[0].value);
// Modify empty regions with added or removed fields.
diff --git a/core/modules/block/js/block.js b/core/modules/block/js/block.js
index 0b11d54..9612dfd 100644
--- a/core/modules/block/js/block.js
+++ b/core/modules/block/js/block.js
@@ -119,12 +119,12 @@
var select = $(this);
tableDrag.rowObject = new tableDrag.row(row[0]);
- var region_message = table.find('.region-' + select[0].value + '-message');
- var region_items = region_message.nextUntil('.region-message, .region-title');
- if (region_items.length) {
- region_items.last().after(row);
+ var regionMessage = table.find('.region-' + select[0].value + '-message');
+ var regionItems = regionMessage.nextUntil('.region-message, .region-title');
+ if (regionItems.length) {
+ regionItems.last().after(row);
} else {
- region_message.after(row);
+ regionMessage.after(row);
}
updateBlockWeights(table, select[0].value);
diff --git a/core/modules/content_translation/content_translation.admin.es6.js b/core/modules/content_translation/content_translation.admin.es6.js
index 84aaf77..2253f94 100644
--- a/core/modules/content_translation/content_translation.admin.es6.js
+++ b/core/modules/content_translation/content_translation.admin.es6.js
@@ -17,10 +17,11 @@
const $context = $(context);
const options = drupalSettings.contentTranslationDependentOptions;
let $fields;
+ let dependentColumns;
- function fieldsChangeHandler($fields, dependent_columns) {
+ function fieldsChangeHandler($fields, dependentColumns) {
return function (e) {
- Drupal.behaviors.contentTranslationDependentOptions.check($fields, dependent_columns, $(e.target));
+ Drupal.behaviors.contentTranslationDependentOptions.check($fields, dependentColumns, $(e.target));
};
}
@@ -30,14 +31,14 @@
if (options && options.dependent_selectors) {
Object.keys(options.dependent_selectors).forEach((field) => {
$fields = $context.find(`input[name^="${field}"]`);
- const dependent_columns = options.dependent_selectors[field];
+ dependentColumns = options.dependent_selectors[field];
- $fields.on('change', fieldsChangeHandler($fields, dependent_columns));
- Drupal.behaviors.contentTranslationDependentOptions.check($fields, dependent_columns);
+ $fields.on('change', fieldsChangeHandler($fields, dependentColumns));
+ Drupal.behaviors.contentTranslationDependentOptions.check($fields, dependentColumns);
});
}
},
- check($fields, dependent_columns, $changed) {
+ check($fields, dependentColumns, $changed) {
let $element = $changed;
let column;
@@ -47,8 +48,8 @@
// A field that has many different translatable parts can also define one
// or more columns that require all columns to be translatable.
- Object.keys(dependent_columns).forEach((index) => {
- column = dependent_columns[index];
+ Object.keys(dependentColumns).forEach((index) => {
+ column = dependentColumns[index];
if (!$changed) {
$element = $fields.filter(filterFieldsList);
diff --git a/core/modules/content_translation/content_translation.admin.js b/core/modules/content_translation/content_translation.admin.js
index ddaf0d2..03ee6a2 100644
--- a/core/modules/content_translation/content_translation.admin.js
+++ b/core/modules/content_translation/content_translation.admin.js
@@ -11,24 +11,25 @@
var $context = $(context);
var options = drupalSettings.contentTranslationDependentOptions;
var $fields = void 0;
+ var dependentColumns = void 0;
- function fieldsChangeHandler($fields, dependent_columns) {
+ function fieldsChangeHandler($fields, dependentColumns) {
return function (e) {
- Drupal.behaviors.contentTranslationDependentOptions.check($fields, dependent_columns, $(e.target));
+ Drupal.behaviors.contentTranslationDependentOptions.check($fields, dependentColumns, $(e.target));
};
}
if (options && options.dependent_selectors) {
Object.keys(options.dependent_selectors).forEach(function (field) {
$fields = $context.find('input[name^="' + field + '"]');
- var dependent_columns = options.dependent_selectors[field];
+ dependentColumns = options.dependent_selectors[field];
- $fields.on('change', fieldsChangeHandler($fields, dependent_columns));
- Drupal.behaviors.contentTranslationDependentOptions.check($fields, dependent_columns);
+ $fields.on('change', fieldsChangeHandler($fields, dependentColumns));
+ Drupal.behaviors.contentTranslationDependentOptions.check($fields, dependentColumns);
});
}
},
- check: function check($fields, dependent_columns, $changed) {
+ check: function check($fields, dependentColumns, $changed) {
var $element = $changed;
var column = void 0;
@@ -36,8 +37,8 @@
return $(field).val() === column;
}
- Object.keys(dependent_columns).forEach(function (index) {
- column = dependent_columns[index];
+ Object.keys(dependentColumns).forEach(function (index) {
+ column = dependentColumns[index];
if (!$changed) {
$element = $fields.filter(filterFieldsList);
diff --git a/core/modules/editor/js/editor.es6.js b/core/modules/editor/js/editor.es6.js
index a882368..b87e914 100644
--- a/core/modules/editor/js/editor.es6.js
+++ b/core/modules/editor/js/editor.es6.js
@@ -14,10 +14,10 @@
* The text area DOM element, if it was found.
*/
function findFieldForFormatSelector($formatSelector) {
- const field_id = $formatSelector.attr('data-editor-for');
+ const fieldId = $formatSelector.attr('data-editor-for');
// This selector will only find text areas in the top-level document. We do
// not support attaching editors on text areas within iframes.
- return $(`#${field_id}`).get(0);
+ return $(`#${fieldId}`).get(0);
}
/**
diff --git a/core/modules/editor/js/editor.js b/core/modules/editor/js/editor.js
index 5ed1679..3017749 100644
--- a/core/modules/editor/js/editor.js
+++ b/core/modules/editor/js/editor.js
@@ -7,9 +7,9 @@
(function ($, Drupal, drupalSettings) {
function findFieldForFormatSelector($formatSelector) {
- var field_id = $formatSelector.attr('data-editor-for');
+ var fieldId = $formatSelector.attr('data-editor-for');
- return $('#' + field_id).get(0);
+ return $('#' + fieldId).get(0);
}
function changeTextEditor(field, newFormatID) {
diff --git a/core/modules/menu_ui/menu_ui.es6.js b/core/modules/menu_ui/menu_ui.es6.js
index f384f11..9420051 100644
--- a/core/modules/menu_ui/menu_ui.es6.js
+++ b/core/modules/menu_ui/menu_ui.es6.js
@@ -43,41 +43,41 @@
// in the form, but play nicely with user permissions and form
// alterations.
const $checkbox = $this.find('.js-form-item-menu-enabled input');
- const $link_title = $context.find('.js-form-item-menu-title input');
+ const $linkTitle = $context.find('.js-form-item-menu-title input');
const $title = $this.closest('form').find('.js-form-item-title-0-value input');
// Bail out if we do not have all required fields.
- if (!($checkbox.length && $link_title.length && $title.length)) {
+ if (!($checkbox.length && $linkTitle.length && $title.length)) {
return;
}
// If there is a link title already, mark it as overridden. The user
// expects that toggling the checkbox twice will take over the node's
// title.
- if ($checkbox.is(':checked') && $link_title.val().length) {
- $link_title.data('menuLinkAutomaticTitleOverridden', true);
+ if ($checkbox.is(':checked') && $linkTitle.val().length) {
+ $linkTitle.data('menuLinkAutomaticTitleOverridden', true);
}
// Whenever the value is changed manually, disable this behavior.
- $link_title.on('keyup', () => {
- $link_title.data('menuLinkAutomaticTitleOverridden', true);
+ $linkTitle.on('keyup', () => {
+ $linkTitle.data('menuLinkAutomaticTitleOverridden', true);
});
// Global trigger on checkbox (do not fill-in a value when disabled).
$checkbox.on('change', () => {
if ($checkbox.is(':checked')) {
- if (!$link_title.data('menuLinkAutomaticTitleOverridden')) {
- $link_title.val($title.val());
+ if (!$linkTitle.data('menuLinkAutomaticTitleOverridden')) {
+ $linkTitle.val($title.val());
}
}
else {
- $link_title.val('');
- $link_title.removeData('menuLinkAutomaticTitleOverridden');
+ $linkTitle.val('');
+ $linkTitle.removeData('menuLinkAutomaticTitleOverridden');
}
$checkbox.closest('.vertical-tabs-pane').trigger('summaryUpdated');
$checkbox.trigger('formUpdated');
});
// Take over any title change.
$title.on('keyup', () => {
- if (!$link_title.data('menuLinkAutomaticTitleOverridden') && $checkbox.is(':checked')) {
- $link_title.val($title.val());
- $link_title.val($title.val()).trigger('formUpdated');
+ if (!$linkTitle.data('menuLinkAutomaticTitleOverridden') && $checkbox.is(':checked')) {
+ $linkTitle.val($title.val());
+ $linkTitle.val($title.val()).trigger('formUpdated');
}
});
});
diff --git a/core/modules/menu_ui/menu_ui.js b/core/modules/menu_ui/menu_ui.js
index fe0feed..b251b6e 100644
--- a/core/modules/menu_ui/menu_ui.js
+++ b/core/modules/menu_ui/menu_ui.js
@@ -26,38 +26,38 @@
var $this = $(this);
var $checkbox = $this.find('.js-form-item-menu-enabled input');
- var $link_title = $context.find('.js-form-item-menu-title input');
+ var $linkTitle = $context.find('.js-form-item-menu-title input');
var $title = $this.closest('form').find('.js-form-item-title-0-value input');
- if (!($checkbox.length && $link_title.length && $title.length)) {
+ if (!($checkbox.length && $linkTitle.length && $title.length)) {
return;
}
- if ($checkbox.is(':checked') && $link_title.val().length) {
- $link_title.data('menuLinkAutomaticTitleOverridden', true);
+ if ($checkbox.is(':checked') && $linkTitle.val().length) {
+ $linkTitle.data('menuLinkAutomaticTitleOverridden', true);
}
- $link_title.on('keyup', function () {
- $link_title.data('menuLinkAutomaticTitleOverridden', true);
+ $linkTitle.on('keyup', function () {
+ $linkTitle.data('menuLinkAutomaticTitleOverridden', true);
});
$checkbox.on('change', function () {
if ($checkbox.is(':checked')) {
- if (!$link_title.data('menuLinkAutomaticTitleOverridden')) {
- $link_title.val($title.val());
+ if (!$linkTitle.data('menuLinkAutomaticTitleOverridden')) {
+ $linkTitle.val($title.val());
}
} else {
- $link_title.val('');
- $link_title.removeData('menuLinkAutomaticTitleOverridden');
+ $linkTitle.val('');
+ $linkTitle.removeData('menuLinkAutomaticTitleOverridden');
}
$checkbox.closest('.vertical-tabs-pane').trigger('summaryUpdated');
$checkbox.trigger('formUpdated');
});
$title.on('keyup', function () {
- if (!$link_title.data('menuLinkAutomaticTitleOverridden') && $checkbox.is(':checked')) {
- $link_title.val($title.val());
- $link_title.val($title.val()).trigger('formUpdated');
+ if (!$linkTitle.data('menuLinkAutomaticTitleOverridden') && $checkbox.is(':checked')) {
+ $linkTitle.val($title.val());
+ $linkTitle.val($title.val()).trigger('formUpdated');
}
});
});
diff --git a/core/themes/bartik/color/preview.es6.js b/core/themes/bartik/color/preview.es6.js
index 90d3b42..a41f1f2 100644
--- a/core/themes/bartik/color/preview.es6.js
+++ b/core/themes/bartik/color/preview.es6.js
@@ -35,10 +35,10 @@
$colorPreview.find('.color-preview-footer-wrapper').css('background-color', $colorPalette.find('input[name="palette[footer]"]').val());
// CSS3 Gradients.
- const gradient_start = $colorPalette.find('input[name="palette[top]"]').val();
- const gradient_end = $colorPalette.find('input[name="palette[bottom]"]').val();
+ const gradientStart = $colorPalette.find('input[name="palette[top]"]').val();
+ const gradientEnd = $colorPalette.find('input[name="palette[bottom]"]').val();
- $colorPreview.find('.color-preview-header').attr('style', `background-color: ${gradient_start}; background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(${gradient_start}), to(${gradient_end})); background-image: -moz-linear-gradient(-90deg, ${gradient_start}, ${gradient_end});`);
+ $colorPreview.find('.color-preview-header').attr('style', `background-color: ${gradientStart}; background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(${gradientStart}), to(${gradientEnd})); background-image: -moz-linear-gradient(-90deg, ${gradientStart}, ${gradientEnd});`);
$colorPreview.find('.color-preview-site-name').css('color', $colorPalette.find('input[name="palette[titleslogan]"]').val());
},
diff --git a/core/themes/bartik/color/preview.js b/core/themes/bartik/color/preview.js
index 025bbc9..9ffddc8 100644
--- a/core/themes/bartik/color/preview.js
+++ b/core/themes/bartik/color/preview.js
@@ -32,10 +32,10 @@
$colorPreview.find('.color-preview-footer-wrapper').css('background-color', $colorPalette.find('input[name="palette[footer]"]').val());
- var gradient_start = $colorPalette.find('input[name="palette[top]"]').val();
- var gradient_end = $colorPalette.find('input[name="palette[bottom]"]').val();
+ var gradientStart = $colorPalette.find('input[name="palette[top]"]').val();
+ var gradientEnd = $colorPalette.find('input[name="palette[bottom]"]').val();
- $colorPreview.find('.color-preview-header').attr('style', 'background-color: ' + gradient_start + '; background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(' + gradient_start + '), to(' + gradient_end + ')); background-image: -moz-linear-gradient(-90deg, ' + gradient_start + ', ' + gradient_end + ');');
+ $colorPreview.find('.color-preview-header').attr('style', 'background-color: ' + gradientStart + '; background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(' + gradientStart + '), to(' + gradientEnd + ')); background-image: -moz-linear-gradient(-90deg, ' + gradientStart + ', ' + gradientEnd + ');');
$colorPreview.find('.color-preview-site-name').css('color', $colorPalette.find('input[name="palette[titleslogan]"]').val());
}