In a views handler, create an option, type checkbox, that has "remove" in it's name.

This CSS rule gets executed:

[class*="form-type-checkbox"][class*="remove"] {
    display: none;
}

And the checkbox never gets displayed, leaving you scratching your head.

Comments

dawehner’s picture

This is really possible with css? Interesting ...

The problem is only existant for the preview, right?
Sadly it's not that easy to find a good css selector, especially for the no-js case.

bojanz’s picture

Admin only (it's in the views-admin css file). I got it for a checkbox in the VBO field settings...

Sadly, I have no idea what it's actually used for. Knowing that would help me suggest an improvement...

dawehner’s picture

Just sent a message via druplicon to jessebeach

wildermuthn’s picture

When I define an action with 'remove' in it, the action doesn't appear in VBO (although it is there in the html).

dawehner’s picture

Does this css rule is actually correct? I can't find a remove class in the code

λ  views git:(7.x-3.x) ✗ grep "remove" . -rn | grep "class"
./css/views-admin.theme.css:208:[class*="form-type-checkbox"][class*="remove"] {
./includes/admin.inc:2930:        '#attributes' => array('class' => array('views-remove-checkbox')),
./includes/admin.inc:3042:                'class' => array('views-button-remove display-remove-link'),
./includes/admin.inc:3323:      '#attributes' => array('class' => array('views-remove-checkbox')),
./includes/admin.inc:3360:      $row[] = drupal_render($form['fields'][$id]['removed']) . l('<span>' . t('Remove') . '</span>', 'javascript:void()', array('attributes' => array('id' => 'views-remove-link-' . $id, 'class' => array('views-hidden', 'views-button-remove', 'views-remove-link'), 'alt' => t('Remove this item'), 'title' => t('Remove this item')), 'html' => TRUE));
./includes/admin.inc:3540:          'class' => array('views-remove-group'),
./includes/admin.inc:3606:      '#attributes' => array('class' => array('views-remove-checkbox')),
./includes/admin.inc:3658:        $form['remove_groups'][$group_id]['#attributes']['class'][] = 'js-hide';
./includes/admin.inc:3672:        $form['filters'][$id]['removed']['#attributes']['class'][] = 'js-hide';
./includes/admin.inc:3673:        $row[] = drupal_render($form['filters'][$id]['removed']) . l('<span>' . t('Remove') . '</span>', 'javascript:void()', array('attributes' => array('id' => 'views-remove-link-' . $id, 'class' => array('views-hidden', 'views-button-remove', 'views-groups-remove-link', 'views-remove-link'), 'alt' => t('Remove this item'), 'title' => t('Remove this item')), 'html' => true));
./js/views-admin.js:489:    $('<a href="#" class="views-remove-group-link">' + Drupal.t('Remove group') + '</a>')
dawehner’s picture

Status: Active » Postponed (maintainer needs more info)

I have no idea how to continue on this issue. For me it's kind of dangerous to remove it. what are there checkboxes which should be hidden. Anyone has a clue?

If noone has an idea, we should just remove it and see who complains :)

bojanz’s picture

Status: Postponed (maintainer needs more info) » Active

As far as I can see both from your grep and from my search, the checkbox that needs to be hidden (because its functionality is handled by JS when the "Remove' button is clicked) always has a class "views-remove-checkbox"

So let's just replace

[class*="form-type-checkbox"][class*="remove"] {
    display: none;
}

with

.views-remove-checkbox {
    display: none;
}

and see what happens :)

dawehner’s picture

Status: Active » Fixed

There we go. Commited to 7.x-3.x. Let's see whether someone complains.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

matt2000’s picture

I ran into this issue yesterday with Views 7.x-3.8
Nevermind. The issue was caused by Rubik theme's views css.