SortIt
If anyone wants to try it out & give some feedback before I release it I would appreciate it.
I do still have one or two small things left to do. I need to get rid of the "New" double arrow header in the backpack. Haven't figure out how yet. So right now you see the built in "New" double arrow header & the one I added. Also the code looks quite sloppy, I need to reorganize it..but everything should work. I do plan on adding a few more sortKeys to sort by. For now there are only like 4 or 5 included: ItemType, quality, name, & equipType. If you have any particular sortKeys you want added to be able to sort by let me know.

Link to SortIt
https://www.dropbox.com/s/lwt6x27e0z...ortIt.zip?dl=0



Whats it do:
It allows you to create sort packages in the settings menu, chaining up to 4 different sort types. Like sort by quality, then item type, then equip type, then name, ect... You can also specify for each sort to be ascending or descending. It will remeber sort packs you create between reloading the ui and will remember which sort pack you last had active & reload it when you reload the ui.

Instructions:
Create & delete sort packages in the settings menu.
Then click on the main sort header in one of your inventories (backpack, bank, guild bank). This is the sort header that typically says "Name". it will toggle through the sort packages.
The big double arrow next to that header will change the sort direction.


When you create sort packages they are automatically added to the inventory header. They take the place of the old "Name" header. You just click on it and it toggles through the different sort packages you have. Since clicking on that "Name" header now toggles your current sort package if you want to toggle the sort direction I added a double arrow header next to it that toggles the sort direction.

SortIt Library:
Included in it is a Sort Library I wrote for this addon that I will also release. It allows you to easily create sort packages, like this addon does, and switch between them. It also lets you specify a callback function for creating your own sort keys.

The callback function must return all sort keys that will be used. But after you tell the library what your callback is you can call another function to create sortKeys, and then another to create sortPackages.

Then you just tell it when you want to toggle to the next sort package, or tell it specifically which sort package you wish to change to.