Kleinere Bereinigungen im web tree, Entfernen MS editor.htc

git-svn-id: https://svn.libreccm.org/ccm/trunk@136 8810af33-2d31-482b-a856-94f89814c4df
master
pb 2009-04-16 11:06:12 +00:00
parent b675d5f5fb
commit 447a037ec2
28 changed files with 5 additions and 368 deletions

View File

@ -1,326 +0,0 @@
<public:component tagname="editor" literalcontent="true">
<public:attach event="oncontentready" onevent="initEditor()"/>
<public:attach event="ondocumentready" onevent="initForm()"/>
<public:property name="editText" put="setEditText" get="getEditText"/>
</public:component>
<style>
.tool { border-width: 2px;
border-style: solid;
border-color: #DDDDDD;
font-family: Verdana,Arial;
font-weight: bold;
font-size: 12px;
}
.toggle {
font-family: Arial;
font-weight: bold;
font-size: 12px;
}
.editorWidget {
height:200;
width:100%;
border:1px solid black;
padding:4px;
}
</style>
<script>
element.style.display = "block";
var editTextFormElement;
var isVisual = true;
function initEditor() {
for (i = 0; i < document.all.length; i++) {
document.all(i).unselectable = "on";
}
visualEditor.unselectable = "off";
visualEditor.innerHTML = element.innerHTML;
for (i = 0; i < visualEditorPanel.all.length; i++) {
if (visualEditorPanel.all(i).removeAttribute)
visualEditorPanel.all(i).removeAttribute("unselectable", 0);
}
sourceEditor.unselectable = "off";
sourceEditor.innerText = element.innerHTML;
defaults.viewLink = document;
}
// binds the editor to its containing form
function initForm() {
// find the form that contains the HTML editor
var editorForm = element.parentElement;
while (editorForm != null && editorForm.tagName != "FORM") {
editorForm = editorForm.parentElement;
}
if (editorForm == null) {
alert("Error initializing the HTML editor: " +
"it must be contained in a form.");
return;
}
// add a hidden form element to submit the text from the editor
editTextFormElement = element.document.createElement(
"<input type=hidden name=" + element.name + ">");
editorForm.appendChild(editTextFormElement);
// add an event handler to set the hiddent form element before
// the form is submitted
editorForm.attachEvent("onsubmit", setFormValue);
}
// sets the form value on submission
function setFormValue() {
editTextFormElement.value = getEditText();
}
// sets the public editText property
function setEditText(editText) {
visualEditor.innerHTML = editText;
sourceEditor.innerText = editText;
}
// gets the public editText property
function getEditText() {
return (isVisual) ? visualEditor.innerHTML : sourceEditor.innerText;
}
function toggleEditor() {
if (isVisual) {
sourceEditor.innerText = visualEditor.innerHTML;
visualEditorPanel.style.display="none";
sourceEditorPanel.style.display="block";
sourceEditorPanel.focus();
isVisual = false;
} else {
visualEditor.innerHTML = sourceEditor.innerText;
sourceEditorPanel.style.display="none";
visualEditorPanel.style.display="block";
visualEditorPanel.focus();
isVisual = true;
}
}
function toolOver() {
window.event.srcElement.style.borderStyle = "outset";
}
function toolOut() {
window.event.srcElement.style.borderStyle = "solid";
}
function toolDown(command, display, param) {
document.execCommand(command, display, param);
window.event.srcElement.style.borderStyle = "solid";
}
function applyFormat(command, display, param) {
document.execCommand(command, display, param);
window.event.srcElement.style.borderStyle = "inset";
}
function formatOut(command) {
if (document.queryCommandState(command)) {
window.event.srcElement.style.borderStyle = "inset";
} else {
window.event.srcElement.style.borderStyle = "solid";
}
}
function link(command, display, param) {
range = document.selection.createRange();
if (range.htmlText == "") {
alert("Please select some text before creating a hyperlink.");
return;
}
document.execCommand(command, display, param);
document.selection.empty();
alert("Hyperlink created.");
// window.event.srcElement.style.borderStyle = "solid";
}
function updateFormatTools() {
boldTool.style.borderStyle = document.queryCommandState("Bold") ? "inset" : "solid";
italicTool.style.borderStyle = document.queryCommandState("Italic") ? "inset" : "solid";
underlineTool.style.borderStyle = document.queryCommandState("Underline") ? "inset" : "solid";
}
function cancelEvent() {
event.returnValue = false;
event.cancelBubble = true;
}
</script>
<body>
<!-- Begin VISUAL part -->
<table id="visualEditorPanel"
cellpadding="2" bgcolor="#DDDDDD" width="100%" border="1">
<tr><td>
<!-- Begin toolbar -->
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td><table border="0" cellspacing="0" cellpadding="2"><tr>
<td unselectable="on"><img class="tool" unselectable="on"
src="/assets/editoricons/Cut24.gif" height="24"
width="24" onmouseover="toolOver()" onmouseout="toolOut()"
onmousedown='toolDown("Cut", false, "")' alt="Cut" /></td>
<td><img class="tool"
src="/assets/editoricons/Copy24.gif" height="24"
width="24" onmouseover="toolOver()" onmouseout="toolOut()"
onmousedown='toolDown("Copy", false, "")' alt="Copy" /></td>
<td><img class="tool"
src="/assets/editoricons/Paste24.gif" height="24"
width="24" onmouseover="toolOver()" onmouseout="toolOut()"
onmousedown='toolDown("Paste", false, clipboardData.getData("Text"))'
alt="Paste" /></td>
<td>&nbsp;&nbsp;</td>
<td><img name="bold" id="boldTool" class="tool"
src="/assets/editoricons/Bold24.gif"
height="24" width="24" onmouseover="toolOver()"
onmouseout='formatOut("Bold")'
onmousedown='applyFormat("Bold", false, "")' alt="Bold" /></td>
<td><img name="italic" id="italicTool" class="tool"
src="/assets/editoricons/Italic24.gif"
height="24" width="24" onmouseover="toolOver()"
onmouseout='formatOut("Italic")'
onmousedown='applyFormat("Italic", false, "")'
alt="Italic" /></td>
<td><img name="underline" id="underlineTool" class="tool"
src="/assets/editoricons/Underline24.gif"
height="24" width="24" onmouseover="toolOver()"
onmouseout='formatOut("Underline")'
onmousedown='applyFormat("Underline", false, "")'
alt="Underline" /></td>
<td>&nbsp;&nbsp;</td>
<td><img class="tool" height="24"
src="/assets/editoricons/Outdent24.gif"
width="24" onmouseover="toolOver()" onmouseout='toolOut()'
onmousedown='applyFormat("Outdent", false, "")' alt="Outdent" /></td>
<td><img class="tool" height="24"
src="/assets/editoricons/Indent24.gif"
width="24" onmouseover="toolOver()" onmouseout='toolOut()'
onmousedown='applyFormat("Indent", false, "")' alt="Indent" /></td>
<td>&nbsp;&nbsp;</td>
<td><img class="tool" height="24" width="24"
src="/assets/editoricons/UnorderedList24.gif"
onmouseover="toolOver()" onmouseout='toolOut()'
onmousedown='applyFormat("InsertUnorderedList", false, "")'
alt="Unordered List" /></td>
<td><img class="tool" height="24" width="24"
src="/assets/editoricons/OrderedList24.gif"
onmouseover="toolOver()" onmouseout='toolOut()'
onmousedown='applyFormat("InsertOrderedList", false, "")'
alt="Ordered List" /></td>
<td>&nbsp;&nbsp;</td>
<td><img class="tool" height="24" width="24"
src="/assets/editoricons/Bookmarks24.gif"
onmouseover="toolOver()" onmouseout="toolOut()"
onmousedown='link("CreateLink", true, "")'
alt="Create Link" /></td>
</tr></table></td><td align="center"><button class="toggle"
onclick='toggleEditor()'>Edit Source</button></td>
</tr>
<!-- End toolbar -->
<tr>
<td colspan="2" bgcolor="white"><div class="editorWidget"
id="visualEditor" contenteditable="true" onclick="updateFormatTools()"></div></td>
</tr>
</table>
</td></tr>
</table>
<!-- End visual editor -->
<!-- Begin source part -->
<table id="sourceEditorPanel" bgcolor="#DDDDDD" width="100%" border="1"
cellpadding="2" style="display:none">
<tr><td>
<!-- Begin toolbar -->
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td><table border="0" cellspacing="0" cellpadding="2"><tr>
<td height="24" width="24"><img class="tool" height="24" width="24"
src="/assets/editoricons/blank.gif" /></td>
<td height="24" width="24"><img class="tool" height="24" width="24"
src="/assets/editoricons/blank.gif" /></td>
<td height="24" width="24"><img class="tool" height="24" width="24"
src="/assets/editoricons/blank.gif" /></td>
<td>&nbsp;&nbsp;</td>
<td height="24" width="24"><img class="tool" height="24" width="24"
src="/assets/editoricons/blank.gif" /></td>
<td height="24" width="24"><img class="tool" height="24" width="24"
src="/assets/editoricons/blank.gif" /></td>
<td height="24" width="24"><img class="tool" height="24" width="24"
src="/assets/editoricons/blank.gif" /></td>
<td>&nbsp;&nbsp;</td>
<td height="24" width="24"><img class="tool" height="24" width="24"
src="/assets/editoricons/blank.gif" /></td>
<td height="24" width="24"><img class="tool" height="24" width="24"
src="/assets/editoricons/blank.gif" /></td>
<td>&nbsp;&nbsp;</td>
<td height="24" width="24"><img class="tool" height="24" width="24"
src="/assets/editoricons/blank.gif" /></td>
<td height="24" width="24"><img class="tool" height="24" width="24"
src="/assets/editoricons/blank.gif" /></td>
<td>&nbsp;&nbsp;</td>
<td height="24" width="24"><img class="tool" height="24" width="24"
src="/assets/editoricons/blank.gif" /></td>
</tr></table></td><td align="center"><button class="toggle"
onclick='toggleEditor()'>Edit Display</button></td>
</tr>
<!-- End toolbar -->
<tr>
<td colspan="2" bgcolor="white">
<textarea class="editorWidget" id="sourceEditor"></textarea>
</td>
</tr>
</table>
</td></tr>
</table>
<!-- End source part -->
</body>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 188 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 283 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 682 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 279 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 180 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 279 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 374 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 193 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 836 B

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 244 B

After

Width:  |  Height:  |  Size: 244 B

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 132 B

After

Width:  |  Height:  |  Size: 132 B

View File

Before

Width:  |  Height:  |  Size: 132 B

After

Width:  |  Height:  |  Size: 132 B

View File

Before

Width:  |  Height:  |  Size: 631 B

After

Width:  |  Height:  |  Size: 631 B

View File

Before

Width:  |  Height:  |  Size: 524 B

After

Width:  |  Height:  |  Size: 524 B

View File

Before

Width:  |  Height:  |  Size: 624 B

After

Width:  |  Height:  |  Size: 624 B

View File

Before

Width:  |  Height:  |  Size: 58 B

After

Width:  |  Height:  |  Size: 58 B

View File

Before

Width:  |  Height:  |  Size: 53 B

After

Width:  |  Height:  |  Size: 53 B

View File

@ -114,7 +114,7 @@
<td class="split_pane_left_item_selected" nowrap="1">
<xsl:apply-templates/><xsl:text>&#160;</xsl:text><img border="0" height="9" width="5">
<xsl:attribute name="src">
<xsl:value-of select="//@assets"/>/assets/arrow-right.gif</xsl:attribute>
<xsl:value-of select="//@assets"/>/assets/images/arrow-right.gif</xsl:attribute>
</img>
</td>
</tr>

View File

@ -1,36 +0,0 @@
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html" indent="yes"/>
<xsl:template match="bebop:deditor"
xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
xmlns:deditor="http://www.arsdigita.com/deditor/1.0">
<xsl:variable name="submissionname" select="@name"/>
<xsl:choose>
<xsl:when test="@isIE55='true'">
<xsl:processing-instruction name="import">
<xsl:text>namespace="deditor" implementation="/assets/editor.htc"</xsl:text>
</xsl:processing-instruction>
<deditor:editor name="{$submissionname}">
<xsl:value-of select="bebop:textcontent" disable-output-escaping="yes"/>
</deditor:editor>
</xsl:when>
<xsl:otherwise>
<textarea>
<xsl:for-each select="@*[not(name()='value')]">
<xsl:attribute name="{name()}">
<xsl:value-of select="."/>
</xsl:attribute>
</xsl:for-each>
<xsl:value-of select="bebop:textcontent" disable-output-escaping="yes"/>
</textarea>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>

View File

@ -40,7 +40,7 @@
<xsl:otherwise>
<a href="{@href_no_javascript}">
<img src="{$root-context-prefix}/assets/action-generic.png" border="0" width="14" height="14">
<img src="{$root-context-prefix}/assets/images/action-generic.png" border="0" width="14" height="14">
<xsl:attribute name="alt">
<xsl:apply-templates/>
</xsl:attribute>
@ -68,7 +68,7 @@
<xsl:otherwise>
<a href="{@href_no_javascript}">
<img src="{$root-context-prefix}/assets/action-generic.png" border="0" width="14" height="14">
<img src="{$root-context-prefix}/assets/images/action-generic.png" border="0" width="14" height="14">
<xsl:attribute name="alt">
<xsl:apply-templates/>
</xsl:attribute>
@ -135,7 +135,7 @@
<![CDATA[ <!-- begin script ]]>
<!-- This is ugly, but I need the whole output on one line =p -->
<![CDATA[ document.write(']]><a href="{@href}" onclick="{@onclick}"><img src="{$root-context-prefix}/assets/action-generic.png" border="0" width="14" height="14"><xsl:attribute name="alt"><xsl:apply-templates mode="javascript-mode"/></xsl:attribute></img><![CDATA[')]]>
<![CDATA[ document.write(']]><a href="{@href}" onclick="{@onclick}"><img src="{$root-context-prefix}/assets/images/action-generic.png" border="0" width="14" height="14"><xsl:attribute name="alt"><xsl:apply-templates mode="javascript-mode"/></xsl:attribute></img><![CDATA[')]]>
<![CDATA[ document.write(']]></a><![CDATA[')]]>
<![CDATA[ // end script --> ]]>
</script>
@ -148,7 +148,7 @@
</script>
<a href="{@href_no_javascript}">
<img src="{$root-context-prefix}/assets/action-generic.png" border="0" width="14" height="14">
<img src="{$root-context-prefix}/assets/images/action-generic.png" border="0" width="14" height="14">
<xsl:attribute name="alt">
<xsl:apply-templates/>
</xsl:attribute>

View File

@ -36,7 +36,6 @@ files with xsl.import. This stylesheet is locale-independent.
<xsl:import href="TextArea.xsl"/>
<xsl:import href="DHTMLEditor.xsl"/>
<xsl:import href="FCKEditor.xsl"/>
<xsl:import href="Deditor.xsl"/>
<xsl:import href="Tree.xsl"/>
<xsl:import href="Widget.xsl"/>
<xsl:import href="SegmentedPanel.xsl"/>