1 (edited by apmuthu 03/20/2013 01:11:51 pm)

Topic: Dashboard Theme / Module External Files

The dashboard_theme v2.3.15-1/renderer.php line 42:

                 echo "<script type='text/javascript' src='https://www.google.com/jsapi'></script>\n";

refers to an external javascript file than can be internalised.

Also line 10 of js/jquery-ui-1.7.2.custom.min.js in the same theme refers to:

http://www.w3.org/2005/07/aaa

If there are any files included from external sites, addon authors are advised to state them.

This code has since been moved to line 25 of hooks.php in the google code svn:

add_js_ufile("https://www.google.com/jsapi");

which can now become:

        add_js_ufile("$path_to_root/themes/dashboard/js/jsapi.js");

after uploading the jsapi file as js/jsapi.js

Post's attachments

FA_dashboard_2.3.15-3_updated_files_only_with_jsapi.zip 7.7 kb, 18 downloads since 2013-03-20 

You don't have the permssions to download the attachments of this post.

Re: Dashboard Theme / Module External Files

I think these changes may be a mistake. Google charts depends on google's servers to create the chart. By saving the google js locally you are creating a potential break if google changes their internal interfaces. At the moment the widgets dependent on google chart are using the public interface which is less likely to be broken by any changes google makes to the way they handle the chart on their side.
A similar principle applies to the jquery code. It is a third party library. If you start making changes to it, you fix it at a particular point in time. We should be able to upgrade the jquery library at any time without having to apply a set of FA changes to it.

Re: Dashboard Theme / Module External Files

A nice caveat to it's use but when secure FA is run in an offline environment, this might be the only solution. If being online is necessary for other aspects of google charts then it would be of no use in this situation.

Thanks @AlastairR for the note and it's potential pitfalls.