Removed custom way of loading dependant javascript files upon load

and fixed order of assets to match the custom order in manifest file
pull/6827/head
Sebastian Schuster 12 years ago
parent b82dd87496
commit fcd8b0fa8f
  1. 24
      lib/assets/javascripts/reporting_engine/reporting.js
  2. 8
      lib/assets/javascripts/reporting_engine/reporting_engine.js

@ -2,22 +2,6 @@
/*global window, $, $$, Reporting, Element */ /*global window, $, $$, Reporting, Element */
window.Reporting = { window.Reporting = {
source: ($$("head")[0].select("script[src*='reporting.js']")[0].src),
require: function (libraryName) {
var jsName = Reporting.source.replace("reporting.js", "reporting/" + libraryName + ".js");
try {
// inserting via DOM fails in Safari 2.0, so brute force approach
document.write('<script type="text/javascript" src="' + jsName + '"><\/script>');
} catch (e) {
// for xhtml+xml served content, fall back to DOM methods
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = jsName;
document.getElementsByTagName('head')[0].appendChild(script);
}
},
onload: function (func) { onload: function (func) {
document.observe("dom:loaded", func); document.observe("dom:loaded", func);
}, },
@ -62,11 +46,3 @@ window.Reporting = {
} }
} }
}; };
Reporting.require("filters");
Reporting.require("group_bys");
Reporting.require("restore_query");
Reporting.require("controls");
Reporting.require("prototype_progress_bar");
Reporting.require("progressbar");

@ -4,9 +4,9 @@
//= require reporting_engine/cordinc_tooltip //= require reporting_engine/cordinc_tooltip
//= require reporting_engine/reporting/lang/reporting-de //= require reporting_engine/reporting/lang/reporting-de
//= require reporting_engine/reporting/lang/reporting-en //= require reporting_engine/reporting/lang/reporting-en
//= require reporting_engine/reporting/prototype_progress_bar //= require reporting_engine/reporting/filters
//= require reporting_engine/reporting/controls
//= require reporting_engine/reporting/group_bys //= require reporting_engine/reporting/group_bys
//= require reporting_engine/reporting/progressbar
//= require reporting_engine/reporting/restore_query //= require reporting_engine/reporting/restore_query
//= require reporting_engine/reporting/filters //= require reporting_engine/reporting/controls
//= require reporting_engine/reporting/prototype_progress_bar
//= require reporting_engine/reporting/progressbar
Loading…
Cancel
Save