Sha256: b5000b090d1c9115c2cad65bba359c3c0b3dd0e13c1d3741ee9429b6e79003b7

Contents?: true

Size: 606 Bytes

Versions: 18

Compression:

Stored size: 606 Bytes

Contents

// This event callback pushes its results into the results array and returns a promise.
function <%=underscore(name)%>_action(_options, params, _event, results) {
  var promiseObj = new Promise(function(resolve) {
    console.log('<%= classify(name) %> called');
    // Reload iFrame: https://stackoverflow.com/questions/86428/what-s-the-best-way-to-reload-refresh-an-iframe
    document.getElementById('random_fact').src += '';
    results.push({
      action: 'action',
      content: JSON.stringify({data: params.text}),
      statusCode: 200,
    });
    resolve(results);
  });
  return promiseObj;
}

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
coprl-3.0.0.beta.12 lib/coprl/presenters/generators/templates/plugin/views/assets/js/components/actions/action.js.tt
coprl-3.0.0.beta.11 lib/coprl/presenters/generators/templates/plugin/views/assets/js/components/actions/action.js.tt
coprl-3.0.0.beta.10 lib/coprl/presenters/generators/templates/plugin/views/assets/js/components/actions/action.js.tt
coprl-3.0.0.beta.9 lib/coprl/presenters/generators/templates/plugin/views/assets/js/components/actions/action.js.tt
coprl-3.0.0.beta.8 lib/coprl/presenters/generators/templates/plugin/views/assets/js/components/actions/action.js.tt
coprl-3.0.0.beta.7 lib/coprl/presenters/generators/templates/plugin/views/assets/js/components/actions/action.js.tt
coprl-3.0.0.beta.6 lib/coprl/presenters/generators/templates/plugin/views/assets/js/components/actions/action.js.tt
coprl-3.0.0.beta.5 lib/coprl/presenters/generators/templates/plugin/views/assets/js/components/actions/action.js.tt
voom-presenters-2.1.2 lib/voom/presenters/generators/templates/plugin/views/assets/js/components/actions/action.js.tt
coprl-3.0.0.beta.4 lib/coprl/presenters/generators/templates/plugin/views/assets/js/components/actions/action.js.tt
coprl-3.0.0.beta.3 lib/coprl/presenters/generators/templates/plugin/views/assets/js/components/actions/action.js.tt
coprl-3.0.0.beta.2 lib/coprl/presenters/generators/templates/plugin/views/assets/js/components/actions/action.js.tt
coprl-3.0.0.beta.1 lib/coprl/presenters/generators/templates/plugin/views/assets/js/components/actions/action.js.tt
voom-presenters-2.1.0 lib/voom/presenters/generators/templates/plugin/views/assets/js/components/actions/action.js.tt
voom-presenters-2.0.3 lib/voom/presenters/generators/templates/plugin/views/assets/js/components/actions/action.js.tt
voom-presenters-2.0.2 lib/voom/presenters/generators/templates/plugin/views/assets/js/components/actions/action.js.tt
voom-presenters-2.0.1 lib/voom/presenters/generators/templates/plugin/views/assets/js/components/actions/action.js.tt
voom-presenters-2.0.0 lib/voom/presenters/generators/templates/plugin/views/assets/js/components/actions/action.js.tt