PentahoSpinner

PentahoSpinner is a thin wrapper around spin.js that we add some generic configurations for small, medium, and large spinners. For doc on spin.js check out http://fgnass.github.com/spin.js/

Example usage:

some.html
  <html>
    <body>
      ...

      <div id="spinnerContainer" style="height: 32px; width: 32px;"></div>

      ...
   </body>
  </html>
your.js
    pen.require(['common-ui/util/PentahoSpinner'], function(spin) {
      //--------------------------------------------------------------
      // var config = spin.getSmallConfig();   // 16x16 spinner config
      // var config = spin.getLargeConfig();   // 48x48 spinner config
      //--------------------------------------------------------------
     
      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();

    });