Due to the js/scss/image build pipeline, we've needed to change the paths for all these resources, including fonts.
All compiled-optimised assets are now found in the resources/scr/foo/
directory.
See /docs/Project-Resources-Build-Pipeline.html for full description.
I believe we can deprecate this case, as we have found lite single-purpouse libs to take the place of this ageing mega monster.
Modals and popups: with the plugin lity
Tabbed interface: style-guide.html/#tabs
Using lity will also move us away from inline JS (ex onclick
handlers in buttons and links), and gradually toward a separation of concerns regarding model and view.
Due to the some modernisation required by the build script, I've had to change the scope (namespace) of some of the utility functions that are used in interactions throughout the site. For the most part we are no longer attaching all functions to the global 'window' object. This principally effects the following files of utility functions:
adrs_v4_functions.js (now u_adrs_v4_functions2.js)
all functions here should be called like: adrs4.somefunction()
gksfunctions.js (now u-gksfunctions2.js)
all functions here should be called like: gksfun.somefunction()
charts_data_utils.js (now u-charts_data_utils2.js)
all functions here should be called like: chartDataUtils.somefunction()
lmem_support_functions.js (now u-lmem_support_functions2.js)
all functions here should be called like: lmem.somefunction()
Notes:
By placing functions in a global object such as gksfun
all references to the functions must be updated. This includes references within the same script, and or supporting functions. As we have no reliable tests, I may very well have missed some, so ... there be dragons here.
In the above files I've encountered a number of variables not being declared before use, which will now cause the scripts break. Incrementally I've tried to update all the scripts listed above, but I've not actually encountered all the use cases for these, so I'm sure there are bugs still to be squashed.
adrs4.modalWindow()
We will no longer be using jQuery UI so where ever this is called we need to update to the new modal system.
adrs4.shadeTable()
We are using CSS to shade rows so this mostly isn't needed. This also has functionality for changing the bg colour on some table cells as an alert. I think we can simplify things with CSS but I've not seen this in action yet.
gksfun.DataWindow()
gksfun.ExampleWindow()
gksfun.HelpWindow()
gksfun.TutorialWindow()
gksfun.TimeSeriesWindow()``gksfun.PictureWindow()
gksfun.ForumWindow()
The above all relate to opening popup windows, which can now be handled by lity()
.