Global/colorpicker.skin
general parameters used in this skin:
  • request.text

Sourcecode in Global/colorpicker.skin:
1:   <?xml version="1.0" encoding="UTF-8"?>
2:   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3:      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
4:   
5:   <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
6:   <head>
7:   <title>Antville Colorpicker</title>
8:   <link rel="stylesheet" type="text/css" title="CSS Stylesheet" href="<% context.url %>main.css" />
9:   <style type="text/css">
10:  <!--
11:  body {
12:     background-color: #ffffff;
13:     font-family: Verdana, Helvetica, Arial, sans-serif;
14:     color: #000000;
15:  }
16:  
17:  td {
18:     vertical-align: top;
19:  }
20:  
21:  .center {
22:     text-align: right;
23:     vertical-align: middle;
24:  }
25:  
26:  .widget {
27:     background-color: #ffffff;
28:     font: 12px verdana;
29:     color: #000000;
30:  }
31:  
32:  .link {
33:     color: <% layout.linkcolor %>;
34:  }
35:  
36:  .active {
37:     color: <% layout.alinkcolor %>;
38:  }
39:  
40:  .visited {
41:     color: <% layout.vlinkcolor %>;
42:  }
43:  
44:  .border {
45:     border: 1px solid #eeeeee;
46:  }
47:  // -->
48:  </style>
49:  <script type="text/javascript">
50:  <!--
51:  <% skin name="colorpickerScripts" %>
52:  // -->
53:  </script>
54:  </head>
55:  <body onload="cp.setCurrentColor();">
56:  
57:  <p align="center">
58:  <table border="0" cellspacing="4" cellpadding="8">
59:  <tr>
60:  <td width="240" class="widget" colspan="2">
61:  
62:  <!-- inner table, containing the color picker widget -->
63:  <table border="0" cellspacing="5" cellpadding="0">
64:  <tr>
65:  <td class="widget" colspan="2" align="center">Select <% request.text %> color:</td>
66:  </tr>
67:  <tr>
68:  <td valign="top" class="border" title="Select color">
69:  
70:  <script type="text/javascript">
71:  <!--
72:  var cp = Antville.ColorPicker;
73:  for (var i=0; i<cp.defaultPalette.length; i++) {
74:     var color = cp.defaultPalette[i];
75:     if (i % cp.brightness.length == 0)
76:        document.write("<div>");
77:     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 + '" />');
78:     if (i % cp.brightness.length == cp.brightness.length-1)
79:        document.write("</div>");
80:  }
81:  // -->
82:  </script>
83:  
84:  </td>
85:  <td valign="top">
86:  <div class="border" title="Select color brightness">
87:  
88:  <script type="text/javascript">
89:  <!--
90:  for (var i=0; i<cp.brightness.length; i++)
91:     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>');
92:  // -->
93:  </script>
94:  
95:  </div>
96:  </td>
97:  </tr>
98:  </table>
99:  
100: </td>
101: </tr>
102: 
103: <tr>
104: <td class="widget"><input class="widget" style="border: none;" id="display" value="" size="10" /></td>
105: <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>
106: </td>
107: </tr>
108: </table>
109: </p>
110: 
111: </body>
112: </html>
113: