Global/colorpickerExt.skin
Sourcecode in Global/colorpickerExt.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:   
9:   <link rel="stylesheet" type="text/css" title="CSS Stylesheet" href="<% context.url %>main.css" />
10:  
11:  <style type="text/css">
12:  <!--
13:  
14:  body {
15:     background-color: #ffffff;
16:     font-family: Verdana, Helvetica, Arial, sans-serif;
17:     color: #000000;
18:  }
19:  
20:  td {
21:     vertical-align: top;
22:  }
23:  
24:  .center {
25:     text-align: right;
26:     vertical-align: middle;
27:  }
28:  
29:  .widget {
30:     background-color: #ffffff;
31:     font: 12px verdana;
32:     color: #000000;
33:  }
34:  
35:  .link {
36:     color: <% layout.linkcolor %>;
37:  }
38:  
39:  .active {
40:     color: <% layout.alinkcolor %>;
41:  }
42:  
43:  .visited {
44:     color: <% layout.vlinkcolor %>;
45:  }
46:  
47:  .border {
48:     border: 1px solid #eeeeee;
49:  }
50:  
51:  // -->
52:  </style>
53:  
54:  <script type="text/javascript">
55:  <!--
56:  <% skin name="colorpickerScripts" %>
57:  // -->
58:  </script>
59:  
60:  </head>
61:  <body onload="cp.setCurrentColors(); cp.setDropdown(); cp.setCurrentColor();">
62:  
63:  <table border="0" cellspacing="4" cellpadding="8">
64:  <tr>
65:  <td width="240" class="widget" rowspan="2">
66:  
67:  <!-- inner table, containing the color picker widget -->
68:  <table border="0" cellspacing="5" cellpadding="0" bgcolor="#ffffff">
69:  <tr>
70:  <td class="widget" colspan="2" align="center">Select
71:  <select size="1" id="dropdown" name="color" onchange="cp.setDropDownColor(this);">
72:  
73:  <script type="text/javascript">
74:  <!--
75:  var cp = Antville.ColorPicker;
76:  for (var i in cp.colorNames)
77:     document.write('<option value="' + i + '">' + cp.colorNames[i] + '</option>');
78:  // -->
79:  </script>
80:  
81:  </select> color:
82:  </td>
83:  </tr>
84:  <tr>
85:  <td valign="top" class="border" title="Select color">
86:  
87:  <script type="text/javascript">
88:  <!--
89:  for (var i=0; i<cp.defaultPalette.length; i++) {
90:     var color = cp.defaultPalette[i];
91:     if (i % cp.brightness.length == 0)
92:        document.write("<div>");
93:     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 + '" />');
94:     if (i % cp.brightness.length == cp.brightness.length-1)
95:        document.write("</div>");
96:  }
97:  // -->
98:  </script>
99:  
100: </td>
101: <td valign="top">
102: <div class="border" title="Select color brightness">
103: 
104: <script type="text/javascript">
105: <!--
106: for (var i=0; i<cp.brightness.length; i++)
107:    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>');
108: // -->
109: </script>
110: 
111: </div>
112: </td>
113: </tr>
114: 
115: </table>
116: 
117: </td>
118: <td class="widget">&nbsp;<!-- just a stupid spacer cell --></td>
119: </tr>
120: <tr>
121: <td id="demo">
122: <div id="titlecolor" class="storyTitle">Sample Text</div>
123: <div id="textcolor" class="storyText">This is a sample text containing a <a id="linkcolor" class="link">fresh (unvisited) link</a> and a
124: <a id="vlinkcolor" class="visited">visited link</a>. The <a id="alinkcolor" class="active">active link</a> color is the one
125: you'll see while pressing the mouse button on the link.</div<br />
126: <div id="smallcolor" class="small">Finally, some small text.</div>
127: </td>
128: </tr>
129: <tr>
130: <td class="widget">
131: <input class="widget" style="border: none;" id="display" value="" size="10" />
132: </td>
133: <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>
134: </td>
135: </tr>
136: </table>
137: 
138: </body>
139: </html>
140: