equal
deleted
inserted
replaced
204 self.jsvars.append( (var, value) ) |
204 self.jsvars.append( (var, value) ) |
205 |
205 |
206 def add_post_inline_script(self, content): |
206 def add_post_inline_script(self, content): |
207 self.post_inlined_scripts.append(content) |
207 self.post_inlined_scripts.append(content) |
208 |
208 |
209 def add_onload(self, jscode): |
209 def add_onload(self, jscode, jsoncall=False): |
210 self.add_post_inline_script(u"""jQuery(document).ready(function () { |
210 if jsoncall: |
|
211 self.add_post_inline_script(u"""jQuery(CubicWeb).bind('ajax-loaded', function(event) { |
|
212 %s |
|
213 });""" % jscode) |
|
214 else: |
|
215 self.add_post_inline_script(u"""jQuery(document).ready(function () { |
211 %s |
216 %s |
212 });""" % jscode) |
217 });""" % jscode) |
213 |
218 |
214 |
219 |
215 def add_js(self, jsfile): |
220 def add_js(self, jsfile): |