Functions | Variables
HTMLTools Namespace Reference

Functions

def title (str)
 
def heading1 (str)
 
def heading2 (str)
 
def heading3 (str)
 
def link (text, url, newTab=False)
 
def paragraph (str)
 
def bold (str)
 
def entry (str)
 
def hrule ()
 
def hruleWide ()
 
def img (path, mouseover="")
 
def preventCaching ()
 
def bootStrap ()
 
def bodyOpen ()
 
def bodyClose ()
 
def jumbo (content)
 
def panel (title, content)
 
def button (text, url)
 
def alertDanger (text)
 
def alertLink (text, url, newTab=False)
 

Variables

string endl = "\n"
 

Function Documentation

def HTMLTools.alertDanger (   text)

Definition at line 110 of file HTMLTools.py.

110 def alertDanger(text):
111  return '<div class="alert alert-danger" role="alert">'+text+'</div>'
112 
def alertDanger(text)
Definition: HTMLTools.py:110
def HTMLTools.alertLink (   text,
  url,
  newTab = False 
)

Definition at line 113 of file HTMLTools.py.

113 def alertLink(text, url, newTab=False):
114  l ='<a href="'+url+'"'
115  if newTab:
116  l += 'target="_blank"'
117  l += ' class="alert-link">'+text+'</a>'
118  return l
119 
120 
121 
def alertLink(text, url, newTab=False)
Definition: HTMLTools.py:113
def HTMLTools.bodyClose ( )

Definition at line 76 of file HTMLTools.py.

76 def bodyClose():
77  return """
78  <!-- Bootstrap core JavaScript
79  ================================================== -->
80  <!-- Placed at the end of the document so the pages load faster -->
81  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
82  <script src="../static/bootstrap/js/bootstrap.min.js"></script>
83 
84  </body>'
85  """
86 
def bodyClose()
Definition: HTMLTools.py:76
def HTMLTools.bodyOpen ( )

Definition at line 73 of file HTMLTools.py.

73 def bodyOpen():
74  return '<body role="document">'
75 
def bodyOpen()
Definition: HTMLTools.py:73
def HTMLTools.bold (   str)

Definition at line 24 of file HTMLTools.py.

24 def bold(str):
25  return "<b>" + str + "</b>"
def bold(str)
Definition: HTMLTools.py:24
def HTMLTools.bootStrap ( )

Definition at line 53 of file HTMLTools.py.

53 def bootStrap():
54  return """
55  <head>
56  <meta charset="utf-8">
57  <meta http-equiv="X-UA-Compatible" content="IE=edge">
58  <meta name="viewport" content="width=device-width, initial-scale=1">
59  <meta name="description" content="">
60  <meta name="author" content="">
61  <link rel="icon" href="../../favicon.ico">
62 
63 
64 
65  <!-- Bootstrap core CSS -->
66  <link href="../static/bootstrap/css/bootstrap.min.css" rel="stylesheet">
67 
68  <!-- Custom styles for this template -->
69  <link href="../static/bootstrap/css/theme.css" rel="stylesheet">
70 
71  """
72 
def bootStrap()
Definition: HTMLTools.py:53
def HTMLTools.button (   text,
  url 
)

Definition at line 104 of file HTMLTools.py.

References link().

Referenced by dbutils::gui::BitmapEditor.BitmapEditor().

104 def button(text, url):
105  b = '<button type="button" class="btn btn-default navbar-btn">'
106  b += link(text, url)
107  b += "</button>"
108  return b
109 
def button(text, url)
Definition: HTMLTools.py:104
def link(text, url, newTab=False)
Definition: HTMLTools.py:15
def HTMLTools.entry (   str)

Definition at line 26 of file HTMLTools.py.

Referenced by sn::MichelBackgroundManager.AddEntry(), fnex::Correlations.ApplyCorrelations(), genie::Registry.CopyToFolder(), art::RootInputTree.current(), datamc(), genie::Registry.DeleteEntry(), demoStarPlots(), DrawLegendBF2(), DrawLegendBF3(), sim::ParticleNavigator.erase(), genie::Registry.Exists(), art::RootInputFile.fillAuxiliary(), novaddt::SlowMMTrigger.filter(), findPair(), genie::Registry.Get(), daq2raw.getBranchName(), genie::Registry.GetH1F(), genie::Registry.GetH2F(), ana.GetSystematics2018(), genie::Registry.GetTree(), genie::Registry.ItemIsLocal(), genie::Registry.ItemIsLocked(), om::WatchListBox.LayoutHardwareFrame(), genie::Registry.LinkToGlobalDef(), genie::Registry.LockItem(), make_starplots(), sn::MichelBackgroundManager.MichelBackgroundManager(), sn.operator<<(), sim::ParticleNavigator.operator=(), OverlayGenerators(), genie::Registry.OverrideGlobalDef(), sim::ParticleNavigator.ParticleNavigator(), plot_contprof(), plot_datapredictions(), plot_predictions(), plot_strain_with_zoom(), plotContProf(), plotDataPred(), plotDataPred_SplitCanvas(), PlotGenRatios(), sim::ParticleNavigator.Primary(), fnex::SystematicSigmas.Print(), fnex::ParameterConstraints.Print(), fnex::NuisanceParameters.Print(), fnex::CalibSystHistMaker.ReadEventListTree(), evdb::ServiceTable.RegisterService(), genie::Registry.SafeFind(), signal_count(), genie::NtpMCJobEnv.TakeSnapshot(), art::detail::InfoDumperInputFile.tfile(), genie::Registry.UnLockItem(), om::WatchListBox.UpdateHWboxes(), and art::detail::MetadataSummary.widths().

26 def entry(str):
27  return "<li>" + str + "</li>"
def entry(str)
Definition: HTMLTools.py:26
def HTMLTools.heading1 (   str)

Definition at line 9 of file HTMLTools.py.

9 def heading1(str):
10  return "<h1>" + str + "</h1>"
def heading1(str)
Definition: HTMLTools.py:9
def HTMLTools.heading2 (   str)

Definition at line 11 of file HTMLTools.py.

11 def heading2(str):
12  return "<h2>" + str + "</h2>"
def heading2(str)
Definition: HTMLTools.py:11
def HTMLTools.heading3 (   str)

Definition at line 13 of file HTMLTools.py.

13 def heading3(str):
14  return "<h3>" + str + "</h3>"
def heading3(str)
Definition: HTMLTools.py:13
def HTMLTools.hrule ( )

Definition at line 28 of file HTMLTools.py.

28 def hrule():
29  return '<hr width="810px" align="left" noshade color="#000000">'
30 
def hrule()
Definition: HTMLTools.py:28
def HTMLTools.hruleWide ( )

Definition at line 31 of file HTMLTools.py.

31 def hruleWide():
32  return '<hr align="left" noshade color="#000000">'
33 
34 
35 
def hruleWide()
Definition: HTMLTools.py:31
def HTMLTools.img (   path,
  mouseover = "" 
)

Definition at line 36 of file HTMLTools.py.

Referenced by CompareRootfile(), TMVA::TMVAGlob.findImage(), TMVA::TMVAGlob.plot_logo(), and ScanRootfile().

36 def img(path, mouseover=""):
37  return '<img src="' + path +'" alt="'+ mouseover +'">'
38 
39 
40 
def img(path, mouseover="")
Definition: HTMLTools.py:36
def HTMLTools.jumbo (   content)

Definition at line 87 of file HTMLTools.py.

87 def jumbo(content):
88  t = ' <div class="jumbotron">' + endl
89  t+= " " + content + endl
90  t+= '</div>' + endl
91  return t
92 
def jumbo(content)
Definition: HTMLTools.py:87
def HTMLTools.link (   text,
  url,
  newTab = False 
)

Definition at line 15 of file HTMLTools.py.

Referenced by button().

15 def link(text, url, newTab=False):
16  l = '<a href="'+ url + '" '
17  if newTab:
18  l += 'target="_blank"'
19  l += '">' + text + "</a>"
20  return l
21 
def link(text, url, newTab=False)
Definition: HTMLTools.py:15
def HTMLTools.panel (   title,
  content 
)

Definition at line 93 of file HTMLTools.py.

93 def panel(title, content):
94  p = """<div class="panel panel-default">
95  <div class="panel-heading">
96  <h3 class="panel-title">""" + title + """</h3>
97  </div>
98  <div class="panel-body">
99  """+content+"""
100  </div>
101  </div>"""
102  return p
103 
def panel(title, content)
Definition: HTMLTools.py:93
def HTMLTools.paragraph (   str)

Definition at line 22 of file HTMLTools.py.

22 def paragraph(str):
23  return "<p>" + str + "</p>"
def paragraph(str)
Definition: HTMLTools.py:22
def HTMLTools.preventCaching ( )

Definition at line 41 of file HTMLTools.py.

42  return """
43  <meta http-equiv="cache-control" content="max-age=0" />
44  <meta http-equiv="cache-control" content="no-cache" />
45  <meta http-equiv="expires" content="0" />
46  <meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
47  <meta http-equiv="pragma" content="no-cache" />
48  """
49 
50 
51 # Bootstrap stuff
52 
def preventCaching()
Definition: HTMLTools.py:41
def HTMLTools.title (   str)

Definition at line 7 of file HTMLTools.py.

7 def title(str):
8  return "<title>" + str + "</title>"
def title(str)
Definition: HTMLTools.py:7

Variable Documentation

string HTMLTools.endl = "\n"

Definition at line 4 of file HTMLTools.py.