html/js/portal-ng.js
function loadIncludes() {
  for ( var module in reqModules ) {
    if ( module && module != 'pong-tableXX' ) { // just to exclude modules, for debugging it's better to include them hardcoded in index.html

      // extra CSS files
      if ( moduleMap[ module ] ) {
        if ( moduleMap[ module ].css ) {
          for ( var i = 0; i < moduleMap[ module ].css.length; i++ ) {
            log( 'loadModules', module+' add extra CSS: '+modulesPath+module+'/'+moduleMap[ module ].css[i]  );
            jQuery('head').append('<link rel="stylesheet" rel="nofollow" href="'+modulesPath+module+'/'+moduleMap[ module ].css[i] +'" type="text/css" />');
          }
        }
      
        // include files
        if ( moduleMap[ module ].include ) {
          for ( var i = 0; i < moduleMap[ module ].include.length; i++ ) {
            //for ( var includeJS in moduleMap[ module ].include ) {
            var includeJS = moduleMap[ module ].include[i];
            log( 'loadModules', module+' load include: '+modulesPath+module+'/'+includeJS );
            ajaxOngoing++;
              $.getScript( modulesPath+module+'/'+includeJS )
              .done( function( script, textStatus, jqxhr ) { 
                log( 'loadModules', this.url+' '+textStatus ); ajaxOngoing--; } )
              .fail( function( jqxhr, settings, exception ) { 
                log( 'loadModules', this.url+' '+exception ); ajaxOngoing--; }  );
          }
        }
      }
    }
  }
  ajaxOngoing--;
}
function loadIncludes() {
  for ( var module in reqModules ) {
    if ( module && module != 'pong-tableXX' ) { // just to exclude modules, for debugging it's better to include them hardcoded in index.html

      // extra CSS files
      if ( moduleMap[ module ] ) {
        if ( moduleMap[ module ].css ) {
          for ( var i = 0; i < moduleMap[ module ].css.length; i++ ) {
            log( 'loadModules', module+' add extra CSS: '+modulesPath+module+'/'+moduleMap[ module ].css[i]  );
            jQuery('head').append('<link rel="stylesheet" rel="nofollow" href="'+modulesPath+module+'/'+moduleMap[ module ].css[i] +'" type="text/css" />');
          }
        }
      
        // include files
        if ( moduleMap[ module ].include ) {
          for ( var i = 0; i < moduleMap[ module ].include.length; i++ ) {
            //for ( var includeJS in moduleMap[ module ].include ) {
            var includeJS = moduleMap[ module ].include[i];
            log( 'loadModules', module+' load include: '+modulesPath+module+'/'+includeJS );
            ajaxOngoing++;
              $.getScript( modulesPath+module+'/'+includeJS )
              .done( function( script, textStatus, jqxhr ) { 
                log( 'loadModules', this.url+' '+textStatus ); ajaxOngoing--; } )
              .fail( function( jqxhr, settings, exception ) { 
                log( 'loadModules', this.url+' '+exception ); ajaxOngoing--; }  );
          }
        }
      }
    }
  }
  ajaxOngoing--;
}
function loadIncludes ( ) { for ( var module in reqModules ) { if ( module && module != 'pong-tableXX' ) { // just to exclude modules, for debugging it's better to include them hardcoded in index.html // extra CSS files if ( moduleMap [ module ] ) { if ( moduleMap [ module ] . css ) { for ( var i = 0 ; i < moduleMap [ module ] . css . length ; i ++ ) { log ( 'loadModules' , module + ' add extra CSS: ' + modulesPath + module + '/' + moduleMap [ module ] . css [ i ] ) ; jQuery ( 'head' ) . append ( '<link rel="stylesheet" rel="nofollow" href="' + modulesPath + module + '/' + moduleMap [ module ] . css [ i ] + '" type="text/css" />' ) ; } } // include files if ( moduleMap [ module ] . include ) { for ( var i = 0 ; i < moduleMap [ module ] . include . length ; i ++ ) { //for ( var includeJS in moduleMap[ module ].include ) { var includeJS = moduleMap [ module ] . include [ i ] ; log ( 'loadModules' , module + ' load include: ' + modulesPath + module + '/' + includeJS ) ; ajaxOngoing ++ ; $ . getScript ( modulesPath + module + '/' + includeJS ) . done ( function ( script , textStatus , jqxhr ) { log ( 'loadModules' , this . url + ' ' + textStatus ) ; ajaxOngoing -- ; } ) . fail ( function ( jqxhr , settings , exception ) { log ( 'loadModules' , this . url + ' ' + exception ) ; ajaxOngoing -- ; } ) ; } } } } } ajaxOngoing -- ; }
load includes for modules
load includes for modules