def export_json_settings (self):
return 'query_uuid' in self.json_settings_list()
- # by default we create a timer if there's a query attached, redefine to change this behaviour
- def start_with_spin (self):
- return self.export_json_settings()
-
# returns the html code for that plugin
# in essence, wraps the results of self.render_content ()
def render (self, request):
# shove this into plugin.html
env = {}
env ['plugin_content']= plugin_content
- # need_spin is used in plugin.html
- self.need_spin=self.start_with_spin()
env.update(self.__dict__)
# translate high-level 'toggled' into 4 different booleans
self.need_toggle = False
env ['settings_json' ] = self.settings_json()
# compute plugin-specific initialization
js_init = render_to_string ( 'plugin-init.js', env )
- self.add_js_chunks (js_init)
+ # make sure this happens first in js
+ self.add_js_init_chunks (js_init)
# interpret the result of requirements ()
self.handle_requirements (request)
@to_prelude
def add_css_files (self):pass
@to_prelude
+ def add_js_init_chunks (self):pass
+ @to_prelude
def add_js_chunks (self):pass
@to_prelude
def add_css_chunks (self):pass
#
# whether we export the json settings to js
# def export_json_settings (self)
- #
- # whether we show an initial spinner
- # def start_with_spin (self)