upgrade xquared to v20071205, remove prototype.js, remove prototype dependencies in editor.html, fix bugs in xquared.js, xquared-min.js, replace xquared.js into xquared-min.js in editor.html

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3160 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
haneul 2007-12-06 02:35:24 +00:00
parent 2f0d39d052
commit b5a09b8fe1
11 changed files with 1127 additions and 4784 deletions

View file

@ -7,8 +7,7 @@
<!-- 기본 js/언어파일 로드 -->
<!--%import("../../tpl/js/editor_common.js")-->
<!--%import("js/prototype.js")-->
<!--%import("js/xquared.js")-->
<!--%import("js/xquared-min.js")-->
<!--%import("js/xe_interface.js")-->
<!-- 에디터 활성화 -->
@ -16,8 +15,8 @@
var auto_saved_msg = "{$lang->msg_auto_saved}";
var xed_{$editor_sequence};
xAddEventListener(window, 'load', function() {
if($("comment_{$editor_sequence}") == null || $("comment_{$editor_sequence}").style.display != 'none'){
editorStart_xq(xed_{$editor_sequence}, $("xqEditor_{$editor_sequence}"), {$editor_sequence}, "{$editor_content_key_name}", "{$editor_height}px", "{$editor_primary_key_name}");
if(document.getElementById("comment_{$editor_sequence}") == null || document.getElementById("comment_{$editor_sequence}").style.display != 'none'){
editorStart_xq(xed_{$editor_sequence}, document.getElementById("xqEditor_{$editor_sequence}"), {$editor_sequence}, "{$editor_content_key_name}", "{$editor_height}px", "{$editor_primary_key_name}");
}});
//]]></script>

View file

@ -4,13 +4,12 @@
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<title>Xquared example - Default</title>
<link rel="stylesheet" type="text/css" href="css/xq_ui.css" />
<script type="text/javascript" src="../js/prototype.js"></script>
<script type="text/javascript" src="../js/xquared.js"></script>
<script type="text/javascript">//<![CDATA[
var xed;
window.onload = function() {
xed = new xq.Editor($("xqEditor"));
xed = new xq.Editor("xqEditor");
xed.setEditMode('wysiwyg');
xed.loadStylesheet("css/xq_contents.css");
xed.focus();

View file

@ -4,13 +4,12 @@
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<title>Xquared example - Extension point</title>
<link rel="stylesheet" type="text/css" href="css/xq_ui.css" />
<script type="text/javascript" src="../js/prototype.js"></script>
<script type="text/javascript" src="../js/xquared.js"></script>
<script type="text/javascript">//<![CDATA[
var xed;
window.onload = function() {
xed = new xq.Editor($("xqEditor"));
xed = new xq.Editor("xqEditor");
xed.setEditMode('wysiwyg');
xed.addShortcuts(getAdditionalShortcuts());
@ -101,11 +100,10 @@
}},
{id:'separator', criteria: /^----*$/, handler: function(xed, rdom, block, text) {
if(rdom.tree.isBlockContainer(block)) block = rdom.wrapAllInlineOrTextNodesAs("P", block, true)[0];
rdom.insertNodeAt(rdom.createElement("HR"), block, "before");
block.innerHTML = "";
block.appendChild(rdom.createElement("HR"));
rdom.selectElement(block);
rdom.collapseSelection();
rdom.placeCaretAtStartOf(block);
return true;
}},
{id:'heading', criteria: /^\=+[^=]*\=+(\&nbsp;)*$/, handler: function(xed, rdom, block, text) {
var textWithoutEqualMarks = text.strip().replace(/=/g, "");

View file

@ -4,13 +4,12 @@
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<title>Xquared example - Form and Textarea</title>
<link rel="stylesheet" type="text/css" href="css/xq_ui.css" />
<script type="text/javascript" src="../js/prototype.js"></script>
<script type="text/javascript" src="../js/xquared.js"></script>
<script type="text/javascript">//<![CDATA[
var xed;
window.onload = function() {
xed = new xq.Editor($("xqEditor"));
xed = new xq.Editor("xqEditor");
xed.setEditMode('wysiwyg');
xed.loadStylesheet("css/xq_contents.css");
xed.focus();

View file

@ -4,13 +4,12 @@
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<title>Xquared example - Custom toolbar 1</title>
<link rel="stylesheet" type="text/css" href="css/xq_ui.css" />
<script type="text/javascript" src="../js/prototype.js"></script>
<script type="text/javascript" src="../js/xquared.js"></script>
<script type="text/javascript">//<![CDATA[
var xed;
window.onload = function() {
xed = new xq.Editor($("xqEditor"));
xed = new xq.Editor("xqEditor");
xed.config.defaultToolbarButtonMap = [
[
{className:"foregroundColor", title:"Foreground color", handler:"xed.handleForegroundColor('red')"},

View file

@ -9,13 +9,12 @@
font-weight: bold;
}
</style>
<script type="text/javascript" src="../js/prototype.js"></script>
<script type="text/javascript" src="../js/xquared.js"></script>
<script type="text/javascript">//<![CDATA[
var xed;
window.onload = function() {
xed = new xq.Editor($("xqEditor"), $("xqToolbarContainer"));
xed = new xq.Editor("xqEditor", "xqToolbarContainer");
xed.setEditMode('wysiwyg');
xed.loadStylesheet("css/xq_contents.css");
xed.focus();

View file

@ -4,13 +4,12 @@
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<title>Xquared example - No toolbar</title>
<link rel="stylesheet" type="text/css" href="css/xq_ui.css" />
<script type="text/javascript" src="../js/prototype.js"></script>
<script type="text/javascript" src="../js/xquared.js"></script>
<script type="text/javascript">//<![CDATA[
var xed;
window.onload = function() {
xed = new xq.Editor($("xqEditor"));
xed = new xq.Editor("xqEditor");
// Turn off default toolbar
xed.config.generateDefaultToolbar = false;

File diff suppressed because it is too large Load diff

View file

@ -30,7 +30,8 @@ function editorGetContent_xq(editor_sequence) {
function editorStart_xq(editor, element, editor_sequence, content_key, editor_height, primary_key) {
editor = new xq.Editor(element);
editor.config.imagePathForDefaultToolbar = request_uri+editor_path.substring(1)+'examples/img/toolbar/';
editor.config.imagePathForDefaultToobar = request_uri+editor_path.substring(2)+'examples/img/toolbar/';
editor.config.imagePathForContent = request_uri+editor_path.substring(2)+'examples/img/content/';
editor.config.allowedAttributes.push('editor_component', 'poll_srl','multimedia_src', 'auto_start', 'link_url', 'editor_sequence', 'use_folder', 'folder_opener', 'folder_closer', 'color', 'border_thickness', 'border_color', 'bg_color', 'border_style', 'margin', 'padding', 'bold', 'nx', 'ny', 'gx', 'gy', 'address', 'reg_sinpic', 'language','align');
editor.config.allowedTags.push('embed', 'param', 'object');
@ -81,7 +82,7 @@ xq.Editor.prototype.insertHTML = function (html) {
this.rdom.insertHtml(html);
}
xq.ui_templates.basicLangSelectDialog='<form action="#" class="xqFormDialog xqBasicLangSelectDialog">\n <div>\n <select name="lang">\n <option value="Php">PHP</option>\n <option value="Css">CSS</option>\n <option value="JScript">Javascript</option>\n <option value="Xml">XML</option>\n <option value="Cpp">C++</option>\n <option value="CSharp">C#</option>\n <option value="Vb">VB</option>\n <option value="Java">Java</option>\n <option value="Delphi">Delphi</option>\n <option value="Python">Python</option>\n <option value="Ruby">Ruby</option>\n <option value="Sql">SQL</option>\n </select>\n <input type="submit" value="Ok" />\n <input type="button" class="cancel" value="Cancel" />\ </div>\n</form>';
xq.ui_templates.basicLangSelectDialog='<form action="#" class="xqFormDialog xqBasicLangSelectDialog">\n <div>\n <select name="lang" class="initialFocus">\n <option value="Php">PHP</option>\n <option value="Css">CSS</option>\n <option value="JScript">Javascript</option>\n <option value="Xml">XML</option>\n <option value="Cpp">C++</option>\n <option value="CSharp">C#</option>\n <option value="Vb">VB</option>\n <option value="Java">Java</option>\n <option value="Delphi">Delphi</option>\n <option value="Python">Python</option>\n <option value="Ruby">Ruby</option>\n <option value="Sql">SQL</option>\n </select>\n <input type="submit" value="Ok" />\n <input type="button" class="cancel" value="Cancel" />\ </div>\n</form>';
xq.Editor.prototype.handleList = function (type, selected) {
if(type == "CODE" && selected == undefined)

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff