Styling/integration refactoring.

- Instead of onload override, move to RFB.load function that takes
  a parameter for the target DOM ID. This allows the user to have
  their own onload function.

- Add "VNC_" prefix to all element ID names. Only create DOM elements
  if they don't already exist on the page, otherwise use the existing
  elements.

- Move all styling to separate stylesheet.

- Use list model for control styling.
This commit is contained in:
Joel Martin
2010-05-11 16:13:52 -05:00
parent 3a2fafac9b
commit ded9dfae10
4 changed files with 177 additions and 78 deletions

View File

@@ -78,3 +78,22 @@ Usage
password that the vnc server is using (if any). Hit the Connect
button and enjoy!
Integration
-----------
The client is designed to be easily integrated with existing web
structure and style.
At a minimum you must include the script and call the RFB.load()
function which takes a parameter that is the ID of the DOM element to
fill. For example:
<body>
<div id='vnc'>Loading</div>
</body>
<script src='vnc.js'></script>
<script> windows.onload = RFB.load('vnc'); </script>
The file include/plain.css has a list of stylable elements.