You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
8.2 KiB
1 line
8.2 KiB
9 years ago
|
var imageUrl = '/modules/poll/admin/js/color.png';
function iColorShow(id, id2) {
var eICP = jQuery("#" + id2).position();
jQuery("#iColorPicker").css({
'top': eICP.top + (jQuery("#" + id).outerHeight()) + "px",
'left': (eICP.left-200) + "px",
'position': 'absolute'
}).fadeIn("fast");
jQuery("#iColorPickerBg").css({
'position': 'fixed',
'top': 0,
'left': 0,
'width': '100%',
'height': '100%'
}).fadeIn("fast");
var def = jQuery("#" + id).val();
jQuery('#colorPreview span').text(def);
jQuery('#colorPreview').css('background', def);
jQuery('#color').val(def);
var hxs = jQuery('#iColorPicker');
for (i = 0; i < hxs.length; i++) {
var tbl = document.getElementById('hexSection' + i);
var tblChilds = tbl.childNodes;
for (j = 0; j < tblChilds.length; j++) {
var tblCells = tblChilds[j].childNodes;
for (k = 0; k < tblCells.length; k++) {
jQuery(tblChilds[j].childNodes[k]).unbind().mouseover(function(a) {
var aaa = "#" + jQuery(this).attr('hx');
jQuery('#colorPreview').css('background', aaa);
jQuery('#colorPreview span').text(aaa)
}).click(function() {
var aaa = "#" + jQuery(this).attr('hx');
jQuery("#" + id).val(aaa).css("background", aaa);
jQuery("#iColorPickerBg").hide();
jQuery("#iColorPicker").fadeOut();
jQuery(this)
})
}
}
}
}
this.iColorPicker = function() {
jQuery("input.iColorPicker").each(function(i) {
if (i == 0) {
jQuery(document.createElement("div")).attr("id", "iColorPicker").css('display', 'none').html('<table class="pickerTable" id="pickerTable0"><thead id="hexSection0"><tr><td style="background:#f00;" hx="f00"></td><td style="background:#ff0" hx="ff0"></td><td style="background:#0f0" hx="0f0"></td><td style="background:#0ff" hx="0ff"></td><td style="background:#00f" hx="00f"></td><td style="background:#f0f" hx="f0f"></td><td style="background:#fff" hx="fff"></td><td style="background:#ebebeb" hx="ebebeb"></td><td style="background:#e1e1e1" hx="e1e1e1"></td><td style="background:#d7d7d7" hx="d7d7d7"></td><td style="background:#cccccc" hx="cccccc"></td><td style="background:#c2c2c2" hx="c2c2c2"></td><td style="background:#b7b7b7" hx="b7b7b7"></td><td style="background:#acacac" hx="acacac"></td><td style="background:#a0a0a0" hx="a0a0a0"></td><td style="background:#959595" hx="959595"></td></tr><tr><td style="background:#ee1d24" hx="ee1d24"></td><td style="background:#fff100" hx="fff100"></td><td style="background:#00a650" hx="00a650"></td><td style="background:#00aeef" hx="00aeef"></td><td style="background:#2f3192" hx="2f3192"></td><td style="background:#ed008c" hx="ed008c"></td><td style="background:#898989" hx="898989"></td><td style="background:#7d7d7d" hx="7d7d7d"></td><td style="background:#707070" hx="707070"></td><td style="background:#626262" hx="626262"></td><td style="background:#555" hx="555"></td><td style="background:#464646" hx="464646"></td><td style="background:#363636" hx="363636"></td><td style="background:#262626" hx="262626"></td><td style="background:#111" hx="111"></td><td style="background:#000" hx="000"></td></tr><tr><td style="background:#f7977a" hx="f7977a"></td><td style="background:#fbad82" hx="fbad82"></td><td style="background:#fdc68c" hx="fdc68c"></td><td style="background:#fff799" hx="fff799"></td><td style="background:#c6df9c" hx="c6df9c"></td><td style="background:#a4d49d" hx="a4d49d"></td><td style="background:#81ca9d" hx="81ca9d"></td><td style="background:#7bcdc9" hx="7bcdc9"></td><td style="background:#6ccff7" hx="6ccff7"></td><td style="background:#7ca6d8" hx="7ca6d8"></td><td style="background:#8293ca" hx="8293ca"></td><td style="background:#8881be" hx="8881be"></td><td style="background:#a286bd" hx="a286bd"></td><td style="background:#bc8cbf" hx="bc8cbf"></td><td style="background:#f49bc1" hx="f49bc1"></td><td style="background:#f5999d" hx="f5999d"></td></tr><tr><td style="background:#f16c4d" hx="f16c4d"></td><td style="background:#f68e54" hx="f68e54"></td><td style="background:#fbaf5a" hx="fbaf5a"></td><td style="background:#fff467" hx="fff467"></td><td style="background:#ac
|