« Module:Message box » : différence entre les versions

mAucun résumé des modifications
mAucun résumé des modifications
Ligne 5 : Ligne 5 :


function MessageBox:export()
function MessageBox:export()
     local root = mw.html.create()
     local root = frame


     local article = root:tag('div')
     local article = root:tag('div')
Ligne 18 : Ligne 18 :


-- Define class
-- Define class
function MessageBox:new (title, content, image)
function MessageBox:new (frame, title, content, image)
     self.__index = self
     self.__index = self
     self.title = title
     self.title = title
     self.image = image
     self.image = image
     self.content = content
     self.content = content
    self.frame = frame


     return self
     return self
Ligne 28 : Ligne 29 :


function p.main(frame, title, content, image)
function p.main(frame, title, content, image)
     local box = MessageBox:new(title, content, image)
     local box = MessageBox:new(frame, title, content, image)
     return box:export()
     return box:export()
end
end


return p
return p