Excerpts from Shawn Doherty's message of 2017-05-16 15:26 -04:00:
- <script type="text/javascript">
+ <script type="text/javascript"
src='/static/javascript/util.js'>
Just beware that this line does not make sense -- you want to either
supply a src= or a body for the <script/> tag but never both.
+ #not seeing js link in debug
+ javascript = [LocalJSLink('bkr', '/static/javascript/util.js')]
There is another fun issue with TG widgets which is that the scripts are
scraped out by some ridiculous hacky magic which only has effect on the
top-level widgets on the page. If you have widgets nested inside other
widgets (and of course, we do...) then the javascript attribute on them
has no effect.
The system page is one such place that is affected by this problem.
controllers.py has this:
680 # If you have anything in your widgets 'javascript' variable,
681 # do not return the widget here, the JS will not be loaded,
682 # return it as an arg in return()
683 widgets = dict(
684 details = self.system_details,
685 exclude = self.system_exclude,
686 keys = self.system_keys,
687 notes = self.system_notes,
688 )
--
Dan Callaghan <dcallagh(a)redhat.com>
Senior Software Engineer, Products & Technologies Operations
Red Hat