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.
63 lines
1.5 KiB
63 lines
1.5 KiB
4 months ago
|
<!DOCTYPE html>
|
||
|
<html>
|
||
|
<head>
|
||
|
<title></title>
|
||
4 months ago
|
<script type="text/javascript" src="../internal.js?aea0c61c"></script>
|
||
4 months ago
|
<style type="text/css">
|
||
|
.section {
|
||
|
text-align: center;
|
||
|
margin-top: 10px;
|
||
|
}
|
||
4 months ago
|
|
||
4 months ago
|
.section input {
|
||
|
margin-left: 5px;
|
||
|
width: 70px;
|
||
|
}
|
||
|
</style>
|
||
|
</head>
|
||
|
<body>
|
||
|
<div class="section">
|
||
|
<span><var id="lang_tdBkColor"></var></span>
|
||
|
<input type="text" id="J_tone"/>
|
||
|
</div>
|
||
|
<script type="text/javascript">
|
||
|
var tone = $G("J_tone"),
|
||
4 months ago
|
colorPiker = new UE.ui.ColorPicker({
|
||
|
editor: editor
|
||
|
}),
|
||
|
colorPop = new UE.ui.Popup({
|
||
|
editor: editor,
|
||
|
content: colorPiker
|
||
|
});
|
||
4 months ago
|
domUtils.on(tone, "click", function () {
|
||
|
colorPop.showAnchor(tone);
|
||
|
});
|
||
|
domUtils.on(document, 'mousedown', function () {
|
||
|
colorPop.hide();
|
||
|
});
|
||
|
colorPiker.addListener("pickcolor", function () {
|
||
|
tone.value = arguments[1];
|
||
|
colorPop.hide();
|
||
|
});
|
||
|
colorPiker.addListener("picknocolor", function () {
|
||
4 months ago
|
tone.value = "";
|
||
4 months ago
|
colorPop.hide();
|
||
|
});
|
||
4 months ago
|
dialog.onok = function () {
|
||
|
editor.execCommand("edittd", tone.value);
|
||
4 months ago
|
};
|
||
|
|
||
|
var start = editor.selection.getStart(),
|
||
|
cell = start && domUtils.findParentByTagName(start, ["td", "th"], true);
|
||
4 months ago
|
if (cell) {
|
||
|
var color = domUtils.getComputedStyle(cell, 'background-color');
|
||
|
if (/^#/.test(color)) {
|
||
4 months ago
|
tone.value = color
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
</script>
|
||
|
</body>
|
||
4 months ago
|
</html>
|