Hi Dave,
I found a possibility to add a function Color
Picker.
Here my solution. I use Tigra Color Picker (it gives the possibility of using the function with a link and the name of the field).
http://www.softcomplex.com/products/tigra_color_picker/demo1.html 1) in /lib/menus/header.php
<head>
<script type="text/javascript" src="lib/picker.js"></script>
</head>
2) in /lib/menus/default/edit.php
change
<form method="post" action="<?php echo $_SERVER['SCRIPT_NAME'] ?>" autocomplete="off" onsubmit="tinyMCE.triggerSave();">
with
<form method="post" action="<?php echo $_SERVER['SCRIPT_NAME'] ?>" autocomplete="off" onsubmit="tinyMCE.triggerSave();"
name="tcp_test">
3) in picker.js line 17, add : /lib/picker.html
4) To download the two files in the Lib folder :
picker.js and
picker.html.
5) To create a section MyStylesPage :
a. Edit Section
b. Add Field
Field Label == background
Field Type == text field
c. Save
d. Add Field
Field Label == Picker
Field Type == separator
Separator Type == separator
<a href="javascript:TCP.popup(document.forms['
tcp_test'].elements['
background'])">Background-color</a>
( Capture1.gif )
6) Now in pageList.php add :
<style type="text/css">
body {background-color : <?php echo $mytable['background'] ?>}
</style>
END
It is then possible to modify the styles of the page in cmsBuilder (...)
But, I encountered two problems :
1) the form does not have a name (in edit.php) ;
2) and input does not have a ID.
Also, it is possible to add a name for the form and a ID for the fields in the next versions ?
And it would be possible to improve this with your own function ?
For example for to obtain :
[img]http://www.codeproject.com/KB/custom-controls/WS_ColorPicker/ColorPickerDemo.png[/img]
That would give much possibility.
Your opinion ?
Thanks,
Djulia