dist/module.js
function addAction(action, ctrl) {
      this.addActionIcon(action, ctrl);
      if (!this.actionExists(action, ctrl)) {
        ctrl.actionListService.requiredActionsList.splice(action.index, 0, action.name);
        ctrl.actionListService.actionsToIndex[action.name] = action.index;
        ctrl.actionListService.onToggle[action.name] = action.onToggle;
        ctrl.actionListService.actionsToDisplay.unshift(action.name);
      }
    }
function addAction(action, ctrl) {
      this.addActionIcon(action, ctrl);
      if (!this.actionExists(action, ctrl)) {
        ctrl.actionListService.requiredActionsList.splice(action.index, 0, action.name);
        ctrl.actionListService.actionsToIndex[action.name] = action.index;
        ctrl.actionListService.onToggle[action.name] = action.onToggle;
        ctrl.actionListService.actionsToDisplay.unshift(action.name);
      }
    }
function addAction ( action , ctrl ) { this . addActionIcon ( action , ctrl ) ; if ( ! this . actionExists ( action , ctrl ) ) { ctrl . actionListService . requiredActionsList . splice ( action . index , 0 , action . name ) ; ctrl . actionListService . actionsToIndex [ action . name ] = action . index ; ctrl . actionListService . onToggle [ action . name ] = action . onToggle ; ctrl . actionListService . actionsToDisplay . unshift ( action . name ) ; } }
Adds an action to the actions menu, including its icon.
@param  {object} action  action object
@param  {object} ctrl    instance of prmActionCtrl
 TODO coerce action.index to be <= requiredActionsList.length
Adds an action to the actions menu including its icon .