[svn r22369] FS#2867 - The online editor, the Image manager: Visual fixes for the in-dialog mode.

skala
Ivan Tcholakov 17 years ago
parent f5d27acf0a
commit 3b711b883a
  1. 28
      main/inc/lib/fckeditor/editor/fckdialog.html
  2. 6
      main/inc/lib/fckeditor/editor/plugins/ImageManager/assets/manager.css
  3. 2
      main/inc/lib/fckeditor/editor/plugins/ImageManager/fckplugin.js
  4. 37
      main/inc/lib/fckeditor/editor/plugins/ImageManager/manager.php

@ -416,7 +416,10 @@ var Selection =
// Move the focus to the Cancel button so even if the dialog contains a // Move the focus to the Cancel button so even if the dialog contains a
// contentEditable element the selection is properly restored in the editor #2496 // contentEditable element the selection is properly restored in the editor #2496
window.focus() ; window.focus() ;
if ( $( 'btnCancel' ) )
{
$( 'btnCancel' ).focus() ; $( 'btnCancel' ).focus() ;
}
FCK.Selection.Restore() ; FCK.Selection.Restore() ;
}, },
@ -584,6 +587,21 @@ var onReadyRegister = function()
{ {
$( 'contents' ).dir = langDir; $( 'contents' ).dir = langDir;
var src = Args().Page ;
if ( src.indexOf( 'manager.php' ) != -1 )
{
var PopupButtons = $( 'PopupButtons' ) ;
while ( PopupButtons && PopupButtons.firstChild )
{
PopupButtons.removeChild( PopupButtons.firstChild ) ;
}
PopupButtons.style.border = '0px';
if ( FCKBrowserInfo.IsIE && !FCKBrowserInfo.IsIE7 )
{
PopupButtons.style.width = '100%';
}
}
// Start the throbber timer. // Start the throbber timer.
Throbber.Show( 1000 ) ; Throbber.Show( 1000 ) ;
@ -789,7 +807,7 @@ var onReadyRegister = function()
// ]]> // ]]>
</script> </script>
</head> </head>
<body onload="Init();" class="PopupBody"> <body onload="javascript: Init();" class="PopupBody">
<div class="contents" id="contents"> <div class="contents" id="contents">
<div id="header"> <div id="header">
<div id="TitleArea" class="PopupTitle PopupTitleBorder"> <div id="TitleArea" class="PopupTitle PopupTitleBorder">
@ -810,14 +828,14 @@ document.write( Args().Title ) ;
</div> </div>
</div> </div>
<div id="innerContents"></div> <div id="innerContents"></div>
<div id="PopupButtons" class="PopupButtons"> <div id="PopupButtons" class="PopupButtons" style="visibility: hidden;">
<table border="0" cellpadding="0" cellspacing="0"> <table border="0" cellpadding="0" cellspacing="0">
<tr> <tr>
<td width="100%">&nbsp;</td> <td width="100%">&nbsp;</td>
<td nowrap="nowrap"> <td nowrap="nowrap">
<button id="btnOk" style="visibility: hidden;" value="Ok" class="save" onclick="Ok();" fckLang="DlgBtnOK" >Ok</button> <button id="btnOk" style="visibility: hidden;" value="Ok" class="save" onclick="javascript: Ok();" fckLang="DlgBtnOK" >Ok</button>
&nbsp; &nbsp;
<button id="btnCancel" value="Cancel" class="cancel" onclick="Cancel();" fckLang="DlgBtnCancel" >Cancel</button> <button id="btnCancel" value="Cancel" class="cancel" onclick="javascript: Cancel();" fckLang="DlgBtnCancel" >Cancel</button>
</td> </td>
</tr> </tr>
</table> </table>
@ -832,7 +850,7 @@ document.write( Args().Title ) ;
<div class="bc"></div> <div class="bc"></div>
<div class="br"></div> <div class="br"></div>
<div class="cover" id="cover" style="display:none"></div> <div class="cover" id="cover" style="display:none"></div>
<div id="throbberBlock" style="position: absolute; visibility: hidden"></div> <div id="throbberBlock" style="position: absolute; visibility: hidden;"></div>
<script type="text/javascript"> <script type="text/javascript">
// <![CDATA[ // <![CDATA[
// Set the class name for language direction. // Set the class name for language direction.

@ -25,14 +25,14 @@ select, input, button { font: 11px Tahoma,Verdana,sans-serif; }
border-bottom: #cec6b5 1px solid; border-bottom: #cec6b5 1px solid;
background-color: #dedede; background-color: #dedede;
padding: 3px 10px 3px 10px; padding: 3px 10px 3px 10px;
margin-bottom: 15px; /* margin-bottom: 15px; */
} }
.PopupButtons .PopupButtons
{ {
position: absolute; position: absolute;
/* right: 0px; right: 0px;
left: 0px; */ left: 0px;
bottom: 0px; bottom: 0px;
border-top: #cec6b5 1px solid; border-top: #cec6b5 1px solid;
background-color: #dedede; background-color: #dedede;

@ -209,7 +209,7 @@ ImageManager.prototype.insert = function(outparam)
return; return;
//}, outparam); //}, outparam);
}, outparam, 'FCKDialog_ImageManager', 'Insert Image', 800, 600 ); }, outparam, 'FCKDialog_ImageManager', 'Insert Image', 850, 500 );
} }
}; };

@ -50,7 +50,7 @@
var _editor_lang = 'en' ; var _editor_lang = 'en' ;
if ( window.opener ) if ( window.opener )
{ {
window.resizeTo( 800, 500 ) ; window.resizeTo( 850, 500 ) ;
if ( window.opener.ImageManager && window.opener.ImageManager.I18N ) if ( window.opener.ImageManager && window.opener.ImageManager.I18N )
{ {
@ -72,7 +72,7 @@
} }
// Language object not found? // Language object not found?
if (!this.I18N) if ( !this.I18N )
{ {
// Read it now - copy in next script block // Read it now - copy in next script block
document.write( '<script type="text/javascript" src="lang/' + _editor_lang + '.js"><\/script>' ); document.write( '<script type="text/javascript" src="lang/' + _editor_lang + '.js"><\/script>' );
@ -90,6 +90,14 @@
I18N = this.ImageManager.I18N; I18N = this.ImageManager.I18N;
} }
function Init()
{
if (window.opener)
{
document.getElementById('dialog_title').style.visibility = '' ;
}
}
/*]]>*/ /*]]>*/
</script> </script>
@ -101,19 +109,20 @@
/*<![CDATA[*/ /*<![CDATA[*/
body { body {
padding: 0px; padding: 0px;
overflow: hidden;
} }
/*]]>*/ /*]]>*/
</style> </style>
</head> </head>
<body> <body onload='javascript: Init();'>
<div class="PopupTitle">Insert Image</div> <div id="dialog_title" class="PopupTitle" style="visibility: hidden;">Insert Image</div>
<form action="images.php" id="uploadForm" method="post" enctype="multipart/form-data"> <form action="images.php" id="uploadForm" method="post" enctype="multipart/form-data">
<fieldset style="margin-left: 15px; margin-right: 15px;"><legend>Image Manager</legend> <fieldset style="margin-left: 15px; margin-right: 15px;"><legend>Image Manager</legend>
<div class="dirs"> <div class="dirs">
<label for="dirPath">Directory</label> <label for="dirPath">Directory</label>
<select name="dir" class="dirWidth" id="dirPath" onchange="updateDir(this)" style="width: 400px;"> <select name="dir" class="dirWidth" id="dirPath" onchange="javascript: updateDir(this);" style="width: 400px;">
<option value="/">/</option> <option value="/">/</option>
<?php <?php
foreach($dirs as $relative=>$fullpath) { ?> foreach($dirs as $relative=>$fullpath) { ?>
@ -139,7 +148,7 @@ body {
<td><input type="text" id="f_url" class="largelWidth" value="" /></td> <td><input type="text" id="f_url" class="largelWidth" value="" /></td>
<td rowspan="3" align="right">&nbsp;</td> <td rowspan="3" align="right">&nbsp;</td>
<td align="right"><label for="f_width">Width</label></td> <td align="right"><label for="f_width">Width</label></td>
<td><input type="text" id="f_width" class="smallWidth" value="" onchange="javascript:checkConstrains('width');"/></td> <td><input type="text" id="f_width" class="smallWidth" value="" onchange="javascript: checkConstrains('width');"/></td>
<td rowspan="2" align="right"><img src="img/locked.gif" id="imgLock" width="25" height="32" alt="Constrained Proportions" /></td> <td rowspan="2" align="right"><img src="img/locked.gif" id="imgLock" width="25" height="32" alt="Constrained Proportions" /></td>
<td rowspan="3" align="right">&nbsp;</td> <td rowspan="3" align="right">&nbsp;</td>
<td align="right"><label for="f_vert">V Space</label></td> <td align="right"><label for="f_vert">V Space</label></td>
@ -149,7 +158,7 @@ body {
<td align="right"><label for="f_alt">Alt</label></td> <td align="right"><label for="f_alt">Alt</label></td>
<td><input type="text" id="f_alt" class="largelWidth" value="" /></td> <td><input type="text" id="f_alt" class="largelWidth" value="" /></td>
<td align="right"><label for="f_height">Height</label></td> <td align="right"><label for="f_height">Height</label></td>
<td><input type="text" id="f_height" class="smallWidth" value="" onchange="javascript:checkConstrains('height');"/></td> <td><input type="text" id="f_height" class="smallWidth" value="" onchange="javascript: checkConstrains('height');"/></td>
<td align="right"><label for="f_horiz">H Space</label></td> <td align="right"><label for="f_horiz">H Space</label></td>
<td><input type="text" id="f_horiz" class="smallWidth" value="" /></td> <td><input type="text" id="f_horiz" class="smallWidth" value="" /></td>
</tr> </tr>
@ -160,7 +169,7 @@ body {
<table cellpadding="0" cellspacing="0" border="0"> <table cellpadding="0" cellspacing="0" border="0">
<tr> <tr>
<td><input type="file" name="upload" id="upload"/></td> <td><input type="file" name="upload" id="upload"/></td>
<td>&nbsp;<button type="submit" class="upload" name="submit" onclick="doUpload();"/>Upload</button></td> <td>&nbsp;<button type="submit" class="upload" name="submit" onclick="javascript: doUpload();"/>Upload</button></td>
</tr> </tr>
</table> </table>
</td> </td>
@ -169,7 +178,7 @@ body {
<?php } ?> <?php } ?>
<td align="right"><label for="f_align">Align</label></td> <td align="right"><label for="f_align">Align</label></td>
<td colspan="2"> <td colspan="2">
<select size="1" id="f_align" title="Positioning of this image"> <select size="1" id="f_align" title="Positioning of this image" style="width: 130px;">
<option value="" >Not Set</option> <option value="" >Not Set</option>
<option value="left" >Left</option> <option value="left" >Left</option>
<option value="right" >Right</option> <option value="right" >Right</option>
@ -211,17 +220,17 @@ body {
<?php } ?> <?php } ?>
<input type="hidden" id="orginal_width" /> <input type="hidden" id="orginal_width" />
<input type="hidden" id="orginal_height" /> <input type="hidden" id="orginal_height" />
<input type="checkbox" id="constrain_prop" checked="checked" onclick="javascript:toggleConstrains(this);" /> <input type="checkbox" id="constrain_prop" checked="checked" onclick="javascript: toggleConstrains(this);" />
</td> </td>
<td colspan="5"><label for="constrain_prop">Constrain Proportions</label></td> <td colspan="5"><label for="constrain_prop">Constrain Proportions</label></td>
</tr> </tr>
</table> </table>
<!--// image properties --> <!--// image properties -->
<div class="PopupButtons" style="width: 100%;"> <div class="PopupButtons" style="width: 100%;">
<div style="text-align: right; margin-left: 15px; margin-right: 15px;"> <div style="float: right; white-space: nowrap; margin-right: 25px;">
<button type="button" class="refresh" onclick="return refresh();">Refresh</button>&nbsp; <button type="button" class="refresh" onclick="javascript: return refresh();">Refresh</button>&nbsp;
<button type="button" class="save" onclick="return onOK();">Ok</button>&nbsp; <button type="button" class="save" onclick="javascript: return onOK();">Ok</button>&nbsp;
<button type="button" class="cancel" onclick="return onCancel();">Cancel</button> <button type="button" class="cancel" onclick="javascript: return onCancel();">Cancel</button>
</div> </div>
</div> </div>
<input type="hidden" id="f_file" name="f_file" /> <input type="hidden" id="f_file" name="f_file" />

Loading…
Cancel
Save