For the item border code you need to make a similar change to the UpdateItemQualityBorders function:
lua Code:
local function UpdateItemQualityBorders(frame, _, unit)
if frame.unit ~= unit then return end
local border = borders[frame]
for id = 1, #slots do
local link = GetInventoryItemLink(unit, id) -- GetInventoryItemQuality doesn't work for InspectFrame
if link then
local color = qualityColor[link:match("|[Cc][Ff][Ff](%x%x%x%x%x%x)")]
border[id]:SetVertexColor(color[1], color[2], color[3])
border[id]:Show()
else
border[id]:Hide()
end
end
end
For the notes code the OnAccept function should be:
lua Code:
OnAccept = function(self)
addNoteFromPopup(_G[self:GetName() .. "EditBox"]:GetText())
end,
Also, both EditBox functions have "_G[self:GetParent():GetName() .. 'EditBox']:GetText()" which is the same as "self:GetText()" so you may want to change that. However, I think that whole section of code could use some cleaning up:
lua Code:
StaticPopupDialogs["GTipNotes"] = {
button1 = SET,
button2 = CANCEL,
hasEditBox = true,
hideOnEscape = true,
text = POPUP_TEXT,
timeout = 0,
whileDead = true,
EditBoxOnEnterPressed = function(self, data)
local note = self:GetText():trim()
if note == "" then
note = nil
end
GTipNotesDB[data] = note
self:GetParent():Hide()
end,
EditBoxOnEscapePressed = function(self)
self:GetParent():Hide()
end,
OnAccept = function(self, data)
local note = _G[self:GetName() .. 'EditBox']:GetText():trim()
if note == "" then
note = nil
end
GTipNotesDB[data] = note
end
}
SlashCmdList["GTIPNOTES_SHORTHAND"] = function(note)
if UnitExists('target') then
local name = UnitName('target')
note = note:trim()
if note == "" then
note = GTipNotesDB[name]
end
StaticPopup_Show("GTipNotes", name, nil, name)
if note then
name = StaticPopup_Visible("GTipNotes")
if name then
_G[name .. 'EditBox']:SetText(note)
end
end
else
print(TARGET_ERROR)
end
end