developer.jelix.org is not used any more and exists only for history. Post new tickets on the Github account.
developer.jelix.org n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.

Ticket #794: 794-jForms-ui.core-should-not-load-twice.diff

File 794-jForms-ui.core-should-not-load-twice.diff, 1.5 KB (added by Julien, 13 years ago)
  • lib/jelix-www/js/jforms/datepickers/default/init.js

     
    1919
    2020    this._config = {locale:locale, basePath:basePath};
    2121
    22     jQuery.include(this._config.basePath+'jelix/jquery/themes/default/ui.datepicker.css');
    2322    this._jsFiles = [];
    24     this._jsFiles.push(this._config.basePath+'jelix/jquery/ui/ui.core.min.js');
    25     this._jsFiles.push(this._config.basePath+'jelix/jquery/ui/ui.datepicker.min.js');
    26     var lang = locale.substr(0,2).toLowerCase();
    27     if(lang != 'en')
    28         this._jsFiles.push(this._config.basePath+'jelix/jquery/ui/i18n/ui.datepicker-'+lang+'.js');
    29 
     23    if(typeof jQuery.ui == 'undefined')
     24        this._jsFiles.push(this._config.basePath+'jelix/jquery/ui/ui.core.min.js');
     25    if(typeof jQuery.datepicker == 'undefined'){
     26        jQuery.include(this._config.basePath+'jelix/jquery/themes/default/ui.datepicker.css');
     27        this._jsFiles.push(this._config.basePath+'jelix/jquery/ui/ui.datepicker.min.js');
     28        var lang = locale.substr(0,2).toLowerCase();
     29        if(lang != 'en')
     30            this._jsFiles.push(this._config.basePath+'jelix/jquery/ui/i18n/ui.datepicker-'+lang+'.js');
     31    }
    3032    this._loadJS = function (i){
    3133        if(i<this._jsFiles.length){
    3234            jQuery.include(this._jsFiles[i], function(){ this._loadJS(i+1); });