html/modules/pong-on-the-fly/pong-on-the-fly.js
function pongOnTheFlyAddActionBtn(id, modalName, resourceURL, params) {
  log( "PoNG-OnTheFly", "modalFormAddActionBtn " + id );
  if ( !modalName ) {
    modalName = "OnTheFly";
  }
  var buttonLbl = modalName;
  if ( params && params.showConfig ) {
    buttonLbl = 'Show the configruation of this view...';
  }

  var html = "";
  log( "PoNG-OnTheFly", "Std Config Dlg:  " + modalName );
  var icon = "ui-icon-pencil";
  var paramsStr = 'null';
  if ( params ) {
    paramsStr = JSON.stringify( params )
  }
  var jscall = 'pongOnTheFlyOpenDlg( "' + id + '", "' + modalName + '", "'
      + resourceURL + '",' + paramsStr + ' );'
  var width = "600";
  if ( params && params.width ) {
    width = params.width;
  }
  var height = "600";
  if ( params && params.height ) {
    height = params.height;
  }
  html += '<div id="' + id + modalName + 'Dialog">' + resourceURL + " "
      + modalName + "</div>";
  log( "PoNG-OnTheFly", " cfg:  height: " + height + ", width: " + width );
  html += '<script>'
    + '$(function() { ' 
    + '  $( "#' + id + modalName + 'Dialog" ).dialog( '
    + '    { autoOpen: false, modal: true, height: '+height+', width: '+width+',' 
    + '      buttons: { "' + $.i18n( 'Save Configuration' ) + '": '
    + '        function() { '
    + '          pongOnTheFlySave( "'+id+'", "'+modalName+'", "'+resourceURL+'" );' 
    + '          $( this ).dialog( "close" );  ' 
    + '         } } ' 
    + '    } ); '
    + '} );</script>';
  html += '<button id="' + id + modalName + 'Bt">' + $.i18n( buttonLbl )
      + '</button>';
  html += '<script> '
    + ' $(function() { '  
    + '   $( "#' + id + modalName + 'Bt" ).button( '
    +'      { icons:{primary: "' + icon + '"}, text: false } '
    +'    ).click( function() { ' + jscall + ' } ); } ); '
    +'</script>';
  return html;
}
function pongOnTheFlyAddActionBtn(id, modalName, resourceURL, params) {
  log( "PoNG-OnTheFly", "modalFormAddActionBtn " + id );
  if ( !modalName ) {
    modalName = "OnTheFly";
  }
  var buttonLbl = modalName;
  if ( params && params.showConfig ) {
    buttonLbl = 'Show the configruation of this view...';
  }

  var html = "";
  log( "PoNG-OnTheFly", "Std Config Dlg:  " + modalName );
  var icon = "ui-icon-pencil";
  var paramsStr = 'null';
  if ( params ) {
    paramsStr = JSON.stringify( params )
  }
  var jscall = 'pongOnTheFlyOpenDlg( "' + id + '", "' + modalName + '", "'
      + resourceURL + '",' + paramsStr + ' );'
  var width = "600";
  if ( params && params.width ) {
    width = params.width;
  }
  var height = "600";
  if ( params && params.height ) {
    height = params.height;
  }
  html += '<div id="' + id + modalName + 'Dialog">' + resourceURL + " "
      + modalName + "</div>";
  log( "PoNG-OnTheFly", " cfg:  height: " + height + ", width: " + width );
  html += '<script>'
    + '$(function() { ' 
    + '  $( "#' + id + modalName + 'Dialog" ).dialog( '
    + '    { autoOpen: false, modal: true, height: '+height+', width: '+width+',' 
    + '      buttons: { "' + $.i18n( 'Save Configuration' ) + '": '
    + '        function() { '
    + '          pongOnTheFlySave( "'+id+'", "'+modalName+'", "'+resourceURL+'" );' 
    + '          $( this ).dialog( "close" );  ' 
    + '         } } ' 
    + '    } ); '
    + '} );</script>';
  html += '<button id="' + id + modalName + 'Bt">' + $.i18n( buttonLbl )
      + '</button>';
  html += '<script> '
    + ' $(function() { '  
    + '   $( "#' + id + modalName + 'Bt" ).button( '
    +'      { icons:{primary: "' + icon + '"}, text: false } '
    +'    ).click( function() { ' + jscall + ' } ); } ); '
    +'</script>';
  return html;
}
function pongOnTheFlyAddActionBtn ( id , modalName , resourceURL , params ) { log ( "PoNG-OnTheFly" , "modalFormAddActionBtn " + id ) ; if ( ! modalName ) { modalName = "OnTheFly" ; } var buttonLbl = modalName ; if ( params && params . showConfig ) { buttonLbl = 'Show the configruation of this view...' ; } var html = "" ; log ( "PoNG-OnTheFly" , "Std Config Dlg:  " + modalName ) ; var icon = "ui-icon-pencil" ; var paramsStr = 'null' ; if ( params ) { paramsStr = JSON . stringify ( params ) } var jscall = 'pongOnTheFlyOpenDlg( "' + id + '", "' + modalName + '", "' + resourceURL + '",' + paramsStr + ' );' var width = "600" ; if ( params && params . width ) { width = params . width ; } var height = "600" ; if ( params && params . height ) { height = params . height ; } html += '<div id="' + id + modalName + 'Dialog">' + resourceURL + " " + modalName + "</div>" ; log ( "PoNG-OnTheFly" , " cfg:  height: " + height + ", width: " + width ) ; html += '<script>' + '$(function() { ' + '  $( "#' + id + modalName + 'Dialog" ).dialog( ' + '    { autoOpen: false, modal: true, height: ' + height + ', width: ' + width + ',' + '      buttons: { "' + $ . i18n ( 'Save Configuration' ) + '": ' + '        function() { ' + '          pongOnTheFlySave( "' + id + '", "' + modalName + '", "' + resourceURL + '" );' + '          $( this ).dialog( "close" );  ' + '         } } ' + '    } ); ' + '} );</script>' ; html += '<button id="' + id + modalName + 'Bt">' + $ . i18n ( buttonLbl ) + '</button>' ; html += '<script> ' + ' $(function() { ' + '   $( "#' + id + modalName + 'Bt" ).button( ' + '      { icons:{primary: "' + icon + '"}, text: false } ' + '    ).click( function() { ' + jscall + ' } ); } ); ' + '</script>' ; return html ; }
Init HTML and JS
Init HTML and JS