Skip to content
Snippets Groups Projects

Issue #3388597: Run eslint and enable linting on GitLabCI

Open Issue #3388597: Run eslint and enable linting on GitLabCI
2 unresolved threads
2 unresolved threads

Merge request reports

Members who can merge are allowed to add commits.
Code Quality is loading
Test summary results are being parsed
Ready to merge by members who can write to the target branch.
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
1 (function ($) {
1 // Find our targets and set as variables.
2 const massEdit = document.getElementsByClassName(
3 'js-form-item-editors-add-mass',
4 );
5 const addEdit = document.getElementsByClassName('js-form-item-editors-add');
2 6
3 'use strict';
7 const mass = massEdit[0];
8 const auto = addEdit[0];
4 9
  • Comment on lines +1 to 9
    Suggested change
    1 // Find our targets and set as variables.
    2 const massEdit = document.getElementsByClassName(
    3 'js-form-item-editors-add-mass',
    4 );
    5 const addEdit = document.getElementsByClassName('js-form-item-editors-add');
    6
    7 const mass = massEdit[0];
    8 const auto = addEdit[0];
    9
    1 // Find our targets and set as variables.
    2 const mass = document.querySelector('.js-form-item-editors-add-mass');
    3 const auto = document.querySelector('.js-form-item-editors-add');
    4
  • changed this line in version 4 of the diff

  • Please register or sign in to reply
  • 8 const auto = addEdit[0];
    4 9
    5 Drupal.behaviors.workbenchAccess = {
    6 attach: function (context, settings) {
    7 $(once('field-switch', '#edit-add', context)).each(function () {
    8 // We hide mass assign.
    9 $('.js-form-item-editors-add-mass').hide();
    10 $(this).find('.switch').click(function (e) {
    11 e.preventDefault();
    12 $('.js-form-item-editors-add').toggle();
    13 $('.js-form-item-editors-add-mass').toggle();
    14 })
    15 });
    16 }
    17 };
    10 function toggleItem(e) {
  • Lee Rowlands
  • Lee Rowlands
  • Thanks, just some minor improvements to make the code use more ES6 features and simplify things

  • Ken Rickard added 5 commits

    added 5 commits

    Compare with previous version

  • Ken Rickard added 1 commit

    added 1 commit

    • 653ee37f - Accept suggestions from larowlan

    Compare with previous version

  • Ken Rickard added 2 commits

    added 2 commits

    Compare with previous version

  • Ken Rickard added 1 commit

    added 1 commit

    • c904b64b - Clean up code and dependencies

    Compare with previous version

  • Please register or sign in to reply
    Loading