Skip to content

Instantly share code, notes, and snippets.

@Spredzy
Created March 19, 2012 15:24
Show Gist options
  • Save Spredzy/2116119 to your computer and use it in GitHub Desktop.
Save Spredzy/2116119 to your computer and use it in GitHub Desktop.
Implementing loader gif file
* Open the file $PENTAHO_SOLUTIONS/system/custom/xsl/DefaultParameterForm.xsl
* Look for the string OK
* Modify those line of codes
<xsl:attribute name="onClick">doRun("<xsl:value-of select="/filters/id" />", '<xsl:value-of select="/filters/action"/>', '<xsl:value-of select="/filters/target"/>', document.getElementById('run_as_background_yes').checked);</xsl:attribute>
to
<xsl:attribute name="onClick">var a = doRun("<xsl:value-of select="/filters/id" />", '<xsl:value-of select="/filters/action"/>', '<xsl:value-of select="/filters/target"/>', document.getElementById('run_as_background_yes').checked);if(a != -1) {document.getElementById('run2button<xsl:value-of select="/filters/id" />').style.display = 'none';document.getElementById('loader').style.display = 'block';};</xsl:attribute>
* After the input element add the following element
<img src="img/loader.gif" id="loader" style="display:none;"/>
* Go to @$TOMCAT_HOME/webapps/pentaho@
* Create a directory @img@ if it does not exist
* Copy the @loader.gif@ file here
* Go to $TOMCAT_HOME/webapps/pentaho/js/parameters.js
* In doRun() function replace
if ( params == null) { return false; }
by
if ( params == null) { return -1; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment