Ignore:
Timestamp:
03/26/10 18:27:17 (3 years ago)
Author:
MichaelDaum
Message:

Item8779:

  • upgraded to jquery-ui 1.7.2, the latest stable version compatible with jquery-1.3.2
  • don't concatenate i18n files of different encoding
  • only load the jquery-ui locale for the current site language
  • fixed example of jquery-ui's datepicker
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin/UI.pm

    r6913 r6944  
    4545    $session, 
    4646    name => 'UI', 
    47     version => '1.7.1', 
     47    version => '1.7.2', 
    4848    puburl => '%PUBURLPATH%/%SYSTEMWEB%/JQueryPlugin/ui', 
    4949    author => 'see http://jqueryui.com/about', 
     
    5959---++ ClassMethod init( $this ) 
    6060 
    61 Initialize this plugin by adding the required static files to the html header 
     61Initialize this plugin by adding the required static files to the page  
    6262 
    6363=cut 
     
    7070  my $themeName = $Foswiki::cfg{JQueryPlugin}{JQueryTheme} || 'base'; 
    7171  Foswiki::Plugins::JQueryPlugin::Plugins::createTheme($themeName); 
     72 
     73  # open matching localization file if it exists 
     74  my $langTag = $this->{session}->i18n->language(); 
     75  my $messagePath = $Foswiki::cfg{SystemWebName}.'/JQueryPlugin/i18n/ui.datepicker-'.$langTag.'.js'; 
     76  my $messageFile = $Foswiki::cfg{PubDir}.'/'.$messagePath; 
     77  if (-f $messageFile) { 
     78    my $text .= "<script type='text/javascript' src='$Foswiki::cfg{PubUrlPath}/$messagePath'></script>\n"; 
     79    Foswiki::Func::addToZone('body', "JQUERYPLUGIN::UI::LANG", $text, 'JQUERYPLUGIN::UI'); 
     80  } 
    7281} 
    73821; 
Note: See TracChangeset for help on using the changeset viewer.