end |
end |
|
|
function Checklist3:EditTask(taskID) |
print(taskID) |
local tEditor = widgets.taskEditor; |
local dispWnd = widgets.clDisplayWindow; |
if self.openTask and self.openTask == taskID then |
-- close the task editor |
self.openTask = nil; |
dispWnd:ClearAllPoints(); |
dispWnd:SetPoint(unpack(displayWindowPoints)); |
dispWnd:SetPoint("BOTTOMRIGHT", widgets.taskBar, "TOPRIGHT"); |
tEditor:Hide(); |
self:HideTaskEditor(); |
else |
-- open the task editor |
tEditor:Show(); |
dispWnd:ClearAllPoints(); |
dispWnd:SetPoint(unpack(displayWindowPoints)); |
dispWnd:SetPoint("BOTTOMRIGHT", tEditor, "TOPRIGHT"); |
getglobal(tEditor:GetName() .. "HeaderText"):SetText("Task Editor: " .. taskID) |
self:ShowTaskEditor(taskID); |
self.openTask = taskID; |
end |
end |
|
function Checklist3:HideTaskEditor() |
dispWnd:ClearAllPoints(); |
dispWnd:SetPoint(unpack(displayWindowPoints)); |
dispWnd:SetPoint("BOTTOMRIGHT", widgets.taskBar, "TOPRIGHT"); |
tEditor:Hide(); |
end |
|
function Checklist3:ShowTaskEditor(taskID) |
tEditor:Show(); |
dispWnd:ClearAllPoints(); |
dispWnd:SetPoint(unpack(displayWindowPoints)); |
dispWnd:SetPoint("BOTTOMRIGHT", tEditor, "TOPRIGHT"); |
getglobal(tEditor:GetName() .. "HeaderText"):SetText("Task Editor: " .. (taskID or "|cffff0000No task ID|r")) |
end |