Hi Dave,
I have just tested successfully the integration of jscolor with the option Field Prefix and Field Description, which facilitates the integration!
Here stages of integration.
I used the Ajax version:
http://jscolor.com/try.php#manual-binding 1. Download jscolor in folder 3rdParty/
2. In lib/menus/header.php
(line 22) add :
<script type="text/javascript" src="3rdParty/jscolor/jscolor.js"></script>
3. In lib/menus/default/edit_fonctions.php (line 164) add:
id="$fieldname"
4. In 3rdParty/SimplaAdmin/css/style.css line 506
5. Add a field text for the desired section
Field Label == Color1
Field Name == Color1
Field Type == text field
Field Prefix == Click here:
Field Description ==
<script type="text/javascript">var myPicker = new jscolor.color(document.getElementById('color1'), {})</script>
Field Width == 80
--END--
You can add several fields.
For example:
document.getElementById('color1')
document.getElementById('color2')
...
Dave,
1) It would be possible to add ID (
id="$fieldname") for the following updates ?
2) It would have been interesting to use custom.js, but script uses other files (images). Also, it is easier to use a specific folder (cf organization).
I tested a include in custom.js, but that did not function.
http://www.cryer.co.uk/resources/javascript/script17_include_js_from_js.htm A file include in header.php would be very interesting (?).
Your opinion ?
Thanks, Djulia