Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/js/colorselector.js
===================================================================
diff -u -r1484 -r1485
--- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/js/colorselector.js (.../colorselector.js) (revision 1484)
+++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/js/colorselector.js (.../colorselector.js) (revision 1485)
@@ -2,15 +2,10 @@
var aColors = '000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,808080,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF';
- function kColorSelector()
+ function InitColorSelector()
{
var $selector = document.getElementById('colorSelector_div');
- this.updateColor = updateColor;
- this.colorMouseOver = colorMouseOver;
- this.colorMouseOut = colorMouseOut;
- this.colorClick = colorClick;
-
if( !isset($selector) )
{
var $selector = document.createElement('DIV');
@@ -22,20 +17,18 @@
$selector.style.display = 'none';
$selector.style.position = 'absolute';
$selector.style.borderStyle = 'solid';
- document.appendChild($selector);
- alert('1');
var $s_table = document.createElement('TABLE');
$s_table.id = 'colorSelector';
$selector.appendChild($s_table);
- alert('2');
+ document.body.appendChild($selector);
+
var oTable = document.getElementById('colorSelector');
var iCounter = 0;
aColors = aColors.split(',');
- alert('3');
+
while(iCounter < aColors.length)
{
- alert('aa');
var oRow = oTable.insertRow(-1);
for(var i = 0; i < 8 && iCounter < aColors.length; i++, iCounter++)
{
@@ -51,10 +44,9 @@
}
}
- function updateColor($event,$color_preview)
+ function updateColor($event,$color_id)
{
- alert('e: '+$event+'; cp: '+$color_preview);
- document.getElementById('color_'+$color_preview).style.backgroundColor = document.getElementById($color_preview).value;
+ document.getElementById('color_'+$color_id).style.backgroundColor = document.getElementById($color_id).value;
}
function colorMouseOver($e)
Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/stylesheets/style_editor.tpl
===================================================================
diff -u -r1484 -r1485
--- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/stylesheets/style_editor.tpl (.../style_editor.tpl) (revision 1484)
+++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/stylesheets/style_editor.tpl (.../style_editor.tpl) (revision 1485)
@@ -6,9 +6,6 @@