| 1 |
// $Id$ |
// $Id$ |
|
|
|
|
// Global killswitch: only run if we are in a supported browser. |
|
|
if (Drupal.jsEnabled) { |
|
|
$(document).ready(function () { |
|
|
// initiate farbtastic colorpicker |
|
|
var farb = $.farbtastic("div.colorpicker"); |
|
|
$("input.color_textfield").each(function () { |
|
|
// set the background colors of all of the textfields appropriately |
|
|
// $("table#tablemanager-example-table " + this.name).css("background-color", farb.color); |
|
|
farb.linkTo(this); |
|
|
// update the farbtastic colorpicker and example table when this textfield is clicked |
|
|
$(this).click(function () { |
|
|
$("table#tablemanager-example-table " + this.name).css("background-color", farb.color); |
|
|
farb.linkTo(this); |
|
|
}); |
|
|
}); |
|
|
|
|
|
$("input.form-checkbox").each(function () { |
|
|
$(this).change(function () { |
|
|
var current = $("table#tablemanager-example-table " + this.value); |
|
|
if (this.checked) { |
|
|
$(current).css("border", "1px solid #000"); |
|
|
} |
|
|
else { |
|
|
$(current).css("border", "none"); |
|
|
} |
|
|
}); |
|
|
}); |
|
|
}); |
|
|
} |
|