/branches/livraison_aha/api/fckeditor/editor/plugins/placeholder/fckplugin.js |
---|
1,24 → 1,28 |
/* |
* FCKeditor - The text editor for internet |
* Copyright (C) 2003-2006 Frederico Caldeira Knabben |
* |
* Licensed under the terms of the GNU Lesser General Public License: |
* http://www.opensource.org/licenses/lgpl-license.php |
* |
* For further information visit: |
* http://www.fckeditor.net/ |
* |
* "Support Open Source software. What about a donation today?" |
* |
* File Name: fckplugin.js |
* Plugin to insert "Placeholders" in the editor. |
* |
* File Authors: |
* Frederico Caldeira Knabben (fredck@fckeditor.net) |
* FCKeditor - The text editor for Internet - http://www.fckeditor.net |
* Copyright (C) 2003-2008 Frederico Caldeira Knabben |
* |
* == BEGIN LICENSE == |
* |
* Licensed under the terms of any of the following licenses at your |
* choice: |
* |
* - GNU General Public License Version 2 or later (the "GPL") |
* http://www.gnu.org/licenses/gpl.html |
* |
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL") |
* http://www.gnu.org/licenses/lgpl.html |
* |
* - Mozilla Public License Version 1.1 or later (the "MPL") |
* http://www.mozilla.org/MPL/MPL-1.1.html |
* |
* == END LICENSE == |
* |
* Plugin to insert "Placeholders" in the editor. |
*/ |
// Register the related command. |
FCKCommands.RegisterCommand( 'Placeholder', new FCKDialogCommand( 'Placeholder', FCKLang.PlaceholderDlgTitle, FCKPlugins.Items['placeholder'].Path + 'fck_placeholder.html', 340, 170 ) ) ; |
FCKCommands.RegisterCommand( 'Placeholder', new FCKDialogCommand( 'Placeholder', FCKLang.PlaceholderDlgTitle, FCKPlugins.Items['placeholder'].Path + 'fck_placeholder.html', 340, 160 ) ) ; |
// Create the "Plaholder" toolbar button. |
var oPlaceholderItem = new FCKToolbarButton( 'Placeholder', FCKLang.PlaceholderBtn ) ; |
33,7 → 37,7 |
// Add a new placeholder at the actual selection. |
FCKPlaceholders.Add = function( name ) |
{ |
var oSpan = FCK.CreateElement( 'SPAN' ) ; |
var oSpan = FCK.InsertElement( 'span' ) ; |
this.SetupSpan( oSpan, name ) ; |
} |
82,7 → 86,7 |
// Check if a Placholder name is already in use. |
FCKPlaceholders.Exist = function( name ) |
{ |
var aSpans = FCK.EditorDocument.getElementsByTagName( 'SPAN' ) |
var aSpans = FCK.EditorDocument.getElementsByTagName( 'SPAN' ) ; |
for ( var i = 0 ; i < aSpans.length ; i++ ) |
{ |
89,6 → 93,8 |
if ( aSpans[i]._fckplaceholder == name ) |
return true ; |
} |
return false ; |
} |
if ( FCKBrowserInfo.IsIE ) |
95,6 → 101,9 |
{ |
FCKPlaceholders.Redraw = function() |
{ |
if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG ) |
return ; |
var aPlaholders = FCK.EditorDocument.body.innerText.match( /\[\[[^\[\]]+\]\]/g ) ; |
if ( !aPlaholders ) |
return ; |
115,11 → 124,14 |
{ |
FCKPlaceholders.Redraw = function() |
{ |
if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG ) |
return ; |
var oInteractor = FCK.EditorDocument.createTreeWalker( FCK.EditorDocument.body, NodeFilter.SHOW_TEXT, FCKPlaceholders._AcceptNode, true ) ; |
var aNodes = new Array() ; |
while ( oNode = oInteractor.nextNode() ) |
while ( ( oNode = oInteractor.nextNode() ) ) |
{ |
aNodes[ aNodes.length ] = oNode ; |
} |
148,7 → 160,7 |
aNodes[n].parentNode.removeChild( aNodes[n] ) ; |
} |
FCKPlaceholders._SetupClickListener() ; |
} |
172,4 → 184,4 |
FCKXHtml._AppendChildNodes( node, htmlNode, false ) ; |
return node ; |
} |
} |
/branches/livraison_aha/api/fckeditor/editor/plugins/placeholder/lang/it.js |
---|
1,20 → 1,24 |
/* |
* FCKeditor - The text editor for internet |
* Copyright (C) 2003-2006 Frederico Caldeira Knabben |
* |
* Licensed under the terms of the GNU Lesser General Public License: |
* http://www.opensource.org/licenses/lgpl-license.php |
* |
* For further information visit: |
* http://www.fckeditor.net/ |
* |
* "Support Open Source software. What about a donation today?" |
* |
* File Name: it.js |
* Placholder Italian language file. |
* |
* File Authors: |
* Frederico Caldeira Knabben (fredck@fckeditor.net) |
* FCKeditor - The text editor for Internet - http://www.fckeditor.net |
* Copyright (C) 2003-2008 Frederico Caldeira Knabben |
* |
* == BEGIN LICENSE == |
* |
* Licensed under the terms of any of the following licenses at your |
* choice: |
* |
* - GNU General Public License Version 2 or later (the "GPL") |
* http://www.gnu.org/licenses/gpl.html |
* |
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL") |
* http://www.gnu.org/licenses/lgpl.html |
* |
* - Mozilla Public License Version 1.1 or later (the "MPL") |
* http://www.mozilla.org/MPL/MPL-1.1.html |
* |
* == END LICENSE == |
* |
* Placholder Italian language file. |
*/ |
FCKLang.PlaceholderBtn = 'Aggiungi/Modifica Placeholder' ; |
FCKLang.PlaceholderDlgTitle = 'Proprietà del Placeholder' ; |
/branches/livraison_aha/api/fckeditor/editor/plugins/placeholder/lang/en.js |
---|
1,23 → 1,27 |
/* |
* FCKeditor - The text editor for internet |
* Copyright (C) 2003-2006 Frederico Caldeira Knabben |
* |
* Licensed under the terms of the GNU Lesser General Public License: |
* http://www.opensource.org/licenses/lgpl-license.php |
* |
* For further information visit: |
* http://www.fckeditor.net/ |
* |
* "Support Open Source software. What about a donation today?" |
* |
* File Name: en.js |
* Placholder English language file. |
* |
* File Authors: |
* Frederico Caldeira Knabben (fredck@fckeditor.net) |
* FCKeditor - The text editor for Internet - http://www.fckeditor.net |
* Copyright (C) 2003-2008 Frederico Caldeira Knabben |
* |
* == BEGIN LICENSE == |
* |
* Licensed under the terms of any of the following licenses at your |
* choice: |
* |
* - GNU General Public License Version 2 or later (the "GPL") |
* http://www.gnu.org/licenses/gpl.html |
* |
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL") |
* http://www.gnu.org/licenses/lgpl.html |
* |
* - Mozilla Public License Version 1.1 or later (the "MPL") |
* http://www.mozilla.org/MPL/MPL-1.1.html |
* |
* == END LICENSE == |
* |
* Placholder English language file. |
*/ |
FCKLang.PlaceholderBtn = 'Insert/Edit Placeholder' ; |
FCKLang.PlaceholderDlgTitle = 'Placeholder Properties' ; |
FCKLang.PlaceholderDlgName = 'Placeholder Name' ; |
FCKLang.PlaceholderErrNoName = 'Please type the placeholder name' ; |
FCKLang.PlaceholderErrNameInUse = 'The specified name is already in use' ; |
FCKLang.PlaceholderErrNameInUse = 'The specified name is already in use' ; |
/branches/livraison_aha/api/fckeditor/editor/plugins/placeholder/lang/es.js |
---|
New file |
0,0 → 1,27 |
/* |
* FCKeditor - The text editor for Internet - http://www.fckeditor.net |
* Copyright (C) 2003-2008 Frederico Caldeira Knabben |
* |
* == BEGIN LICENSE == |
* |
* Licensed under the terms of any of the following licenses at your |
* choice: |
* |
* - GNU General Public License Version 2 or later (the "GPL") |
* http://www.gnu.org/licenses/gpl.html |
* |
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL") |
* http://www.gnu.org/licenses/lgpl.html |
* |
* - Mozilla Public License Version 1.1 or later (the "MPL") |
* http://www.mozilla.org/MPL/MPL-1.1.html |
* |
* == END LICENSE == |
* |
* Placholder Spanish language file. |
*/ |
FCKLang.PlaceholderBtn = 'Insertar/Editar contenedor' ; |
FCKLang.PlaceholderDlgTitle = 'Propiedades del contenedor ' ; |
FCKLang.PlaceholderDlgName = 'Nombre de contenedor' ; |
FCKLang.PlaceholderErrNoName = 'Por favor escriba el nombre de contenedor' ; |
FCKLang.PlaceholderErrNameInUse = 'El nombre especificado ya esta en uso' ; |
/branches/livraison_aha/api/fckeditor/editor/plugins/placeholder/lang/fr.js |
---|
1,23 → 1,27 |
/* |
* FCKeditor - The text editor for internet |
* Copyright (C) 2003-2006 Frederico Caldeira Knabben |
* |
* Licensed under the terms of the GNU Lesser General Public License: |
* http://www.opensource.org/licenses/lgpl-license.php |
* |
* For further information visit: |
* http://www.fckeditor.net/ |
* |
* "Support Open Source software. What about a donation today?" |
* |
* File Name: fr.js |
* Placholder Italian language file. |
* |
* File Authors: |
* Hubert Garrido (liane@users.sourceforge.net) |
* FCKeditor - The text editor for Internet - http://www.fckeditor.net |
* Copyright (C) 2003-2008 Frederico Caldeira Knabben |
* |
* == BEGIN LICENSE == |
* |
* Licensed under the terms of any of the following licenses at your |
* choice: |
* |
* - GNU General Public License Version 2 or later (the "GPL") |
* http://www.gnu.org/licenses/gpl.html |
* |
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL") |
* http://www.gnu.org/licenses/lgpl.html |
* |
* - Mozilla Public License Version 1.1 or later (the "MPL") |
* http://www.mozilla.org/MPL/MPL-1.1.html |
* |
* == END LICENSE == |
* |
* Placeholder French language file. |
*/ |
FCKLang.PlaceholderBtn = 'Insérer/Modifier Substitut' ; |
FCKLang.PlaceholderDlgTitle = 'Propriétés de Substitut' ; |
FCKLang.PlaceholderDlgName = 'Nom de Substitut' ; |
FCKLang.PlaceholderErrNoName = 'Veuillez saisir le nom de Substitut' ; |
FCKLang.PlaceholderErrNameInUse = 'Ce nom est déjà utilisé' ; |
FCKLang.PlaceholderBtn = "Insérer/Modifier l'Espace réservé" ; |
FCKLang.PlaceholderDlgTitle = "Propriétés de l'Espace réservé" ; |
FCKLang.PlaceholderDlgName = "Nom de l'Espace réservé" ; |
FCKLang.PlaceholderErrNoName = "Veuillez saisir le nom de l'Espace réservé" ; |
FCKLang.PlaceholderErrNameInUse = "Ce nom est déjà utilisé" ; |
/branches/livraison_aha/api/fckeditor/editor/plugins/placeholder/lang/de.js |
---|
1,23 → 1,27 |
/* |
* FCKeditor - The text editor for internet |
* Copyright (C) 2003-2006 Frederico Caldeira Knabben |
* |
* Licensed under the terms of the GNU Lesser General Public License: |
* http://www.opensource.org/licenses/lgpl-license.php |
* |
* For further information visit: |
* http://www.fckeditor.net/ |
* |
* "Support Open Source software. What about a donation today?" |
* |
* File Name: de.js |
* Placholder German language file. |
* |
* File Authors: |
* José Fontanil |
* FCKeditor - The text editor for Internet - http://www.fckeditor.net |
* Copyright (C) 2003-2008 Frederico Caldeira Knabben |
* |
* == BEGIN LICENSE == |
* |
* Licensed under the terms of any of the following licenses at your |
* choice: |
* |
* - GNU General Public License Version 2 or later (the "GPL") |
* http://www.gnu.org/licenses/gpl.html |
* |
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL") |
* http://www.gnu.org/licenses/lgpl.html |
* |
* - Mozilla Public License Version 1.1 or later (the "MPL") |
* http://www.mozilla.org/MPL/MPL-1.1.html |
* |
* == END LICENSE == |
* |
* Placholder German language file. |
*/ |
FCKLang.PlaceholderBtn = 'Einfügen/editieren Platzhalter' ; |
FCKLang.PlaceholderDlgTitle = 'Platzhalter Eigenschaften' ; |
FCKLang.PlaceholderDlgName = 'Platzhalter Name' ; |
FCKLang.PlaceholderErrNoName = 'Bitte den Namen des Platzhalters schreiben' ; |
FCKLang.PlaceholderErrNameInUse = 'Der angegebene Namen ist schon in Gebrauch' ; |
FCKLang.PlaceholderErrNameInUse = 'Der angegebene Namen ist schon in Gebrauch' ; |
/branches/livraison_aha/api/fckeditor/editor/plugins/placeholder/lang/pl.js |
---|
1,23 → 1,27 |
/* |
* FCKeditor - The text editor for internet |
* Copyright (C) 2003-2006 Frederico Caldeira Knabben |
* |
* Licensed under the terms of the GNU Lesser General Public License: |
* http://www.opensource.org/licenses/lgpl-license.php |
* |
* For further information visit: |
* http://www.fckeditor.net/ |
* |
* "Support Open Source software. What about a donation today?" |
* |
* File Name: pl.js |
* Placholder Polish language file. |
* |
* File Authors: |
* Marcin Pietrzak (fck@iworks.pl) |
* FCKeditor - The text editor for Internet - http://www.fckeditor.net |
* Copyright (C) 2003-2008 Frederico Caldeira Knabben |
* |
* == BEGIN LICENSE == |
* |
* Licensed under the terms of any of the following licenses at your |
* choice: |
* |
* - GNU General Public License Version 2 or later (the "GPL") |
* http://www.gnu.org/licenses/gpl.html |
* |
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL") |
* http://www.gnu.org/licenses/lgpl.html |
* |
* - Mozilla Public License Version 1.1 or later (the "MPL") |
* http://www.mozilla.org/MPL/MPL-1.1.html |
* |
* == END LICENSE == |
* |
* Placholder Polish language file. |
*/ |
FCKLang.PlaceholderBtn = 'Wstaw/Edytuj nagÅówek' ; |
FCKLang.PlaceholderDlgTitle = 'WÅaÅnoÅci nagÅówka' ; |
FCKLang.PlaceholderDlgName = 'Nazwa nagÅówka' ; |
FCKLang.PlaceholderErrNoName = 'ProszÄ wprowadziÄ nazwÄ nagÅówka' ; |
FCKLang.PlaceholderErrNameInUse = 'Podana nazwa jest już w użyciu' ; |
FCKLang.PlaceholderErrNameInUse = 'Podana nazwa jest już w użyciu' ; |
/branches/livraison_aha/api/fckeditor/editor/plugins/placeholder/fck_placeholder.html |
---|
1,21 → 1,25 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
<!-- |
* FCKeditor - The text editor for internet |
* Copyright (C) 2003-2006 Frederico Caldeira Knabben |
* |
* Licensed under the terms of the GNU Lesser General Public License: |
* http://www.opensource.org/licenses/lgpl-license.php |
* |
* For further information visit: |
* http://www.fckeditor.net/ |
* |
* "Support Open Source software. What about a donation today?" |
* |
* File Name: fck_placeholder.html |
* Placeholder Plugin. |
* |
* File Authors: |
* Frederico Caldeira Knabben (fredck@fckeditor.net) |
* FCKeditor - The text editor for Internet - http://www.fckeditor.net |
* Copyright (C) 2003-2008 Frederico Caldeira Knabben |
* |
* == BEGIN LICENSE == |
* |
* Licensed under the terms of any of the following licenses at your |
* choice: |
* |
* - GNU General Public License Version 2 or later (the "GPL") |
* http://www.gnu.org/licenses/gpl.html |
* |
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL") |
* http://www.gnu.org/licenses/lgpl.html |
* |
* - Mozilla Public License Version 1.1 or later (the "MPL") |
* http://www.mozilla.org/MPL/MPL-1.1.html |
* |
* == END LICENSE == |
* |
* Placeholder Plugin. |
--> |
<html> |
<head> |
22,9 → 26,11 |
<title>Placeholder Properties</title> |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
<meta content="noindex, nofollow" name="robots"> |
<script src="../../dialog/common/fck_dialog_common.js" type="text/javascript"></script> |
<script language="javascript"> |
var oEditor = window.parent.InnerDialogLoaded() ; |
var dialog = window.parent ; |
var oEditor = dialog.InnerDialogLoaded() ; |
var FCKLang = oEditor.FCKLang ; |
var FCKPlaceholders = oEditor.FCKPlaceholders ; |
32,14 → 38,17 |
{ |
// First of all, translate the dialog box texts |
oEditor.FCKLanguageManager.TranslatePage( document ) ; |
LoadSelected() ; |
// Show the "Ok" button. |
window.parent.SetOkButton( true ) ; |
dialog.SetOkButton( true ) ; |
// Select text field on load. |
SelectField( 'txtName' ) ; |
} |
var eSelected = oEditor.FCKSelection.GetSelectedElement() ; |
var eSelected = dialog.Selection.GetSelectedElement() ; |
function LoadSelected() |
{ |
55,7 → 64,7 |
function Ok() |
{ |
var sValue = document.getElementById('txtName').value ; |
if ( eSelected && eSelected._fckplaceholder == sValue ) |
return true ; |
64,7 → 73,7 |
alert( FCKLang.PlaceholderErrNoName ) ; |
return false ; |
} |
if ( FCKPlaceholders.Exist( sValue ) ) |
{ |
alert( FCKLang.PlaceholderErrNameInUse ) ; |
93,4 → 102,4 |
</tr> |
</table> |
</body> |
</html> |
</html> |