mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-10 04:24:14 +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
|
|
@ -131,9 +131,9 @@ function setFixedPopupSize() {
|
||||||
|
|
||||||
// 윈도우에서는 브라우저 상관없이 가로 픽셀이 조금 더 늘어나야 한다.
|
// 윈도우에서는 브라우저 상관없이 가로 픽셀이 조금 더 늘어나야 한다.
|
||||||
if(xUA.indexOf('windows')>0) {
|
if(xUA.indexOf('windows')>0) {
|
||||||
if(xOp7Up) w += 9;
|
if(xOp7Up) w += 10;
|
||||||
else if(xIE4Up) w += 8;
|
else if(xIE4Up) w += 10;
|
||||||
else w += 5;
|
else w += 6;
|
||||||
}
|
}
|
||||||
window.resizeTo(w,h);
|
window.resizeTo(w,h);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,12 @@
|
||||||
function applyColor() {
|
function applyColor() {
|
||||||
var code = xGetElementById("color_input").value;
|
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.editorFocus(opener.editorPrevSrl);
|
||||||
opener.editorSetBackColor("#"+code);
|
|
||||||
opener.editorFocus(opener.editorPrevSrl);
|
window.close();
|
||||||
self.close();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 색상 클릭시 */
|
/* 색상 클릭시 */
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,11 @@ function applyColor() {
|
||||||
var code = xGetElementById("color_input").value;
|
var code = xGetElementById("color_input").value;
|
||||||
|
|
||||||
opener.editorFocus(opener.editorPrevSrl);
|
opener.editorFocus(opener.editorPrevSrl);
|
||||||
opener.editorSetForeColor("#"+code);
|
|
||||||
|
opener.editorDo("ForeColor", "#"+code, opener.editorPrevSrl);
|
||||||
|
|
||||||
opener.editorFocus(opener.editorPrevSrl);
|
opener.editorFocus(opener.editorPrevSrl);
|
||||||
|
|
||||||
self.close();
|
self.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,6 @@
|
||||||
|
|
||||||
<div id="emoticon_area">
|
<div id="emoticon_area">
|
||||||
<!--@foreach($emoticon_list as $emoticon)-->
|
<!--@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-->
|
<!--@end-->
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,13 @@
|
||||||
function insertImage(obj) {
|
function insertEmoticon(obj) {
|
||||||
if(typeof(opener)=='undefined') return;
|
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);
|
opener.editorFocus(opener.editorPrevSrl);
|
||||||
|
|
||||||
window.close();
|
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 {
|
.editor_area {
|
||||||
width:230px;
|
width:400px;
|
||||||
padding:10px 0px 10px 0px;
|
background-color:#F3F3F3;
|
||||||
text-align:center;
|
text-align:center;
|
||||||
}
|
}
|
||||||
|
|
||||||
#emoticon_area img {
|
.editor_window {
|
||||||
margin:2px;
|
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;
|
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);
|
opener.editorFocus(opener.editorPrevSrl);
|
||||||
|
|
||||||
window.close();
|
window.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
xAddEventListener(window, 'load', setText);
|
||||||
|
|
|
||||||
|
|
@ -321,23 +321,6 @@ function editorChangeFontSize(obj,srl) {
|
||||||
obj.selectedIndex = 0;
|
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) {
|
function editorDoInsertUrl(link, upload_target_srl) {
|
||||||
editorFocus(upload_target_srl);
|
editorFocus(upload_target_srl);
|
||||||
var iframe_obj = editorGetIFrame(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) {
|
function editorInsertQuotation(html) {
|
||||||
if(!html) return;
|
if(!html) return;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue