Skip to content
Snippets Groups Projects
Commit 9d8b3f59 authored by catch's avatar catch
Browse files

Issue #1481560 by nod_: Follow up for, Add 'use strict' to all core JavaScript...

Issue #1481560 by nod_: Follow up for, Add 'use strict' to all core JavaScript to enforce clean code.
parent abb86f98
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -18,12 +18,12 @@ ...@@ -18,12 +18,12 @@
// Set up gradients if there are some. // Set up gradients if there are some.
var color_start, color_end; var color_start, color_end;
for (i in settings.gradients) { for (var i in settings.gradients) {
color_start = farb.unpack(form.find('#palette input[name="palette[' + settings.gradients[i]['colors'][0] + ']"]').val()); color_start = farb.unpack(form.find('#palette input[name="palette[' + settings.gradients[i]['colors'][0] + ']"]').val());
color_end = farb.unpack(form.find('#palette input[name="palette[' + settings.gradients[i]['colors'][1] + ']"]').val()); color_end = farb.unpack(form.find('#palette input[name="palette[' + settings.gradients[i]['colors'][1] + ']"]').val());
if (color_start && color_end) { if (color_start && color_end) {
var delta = []; var delta = [];
for (j in color_start) { for (var j in color_start) {
delta[j] = (color_end[j] - color_start[j]) / (settings.gradients[i]['vertical'] ? height[i] : width[i]); delta[j] = (color_end[j] - color_start[j]) / (settings.gradients[i]['vertical'] ? height[i] : width[i]);
} }
var accum = color_start; var accum = color_start;
......
...@@ -11,7 +11,7 @@ Drupal.behaviors.openid = { ...@@ -11,7 +11,7 @@ Drupal.behaviors.openid = {
// This behavior attaches by ID, so is only valid once on a page. // This behavior attaches by ID, so is only valid once on a page.
if (cookie || location.hash == '#openid-login') { if (cookie || location.hash == '#openid-login') {
$edit_openid_identifier = $('#edit-openid-identifier'); var $edit_openid_identifier = $('#edit-openid-identifier');
if (cookie) { if (cookie) {
$edit_openid_identifier.val(cookie); $edit_openid_identifier.val(cookie);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment