Editing Module:Collapsible list

Jump to: navigation, search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 2: Line 2:
  
 
local p = {}
 
local p = {}
 
local function gettitlestyletracking( ts )
 
if not ts then return '' end
 
ts = mw.ustring.gsub(mw.ustring.lower(ts), '%s', '')
 
local tsvals = mw.text.split(ts, ';')
 
table.sort(tsvals)
 
local skey = table.concat(tsvals,';')
 
skey = mw.ustring.gsub(skey, '^;', '')
 
skey = mw.text.encode(mw.text.encode(skey),'%c%[%]=')
 
if (mw.ustring.match(';' .. ts, ';background:') or mw.ustring.match(';' .. ts, ';background%-color:'))
 
and mw.ustring.match(';' .. ts, ';text%-align:') then
 
return '[[Category:Pages using collapsible list with both background and text-align in titlestyle|' .. skey .. ' ]]'
 
end
 
return '[[Category:Pages using collapsible list without both background and text-align in titlestyle|' .. skey .. ' ]]'
 
end
 
  
 
local function getListItem( data )
 
local function getListItem( data )
Line 79: Line 64:
 
     local div2style = formatAttributes(
 
     local div2style = formatAttributes(
 
         'style',
 
         'style',
         'font-size: 105%; background: transparent; text-align: left;',
+
         'font-size: 105%;',
 
         args.title_style,
 
         args.title_style,
         args.titlestyle
+
         args.titlestyle,
 +
        not ( args.title_style or args.titlestyle ) and 'background: transparent; text-align: left;'
 
     )
 
     )
 
     local title = args.title or 'List'
 
     local title = args.title or 'List'
Line 98: Line 84:
 
         '<div%s%s>\n<div%s%s>%s</div>\n<ul%s%s>%s</ul>\n</div>',
 
         '<div%s%s>\n<div%s%s>%s</div>\n<ul%s%s>%s</ul>\n</div>',
 
         div1class, div1style, div2class, div2style, title, ulclass, ulstyle, listItems
 
         div1class, div1style, div2class, div2style, title, ulclass, ulstyle, listItems
     ) .. gettitlestyletracking(args.title_style or args.titlestyle)
+
     )
 
end
 
end
  

Please note that all contributions to All About Ayrshire may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see All About Ayrshire:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)

Template used on this page: