Difference between revisions of "Ccil-ui-wallpapers"

From CCIL
Jump to: navigation, search
(Created page with "The CCIL UI artifacts are located in the ''/ccil/logo'' in the final distribution WAR file. == Maven == In order include it, you need a reference to the [https://maven.apach...")
 
m (HTML)
Line 35: Line 35:
  
 
== HTML ==
 
== HTML ==
 +
 +
Include the script:
  
 
<pre>
 
<pre>
 +
<script type='text/javascript' src='ccil/js/ccil-wallpaper.js'></script>
 +
</pre>
 +
 +
In the HTML, use the ''CCIL.ui.wallpaper.setRandom();'' function.
 +
 +
<pre>
 +
$(document).ready(function() {
 +
CCIL.ui.wallpaper.setRandom();
 +
console.log("document.ready");
 +
// var docId = getParam("id");
 +
 +
// hook pills
 +
CCIL.onload = function() {
 +
// do something
 +
};
 +
CCIL.init();
 +
CCIL.ui.init('interface.json');
 +
 +
}); // document.ready
 
</pre>
 
</pre>

Revision as of 09:50, 2 July 2016

The CCIL UI artifacts are located in the /ccil/logo in the final distribution WAR file.

Maven

In order include it, you need a reference to the Maven project:

<dependency>
	<groupId>net.ccil</groupId>
	<artifactId>ccil-ui-wallpapers</artifactId>
	<version>3.2.4-SNAPSHOT</version>
	<scope>runtime</scope>
	<type>war</type>
</dependency>

Then, in the plugins section:

<plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-war-plugin</artifactId>
	<configuration>
		<overlays>
			<overlay>
				<groupId>net.ccil</groupId>
				<artifactId>ccil-ui-wallpapers</artifactId>
				<type>war</type>
       				<targetPath>/</targetPath>
			</overlay>
		</overlays>
	</configuration>
</plugin>

HTML

Include the script:

<script type='text/javascript' src='ccil/js/ccil-wallpaper.js'></script>

In the HTML, use the CCIL.ui.wallpaper.setRandom(); function.

$(document).ready(function() {
			CCIL.ui.wallpaper.setRandom();
			console.log("document.ready");
			//			var docId = getParam("id");

			// hook pills
			CCIL.onload = function() {
				// do something
			};
			CCIL.init();
			CCIL.ui.init('interface.json');

		}); // document.ready