mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-27 21:32:46 +02:00
updating to HTMLAREA RC1/CVS
This commit is contained in:
parent
5e2f3d67ba
commit
a6febdab71
2
phpgwapi/js/htmlarea/plugins/.directory
Normal file
2
phpgwapi/js/htmlarea/plugins/.directory
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
[URL properties]
|
||||||
|
ViewMode=konq_iconview
|
143
phpgwapi/js/htmlarea/plugins/FullPage/full-page.js
Executable file
143
phpgwapi/js/htmlarea/plugins/FullPage/full-page.js
Executable file
@ -0,0 +1,143 @@
|
|||||||
|
// FullPage Plugin for HTMLArea-3.0
|
||||||
|
// Implementation by Mihai Bazon. Sponsored by http://thycotic.com
|
||||||
|
//
|
||||||
|
// htmlArea v3.0 - Copyright (c) 2002 interactivetools.com, inc.
|
||||||
|
// This notice MUST stay intact for use (see license.txt).
|
||||||
|
//
|
||||||
|
// A free WYSIWYG editor replacement for <textarea> fields.
|
||||||
|
// For full source code and docs, visit http://www.interactivetools.com/
|
||||||
|
//
|
||||||
|
// Version 3.0 developed by Mihai Bazon for InteractiveTools.
|
||||||
|
// http://dynarch.com/mishoo
|
||||||
|
//
|
||||||
|
// $Id$
|
||||||
|
|
||||||
|
function FullPage(editor) {
|
||||||
|
this.editor = editor;
|
||||||
|
|
||||||
|
var cfg = editor.config;
|
||||||
|
cfg.fullPage = true;
|
||||||
|
var tt = FullPage.I18N;
|
||||||
|
var self = this;
|
||||||
|
|
||||||
|
cfg.registerButton("FP-docprop", tt["Document properties"], editor.imgURL("docprop.gif", "FullPage"), false,
|
||||||
|
function(editor, id) {
|
||||||
|
self.buttonPress(editor, id);
|
||||||
|
});
|
||||||
|
|
||||||
|
// add a new line in the toolbar
|
||||||
|
cfg.toolbar[0].splice(0, 0, "separator");
|
||||||
|
cfg.toolbar[0].splice(0, 0, "FP-docprop");
|
||||||
|
};
|
||||||
|
|
||||||
|
FullPage._pluginInfo = {
|
||||||
|
name : "FullPage",
|
||||||
|
version : "1.0",
|
||||||
|
developer : "Mihai Bazon",
|
||||||
|
developer_url : "http://dynarch.com/mishoo/",
|
||||||
|
c_owner : "Mihai Bazon",
|
||||||
|
sponsor : "Thycotic Software Ltd.",
|
||||||
|
sponsor_url : "http://thycotic.com",
|
||||||
|
license : "htmlArea"
|
||||||
|
};
|
||||||
|
|
||||||
|
FullPage.prototype.buttonPress = function(editor, id) {
|
||||||
|
var self = this;
|
||||||
|
switch (id) {
|
||||||
|
case "FP-docprop":
|
||||||
|
var doc = editor._doc;
|
||||||
|
var links = doc.getElementsByTagName("link");
|
||||||
|
var style1 = '';
|
||||||
|
var style2 = '';
|
||||||
|
for (var i = links.length; --i >= 0;) {
|
||||||
|
var link = links[i];
|
||||||
|
if (/stylesheet/i.test(link.rel)) {
|
||||||
|
if (/alternate/i.test(link.rel))
|
||||||
|
style2 = link.href;
|
||||||
|
else
|
||||||
|
style1 = link.href;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var title = doc.getElementsByTagName("title")[0];
|
||||||
|
title = title ? title.innerHTML : '';
|
||||||
|
var init = {
|
||||||
|
f_doctype : editor.doctype,
|
||||||
|
f_title : title,
|
||||||
|
f_body_bgcolor : HTMLArea._colorToRgb(doc.body.style.backgroundColor),
|
||||||
|
f_body_fgcolor : HTMLArea._colorToRgb(doc.body.style.color),
|
||||||
|
f_base_style : style1,
|
||||||
|
f_alt_style : style2,
|
||||||
|
|
||||||
|
editor : editor
|
||||||
|
};
|
||||||
|
editor._popupDialog("plugin://FullPage/docprop", function(params) {
|
||||||
|
self.setDocProp(params);
|
||||||
|
}, init);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
FullPage.prototype.setDocProp = function(params) {
|
||||||
|
var txt = "";
|
||||||
|
var doc = this.editor._doc;
|
||||||
|
var head = doc.getElementsByTagName("head")[0];
|
||||||
|
var links = doc.getElementsByTagName("link");
|
||||||
|
var style1 = null;
|
||||||
|
var style2 = null;
|
||||||
|
for (var i = links.length; --i >= 0;) {
|
||||||
|
var link = links[i];
|
||||||
|
if (/stylesheet/i.test(link.rel)) {
|
||||||
|
if (/alternate/i.test(link.rel))
|
||||||
|
style2 = link;
|
||||||
|
else
|
||||||
|
style1 = link;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function createLink(alt) {
|
||||||
|
var link = doc.createElement("link");
|
||||||
|
link.rel = alt ? "alternate stylesheet" : "stylesheet";
|
||||||
|
head.appendChild(link);
|
||||||
|
return link;
|
||||||
|
};
|
||||||
|
|
||||||
|
if (!style1 && params.f_base_style)
|
||||||
|
style1 = createLink(false);
|
||||||
|
if (params.f_base_style)
|
||||||
|
style1.href = params.f_base_style;
|
||||||
|
else if (style1)
|
||||||
|
head.removeChild(style1);
|
||||||
|
|
||||||
|
if (!style2 && params.f_alt_style)
|
||||||
|
style2 = createLink(true);
|
||||||
|
if (params.f_alt_style)
|
||||||
|
style2.href = params.f_alt_style;
|
||||||
|
else if (style2)
|
||||||
|
head.removeChild(style2);
|
||||||
|
|
||||||
|
for (var i in params) {
|
||||||
|
var val = params[i];
|
||||||
|
switch (i) {
|
||||||
|
case "f_title":
|
||||||
|
var title = doc.getElementsByTagName("title")[0];
|
||||||
|
if (!title) {
|
||||||
|
title = doc.createElement("title");
|
||||||
|
head.appendChild(title);
|
||||||
|
} else while (node = title.lastChild)
|
||||||
|
title.removeChild(node);
|
||||||
|
if (!HTMLArea.is_ie)
|
||||||
|
title.appendChild(doc.createTextNode(val));
|
||||||
|
else
|
||||||
|
doc.title = val;
|
||||||
|
break;
|
||||||
|
case "f_doctype":
|
||||||
|
this.editor.setDoctype(val);
|
||||||
|
break;
|
||||||
|
case "f_body_bgcolor":
|
||||||
|
doc.body.style.backgroundColor = val;
|
||||||
|
break;
|
||||||
|
case "f_body_fgcolor":
|
||||||
|
doc.body.style.color = val;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
89
phpgwapi/js/htmlarea/plugins/FullPage/test.html
Executable file
89
phpgwapi/js/htmlarea/plugins/FullPage/test.html
Executable file
@ -0,0 +1,89 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Test of FullPage plugin</title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<script type="text/javascript">
|
||||||
|
_editor_url = "../../";
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!-- load the main HTMLArea files -->
|
||||||
|
<script type="text/javascript" src="../../htmlarea.js"></script>
|
||||||
|
<script type="text/javascript" src="../../lang/en.js"></script>
|
||||||
|
<script type="text/javascript" src="../../dialog.js"></script>
|
||||||
|
|
||||||
|
<!-- <script type="text/javascript" src="popupdiv.js"></script> -->
|
||||||
|
<script type="text/javascript" src="../../popupwin.js"></script>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
HTMLArea.loadPlugin("TableOperations");
|
||||||
|
HTMLArea.loadPlugin("SpellChecker");
|
||||||
|
HTMLArea.loadPlugin("FullPage");
|
||||||
|
|
||||||
|
function initDocument() {
|
||||||
|
var editor = new HTMLArea("editor");
|
||||||
|
editor.registerPlugin(TableOperations);
|
||||||
|
editor.registerPlugin(SpellChecker);
|
||||||
|
editor.registerPlugin(FullPage);
|
||||||
|
editor.generate();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style type="text/css">
|
||||||
|
@import url(../../htmlarea.css);
|
||||||
|
</style>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body onload="initDocument()">
|
||||||
|
<h1>Test of FullPage plugin</h1>
|
||||||
|
|
||||||
|
<textarea id="editor" style="height: 30em; width: 100%;">
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>FullPage plugin for HTMLArea</title>
|
||||||
|
<link rel="alternate stylesheet" href="http://dynarch.com/mishoo/css/dark.css" />
|
||||||
|
<link rel="stylesheet" href="http://dynarch.com/mishoo/css/cool-light.css" />
|
||||||
|
</head>
|
||||||
|
<body style="background-color: #ddddee; color: #000077;">
|
||||||
|
<table style="width:60%; height: 90%; margin: 2% auto 1% auto;" align="center" border="0" cellpadding="0" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td style="background-color: #ddeedd; border: 2px solid #002; height: 1.5em; padding: 2px; font: bold 24px Verdana;">
|
||||||
|
FullPage plugin
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="background-color: #fff; border: 1px solid #aab; padding: 1em 3em; font: 12px Verdana;">
|
||||||
|
<p>
|
||||||
|
This plugin enables one to edit a full HTML file in <a
|
||||||
|
href="http://dynarch.com/htmlarea/">HTMLArea</a>. This is not
|
||||||
|
normally possible with just the core editor since it only
|
||||||
|
retrieves the HTML inside the <code>body</code> tag.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
It provides the ability to change the <code>DOCTYPE</code> of
|
||||||
|
the document, <code>body</code> <code>bgcolor</code> and
|
||||||
|
<code>fgcolor</code> attributes as well as to add additional
|
||||||
|
<code>link</code>-ed stylesheets. Cool, eh?
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
The development of this plugin was initiated and sponsored by
|
||||||
|
<a href="http://thycotic.com">Thycotic Software Ltd.</a>.
|
||||||
|
That's also cool, isn't it? ;-)
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
</textarea>
|
||||||
|
|
||||||
|
<hr />
|
||||||
|
<address><a href="http://dynarch.com/mishoo/">Mihai Bazon</a></address>
|
||||||
|
<!-- Created: Wed Oct 1 19:55:37 EEST 2003 -->
|
||||||
|
<!-- hhmts start -->
|
||||||
|
Last modified on Sat Oct 25 01:06:59 2003
|
||||||
|
<!-- hhmts end -->
|
||||||
|
<!-- doc-lang: English -->
|
||||||
|
</body>
|
||||||
|
</html>
|
38
phpgwapi/js/htmlarea/plugins/SpellChecker/lang/he.js
Executable file
38
phpgwapi/js/htmlarea/plugins/SpellChecker/lang/he.js
Executable file
@ -0,0 +1,38 @@
|
|||||||
|
// I18N constants
|
||||||
|
|
||||||
|
// LANG: "en", ENCODING: UTF-8 | ISO-8859-1
|
||||||
|
// Author: Mihai Bazon, http://dynarch.com/mishoo
|
||||||
|
|
||||||
|
// FOR TRANSLATORS:
|
||||||
|
//
|
||||||
|
// 1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
|
||||||
|
// (at least a valid email address)
|
||||||
|
//
|
||||||
|
// 2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
|
||||||
|
// (if this is not possible, please include a comment
|
||||||
|
// that states what encoding is necessary.)
|
||||||
|
|
||||||
|
SpellChecker.I18N = {
|
||||||
|
"CONFIRM_LINK_CLICK" : "אנא אשר שברצונך לפתוח קישור זה",
|
||||||
|
"Cancel" : "ביטול",
|
||||||
|
"Dictionary" : "מילון",
|
||||||
|
"Finished list of mispelled words" : "הסתיימה רשימת המילים המאויתות באופן שגוי",
|
||||||
|
"I will open it in a new page." : "אני אפתח את זה בחלון חדש.",
|
||||||
|
"Ignore all" : "התעלם מהכל",
|
||||||
|
"Ignore" : "התעלם",
|
||||||
|
"NO_ERRORS" : "לא נמצאו מילים מאויתות באופן שגוי עם המילון הנבחר.",
|
||||||
|
"NO_ERRORS_CLOSING" : "בדיקת האיות נסתיימה, לא נמצאו מילים מאויתות באופן שגוי. נסגר כעת...",
|
||||||
|
"OK" : "אישור",
|
||||||
|
"Original word" : "המילה המקורית",
|
||||||
|
"Please wait. Calling spell checker." : "אנא המתן. קורא לבודק איות.",
|
||||||
|
"Please wait: changing dictionary to" : "אנא המתן: מחליף מילון ל-",
|
||||||
|
"QUIT_CONFIRMATION" : "זה יבטל את השינויים ויצא מבודק האיות. אנא אשר.",
|
||||||
|
"Re-check" : "בדוק מחדש",
|
||||||
|
"Replace all" : "החלף הכל",
|
||||||
|
"Replace with" : "החלף ב-",
|
||||||
|
"Replace" : "החלף",
|
||||||
|
"Revert" : "החזר שינויים",
|
||||||
|
"SC-spell-check" : "בדיקת איות",
|
||||||
|
"Suggestions" : "הצעות",
|
||||||
|
"pliz weit ;-)" : "ענא המטן ;-)"
|
||||||
|
};
|
39
phpgwapi/js/htmlarea/plugins/tmp.php
Executable file
39
phpgwapi/js/htmlarea/plugins/tmp.php
Executable file
@ -0,0 +1,39 @@
|
|||||||
|
<table border="0" cellspacing="0"
|
||||||
|
cellpadding="0">
|
||||||
|
<?php
|
||||||
|
//Liste des classes thérapeutiques
|
||||||
|
$nomchamp = $_SESSION['activelangue'] .
|
||||||
|
"_dos";
|
||||||
|
$sql = "select * from dossiers_dos
|
||||||
|
where idparent_dos = " . FOLDER_ROOT . " order by " . $nomchamp;
|
||||||
|
$rs_dos =
|
||||||
|
$utilisateur->parent->phptoolbox->DataAccess->Execute($sql);
|
||||||
|
//Il n'y a pas de classes thérapeutiques
|
||||||
|
if ($rs_dos->EOF) { ?>
|
||||||
|
<tr>
|
||||||
|
<td class="sstitre"><?php print
|
||||||
|
$_SESSION['INFOSCOMPTE']['CLASSESTH_EMPTY']; ?></td>
|
||||||
|
<td class="cell"> </td>
|
||||||
|
<td> </td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$tab_usr_dos =
|
||||||
|
$utilisateur->gettabclassessouscrites($currentuser->id_usr);
|
||||||
|
//Affiche les classes thérapeutiques
|
||||||
|
while ($row_dos = $rs_dos->FetchRow()) { ?>
|
||||||
|
<tr>
|
||||||
|
<td class="sstitre"><?php print
|
||||||
|
$row_dos[$nomchamp]; ?></td>
|
||||||
|
<td class="cell"><img
|
||||||
|
src="images/spaceur.gif" width="15" height="1"></td>
|
||||||
|
<td><input name="coches_dos[]"
|
||||||
|
type="checkbox" disabled="true" value="<?php print $row_dos['id_dos'];
|
||||||
|
?>"<?php if (in_array($row_dos['id_dos'],$tab_usr_dos)) print '
|
||||||
|
checked'; ?>>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php }
|
||||||
|
} ?>
|
||||||
|
</table>
|
Loading…
x
Reference in New Issue
Block a user