Skip to content
Permalink
Browse files

Issue #11826: Remove inline JavaScript for loading dynamic filters

Use the new require_js() function to include the dynamic JavaScript
filter scripts instead of pulling them within <body>.
  • Loading branch information...
davidhicks committed Aug 19, 2010
1 parent c5b51f0 commit df22831ef9b5372c1bf056ae3b3bc59666169fd9
Showing with 8 additions and 16 deletions.
  1. +1 −1 javascript/dev/dynamic_filters.js
  2. +7 −1 view_all_bug_page.php
  3. +0 −14 view_all_inc.php
@@ -111,7 +111,7 @@ function liveReqDoReq() {
liveReq.open("GET", processURI + "?view_type=" + t_view + "&filter_target=" + this.id);

// show "Loading..." while waiting
document.getElementById(this.id+'_target').innerHTML = string_loading;
document.getElementById(this.id+'_target').innerHTML = translations['loading'];

liveReq.send(null);

@@ -47,6 +47,13 @@
require_api( 'project_api.php' );
require_api( 'user_api.php' );
if ( config_get( 'dhtml_filters' ) ) {
require_js( 'xmlhttprequest.js' );
require_js( 'addLoadEvent.js' );
require_js( 'dynamic_filters.js' );
}
require_js( 'bugFilter.js' );
auth_ensure_user_authenticated();
$f_page_number = gpc_get_int( 'page_number', 1 );
@@ -82,7 +89,6 @@
html_robots_noindex();
html_page_top1( lang_get( 'view_bugs_link' ) );
html_javascript_link( 'bugFilter.js' );
if ( current_user_get_pref( 'refresh_delay' ) > 0 ) {
html_meta_redirect( 'view_all_bug_page.php?page_number='.$f_page_number, current_user_get_pref( 'refresh_delay' )*60 );
@@ -94,20 +94,6 @@
if ( $t_status_legend_position == STATUS_LEGEND_POSITION_TOP || $t_status_legend_position == STATUS_LEGEND_POSITION_BOTH ) {
html_status_legend();
}
/** @todo (thraxisp) this may want a browser check ( MS IE >= 5.0, Mozilla >= 1.0, Safari >=1.2, ...) */
if ( ( ON == config_get( 'dhtml_filters' ) ) && ( ON == config_get( 'use_javascript' ) ) ){
?>
<script type="text/javascript">
<!--
var string_loading = '<?php echo lang_get( 'loading' );?>';
// -->
</script>
<?php
html_javascript_link( 'xmlhttprequest.js');
html_javascript_link( 'addLoadEvent.js');
html_javascript_link( 'dynamic_filters.js');
}
?>
<br />
<form name="bug_action" method="get" action="bug_actiongroup_page.php">

0 comments on commit df22831

Please sign in to comment.
You can’t perform that action at this time.