Update for API 100007

simenon [06-25-14 - 21:11]
Update for API 100007
Filename
README
SousChef.txt
Utility.lua
libs/LibSort/LibSort-1.0.lua
diff --git a/README b/README
new file mode 100644
index 0000000..37685a4
--- /dev/null
+++ b/README
@@ -0,0 +1 @@
+This Add-on is not created by, affiliated with or sponsored by ZeniMax Media Inc. or its affiliates. The Elder Scrolls® and related logos are registered trademarks or trademarks of ZeniMax Media Inc. in the United States and/or other countries. All rights reserved.
\ No newline at end of file
diff --git a/SousChef.txt b/SousChef.txt
index 6f7e2c2..18e2fb6 100644
--- a/SousChef.txt
+++ b/SousChef.txt
@@ -1,7 +1,7 @@
-## Title: Sous Chef
-## Author: Wobin
-## Version: v1.17-90e34f9
-## APIVersion: 100004
+## Title: |cFFFFB0Sous Chef|r by |c00C000CrazyDutchGuy & Wobin|r
+## Author: CrazyDutchGuy & Wobin
+## Version: v2.0
+## APIVersion: 100007
 ## SavedVariables: SousChef_Settings

 libs\LibStub\LibStub.lua
diff --git a/Utility.lua b/Utility.lua
index c5bbf50..23fbf6f 100644
--- a/Utility.lua
+++ b/Utility.lua
@@ -5,7 +5,8 @@ local u =  SousChef.Utility

 function u.GetItemID(link)
     if link == "" or not link then return -1 end
-	return tonumber(string.match(string.match(link, "%d+:"), "%d+"))
+    local itemid = select(4,ZO_LinkHandler_ParseLink(link))
+	return tonumber(itemid)
 end

 function u.EndsWith(String,End)
diff --git a/libs/LibSort/LibSort-1.0.lua b/libs/LibSort/LibSort-1.0.lua
index 098b3c4..f6bf309 100644
--- a/libs/LibSort/LibSort-1.0.lua
+++ b/libs/LibSort/LibSort-1.0.lua
@@ -36,40 +36,17 @@ function LibSort:SetupArrows()
 	LibSort.ItemSortBank = wm:CreateControlFromVirtual("ItemSortBank", ZO_PlayerBankSortBy, "ZO_SortHeaderIcon")
 	LibSort.ItemSortBank:SetDimensions(16, 32)
 	LibSort.ItemSortBank:SetAnchor(RIGHT, ZO_PlayerBankSortByName, LEFT, -15)
-	ZO_SortHeader_SetMouseCallback(ItemSortBank,    function(header, eventType)
-                                                            if(eventType == "OnMouseEnter") then
-                                                                InitializeTooltip(InformationTooltip, ItemSortBank, BOTTOMRIGHT, 0, 32)
-                                                                SetTooltipText(InformationTooltip, "Sort")
-                                                            else
-                                                                ClearTooltip(InformationTooltip)
-                                                            end
-                                                        end)
-    ZO_PlayerInventory_InitSortHeaderIcon(LibSort.ItemSortBank,
-                                    "EsoUI/Art/Miscellaneous/list_sortHeader_icon_neutral.dds",
-                                    "EsoUI/Art/Miscellaneous/list_sortHeader_icon_sortUp.dds",
-                                    "EsoUI/Art/Miscellaneous/list_sortHeader_icon_sortDown.dds",
-                                    "EsoUI/Art/Miscellaneous/list_sortHeader_icon_over.dds",
-                                    "age")
-
+	ZO_SortHeader_SetTooltip(LibSort.ItemSortBank, "Sort", BOTTOMRIGHT, 0, 32)
+    ZO_SortHeader_InitializeArrowHeader(LibSort.ItemSortBank, "age", ZO_SORT_ORDER_DOWN)
+
     PLAYER_INVENTORY.inventories[INVENTORY_BANK].sortHeaders:AddHeader(ItemSortBank)

     LibSort.ItemSortGuild = wm:CreateControlFromVirtual("ItemSortGuild", ZO_GuildBankSortBy, "ZO_SortHeaderIcon")
 	LibSort.ItemSortGuild:SetDimensions(16, 32)
 	LibSort.ItemSortGuild:SetAnchor(RIGHT, ZO_GuildBankSortByName, LEFT, -15)
-	ZO_SortHeader_SetMouseCallback(ItemSortGuild,    function(header, eventType)
-                                                            if(eventType == "OnMouseEnter") then
-                                                                InitializeTooltip(InformationTooltip, ItemSortGuild, BOTTOMRIGHT, 0, 32)
-                                                                SetTooltipText(InformationTooltip, "Sort")
-                                                            else
-                                                                ClearTooltip(InformationTooltip)
-                                                            end
-                                                        end)
-    ZO_PlayerInventory_InitSortHeaderIcon(LibSort.ItemSortGuild,
-                                    "EsoUI/Art/Miscellaneous/list_sortHeader_icon_neutral.dds",
-                                    "EsoUI/Art/Miscellaneous/list_sortHeader_icon_sortUp.dds",
-                                    "EsoUI/Art/Miscellaneous/list_sortHeader_icon_sortDown.dds",
-                                    "EsoUI/Art/Miscellaneous/list_sortHeader_icon_over.dds",
-                                    "age")
+	ZO_SortHeader_SetTooltip(LibSort.ItemSortGuild, "Sort", BOTTOMRIGHT, 0, 32)
+    ZO_SortHeader_InitializeArrowHeader(LibSort.ItemSortBank, "age", ZO_SORT_ORDER_DOWN)
+
     PLAYER_INVENTORY.inventories[INVENTORY_GUILD_BANK].sortHeaders:AddHeader(ItemSortGuild)
 end