Skip to content

Commit

Permalink
html: only display the inline-stylesheet for projax once
Browse files Browse the repository at this point in the history
  • Loading branch information
mantis committed May 2, 2009
1 parent 49ca189 commit 685b9e0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/projax_api.php
Expand Up @@ -37,8 +37,11 @@
# class, size, maxlength, value, and tabindex.
function projax_autocomplete( $p_entrypoint, $p_field_name, $p_attributes_array = null ) {
global $g_projax;
static $s_projax_style_done = false;

if ( ON == config_get( 'use_javascript' ) ) {
echo $g_projax->text_field_with_auto_complete( $p_field_name, $p_attributes_array, array( 'url' => 'xmlhttprequest.php?entrypoint=' . $p_entrypoint ) );
echo $g_projax->text_field_with_auto_complete( $p_field_name, $p_attributes_array, $s_projax_style_done ? array( 'url' => 'xmlhttprequest.php?entrypoint=' . $p_entrypoint, 'skip_style' => '1' ) : array( 'url' => 'xmlhttprequest.php?entrypoint=' . $p_entrypoint ) );
$s_projax_style_done = true;
} else {
$t_tabindex = isset( $p_attributes_array['tabindex'] ) ? ( ' tabindex="' . $p_attributes_array['tabindex'] . '"' ) : '';
$t_maxlength = isset( $p_attributes_array['maxlength'] ) ?( ' maxlength="' . $p_attributes_array['maxlength'] . '"' ) : '';
Expand Down

0 comments on commit 685b9e0

Please sign in to comment.