[svn r17448] FS#2867 - FCKEditor: Combining functionalities of Image Manager and Image Properties dialog under single icon/command (unfinished).

skala
Ivan Tcholakov 17 years ago
parent 6bd667d96c
commit b3d8097eda
  1. 17
      main/inc/lib/fckeditor/editor/plugins/ImageManager/fckplugin.js
  2. 4
      main/inc/lib/fckeditor/editor/plugins/customizations/fckplugin.js

@ -43,7 +43,7 @@
ImageManager_click(FCK, null)
}
// Open the Placeholder dialog on double click.
// Open the Image properties dialog on double click.
function ImageManager_doubleClick (img) {
//if ( img.tagName == 'IMG' ) FCKCommands.GetCommand( 'ImageManager' ).Execute() ;
@ -53,7 +53,8 @@
!img.getAttribute( '_fckmp3' ) &&
!img.getAttribute( '_fckvideo' ) )
{
FCKCommands.GetCommand( 'ImageManager' ).Execute() ;
//FCKCommands.GetCommand( 'ImageManager' ).Execute() ;
FCKCommands.GetCommand( 'Image' ).Execute() ;
}
}
@ -61,6 +62,18 @@
// starting ImageManager
function ImageManager_click(editor, sender) {
// If an existing image has been selected let us use the Image Properties dialog.
var image = FCK.Selection.GetSelectedElement() ;
if ( image )
{
if ( image.nodeName.IEquals( 'img' ) )
{
FCKCommands.GetCommand( 'Image' ).Execute() ;
return ;
}
}
var wArgs = {};
if(FCKSelection.GetType() == 'Control') {
var sElm = FCK.Selection.GetSelectedElement();

@ -528,7 +528,9 @@ FCK.ContextMenu.RegisterListener( {
{
// Grouping all image-related commands at the bottom.
menu.AddSeparator();
menu.AddItem( 'Image', FCKLang.ImageProperties, 37 ) ;
// If an existing image has been selected, then Image Manager actually activates the Image Properties dialog.
// These two dialogs are united under single button.
//menu.AddItem( 'Image', FCKLang.ImageProperties, 37 ) ;
menu.AddItem( 'ImageManager', FCKLang.ImageProperties, FCKConfig.PluginsPath + 'ImageManager/icon.gif' ) ;
// The "imgmap" plugin should add its own icon here.
}

Loading…
Cancel
Save