Hello,

It would be really nice if we could re-order the string overrides on the settings page.
This will allow better management of all the strings being overwritten and allow admin to group them accordingly.
I would this feature request may be considered.

Thank you

Comments

robloach’s picture

It currently stores them in alphabetical order, but having customized weight would be pretty neat.

robloach’s picture

Title: Re-ordering the string overrides » Re-ordering the String Overrides
Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Active » Needs work

Using jQuery TableSorter:

stringoverrides.admin.js

/**
 * @file
 * String Overrides JavaScript behaviors.
 */

(function ($) {

/**
 * Drupal String Overrides behavior.
 */
Drupal.behaviors.stringoverrides = {
  attach: function (context, settings) {
    $('#stringoverrides-wrapper').once('stringoverrides').tablesorter({
      textExtraction: function(node) {
        if ($(node).is('.stringoverrides-enabled')) {
          return $('input', node).val();
        }
        else if ($(node).is('.stringoverrides-context')) {
          return $('input', node).val();
        }
        else {
          return $('textarea', node).val();
        }
      }
    });
  }
};

})(jQuery);