import rt 3.8.7
[freeside.git] / rt / share / html / NoAuth / RichText / FCKeditor / editor / plugins / placeholder / fck_placeholder.html
diff --git a/rt/share/html/NoAuth/RichText/FCKeditor/editor/plugins/placeholder/fck_placeholder.html b/rt/share/html/NoAuth/RichText/FCKeditor/editor/plugins/placeholder/fck_placeholder.html
new file mode 100644 (file)
index 0000000..0f83984
--- /dev/null
@@ -0,0 +1,105 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">\r
+<!--\r
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net\r
+ * Copyright (C) 2003-2009 Frederico Caldeira Knabben\r
+ *\r
+ * == BEGIN LICENSE ==\r
+ *\r
+ * Licensed under the terms of any of the following licenses at your\r
+ * choice:\r
+ *\r
+ *  - GNU General Public License Version 2 or later (the "GPL")\r
+ *    http://www.gnu.org/licenses/gpl.html\r
+ *\r
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")\r
+ *    http://www.gnu.org/licenses/lgpl.html\r
+ *\r
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")\r
+ *    http://www.mozilla.org/MPL/MPL-1.1.html\r
+ *\r
+ * == END LICENSE ==\r
+ *\r
+ * Placeholder Plugin.\r
+-->\r
+<html>\r
+       <head>\r
+               <title>Placeholder Properties</title>\r
+               <meta http-equiv="Content-Type" content="text/html; charset=utf-8">\r
+               <meta content="noindex, nofollow" name="robots">\r
+               <script src="../../dialog/common/fck_dialog_common.js" type="text/javascript"></script>\r
+               <script language="javascript">\r
+\r
+var dialog = window.parent ;\r
+var oEditor = dialog.InnerDialogLoaded() ;\r
+var FCKLang = oEditor.FCKLang ;\r
+var FCKPlaceholders = oEditor.FCKPlaceholders ;\r
+\r
+window.onload = function ()\r
+{\r
+       // First of all, translate the dialog box texts\r
+       oEditor.FCKLanguageManager.TranslatePage( document ) ;\r
+\r
+       LoadSelected() ;\r
+\r
+       // Show the "Ok" button.\r
+       dialog.SetOkButton( true ) ;\r
+\r
+       // Select text field on load.\r
+       SelectField( 'txtName' ) ;\r
+}\r
+\r
+var eSelected = dialog.Selection.GetSelectedElement() ;\r
+\r
+function LoadSelected()\r
+{\r
+       if ( !eSelected )\r
+               return ;\r
+\r
+       if ( eSelected.tagName == 'SPAN' && eSelected._fckplaceholder )\r
+               document.getElementById('txtName').value = eSelected._fckplaceholder ;\r
+       else\r
+               eSelected == null ;\r
+}\r
+\r
+function Ok()\r
+{\r
+       var sValue = document.getElementById('txtName').value ;\r
+\r
+       if ( eSelected && eSelected._fckplaceholder == sValue )\r
+               return true ;\r
+\r
+       if ( sValue.length == 0 )\r
+       {\r
+               alert( FCKLang.PlaceholderErrNoName ) ;\r
+               return false ;\r
+       }\r
+\r
+       if ( FCKPlaceholders.Exist( sValue ) )\r
+       {\r
+               alert( FCKLang.PlaceholderErrNameInUse ) ;\r
+               return false ;\r
+       }\r
+\r
+       FCKPlaceholders.Add( sValue ) ;\r
+       return true ;\r
+}\r
+\r
+               </script>\r
+       </head>\r
+       <body scroll="no" style="OVERFLOW: hidden">\r
+               <table height="100%" cellSpacing="0" cellPadding="0" width="100%" border="0">\r
+                       <tr>\r
+                               <td>\r
+                                       <table cellSpacing="0" cellPadding="0" align="center" border="0">\r
+                                               <tr>\r
+                                                       <td>\r
+                                                               <span fckLang="PlaceholderDlgName">Placeholder Name</span><br>\r
+                                                               <input id="txtName" type="text">\r
+                                                       </td>\r
+                                               </tr>\r
+                                       </table>\r
+                               </td>\r
+                       </tr>\r
+               </table>\r
+       </body>\r
+</html>\r