def _inject_agilo_ui_for_this_request(self, req, data): # The idea is that all things here are purely for display purposes so # we don't have to bother for ajax requests. This saves us ~0.2 seconds # for every request because loading a backlog (even without the real # tickets does some db queries). if is_ajax(req): return add_stylesheet(req, 'agilo/stylesheet/agilo.css') config = AgiloConfig(self.env) self._remove_trac_stylesheet_for_this_request(req) # avoid circular imports from agilo.scrum.backlog.web_ui import BacklogModule # adds to data the info needed to visualize the Backlog list BacklogModule(self.env).send_backlog_list_data(req, data) add_script(req, 'agilo/js/sidebar.js') add_script(req, 'agilo/js/cookies.js') add_script(req, 'agilo/js/settings.js') add_script(req, 'agilo/js/collapse.js') add_script(req, 'agilo/js/ie-patches.js')
def test_can_specify_media_attribute_for_stylesheets(self): add_stylesheet(self.req, 'foo', media='print') stylesheet = self._first_stylesheet() self.assert_equals('print', stylesheet['media'])