Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

PentahoSpinner is a thin wrapper around spin.js that we add some generic configurations for small, medium, and large spinners.

To use is, create a div on your page:

some.html
  <html>
    <body>
      ...
      
      <div id="spinnerContainer" style="height: 32px; width: 32px;"></div>

      ...
   </body>
  </html>

In javascript:

your.js
    pen.require(['common-ui/util/PentahoSpinner'], function(spin) {
      var config = spin.getMediumConfig();

      // override the color
      config.color = "#555";

      // override the starting top location
      config.top = "-8px"

      // spin.js's Spinner object has been included for us by the pen.require call to PentahoSpinner above
      var spinner = new Spinner(config);

      // show the spinner in your div
      spinner.spin(dojo.byId("spinnerContainer"));


      ...


      // hide the spinner
      spinner.stop();

    });
  • No labels