Revision 1030
Added by Matthias over 16 years ago
| trunk/CHANGELOG | ||
|---|---|---|
| 11 | 11 |
! = Update/Change |
| 12 | 12 |
|
| 13 | 13 |
------------------------------------- 2.8.0 ------------------------------------- |
| 14 |
04-July-2009 Matthias Gallas |
|
| 15 |
+ Added Droplets plugin to FCKEditor (ticket #737) (Big Thanks to vizmotion) |
|
| 14 | 16 |
03-July-2009 Matthias Gallas |
| 15 | 17 |
+ Fixed IE Bug in Wrapper modul (ticket #736) |
| 16 | 18 |
03-July-2009 Ruud Eisinga |
| trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBDroplets/fckwbdroplets.css | ||
|---|---|---|
| 1 |
#fckComment a, #fckComment a:visited {
|
|
| 2 |
position: relative; |
|
| 3 |
text-decoration: none; |
|
| 4 |
border: 0; |
|
| 5 |
} |
|
| 6 |
|
|
| 7 |
#fckComment a span {
|
|
| 8 |
display:none; |
|
| 9 |
} |
|
| 10 |
|
|
| 11 |
#fckComment a:hover {
|
|
| 12 |
color: #d00; |
|
| 13 |
border: 0px solid #fff; |
|
| 14 |
} |
|
| 15 |
|
|
| 16 |
#fckComment a img {
|
|
| 17 |
border: 0; |
|
| 18 |
height: 20px; |
|
| 19 |
width: 20px; |
|
| 20 |
} |
|
| 21 |
|
|
| 22 |
#fckComment a:hover span {
|
|
| 23 |
text-align:left; |
|
| 24 |
display:block; |
|
| 25 |
border:1px solid #CCCCCC; |
|
| 26 |
position: absolute; |
|
| 27 |
top: 0px; |
|
| 28 |
left: 20px; |
|
| 29 |
width: 300px; |
|
| 30 |
padding:5px; |
|
| 31 |
color:#000000; |
|
| 32 |
background-color:#FFFFCC; |
|
| 33 |
opacity: 0.8; |
|
| 34 |
filter:alpha(opacity=80); |
|
| 35 |
} |
|
| 0 | 36 | |
| trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBDroplets/lang/de.js | ||
|---|---|---|
| 1 |
FCKLang.WBDropletsBtn = 'WB Droplets einf\u00fcgen' ; |
|
| 2 |
FCKLang.WBDropletsDlgTitle = 'WB Droplets' ; |
|
| 3 |
FCKLang.WBDropletsDlgName = 'Website Baker Droplet einf\u00fcgen' ; |
|
| 4 |
FCKLang.WBDropletsErrPageSelect = 'Bitte eine Droplet markieren, das eingef\u00fcgt werden soll!' ; |
|
| 5 |
FCKLang.WBDropletslblPageSelection = 'Auswahlfenster der m\u00f6glichen Droplets:'; |
|
| 6 |
FCKLang.WBDropletslblTitle = 'Titel:'; |
|
| 0 | 7 | |
| trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBDroplets/lang/nl.js | ||
|---|---|---|
| 1 |
FCKLang.WBDropletsBtn = 'WB droplets toevoegen' ; |
|
| 2 |
FCKLang.WBDropletsDlgTitle = 'WB droplets' ; |
|
| 3 |
FCKLang.WBDropletsDlgName = 'Website Baker droplet toevoegen' ; |
|
| 4 |
FCKLang.WBDropletsErrPageSelect = 'Eerst een droplet selecteren' ; |
|
| 5 |
FCKLang.WBDropletslblPageSelection = 'Selecteer een droplet:'; |
|
| 6 |
FCKLang.WBDropletslblTitle = 'Titel'; |
|
| 0 | 7 | |
| trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBDroplets/lang/en.js | ||
|---|---|---|
| 1 |
FCKLang.WBDropletsBtn = 'Insert WB Droplets into page' ; |
|
| 2 |
FCKLang.WBDropletsDlgTitle = 'WB Droplets' ; |
|
| 3 |
FCKLang.WBDropletsDlgName = 'Website Baker droplet insert' ; |
|
| 4 |
FCKLang.WBDropletsErrPageSelect = 'Please select a Droplet to insert on page' ; |
|
| 5 |
FCKLang.WBDropletslblPageSelection = 'Select a Droplet to insert on page:'; |
|
| 6 |
FCKLang.WBDropletslblTitle = 'Title'; |
|
| 0 | 7 | |
| trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBDroplets/lang/index.php | ||
|---|---|---|
| 1 |
<?php |
|
| 2 |
|
|
| 3 |
// $Id$ |
|
| 4 |
|
|
| 5 |
/* |
|
| 6 |
|
|
| 7 |
Website Baker Project <http://www.websitebaker.org/> |
|
| 8 |
Copyright (C) 2004-2009, Ryan Djurovich |
|
| 9 |
|
|
| 10 |
Website Baker is free software; you can redistribute it and/or modify |
|
| 11 |
it under the terms of the GNU General Public License as published by |
|
| 12 |
the Free Software Foundation; either version 2 of the License, or |
|
| 13 |
(at your option) any later version. |
|
| 14 |
|
|
| 15 |
Website Baker is distributed in the hope that it will be useful, |
|
| 16 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 17 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 18 |
GNU General Public License for more details. |
|
| 19 |
|
|
| 20 |
You should have received a copy of the GNU General Public License |
|
| 21 |
along with Website Baker; if not, write to the Free Software |
|
| 22 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
| 23 |
|
|
| 24 |
*/ |
|
| 25 |
|
|
| 26 |
header("Location: ../../../../../../../index.php");
|
|
| 27 |
|
|
| 28 |
?> |
|
| 0 | 29 | |
| trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBDroplets/wbdroplets.htt | ||
|---|---|---|
| 1 |
<!-- BEGIN main_block --> |
|
| 2 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
|
| 3 |
<html> |
|
| 4 |
<head> |
|
| 5 |
<title>WB Link - Insert Website Baker Droplet</title> |
|
| 6 |
<meta http-equiv="Content-Type" content="text/html; charset={CHARSET}">
|
|
| 7 |
<meta content="noindex, nofollow" name="robots"> |
|
| 8 |
<script type="text/javascript" src="fckwbdroplets.js"></script> |
|
| 9 |
<script type="text/javascript"> |
|
| 10 |
<!-- |
|
| 11 |
var oEditor = window.parent.InnerDialogLoaded(); |
|
| 12 |
var FCK = oEditor.FCK; |
|
| 13 |
var FCKLang = oEditor.FCKLang ; |
|
| 14 |
var FCKConfig = oEditor.FCKConfig ; |
|
| 15 |
//var FCKCMSCCMSModules = oEditor.FCKCMSModules; |
|
| 16 |
|
|
| 17 |
// oLink: The actual selected link in the editor. |
|
| 18 |
var oLink = FCK.Selection.MoveToAncestorNode( 'A' ) ; |
|
| 19 |
if ( oLink ) |
|
| 20 |
FCK.Selection.SelectNode( oLink ) ; |
|
| 21 |
|
|
| 22 |
window.onload = function () {
|
|
| 23 |
// First of all, translates the dialog box texts. |
|
| 24 |
oEditor.FCKLanguageManager.TranslatePage(document); |
|
| 25 |
|
|
| 26 |
window.parent.SetOkButton( true ); //Show the "Ok" button. |
|
| 27 |
|
|
| 28 |
} |
|
| 29 |
|
|
| 30 |
//If an anchor (A) object is currently selected, load the properties into the dialog |
|
| 31 |
function LoadSelected() {
|
|
| 32 |
var sSelected; |
|
| 33 |
|
|
| 34 |
if ( oEditor.FCKBrowserInfo.IsGecko ) {
|
|
| 35 |
sSelected = FCK.EditorWindow.getSelection(); |
|
| 36 |
} else {
|
|
| 37 |
sSelected = FCK.EditorDocument.selection.createRange().text; |
|
| 38 |
} |
|
| 39 |
|
|
| 40 |
|
|
| 41 |
} |
|
| 42 |
|
|
| 43 |
//Code that runs after the OK button is clicked |
|
| 44 |
function Ok() {
|
|
| 45 |
//Validate is option is selected |
|
| 46 |
var oPageList = document.getElementById( 'cmbPages' ) ; |
|
| 47 |
if(oPageList.selectedIndex == -1) {
|
|
| 48 |
alert( FCKLang.WBDropletsErrPageSelect ); |
|
| 49 |
return false; |
|
| 50 |
} |
|
| 51 |
|
|
| 52 |
var oTagLink = document.getElementById( 'chkTaglink' ); |
|
| 53 |
|
|
| 54 |
var sPageId = oPageList[oPageList.selectedIndex].value; |
|
| 55 |
FCK.InsertHtml("[[" + sPageId + "]]");
|
|
| 56 |
// the following line was commented out as it creates an error message in some browser (e.g. IE) |
|
| 57 |
// even Firefox seems not to make use of the title so we remove this option for know (doc) |
|
| 58 |
// SetAttribute( oLink, 'title', document.getElementById( 'txtTitle' ).value ) ; |
|
| 59 |
return true; |
|
| 60 |
|
|
| 61 |
} |
|
| 62 |
var oldid = 'LoginBox'; |
|
| 63 |
function showdetail(obj) {
|
|
| 64 |
var olditem = document.getElementById(oldid); |
|
| 65 |
var newitem = document.getElementById(obj.value); |
|
| 66 |
olditem.className='hidden'; |
|
| 67 |
newitem.className='unhidden'; |
|
| 68 |
oldid = obj.value; |
|
| 69 |
} |
|
| 70 |
//--> |
|
| 71 |
</script> |
|
| 72 |
<style> |
|
| 73 |
.hidden { display: none; }
|
|
| 74 |
.unhidden { display: block; }
|
|
| 75 |
</style> |
|
| 76 |
</head> |
|
| 77 |
|
|
| 78 |
<body scroll="yes" > |
|
| 79 |
<table height="100%" cellSpacing="0" cellPadding="0" width="100%" border="0"> |
|
| 80 |
<tr> |
|
| 81 |
<td> |
|
| 82 |
<table width="100%"> |
|
| 83 |
<tr> |
|
| 84 |
<td colspan="2"><span fckLang="WBDropletslblPageSelection">Select a Droplet to insert on page:</span> </td> |
|
| 85 |
</tr> |
|
| 86 |
<tr> |
|
| 87 |
<td colspan="2"> |
|
| 88 |
<select id="cmbPages" style="WIDTH: 100%" size="10" name="cmbPages" onchange="javascript:showdetail(this);" > |
|
| 89 |
<!-- BEGIN page_list_block --> |
|
| 90 |
<option value="{TITLE}"{SELECTED}>{TITLE}</option>
|
|
| 91 |
<!-- END page_list_block --> |
|
| 92 |
</select> |
|
| 93 |
</td> |
|
| 94 |
</tr> |
|
| 95 |
</table> |
|
| 96 |
{LIST}
|
|
| 97 |
</td> |
|
| 98 |
</tr> |
|
| 99 |
</table> |
|
| 100 |
|
|
| 101 |
</body> |
|
| 102 |
</html> |
|
| 103 |
<!-- END main_block --> |
|
| 0 | 104 | |
| trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBDroplets/fckwbdroplets.js | ||
|---|---|---|
| 1 |
// Function to set special attributes. Copied from FCK Core function |
|
| 2 |
function SetAttribute( element, attName, attValue ) |
|
| 3 |
{
|
|
| 4 |
if ( attValue == null || attValue.length == 0 ) |
|
| 5 |
element.removeAttribute( attName, 0 ) ; // 0 : Case Insensitive |
|
| 6 |
else |
|
| 7 |
element.setAttribute( attName, attValue, 0 ) ; // 0 : Case Insensitive |
|
| 8 |
} |
|
| 0 | 9 | |
| trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBDroplets/fckplugin.js | ||
|---|---|---|
| 1 |
/* |
|
| 2 |
* FCKPlugin.js |
|
| 3 |
* ------------ |
|
| 4 |
* This is a generic file which is needed for plugins that are developed |
|
| 5 |
* for FCKEditor. With the below statements that toolbar is created and |
|
| 6 |
* several options are being activated. |
|
| 7 |
* |
|
| 8 |
* See the online documentation for more information: |
|
| 9 |
* http://wiki.fckeditor.net/ |
|
| 10 |
*/ |
|
| 11 |
|
|
| 12 |
// Register the related commands. |
|
| 13 |
FCKCommands.RegisterCommand( |
|
| 14 |
'WBDroplets', |
|
| 15 |
new FCKDialogCommand( |
|
| 16 |
'WBDroplets', |
|
| 17 |
FCKLang["WBDropletsDlgTitle"], |
|
| 18 |
FCKPlugins.Items['WBDroplets'].Path + 'fck_wbdroplets.php', |
|
| 19 |
370, |
|
| 20 |
370 |
|
| 21 |
) |
|
| 22 |
); |
|
| 23 |
|
|
| 24 |
// Create the "WBModules" toolbar button. |
|
| 25 |
// FCKToolbarButton( commandName, label, tooltip, style, sourceView, contextSensitive ) |
|
| 26 |
var oWBModulesItem = new FCKToolbarButton( 'WBDroplets', FCKLang["WBDropletsBtn"], null, null, false, true ); |
|
| 27 |
oWBModulesItem.IconPath = FCKConfig.PluginsPath + 'WBDroplets/wbdroplets.gif'; |
|
| 28 |
|
|
| 29 |
// 'CMSContent' is the name that is used in the toolbar config. |
|
| 30 |
FCKToolbarItems.RegisterItem( 'WBDroplets', oWBModulesItem ); |
|
| 0 | 31 | |
| trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBDroplets/index.php | ||
|---|---|---|
| 1 |
<?php |
|
| 2 |
|
|
| 3 |
// $Id$ |
|
| 4 |
|
|
| 5 |
/* |
|
| 6 |
|
|
| 7 |
Website Baker Project <http://www.websitebaker.org/> |
|
| 8 |
Copyright (C) 2004-2009, Ryan Djurovich |
|
| 9 |
|
|
| 10 |
Website Baker is free software; you can redistribute it and/or modify |
|
| 11 |
it under the terms of the GNU General Public License as published by |
|
| 12 |
the Free Software Foundation; either version 2 of the License, or |
|
| 13 |
(at your option) any later version. |
|
| 14 |
|
|
| 15 |
Website Baker is distributed in the hope that it will be useful, |
|
| 16 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 17 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 18 |
GNU General Public License for more details. |
|
| 19 |
|
|
| 20 |
You should have received a copy of the GNU General Public License |
|
| 21 |
along with Website Baker; if not, write to the Free Software |
|
| 22 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
| 23 |
|
|
| 24 |
*/ |
|
| 25 |
|
|
| 26 |
header("Location: ../../../../../../index.php");
|
|
| 27 |
|
|
| 28 |
?> |
|
| 0 | 29 | |
| trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBDroplets/fck_wbdroplets.php | ||
|---|---|---|
| 1 |
<?php |
|
| 2 |
|
|
| 3 |
// $Id$ |
|
| 4 |
|
|
| 5 |
/* |
|
| 6 |
|
|
| 7 |
Website Baker Project <http://www.websitebaker.org/> |
|
| 8 |
Copyright (C) 2004-2009, Ryan Djurovich |
|
| 9 |
|
|
| 10 |
Website Baker is free software; you can redistribute it and/or modify |
|
| 11 |
it under the terms of the GNU General Public License as published by |
|
| 12 |
the Free Software Foundation; either version 2 of the License, or |
|
| 13 |
(at your option) any later version. |
|
| 14 |
|
|
| 15 |
Website Baker is distributed in the hope that it will be useful, |
|
| 16 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 17 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 18 |
GNU General Public License for more details. |
|
| 19 |
|
|
| 20 |
You should have received a copy of the GNU General Public License |
|
| 21 |
along with Website Baker; if not, write to the Free Software |
|
| 22 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
| 23 |
|
|
| 24 |
*/ |
|
| 25 |
|
|
| 26 |
// Include the config file |
|
| 27 |
require('../../../../../../config.php');
|
|
| 28 |
|
|
| 29 |
// Create new admin object |
|
| 30 |
require(WB_PATH.'/framework/class.admin.php'); |
|
| 31 |
$admin = new admin('Pages', 'pages_modify', false);
|
|
| 32 |
|
|
| 33 |
// Setup the template |
|
| 34 |
$template = new Template(WB_PATH.'/modules/fckeditor/fckeditor/editor/plugins/WBDroplets'); |
|
| 35 |
$template->set_file('page', 'wbdroplets.htt');
|
|
| 36 |
$template->set_block('page', 'main_block', 'main');
|
|
| 37 |
|
|
| 38 |
// Get pages and put them into the pages list |
|
| 39 |
$template->set_block('main_block', 'page_list_block', 'page_list');
|
|
| 40 |
$database = new database(); |
|
| 41 |
$get_droplet = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_droplets where active=1 ORDER BY name");
|
|
| 42 |
if($get_droplet->numRows() > 0) {
|
|
| 43 |
// Loop through pages |
|
| 44 |
while($droplet = $get_droplet->fetchRow()) {
|
|
| 45 |
// method page_is_visible was introduced with WB 2.7 |
|
| 46 |
$title = stripslashes($droplet['name']); |
|
| 47 |
$desc = stripslashes($droplet['description']); |
|
| 48 |
$comm = stripslashes($droplet['comments']); |
|
| 49 |
$template->set_var('TITLE', $title);
|
|
| 50 |
$template->set_var('DESC', $desc);
|
|
| 51 |
$list .= "<div id=$title class=hidden><b>$title: </b> $desc<br>$comm</div>"; |
|
| 52 |
$template->parse('page_list', 'page_list_block', true);
|
|
| 53 |
} |
|
| 54 |
} else {
|
|
| 55 |
$template->set_var('TITLE', 'None found');
|
|
| 56 |
$template->parse('page_list', 'page_list_block', false);
|
|
| 57 |
} |
|
| 58 |
$template->set_var('LIST', $list);
|
|
| 59 |
|
|
| 60 |
// Parse the template object |
|
| 61 |
$template->parse('main', 'main_block', false);
|
|
| 62 |
$template->pparse('output', 'page');
|
|
| 63 |
|
|
| 64 |
?> |
|
| 0 | 65 | |
| trunk/wb/modules/fckeditor/wb_config/wb_fckconfig.js | ||
|---|---|---|
| 16 | 16 |
|
| 17 | 17 |
// required settings to make FCKEditor work with Website Baker (do not change them) |
| 18 | 18 |
FCKConfig.Plugins.Add( 'WBModules', 'en,nl,de' ) ; |
| 19 |
FCKConfig.Plugins.Add( 'WBDroplets', 'en,nl,de' ) ; |
|
| 19 | 20 |
|
| 20 | 21 |
// ######################################################################################### |
| 21 | 22 |
// # FCKEditor: General settings |
| ... | ... | |
| 67 | 68 |
['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'], |
| 68 | 69 |
['OrderedList','UnorderedList','-','Outdent','Indent'], |
| 69 | 70 |
['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'], |
| 70 |
['WBModules','Link','Unlink','Anchor'], |
|
| 71 |
['WBDroplets','WBModules','Link','Unlink','Anchor'],
|
|
| 71 | 72 |
['Image','Flash','Table','Rule'], |
| 72 | 73 |
'/', |
| 73 | 74 |
['Style','FontFormat','FontName','FontSize'], |
Also available in: Unified diff
Added Droplets plugin to FCKEditor (ticket #737) (Big Thanks to vizmotion)