Coverage for khufu/dropdowns/dropdownLinkList.py : 22%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1# encoding: utf-8
2from . import *
4def dropdownLinkList(
5 linkDictionary={},
6 title="dropdown",
7 dropDirection="down"
8):
9 """
10 *dropdownLinkList*
12 **Key Arguments**
14 - ``log`` -- logger
15 - ``linkDictionary`` -- { text : href }
16 - ``title`` -- title for the dropdown
17 - ``dropDirection`` -- up or down
20 **Return**
22 - ``thisDropdown``
24 """
25 linkList = []
26 for k, v in list(linkDictionary.items()):
27 link = a(
28 content=k,
29 href=v,
30 tableIndex=False,
31 triggerStyle=False, # [ False | "dropdown" | "tab" | "modal" ],
32 htmlClass=False,
33 postInBackground=False,
34 openInNewTab=True,
35 popover=False,
36 )
37 link = li(
38 content=link, # if a subMenu for dropdown this should be <ul>
39 span=False, # [ False | 1-12 ]
40 disabled=False,
41 submenuTitle=False,
42 divider=False,
43 navStyle=False, # [ active | header ]
44 navDropDown=False,
45 pager=False, # [ False | "previous" | "next" ]
46 )
47 linkList.append(link)
48 thisDropdown = dropdown(
49 buttonSize='small',
50 buttonColor='default', # [ default | sucess | error | warning | info ]
51 linkNotButton=True,
52 menuTitle=title,
53 splitButton=False,
54 linkList=linkList,
55 separatedLinkList=False,
56 pull="right",
57 # use javascript to explode contained links
58 htmlClass=False,
59 direction=dropDirection, # [ down | up ]
60 onPhone=True,
61 onTablet=True,
62 onDesktop=True
63 )
65 return thisDropdown