Issue #1904932 by dawehner, damiankloip, YesCT: Fixed Cannot remove a handler from the 'rearrange' popup.
parent
1304f13bfb
commit
f140bceea2
|
@ -1098,6 +1098,30 @@ Drupal.viewsUi.resizeModal = function (e, no_shrink) {
|
|||
|
||||
};
|
||||
|
||||
Drupal.behaviors.viewsUiHandlerRemoveLink = {};
|
||||
Drupal.behaviors.viewsUiHandlerRemoveLink.attach = function(context) {
|
||||
var $ = jQuery;
|
||||
|
||||
// Handle handler deletion by looking for the hidden checkbox and hiding the
|
||||
// row.
|
||||
$('a.views-remove-link', context).once('views-processed').click(function(event) {
|
||||
var id = $(this).attr('id').replace('views-remove-link-', '');
|
||||
$('#views-row-' + id, context).hide();
|
||||
$('#views-removed-' + id, context).attr('checked', true);
|
||||
event.preventDefault();
|
||||
});
|
||||
|
||||
// Handle display deletion by looking for the hidden checkbox and hiding the
|
||||
// row.
|
||||
$('a.display-remove-link', context).once('display').click(function(event) {
|
||||
var id = $(this).attr('id').replace('display-remove-link-', '');
|
||||
$('#display-row-' + id, context).hide();
|
||||
$('#display-removed-' + id, context).attr('checked', true);
|
||||
event.preventDefault();
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
jQuery(function() {
|
||||
|
||||
"use strict"
|
||||
|
|
|
@ -289,7 +289,7 @@ function theme_views_ui_rearrange_filter_form(&$vars) {
|
|||
$form['filters'][$id]['group']['#attributes']['class'] = array('views-group-select views-group-select-' . $group_id);
|
||||
$row[] = drupal_render($form['filters'][$id]['group']);
|
||||
$form['filters'][$id]['removed']['#attributes']['class'][] = 'js-hide';
|
||||
$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));
|
||||
$row[] = drupal_render($form['filters'][$id]['removed']) . l('<span>' . t('Remove') . '</span>', '', 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));
|
||||
|
||||
$row = array('data' => $row, 'class' => array('draggable'), 'id' => 'views-row-' . $id);
|
||||
if ($group_id !== 'ungroupable') {
|
||||
|
|
Loading…
Reference in New Issue