dist/tgi-interface-bootstrap.js
function renderCommand(command) {

    if (!panel.buttonDiv) {
      var formGroup = addEle(panel.panelForm, 'div', 'form-group');
      panel.buttonDiv = addEle(formGroup, 'div', indent ? 'col-sm-offset-3 col-sm-9' : 'col-sm-9');
    }
    var cmdTheme = command.theme || 'default';
    var button = addEle(panel.buttonDiv, 'button', 'btn btn-' + cmdTheme + ' btn-presentation', {type: 'button'});

    var icon = command.icon;
    if (icon) {
      if (left(icon, 2) == 'fa')
        icon = '<i class="fa ' + icon + '"></i>&nbsp;';
      else
        icon = '<span class="glyphicon ' + icon + '"></span>&nbsp;';
      button.innerHTML = icon + command.name;
    } else {
      button.innerHTML = command.name;
    }

    $(button).on('click', function (event) {
      event.preventDefault();
      bootstrapInterface.dispatch(new Request({type: 'Command', command: command}));
    });
    panel.listeners.push(button); // so we can avoid leakage on deleting panel
  }
function renderCommand(command) {

    if (!panel.buttonDiv) {
      var formGroup = addEle(panel.panelForm, 'div', 'form-group');
      panel.buttonDiv = addEle(formGroup, 'div', indent ? 'col-sm-offset-3 col-sm-9' : 'col-sm-9');
    }
    var cmdTheme = command.theme || 'default';
    var button = addEle(panel.buttonDiv, 'button', 'btn btn-' + cmdTheme + ' btn-presentation', {type: 'button'});

    var icon = command.icon;
    if (icon) {
      if (left(icon, 2) == 'fa')
        icon = '<i class="fa ' + icon + '"></i>&nbsp;';
      else
        icon = '<span class="glyphicon ' + icon + '"></span>&nbsp;';
      button.innerHTML = icon + command.name;
    } else {
      button.innerHTML = command.name;
    }

    $(button).on('click', function (event) {
      event.preventDefault();
      bootstrapInterface.dispatch(new Request({type: 'Command', command: command}));
    });
    panel.listeners.push(button); // so we can avoid leakage on deleting panel
  }
function renderCommand ( command ) { if ( ! panel . buttonDiv ) { var formGroup = addEle ( panel . panelForm , 'div' , 'form-group' ) ; panel . buttonDiv = addEle ( formGroup , 'div' , indent ? 'col-sm-offset-3 col-sm-9' : 'col-sm-9' ) ; } var cmdTheme = command . theme || 'default' ; var button = addEle ( panel . buttonDiv , 'button' , 'btn btn-' + cmdTheme + ' btn-presentation' , { type : 'button' } ) ; var icon = command . icon ; if ( icon ) { if ( left ( icon , 2 ) == 'fa' ) icon = '<i class="fa ' + icon + '"></i>&nbsp;' ; else icon = '<span class="glyphicon ' + icon + '"></span>&nbsp;' ; button . innerHTML = icon + command . name ; } else { button . innerHTML = command . name ; } $ ( button ) . on ( 'click' , function ( event ) { event . preventDefault ( ) ; bootstrapInterface . dispatch ( new Request ( { type : 'Command' , command : command } ) ) ; } ) ; panel . listeners . push ( button ) ; // so we can avoid leakage on deleting panel }
function to render Command
function to render Command