equal
deleted
inserted
replaced
139 def define_var(self, var, value): |
139 def define_var(self, var, value): |
140 self.jsvars.append( (var, value) ) |
140 self.jsvars.append( (var, value) ) |
141 |
141 |
142 def add_post_inline_script(self, content): |
142 def add_post_inline_script(self, content): |
143 self.post_inlined_scripts.append(content) |
143 self.post_inlined_scripts.append(content) |
|
144 |
|
145 def add_onload(self, jscode): |
|
146 self.add_post_inline_script(u"""jQuery(document).ready(function () { |
|
147 %s |
|
148 });""" % jscode) |
|
149 |
144 |
150 |
145 def add_js(self, jsfile): |
151 def add_js(self, jsfile): |
146 """adds `jsfile` to the list of javascripts used in the webpage |
152 """adds `jsfile` to the list of javascripts used in the webpage |
147 |
153 |
148 This function checks if the file has already been added |
154 This function checks if the file has already been added |