Index: trunk/admin/editor/cmseditor/editor/_source/commandclasses/fck_othercommands.js =================================================================== diff -u -r1999 -r2091 --- trunk/admin/editor/cmseditor/editor/_source/commandclasses/fck_othercommands.js (.../fck_othercommands.js) (revision 1999) +++ trunk/admin/editor/cmseditor/editor/_source/commandclasses/fck_othercommands.js (.../fck_othercommands.js) (revision 2091) @@ -169,9 +169,13 @@ FCKNewPageCommand.prototype.Execute = function() { - FCK.SetHTML( FCKBrowserInfo.IsGecko ? ' ' : '' ) ; - if (typeof(FCKConfig.newBgColor) != 'undefined') - FCK.EditorDocument.bgColor = FCKConfig.newBgColor; + if (confirm('Are you sure you would like to clear the page?')) + { + FCK.SetHTML( FCKBrowserInfo.IsGecko ? ' ' : '' ) ; + if (typeof(FCKConfig.newBgColor) != 'undefined') + FCK.EditorDocument.bgColor = FCKConfig.newBgColor; + } + } FCKNewPageCommand.prototype.GetState = function() Index: trunk/admin/editor/cmseditor/editor/dialog/fck_link.html =================================================================== diff -u -r1974 -r2091 --- trunk/admin/editor/cmseditor/editor/dialog/fck_link.html (.../fck_link.html) (revision 1974) +++ trunk/admin/editor/cmseditor/editor/dialog/fck_link.html (.../fck_link.html) (revision 2091) @@ -39,8 +39,8 @@ Index: trunk/admin/editor/cmseditor/editor/dialog/fck_link/fck_link.js =================================================================== diff -u -r2081 -r2091 --- trunk/admin/editor/cmseditor/editor/dialog/fck_link/fck_link.js (.../fck_link.js) (revision 2081) +++ trunk/admin/editor/cmseditor/editor/dialog/fck_link/fck_link.js (.../fck_link.js) (revision 2091) @@ -131,6 +131,7 @@ { if (tabCode == 'Info') { updateDataArray(); + window.parent.document.getElementById('TitleArea').innerHTML = oEditor.FCKLang.DlgImgTitle; } } Index: trunk/admin/editor/cmseditor/editor/js/fckeditorcode_ie_2.js =================================================================== diff -u -r1999 -r2091 --- trunk/admin/editor/cmseditor/editor/js/fckeditorcode_ie_2.js (.../fckeditorcode_ie_2.js) (revision 1999) +++ trunk/admin/editor/cmseditor/editor/js/fckeditorcode_ie_2.js (.../fckeditorcode_ie_2.js) (revision 2091) @@ -22,7 +22,7 @@ FCKStyleDef.prototype.ApplyToSelection=function(){var oSelection=FCK.EditorDocument.selection;if (oSelection.type=='Text'){var oRange=oSelection.createRange();var e=document.createElement(this.Element);e.innerHTML=oRange.htmlText;this._AddAttributes(e);this._RemoveDuplicates(e);oRange.pasteHTML(e.outerHTML);}else if (oSelection.type=='Control'){var oControl=FCKSelection.GetSelectedElement();if (oControl.tagName==this.Element) this._AddAttributes(oControl);};};FCKStyleDef.prototype._AddAttributes=function(targetElement){for (var a in this.Attributes){if (a.toLowerCase()=='style') targetElement.style.cssText=this.Attributes[a];else targetElement.setAttribute(a,this.Attributes[a],0);};};FCKStyleDef.prototype._RemoveDuplicates=function(parent){for (var i=0;i');else FCK.ExecuteNamedCommand('FormatBlock','<'+formatName+'>');};FCKFormatBlockCommand.prototype.GetState=function(){return FCK.GetNamedCommandValue('FormatBlock');};var FCKPreviewCommand=function(){this.Name='Preview';};FCKPreviewCommand.prototype.Execute=function(){FCK.Preview();};FCKPreviewCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;};var FCKSaveCommand=function(){this.Name='Save';};FCKSaveCommand.prototype.Execute=function(){var oForm=FCK.LinkedField.form;oForm.submit();};FCKSaveCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;};var FCKNewPageCommand=function(){this.Name='NewPage';};FCKNewPageCommand.prototype.Execute=function(){FCK.SetHTML(FCKBrowserInfo.IsGecko?' ':'');if (typeof(FCKConfig.newBgColor)!='undefined') FCK.EditorDocument.bgColor=FCKConfig.newBgColor;};FCKNewPageCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;};var FCKSourceCommand=function(){this.Name='Source';};FCKSourceCommand.prototype.Execute=function(){FCK.SwitchEditMode();};FCKSourceCommand.prototype.GetState=function(){return (FCK.EditMode==FCK_EDITMODE_WYSIWYG?FCK_TRISTATE_OFF:FCK_TRISTATE_ON);} +var FCKDialogCommand=function(name,title,url,width,height,getStateFunction,getStateParam){this.Name=name;this.Title=title;this.Url=url;this.Width=width;this.Height=height;this.GetStateFunction=getStateFunction;this.GetStateParam=getStateParam;};FCKDialogCommand.prototype.Execute=function(){FCKDialog.OpenDialog('FCKDialog_'+this.Name,this.Title,this.Url,this.Width,this.Height);};FCKDialogCommand.prototype.GetState=function(){if (this.GetStateFunction) return this.GetStateFunction(this.GetStateParam);else return FCK_TRISTATE_OFF;};var FCKUndefinedCommand=function(){this.Name='Undefined';};FCKUndefinedCommand.prototype.Execute=function(){alert(FCKLang.NotImplemented);};FCKUndefinedCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;};var FCKFontNameCommand=function(){this.Name='FontName';};FCKFontNameCommand.prototype.Execute=function(fontName){if (fontName==null||fontName==""){}else FCK.ExecuteNamedCommand('FontName',fontName);};FCKFontNameCommand.prototype.GetState=function(){return FCK.GetNamedCommandValue('FontName');};var FCKFontSizeCommand=function(){this.Name='FontSize';};FCKFontSizeCommand.prototype.Execute=function(fontSize){if (typeof(fontSize)=='string') fontSize=parseInt(fontSize);if (fontSize==null||fontSize==''){FCK.ExecuteNamedCommand('FontSize',3);}else FCK.ExecuteNamedCommand('FontSize',fontSize);};FCKFontSizeCommand.prototype.GetState=function(){return FCK.GetNamedCommandValue('FontSize');};var FCKFormatBlockCommand=function(){this.Name='FormatBlock';};FCKFormatBlockCommand.prototype.Execute=function(formatName){if (formatName==null||formatName=='') FCK.ExecuteNamedCommand('FormatBlock','

');else FCK.ExecuteNamedCommand('FormatBlock','<'+formatName+'>');};FCKFormatBlockCommand.prototype.GetState=function(){return FCK.GetNamedCommandValue('FormatBlock');};var FCKPreviewCommand=function(){this.Name='Preview';};FCKPreviewCommand.prototype.Execute=function(){FCK.Preview();};FCKPreviewCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;};var FCKSaveCommand=function(){this.Name='Save';};FCKSaveCommand.prototype.Execute=function(){var oForm=FCK.LinkedField.form;oForm.submit();};FCKSaveCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;};var FCKNewPageCommand=function(){this.Name='NewPage';};FCKNewPageCommand.prototype.Execute=function(){if (confirm('Are you sure you would like to clear the page?')){FCK.SetHTML(FCKBrowserInfo.IsGecko?' ':'');if (typeof(FCKConfig.newBgColor)!='undefined') FCK.EditorDocument.bgColor=FCKConfig.newBgColor;};};FCKNewPageCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;};var FCKSourceCommand=function(){this.Name='Source';};FCKSourceCommand.prototype.Execute=function(){FCK.SwitchEditMode();};FCKSourceCommand.prototype.GetState=function(){return (FCK.EditMode==FCK_EDITMODE_WYSIWYG?FCK_TRISTATE_OFF:FCK_TRISTATE_ON);} var FCKSpellCheckCommand=function(){this.Name='SpellCheck';this.IsEnabled=(FCKConfig.SpellChecker=='ieSpell'||FCKConfig.SpellChecker=='SpellerPages');};FCKSpellCheckCommand.prototype.Execute=function(){switch (FCKConfig.SpellChecker){case 'ieSpell':this._RunIeSpell();break;case 'SpellerPages':FCKDialog.OpenDialog('FCKDialog_SpellCheck','Spell Check','dialog/fck_spellerpages.html',440,480);break;};};FCKSpellCheckCommand.prototype._RunIeSpell=function(){try{var oIeSpell=new ActiveXObject("ieSpell.ieSpellExtension");oIeSpell.CheckAllLinkedDocuments(FCK.EditorDocument);}catch(e){if(e.number==-2146827859){if (confirm(FCKLang.IeSpellDownload)) window.open(FCKConfig.IeSpellDownloadUrl,'IeSpellDownload');}else alert('Error Loading ieSpell: '+e.message+' ('+e.number+')');};};FCKSpellCheckCommand.prototype.GetState=function(){return this.IsEnabled?FCK_TRISTATE_OFF:FCK_TRISTATE_DISABLED;} var FCKTextColorCommand=function(type){this.Name=type=='ForeColor'?'TextColor':'BGColor';this.Type=type;this._Panel=new FCKPanel();this._Panel.StyleSheet=FCKConfig.SkinPath+'fck_contextmenu.css';this._Panel.Create();this._CreatePanelBody(this._Panel.Document,this._Panel.PanelDiv);};FCKTextColorCommand.prototype.Execute=function(panelX,panelY,relElement){FCK._ActiveColorPanelType=this.Type;this._Panel.Show(panelX,panelY,relElement);};FCKTextColorCommand.prototype.SetColor=function(color){if (FCK._ActiveColorPanelType=='ForeColor') FCK.ExecuteNamedCommand('ForeColor',color);else if (FCKBrowserInfo.IsGecko) FCK.ExecuteNamedCommand('hilitecolor',color);else FCK.ExecuteNamedCommand('BackColor',color);delete FCK._ActiveColorPanelType;};FCKTextColorCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;};FCKTextColorCommand.prototype._CreatePanelBody=function(targetDocument,targetDiv){function CreateSelectionDiv(){var oDiv=targetDocument.createElement("DIV");oDiv.className='ColorDeselected';oDiv.onmouseover=function() { this.className='ColorSelected';};oDiv.onmouseout=function() { this.className='ColorDeselected';};return oDiv;};var oTable=targetDiv.appendChild(targetDocument.createElement("TABLE"));oTable.style.tableLayout='fixed';oTable.cellPadding=0;oTable.cellSpacing=0;oTable.border=0;oTable.width=150;var oCell=oTable.insertRow(-1).insertCell(-1);oCell.colSpan=8;var oDiv=oCell.appendChild(CreateSelectionDiv());oDiv.innerHTML='\ \ \ \ \
'+FCKLang.ColorAutomatic+'
';oDiv.Command=this;oDiv.onclick=function(){this.className='ColorDeselected';this.Command.SetColor('');this.Command._Panel.Hide();};var aColors=FCKConfig.FontColors.split(',');var iCounter=0;while (iCounter

';oDiv.Command=this;oDiv.onclick=function(){this.className='ColorDeselected';this.Command.SetColor('#'+this.Color);this.Command._Panel.Hide();};};};var oCell=oTable.insertRow(-1).insertCell(-1);oCell.colSpan=8;var oDiv=oCell.appendChild(CreateSelectionDiv());oDiv.innerHTML='
'+FCKLang.ColorMoreColors+'
';oDiv.Command=this;oDiv.onclick=function(){this.className='ColorDeselected';this.Command._Panel.Hide();FCKDialog.OpenDialog('FCKDialog_Color',FCKLang.DlgColorTitle,'dialog/fck_colorselector.html',400,330,this.Command.SetColor);};} var FCKPastePlainTextCommand=function(){this.Name='PasteText';};FCKPastePlainTextCommand.prototype.Execute=function(){FCK.PasteAsPlainText();};FCKPastePlainTextCommand.prototype.GetState=function(){return FCK.GetNamedCommandState('Paste');}; @@ -47,7 +47,7 @@ var FCKContextMenuItem=function(contextMenu,commandName,label,hasIcon){this.ContextMenu=contextMenu;this.Command=FCKCommands.GetCommand(commandName);this.Label=label?label:commandName;this.HasIcon=hasIcon?true:false;};FCKContextMenuItem.prototype.CreateTableRow=function(targetTable){this._Row=targetTable.insertRow(-1);this._Row.className='CM_Disabled';this._Row.FCKContextMenuItem=this;this._Row.onmouseover=function(){if (this.className!='CM_Disabled') this.className='CM_Over';};this._Row.onmouseout=function(){if (this.className!='CM_Disabled') this.className='CM_Option';};this._Row.onclick=function(){if (this.className!='CM_Disabled'){this.FCKContextMenuItem.ContextMenu.Hide();this.FCKContextMenuItem.Command.Execute();};return false;};var oCell=this._Row.insertCell(-1);oCell.className='CM_Icon';if (this.HasIcon) oCell.innerHTML='';oCell=this._Row.insertCell(-1);oCell.className='CM_Label';oCell.unselectable='on';oCell.noWrap=true;oCell.innerHTML=this.Label;};FCKContextMenuItem.prototype.SetVisible=function(isVisible){this._Row.style.display=isVisible?'':'none';};FCKContextMenuItem.prototype.RefreshState=function(){switch (this.Command.GetState()){case FCK_TRISTATE_ON:case FCK_TRISTATE_OFF:this._Row.className='CM_Option';break;default:this._Row.className='CM_Disabled';break;};}; var FCKContextMenuSeparator=function(){};FCKContextMenuSeparator.prototype.CreateTableRow=function(targetTable){this._Row=targetTable.insertRow(-1);this._Row.className='CM_Separator';var oCell=this._Row.insertCell(-1);oCell.className='CM_Icon';oCell=this._Row.insertCell(-1);oCell.className='CM_Label';oCell.innerHTML='
';};FCKContextMenuSeparator.prototype.SetVisible=function(isVisible){this._Row.style.display=isVisible?'':'none';};FCKContextMenuSeparator.prototype.RefreshState=function(){}; var FCKContextMenuGroup=function(addSeparator,contextMenu,firstItemCommand,firstItemLabel,hasIcon){this.IsVisible=true;this.Items=new Array();if (addSeparator) this.Add(new FCKContextMenuSeparator());if (contextMenu&&firstItemCommand&&firstItemLabel) this.Add(new FCKContextMenuItem(contextMenu,firstItemCommand,firstItemLabel,hasIcon));this.ValidationFunction=null;};FCKContextMenuGroup.prototype.Add=function(contextMenuItem){this.Items[this.Items.length]=contextMenuItem;};FCKContextMenuGroup.prototype.CreateTableRows=function(table){for (var i=0;i0&&oTag.href.length==0);if (this.Groups['Anchor']) this.Groups['Anchor'].SetVisible(bIsAnchor);if (this.Groups['Link']) this.Groups['Link'].SetVisible(!bIsAnchor&&LinkState()==true);if (this.Groups['TableCell']) this.Groups['TableCell'].SetVisible(sTagName!='TABLE'&&FCKSelection.HasAncestorNode('TABLE'));if (this.Groups['Table']) this.Groups['Table'].SetVisible(sTagName=='TABLE');if (this.Groups['Image']) this.Groups['Image'].SetVisible(sTagName=='IMG');if (this.Groups['Document']) this.Groups['Document'].SetVisible(true&&LinkState()==true);if (this.Groups['BulletedList']) this.Groups['BulletedList'].SetVisible(FCKSelection.HasAncestorNode('UL'));if (this.Groups['NumberedList']) this.Groups['NumberedList'].SetVisible(FCKSelection.HasAncestorNode('OL'));if (this.Groups['Select']) this.Groups['Select'].SetVisible(sTagName=='SELECT');if (this.Groups['Textarea']) this.Groups['Textarea'].SetVisible(sTagName=='TEXTAREA');if (this.Groups['Form']) this.Groups['Form'].SetVisible(FCKSelection.HasAncestorNode('FORM'));if (this.Groups['Checkbox']) this.Groups['Checkbox'].SetVisible(sTagName=='INPUT'&&oTag.type=='checkbox');if (this.Groups['Radio']) this.Groups['Radio'].SetVisible(sTagName=='INPUT'&&oTag.type=='radio');if (this.Groups['TextField']) this.Groups['TextField'].SetVisible(sTagName=='INPUT'&&(oTag.type=='text'||oTag.type=='password'));if (this.Groups['HiddenField']) this.Groups['HiddenField'].SetVisible(sTagName=='INPUT'&&oTag.type=='hidden');if (this.Groups['ImageButton']) this.Groups['ImageButton'].SetVisible(sTagName=='INPUT'&&oTag.type=='image');if (this.Groups['Button']) this.Groups['Button'].SetVisible(sTagName=='INPUT'&&(oTag.type=='button'||oTag.type=='submit'||oTag.type=='reset'));for (var o in this.Groups){this.Groups[o].RefreshState();};}; +var FCKContextMenu=new Object();FCKContextMenu._IsLoaded=false;FCKContextMenu.Reload=function(){this._Div=this._Document.createElement('DIV');this._Div.className='CM_ContextMenu';this._Div.style.position='absolute';this._Div.style.visibility='hidden';this._Document.body.appendChild(this._Div);var oTable=this._Document.createElement('TABLE');oTable.cellSpacing=0;oTable.cellPadding=0;oTable.border=0;this._Div.appendChild(oTable);this.Groups=new Object();for (var i=0;i0&&oTag.href.length==0);if (this.Groups['Anchor']) this.Groups['Anchor'].SetVisible(bIsAnchor);if (this.Groups['Link']) this.Groups['Link'].SetVisible(!bIsAnchor&&LinkState()==true);if (this.Groups['TableCell']) this.Groups['TableCell'].SetVisible(sTagName!='TABLE'&&FCKSelection.HasAncestorNode('TABLE'));if (this.Groups['Table']) this.Groups['Table'].SetVisible(sTagName=='TABLE');if (this.Groups['Image']) this.Groups['Image'].SetVisible(sTagName=='IMG');if (this.Groups['Document']) this.Groups['Document'].SetVisible(true&&DocumentState()==true);if (this.Groups['BulletedList']) this.Groups['BulletedList'].SetVisible(FCKSelection.HasAncestorNode('UL'));if (this.Groups['NumberedList']) this.Groups['NumberedList'].SetVisible(FCKSelection.HasAncestorNode('OL'));if (this.Groups['Select']) this.Groups['Select'].SetVisible(sTagName=='SELECT');if (this.Groups['Textarea']) this.Groups['Textarea'].SetVisible(sTagName=='TEXTAREA');if (this.Groups['Form']) this.Groups['Form'].SetVisible(FCKSelection.HasAncestorNode('FORM'));if (this.Groups['Checkbox']) this.Groups['Checkbox'].SetVisible(sTagName=='INPUT'&&oTag.type=='checkbox');if (this.Groups['Radio']) this.Groups['Radio'].SetVisible(sTagName=='INPUT'&&oTag.type=='radio');if (this.Groups['TextField']) this.Groups['TextField'].SetVisible(sTagName=='INPUT'&&(oTag.type=='text'||oTag.type=='password'));if (this.Groups['HiddenField']) this.Groups['HiddenField'].SetVisible(sTagName=='INPUT'&&oTag.type=='hidden');if (this.Groups['ImageButton']) this.Groups['ImageButton'].SetVisible(sTagName=='INPUT'&&oTag.type=='image');if (this.Groups['Button']) this.Groups['Button'].SetVisible(sTagName=='INPUT'&&(oTag.type=='button'||oTag.type=='submit'||oTag.type=='reset'));for (var o in this.Groups){this.Groups[o].RefreshState();};}; FCKContextMenu.Show=function(x,y){if (!this._Popup){this._Popup=window.createPopup();this._Document=this._Popup.document;this._Document.createStyleSheet(FCKConfig.SkinPath+'fck_contextmenu.css');this._Document.oncontextmenu=function() { return false;};};if (!this._IsLoaded){this.Reload();this._Div.style.visibility='';};this.RefreshState();this._Popup.show(x,y,0,0);this._Popup.show(x,y,this._Div.offsetWidth,this._Div.offsetHeight);};FCKContextMenu.Hide=function(){if (this._Popup) this._Popup.hide();} if (!FCKConfig.PluginsPath.endsWith('/')) FCKConfig.PluginsPath+='/';var FCKPlugin=function(name,availableLangs,basePath){this.Name=name;this.BasePath=basePath?basePath:FCKConfig.PluginsPath;this.Path=this.BasePath+name+'/';if (!availableLangs||availableLangs.length==0) this.AvailableLangs=new Array();else this.AvailableLangs=availableLangs.split(',');};FCKPlugin.prototype.Load=function(){if (this.AvailableLangs.length>0){if (this.AvailableLangs.indexOf(FCKLanguageManager.ActiveLanguage.Code)>=0) var sLang=FCKLanguageManager.ActiveLanguage.Code;else var sLang=this.AvailableLangs[0];FCKScriptLoader.AddScript(this.Path+'lang/'+sLang+'.js');};FCKScriptLoader.AddScript(this.Path+'fckplugin.js');} var FCKPlugins=FCK.Plugins=new Object();FCKPlugins.ItemsCount=0;FCKPlugins.Loaded=false;FCKPlugins.Items=new Object();for (var i=0;i');else FCK.ExecuteNamedCommand('FormatBlock','<'+formatName+'>');};FCKFormatBlockCommand.prototype.GetState=function(){return FCK.GetNamedCommandValue('FormatBlock');};var FCKPreviewCommand=function(){this.Name='Preview';};FCKPreviewCommand.prototype.Execute=function(){FCK.Preview();};FCKPreviewCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;};var FCKSaveCommand=function(){this.Name='Save';};FCKSaveCommand.prototype.Execute=function(){var oForm=FCK.LinkedField.form;oForm.submit();};FCKSaveCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;};var FCKNewPageCommand=function(){this.Name='NewPage';};FCKNewPageCommand.prototype.Execute=function(){FCK.SetHTML(FCKBrowserInfo.IsGecko?' ':'');if (typeof(FCKConfig.newBgColor)!='undefined') FCK.EditorDocument.bgColor=FCKConfig.newBgColor;};FCKNewPageCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;};var FCKSourceCommand=function(){this.Name='Source';};FCKSourceCommand.prototype.Execute=function(){FCK.SwitchEditMode();};FCKSourceCommand.prototype.GetState=function(){return (FCK.EditMode==FCK_EDITMODE_WYSIWYG?FCK_TRISTATE_OFF:FCK_TRISTATE_ON);} +var FCKDialogCommand=function(name,title,url,width,height,getStateFunction,getStateParam){this.Name=name;this.Title=title;this.Url=url;this.Width=width;this.Height=height;this.GetStateFunction=getStateFunction;this.GetStateParam=getStateParam;};FCKDialogCommand.prototype.Execute=function(){FCKDialog.OpenDialog('FCKDialog_'+this.Name,this.Title,this.Url,this.Width,this.Height);};FCKDialogCommand.prototype.GetState=function(){if (this.GetStateFunction) return this.GetStateFunction(this.GetStateParam);else return FCK_TRISTATE_OFF;};var FCKUndefinedCommand=function(){this.Name='Undefined';};FCKUndefinedCommand.prototype.Execute=function(){alert(FCKLang.NotImplemented);};FCKUndefinedCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;};var FCKFontNameCommand=function(){this.Name='FontName';};FCKFontNameCommand.prototype.Execute=function(fontName){if (fontName==null||fontName==""){}else FCK.ExecuteNamedCommand('FontName',fontName);};FCKFontNameCommand.prototype.GetState=function(){return FCK.GetNamedCommandValue('FontName');};var FCKFontSizeCommand=function(){this.Name='FontSize';};FCKFontSizeCommand.prototype.Execute=function(fontSize){if (typeof(fontSize)=='string') fontSize=parseInt(fontSize);if (fontSize==null||fontSize==''){FCK.ExecuteNamedCommand('FontSize',3);}else FCK.ExecuteNamedCommand('FontSize',fontSize);};FCKFontSizeCommand.prototype.GetState=function(){return FCK.GetNamedCommandValue('FontSize');};var FCKFormatBlockCommand=function(){this.Name='FormatBlock';};FCKFormatBlockCommand.prototype.Execute=function(formatName){if (formatName==null||formatName=='') FCK.ExecuteNamedCommand('FormatBlock','

');else FCK.ExecuteNamedCommand('FormatBlock','<'+formatName+'>');};FCKFormatBlockCommand.prototype.GetState=function(){return FCK.GetNamedCommandValue('FormatBlock');};var FCKPreviewCommand=function(){this.Name='Preview';};FCKPreviewCommand.prototype.Execute=function(){FCK.Preview();};FCKPreviewCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;};var FCKSaveCommand=function(){this.Name='Save';};FCKSaveCommand.prototype.Execute=function(){var oForm=FCK.LinkedField.form;oForm.submit();};FCKSaveCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;};var FCKNewPageCommand=function(){this.Name='NewPage';};FCKNewPageCommand.prototype.Execute=function(){if (confirm('Are you sure you would like to clear the page?')){FCK.SetHTML(FCKBrowserInfo.IsGecko?' ':'');if (typeof(FCKConfig.newBgColor)!='undefined') FCK.EditorDocument.bgColor=FCKConfig.newBgColor;};};FCKNewPageCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;};var FCKSourceCommand=function(){this.Name='Source';};FCKSourceCommand.prototype.Execute=function(){FCK.SwitchEditMode();};FCKSourceCommand.prototype.GetState=function(){return (FCK.EditMode==FCK_EDITMODE_WYSIWYG?FCK_TRISTATE_OFF:FCK_TRISTATE_ON);} var FCKSpellCheckCommand=function(){this.Name='SpellCheck';this.IsEnabled=(FCKConfig.SpellChecker=='SpellerPages');};FCKSpellCheckCommand.prototype.Execute=function(){FCKDialog.OpenDialog('FCKDialog_SpellCheck','Spell Check','dialog/fck_spellerpages.html',440,480);};FCKSpellCheckCommand.prototype.GetState=function(){return this.IsEnabled?FCK_TRISTATE_OFF:FCK_TRISTATE_DISABLED;} var FCKTextColorCommand=function(type){this.Name=type=='ForeColor'?'TextColor':'BGColor';this.Type=type;this._Panel=new FCKPanel();this._Panel.StyleSheet=FCKConfig.SkinPath+'fck_contextmenu.css';this._Panel.Create();this._CreatePanelBody(this._Panel.Document,this._Panel.PanelDiv);};FCKTextColorCommand.prototype.Execute=function(panelX,panelY,relElement){FCK._ActiveColorPanelType=this.Type;this._Panel.Show(panelX,panelY,relElement);};FCKTextColorCommand.prototype.SetColor=function(color){if (FCK._ActiveColorPanelType=='ForeColor') FCK.ExecuteNamedCommand('ForeColor',color);else if (FCKBrowserInfo.IsGecko) FCK.ExecuteNamedCommand('hilitecolor',color);else FCK.ExecuteNamedCommand('BackColor',color);delete FCK._ActiveColorPanelType;};FCKTextColorCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;};FCKTextColorCommand.prototype._CreatePanelBody=function(targetDocument,targetDiv){function CreateSelectionDiv(){var oDiv=targetDocument.createElement("DIV");oDiv.className='ColorDeselected';oDiv.onmouseover=function() { this.className='ColorSelected';};oDiv.onmouseout=function() { this.className='ColorDeselected';};return oDiv;};var oTable=targetDiv.appendChild(targetDocument.createElement("TABLE"));oTable.style.tableLayout='fixed';oTable.cellPadding=0;oTable.cellSpacing=0;oTable.border=0;oTable.width=150;var oCell=oTable.insertRow(-1).insertCell(-1);oCell.colSpan=8;var oDiv=oCell.appendChild(CreateSelectionDiv());oDiv.innerHTML='\ \ \ \ \
'+FCKLang.ColorAutomatic+'
';oDiv.Command=this;oDiv.onclick=function(){this.className='ColorDeselected';this.Command.SetColor('');this.Command._Panel.Hide();};var aColors=FCKConfig.FontColors.split(',');var iCounter=0;while (iCounter

';oDiv.Command=this;oDiv.onclick=function(){this.className='ColorDeselected';this.Command.SetColor('#'+this.Color);this.Command._Panel.Hide();};};};var oCell=oTable.insertRow(-1).insertCell(-1);oCell.colSpan=8;var oDiv=oCell.appendChild(CreateSelectionDiv());oDiv.innerHTML='
'+FCKLang.ColorMoreColors+'
';oDiv.Command=this;oDiv.onclick=function(){this.className='ColorDeselected';this.Command._Panel.Hide();FCKDialog.OpenDialog('FCKDialog_Color',FCKLang.DlgColorTitle,'dialog/fck_colorselector.html',400,330,this.Command.SetColor);};} var FCKPastePlainTextCommand=function(){this.Name='PasteText';};FCKPastePlainTextCommand.prototype.Execute=function(){FCK.PasteAsPlainText();};FCKPastePlainTextCommand.prototype.GetState=function(){return FCK.GetNamedCommandState('Paste');}; @@ -47,7 +47,7 @@ var FCKContextMenuItem=function(contextMenu,commandName,label,hasIcon){this.ContextMenu=contextMenu;this.Command=FCKCommands.GetCommand(commandName);this.Label=label?label:commandName;this.HasIcon=hasIcon?true:false;};FCKContextMenuItem.prototype.CreateTableRow=function(targetTable){this._Row=targetTable.insertRow(-1);this._Row.className='CM_Disabled';this._Row.FCKContextMenuItem=this;this._Row.onmouseover=function(){if (this.className!='CM_Disabled') this.className='CM_Over';};this._Row.onmouseout=function(){if (this.className!='CM_Disabled') this.className='CM_Option';};this._Row.onclick=function(){if (this.className!='CM_Disabled'){this.FCKContextMenuItem.ContextMenu.Hide();this.FCKContextMenuItem.Command.Execute();};return false;};var oCell=this._Row.insertCell(-1);oCell.className='CM_Icon';if (this.HasIcon) oCell.innerHTML='';oCell=this._Row.insertCell(-1);oCell.className='CM_Label';oCell.unselectable='on';oCell.noWrap=true;oCell.innerHTML=this.Label;};FCKContextMenuItem.prototype.SetVisible=function(isVisible){this._Row.style.display=isVisible?'':'none';};FCKContextMenuItem.prototype.RefreshState=function(){switch (this.Command.GetState()){case FCK_TRISTATE_ON:case FCK_TRISTATE_OFF:this._Row.className='CM_Option';break;default:this._Row.className='CM_Disabled';break;};}; var FCKContextMenuSeparator=function(){};FCKContextMenuSeparator.prototype.CreateTableRow=function(targetTable){this._Row=targetTable.insertRow(-1);this._Row.className='CM_Separator';var oCell=this._Row.insertCell(-1);oCell.className='CM_Icon';oCell=this._Row.insertCell(-1);oCell.className='CM_Label';oCell.innerHTML='
';};FCKContextMenuSeparator.prototype.SetVisible=function(isVisible){this._Row.style.display=isVisible?'':'none';};FCKContextMenuSeparator.prototype.RefreshState=function(){}; var FCKContextMenuGroup=function(addSeparator,contextMenu,firstItemCommand,firstItemLabel,hasIcon){this.IsVisible=true;this.Items=new Array();if (addSeparator) this.Add(new FCKContextMenuSeparator());if (contextMenu&&firstItemCommand&&firstItemLabel) this.Add(new FCKContextMenuItem(contextMenu,firstItemCommand,firstItemLabel,hasIcon));this.ValidationFunction=null;};FCKContextMenuGroup.prototype.Add=function(contextMenuItem){this.Items[this.Items.length]=contextMenuItem;};FCKContextMenuGroup.prototype.CreateTableRows=function(table){for (var i=0;i0&&oTag.href.length==0);if (this.Groups['Anchor']) this.Groups['Anchor'].SetVisible(bIsAnchor);if (this.Groups['Link']) this.Groups['Link'].SetVisible(!bIsAnchor&&LinkState()==true);if (this.Groups['TableCell']) this.Groups['TableCell'].SetVisible(sTagName!='TABLE'&&FCKSelection.HasAncestorNode('TABLE'));if (this.Groups['Table']) this.Groups['Table'].SetVisible(sTagName=='TABLE');if (this.Groups['Image']) this.Groups['Image'].SetVisible(sTagName=='IMG');if (this.Groups['Document']) this.Groups['Document'].SetVisible(true&&LinkState()==true);if (this.Groups['BulletedList']) this.Groups['BulletedList'].SetVisible(FCKSelection.HasAncestorNode('UL'));if (this.Groups['NumberedList']) this.Groups['NumberedList'].SetVisible(FCKSelection.HasAncestorNode('OL'));if (this.Groups['Select']) this.Groups['Select'].SetVisible(sTagName=='SELECT');if (this.Groups['Textarea']) this.Groups['Textarea'].SetVisible(sTagName=='TEXTAREA');if (this.Groups['Form']) this.Groups['Form'].SetVisible(FCKSelection.HasAncestorNode('FORM'));if (this.Groups['Checkbox']) this.Groups['Checkbox'].SetVisible(sTagName=='INPUT'&&oTag.type=='checkbox');if (this.Groups['Radio']) this.Groups['Radio'].SetVisible(sTagName=='INPUT'&&oTag.type=='radio');if (this.Groups['TextField']) this.Groups['TextField'].SetVisible(sTagName=='INPUT'&&(oTag.type=='text'||oTag.type=='password'));if (this.Groups['HiddenField']) this.Groups['HiddenField'].SetVisible(sTagName=='INPUT'&&oTag.type=='hidden');if (this.Groups['ImageButton']) this.Groups['ImageButton'].SetVisible(sTagName=='INPUT'&&oTag.type=='image');if (this.Groups['Button']) this.Groups['Button'].SetVisible(sTagName=='INPUT'&&(oTag.type=='button'||oTag.type=='submit'||oTag.type=='reset'));for (var o in this.Groups){this.Groups[o].RefreshState();};}; +var FCKContextMenu=new Object();FCKContextMenu._IsLoaded=false;FCKContextMenu.Reload=function(){this._Div=this._Document.createElement('DIV');this._Div.className='CM_ContextMenu';this._Div.style.position='absolute';this._Div.style.visibility='hidden';this._Document.body.appendChild(this._Div);var oTable=this._Document.createElement('TABLE');oTable.cellSpacing=0;oTable.cellPadding=0;oTable.border=0;this._Div.appendChild(oTable);this.Groups=new Object();for (var i=0;i0&&oTag.href.length==0);if (this.Groups['Anchor']) this.Groups['Anchor'].SetVisible(bIsAnchor);if (this.Groups['Link']) this.Groups['Link'].SetVisible(!bIsAnchor&&LinkState()==true);if (this.Groups['TableCell']) this.Groups['TableCell'].SetVisible(sTagName!='TABLE'&&FCKSelection.HasAncestorNode('TABLE'));if (this.Groups['Table']) this.Groups['Table'].SetVisible(sTagName=='TABLE');if (this.Groups['Image']) this.Groups['Image'].SetVisible(sTagName=='IMG');if (this.Groups['Document']) this.Groups['Document'].SetVisible(true&&DocumentState()==true);if (this.Groups['BulletedList']) this.Groups['BulletedList'].SetVisible(FCKSelection.HasAncestorNode('UL'));if (this.Groups['NumberedList']) this.Groups['NumberedList'].SetVisible(FCKSelection.HasAncestorNode('OL'));if (this.Groups['Select']) this.Groups['Select'].SetVisible(sTagName=='SELECT');if (this.Groups['Textarea']) this.Groups['Textarea'].SetVisible(sTagName=='TEXTAREA');if (this.Groups['Form']) this.Groups['Form'].SetVisible(FCKSelection.HasAncestorNode('FORM'));if (this.Groups['Checkbox']) this.Groups['Checkbox'].SetVisible(sTagName=='INPUT'&&oTag.type=='checkbox');if (this.Groups['Radio']) this.Groups['Radio'].SetVisible(sTagName=='INPUT'&&oTag.type=='radio');if (this.Groups['TextField']) this.Groups['TextField'].SetVisible(sTagName=='INPUT'&&(oTag.type=='text'||oTag.type=='password'));if (this.Groups['HiddenField']) this.Groups['HiddenField'].SetVisible(sTagName=='INPUT'&&oTag.type=='hidden');if (this.Groups['ImageButton']) this.Groups['ImageButton'].SetVisible(sTagName=='INPUT'&&oTag.type=='image');if (this.Groups['Button']) this.Groups['Button'].SetVisible(sTagName=='INPUT'&&(oTag.type=='button'||oTag.type=='submit'||oTag.type=='reset'));for (var o in this.Groups){this.Groups[o].RefreshState();};}; FCKTools.AppendStyleSheet(window.parent.document,FCKConfig.SkinPath+'fck_contextmenu.css');FCKContextMenu.Show=function(x,y){if (!this._Document){this._Document=window.parent.document;};if (!this._IsLoaded){this.Reload();this._Div.style.zIndex=10000;this._Div.oncontextmenu=function() { return false;};};this.RefreshState();var oCoordsA=FCKTools.GetElementPosition(FCK.EditorWindow.frameElement);var oCoordsB=FCKTools.GetElementPosition(window.frameElement);x+=oCoordsA.X+oCoordsB.X;y+=oCoordsA.Y+oCoordsB.Y;var iXSpace=x+this._Div.offsetWidth-this._Div.ownerDocument.defaultView.innerWidth;var iYSpace=y+this._Div.offsetHeight-this._Div.ownerDocument.defaultView.innerHeight;if (iXSpace>0) x-=this._Div.offsetWidth;if (iYSpace>0) y-=this._Div.offsetHeight;this._Div.style.left=x+'px';this._Div.style.top=y+'px';var oActualWindow=FCK.EditorWindow;while (oActualWindow){oActualWindow.document.addEventListener('click',FCKContextMenu._OnDocumentClick,false);if (oActualWindow!=oActualWindow.parent) oActualWindow=oActualWindow.parent;else if (oActualWindow.opener==null) oActualWindow=oActualWindow.opener;else break;};this._Div.style.visibility='';};FCKContextMenu._OnDocumentClick=function(event){var e=event.target;while (e){if (e==FCKContextMenu._Div) return;e=e.parentNode;};FCKContextMenu.Hide();};FCKContextMenu.Hide=function(){this._Div.style.visibility='hidden';this._Div.style.left=this._Div.style.top='1px';} if (!FCKConfig.PluginsPath.endsWith('/')) FCKConfig.PluginsPath+='/';var FCKPlugin=function(name,availableLangs,basePath){this.Name=name;this.BasePath=basePath?basePath:FCKConfig.PluginsPath;this.Path=this.BasePath+name+'/';if (!availableLangs||availableLangs.length==0) this.AvailableLangs=new Array();else this.AvailableLangs=availableLangs.split(',');};FCKPlugin.prototype.Load=function(){if (this.AvailableLangs.length>0){if (this.AvailableLangs.indexOf(FCKLanguageManager.ActiveLanguage.Code)>=0) var sLang=FCKLanguageManager.ActiveLanguage.Code;else var sLang=this.AvailableLangs[0];FCKScriptLoader.AddScript(this.Path+'lang/'+sLang+'.js');};FCKScriptLoader.AddScript(this.Path+'fckplugin.js');} var FCKPlugins=FCK.Plugins=new Object();FCKPlugins.ItemsCount=0;FCKPlugins.Loaded=false;FCKPlugins.Items=new Object();for (var i=0;i