You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
815 B
36 lines
815 B
/** |
|
* Ajax command for highlighting elements. |
|
* |
|
* @param {Drupal.Ajax} [ajax] |
|
* An Ajax object. |
|
* @param {object} response |
|
* The Ajax response. |
|
* @param {string} response.id |
|
* The row id. |
|
* @param {string} response.tabledrag_instance |
|
* The tabledrag instance identifier. |
|
* @param {number} [status] |
|
* The HTTP status code. |
|
*/ |
|
Drupal.AjaxCommands.prototype.tabledragChanged = function ( |
|
ajax, |
|
response, |
|
status, |
|
) { |
|
if (status !== 'success') { |
|
return; |
|
} |
|
|
|
const tableDrag = Drupal.tableDrag[response.tabledrag_instance]; |
|
|
|
// eslint-disable-next-line new-cap |
|
const rowObject = new tableDrag.row( |
|
document.getElementById(response.id), |
|
'', |
|
tableDrag.indentEnabled, |
|
tableDrag.maxDepth, |
|
true, |
|
); |
|
rowObject.markChanged(); |
|
rowObject.addChangedWarning(); |
|
};
|
|
|