mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-23 13:19:56 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@523 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
00fe8b71f6
commit
1cf29fc743
10 changed files with 72 additions and 84 deletions
|
|
@ -2,10 +2,12 @@
|
|||
function applyColor() {
|
||||
var code = xGetElementById("color_input").value;
|
||||
|
||||
if(opener.xIE4Up) opener.editorDo("BackColor","#"+code, opener.editorPrevSrl);
|
||||
else opener.editorDo("hilitecolor","#"+code, opener.editorPrevSrl);
|
||||
|
||||
opener.editorFocus(opener.editorPrevSrl);
|
||||
opener.editorSetBackColor("#"+code);
|
||||
opener.editorFocus(opener.editorPrevSrl);
|
||||
self.close();
|
||||
|
||||
window.close();
|
||||
}
|
||||
|
||||
/* 색상 클릭시 */
|
||||
|
|
|
|||
|
|
@ -3,8 +3,11 @@ function applyColor() {
|
|||
var code = xGetElementById("color_input").value;
|
||||
|
||||
opener.editorFocus(opener.editorPrevSrl);
|
||||
opener.editorSetForeColor("#"+code);
|
||||
|
||||
opener.editorDo("ForeColor", "#"+code, opener.editorPrevSrl);
|
||||
|
||||
opener.editorFocus(opener.editorPrevSrl);
|
||||
|
||||
self.close();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,6 @@
|
|||
|
||||
<div id="emoticon_area">
|
||||
<!--@foreach($emoticon_list as $emoticon)-->
|
||||
<img src="images/{$emoticon}" alt="emoticon" onclick="insertImage(this)" style="cursor:pointer;" />
|
||||
<img src="images/{$emoticon}" alt="emoticon" onclick="insertEmoticon(this); return false;" style="cursor:pointer;" />
|
||||
<!--@end-->
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,13 @@
|
|||
function insertImage(obj) {
|
||||
function insertEmoticon(obj) {
|
||||
if(typeof(opener)=='undefined') return;
|
||||
|
||||
opener.editorInsertEmoticon(obj);
|
||||
var text = "<img src=\""+obj.src+"\" border=\"0\" alt=\"emoticon\" />";
|
||||
|
||||
opener.editorFocus(opener.editorPrevSrl);
|
||||
|
||||
var iframe_obj = opener.editorGetIFrame(opener.editorPrevSrl)
|
||||
|
||||
opener.editorReplaceHTML(iframe_obj, text);
|
||||
opener.editorFocus(opener.editorPrevSrl);
|
||||
|
||||
window.close();
|
||||
|
|
|
|||
|
|
@ -1,41 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Edit Html</title>
|
||||
<link rel='stylesheet' href='../css/editor.css' type='text/css' />
|
||||
<script type='text/javascript' src='../../common/js/x.js'></script>
|
||||
<script type='text/javascript' src='../../common/js/common.js'></script>
|
||||
<script type='text/javascript' src='../js/editor.js'></script>
|
||||
<script type='text/javascript'>
|
||||
function setText() {
|
||||
if(typeof(opener)=='undefined') return;
|
||||
var text = opener.editorGetSelectedHtml(opener.editorPrevSrl);
|
||||
var fo_obj = xGetElementById('fo');
|
||||
fo_obj.text.value = text;
|
||||
self.focus();
|
||||
}
|
||||
|
||||
function insertHtml() {
|
||||
if(typeof(opener)=='undefined') return;
|
||||
var fo_obj = xGetElementById('fo');
|
||||
var text = fo_obj.text.value;
|
||||
if(!text) return;
|
||||
opener.editorInsertHTML(text);
|
||||
opener.focus();
|
||||
self.close();
|
||||
}
|
||||
xAddEventListener(window, 'load', setText);
|
||||
xAddEventListener(window, 'load', setFixedPopupSize);
|
||||
</script>
|
||||
</head>
|
||||
<body class="editor_pop_body">
|
||||
<form action='./' method='post' id='fo' onSubmit="return false" style="display:inline">
|
||||
<div class="editor_window">
|
||||
<div><textarea name="text" id='editor' class="editor_textarea"></textarea></div>
|
||||
<div><input type='button' id='manual_url_submit' class="editor_submit" value='insert' onClick='insertHtml()' /></div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,9 +1,25 @@
|
|||
#emoticon_area {
|
||||
width:230px;
|
||||
padding:10px 0px 10px 0px;
|
||||
.editor_area {
|
||||
width:400px;
|
||||
background-color:#F3F3F3;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
#emoticon_area img {
|
||||
margin:2px;
|
||||
.editor_window {
|
||||
padding:4px;
|
||||
}
|
||||
|
||||
.editor_textarea {
|
||||
width:385px;
|
||||
height:400px;
|
||||
border:1px solid #888888;
|
||||
}
|
||||
|
||||
.editor_button {
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
.editor_button input {
|
||||
margin-top:4px;
|
||||
background-color:#FFFFFF;
|
||||
border:1px solid #AAAAAA;
|
||||
}
|
||||
|
|
|
|||
16
modules/editor/components/html_editor/tpl/popup.html
Executable file
16
modules/editor/components/html_editor/tpl/popup.html
Executable file
|
|
@ -0,0 +1,16 @@
|
|||
<!--%import("popup.css")-->
|
||||
<!--%import("popup.js")-->
|
||||
|
||||
<div class="editor_area">
|
||||
|
||||
<form action='./' method='post' id='fo' onSubmit="return false" style="display:inline">
|
||||
<div class="editor_window">
|
||||
<div><textarea name="text" id='editor' class="editor_textarea"></textarea></div>
|
||||
<div class="editor_button">
|
||||
<input type='button' value='{$lang->cmd_insert}' onclick='insertHtml()' />
|
||||
<input type='button' value='{$lang->cmd_close}' onclick='window.close();' />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
|
@ -1,8 +1,20 @@
|
|||
function insertImage(obj) {
|
||||
function setText() {
|
||||
if(typeof(opener)=='undefined') return;
|
||||
var text = opener.editorGetSelectedHtml(opener.editorPrevSrl);
|
||||
xGetElementById("editor").value = text;
|
||||
xGetElementById("editor").focus();
|
||||
}
|
||||
|
||||
opener.editorInsertEmoticon(obj);
|
||||
function insertHtml() {
|
||||
var text = xGetElementById("editor").value;
|
||||
opener.editorFocus(opener.editorPrevSrl);
|
||||
|
||||
var iframe_obj = opener.editorGetIFrame(opener.editorPrevSrl)
|
||||
|
||||
opener.editorReplaceHTML(iframe_obj, text);
|
||||
opener.editorFocus(opener.editorPrevSrl);
|
||||
|
||||
window.close();
|
||||
}
|
||||
|
||||
xAddEventListener(window, 'load', setText);
|
||||
|
|
|
|||
|
|
@ -321,23 +321,6 @@ function editorChangeFontSize(obj,srl) {
|
|||
obj.selectedIndex = 0;
|
||||
}
|
||||
|
||||
function editorSetForeColor(color_code) {
|
||||
editorDo("ForeColor",color_code,editorPrevSrl);
|
||||
editorFocus(editorPrevSrl);
|
||||
}
|
||||
|
||||
function editorSetBackColor(color_code) {
|
||||
if(xIE4Up) editorDo("BackColor",color_code,editorPrevSrl);
|
||||
else editorDo("hilitecolor",color_code,editorPrevSrl);
|
||||
editorFocus(editorPrevSrl);
|
||||
}
|
||||
|
||||
function editorInsertEmoticon(obj) {
|
||||
editorFocus(editorPrevSrl);
|
||||
editorDo("InsertImage",obj.src,editorPrevSrl);
|
||||
editorFocus(editorPrevSrl);
|
||||
}
|
||||
|
||||
function editorDoInsertUrl(link, upload_target_srl) {
|
||||
editorFocus(upload_target_srl);
|
||||
var iframe_obj = editorGetIFrame(srl);
|
||||
|
|
@ -386,15 +369,6 @@ function editorInsertMultimedia(url, width, height) {
|
|||
}
|
||||
}
|
||||
|
||||
function editorInsertHTML(html) {
|
||||
if(!html) return;
|
||||
|
||||
editorFocus(editorPrevSrl);
|
||||
var obj = editorGetIFrame(editorPrevSrl)
|
||||
editorReplaceHTML(obj, html);
|
||||
editorFocus(editorPrevSrl);
|
||||
}
|
||||
|
||||
function editorInsertQuotation(html) {
|
||||
if(!html) return;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue