Module:PagedGallery: Difference between revisions

Want an adless experience? Log in or Create an account.
m
move 'zdw-paged-gallery' class to content div so the js works
m (fix regex escapes)
m (move 'zdw-paged-gallery' class to content div so the js works)
 
Line 9: Line 9:


function PagedGallery.new( args )
function PagedGallery.new( args )
  args.class = 'zdw-paged-gallery'
   local width = args.width or 300
   local width = args.width or 300
   args.width = width * 2 .. 'px'
   args.width = width * 2 .. 'px'
Line 27: Line 26:
-- override Box:renderContent
-- override Box:renderContent
function PagedGallery:renderContent()
function PagedGallery:renderContent()
   local content = mw.html.create( 'div' );
   local content = mw.html.create( 'div' )
    :addClass( 'zdw-paged-gallery' )
   local nav = content:tag( 'div' )
   local nav = content:tag( 'div' )
     :addClass( 'zdw-paged-gallery__navigation' )
     :addClass( 'zdw-paged-gallery__navigation' )