diff --git a/core/includes/common.inc b/core/includes/common.inc index be6cab9dbde28f5e77de0598e46010370603e92e..29f1ef117ead4733647a43fe70c58e0dd9fe90f7 100644 --- a/core/includes/common.inc +++ b/core/includes/common.inc @@ -4901,8 +4901,7 @@ function drupal_add_tabledrag($table_id, $action, $relationship, $group, $subgro // Add the table drag JavaScript to the page before the module JavaScript // to ensure that table drag behaviors are registered before any module // uses it. - drupal_add_library('system', 'jquery.cookie'); - drupal_add_js('core/misc/tabledrag.js', array('weight' => -1)); + drupal_add_library('system', 'drupal.tabledrag'); $js_added = TRUE; } diff --git a/core/modules/system/system.module b/core/modules/system/system.module index 4dfb6e429c302d6a8f8d2180ac8a3bceb4427c9c..53948302fa537ecbd4fe4e01473265c912011a35 100644 --- a/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -1218,6 +1218,18 @@ function system_library_info() { ), ); + // Drupal's tabledrag library. + $libraries['drupal.tabledrag'] = array( + 'title' => 'Drupal tabledrag', + 'version' => VERSION, + 'js' => array( + 'core/misc/tabledrag.js' => array('group' => JS_LIBRARY, 'weight' => -1), + ), + 'dependencies' => array( + array('system', 'jquery.cookie'), + ), + ); + // Drupal's collapsible fieldset. $libraries['drupal.collapse'] = array( 'title' => 'Drupal collapsible fieldset',