Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

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

Example usage:

Code Block
titlesome.html
  <html>
    <body>
      ...
     

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

      ...
   </body>
  </html>

...

Code Block
titleyour.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();

    });