Index: trunk/CHANGELOG
===================================================================
--- trunk/CHANGELOG	(revision 1029)
+++ trunk/CHANGELOG	(revision 1030)
@@ -11,6 +11,8 @@
 ! = Update/Change
 
 ------------------------------------- 2.8.0 -------------------------------------
+04-July-2009 Matthias Gallas
++	Added Droplets plugin to FCKEditor (ticket #737) (Big Thanks to vizmotion)
 03-July-2009 Matthias Gallas
 +	Fixed IE Bug in Wrapper modul (ticket #736)
 03-July-2009 Ruud Eisinga
Index: trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBDroplets/fckwbdroplets.css
===================================================================
--- trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBDroplets/fckwbdroplets.css	(nonexistent)
+++ trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBDroplets/fckwbdroplets.css	(revision 1030)
@@ -0,0 +1,35 @@
+#fckComment a, #fckComment a:visited {
+	position: relative;
+	text-decoration: none;
+	border: 0;
+}
+
+#fckComment a span {
+	display:none;
+}
+
+#fckComment a:hover {
+	color: #d00;
+	border: 0px solid #fff;
+}
+
+#fckComment a img {	
+	border: 0;
+	height: 20px;
+	width: 20px;
+}
+
+#fckComment a:hover span {
+	text-align:left;	
+	display:block;
+	border:1px solid #CCCCCC;
+	position: absolute;
+	top: 0px;
+	left: 20px;
+	width: 300px;
+	padding:5px;	
+	color:#000000;
+	background-color:#FFFFCC;
+	opacity: 0.8;
+	filter:alpha(opacity=80);
+}
\ No newline at end of file

Property changes on: trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBDroplets/fckwbdroplets.css
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBDroplets/lang/de.js
===================================================================
--- trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBDroplets/lang/de.js	(nonexistent)
+++ trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBDroplets/lang/de.js	(revision 1030)
@@ -0,0 +1,6 @@
+FCKLang.WBDropletsBtn			= 'WB Droplets einf\u00fcgen' ;
+FCKLang.WBDropletsDlgTitle		= 'WB Droplets' ;
+FCKLang.WBDropletsDlgName		= 'Website Baker Droplet einf\u00fcgen' ;
+FCKLang.WBDropletsErrPageSelect		= 'Bitte eine Droplet markieren, das eingef\u00fcgt werden soll!' ;
+FCKLang.WBDropletslblPageSelection	= 'Auswahlfenster der m\u00f6glichen Droplets:';
+FCKLang.WBDropletslblTitle		= 'Titel:';
\ No newline at end of file

Property changes on: trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBDroplets/lang/de.js
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBDroplets/lang/nl.js
===================================================================
--- trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBDroplets/lang/nl.js	(nonexistent)
+++ trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBDroplets/lang/nl.js	(revision 1030)
@@ -0,0 +1,6 @@
+FCKLang.WBDropletsBtn			= 'WB droplets toevoegen' ;
+FCKLang.WBDropletsDlgTitle		= 'WB droplets' ;
+FCKLang.WBDropletsDlgName		= 'Website Baker droplet toevoegen' ;
+FCKLang.WBDropletsErrPageSelect		= 'Eerst een droplet selecteren' ;
+FCKLang.WBDropletslblPageSelection	= 'Selecteer een droplet:';
+FCKLang.WBDropletslblTitle		= 'Titel';
\ No newline at end of file

Property changes on: trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBDroplets/lang/nl.js
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBDroplets/lang/en.js
===================================================================
--- trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBDroplets/lang/en.js	(nonexistent)
+++ trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBDroplets/lang/en.js	(revision 1030)
@@ -0,0 +1,6 @@
+FCKLang.WBDropletsBtn			= 'Insert WB Droplets into page' ;
+FCKLang.WBDropletsDlgTitle		= 'WB Droplets' ;
+FCKLang.WBDropletsDlgName		= 'Website Baker droplet insert' ;
+FCKLang.WBDropletsErrPageSelect		= 'Please select a Droplet to insert on page' ;
+FCKLang.WBDropletslblPageSelection	= 'Select a Droplet to insert on page:';
+FCKLang.WBDropletslblTitle		= 'Title';
\ No newline at end of file

Property changes on: trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBDroplets/lang/en.js
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBDroplets/lang/index.php
===================================================================
--- trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBDroplets/lang/index.php	(nonexistent)
+++ trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBDroplets/lang/index.php	(revision 1030)
@@ -0,0 +1,28 @@
+<?php
+
+// $Id$
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2009, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+header("Location: ../../../../../../../index.php");
+
+?>
\ No newline at end of file

Property changes on: trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBDroplets/lang/index.php
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBDroplets/wbdroplets.htt
===================================================================
--- trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBDroplets/wbdroplets.htt	(nonexistent)
+++ trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBDroplets/wbdroplets.htt	(revision 1030)
@@ -0,0 +1,103 @@
+<!-- BEGIN main_block -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+	<head>
+		<title>WB Link - Insert Website Baker Droplet</title>
+		<meta http-equiv="Content-Type" content="text/html; charset={CHARSET}">
+		<meta content="noindex, nofollow" name="robots">
+		<script type="text/javascript" src="fckwbdroplets.js"></script>
+		<script type="text/javascript">
+		<!--
+			var oEditor			= window.parent.InnerDialogLoaded(); 
+			var FCK				= oEditor.FCK; 
+			var FCKLang			= oEditor.FCKLang ;
+			var FCKConfig		= oEditor.FCKConfig ;
+			//var FCKCMSCCMSModules	= oEditor.FCKCMSModules; 
+			 
+			// oLink: The actual selected link in the editor.
+			var oLink = FCK.Selection.MoveToAncestorNode( 'A' ) ;
+			if ( oLink )
+				FCK.Selection.SelectNode( oLink ) ;
+	
+			window.onload = function ()	{ 
+				// First of all, translates the dialog box texts.
+				oEditor.FCKLanguageManager.TranslatePage(document);
+				
+				window.parent.SetOkButton( true );		//Show the "Ok" button. 
+				
+			} 
+			 
+			//If an anchor (A) object is currently selected, load the properties into the dialog 
+			function LoadSelected()	{
+				var sSelected;
+				
+				if ( oEditor.FCKBrowserInfo.IsGecko ) {
+					sSelected = FCK.EditorWindow.getSelection();
+				} else {
+					sSelected = FCK.EditorDocument.selection.createRange().text;
+				}
+
+
+			}
+
+			//Code that runs after the OK button is clicked 
+			function Ok() {
+				//Validate is option is selected
+				var oPageList = document.getElementById( 'cmbPages' ) ;
+				if(oPageList.selectedIndex == -1) {
+					alert( FCKLang.WBDropletsErrPageSelect );
+					return false;
+				}
+				
+				var oTagLink = document.getElementById( 'chkTaglink' );
+				
+				var sPageId = oPageList[oPageList.selectedIndex].value;
+				FCK.InsertHtml("[[" + sPageId + "]]");
+				// the following line was commented out as it creates an error message in some browser (e.g. IE)
+				// even Firefox seems not to make use of the title so we remove this option for know (doc)
+				// SetAttribute( oLink, 'title', document.getElementById( 'txtTitle' ).value ) ;
+			return true;
+
+			} 
+			var oldid = 'LoginBox';
+			function showdetail(obj) {
+				var olditem = document.getElementById(oldid);
+  				var newitem = document.getElementById(obj.value);
+  				olditem.className='hidden';
+  				newitem.className='unhidden';
+				oldid = obj.value;
+			}
+		//-->
+		</script>
+		<style>
+			.hidden { display: none; }
+			.unhidden { display: block; }
+		</style>
+	</head>
+			
+	<body scroll="yes" >
+		 <table height="100%" cellSpacing="0" cellPadding="0" width="100%" border="0"> 
+		 	<tr> 
+				<td>
+					<table width="100%">
+						<tr> 
+							<td colspan="2"><span fckLang="WBDropletslblPageSelection">Select a Droplet to insert on page:</span>&nbsp;</td>
+						</tr>
+						<tr>
+							<td colspan="2">
+								<select id="cmbPages" style="WIDTH: 100%" size="10" name="cmbPages"  onchange="javascript:showdetail(this);" >
+									<!-- BEGIN page_list_block -->
+									<option value="{TITLE}"{SELECTED}>{TITLE}</option>
+									<!-- END page_list_block -->
+								</select>
+							</td>
+						</tr>
+					</table>
+					{LIST}
+				</td>
+			</tr>
+		</table>
+		
+	</body>
+</html> 
+<!-- END main_block -->
\ No newline at end of file

Property changes on: trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBDroplets/wbdroplets.htt
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBDroplets/fckwbdroplets.js
===================================================================
--- trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBDroplets/fckwbdroplets.js	(nonexistent)
+++ trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBDroplets/fckwbdroplets.js	(revision 1030)
@@ -0,0 +1,8 @@
+// Function to set special attributes. Copied from FCK Core function
+function SetAttribute( element, attName, attValue )
+{
+	if ( attValue == null || attValue.length == 0 )
+		element.removeAttribute( attName, 0 ) ;			// 0 : Case Insensitive
+	else
+		element.setAttribute( attName, attValue, 0 ) ;	// 0 : Case Insensitive
+}
\ No newline at end of file

Property changes on: trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBDroplets/fckwbdroplets.js
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBDroplets/wbdroplets_no.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBDroplets/wbdroplets_no.gif
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBDroplets/wbdroplets.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBDroplets/wbdroplets.gif
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBDroplets/fckplugin.js
===================================================================
--- trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBDroplets/fckplugin.js	(nonexistent)
+++ trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBDroplets/fckplugin.js	(revision 1030)
@@ -0,0 +1,30 @@
+/* 
+ *  FCKPlugin.js
+ *  ------------
+ *  This is a generic file which is needed for plugins that are developed
+ *  for FCKEditor. With the below statements that toolbar is created and
+ *  several options are being activated.
+ *
+ *  See the online documentation for more information:
+ *  http://wiki.fckeditor.net/
+*/
+
+// Register the related commands.
+FCKCommands.RegisterCommand(
+	'WBDroplets',
+	new FCKDialogCommand(
+		'WBDroplets',
+		FCKLang["WBDropletsDlgTitle"],
+		FCKPlugins.Items['WBDroplets'].Path + 'fck_wbdroplets.php',
+		370,
+		370
+	)
+);
+ 
+// Create the "WBModules" toolbar button.
+// FCKToolbarButton( commandName, label, tooltip, style, sourceView, contextSensitive )
+var oWBModulesItem = new FCKToolbarButton( 'WBDroplets', FCKLang["WBDropletsBtn"], null, null, false, true ); 
+oWBModulesItem.IconPath = FCKConfig.PluginsPath + 'WBDroplets/wbdroplets.gif'; 
+
+// 'CMSContent' is the name that is used in the toolbar config.
+FCKToolbarItems.RegisterItem( 'WBDroplets', oWBModulesItem );
\ No newline at end of file

Property changes on: trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBDroplets/fckplugin.js
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBDroplets/index.php
===================================================================
--- trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBDroplets/index.php	(nonexistent)
+++ trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBDroplets/index.php	(revision 1030)
@@ -0,0 +1,28 @@
+<?php
+
+// $Id$
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2009, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+header("Location: ../../../../../../index.php");
+
+?>
\ No newline at end of file

Property changes on: trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBDroplets/index.php
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBDroplets/fck_wbdroplets.php
===================================================================
--- trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBDroplets/fck_wbdroplets.php	(nonexistent)
+++ trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBDroplets/fck_wbdroplets.php	(revision 1030)
@@ -0,0 +1,64 @@
+<?php
+
+// $Id$
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2009, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+// Include the config file
+require('../../../../../../config.php');
+
+// Create new admin object
+require(WB_PATH.'/framework/class.admin.php');
+$admin = new admin('Pages', 'pages_modify', false);
+
+// Setup the template
+$template = new Template(WB_PATH.'/modules/fckeditor/fckeditor/editor/plugins/WBDroplets');
+$template->set_file('page', 'wbdroplets.htt');
+$template->set_block('page', 'main_block', 'main');
+
+// Get pages and put them into the pages list
+$template->set_block('main_block', 'page_list_block', 'page_list');
+$database = new database();
+$get_droplet = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_droplets where active=1 ORDER BY name");
+if($get_droplet->numRows() > 0) {
+	// Loop through pages
+	while($droplet = $get_droplet->fetchRow()) {
+		// method page_is_visible was introduced with WB 2.7
+		$title = stripslashes($droplet['name']);
+		$desc = stripslashes($droplet['description']);
+		$comm = stripslashes($droplet['comments']);
+		$template->set_var('TITLE', $title);
+		$template->set_var('DESC', $desc);
+		$list .= "<div id=$title class=hidden><b>$title: </b> $desc<br>$comm</div>";
+		$template->parse('page_list', 'page_list_block', true);
+	}
+} else {
+	$template->set_var('TITLE', 'None found');
+	$template->parse('page_list', 'page_list_block', false);
+}
+$template->set_var('LIST', $list);
+
+// Parse the template object
+$template->parse('main', 'main_block', false);
+$template->pparse('output', 'page');
+
+?>
\ No newline at end of file

Property changes on: trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBDroplets/fck_wbdroplets.php
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: trunk/wb/modules/fckeditor/wb_config/wb_fckconfig.js
===================================================================
--- trunk/wb/modules/fckeditor/wb_config/wb_fckconfig.js	(revision 1029)
+++ trunk/wb/modules/fckeditor/wb_config/wb_fckconfig.js	(revision 1030)
@@ -16,6 +16,7 @@
 
 // required settings to make FCKEditor work with Website Baker (do not change them)
    FCKConfig.Plugins.Add( 'WBModules', 'en,nl,de' ) ;
+   FCKConfig.Plugins.Add( 'WBDroplets', 'en,nl,de' ) ;
 
 // #########################################################################################
 // # FCKEditor: General settings
@@ -67,7 +68,7 @@
 	['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'],
 	['OrderedList','UnorderedList','-','Outdent','Indent'],
 	['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
-	['WBModules','Link','Unlink','Anchor'],
+	['WBDroplets','WBModules','Link','Unlink','Anchor'],
 	['Image','Flash','Table','Rule'],
 	'/',
 	['Style','FontFormat','FontName','FontSize'],
