antville/code/Global/colorpicker.skin
2003-12-10 11:52:48 +00:00

112 lines
2.8 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
<title>Antville Colorpicker</title>
<link rel="stylesheet" type="text/css" title="CSS Stylesheet" href="<% context.href %>main.css" />
<style type="text/css">
<!--
body {
background-color: #ffffff;
font-family: Verdana, Helvetica, Arial, sans-serif;
color: #000000;
}
td {
vertical-align: top;
}
.center {
text-align: right;
vertical-align: middle;
}
.widget {
background-color: #ffffff;
font: 12px verdana;
color: #000000;
}
.link {
color: <% layout.linkcolor %>;
}
.active {
color: <% layout.alinkcolor %>;
}
.visited {
color: <% layout.vlinkcolor %>;
}
.border {
border: 1px solid #eeeeee;
}
// -->
</style>
<script type="text/javascript">
<!--
<% skin name="colorpickerScripts" %>
// -->
</script>
</head>
<body onload="cp.setCurrentColor();">
<p align="center">
<table border="0" cellspacing="4" cellpadding="8">
<tr>
<td width="240" class="widget" colspan="2">
<!-- inner table, containing the color picker widget -->
<table border="0" cellspacing="5" cellpadding="0">
<tr>
<td class="widget" colspan="2" align="center">Select <% request.text %> color:</td>
</tr>
<tr>
<td valign="top" class="border" title="Select color">
<script type="text/javascript">
<!--
var cp = Antville.ColorPicker;
for (var i=0; i<cp.defaultPalette.length; i++) {
var color = cp.defaultPalette[i];
if (i % cp.brightness.length == 0)
document.write("<div>");
document.write('<img id="color' + i + '" style="background-color: #' + color + ';" onclick="cp.updateBrightness(this, ' + i + ');" src="' + Antville.pixel.src + '" width="' + cp.squareSize + '" height="' + cp.squareSize + '" />');
if (i % cp.brightness.length == cp.brightness.length-1)
document.write("</div>");
}
// -->
</script>
</td>
<td valign="top">
<div class="border" title="Select color brightness">
<script type="text/javascript">
<!--
for (var i=0; i<cp.brightness.length; i++)
document.write('<div><img id="bright' + i + '" onclick="cp.updatePalette(this, ' + i + ');" src="' + Antville.pixel.src + '" width="15" height="15" style="background-color: #' + cp.brightness[i][0] + ';"/></div>');
// -->
</script>
</div>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="widget"><input class="widget" style="border: none;" id="display" value="" size="10" /></td>
<td align="right" class="widget"><button name="accept" type="button" onclick="cp.submit();" title="accept color selection">Accept</button>&nbsp;&nbsp;<button name="cancel" type="button" onclick="cp.cancel();" title="cancel color selection">Cancel</button>
</td>
</tr>
</table>
</p>
</body>
</html>