Problem/Motivation

It will be good to have custom handler when user drag row in table with drag handler which we can trigger when table row position is changed.

We need to trigger this behavior in our javascript not only as message above table but also as handler for our custom functionality.

Proposed resolution

Add custom onMarkChanged handler which user can handle in custom javascript code.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Anonymous’s picture

jakubhnilicka created an issue. See original summary.

Anonymous’s picture

Here is patch for this issue.

Example:

(function ($, Drupal) {

  'use strict';

  Drupal.tableDrag.prototype.row.prototype.onMarkChanged = function (changedRow) {
    console.log('Row was changed');
    return null;
  };

})(jQuery, Drupal);
Anonymous’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 2: drupal-onmarkchanged-handler-2862536-1-8.2.x-dev.patch, failed testing.

martin_klima’s picture

martin_klima’s picture

Status: Active » Needs review
droplet’s picture

same? #2422737: Tabledrag event after dragging elements

If not, why not? Thanks :)

droplet’s picture

Status: Needs review » Postponed (maintainer needs more info)
sarmiliboyz’s picture

Version: 8.2.x-dev » 8.4.x-dev

current active development branch is 8.4.x-dev

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

nod_’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)
Related issues: +#2422737: Tabledrag event after dragging elements

Agreed with #7