-
3member/404.php
-
5member/account.php
-
5member/ad.php
-
5member/address.php
-
3member/ajax.php
-
5member/alert.php
-
5member/ask.php
-
6member/avatar.php
-
5member/award.php
-
5member/biz.php
-
4member/buy.php
-
4member/cart.php
-
5member/cash.php
-
7member/charge.php
-
5member/chat.php
-
5member/child.php
-
5member/coupon.php
-
5member/credit.php
-
5member/deal.php
-
5member/deposit.php
-
5member/edit.php
-
5member/editor/fckeditor/change.log
-
15member/editor/fckeditor/editor/css/behaviors/disablehandles.htc
-
36member/editor/fckeditor/editor/css/behaviors/showtableborders.htc
-
1member/editor/fckeditor/editor/css/fck_editorarea.css
-
1member/editor/fckeditor/editor/css/fck_internal.css
-
19member/editor/fckeditor/editor/css/fck_showtableborders_gecko.css
-
BINmember/editor/fckeditor/editor/css/images/block_address.png
-
BINmember/editor/fckeditor/editor/css/images/block_blockquote.png
-
BINmember/editor/fckeditor/editor/css/images/block_div.png
-
BINmember/editor/fckeditor/editor/css/images/block_h1.png
-
BINmember/editor/fckeditor/editor/css/images/block_h2.png
-
BINmember/editor/fckeditor/editor/css/images/block_h3.png
-
BINmember/editor/fckeditor/editor/css/images/block_h4.png
-
BINmember/editor/fckeditor/editor/css/images/block_h5.png
-
BINmember/editor/fckeditor/editor/css/images/block_h6.png
-
BINmember/editor/fckeditor/editor/css/images/block_p.png
-
BINmember/editor/fckeditor/editor/css/images/block_pre.png
-
BINmember/editor/fckeditor/editor/css/images/fck_anchor.gif
-
BINmember/editor/fckeditor/editor/css/images/fck_flashlogo.gif
-
BINmember/editor/fckeditor/editor/css/images/fck_hiddenfield.gif
-
BINmember/editor/fckeditor/editor/css/images/fck_pagebreak.gif
-
BINmember/editor/fckeditor/editor/css/images/fck_plugin.gif
-
1member/editor/fckeditor/editor/dialog/common/fck_dialog_common.css
-
271member/editor/fckeditor/editor/dialog/common/fck_dialog_common.js
-
132member/editor/fckeditor/editor/dialog/common/fck_flash.js
-
23member/editor/fckeditor/editor/dialog/common/fck_flash_preview.html
-
487member/editor/fckeditor/editor/dialog/common/fck_image.js
-
48member/editor/fckeditor/editor/dialog/common/fck_image_preview.html
-
730member/editor/fckeditor/editor/dialog/common/fck_link.js
-
BINmember/editor/fckeditor/editor/dialog/common/images/locked.gif
-
BINmember/editor/fckeditor/editor/dialog/common/images/reset.gif
-
BINmember/editor/fckeditor/editor/dialog/common/images/template1.gif
-
BINmember/editor/fckeditor/editor/dialog/common/images/template2.gif
-
BINmember/editor/fckeditor/editor/dialog/common/images/template3.gif
-
BINmember/editor/fckeditor/editor/dialog/common/images/unlocked.gif
-
190member/editor/fckeditor/editor/dialog/fck_anchor.html
-
96member/editor/fckeditor/editor/dialog/fck_attach.html
-
150member/editor/fckeditor/editor/dialog/fck_colorselector.html
-
186member/editor/fckeditor/editor/dialog/fck_flash.html
-
276member/editor/fckeditor/editor/dialog/fck_image.html
-
282member/editor/fckeditor/editor/dialog/fck_link.html
-
98member/editor/fckeditor/editor/dialog/fck_listprop.html
-
323member/editor/fckeditor/editor/dialog/fck_paste.html
-
508member/editor/fckeditor/editor/dialog/fck_replace.html
-
89member/editor/fckeditor/editor/dialog/fck_smiley.html
-
44member/editor/fckeditor/editor/dialog/fck_source.html
-
99member/editor/fckeditor/editor/dialog/fck_specialchar.html
-
276member/editor/fckeditor/editor/dialog/fck_table.html
-
235member/editor/fckeditor/editor/dialog/fck_tablecell.html
-
220member/editor/fckeditor/editor/dialog/fck_template.html
-
41member/editor/fckeditor/editor/dtd/fck_dtd_test.html
-
93member/editor/fckeditor/editor/dtd/fck_xhtml10strict.js
-
117member/editor/fckeditor/editor/dtd/fck_xhtml10transitional.js
-
130member/editor/fckeditor/editor/fckdebug.html
-
399member/editor/fckeditor/editor/fckdialog.html
-
145member/editor/fckeditor/editor/fckeditor.html
-
BINmember/editor/fckeditor/editor/images/anchor.gif
-
BINmember/editor/fckeditor/editor/images/arrow_ltr.gif
-
BINmember/editor/fckeditor/editor/images/arrow_rtl.gif
-
BINmember/editor/fckeditor/editor/images/ext/att.gif
-
BINmember/editor/fckeditor/editor/images/ext/doc.gif
-
BINmember/editor/fckeditor/editor/images/ext/img.gif
-
1member/editor/fckeditor/editor/images/ext/index.html
-
BINmember/editor/fckeditor/editor/images/ext/mov.gif
-
BINmember/editor/fckeditor/editor/images/ext/oth.gif
-
BINmember/editor/fckeditor/editor/images/ext/pdf.gif
-
BINmember/editor/fckeditor/editor/images/ext/ppt.gif
-
BINmember/editor/fckeditor/editor/images/ext/swf.gif
-
BINmember/editor/fckeditor/editor/images/ext/xls.gif
-
BINmember/editor/fckeditor/editor/images/ext/zip.gif
-
BINmember/editor/fckeditor/editor/images/smiley/msn/001.gif
-
BINmember/editor/fckeditor/editor/images/smiley/msn/002.gif
-
BINmember/editor/fckeditor/editor/images/smiley/msn/003.gif
-
BINmember/editor/fckeditor/editor/images/smiley/msn/004.gif
-
BINmember/editor/fckeditor/editor/images/smiley/msn/005.gif
-
BINmember/editor/fckeditor/editor/images/smiley/msn/006.gif
-
BINmember/editor/fckeditor/editor/images/smiley/msn/007.gif
-
BINmember/editor/fckeditor/editor/images/smiley/msn/008.gif
-
BINmember/editor/fckeditor/editor/images/smiley/msn/009.gif
@ -0,0 +1,3 @@ |
|||
<?php |
|||
require '../404.php'; |
|||
?>
|
|||
@ -0,0 +1,5 @@ |
|||
<?php |
|||
$moduleid = 2; |
|||
require '../common.inc.php'; |
|||
require DT_ROOT.'/module/'.$module.'/account.inc.php'; |
|||
?>
|
|||
@ -0,0 +1,5 @@ |
|||
<?php |
|||
$moduleid = 2; |
|||
require '../common.inc.php'; |
|||
require DT_ROOT.'/module/'.$module.'/ad.inc.php'; |
|||
?>
|
|||
@ -0,0 +1,5 @@ |
|||
<?php |
|||
$moduleid = 2; |
|||
require '../common.inc.php'; |
|||
require DT_ROOT.'/module/'.$module.'/address.inc.php'; |
|||
?>
|
|||
@ -0,0 +1,3 @@ |
|||
<?php |
|||
include '../ajax.php'; |
|||
?>
|
|||
@ -0,0 +1,5 @@ |
|||
<?php |
|||
$moduleid = 2; |
|||
require '../common.inc.php'; |
|||
require DT_ROOT.'/module/'.$module.'/alert.inc.php'; |
|||
?>
|
|||
@ -0,0 +1,5 @@ |
|||
<?php |
|||
$moduleid = 2; |
|||
require '../common.inc.php'; |
|||
require DT_ROOT.'/module/'.$module.'/ask.inc.php'; |
|||
?>
|
|||
@ -0,0 +1,6 @@ |
|||
<?php |
|||
$_DPOST = $_POST; |
|||
$moduleid = 2; |
|||
require '../common.inc.php'; |
|||
require DT_ROOT.'/module/'.$module.'/avatar.inc.php'; |
|||
?>
|
|||
@ -0,0 +1,5 @@ |
|||
<?php |
|||
$moduleid = 2; |
|||
require '../common.inc.php'; |
|||
require DT_ROOT.'/module/'.$module.'/award.inc.php'; |
|||
?>
|
|||
@ -0,0 +1,5 @@ |
|||
<?php |
|||
$moduleid = 2; |
|||
require '../common.inc.php'; |
|||
require DT_ROOT.'/module/'.$module.'/biz.inc.php'; |
|||
?>
|
|||
@ -0,0 +1,4 @@ |
|||
<?php |
|||
require '../common.inc.php'; |
|||
require DT_ROOT.'/module/member/buy.inc.php'; |
|||
?>
|
|||
@ -0,0 +1,4 @@ |
|||
<?php |
|||
require '../common.inc.php'; |
|||
require DT_ROOT.'/module/member/cart.inc.php'; |
|||
?>
|
|||
@ -0,0 +1,5 @@ |
|||
<?php |
|||
$moduleid = 2; |
|||
require '../common.inc.php'; |
|||
require DT_ROOT.'/module/'.$module.'/cash.inc.php'; |
|||
?>
|
|||
@ -0,0 +1,7 @@ |
|||
<?php |
|||
$_DPOST = $_POST; |
|||
$_DGET = $_GET; |
|||
$moduleid = 2; |
|||
require '../common.inc.php'; |
|||
require DT_ROOT.'/module/'.$module.'/charge.inc.php'; |
|||
?>
|
|||
@ -0,0 +1,5 @@ |
|||
<?php |
|||
$moduleid = 2; |
|||
require '../common.inc.php'; |
|||
require DT_ROOT.'/module/'.$module.'/chat.inc.php'; |
|||
?>
|
|||
@ -0,0 +1,5 @@ |
|||
<?php |
|||
$moduleid = 2; |
|||
require '../common.inc.php'; |
|||
require DT_ROOT.'/module/'.$module.'/child.inc.php'; |
|||
?>
|
|||
@ -0,0 +1,5 @@ |
|||
<?php |
|||
$moduleid = 2; |
|||
require '../common.inc.php'; |
|||
require DT_ROOT.'/module/'.$module.'/coupon.inc.php'; |
|||
?>
|
|||
@ -0,0 +1,5 @@ |
|||
<?php |
|||
$moduleid = 2; |
|||
require '../common.inc.php'; |
|||
require DT_ROOT.'/module/'.$module.'/credit.inc.php'; |
|||
?>
|
|||
@ -0,0 +1,5 @@ |
|||
<?php |
|||
$moduleid = 2; |
|||
require '../common.inc.php'; |
|||
require DT_ROOT.'/module/'.$module.'/deal.inc.php'; |
|||
?>
|
|||
@ -0,0 +1,5 @@ |
|||
<?php |
|||
$moduleid = 2; |
|||
require '../common.inc.php'; |
|||
require DT_ROOT.'/module/'.$module.'/deposit.inc.php'; |
|||
?>
|
|||
@ -0,0 +1,5 @@ |
|||
<?php |
|||
$moduleid = 2; |
|||
require '../common.inc.php'; |
|||
require DT_ROOT.'/module/'.$module.'/edit.inc.php'; |
|||
?>
|
|||
@ -0,0 +1,5 @@ |
|||
2009-11-07 editor/fckeditor.html Fix IE8+ |
|||
2011-06-22 editor/dialog/common/fck_dialog_common.js Fix FireFox 4+ |
|||
2011-06-22 editor/fckeditor.html Fix FireFox 4+ |
|||
2012-11-09 fckeditor.js Fix IE 10+ |
|||
2012-11-30 editor/js/fckeditorcode_gecko.js Fix FireFox 17+ |
|||
@ -0,0 +1,15 @@ |
|||
<public:component lightweight="true"> |
|||
|
|||
<script language="javascript"> |
|||
|
|||
function CancelEvent() |
|||
{ |
|||
return false ; |
|||
} |
|||
|
|||
this.onresizestart = CancelEvent ; |
|||
this.onbeforeeditfocus = CancelEvent ; |
|||
|
|||
</script> |
|||
|
|||
</public:component> |
|||
@ -0,0 +1,36 @@ |
|||
<public:component lightweight="true"> |
|||
|
|||
<public:attach event="oncontentready" onevent="ShowBorders()" /> |
|||
<public:attach event="onpropertychange" onevent="OnPropertyChange()" /> |
|||
|
|||
<script language="javascript"> |
|||
|
|||
var oClassRegex = /\s*FCK__ShowTableBorders/ ; |
|||
|
|||
function ShowBorders() |
|||
{ |
|||
if ( this.border == 0 ) |
|||
{ |
|||
if ( !oClassRegex.test( this.className ) ) |
|||
this.className += ' FCK__ShowTableBorders' ; |
|||
} |
|||
else |
|||
{ |
|||
if ( oClassRegex.test( this.className ) ) |
|||
{ |
|||
this.className = this.className.replace( oClassRegex, '' ) ; |
|||
if ( this.className.length == 0 ) |
|||
this.removeAttribute( 'className', 0 ) ; |
|||
} |
|||
} |
|||
} |
|||
|
|||
function OnPropertyChange() |
|||
{ |
|||
if ( event.propertyName == 'border' || event.propertyName == 'className' ) |
|||
ShowBorders.call(this) ; |
|||
} |
|||
|
|||
</script> |
|||
|
|||
</public:component> |
|||
@ -0,0 +1 @@ |
|||
body{background-color: #ffffff;padding: 5px 5px 5px 5px;margin: 0px;}body, td{font-family: Arial, Verdana, sans-serif;font-size: 14px;}a[href]{color: -moz-hyperlinktext !important;text-decoration: -moz-anchor-decoration;}.Bold{font-weight: bold;}.Title{font-weight: bold;font-size: 18px;color: #cc3300;}.Code{border: #8b4513 1px solid;padding-right: 5px;padding-left: 5px;color: #000066;font-family: 'Courier New' , Monospace;background-color: #ff9933;} p {text-indent:2em;} .de-pagebreak {border:1px dotted #FF6600;font-size:0;height:2px;} .de-photo {} .de-vote {} a {color:#024893;} |
|||
@ -0,0 +1 @@ |
|||
html{ min-height: 100%;}table.FCK__ShowTableBorders, table.FCK__ShowTableBorders td, table.FCK__ShowTableBorders th{ border: #d3d3d3 1px solid;}form{ border: 1px dotted #FF0000; padding: 2px;}.FCK__Flash{ border: #a9a9a9 1px solid; background-position: center center; background-image: url(images/fck_flashlogo.gif); background-repeat: no-repeat; width: 80px; height: 80px;}.FCK__UnknownObject{ border: #a9a9a9 1px solid; background-position: center center; background-image: url(images/fck_extend.gif); background-repeat: no-repeat; width: 80px; height: 80px;}.FCK__Anchor{ border: 1px dotted #00F; background-position: center center; background-image: url(images/fck_anchor.gif); background-repeat: no-repeat; width: 16px; height: 15px; vertical-align: middle;}.FCK__AnchorC{ border: 1px dotted #00F; background-position: 1px center; background-image: url(images/fck_anchor.gif); background-repeat: no-repeat; padding-left: 18px;}a[name]{ border: 1px dotted #00F; background-position: 0 center; background-image: url(images/fck_anchor.gif); background-repeat: no-repeat; padding-left: 18px;}.FCK__PageBreak{ background-position: center center; background-image: url(images/fck_pagebreak.gif); background-repeat: no-repeat; clear: both; display: block; float: none; width: 100%; border-top: #999999 1px dotted; border-bottom: #999999 1px dotted; border-right: 0px; border-left: 0px; height: 5px;}.FCK__InputHidden{ width: 19px; height: 18px; background-image: url(images/fck_hiddenfield.gif); background-repeat: no-repeat; vertical-align: text-bottom; background-position: center center;}.FCK__ShowBlocks p,.FCK__ShowBlocks div,.FCK__ShowBlocks pre,.FCK__ShowBlocks address,.FCK__ShowBlocks blockquote,.FCK__ShowBlocks h1,.FCK__ShowBlocks h2,.FCK__ShowBlocks h3,.FCK__ShowBlocks h4,.FCK__ShowBlocks h5,.FCK__ShowBlocks h6{ background-repeat: no-repeat; border: 1px dotted gray; padding-top: 8px; padding-left: 8px;}.FCK__ShowBlocks p{ background-image: url(images/block_p.png);}.FCK__ShowBlocks div{ background-image: url(images/block_div.png);}.FCK__ShowBlocks pre{ background-image: url(images/block_pre.png);}.FCK__ShowBlocks address{ background-image: url(images/block_address.png);}.FCK__ShowBlocks blockquote{ background-image: url(images/block_blockquote.png);}.FCK__ShowBlocks h1{ background-image: url(images/block_h1.png);}.FCK__ShowBlocks h2{ background-image: url(images/block_h2.png);}.FCK__ShowBlocks h3{ background-image: url(images/block_h3.png);}.FCK__ShowBlocks h4{ background-image: url(images/block_h4.png);}.FCK__ShowBlocks h5{ background-image: url(images/block_h5.png);}.FCK__ShowBlocks h6{ background-image: url(images/block_h6.png);} |
|||
@ -0,0 +1,19 @@ |
|||
/* For tables with the "border" attribute set to "0" */ |
|||
table[border="0"], |
|||
table[border="0"] > tr > td, table[border="0"] > tr > th, |
|||
table[border="0"] > tbody > tr > td, table[border="0"] > tbody > tr > th, |
|||
table[border="0"] > thead > tr > td, table[border="0"] > thead > tr > th, |
|||
table[border="0"] > tfoot > tr > td, table[border="0"] > tfoot > tr > th |
|||
{ |
|||
border: #d3d3d3 1px dotted ; |
|||
} |
|||
|
|||
/* For tables with no "border" attribute set */ |
|||
table:not([border]), |
|||
table:not([border]) > tr > td, table:not([border]) > tr > th, |
|||
table:not([border]) > tbody > tr > td, table:not([border]) > tbody > tr > th, |
|||
table:not([border]) > thead > tr > td, table:not([border]) > thead > tr > th, |
|||
table:not([border]) > tfoot > tr > td, table:not([border]) > tfoot > tr > th |
|||
{ |
|||
border: #d3d3d3 1px dotted ; |
|||
} |
|||
|
After Width: 45 | Height: 15 | Size: 288 B |
|
After Width: 55 | Height: 15 | Size: 293 B |
|
After Width: 30 | Height: 15 | Size: 229 B |
|
After Width: 30 | Height: 15 | Size: 218 B |
|
After Width: 30 | Height: 15 | Size: 220 B |
|
After Width: 30 | Height: 15 | Size: 219 B |
|
After Width: 30 | Height: 15 | Size: 229 B |
|
After Width: 30 | Height: 15 | Size: 236 B |
|
After Width: 30 | Height: 15 | Size: 216 B |
|
After Width: 30 | Height: 15 | Size: 205 B |
|
After Width: 30 | Height: 15 | Size: 223 B |
|
After Width: 16 | Height: 15 | Size: 184 B |
|
After Width: 30 | Height: 22 | Size: 123 B |
|
After Width: 19 | Height: 18 | Size: 105 B |
|
After Width: 15 | Height: 5 | Size: 54 B |
|
After Width: 48 | Height: 48 | Size: 1.7 KiB |
@ -0,0 +1 @@ |
|||
.ImagePreviewArea{ border: #000000 1px solid; overflow: auto; width: 100%; height: 170px; background-color: #ffffff;}.FlashPreviewArea{ border: #000000 1px solid; padding: 5px; overflow: auto; width: 100%; height: 170px; background-color: #ffffff;}.BtnReset{ float: left; background-position: center center; background-image: url(images/reset.gif); width: 16px; height: 16px; background-repeat: no-repeat; border: 1px none; font-size: 1px ;}.BtnLocked, .BtnUnlocked{ float: left; background-position: center center; background-image: url(images/locked.gif); width: 16px; height: 16px; background-repeat: no-repeat; border: none 1px; font-size: 1px ;}.BtnUnlocked{ background-image: url(images/unlocked.gif);}.BtnOver{ border: outset 1px; cursor: pointer; cursor: hand;} |
|||
@ -0,0 +1,271 @@ |
|||
(function() |
|||
{ |
|||
var d = document.domain ; |
|||
|
|||
while ( true ) |
|||
{ |
|||
try |
|||
{ |
|||
var test = window.parent.document.domain ; |
|||
/* DT ADD 2011-06-22// Fix Firefox 4+*/ |
|||
var uaL = navigator.userAgent.toLowerCase(); |
|||
if(uaL.indexOf('firefox') != -1 && parseInt(uaL.match(/firefox\/(\d+)/)[1], 10) >= 4) { |
|||
if(test != document.domain) document.domain = test; |
|||
} |
|||
/* DT ADD 2011-06-22\\*/ |
|||
break ; |
|||
} |
|||
catch( e ) {} |
|||
d = d.replace( /.*?(?:\.|$)/, '' ) ; |
|||
|
|||
if ( d.length == 0 ) |
|||
break ; |
|||
|
|||
try |
|||
{ |
|||
document.domain = d ; |
|||
} |
|||
catch (e) |
|||
{ |
|||
break ; |
|||
} |
|||
} |
|||
})() ; |
|||
function GetCommonDialogCss( prefix ) |
|||
{ |
|||
return FCKConfig.BasePath + 'dialog/common/' + '|.ImagePreviewArea{border:#000 1px solid;overflow:auto;width:100%;height:170px;background-color:#fff}.FlashPreviewArea{border:#000 1px solid;padding:5px;overflow:auto;width:100%;height:170px;background-color:#fff}.BtnReset{float:left;background-position:center center;background-image:url(images/reset.gif);width:16px;height:16px;background-repeat:no-repeat;border:1px none;font-size:1px}.BtnLocked,.BtnUnlocked{float:left;background-position:center center;background-image:url(images/locked.gif);width:16px;height:16px;background-repeat:no-repeat;border:none 1px;font-size:1px}.BtnUnlocked{background-image:url(images/unlocked.gif)}.BtnOver{border:outset 1px;cursor:pointer;cursor:hand}' ; |
|||
} |
|||
function GetE( elementId ) |
|||
{ |
|||
return document.getElementById( elementId ) ; |
|||
} |
|||
|
|||
function ShowE( element, isVisible ) |
|||
{ |
|||
if ( typeof( element ) == 'string' ) |
|||
element = GetE( element ) ; |
|||
element.style.display = isVisible ? '' : 'none' ; |
|||
} |
|||
|
|||
function SetAttribute( element, attName, attValue ) |
|||
{ |
|||
if ( attValue == null || attValue.length == 0 ) |
|||
element.removeAttribute( attName, 0 ) ; |
|||
else |
|||
element.setAttribute( attName, attValue, 0 ) ; |
|||
} |
|||
|
|||
function GetAttribute( element, attName, valueIfNull ) |
|||
{ |
|||
var oAtt = element.attributes[attName] ; |
|||
|
|||
if ( oAtt == null || !oAtt.specified ) |
|||
return valueIfNull ? valueIfNull : '' ; |
|||
|
|||
var oValue = element.getAttribute( attName, 2 ) ; |
|||
|
|||
if ( oValue == null ) |
|||
oValue = oAtt.nodeValue ; |
|||
|
|||
return ( oValue == null ? valueIfNull : oValue ) ; |
|||
} |
|||
|
|||
function SelectField( elementId ) |
|||
{ |
|||
var element = GetE( elementId ) ; |
|||
element.focus() ; |
|||
if ( element.select ) |
|||
element.select() ; |
|||
} |
|||
var IsDigit = ( function() |
|||
{ |
|||
var KeyIdentifierMap = |
|||
{ |
|||
End : 35, |
|||
Home : 36, |
|||
Left : 37, |
|||
Right : 39, |
|||
'U+00007F' : 46 |
|||
} ; |
|||
|
|||
return function ( e ) |
|||
{ |
|||
if ( !e ) |
|||
e = event ; |
|||
|
|||
var iCode = ( e.keyCode || e.charCode ) ; |
|||
|
|||
if ( !iCode && e.keyIdentifier && ( e.keyIdentifier in KeyIdentifierMap ) ) |
|||
iCode = KeyIdentifierMap[ e.keyIdentifier ] ; |
|||
|
|||
return ( |
|||
( iCode >= 48 && iCode <= 57 ) // Numbers
|
|||
|| (iCode >= 35 && iCode <= 40) // Arrows, Home, End
|
|||
|| iCode == 8 // Backspace
|
|||
|| iCode == 46 // Delete
|
|||
|| iCode == 9 // Tab
|
|||
) ; |
|||
} |
|||
} )() ; |
|||
|
|||
String.prototype.Trim = function() |
|||
{ |
|||
return this.replace( /(^\s*)|(\s*$)/g, '' ) ; |
|||
} |
|||
|
|||
String.prototype.StartsWith = function( value ) |
|||
{ |
|||
return ( this.substr( 0, value.length ) == value ) ; |
|||
} |
|||
|
|||
String.prototype.Remove = function( start, length ) |
|||
{ |
|||
var s = '' ; |
|||
|
|||
if ( start > 0 ) |
|||
s = this.substring( 0, start ) ; |
|||
|
|||
if ( start + length < this.length ) |
|||
s += this.substring( start + length , this.length ) ; |
|||
|
|||
return s ; |
|||
} |
|||
|
|||
String.prototype.ReplaceAll = function( searchArray, replaceArray ) |
|||
{ |
|||
var replaced = this ; |
|||
|
|||
for ( var i = 0 ; i < searchArray.length ; i++ ) |
|||
{ |
|||
replaced = replaced.replace( searchArray[i], replaceArray[i] ) ; |
|||
} |
|||
|
|||
return replaced ; |
|||
} |
|||
|
|||
function OpenFileBrowser( url, width, height ) |
|||
{ |
|||
// oEditor must be defined.
|
|||
|
|||
var iLeft = ( oEditor.FCKConfig.ScreenWidth - width ) / 2 ; |
|||
var iTop = ( oEditor.FCKConfig.ScreenHeight - height ) / 2 ; |
|||
|
|||
var sOptions = "toolbar=no,status=no,resizable=yes,dependent=yes,scrollbars=yes" ; |
|||
sOptions += ",width=" + width ; |
|||
sOptions += ",height=" + height ; |
|||
sOptions += ",left=" + iLeft ; |
|||
sOptions += ",top=" + iTop ; |
|||
if ( oEditor.FCKConfig.PreserveSessionOnFileBrowser && oEditor.FCKBrowserInfo.IsIE ) |
|||
{ |
|||
var oWindow = oEditor.window.open( url, 'FCKBrowseWindow', sOptions ) ; |
|||
|
|||
if ( oWindow ) |
|||
{ |
|||
try |
|||
{ |
|||
var sTest = oWindow.name ; |
|||
oWindow.opener = window ; |
|||
} |
|||
catch(e) |
|||
{ |
|||
alert( oEditor.FCKLang.BrowseServerBlocked ) ; |
|||
} |
|||
} |
|||
else |
|||
alert( oEditor.FCKLang.BrowseServerBlocked ) ; |
|||
} |
|||
else |
|||
window.open( url, 'FCKBrowseWindow', sOptions ) ; |
|||
} |
|||
function CreateNamedElement( oEditor, oOriginal, nodeName, oAttributes ) |
|||
{ |
|||
var oNewNode ; |
|||
var oldNode = null ; |
|||
if ( oOriginal && oEditor.FCKBrowserInfo.IsIE ) |
|||
{ |
|||
var bChanged = false; |
|||
for( var attName in oAttributes ) |
|||
bChanged |= ( oOriginal.getAttribute( attName, 2) != oAttributes[attName] ) ; |
|||
|
|||
if ( bChanged ) |
|||
{ |
|||
oldNode = oOriginal ; |
|||
oOriginal = null ; |
|||
} |
|||
} |
|||
|
|||
if ( oOriginal ) |
|||
{ |
|||
oNewNode = oOriginal ; |
|||
} |
|||
else |
|||
{ |
|||
if ( oEditor.FCKBrowserInfo.IsIE ) |
|||
{ |
|||
var sbHTML = [] ; |
|||
sbHTML.push( '<' + nodeName ) ; |
|||
for( var prop in oAttributes ) |
|||
{ |
|||
sbHTML.push( ' ' + prop + '="' + oAttributes[prop] + '"' ) ; |
|||
} |
|||
sbHTML.push( '>' ) ; |
|||
if ( !oEditor.FCKListsLib.EmptyElements[nodeName.toLowerCase()] ) |
|||
sbHTML.push( '</' + nodeName + '>' ) ; |
|||
|
|||
oNewNode = oEditor.FCK.EditorDocument.createElement( sbHTML.join('') ) ; |
|||
if ( oldNode ) |
|||
{ |
|||
CopyAttributes( oldNode, oNewNode, oAttributes ) ; |
|||
oEditor.FCKDomTools.MoveChildren( oldNode, oNewNode ) ; |
|||
oldNode.parentNode.removeChild( oldNode ) ; |
|||
oldNode = null ; |
|||
|
|||
if ( oEditor.FCK.Selection.SelectionData ) |
|||
{ |
|||
var oSel = oEditor.FCK.EditorDocument.selection ; |
|||
oEditor.FCK.Selection.SelectionData = oSel.createRange() ; |
|||
} |
|||
} |
|||
oNewNode = oEditor.FCK.InsertElement( oNewNode ) ; |
|||
if ( oEditor.FCK.Selection.SelectionData ) |
|||
{ |
|||
var range = oEditor.FCK.EditorDocument.body.createControlRange() ; |
|||
range.add( oNewNode ) ; |
|||
oEditor.FCK.Selection.SelectionData = range ; |
|||
} |
|||
} |
|||
else |
|||
{ |
|||
oNewNode = oEditor.FCK.InsertElement( nodeName ) ; |
|||
} |
|||
} |
|||
|
|||
// Set the basic attributes
|
|||
for( var attName in oAttributes ) |
|||
oNewNode.setAttribute( attName, oAttributes[attName], 0 ) ; // 0 : Case Insensitive
|
|||
|
|||
return oNewNode ; |
|||
} |
|||
function CopyAttributes( oSource, oDest, oSkipAttributes ) |
|||
{ |
|||
var aAttributes = oSource.attributes ; |
|||
|
|||
for ( var n = 0 ; n < aAttributes.length ; n++ ) |
|||
{ |
|||
var oAttribute = aAttributes[n] ; |
|||
|
|||
if ( oAttribute.specified ) |
|||
{ |
|||
var sAttName = oAttribute.nodeName ; |
|||
if ( sAttName in oSkipAttributes ) |
|||
continue ; |
|||
|
|||
var sAttValue = oSource.getAttribute( sAttName, 2 ) ; |
|||
if ( sAttValue == null ) |
|||
sAttValue = oAttribute.nodeValue ; |
|||
|
|||
oDest.setAttribute( sAttName, sAttValue, 0 ) ; // 0 : Case Insensitive
|
|||
} |
|||
} |
|||
oDest.style.cssText = oSource.style.cssText ; |
|||
} |
|||
@ -0,0 +1,132 @@ |
|||
var dialog = window.parent ; |
|||
var oEditor = dialog.InnerDialogLoaded() ; |
|||
var FCK = oEditor.FCK ; |
|||
var FCKLang = oEditor.FCKLang ; |
|||
var FCKConfig = oEditor.FCKConfig ; |
|||
var FCKTools = oEditor.FCKTools ; |
|||
dialog.AddTab( 'Info', oEditor.FCKLang.DlgInfoTab ) ; |
|||
if ( FCKConfig.FlashUpload ) |
|||
dialog.AddTab( 'Upload', FCKLang.DlgLnkUpload ) ; |
|||
if ( !FCKConfig.FlashDlgHideAdvanced ) |
|||
dialog.AddTab( 'Advanced', oEditor.FCKLang.DlgAdvancedTag ) ; |
|||
function OnDialogTabChange( tabCode ) |
|||
{ |
|||
ShowE('divInfo' , ( tabCode == 'Info' ) ) ; |
|||
ShowE('divUpload' , ( tabCode == 'Upload' ) ) ; |
|||
ShowE('divAdvanced' , ( tabCode == 'Advanced' ) ) ; |
|||
} |
|||
var oFakeImage = dialog.Selection.GetSelectedElement() ; |
|||
var oEmbed ; |
|||
|
|||
if ( oFakeImage ) |
|||
{ |
|||
if ( oFakeImage.tagName == 'IMG' && oFakeImage.getAttribute('_fckflash') ) |
|||
oEmbed = FCK.GetRealElement( oFakeImage ) ; |
|||
else |
|||
oFakeImage = null ; |
|||
} |
|||
|
|||
window.onload = function() |
|||
{ |
|||
oEditor.FCKLanguageManager.TranslatePage(document) ; |
|||
LoadSelection() ; |
|||
GetE('tdBrowse').style.display = FCKConfig.FlashBrowser ? '' : 'none' ; |
|||
if ( FCKConfig.FlashUpload ) |
|||
GetE('frmUpload').action = FCKConfig.FlashUploadURL ; |
|||
dialog.SetAutoSize( true ) ; |
|||
dialog.SetOkButton( true ) ; |
|||
|
|||
SelectField( 'txtUrl' ) ; |
|||
} |
|||
|
|||
function LoadSelection() |
|||
{ |
|||
if ( ! oEmbed ) return ; |
|||
|
|||
GetE('txtUrl').value = GetAttribute( oEmbed, 'src', '' ) ; |
|||
if(GetE('txtUrl').value.indexOf('vcastr3.swf') > 0) { |
|||
var tmp = GetAttribute( oEmbed, 'flashvars', '' ) ; |
|||
var t1 = tmp.split('<source>'); |
|||
var t2 = t1[1].split('</source>'); |
|||
if(t2[0]) GetE('txtUrl').value = t2[0]; |
|||
} |
|||
GetE('txtWidth').value = GetAttribute( oEmbed, 'width', '' ) ; |
|||
GetE('txtHeight').value = GetAttribute( oEmbed, 'height', '' ) ; |
|||
if(GetAttribute( oEmbed, 'autostart', 'true' ) == 'true') { |
|||
GetE('autostart').checked = true; |
|||
} else { |
|||
GetE('autostart0').checked = true; |
|||
} |
|||
|
|||
GetE('txtAttId').value = oEmbed.id ; |
|||
//GetE('chkAutoPlay').checked = GetAttribute( oEmbed, 'play', 'true' ) == 'true' ;
|
|||
GetE('chkLoop').checked = GetAttribute( oEmbed, 'loop', 'true' ) == 'true' ; |
|||
GetE('chkMenu').checked = GetAttribute( oEmbed, 'menu', 'true' ) == 'true' ; |
|||
GetE('cmbScale').value = GetAttribute( oEmbed, 'scale', '' ).toLowerCase() ; |
|||
|
|||
GetE('txtAttTitle').value = oEmbed.title ; |
|||
|
|||
if ( oEditor.FCKBrowserInfo.IsIE ) |
|||
{ |
|||
GetE('txtAttClasses').value = oEmbed.getAttribute('className') || '' ; |
|||
GetE('txtAttStyle').value = oEmbed.style.cssText ; |
|||
} |
|||
else |
|||
{ |
|||
GetE('txtAttClasses').value = oEmbed.getAttribute('class',2) || '' ; |
|||
GetE('txtAttStyle').value = oEmbed.getAttribute('style',2) || '' ; |
|||
} |
|||
|
|||
UpdatePreview() ; |
|||
} |
|||
function Ok() |
|||
{ |
|||
var v = GetVHTML(); |
|||
if (v) { |
|||
|
|||
//Fix FireFox
|
|||
if(navigator.userAgent.toLowerCase().indexOf('firefox') != -1) { |
|||
v = v.replace(/\:\/\//g, '://fix-firefox-auto.'); |
|||
FCK.InsertHtml(v); |
|||
v = FCK.GetXHTML(true); |
|||
v = v.replace(/\:\/\/fix\-firefox\-auto\./g, '://'); |
|||
FCK.SetData(v); |
|||
return true; |
|||
} |
|||
|
|||
FCK.InsertHtml(v); |
|||
return true ; |
|||
} else { |
|||
alert(oEditor.FCKLang.DlgAlertUrl) ; |
|||
return false ; |
|||
} |
|||
} |
|||
|
|||
function UpdatePreview() |
|||
{ |
|||
var v = GetVHTML(); |
|||
if(v) { |
|||
var ow = GetE('txtWidth').value; |
|||
var oh = GetE('txtHeight').value; |
|||
var nw = 200; |
|||
var nh = parseInt(nw*oh/ow); |
|||
v = v.replace('width="'+ow+'"', 'width="'+nw+'"'); |
|||
v = v.replace('height="'+oh+'"', 'height="'+nh+'"'); |
|||
GetE('vPreview').innerHTML = v; |
|||
} |
|||
} |
|||
|
|||
function SetUrl( url, width, height ) |
|||
{ |
|||
GetE('txtUrl').value = url ; |
|||
|
|||
if ( width ) |
|||
GetE('txtWidth').value = width ; |
|||
|
|||
if ( height ) |
|||
GetE('txtHeight').value = height ; |
|||
|
|||
UpdatePreview() ; |
|||
|
|||
dialog.SetSelectedTab( 'Info' ) ; |
|||
} |
|||
@ -0,0 +1,23 @@ |
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
|||
<html> |
|||
<head> |
|||
<title></title> |
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
|||
<meta name="robots" content="noindex, nofollow"> |
|||
<script src="../common/fck_dialog_common.js" type="text/javascript"></script> |
|||
<script language="javascript"> |
|||
|
|||
var FCKTools = window.parent.FCKTools ; |
|||
var FCKConfig = window.parent.FCKConfig ; |
|||
document.write( FCKTools.GetStyleHtml( FCKConfig.SkinDialogCSS ) ) ; |
|||
document.write( FCKTools.GetStyleHtml( GetCommonDialogCss( '../' ) ) ) ; |
|||
if ( window.parent.FCKConfig.BaseHref.length > 0 ) |
|||
document.write( '<base href="' + window.parent.FCKConfig.BaseHref + '">' ) ; |
|||
window.onload = function() |
|||
{ |
|||
window.parent.SetPreviewElement( document.body ) ; |
|||
} |
|||
</script> |
|||
</head> |
|||
<body style="COLOR: #000000; BACKGROUND-COLOR: #ffffff"></body> |
|||
</html> |
|||
@ -0,0 +1,487 @@ |
|||
var dialog = window.parent ; |
|||
var oEditor = dialog.InnerDialogLoaded() ; |
|||
var FCK = oEditor.FCK ; |
|||
var FCKLang = oEditor.FCKLang ; |
|||
var FCKConfig = oEditor.FCKConfig ; |
|||
var FCKDebug = oEditor.FCKDebug ; |
|||
var FCKTools = oEditor.FCKTools ; |
|||
|
|||
var bImageButton = ( document.location.search.length > 0 && document.location.search.substr(1) == 'ImageButton' ) ; |
|||
|
|||
//#### Dialog Tabs
|
|||
|
|||
// Set the dialog tabs.
|
|||
if ( FCKConfig.ImageUpload ) |
|||
dialog.AddTab( 'Upload', FCKLang.DlgLnkUpload ) ; |
|||
|
|||
dialog.AddTab( 'Info', FCKLang.DlgImgInfoTab ) ; |
|||
|
|||
if ( !bImageButton && !FCKConfig.ImageDlgHideLink ) |
|||
dialog.AddTab( 'Link', FCKLang.DlgImgLinkTab ) ; |
|||
|
|||
|
|||
if ( !FCKConfig.ImageDlgHideAdvanced ) |
|||
dialog.AddTab( 'Advanced', FCKLang.DlgAdvancedTag ) ; |
|||
|
|||
// Function called when a dialog tag is selected.
|
|||
function OnDialogTabChange( tabCode ) |
|||
{ |
|||
ShowE('divUpload' , ( tabCode == 'Upload' ) ) ; |
|||
ShowE('divInfo' , ( tabCode == 'Info' ) ) ; |
|||
ShowE('divLink' , ( tabCode == 'Link' ) ) ; |
|||
ShowE('divAdvanced' , ( tabCode == 'Advanced' ) ) ; |
|||
} |
|||
|
|||
// Get the selected image (if available).
|
|||
var oImage = dialog.Selection.GetSelectedElement() ; |
|||
|
|||
if ( oImage && oImage.tagName != 'IMG' && !( oImage.tagName == 'INPUT' && oImage.type == 'image' ) ) |
|||
oImage = null ; |
|||
// Get the active link.
|
|||
var oLink; |
|||
try{oLink = dialog.Selection.GetSelection().MoveToAncestorNode( 'A' ) ;}catch (e){} |
|||
|
|||
var oImageOriginal ; |
|||
|
|||
function UpdateOriginal( resetSize ) |
|||
{ |
|||
if ( !eImgPreview ) |
|||
return ; |
|||
|
|||
if ( GetE('txtUrl').value.length == 0 ) |
|||
{ |
|||
oImageOriginal = null ; |
|||
return ; |
|||
} |
|||
|
|||
oImageOriginal = document.createElement( 'IMG' ) ; // new Image() ;
|
|||
|
|||
if ( resetSize ) |
|||
{ |
|||
oImageOriginal.onload = function() |
|||
{ |
|||
this.onload = null ; |
|||
ResetSizes() ; |
|||
} |
|||
} |
|||
|
|||
oImageOriginal.src = eImgPreview.src ; |
|||
} |
|||
|
|||
var bPreviewInitialized ; |
|||
|
|||
window.onload = function() |
|||
{ |
|||
// Translate the dialog box texts.
|
|||
oEditor.FCKLanguageManager.TranslatePage(document) ; |
|||
|
|||
GetE('btnLockSizes').title = FCKLang.DlgImgLockRatio ; |
|||
GetE('btnResetSize').title = FCKLang.DlgBtnResetSize ; |
|||
|
|||
// Load the selected element information (if any).
|
|||
LoadSelection() ; |
|||
|
|||
// Show/Hide the "Browse Server" button.
|
|||
GetE('tdBrowse').style.display = FCKConfig.ImageBrowser ? '' : 'none' ; |
|||
GetE('divLnkBrowseServer').style.display = FCKConfig.LinkBrowser ? '' : 'none' ; |
|||
|
|||
UpdateOriginal() ; |
|||
|
|||
// Set the actual uploader URL.
|
|||
if ( FCKConfig.ImageUpload ) |
|||
GetE('frmUpload').action = FCKConfig.ImageUploadURL ; |
|||
|
|||
dialog.SetAutoSize( true ) ; |
|||
|
|||
// Activate the "OK" button.
|
|||
dialog.SetOkButton( true ) ; |
|||
//if(oImage != null) OnDialogTabChange('Info')
|
|||
//SelectField( 'txtUrl' ) ;
|
|||
} |
|||
|
|||
function LoadSelection() |
|||
{ |
|||
if ( ! oImage ) return ; |
|||
|
|||
var sUrl = oImage.getAttribute( '_fcksavedurl' ) ; |
|||
if ( sUrl == null ) |
|||
sUrl = GetAttribute( oImage, 'src', '' ) ; |
|||
|
|||
GetE('txtUrl').value = sUrl ; |
|||
GetE('txtAlt').value = GetAttribute( oImage, 'alt', '' ) ; |
|||
GetE('txtVSpace').value = GetAttribute( oImage, 'vspace', '' ) ; |
|||
GetE('txtHSpace').value = GetAttribute( oImage, 'hspace', '' ) ; |
|||
GetE('txtBorder').value = GetAttribute( oImage, 'border', '' ) ; |
|||
GetE('cmbAlign').value = GetAttribute( oImage, 'align', '' ) ; |
|||
|
|||
var iWidth, iHeight ; |
|||
|
|||
var regexSize = /^\s*(\d+)px\s*$/i ; |
|||
|
|||
if ( oImage.style.width ) |
|||
{ |
|||
var aMatchW = oImage.style.width.match( regexSize ) ; |
|||
if ( aMatchW ) |
|||
{ |
|||
iWidth = aMatchW[1] ; |
|||
oImage.style.width = '' ; |
|||
SetAttribute( oImage, 'width' , iWidth ) ; |
|||
} |
|||
} |
|||
|
|||
if ( oImage.style.height ) |
|||
{ |
|||
var aMatchH = oImage.style.height.match( regexSize ) ; |
|||
if ( aMatchH ) |
|||
{ |
|||
iHeight = aMatchH[1] ; |
|||
oImage.style.height = '' ; |
|||
SetAttribute( oImage, 'height', iHeight ) ; |
|||
} |
|||
} |
|||
|
|||
GetE('txtWidth').value = iWidth ? iWidth : GetAttribute( oImage, "width", '' ) ; |
|||
GetE('txtHeight').value = iHeight ? iHeight : GetAttribute( oImage, "height", '' ) ; |
|||
|
|||
// Get Advances Attributes
|
|||
GetE('txtAttId').value = oImage.id ; |
|||
GetE('cmbAttLangDir').value = oImage.dir ; |
|||
GetE('txtAttLangCode').value = oImage.lang ; |
|||
GetE('txtAttTitle').value = oImage.title ; |
|||
GetE('txtLongDesc').value = oImage.longDesc ; |
|||
|
|||
if ( oEditor.FCKBrowserInfo.IsIE ) |
|||
{ |
|||
GetE('txtAttClasses').value = oImage.className || '' ; |
|||
GetE('txtAttStyle').value = oImage.style.cssText ; |
|||
} |
|||
else |
|||
{ |
|||
GetE('txtAttClasses').value = oImage.getAttribute('class',2) || '' ; |
|||
GetE('txtAttStyle').value = oImage.getAttribute('style',2) ; |
|||
} |
|||
|
|||
if ( oLink ) |
|||
{ |
|||
var sLinkUrl = oLink.getAttribute( '_fcksavedurl' ) ; |
|||
if ( sLinkUrl == null ) |
|||
sLinkUrl = oLink.getAttribute('href',2) ; |
|||
|
|||
GetE('txtLnkUrl').value = sLinkUrl ; |
|||
GetE('cmbLnkTarget').value = oLink.target ; |
|||
} |
|||
|
|||
OnDialogTabChange('Info');//DESTOON ADD
|
|||
var ss = dialog.document.getElementsByTagName('div'); |
|||
ss[5].className = 'PopupTab'; |
|||
ss[6].className = 'PopupTabSelected'; |
|||
|
|||
UpdatePreview() ; |
|||
} |
|||
|
|||
//#### The OK button was hit.
|
|||
function Ok() |
|||
{ |
|||
if ( GetE('txtUrl').value.length == 0 ) |
|||
{ |
|||
dialog.SetSelectedTab( 'Info' ) ; |
|||
GetE('txtUrl').focus() ; |
|||
|
|||
alert( FCKLang.DlgImgAlertUrl ) ; |
|||
|
|||
return false ; |
|||
} |
|||
|
|||
var bHasImage = ( oImage != null ) ; |
|||
|
|||
if ( bHasImage && bImageButton && oImage.tagName == 'IMG' ) |
|||
{ |
|||
if ( confirm( 'Do you want to transform the selected image on a image button?' ) ) |
|||
oImage = null ; |
|||
} |
|||
else if ( bHasImage && !bImageButton && oImage.tagName == 'INPUT' ) |
|||
{ |
|||
if ( confirm( 'Do you want to transform the selected image button on a simple image?' ) ) |
|||
oImage = null ; |
|||
} |
|||
|
|||
oEditor.FCKUndo.SaveUndoStep() ; |
|||
if ( !bHasImage ) |
|||
{ |
|||
if ( bImageButton ) |
|||
{ |
|||
oImage = FCK.EditorDocument.createElement( 'input' ) ; |
|||
oImage.type = 'image' ; |
|||
oImage = FCK.InsertElement( oImage ) ; |
|||
} |
|||
else |
|||
oImage = FCK.InsertElement( 'img' ) ; |
|||
} |
|||
|
|||
UpdateImage( oImage ) ; |
|||
|
|||
var sLnkUrl = GetE('txtLnkUrl').value.Trim() ; |
|||
|
|||
if ( sLnkUrl.length == 0 ) |
|||
{ |
|||
if ( oLink ) |
|||
FCK.ExecuteNamedCommand( 'Unlink' ) ; |
|||
} |
|||
else |
|||
{ |
|||
if ( oLink ) // Modifying an existent link.
|
|||
oLink.href = sLnkUrl ; |
|||
else // Creating a new link.
|
|||
{ |
|||
if ( !bHasImage ) |
|||
oEditor.FCKSelection.SelectNode( oImage ) ; |
|||
|
|||
oLink = oEditor.FCK.CreateLink( sLnkUrl )[0] ; |
|||
|
|||
if ( !bHasImage ) |
|||
{ |
|||
oEditor.FCKSelection.SelectNode( oLink ) ; |
|||
oEditor.FCKSelection.Collapse( false ) ; |
|||
} |
|||
} |
|||
|
|||
SetAttribute( oLink, '_fcksavedurl', sLnkUrl ) ; |
|||
SetAttribute( oLink, 'target', GetE('cmbLnkTarget').value ) ; |
|||
} |
|||
|
|||
return true ; |
|||
} |
|||
|
|||
function UpdateImage( e, skipId ) |
|||
{ |
|||
e.src = GetE('txtUrl').value ; |
|||
SetAttribute( e, "_fcksavedurl", GetE('txtUrl').value ) ; |
|||
SetAttribute( e, "alt" , GetE('txtAlt').value ) ; |
|||
if(GetE('txtWidth').value > 0) SetAttribute( e, "width" , GetE('txtWidth').value ) ;//DESTOON ADD
|
|||
if(GetE('txtHeight').value > 0) SetAttribute( e, "height", GetE('txtHeight').value ) ;//DESTOON ADD
|
|||
SetAttribute( e, "vspace", GetE('txtVSpace').value ) ; |
|||
SetAttribute( e, "hspace", GetE('txtHSpace').value ) ; |
|||
SetAttribute( e, "border", GetE('txtBorder').value ) ; |
|||
SetAttribute( e, "align" , GetE('cmbAlign').value ) ; |
|||
|
|||
// Advances Attributes
|
|||
|
|||
if ( ! skipId ) |
|||
SetAttribute( e, 'id', GetE('txtAttId').value ) ; |
|||
|
|||
SetAttribute( e, 'dir' , GetE('cmbAttLangDir').value ) ; |
|||
SetAttribute( e, 'lang' , GetE('txtAttLangCode').value ) ; |
|||
SetAttribute( e, 'title' , GetE('txtAttTitle').value ) ; |
|||
SetAttribute( e, 'longDesc' , GetE('txtLongDesc').value ) ; |
|||
|
|||
if ( oEditor.FCKBrowserInfo.IsIE ) |
|||
{ |
|||
e.className = GetE('txtAttClasses').value ; |
|||
e.style.cssText = GetE('txtAttStyle').value ; |
|||
} |
|||
else |
|||
{ |
|||
SetAttribute( e, 'class' , GetE('txtAttClasses').value ) ; |
|||
SetAttribute( e, 'style', GetE('txtAttStyle').value ) ; |
|||
} |
|||
} |
|||
|
|||
var eImgPreview ; |
|||
var eImgPreviewLink ; |
|||
|
|||
function SetPreviewElements( imageElement, linkElement ) |
|||
{ |
|||
eImgPreview = imageElement ; |
|||
eImgPreviewLink = linkElement ; |
|||
|
|||
UpdatePreview() ; |
|||
UpdateOriginal() ; |
|||
|
|||
bPreviewInitialized = true ; |
|||
} |
|||
|
|||
function UpdatePreview() |
|||
{ |
|||
if ( !eImgPreview || !eImgPreviewLink ) |
|||
return ; |
|||
|
|||
if ( GetE('txtUrl').value.length == 0 ) |
|||
eImgPreviewLink.style.display = 'none' ; |
|||
else |
|||
{ |
|||
UpdateImage( eImgPreview, true ) ; |
|||
|
|||
if ( GetE('txtLnkUrl').value.Trim().length > 0 ) |
|||
eImgPreviewLink.href = 'javascript:void(null);' ; |
|||
else |
|||
SetAttribute( eImgPreviewLink, 'href', '' ) ; |
|||
|
|||
eImgPreviewLink.style.display = '' ; |
|||
} |
|||
} |
|||
|
|||
var bLockRatio = true ; |
|||
|
|||
function SwitchLock( lockButton ) |
|||
{ |
|||
bLockRatio = !bLockRatio ; |
|||
lockButton.className = bLockRatio ? 'BtnLocked' : 'BtnUnlocked' ; |
|||
lockButton.title = bLockRatio ? 'Lock sizes' : 'Unlock sizes' ; |
|||
|
|||
if ( bLockRatio ) |
|||
{ |
|||
if ( GetE('txtWidth').value.length > 0 ) |
|||
OnSizeChanged( 'Width', GetE('txtWidth').value ) ; |
|||
else |
|||
OnSizeChanged( 'Height', GetE('txtHeight').value ) ; |
|||
} |
|||
} |
|||
|
|||
// Fired when the width or height input texts change
|
|||
function OnSizeChanged( dimension, value ) |
|||
{ |
|||
// Verifies if the aspect ration has to be maintained
|
|||
if ( oImageOriginal && bLockRatio ) |
|||
{ |
|||
var e = dimension == 'Width' ? GetE('txtHeight') : GetE('txtWidth') ; |
|||
|
|||
if ( value.length == 0 || isNaN( value ) ) |
|||
{ |
|||
e.value = '' ; |
|||
return ; |
|||
} |
|||
|
|||
if ( dimension == 'Width' ) |
|||
value = value == 0 ? 0 : Math.round( oImageOriginal.height * ( value / oImageOriginal.width ) ) ; |
|||
else |
|||
value = value == 0 ? 0 : Math.round( oImageOriginal.width * ( value / oImageOriginal.height ) ) ; |
|||
|
|||
if ( !isNaN( value ) ) |
|||
e.value = value ; |
|||
} |
|||
|
|||
UpdatePreview() ; |
|||
} |
|||
|
|||
// Fired when the Reset Size button is clicked
|
|||
function ResetSizes() |
|||
{ |
|||
if ( ! oImageOriginal ) return ; |
|||
if ( oEditor.FCKBrowserInfo.IsGecko && !oImageOriginal.complete ) |
|||
{ |
|||
setTimeout( ResetSizes, 50 ) ; |
|||
return ; |
|||
} |
|||
|
|||
GetE('txtWidth').value = oImageOriginal.width ; |
|||
GetE('txtHeight').value = oImageOriginal.height ; |
|||
|
|||
UpdatePreview() ; |
|||
} |
|||
|
|||
function BrowseServer() |
|||
{ |
|||
OpenServerBrowser( |
|||
'Image', |
|||
FCKConfig.ImageBrowserURL, |
|||
FCKConfig.ImageBrowserWindowWidth, |
|||
FCKConfig.ImageBrowserWindowHeight ) ; |
|||
} |
|||
|
|||
function LnkBrowseServer() |
|||
{ |
|||
OpenServerBrowser( |
|||
'Link', |
|||
FCKConfig.LinkBrowserURL, |
|||
FCKConfig.LinkBrowserWindowWidth, |
|||
FCKConfig.LinkBrowserWindowHeight ) ; |
|||
} |
|||
|
|||
function OpenServerBrowser( type, url, width, height ) |
|||
{ |
|||
sActualBrowser = type ; |
|||
OpenFileBrowser( url, width, height ) ; |
|||
} |
|||
|
|||
var sActualBrowser ; |
|||
|
|||
function SetUrl( url, width, height, alt ) |
|||
{ |
|||
if ( sActualBrowser == 'Link' ) |
|||
{ |
|||
GetE('txtLnkUrl').value = url ; |
|||
UpdatePreview() ; |
|||
} |
|||
else |
|||
{ |
|||
GetE('txtUrl').value = url ; |
|||
GetE('txtWidth').value = width ? width : '' ; |
|||
GetE('txtHeight').value = height ? height : '' ; |
|||
|
|||
if ( alt ) |
|||
GetE('txtAlt').value = alt; |
|||
|
|||
UpdatePreview() ; |
|||
UpdateOriginal( true ) ; |
|||
} |
|||
|
|||
dialog.SetSelectedTab( 'Info' ) ; |
|||
} |
|||
|
|||
function OnUploadCompleted( errorNumber, fileUrl, fileName, customMsg ) |
|||
{ |
|||
switch ( errorNumber ) |
|||
{ |
|||
case 0 : // No errors
|
|||
alert( 'Your file has been successfully uploaded' ) ; |
|||
break ; |
|||
case 1 : // Custom error
|
|||
alert( customMsg ) ; |
|||
return ; |
|||
case 101 : // Custom warning
|
|||
alert( customMsg ) ; |
|||
break ; |
|||
case 201 : |
|||
alert( 'A file with the same name is already available. The uploaded file has been renamed to "' + fileName + '"' ) ; |
|||
break ; |
|||
case 202 : |
|||
alert( 'Invalid file type' ) ; |
|||
return ; |
|||
case 203 : |
|||
alert( "Security error. You probably don't have enough permissions to upload. Please check your server." ) ; |
|||
return ; |
|||
case 500 : |
|||
alert( 'The connector is disabled' ) ; |
|||
break ; |
|||
default : |
|||
alert( 'Error on file upload. Error number: ' + errorNumber ) ; |
|||
return ; |
|||
} |
|||
|
|||
sActualBrowser = '' ; |
|||
SetUrl( fileUrl ) ; |
|||
GetE('frmUpload').reset() ; |
|||
} |
|||
|
|||
var oUploadAllowedExtRegex = new RegExp( FCKConfig.ImageUploadAllowedExtensions, 'i' ) ; |
|||
var oUploadDeniedExtRegex = new RegExp( FCKConfig.ImageUploadDeniedExtensions, 'i' ) ; |
|||
|
|||
function CheckUpload() |
|||
{ |
|||
var sFile = GetE('txtUploadFile').value ; |
|||
|
|||
if ( sFile.length == 0 ) |
|||
{ |
|||
alert( 'Please select a file to upload' ) ; |
|||
return false ; |
|||
} |
|||
|
|||
if ( ( FCKConfig.ImageUploadAllowedExtensions.length > 0 && !oUploadAllowedExtRegex.test( sFile ) ) || |
|||
( FCKConfig.ImageUploadDeniedExtensions.length > 0 && oUploadDeniedExtRegex.test( sFile ) ) ) |
|||
{ |
|||
OnUploadCompleted( 202 ) ; |
|||
return false ; |
|||
} |
|||
|
|||
return true ; |
|||
} |
|||
@ -0,0 +1,48 @@ |
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
|||
<html xmlns="http://www.w3.org/1999/xhtml"> |
|||
<head> |
|||
<title></title> |
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
|||
<meta name="robots" content="noindex, nofollow" /> |
|||
<script src="../common/fck_dialog_common.js" type="text/javascript"></script> |
|||
<script type="text/javascript"> |
|||
|
|||
var FCKTools = window.parent.FCKTools ; |
|||
var FCKConfig = window.parent.FCKConfig ; |
|||
|
|||
// Sets the Skin CSS |
|||
document.write( FCKTools.GetStyleHtml( FCKConfig.SkinDialogCSS ) ) ; |
|||
document.write( FCKTools.GetStyleHtml( GetCommonDialogCss( '../' ) ) ) ; |
|||
|
|||
if ( window.parent.FCKConfig.BaseHref.length > 0 ) |
|||
document.write( '<base href="' + window.parent.FCKConfig.BaseHref + '">' ) ; |
|||
|
|||
window.onload = function() |
|||
{ |
|||
window.parent.SetPreviewElements( |
|||
document.getElementById( 'imgPreview' ), |
|||
document.getElementById( 'lnkPreview' ) ) ; |
|||
} |
|||
|
|||
</script> |
|||
</head> |
|||
<body style="color: #000000; background-color: #ffffff"> |
|||
<div> |
|||
<a id="lnkPreview" onclick="return false;" style="cursor: default"> |
|||
<img id="imgPreview" onload="window.parent.UpdateOriginal();" |
|||
style="display: none" alt="" /></a>Lorem ipsum dolor sit amet, consectetuer adipiscing |
|||
elit. Maecenas feugiat consequat diam. Maecenas metus. Vivamus diam purus, cursus |
|||
a, commodo non, facilisis vitae, nulla. Aenean dictum lacinia tortor. Nunc iaculis, |
|||
nibh non iaculis aliquam, orci felis euismod neque, sed ornare massa mauris sed |
|||
velit. Nulla pretium mi et risus. Fusce mi pede, tempor id, cursus ac, ullamcorper |
|||
nec, enim. Sed tortor. Curabitur molestie. Duis velit augue, condimentum at, ultrices |
|||
a, luctus ut, orci. Donec pellentesque egestas eros. Integer cursus, augue in cursus |
|||
faucibus, eros pede bibendum sem, in tempus tellus justo quis ligula. Etiam eget |
|||
tortor. Vestibulum rutrum, est ut placerat elementum, lectus nisl aliquam velit, |
|||
tempor aliquam eros nunc nonummy metus. In eros metus, gravida a, gravida sed, lobortis |
|||
id, turpis. Ut ultrices, ipsum at venenatis fringilla, sem nulla lacinia tellus, |
|||
eget aliquet turpis mauris non enim. Nam turpis. Suspendisse lacinia. Curabitur |
|||
ac tortor ut ipsum egestas elementum. Nunc imperdiet gravida mauris. |
|||
</div> |
|||
</body> |
|||
</html> |
|||
@ -0,0 +1,730 @@ |
|||
var dialog = window.parent ; |
|||
var oEditor = dialog.InnerDialogLoaded() ; |
|||
|
|||
var FCK = oEditor.FCK ; |
|||
var FCKLang = oEditor.FCKLang ; |
|||
var FCKConfig = oEditor.FCKConfig ; |
|||
var FCKRegexLib = oEditor.FCKRegexLib ; |
|||
var FCKTools = oEditor.FCKTools ; |
|||
|
|||
//#### Dialog Tabs
|
|||
|
|||
// Set the dialog tabs.
|
|||
dialog.AddTab( 'Info', FCKLang.DlgLnkInfoTab ) ; |
|||
|
|||
if ( !FCKConfig.LinkDlgHideTarget ) |
|||
dialog.AddTab( 'Target', FCKLang.DlgLnkTargetTab, true ) ; |
|||
|
|||
if ( FCKConfig.LinkUpload ) |
|||
dialog.AddTab( 'Upload', FCKLang.DlgLnkUpload, true ) ; |
|||
|
|||
if ( !FCKConfig.LinkDlgHideAdvanced ) |
|||
dialog.AddTab( 'Advanced', FCKLang.DlgAdvancedTag ) ; |
|||
|
|||
// Function called when a dialog tag is selected.
|
|||
function OnDialogTabChange( tabCode ) |
|||
{ |
|||
ShowE('divInfo' , ( tabCode == 'Info' ) ) ; |
|||
ShowE('divTarget' , ( tabCode == 'Target' ) ) ; |
|||
ShowE('divUpload' , ( tabCode == 'Upload' ) ) ; |
|||
ShowE('divAttribs' , ( tabCode == 'Advanced' ) ) ; |
|||
|
|||
dialog.SetAutoSize( true ) ; |
|||
} |
|||
|
|||
//#### Regular Expressions library.
|
|||
var oRegex = new Object() ; |
|||
|
|||
oRegex.UriProtocol = /^(((http|https|ftp|news):\/\/)|mailto:)/gi ; |
|||
|
|||
oRegex.UrlOnChangeProtocol = /^(http|https|ftp|news):\/\/(?=.)/gi ; |
|||
|
|||
oRegex.UrlOnChangeTestOther = /^((javascript:)|[#\/\.])/gi ; |
|||
|
|||
oRegex.ReserveTarget = /^_(blank|self|top|parent)$/i ; |
|||
|
|||
oRegex.PopupUri = /^javascript:void\(\s*window.open\(\s*'([^']+)'\s*,\s*(?:'([^']*)'|null)\s*,\s*'([^']*)'\s*\)\s*\)\s*$/ ; |
|||
|
|||
// Accessible popups
|
|||
oRegex.OnClickPopup = /^\s*on[cC]lick="\s*window.open\(\s*this\.href\s*,\s*(?:'([^']*)'|null)\s*,\s*'([^']*)'\s*\)\s*;\s*return\s*false;*\s*"$/ ; |
|||
|
|||
oRegex.PopupFeatures = /(?:^|,)([^=]+)=(\d+|yes|no)/gi ; |
|||
|
|||
//#### Parser Functions
|
|||
|
|||
var oParser = new Object() ; |
|||
|
|||
oParser.ParseEMailUrl = function( emailUrl ) |
|||
{ |
|||
// Initializes the EMailInfo object.
|
|||
var oEMailInfo = new Object() ; |
|||
oEMailInfo.Address = '' ; |
|||
oEMailInfo.Subject = '' ; |
|||
oEMailInfo.Body = '' ; |
|||
|
|||
var oParts = emailUrl.match( /^([^\?]+)\??(.+)?/ ) ; |
|||
if ( oParts ) |
|||
{ |
|||
// Set the e-mail address.
|
|||
oEMailInfo.Address = oParts[1] ; |
|||
|
|||
// Look for the optional e-mail parameters.
|
|||
if ( oParts[2] ) |
|||
{ |
|||
var oMatch = oParts[2].match( /(^|&)subject=([^&]+)/i ) ; |
|||
if ( oMatch ) oEMailInfo.Subject = decodeURIComponent( oMatch[2] ) ; |
|||
|
|||
oMatch = oParts[2].match( /(^|&)body=([^&]+)/i ) ; |
|||
if ( oMatch ) oEMailInfo.Body = decodeURIComponent( oMatch[2] ) ; |
|||
} |
|||
} |
|||
|
|||
return oEMailInfo ; |
|||
} |
|||
|
|||
oParser.CreateEMailUri = function( address, subject, body ) |
|||
{ |
|||
var sBaseUri = 'mailto:' + address ; |
|||
|
|||
var sParams = '' ; |
|||
|
|||
if ( subject.length > 0 ) |
|||
sParams = '?subject=' + encodeURIComponent( subject ) ; |
|||
|
|||
if ( body.length > 0 ) |
|||
{ |
|||
sParams += ( sParams.length == 0 ? '?' : '&' ) ; |
|||
sParams += 'body=' + encodeURIComponent( body ) ; |
|||
} |
|||
|
|||
return sBaseUri + sParams ; |
|||
} |
|||
|
|||
//#### Initialization Code
|
|||
|
|||
// oLink: The actual selected link in the editor.
|
|||
var oLink = dialog.Selection.GetSelection().MoveToAncestorNode( 'A' ) ; |
|||
if ( oLink ) |
|||
FCK.Selection.SelectNode( oLink ) ; |
|||
|
|||
window.onload = function() |
|||
{ |
|||
// Translate the dialog box texts.
|
|||
oEditor.FCKLanguageManager.TranslatePage(document) ; |
|||
|
|||
// Fill the Anchor Names and Ids combos.
|
|||
LoadAnchorNamesAndIds() ; |
|||
|
|||
// Load the selected link information (if any).
|
|||
LoadSelection() ; |
|||
|
|||
// Update the dialog box.
|
|||
SetLinkType( GetE('cmbLinkType').value ) ; |
|||
|
|||
// Show/Hide the "Browse Server" button.
|
|||
GetE('divBrowseServer').style.display = FCKConfig.LinkBrowser ? '' : 'none' ; |
|||
|
|||
// Show the initial dialog content.
|
|||
GetE('divInfo').style.display = '' ; |
|||
|
|||
// Set the actual uploader URL.
|
|||
if ( FCKConfig.LinkUpload ) |
|||
GetE('frmUpload').action = FCKConfig.LinkUploadURL ; |
|||
|
|||
// Set the default target (from configuration).
|
|||
SetDefaultTarget() ; |
|||
|
|||
// Activate the "OK" button.
|
|||
dialog.SetOkButton( true ) ; |
|||
|
|||
// Select the first field.
|
|||
switch( GetE('cmbLinkType').value ) |
|||
{ |
|||
case 'url' : |
|||
SelectField( 'txtUrl' ) ; |
|||
break ; |
|||
case 'email' : |
|||
SelectField( 'txtEMailAddress' ) ; |
|||
break ; |
|||
case 'anchor' : |
|||
if ( GetE('divSelAnchor').style.display != 'none' ) |
|||
SelectField( 'cmbAnchorName' ) ; |
|||
else |
|||
SelectField( 'cmbLinkType' ) ; |
|||
} |
|||
} |
|||
|
|||
var bHasAnchors ; |
|||
|
|||
function LoadAnchorNamesAndIds() |
|||
{ |
|||
// Since version 2.0, the anchors are replaced in the DOM by IMGs so the user see the icon
|
|||
// to edit them. So, we must look for that images now.
|
|||
var aAnchors = new Array() ; |
|||
var i ; |
|||
var oImages = oEditor.FCK.EditorDocument.getElementsByTagName( 'IMG' ) ; |
|||
for( i = 0 ; i < oImages.length ; i++ ) |
|||
{ |
|||
if ( oImages[i].getAttribute('_fckanchor') ) |
|||
aAnchors[ aAnchors.length ] = oEditor.FCK.GetRealElement( oImages[i] ) ; |
|||
} |
|||
|
|||
// Add also real anchors
|
|||
var oLinks = oEditor.FCK.EditorDocument.getElementsByTagName( 'A' ) ; |
|||
for( i = 0 ; i < oLinks.length ; i++ ) |
|||
{ |
|||
if ( oLinks[i].name && ( oLinks[i].name.length > 0 ) ) |
|||
aAnchors[ aAnchors.length ] = oLinks[i] ; |
|||
} |
|||
|
|||
var aIds = FCKTools.GetAllChildrenIds( oEditor.FCK.EditorDocument.body ) ; |
|||
|
|||
bHasAnchors = ( aAnchors.length > 0 || aIds.length > 0 ) ; |
|||
|
|||
for ( i = 0 ; i < aAnchors.length ; i++ ) |
|||
{ |
|||
var sName = aAnchors[i].name ; |
|||
if ( sName && sName.length > 0 ) |
|||
FCKTools.AddSelectOption( GetE('cmbAnchorName'), sName, sName ) ; |
|||
} |
|||
|
|||
for ( i = 0 ; i < aIds.length ; i++ ) |
|||
{ |
|||
FCKTools.AddSelectOption( GetE('cmbAnchorId'), aIds[i], aIds[i] ) ; |
|||
} |
|||
|
|||
ShowE( 'divSelAnchor' , bHasAnchors ) ; |
|||
ShowE( 'divNoAnchor' , !bHasAnchors ) ; |
|||
} |
|||
|
|||
function LoadSelection() |
|||
{ |
|||
if ( !oLink ) return ; |
|||
|
|||
var sType = 'url' ; |
|||
|
|||
// Get the actual Link href.
|
|||
var sHRef = oLink.getAttribute( '_fcksavedurl' ) ; |
|||
if ( sHRef == null ) |
|||
sHRef = oLink.getAttribute( 'href' , 2 ) || '' ; |
|||
|
|||
// Look for a popup javascript link.
|
|||
var oPopupMatch = oRegex.PopupUri.exec( sHRef ) ; |
|||
if( oPopupMatch ) |
|||
{ |
|||
GetE('cmbTarget').value = 'popup' ; |
|||
sHRef = oPopupMatch[1] ; |
|||
FillPopupFields( oPopupMatch[2], oPopupMatch[3] ) ; |
|||
SetTarget( 'popup' ) ; |
|||
} |
|||
|
|||
// Accessible popups, the popup data is in the onclick attribute
|
|||
if ( !oPopupMatch ) |
|||
{ |
|||
var onclick = oLink.getAttribute( 'onclick_fckprotectedatt' ) ; |
|||
if ( onclick ) |
|||
{ |
|||
// Decode the protected string
|
|||
onclick = decodeURIComponent( onclick ) ; |
|||
|
|||
oPopupMatch = oRegex.OnClickPopup.exec( onclick ) ; |
|||
if( oPopupMatch ) |
|||
{ |
|||
GetE( 'cmbTarget' ).value = 'popup' ; |
|||
FillPopupFields( oPopupMatch[1], oPopupMatch[2] ) ; |
|||
SetTarget( 'popup' ) ; |
|||
} |
|||
} |
|||
} |
|||
|
|||
// Search for the protocol.
|
|||
var sProtocol = oRegex.UriProtocol.exec( sHRef ) ; |
|||
|
|||
if ( sProtocol ) |
|||
{ |
|||
sProtocol = sProtocol[0].toLowerCase() ; |
|||
GetE('cmbLinkProtocol').value = sProtocol ; |
|||
|
|||
// Remove the protocol and get the remaining URL.
|
|||
var sUrl = sHRef.replace( oRegex.UriProtocol, '' ) ; |
|||
|
|||
if ( sProtocol == 'mailto:' ) // It is an e-mail link.
|
|||
{ |
|||
sType = 'email' ; |
|||
|
|||
var oEMailInfo = oParser.ParseEMailUrl( sUrl ) ; |
|||
GetE('txtEMailAddress').value = oEMailInfo.Address ; |
|||
GetE('txtEMailSubject').value = oEMailInfo.Subject ; |
|||
GetE('txtEMailBody').value = oEMailInfo.Body ; |
|||
} |
|||
else // It is a normal link.
|
|||
{ |
|||
sType = 'url' ; |
|||
GetE('txtUrl').value = sUrl ; |
|||
} |
|||
} |
|||
else if ( sHRef.substr(0,1) == '#' && sHRef.length > 1 ) // It is an anchor link.
|
|||
{ |
|||
sType = 'anchor' ; |
|||
GetE('cmbAnchorName').value = GetE('cmbAnchorId').value = sHRef.substr(1) ; |
|||
} |
|||
else // It is another type of link.
|
|||
{ |
|||
sType = 'url' ; |
|||
|
|||
GetE('cmbLinkProtocol').value = '' ; |
|||
GetE('txtUrl').value = sHRef ; |
|||
} |
|||
|
|||
if ( !oPopupMatch ) |
|||
{ |
|||
// Get the target.
|
|||
var sTarget = oLink.target ; |
|||
|
|||
if ( sTarget && sTarget.length > 0 ) |
|||
{ |
|||
if ( oRegex.ReserveTarget.test( sTarget ) ) |
|||
{ |
|||
sTarget = sTarget.toLowerCase() ; |
|||
GetE('cmbTarget').value = sTarget ; |
|||
} |
|||
else |
|||
GetE('cmbTarget').value = 'frame' ; |
|||
GetE('txtTargetFrame').value = sTarget ; |
|||
} |
|||
} |
|||
|
|||
// Get Advances Attributes
|
|||
GetE('txtAttId').value = oLink.id ; |
|||
GetE('txtAttName').value = oLink.name ; |
|||
GetE('cmbAttLangDir').value = oLink.dir ; |
|||
GetE('txtAttLangCode').value = oLink.lang ; |
|||
GetE('txtAttAccessKey').value = oLink.accessKey ; |
|||
GetE('txtAttTabIndex').value = oLink.tabIndex <= 0 ? '' : oLink.tabIndex ; |
|||
GetE('txtAttTitle').value = oLink.title ; |
|||
GetE('txtAttContentType').value = oLink.type ; |
|||
GetE('txtAttCharSet').value = oLink.charset ; |
|||
|
|||
var sClass ; |
|||
if ( oEditor.FCKBrowserInfo.IsIE ) |
|||
{ |
|||
sClass = oLink.getAttribute('className',2) || '' ; |
|||
// Clean up temporary classes for internal use:
|
|||
sClass = sClass.replace( FCKRegexLib.FCK_Class, '' ) ; |
|||
|
|||
GetE('txtAttStyle').value = oLink.style.cssText ; |
|||
} |
|||
else |
|||
{ |
|||
sClass = oLink.getAttribute('class',2) || '' ; |
|||
GetE('txtAttStyle').value = oLink.getAttribute('style',2) || '' ; |
|||
} |
|||
GetE('txtAttClasses').value = sClass ; |
|||
|
|||
// Update the Link type combo.
|
|||
GetE('cmbLinkType').value = sType ; |
|||
} |
|||
|
|||
//#### Link type selection.
|
|||
function SetLinkType( linkType ) |
|||
{ |
|||
ShowE('divLinkTypeUrl' , (linkType == 'url') ) ; |
|||
ShowE('divLinkTypeAnchor' , (linkType == 'anchor') ) ; |
|||
ShowE('divLinkTypeEMail' , (linkType == 'email') ) ; |
|||
|
|||
if ( !FCKConfig.LinkDlgHideTarget ) |
|||
dialog.SetTabVisibility( 'Target' , (linkType == 'url') ) ; |
|||
|
|||
if ( FCKConfig.LinkUpload ) |
|||
dialog.SetTabVisibility( 'Upload' , (linkType == 'url') ) ; |
|||
|
|||
if ( !FCKConfig.LinkDlgHideAdvanced ) |
|||
dialog.SetTabVisibility( 'Advanced' , (linkType != 'anchor' || bHasAnchors) ) ; |
|||
|
|||
if ( linkType == 'email' ) |
|||
dialog.SetAutoSize( true ) ; |
|||
} |
|||
|
|||
//#### Target type selection.
|
|||
function SetTarget( targetType ) |
|||
{ |
|||
GetE('tdTargetFrame').style.display = ( targetType == 'popup' ? 'none' : '' ) ; |
|||
GetE('tdPopupName').style.display = |
|||
GetE('tablePopupFeatures').style.display = ( targetType == 'popup' ? '' : 'none' ) ; |
|||
|
|||
switch ( targetType ) |
|||
{ |
|||
case "_blank" : |
|||
case "_self" : |
|||
case "_parent" : |
|||
case "_top" : |
|||
GetE('txtTargetFrame').value = targetType ; |
|||
break ; |
|||
case "" : |
|||
GetE('txtTargetFrame').value = '' ; |
|||
break ; |
|||
} |
|||
|
|||
if ( targetType == 'popup' ) |
|||
dialog.SetAutoSize( true ) ; |
|||
} |
|||
|
|||
//#### Called while the user types the URL.
|
|||
function OnUrlChange() |
|||
{ |
|||
var sUrl = GetE('txtUrl').value ; |
|||
var sProtocol = oRegex.UrlOnChangeProtocol.exec( sUrl ) ; |
|||
|
|||
if ( sProtocol ) |
|||
{ |
|||
sUrl = sUrl.substr( sProtocol[0].length ) ; |
|||
GetE('txtUrl').value = sUrl ; |
|||
GetE('cmbLinkProtocol').value = sProtocol[0].toLowerCase() ; |
|||
} |
|||
else if ( oRegex.UrlOnChangeTestOther.test( sUrl ) ) |
|||
{ |
|||
GetE('cmbLinkProtocol').value = '' ; |
|||
} |
|||
} |
|||
|
|||
//#### Called while the user types the target name.
|
|||
function OnTargetNameChange() |
|||
{ |
|||
var sFrame = GetE('txtTargetFrame').value ; |
|||
|
|||
if ( sFrame.length == 0 ) |
|||
GetE('cmbTarget').value = '' ; |
|||
else if ( oRegex.ReserveTarget.test( sFrame ) ) |
|||
GetE('cmbTarget').value = sFrame.toLowerCase() ; |
|||
else |
|||
GetE('cmbTarget').value = 'frame' ; |
|||
} |
|||
|
|||
// Accessible popups
|
|||
function BuildOnClickPopup() |
|||
{ |
|||
var sWindowName = "'" + GetE('txtPopupName').value.replace(/\W/gi, "") + "'" ; |
|||
|
|||
var sFeatures = '' ; |
|||
var aChkFeatures = document.getElementsByName( 'chkFeature' ) ; |
|||
for ( var i = 0 ; i < aChkFeatures.length ; i++ ) |
|||
{ |
|||
if ( i > 0 ) sFeatures += ',' ; |
|||
sFeatures += aChkFeatures[i].value + '=' + ( aChkFeatures[i].checked ? 'yes' : 'no' ) ; |
|||
} |
|||
|
|||
if ( GetE('txtPopupWidth').value.length > 0 ) sFeatures += ',width=' + GetE('txtPopupWidth').value ; |
|||
if ( GetE('txtPopupHeight').value.length > 0 ) sFeatures += ',height=' + GetE('txtPopupHeight').value ; |
|||
if ( GetE('txtPopupLeft').value.length > 0 ) sFeatures += ',left=' + GetE('txtPopupLeft').value ; |
|||
if ( GetE('txtPopupTop').value.length > 0 ) sFeatures += ',top=' + GetE('txtPopupTop').value ; |
|||
|
|||
if ( sFeatures != '' ) |
|||
sFeatures = sFeatures + ",status" ; |
|||
|
|||
return ( "window.open(this.href," + sWindowName + ",'" + sFeatures + "'); return false" ) ; |
|||
} |
|||
|
|||
//#### Fills all Popup related fields.
|
|||
function FillPopupFields( windowName, features ) |
|||
{ |
|||
if ( windowName ) |
|||
GetE('txtPopupName').value = windowName ; |
|||
|
|||
var oFeatures = new Object() ; |
|||
var oFeaturesMatch ; |
|||
while( ( oFeaturesMatch = oRegex.PopupFeatures.exec( features ) ) != null ) |
|||
{ |
|||
var sValue = oFeaturesMatch[2] ; |
|||
if ( sValue == ( 'yes' || '1' ) ) |
|||
oFeatures[ oFeaturesMatch[1] ] = true ; |
|||
else if ( ! isNaN( sValue ) && sValue != 0 ) |
|||
oFeatures[ oFeaturesMatch[1] ] = sValue ; |
|||
} |
|||
|
|||
// Update all features check boxes.
|
|||
var aChkFeatures = document.getElementsByName('chkFeature') ; |
|||
for ( var i = 0 ; i < aChkFeatures.length ; i++ ) |
|||
{ |
|||
if ( oFeatures[ aChkFeatures[i].value ] ) |
|||
aChkFeatures[i].checked = true ; |
|||
} |
|||
|
|||
// Update position and size text boxes.
|
|||
if ( oFeatures['width'] ) GetE('txtPopupWidth').value = oFeatures['width'] ; |
|||
if ( oFeatures['height'] ) GetE('txtPopupHeight').value = oFeatures['height'] ; |
|||
if ( oFeatures['left'] ) GetE('txtPopupLeft').value = oFeatures['left'] ; |
|||
if ( oFeatures['top'] ) GetE('txtPopupTop').value = oFeatures['top'] ; |
|||
} |
|||
|
|||
//#### The OK button was hit.
|
|||
function Ok() |
|||
{ |
|||
var sUri, sInnerHtml ; |
|||
oEditor.FCKUndo.SaveUndoStep() ; |
|||
|
|||
switch ( GetE('cmbLinkType').value ) |
|||
{ |
|||
case 'url' : |
|||
sUri = GetE('txtUrl').value ; |
|||
|
|||
if ( sUri.length == 0 ) |
|||
{ |
|||
alert( FCKLang.DlnLnkMsgNoUrl ) ; |
|||
return false ; |
|||
} |
|||
|
|||
sUri = GetE('cmbLinkProtocol').value + sUri ; |
|||
break ; |
|||
|
|||
case 'email' : |
|||
sUri = GetE('txtEMailAddress').value ; |
|||
|
|||
if ( sUri.length == 0 ) |
|||
{ |
|||
alert( FCKLang.DlnLnkMsgNoEMail ) ; |
|||
return false ; |
|||
} |
|||
|
|||
sUri = oParser.CreateEMailUri( |
|||
sUri, |
|||
GetE('txtEMailSubject').value, |
|||
GetE('txtEMailBody').value ) ; |
|||
break ; |
|||
|
|||
case 'anchor' : |
|||
var sAnchor = GetE('cmbAnchorName').value ; |
|||
if ( sAnchor.length == 0 ) sAnchor = GetE('cmbAnchorId').value ; |
|||
|
|||
if ( sAnchor.length == 0 ) |
|||
{ |
|||
alert( FCKLang.DlnLnkMsgNoAnchor ) ; |
|||
return false ; |
|||
} |
|||
|
|||
sUri = '#' + sAnchor ; |
|||
break ; |
|||
} |
|||
|
|||
// If no link is selected, create a new one (it may result in more than one link creation - #220).
|
|||
var aLinks = oLink ? [ oLink ] : oEditor.FCK.CreateLink( sUri, true ) ; |
|||
|
|||
// If no selection, no links are created, so use the uri as the link text (by dom, 2006-05-26)
|
|||
var aHasSelection = ( aLinks.length > 0 ) ; |
|||
if ( !aHasSelection ) |
|||
{ |
|||
sInnerHtml = sUri; |
|||
|
|||
// Built a better text for empty links.
|
|||
switch ( GetE('cmbLinkType').value ) |
|||
{ |
|||
// anchor: use old behavior --> return true
|
|||
case 'anchor': |
|||
sInnerHtml = sInnerHtml.replace( /^#/, '' ) ; |
|||
break ; |
|||
|
|||
// url: try to get path
|
|||
case 'url': |
|||
var oLinkPathRegEx = new RegExp("//?([^?\"']+)([?].*)?$") ; |
|||
var asLinkPath = oLinkPathRegEx.exec( sUri ) ; |
|||
if (asLinkPath != null) sInnerHtml = asLinkPath[1]; // use matched path
|
|||
//ADD By Destoon
|
|||
var ext = sInnerHtml.substring(sInnerHtml.lastIndexOf('.')+1, sInnerHtml.length); |
|||
ext = ext.toLowerCase(); |
|||
if(ext == 'pdf' || ext == 'doc' || ext == 'xls' || ext == 'ppt') { |
|||
ext = ext; |
|||
} else if (ext == 'docx' || ext == 'xlsx' || ext == 'pptx') { |
|||
ext = ext.substring(0, 3); |
|||
} else if (ext == 'jpg' || ext == 'jpeg' || ext == 'gif' || ext == 'png' || ext == 'bmp') { |
|||
ext = 'img'; |
|||
} else if (ext == 'zip' || ext == 'rar' || ext == 'gz' || ext == 'tar') { |
|||
ext = 'zip'; |
|||
} else if (ext == 'swf' || ext == 'flv') { |
|||
ext = 'swf'; |
|||
} else if (ext == 'mp3' || ext == 'wav' || ext == 'asf' || ext == 'avi' || ext == 'mpeg' || ext == 'rm' || ext == 'ram' || ext == 'rmvb') { |
|||
ext = 'mov'; |
|||
} else { |
|||
ext = 'oth'; |
|||
} |
|||
sInnerHtml = '<img src="'+FCKConfig.BasePath+'images/ext/'+ext+'.gif" width="16" height="16" border="0" alt="" align="absmiddle"/> ' + sInnerHtml; |
|||
break ; |
|||
|
|||
// mailto: try to get email address
|
|||
case 'email': |
|||
sInnerHtml = GetE('txtEMailAddress').value ; |
|||
break ; |
|||
} |
|||
|
|||
// Create a new (empty) anchor.
|
|||
aLinks = [ oEditor.FCK.InsertElement( 'a' ) ] ; |
|||
} |
|||
|
|||
for ( var i = 0 ; i < aLinks.length ; i++ ) |
|||
{ |
|||
oLink = aLinks[i] ; |
|||
|
|||
if ( aHasSelection ) |
|||
sInnerHtml = oLink.innerHTML ; // Save the innerHTML (IE changes it if it is like an URL).
|
|||
|
|||
oLink.href = sUri ; |
|||
SetAttribute( oLink, '_fcksavedurl', sUri ) ; |
|||
|
|||
var onclick; |
|||
// Accessible popups
|
|||
if( GetE('cmbTarget').value == 'popup' ) |
|||
{ |
|||
onclick = BuildOnClickPopup() ; |
|||
// Encode the attribute
|
|||
onclick = encodeURIComponent( " onclick=\"" + onclick + "\"" ) ; |
|||
SetAttribute( oLink, 'onclick_fckprotectedatt', onclick ) ; |
|||
} |
|||
else |
|||
{ |
|||
// Check if the previous onclick was for a popup:
|
|||
// In that case remove the onclick handler.
|
|||
onclick = oLink.getAttribute( 'onclick_fckprotectedatt' ) ; |
|||
if ( onclick ) |
|||
{ |
|||
// Decode the protected string
|
|||
onclick = decodeURIComponent( onclick ) ; |
|||
|
|||
if( oRegex.OnClickPopup.test( onclick ) ) |
|||
SetAttribute( oLink, 'onclick_fckprotectedatt', '' ) ; |
|||
} |
|||
} |
|||
|
|||
oLink.innerHTML = sInnerHtml ; // Set (or restore) the innerHTML
|
|||
|
|||
// Target
|
|||
if( GetE('cmbTarget').value != 'popup' ) |
|||
SetAttribute( oLink, 'target', GetE('txtTargetFrame').value ) ; |
|||
else |
|||
SetAttribute( oLink, 'target', null ) ; |
|||
|
|||
// Let's set the "id" only for the first link to avoid duplication.
|
|||
if ( i == 0 ) |
|||
SetAttribute( oLink, 'id', GetE('txtAttId').value ) ; |
|||
|
|||
// Advances Attributes
|
|||
SetAttribute( oLink, 'name' , GetE('txtAttName').value ) ; |
|||
SetAttribute( oLink, 'dir' , GetE('cmbAttLangDir').value ) ; |
|||
SetAttribute( oLink, 'lang' , GetE('txtAttLangCode').value ) ; |
|||
SetAttribute( oLink, 'accesskey', GetE('txtAttAccessKey').value ) ; |
|||
SetAttribute( oLink, 'tabindex' , ( GetE('txtAttTabIndex').value > 0 ? GetE('txtAttTabIndex').value : null ) ) ; |
|||
SetAttribute( oLink, 'title' , GetE('txtAttTitle').value ) ; |
|||
SetAttribute( oLink, 'type' , GetE('txtAttContentType').value ) ; |
|||
SetAttribute( oLink, 'charset' , GetE('txtAttCharSet').value ) ; |
|||
|
|||
if ( oEditor.FCKBrowserInfo.IsIE ) |
|||
{ |
|||
var sClass = GetE('txtAttClasses').value ; |
|||
// If it's also an anchor add an internal class
|
|||
if ( GetE('txtAttName').value.length != 0 ) |
|||
sClass += ' FCK__AnchorC' ; |
|||
SetAttribute( oLink, 'className', sClass ) ; |
|||
|
|||
oLink.style.cssText = GetE('txtAttStyle').value ; |
|||
} |
|||
else |
|||
{ |
|||
SetAttribute( oLink, 'class', GetE('txtAttClasses').value ) ; |
|||
SetAttribute( oLink, 'style', GetE('txtAttStyle').value ) ; |
|||
} |
|||
} |
|||
|
|||
// Select the (first) link.
|
|||
oEditor.FCKSelection.SelectNode( aLinks[0] ); |
|||
|
|||
return true ; |
|||
} |
|||
|
|||
function BrowseServer() |
|||
{ |
|||
OpenFileBrowser( FCKConfig.LinkBrowserURL, FCKConfig.LinkBrowserWindowWidth, FCKConfig.LinkBrowserWindowHeight ) ; |
|||
} |
|||
|
|||
function SetUrl( url ) |
|||
{ |
|||
document.getElementById('txtUrl').value = url ; |
|||
OnUrlChange() ; |
|||
dialog.SetSelectedTab( 'Info' ) ; |
|||
} |
|||
|
|||
function OnUploadCompleted( errorNumber, fileUrl, fileName, customMsg ) |
|||
{ |
|||
switch ( errorNumber ) |
|||
{ |
|||
case 0 : // No errors
|
|||
alert( 'Your file has been successfully uploaded' ) ; |
|||
break ; |
|||
case 1 : // Custom error
|
|||
alert( customMsg ) ; |
|||
return ; |
|||
case 101 : // Custom warning
|
|||
alert( customMsg ) ; |
|||
break ; |
|||
case 201 : |
|||
alert( 'A file with the same name is already available. The uploaded file has been renamed to "' + fileName + '"' ) ; |
|||
break ; |
|||
case 202 : |
|||
alert( 'Invalid file type' ) ; |
|||
return ; |
|||
case 203 : |
|||
alert( "Security error. You probably don't have enough permissions to upload. Please check your server." ) ; |
|||
return ; |
|||
case 500 : |
|||
alert( 'The connector is disabled' ) ; |
|||
break ; |
|||
default : |
|||
alert( 'Error on file upload. Error number: ' + errorNumber ) ; |
|||
return ; |
|||
} |
|||
|
|||
SetUrl( fileUrl ) ; |
|||
GetE('frmUpload').reset() ; |
|||
} |
|||
|
|||
var oUploadAllowedExtRegex = new RegExp( FCKConfig.LinkUploadAllowedExtensions, 'i' ) ; |
|||
var oUploadDeniedExtRegex = new RegExp( FCKConfig.LinkUploadDeniedExtensions, 'i' ) ; |
|||
|
|||
function CheckUpload() |
|||
{ |
|||
var sFile = GetE('txtUploadFile').value ; |
|||
|
|||
if ( sFile.length == 0 ) |
|||
{ |
|||
alert( 'Please select a file to upload' ) ; |
|||
return false ; |
|||
} |
|||
|
|||
if ( ( FCKConfig.LinkUploadAllowedExtensions.length > 0 && !oUploadAllowedExtRegex.test( sFile ) ) || |
|||
( FCKConfig.LinkUploadDeniedExtensions.length > 0 && oUploadDeniedExtRegex.test( sFile ) ) ) |
|||
{ |
|||
OnUploadCompleted( 202 ) ; |
|||
return false ; |
|||
} |
|||
|
|||
return true ; |
|||
} |
|||
|
|||
function SetDefaultTarget() |
|||
{ |
|||
var target = FCKConfig.DefaultLinkTarget || '' ; |
|||
|
|||
if ( oLink || target.length == 0 ) |
|||
return ; |
|||
|
|||
switch ( target ) |
|||
{ |
|||
case '_blank' : |
|||
case '_self' : |
|||
case '_parent' : |
|||
case '_top' : |
|||
GetE('cmbTarget').value = target ; |
|||
break ; |
|||
default : |
|||
GetE('cmbTarget').value = 'frame' ; |
|||
break ; |
|||
} |
|||
|
|||
GetE('txtTargetFrame').value = target ; |
|||
} |
|||
|
After Width: 11 | Height: 12 | Size: 74 B |
|
After Width: 12 | Height: 12 | Size: 104 B |
|
After Width: 100 | Height: 70 | Size: 375 B |
|
After Width: 100 | Height: 70 | Size: 333 B |
|
After Width: 100 | Height: 70 | Size: 422 B |
|
After Width: 11 | Height: 12 | Size: 75 B |
@ -0,0 +1,190 @@ |
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > |
|||
<html> |
|||
<head> |
|||
<title>Anchor Properties</title> |
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
|||
<meta content="noindex, nofollow" name="robots"> |
|||
<script src="common/fck_dialog_common.js" type="text/javascript"></script> |
|||
<script type="text/javascript"> |
|||
|
|||
var dialog = window.parent ; |
|||
var oEditor = dialog.InnerDialogLoaded() ; |
|||
|
|||
var FCK = oEditor.FCK ; |
|||
var FCKBrowserInfo = oEditor.FCKBrowserInfo ; |
|||
var FCKTools = oEditor.FCKTools ; |
|||
var FCKRegexLib = oEditor.FCKRegexLib ; |
|||
|
|||
var oDOM = FCK.EditorDocument ; |
|||
|
|||
var oFakeImage = dialog.Selection.GetSelectedElement() ; |
|||
|
|||
var oAnchor ; |
|||
|
|||
if ( oFakeImage ) |
|||
{ |
|||
if ( oFakeImage.tagName == 'IMG' && oFakeImage.getAttribute('_fckanchor') ) |
|||
oAnchor = FCK.GetRealElement( oFakeImage ) ; |
|||
else |
|||
oFakeImage = null ; |
|||
} |
|||
|
|||
//Search for a real anchor |
|||
if ( !oFakeImage ) |
|||
{ |
|||
oAnchor = FCK.Selection.MoveToAncestorNode( 'A' ) ; |
|||
if ( oAnchor ) |
|||
FCK.Selection.SelectNode( oAnchor ) ; |
|||
} |
|||
|
|||
window.onload = function() |
|||
{ |
|||
// First of all, translate the dialog box texts |
|||
oEditor.FCKLanguageManager.TranslatePage(document) ; |
|||
|
|||
if ( oAnchor ) |
|||
GetE('txtName').value = oAnchor.name ; |
|||
else |
|||
oAnchor = null ; |
|||
|
|||
window.parent.SetOkButton( true ) ; |
|||
window.parent.SetAutoSize( true ) ; |
|||
|
|||
SelectField( 'txtName' ) ; |
|||
} |
|||
|
|||
function Ok() |
|||
{ |
|||
var sNewName = GetE('txtName').value ; |
|||
|
|||
// Remove any illegal character in a name attribute: |
|||
// A name should start with a letter, but the validator passes anyway. |
|||
sNewName = sNewName.replace( /[^\w-_\.:]/g, '_' ) ; |
|||
|
|||
if ( sNewName.length == 0 ) |
|||
{ |
|||
// Remove the anchor if the user leaves the name blank |
|||
if ( oAnchor ) |
|||
{ |
|||
// Removes the current anchor from the document using the new command |
|||
FCK.Commands.GetCommand( 'AnchorDelete' ).Execute() ; |
|||
return true ; |
|||
} |
|||
|
|||
alert( oEditor.FCKLang.DlgAnchorErrorName ) ; |
|||
return false ; |
|||
} |
|||
|
|||
oEditor.FCKUndo.SaveUndoStep() ; |
|||
|
|||
if ( oAnchor ) // Modifying an existent anchor. |
|||
{ |
|||
ReadjustLinksToAnchor( oAnchor.name, sNewName ); |
|||
|
|||
// Buggy explorer, bad bad browser. http://alt-tag.com/blog/archives/2006/02/ie-dom-bugs/ |
|||
// Instead of just replacing the .name for the existing anchor (in order to preserve the content), we must remove the .name |
|||
// and assign .name, although it won't appear until it's specially processed in fckxhtml.js |
|||
|
|||
// We remove the previous name |
|||
oAnchor.removeAttribute( 'name' ) ; |
|||
// Now we set it, but later we must process it specially |
|||
oAnchor.name = sNewName ; |
|||
|
|||
return true ; |
|||
} |
|||
|
|||
// Create a new anchor preserving the current selection |
|||
var aNewAnchors = oEditor.FCK.CreateLink( '#' ) ; |
|||
|
|||
if ( aNewAnchors.length == 0 ) |
|||
{ |
|||
// Nothing was selected, so now just create a normal A |
|||
aNewAnchors.push( oEditor.FCK.InsertElement( 'a' ) ) ; |
|||
} |
|||
else |
|||
{ |
|||
// Remove the fake href |
|||
for ( var i = 0 ; i < aNewAnchors.length ; i++ ) |
|||
aNewAnchors[i].removeAttribute( 'href' ) ; |
|||
} |
|||
|
|||
// More than one anchors may have been created, so interact through all of them (see #220). |
|||
for ( var i = 0 ; i < aNewAnchors.length ; i++ ) |
|||
{ |
|||
oAnchor = aNewAnchors[i] ; |
|||
|
|||
// Set the name |
|||
oAnchor.name = sNewName ; |
|||
|
|||
// IE does require special processing to show the Anchor's image |
|||
// Opera doesn't allow to select empty anchors |
|||
if ( FCKBrowserInfo.IsIE || FCKBrowserInfo.IsOpera ) |
|||
{ |
|||
if ( oAnchor.innerHTML != '' ) |
|||
{ |
|||
if ( FCKBrowserInfo.IsIE ) |
|||
oAnchor.className += ' FCK__AnchorC' ; |
|||
} |
|||
else |
|||
{ |
|||
// Create a fake image for both IE and Opera |
|||
var oImg = oEditor.FCKDocumentProcessor_CreateFakeImage( 'FCK__Anchor', oAnchor.cloneNode(true) ) ; |
|||
oImg.setAttribute( '_fckanchor', 'true', 0 ) ; |
|||
|
|||
oAnchor.parentNode.insertBefore( oImg, oAnchor ) ; |
|||
oAnchor.parentNode.removeChild( oAnchor ) ; |
|||
} |
|||
|
|||
} |
|||
} |
|||
|
|||
return true ; |
|||
} |
|||
|
|||
// Checks all the links in the current page pointing to the current name and changes them to the new name |
|||
function ReadjustLinksToAnchor( sCurrent, sNew ) |
|||
{ |
|||
var oDoc = FCK.EditorDocument ; |
|||
|
|||
var aLinks = oDoc.getElementsByTagName( 'A' ) ; |
|||
|
|||
var sReference = '#' + sCurrent ; |
|||
// The url of the document, so we check absolute and partial references. |
|||
var sFullReference = oDoc.location.href.replace( /(#.*$)/, '') ; |
|||
sFullReference += sReference ; |
|||
|
|||
var oLink ; |
|||
var i = aLinks.length - 1 ; |
|||
while ( i >= 0 && ( oLink = aLinks[i--] ) ) |
|||
{ |
|||
var sHRef = oLink.getAttribute( '_fcksavedurl' ) ; |
|||
if ( sHRef == null ) |
|||
sHRef = oLink.getAttribute( 'href' , 2 ) || '' ; |
|||
|
|||
if ( sHRef == sReference || sHRef == sFullReference ) |
|||
{ |
|||
oLink.href = '#' + sNew ; |
|||
SetAttribute( oLink, '_fcksavedurl', '#' + sNew ) ; |
|||
} |
|||
} |
|||
} |
|||
|
|||
</script> |
|||
</head> |
|||
<body style="overflow: hidden"> |
|||
<table height="100%" width="100%"> |
|||
<tr> |
|||
<td align="center"> |
|||
<table border="0" cellpadding="0" cellspacing="0" width="80%"> |
|||
<tr> |
|||
<td> |
|||
<span fckLang="DlgAnchorName">Anchor Name</span><BR> |
|||
<input id="txtName" style="WIDTH: 100%" type="text"> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</body> |
|||
</html> |
|||
@ -0,0 +1,96 @@ |
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
|||
<html> |
|||
<head> |
|||
<title>Attachment Properties</title> |
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
|||
<meta content="noindex, nofollow" name="robots"> |
|||
<script src="common/fck_dialog_common.js" type="text/javascript"></script> |
|||
<script type="text/javascript"> |
|||
var dialog = window.parent ; |
|||
var oEditor = dialog.InnerDialogLoaded() ; |
|||
var FCK = oEditor.FCK ; |
|||
var FCKLang = oEditor.FCKLang ; |
|||
var FCKConfig = oEditor.FCKConfig ; |
|||
var FCKDebug = oEditor.FCKDebug ; |
|||
var FCKTools = oEditor.FCKTools ; |
|||
document.write( FCKTools.GetStyleHtml( GetCommonDialogCss() ) ) ; |
|||
window.onload = function() { |
|||
// Translate the dialog box texts. |
|||
oEditor.FCKLanguageManager.TranslatePage(document) ; |
|||
dialog.SetAutoSize( true ) ; |
|||
dialog.SetOkButton( true ) ; |
|||
} |
|||
function basename(s) { |
|||
var p = s.lastIndexOf("/") == -1 ? "\\" : "/"; |
|||
var t = s.split(p); |
|||
return t[t.length-1]; |
|||
} |
|||
function Dsubmit() { |
|||
var v = GetE('txtUploadFile').value; |
|||
if(v.length < 5) { |
|||
alert('Not File'); |
|||
return false; |
|||
} |
|||
GetE('txtTit').value = basename(v); |
|||
document.getElementById('frmUpload').action = oEditor.FCKConfig.UPPath+'?moduleid='+oEditor.FCKConfig.ModuleID+'&from=attach'; |
|||
document.getElementById('frmUpload').submit(); |
|||
} |
|||
function Ok() { |
|||
var url = GetE('txtUrl').value; |
|||
if(url.length < 20){alert('Not URL');GetE('txtUrl').value='';GetE('txtUrl').focus();return false;} |
|||
var txt = GetE('txtTit').value; |
|||
if(txt.length < 2){txt = url;} |
|||
var ext = url.substring(url.lastIndexOf('.')+1, url.length); |
|||
ext = ext.toLowerCase(); |
|||
if(ext == 'pdf' || ext == 'doc' || ext == 'xls' || ext == 'ppt') { |
|||
ext = ext; |
|||
} else if (ext == 'docx' || ext == 'xlsx' || ext == 'pptx') { |
|||
ext = ext.substring(0, 3); |
|||
} else if (ext == 'jpg' || ext == 'jpeg' || ext == 'gif' || ext == 'png' || ext == 'bmp') { |
|||
ext = 'img'; |
|||
} else if (ext == 'zip' || ext == 'rar' || ext == 'gz' || ext == 'tar') { |
|||
ext = 'zip'; |
|||
} else if (ext == 'swf' || ext == 'flv') { |
|||
ext = 'swf'; |
|||
} else if (ext == 'mp3' || ext == 'mp4' || ext == 'wav' || ext == 'asf' || ext == 'avi' || ext == 'mpeg' || ext == 'rm' || ext == 'ram' || ext == 'rmvb') { |
|||
ext = 'mov'; |
|||
} else { |
|||
ext = 'att'; |
|||
} |
|||
FCK.InsertHtml(' <img src="'+FCKConfig.ABPath+'editor/images/ext/'+ext+'.gif" width="16" height="16" border="0" alt="" align="absmiddle"/> <a href="'+oEditor.FCKConfig.DTPath+'api/attach.php?url='+url+'&name='+encodeURI(txt)+'" class="attach" rel="nofollow">'+ txt +'</a><br/>'); |
|||
return true; |
|||
} |
|||
</script> |
|||
</head> |
|||
<body scroll="no" style="overflow: hidden"> |
|||
<table border="0" width="98%" align="center"> |
|||
<tr height="30"> |
|||
<td align="right"><span fckLang="DlgGenTitle">Title</span></td> |
|||
<td><input id="txtTit" style="width:300px" type="text"/></td> |
|||
</tr> |
|||
|
|||
<tr height="30"> |
|||
<td align="right"><span fcklang="DlgImgURL">URL</span></td> |
|||
<td><input id="txtUrl" style="width:300px" type="text"/> </td> |
|||
</tr> |
|||
|
|||
<form id="frmUpload" method="post" target="UploadWindow" enctype="multipart/form-data" action="" onsubmit="return Dsubmit();"> |
|||
|
|||
<tr height="30"> |
|||
<td align="right"><span fckLang="DlgLnkUpload">Upload</span></td> |
|||
<td> |
|||
<input id="txtUploadFile" style="WIDTH: 100%" type="file" size="40" name="NewFile" onchange="Dsubmit();GetE('btnUpload').disabled=true;"/><br /> |
|||
</td> |
|||
</tr> |
|||
|
|||
<tr height="30"> |
|||
<td align="right"> </td> |
|||
<td> |
|||
<input id="btnUpload" type="submit" value="Send it to the Server" fckLang="DlgLnkBtnUpload" /> |
|||
</td> |
|||
</tr> |
|||
</form> |
|||
</table> |
|||
<iframe name="UploadWindow" style="display:none;"></iframe> |
|||
</body> |
|||
</html> |
|||
@ -0,0 +1,150 @@ |
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > |
|||
<html> |
|||
<head> |
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
|||
<meta name="robots" content="noindex, nofollow" /> |
|||
<style TYPE="text/css"> |
|||
#ColorTable { cursor: pointer ; cursor: hand ; } |
|||
#hicolor { height: 74px ; width: 74px ; border-width: 1px ; border-style: solid ; } |
|||
#hicolortext { width: 75px ; text-align: right ; margin-bottom: 7px ; } |
|||
#selhicolor { height: 20px ; width: 74px ; border-width: 1px ; border-style: solid ; } |
|||
#selcolor { width: 75px ; height: 20px ; margin-top: 0px ; margin-bottom: 7px ; } |
|||
#btnClear { width: 75px ; height: 22px ; margin-bottom: 6px ; } |
|||
.ColorCell { height: 15px ; width: 15px ; } |
|||
</style> |
|||
<script src="common/fck_dialog_common.js" type="text/javascript"></script> |
|||
<script type="text/javascript"> |
|||
|
|||
var oEditor = window.parent.InnerDialogLoaded() ; |
|||
|
|||
function OnLoad() |
|||
{ |
|||
// First of all, translate the dialog box texts |
|||
oEditor.FCKLanguageManager.TranslatePage(document) ; |
|||
|
|||
CreateColorTable() ; |
|||
|
|||
window.parent.SetOkButton( true ) ; |
|||
window.parent.SetAutoSize( true ) ; |
|||
} |
|||
|
|||
function CreateColorTable() |
|||
{ |
|||
// Get the target table. |
|||
var oTable = document.getElementById('ColorTable') ; |
|||
|
|||
// Create the base colors array. |
|||
var aColors = ['00','33','66','99','cc','ff'] ; |
|||
|
|||
// This function combines two ranges of three values from the color array into a row. |
|||
function AppendColorRow( rangeA, rangeB ) |
|||
{ |
|||
for ( var i = rangeA ; i < rangeA + 3 ; i++ ) |
|||
{ |
|||
var oRow = oTable.insertRow(-1) ; |
|||
|
|||
for ( var j = rangeB ; j < rangeB + 3 ; j++ ) |
|||
{ |
|||
for ( var n = 0 ; n < 6 ; n++ ) |
|||
{ |
|||
AppendColorCell( oRow, '#' + aColors[j] + aColors[n] + aColors[i] ) ; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
// This function create a single color cell in the color table. |
|||
function AppendColorCell( targetRow, color ) |
|||
{ |
|||
var oCell = targetRow.insertCell(-1) ; |
|||
oCell.className = 'ColorCell' ; |
|||
oCell.bgColor = color ; |
|||
|
|||
oCell.onmouseover = function() |
|||
{ |
|||
document.getElementById('hicolor').style.backgroundColor = this.bgColor ; |
|||
document.getElementById('hicolortext').innerHTML = this.bgColor ; |
|||
} |
|||
|
|||
oCell.onclick = function() |
|||
{ |
|||
document.getElementById('selhicolor').style.backgroundColor = this.bgColor ; |
|||
document.getElementById('selcolor').value = this.bgColor ; |
|||
} |
|||
} |
|||
|
|||
AppendColorRow( 0, 0 ) ; |
|||
AppendColorRow( 3, 0 ) ; |
|||
AppendColorRow( 0, 3 ) ; |
|||
AppendColorRow( 3, 3 ) ; |
|||
|
|||
// Create the last row. |
|||
var oRow = oTable.insertRow(-1) ; |
|||
|
|||
// Create the gray scale colors cells. |
|||
for ( var n = 0 ; n < 6 ; n++ ) |
|||
{ |
|||
AppendColorCell( oRow, '#' + aColors[n] + aColors[n] + aColors[n] ) ; |
|||
} |
|||
|
|||
// Fill the row with black cells. |
|||
for ( var i = 0 ; i < 12 ; i++ ) |
|||
{ |
|||
AppendColorCell( oRow, '#000000' ) ; |
|||
} |
|||
} |
|||
|
|||
function Clear() |
|||
{ |
|||
document.getElementById('selhicolor').style.backgroundColor = '' ; |
|||
document.getElementById('selcolor').value = '' ; |
|||
} |
|||
|
|||
function ClearActual() |
|||
{ |
|||
document.getElementById('hicolor').style.backgroundColor = '' ; |
|||
document.getElementById('hicolortext').innerHTML = ' ' ; |
|||
} |
|||
|
|||
function UpdateColor() |
|||
{ |
|||
try { document.getElementById('selhicolor').style.backgroundColor = document.getElementById('selcolor').value ; } |
|||
catch (e) { Clear() ; } |
|||
} |
|||
|
|||
function Ok() |
|||
{ |
|||
if ( typeof(window.parent.Args().CustomValue) == 'function' ) |
|||
window.parent.Args().CustomValue( document.getElementById('selcolor').value ) ; |
|||
|
|||
return true ; |
|||
} |
|||
</script> |
|||
</head> |
|||
<body onload="OnLoad()" scroll="no" style="OVERFLOW: hidden"> |
|||
<table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%"> |
|||
<tr> |
|||
<td align="center" valign="middle"> |
|||
<table border="0" cellspacing="5" cellpadding="0" width="100%"> |
|||
<tr> |
|||
<td valign="top" align="center" nowrap width="100%"> |
|||
<table id="ColorTable" border="0" cellspacing="0" cellpadding="0" width="270" onmouseout="ClearActual();"> |
|||
</table> |
|||
</td> |
|||
<td valign="top" align="left" nowrap> |
|||
<span fckLang="DlgColorHighlight">Highlight</span> |
|||
<div id="hicolor"></div> |
|||
<div id="hicolortext"> </div> |
|||
<span fckLang="DlgColorSelected">Selected</span> |
|||
<div id="selhicolor"></div> |
|||
<input id="selcolor" type="text" maxlength="20" onchange="UpdateColor();"> |
|||
<br> |
|||
<input id="btnClear" type="button" fckLang="DlgColorBtnClear" value="Clear" onclick="Clear();" /> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</body> |
|||
</html> |
|||
@ -0,0 +1,186 @@ |
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
|||
<html> |
|||
<head> |
|||
<title>Flash Properties</title> |
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
|||
<meta content="noindex, nofollow" name="robots"> |
|||
<script src="common/fck_dialog_common.js" type="text/javascript"></script> |
|||
<script src="common/fck_flash.js" type="text/javascript"></script> |
|||
<script type="text/javascript"> |
|||
document.write( FCKTools.GetStyleHtml( GetCommonDialogCss() ) ) ; |
|||
document.write('<script type="text/javascript" src="'+oEditor.FCKConfig.DTPath+'file/script/url2video.js"></scr'+'ipt>') ; |
|||
</script> |
|||
<script type="text/javascript"> |
|||
function Dsubmit() { |
|||
var v = GetE('txtUploadFile').value; |
|||
if(v == '') { |
|||
alert('Not Video'); |
|||
return false; |
|||
} |
|||
var file_ext = v.substring(v.lastIndexOf('.')+1, v.length); |
|||
file_ext = file_ext.toLowerCase(); |
|||
var allow = "mp4|flv|swf|wma|wav|avi|rm|rmvb|ram"; |
|||
if(allow.indexOf(file_ext) == -1){ |
|||
alert('Not '+allow); |
|||
return false; |
|||
} |
|||
document.getElementById('frmUpload').action = oEditor.FCKConfig.UPPath+'?moduleid='+oEditor.FCKConfig.ModuleID+'&from=editor'; |
|||
document.getElementById('frmUpload').submit(); |
|||
} |
|||
function Dext(v) {return v.substring(v.lastIndexOf('.')+1, v.length).toLowerCase();} |
|||
function UpdateURL() { |
|||
var str = url2video(GetE('txtUrl').value); |
|||
if(str) GetE('txtUrl').value = str; |
|||
} |
|||
function GetVHTML() { |
|||
var _url = url2video(GetE('txtUrl').value); |
|||
var url = _url ? _url : GetE('txtUrl').value; |
|||
if(url.length < 20){return '';} |
|||
var width = GetE('txtWidth').value; |
|||
if(width == ''){GetE('txtWidth').focus();return '';} |
|||
var height = GetE('txtHeight').value; |
|||
if(height == ''){GetE('txtHeight').focus();return '';} |
|||
var autostart = GetE('autostart').checked ? 'true' : 'false'; |
|||
var vtype = 'application/x-shockwave-flash'; |
|||
var vetc = 'quality="high" allowfullscreen="true" allowscriptaccess="never"'; |
|||
var ext = Dext(url); |
|||
if(ext == 'rm' || ext == 'rmvb' || ext == 'ram') { |
|||
vtype = 'audio/x-pn-realaudio-extend'; |
|||
vetc = 'controls="imagewindow,controlpanel,statusbar"'; |
|||
} else if(ext == 'wma' || ext == 'wav') { |
|||
vtype = 'application/x-mplayer2'; |
|||
vetc = 'controls="imagewindow,controlpanel,statusbar"'; |
|||
} else if(ext == 'mp3') { |
|||
return '<audio src="'+url+'" controls="controls"></audio>'; |
|||
} else if(ext == 'flv' || ext == 'mp4') { |
|||
return '<embed FlashVars="xml=<vcastr><channel><item><source>'+url+'</source><duration></duration><title></title></item></channel><config><isAutoPlay>'+autostart+'</isAutoPlay><controlPanelBgColor>0x333333</controlPanelBgColor><isShowAbout>false</isShowAbout></config></vcastr>" quality="high" allowfullscreen="true" width="'+width+'" height="'+height+'" type="application/x-shockwave-flash" extendspage="http://get.adobe.com/flashplayer/" src="'+oEditor.FCKConfig.DTPath+'file/flash/vcastr3.swf"></embed>'; |
|||
} |
|||
return '<embed width="'+width+'" height="'+height+'" type="'+vtype+'" autostart="'+autostart+'" '+vetc+' src="'+url+'"></embed>'; |
|||
} |
|||
</script> |
|||
</head> |
|||
<body scroll="no" style="overflow: hidden"> |
|||
<div id="divInfo"> |
|||
<table cellSpacing="1" cellPadding="1" width="100%" border="0"> |
|||
<tr> |
|||
<td> |
|||
<table cellSpacing="0" cellPadding="0" width="100%" border="0"> |
|||
<tr> |
|||
<td width="100%"><span fckLang="DlgImgURL">URL</span> |
|||
</td> |
|||
<td id="tdBrowse" style="DISPLAY: none" noWrap rowSpan="2"> <input id="btnBrowse" onclick="BrowseServer();" type="button" value="Browse Server" fckLang="DlgBtnBrowseServer"> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td vAlign="top"><input id="txtUrl" onblur="UpdateURL();UpdatePreview();" style="WIDTH: 100%" type="text"> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</td> |
|||
</tr> |
|||
|
|||
<tr> |
|||
<td> |
|||
<table cellSpacing="0" cellPadding="0" border="0"> |
|||
<tr> |
|||
<td nowrap> |
|||
<span fckLang="DlgImgWidth">Width</span><br> |
|||
<input id="txtWidth" onkeypress="return IsDigit(event);" type="text" size="3" value="480"/> |
|||
</td> |
|||
<td width="10"> </td> |
|||
<td> |
|||
<span fckLang="DlgImgHeight">Height</span><br> |
|||
<input id="txtHeight" onkeypress="return IsDigit(event);" type="text" size="3" value="400"/> |
|||
</td> |
|||
<td width="15"> </td> |
|||
<td> |
|||
<span fckLang="DlgFlashChkPlay">Auto Play</span><br> |
|||
<input type="radio" name="auto" id="autostart" value="1" checked/> <span fckLang="DlgCellWordWrapYes">Yes</span> |
|||
<input type="radio" name="auto" value="0" id="autostart0"/> <span fckLang="DlgCellWordWrapNo">No</span> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</td> |
|||
</tr> |
|||
|
|||
<tr> |
|||
<td vAlign="top"> |
|||
<table cellSpacing="0" cellPadding="0" width="100%" border="0"> |
|||
<tr> |
|||
<td valign="top" width="100%"> |
|||
<table cellSpacing="0" cellPadding="0" width="100%"> |
|||
<tr> |
|||
<td><span fckLang="DlgImgPreview">Preview</span></td> |
|||
</tr> |
|||
<tr> |
|||
<td id="ePreviewCell" valign="top" class="FlashPreviewArea"><div id="vPreview" style="text-align:center;"> </div></td> |
|||
</tr> |
|||
</table> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</div> |
|||
<div id="divUpload" style="DISPLAY: none"> |
|||
<form id="frmUpload" method="post" target="UploadWindow" enctype="multipart/form-data" action="" onsubmit="return Dsubmit();"> |
|||
<span fckLang="DlgLnkUpload">Upload</span><br /> |
|||
<input id="txtUploadFile" style="WIDTH: 100%" type="file" size="40" name="NewFile" onchange="Dsubmit();GetE('btnUpload').disabled=true;"/><br /> |
|||
mp4 mp3 flv swf wma wav rm rmvb ram... |
|||
<br /> |
|||
<input id="btnUpload" type="submit" value="Send it to the Server" fckLang="DlgLnkBtnUpload" /> |
|||
<script type="text/javascript"> |
|||
document.write( '<iframe name="UploadWindow" style="DISPLAY: none" src="' + FCKTools.GetVoidUrl() + '"></iframe>' ) ; |
|||
</script> |
|||
</form> |
|||
</div> |
|||
<div id="divAdvanced" style="DISPLAY: none"> |
|||
<TABLE cellSpacing="0" cellPadding="0" border="0"> |
|||
<TR> |
|||
<td nowrap> |
|||
<span fckLang="DlgFlashScale">Scale</span><BR> |
|||
<select id="cmbScale"> |
|||
<option value="" selected></option> |
|||
<option value="showall" fckLang="DlgFlashScaleAll">Show all</option> |
|||
<option value="noborder" fckLang="DlgFlashScaleNoBorder">No Border</option> |
|||
<option value="exactfit" fckLang="DlgFlashScaleFit">Exact Fit</option> |
|||
</select></td> |
|||
<td> |
|||
</td> |
|||
<td valign="bottom"> |
|||
<table> |
|||
<tr> |
|||
<td><input id="chkAutoPlay" type="checkbox" checked></td> |
|||
<td><label for="chkAutoPlay" nowrap fckLang="DlgFlashChkPlay">Auto Play</label> </td> |
|||
<td><input id="chkLoop" type="checkbox" checked></td> |
|||
<td><label for="chkLoop" nowrap fckLang="DlgFlashChkLoop">Loop</label> </td> |
|||
<td><input id="chkMenu" type="checkbox" checked></td> |
|||
<td><label for="chkMenu" nowrap fckLang="DlgFlashChkMenu">Enable Flash Menu</label></td> |
|||
</tr> |
|||
</table> |
|||
</td> |
|||
</TR> |
|||
</TABLE> |
|||
<br> |
|||
|
|||
<table cellSpacing="0" cellPadding="0" width="100%" align="center" border="0"> |
|||
<tr> |
|||
<td vAlign="top" width="50%"><span fckLang="DlgGenId">Id</span><br> |
|||
<input id="txtAttId" style="WIDTH: 100%" type="text"> |
|||
</td> |
|||
<td> </td> |
|||
<td vAlign="top" nowrap><span fckLang="DlgGenClass">Stylesheet Classes</span><br> |
|||
<input id="txtAttClasses" style="WIDTH: 100%" type="text"> |
|||
</td> |
|||
<td> </td> |
|||
<td vAlign="top" nowrap width="50%"> <span fckLang="DlgGenTitle">Advisory Title</span><br> |
|||
<input id="txtAttTitle" style="WIDTH: 100%" type="text"> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
<span fckLang="DlgGenStyle">Style</span><br> |
|||
<input id="txtAttStyle" style="WIDTH: 100%" type="text"> |
|||
</div> |
|||
</body> |
|||
</html> |
|||
@ -0,0 +1,276 @@ |
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
|||
<html> |
|||
<head> |
|||
<title>Image Properties</title> |
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
|||
<meta name="robots" content="noindex, nofollow" /> |
|||
<script src="common/fck_dialog_common.js" type="text/javascript"></script> |
|||
<script src="common/fck_image.js" type="text/javascript"></script> |
|||
<script type="text/javascript"> |
|||
document.write( FCKTools.GetStyleHtml( GetCommonDialogCss() ) ) ; |
|||
</script> |
|||
<script type="text/javascript"> |
|||
function basename(s) { |
|||
var p = s.lastIndexOf("/") == -1 ? "\\" : "/"; |
|||
var t = s.split(p); |
|||
var v = t[t.length-1]; |
|||
var n = v.substring(0, v.lastIndexOf('.')); |
|||
return n.match(/^[a-z0-9A-Z]{1,}$/) ? '' : n; |
|||
} |
|||
function Dsubmit() { |
|||
var v = GetE('txtUploadFile').value; |
|||
if(v == '') { |
|||
confirm('Not Image'); |
|||
return false; |
|||
} |
|||
var file_ext = v.substring(v.lastIndexOf('.')+1, v.length); |
|||
file_ext = file_ext.toLowerCase(); |
|||
var allow = "jpg|gif|png|jpeg|bmp"; |
|||
if(allow.indexOf(file_ext) == -1){ |
|||
confirm('Not Image'); |
|||
return false; |
|||
} |
|||
GetE('txtAlt').value = basename(v); |
|||
GetE('frmUpload').action = oEditor.FCKConfig.UPPath+'?moduleid='+oEditor.FCKConfig.ModuleID+'&from=editor'; |
|||
GetE('frmUpload').submit(); |
|||
} |
|||
function Dpreview() { |
|||
var pimg = GetE('txtUploadFile').value; |
|||
if(pimg != '') { |
|||
var isrc = 'file:///'+pimg.replace(/\\/g, '\/'); |
|||
var result = isrc.match(/^[a-zA-Z0-9_\/\.\:\-\\]+$/); |
|||
if(result == null || !document.all) return false; |
|||
GetE('dpreview').innerHTML = '<img src="'+isrc+'" onload="if(this.width>400) this.style.width=\'380px\';"/>'; |
|||
} |
|||
} |
|||
</script> |
|||
</head> |
|||
<body scroll="no" style="overflow: hidden" oncontextmenu='return false'> |
|||
<div id="divUpload"> |
|||
<form id="frmUpload" method="post" target="UploadWindow" enctype="multipart/form-data" |
|||
action="" onsubmit="return Dsubmit();"> |
|||
<span fcklang="DlgLnkUpload">Upload</span><br /> |
|||
<input id="txtUploadFile" style="width:100%;" type="file" size="40" name="NewFile" accept="image/*" onblur="Dpreview();" onchange="Dsubmit();GetE('btnUpload').disabled=true;"/><br /> |
|||
<br /> |
|||
<script type="text/javascript">document.write(oEditor.FCKConfig.IsAdmin ? '<span>' : '<span style="display:none;">');</script> |
|||
<input type="checkbox" name="watermark" value="1" checked/> |
|||
<span fcklang="DlgImgWaterMark">WaterMark</span> |
|||
</span> |
|||
<script type="text/javascript"> |
|||
document.write( '<iframe name="UploadWindow" style="display: none" src="' + FCKTools.GetVoidUrl() + '"></iframe>' ) ; |
|||
</script> |
|||
<input id="btnUpload" type="submit" value="Send it to the Server" fcklang="DlgLnkBtnUpload" /> |
|||
<input id="btnBrowse" type="button" value="Browse Server" fcklang="DlgBtnBrowseServer" onclick="window.open(oEditor.FCKConfig.AJPath+'?action=choose','dwindow','height=500px,width=700px,top=100px,left=200px,resizable=yes,scrollbars=yes');"/> |
|||
</form> |
|||
<div style="width:400px;height:180px;overflow:auto;border:#404040 1px solid;color:#444444;text-align:center;" id="dpreview" onclick="Dpreview();"><br/><br/><br/><br/><br/><br/>No Preview</div> |
|||
</div> |
|||
<div id="divInfo" style="display: none"> |
|||
<table cellspacing="1" cellpadding="1" border="0" width="100%" height="100%"> |
|||
<tr> |
|||
<td> |
|||
<table cellspacing="0" cellpadding="0" width="100%" border="0"> |
|||
<tr> |
|||
<td width="100%"> |
|||
<span fcklang="DlgImgURL">URL</span> |
|||
</td> |
|||
<td id="tdBrowse" style="display: none" nowrap="nowrap" rowspan="2"> |
|||
|
|||
<input id="btnBrowse" onclick="BrowseServer();" type="button" value="Browse Server" |
|||
fcklang="DlgBtnBrowseServer" /> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td valign="top"> |
|||
<input id="txtUrl" style="width: 100%;" type="text" onblur="UpdatePreview();" /> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td> |
|||
<span fcklang="DlgImgAlt">Short Description</span><br /> |
|||
<input id="txtAlt" style="width: 100%" type="text" /><br /> |
|||
</td> |
|||
</tr> |
|||
<tr height="100%"> |
|||
<td valign="top"> |
|||
<table cellspacing="0" cellpadding="0" width="100%" border="0" height="100%"> |
|||
<tr> |
|||
<td valign="top"> |
|||
<br /> |
|||
<table cellspacing="0" cellpadding="0" border="0"> |
|||
<tr> |
|||
<td nowrap="nowrap"> |
|||
<span fcklang="DlgImgWidth">Width</span> </td> |
|||
<td> |
|||
<input type="text" size="3" id="txtWidth" onkeyup="OnSizeChanged('Width',this.value);" /></td> |
|||
<td rowspan="2"> |
|||
<div id="btnLockSizes" class="BtnLocked" onmouseover="this.className = (bLockRatio ? 'BtnLocked' : 'BtnUnlocked' ) + ' BtnOver';" |
|||
onmouseout="this.className = (bLockRatio ? 'BtnLocked' : 'BtnUnlocked' );" title="Lock Sizes" |
|||
onclick="SwitchLock(this);"> |
|||
</div> |
|||
</td> |
|||
<td rowspan="2"> |
|||
<div id="btnResetSize" class="BtnReset" onmouseover="this.className='BtnReset BtnOver';" |
|||
onmouseout="this.className='BtnReset';" title="Reset Size" onclick="ResetSizes();"> |
|||
</div> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td nowrap="nowrap"> |
|||
<span fcklang="DlgImgHeight">Height</span> </td> |
|||
<td> |
|||
<input type="text" size="3" id="txtHeight" onkeyup="OnSizeChanged('Height',this.value);" /></td> |
|||
</tr> |
|||
</table> |
|||
<br /> |
|||
<table cellspacing="0" cellpadding="0" border="0"> |
|||
<tr> |
|||
<td nowrap="nowrap"> |
|||
<span fcklang="DlgImgBorder">Border</span> </td> |
|||
<td> |
|||
<input type="text" size="2" value="" id="txtBorder" onkeyup="UpdatePreview();" /></td> |
|||
</tr> |
|||
<tr> |
|||
<td nowrap="nowrap"> |
|||
<span fcklang="DlgImgHSpace">HSpace</span> </td> |
|||
<td> |
|||
<input type="text" size="2" id="txtHSpace" onkeyup="UpdatePreview();" /></td> |
|||
</tr> |
|||
<tr> |
|||
<td nowrap="nowrap"> |
|||
<span fcklang="DlgImgVSpace">VSpace</span> </td> |
|||
<td> |
|||
<input type="text" size="2" id="txtVSpace" onkeyup="UpdatePreview();" /></td> |
|||
</tr> |
|||
<tr> |
|||
<td nowrap="nowrap"> |
|||
<span fcklang="DlgImgAlign">Align</span> </td> |
|||
<td> |
|||
<select id="cmbAlign" onchange="UpdatePreview();"> |
|||
<option value="" selected="selected"></option> |
|||
<option fcklang="DlgImgAlignLeft" value="left">Left</option> |
|||
<option fcklang="DlgImgAlignAbsBottom" value="absBottom">Abs Bottom</option> |
|||
<option fcklang="DlgImgAlignAbsMiddle" value="absMiddle">Abs Middle</option> |
|||
<option fcklang="DlgImgAlignBaseline" value="baseline">Baseline</option> |
|||
<option fcklang="DlgImgAlignBottom" value="bottom">Bottom</option> |
|||
<option fcklang="DlgImgAlignMiddle" value="middle">Middle</option> |
|||
<option fcklang="DlgImgAlignRight" value="right">Right</option> |
|||
<option fcklang="DlgImgAlignTextTop" value="textTop">Text Top</option> |
|||
<option fcklang="DlgImgAlignTop" value="top">Top</option> |
|||
</select> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</td> |
|||
<td> |
|||
</td> |
|||
<td width="100%" valign="top"> |
|||
<table cellpadding="0" cellspacing="0" width="100%" style="table-layout: fixed"> |
|||
<tr> |
|||
<td> |
|||
<span fcklang="DlgImgPreview">Preview</span></td> |
|||
</tr> |
|||
<tr> |
|||
<td valign="top"> |
|||
<iframe class="ImagePreviewArea" src="common/fck_image_preview.html" frameborder="0" |
|||
marginheight="0" marginwidth="0"></iframe> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</div> |
|||
|
|||
<div id="divLink" style="display: none"> |
|||
<table cellspacing="1" cellpadding="1" border="0" width="100%"> |
|||
<tr> |
|||
<td> |
|||
<div> |
|||
<span fcklang="DlgLnkURL">URL</span><br /> |
|||
<input id="txtLnkUrl" style="width: 100%" type="text" onblur="UpdatePreview();" /> |
|||
</div> |
|||
<div id="divLnkBrowseServer" align="right"> |
|||
<input type="button" value="Browse Server" fcklang="DlgBtnBrowseServer" onclick="LnkBrowseServer();" /> |
|||
</div> |
|||
<div> |
|||
<span fcklang="DlgLnkTarget">Target</span><br /> |
|||
<select id="cmbLnkTarget"> |
|||
<option value="" fcklang="DlgGenNotSet" selected="selected"><not set></option> |
|||
<option value="_blank" fcklang="DlgLnkTargetBlank">New Window (_blank)</option> |
|||
<option value="_top" fcklang="DlgLnkTargetTop">Topmost Window (_top)</option> |
|||
<option value="_self" fcklang="DlgLnkTargetSelf">Same Window (_self)</option> |
|||
<option value="_parent" fcklang="DlgLnkTargetParent">Parent Window (_parent)</option> |
|||
</select> |
|||
</div> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</div> |
|||
<div id="divAdvanced" style="display: none"> |
|||
<table cellspacing="0" cellpadding="0" width="100%" align="center" border="0"> |
|||
<tr> |
|||
<td valign="top" width="50%"> |
|||
<span fcklang="DlgGenId">Id</span><br /> |
|||
<input id="txtAttId" style="width: 100%" type="text" /> |
|||
</td> |
|||
<td width="1"> |
|||
</td> |
|||
<td valign="top"> |
|||
<table cellspacing="0" cellpadding="0" width="100%" align="center" border="0"> |
|||
<tr> |
|||
<td width="60%"> |
|||
<span fcklang="DlgGenLangDir">Language Direction</span><br /> |
|||
<select id="cmbAttLangDir" style="width: 100%"> |
|||
<option value="" fcklang="DlgGenNotSet" selected="selected"><not set></option> |
|||
<option value="ltr" fcklang="DlgGenLangDirLtr">Left to Right (LTR)</option> |
|||
<option value="rtl" fcklang="DlgGenLangDirRtl">Right to Left (RTL)</option> |
|||
</select> |
|||
</td> |
|||
<td width="1%"> |
|||
</td> |
|||
<td nowrap="nowrap"> |
|||
<span fcklang="DlgGenLangCode">Language Code</span><br /> |
|||
<input id="txtAttLangCode" style="width: 100%" type="text" /> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td colspan="3"> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td colspan="3"> |
|||
<span fcklang="DlgGenLongDescr">Long Description URL</span><br /> |
|||
<input id="txtLongDesc" style="width: 100%" type="text" /> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td colspan="3"> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td valign="top"> |
|||
<span fcklang="DlgGenClass">Stylesheet Classes</span><br /> |
|||
<input id="txtAttClasses" style="width: 100%" type="text" /> |
|||
</td> |
|||
<td> |
|||
</td> |
|||
<td valign="top"> |
|||
<span fcklang="DlgGenTitle">Advisory Title</span><br /> |
|||
<input id="txtAttTitle" style="width: 100%" type="text" /> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
<span fcklang="DlgGenStyle">Style</span><br /> |
|||
<input id="txtAttStyle" style="width: 100%" type="text" /> |
|||
</div> |
|||
</body> |
|||
</html> |
|||
@ -0,0 +1,282 @@ |
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
|||
<html> |
|||
<head> |
|||
<title>Link Properties</title> |
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
|||
<meta name="robots" content="noindex, nofollow" /> |
|||
<script src="common/fck_dialog_common.js" type="text/javascript"></script> |
|||
<script src="common/fck_link.js" type="text/javascript"></script> |
|||
</head> |
|||
<body scroll="no" style="OVERFLOW: hidden"> |
|||
<div id="divInfo" style="DISPLAY: none"> |
|||
<span fckLang="DlgLnkType">Link Type</span><br /> |
|||
<select id="cmbLinkType" onchange="SetLinkType(this.value);"> |
|||
<option value="url" fckLang="DlgLnkTypeURL" selected="selected">URL</option> |
|||
<option value="anchor" fckLang="DlgLnkTypeAnchor">Anchor in this page</option> |
|||
<option value="email" fckLang="DlgLnkTypeEMail">E-Mail</option> |
|||
</select> |
|||
<br /> |
|||
<br /> |
|||
<div id="divLinkTypeUrl"> |
|||
<table cellspacing="0" cellpadding="0" width="100%" border="0" dir="ltr"> |
|||
<tr> |
|||
<td nowrap="nowrap"> |
|||
<span fckLang="DlgLnkProto">Protocol</span><br /> |
|||
<select id="cmbLinkProtocol"> |
|||
<option value="http://" selected="selected">http://</option> |
|||
<option value="https://">https://</option> |
|||
<option value="ftp://">ftp://</option> |
|||
<option value="news://">news://</option> |
|||
<option value="" fckLang="DlgLnkProtoOther"><other></option> |
|||
</select> |
|||
</td> |
|||
<td nowrap="nowrap"> </td> |
|||
<td nowrap="nowrap" width="100%"> |
|||
<span fckLang="DlgLnkURL">URL</span><br /> |
|||
<input id="txtUrl" style="WIDTH: 100%" type="text" onkeyup="OnUrlChange();" onchange="OnUrlChange();" /> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
<br /> |
|||
<div id="divBrowseServer"> |
|||
<input type="button" value="Browse Server" fckLang="DlgBtnBrowseServer" onclick="BrowseServer();" /> |
|||
</div> |
|||
</div> |
|||
<div id="divLinkTypeAnchor" style="DISPLAY: none" align="center"> |
|||
<div id="divSelAnchor" style="DISPLAY: none"> |
|||
<table cellspacing="0" cellpadding="0" border="0" width="70%"> |
|||
<tr> |
|||
<td colspan="3"> |
|||
<span fckLang="DlgLnkAnchorSel">Select an Anchor</span> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td width="50%"> |
|||
<span fckLang="DlgLnkAnchorByName">By Anchor Name</span><br /> |
|||
<select id="cmbAnchorName" onchange="GetE('cmbAnchorId').value='';" style="WIDTH: 100%"> |
|||
<option value="" selected="selected"></option> |
|||
</select> |
|||
</td> |
|||
<td> </td> |
|||
<td width="50%"> |
|||
<span fckLang="DlgLnkAnchorById">By Element Id</span><br /> |
|||
<select id="cmbAnchorId" onchange="GetE('cmbAnchorName').value='';" style="WIDTH: 100%"> |
|||
<option value="" selected="selected"></option> |
|||
</select> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</div> |
|||
<div id="divNoAnchor" style="DISPLAY: none"> |
|||
<span fckLang="DlgLnkNoAnchors"><No anchors available in the document></span> |
|||
</div> |
|||
</div> |
|||
<div id="divLinkTypeEMail" style="DISPLAY: none"> |
|||
<span fckLang="DlgLnkEMail">E-Mail Address</span><br /> |
|||
<input id="txtEMailAddress" style="WIDTH: 100%" type="text" /><br /> |
|||
<span fckLang="DlgLnkEMailSubject">Message Subject</span><br /> |
|||
<input id="txtEMailSubject" style="WIDTH: 100%" type="text" /><br /> |
|||
<span fckLang="DlgLnkEMailBody">Message Body</span><br /> |
|||
<textarea id="txtEMailBody" style="WIDTH: 100%" rows="3" cols="20"></textarea> |
|||
</div> |
|||
</div> |
|||
<div id="divUpload" style="DISPLAY: none"> |
|||
<script type="text/javascript"> |
|||
function Dsubmit() { |
|||
var v = GetE('txtUploadFile').value; |
|||
if(v == '') { |
|||
alert('Not File'); |
|||
return false; |
|||
} |
|||
document.getElementById('frmUpload').action = oEditor.FCKConfig.UPPath+'?moduleid='+oEditor.FCKConfig.ModuleID+'&from=editor'; |
|||
document.getElementById('frmUpload').submit(); |
|||
} |
|||
</script> |
|||
<form id="frmUpload" method="post" target="UploadWindow" enctype="multipart/form-data" action="" onsubmit="return Dsubmit();"> |
|||
<span fckLang="DlgLnkUpload">Upload</span><br /> |
|||
<input id="txtUploadFile" style="WIDTH: 100%" type="file" size="40" name="NewFile" /><br /> |
|||
<br /> |
|||
<input id="btnUpload" type="submit" value="Send it to the Server" fckLang="DlgLnkBtnUpload" /> |
|||
<iframe name="UploadWindow" style="DISPLAY: none" src="javascript:void(0)"></iframe> |
|||
</form> |
|||
</div> |
|||
<div id="divTarget" style="DISPLAY: none"> |
|||
<table cellspacing="0" cellpadding="0" width="100%" border="0"> |
|||
<tr> |
|||
<td nowrap="nowrap"> |
|||
<span fckLang="DlgLnkTarget">Target</span><br /> |
|||
<select id="cmbTarget" onchange="SetTarget(this.value);"> |
|||
<option value="" fckLang="DlgGenNotSet" selected="selected"><not set></option> |
|||
<option value="frame" fckLang="DlgLnkTargetFrame"><frame></option> |
|||
<option value="popup" fckLang="DlgLnkTargetPopup"><popup window></option> |
|||
<option value="_blank" fckLang="DlgLnkTargetBlank">New Window (_blank)</option> |
|||
<option value="_top" fckLang="DlgLnkTargetTop">Topmost Window (_top)</option> |
|||
<option value="_self" fckLang="DlgLnkTargetSelf">Same Window (_self)</option> |
|||
<option value="_parent" fckLang="DlgLnkTargetParent">Parent Window (_parent)</option> |
|||
</select> |
|||
</td> |
|||
<td> </td> |
|||
<td id="tdTargetFrame" nowrap="nowrap" width="100%"> |
|||
<span fckLang="DlgLnkTargetFrameName">Target Frame Name</span><br /> |
|||
<input id="txtTargetFrame" style="WIDTH: 100%" type="text" onkeyup="OnTargetNameChange();" |
|||
onchange="OnTargetNameChange();" value=""/> |
|||
</td> |
|||
<td id="tdPopupName" style="DISPLAY: none" nowrap="nowrap" width="100%"> |
|||
<span fckLang="DlgLnkPopWinName">Popup Window Name</span><br /> |
|||
<input id="txtPopupName" style="WIDTH: 100%" type="text" /> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
<br /> |
|||
<table id="tablePopupFeatures" style="DISPLAY: none" cellspacing="0" cellpadding="0" align="center" |
|||
border="0"> |
|||
<tr> |
|||
<td> |
|||
<span fckLang="DlgLnkPopWinFeat">Popup Window Features</span><br /> |
|||
<table cellspacing="0" cellpadding="0" border="0"> |
|||
<tr> |
|||
<td valign="top" nowrap="nowrap" width="50%"> |
|||
<input id="chkPopupResizable" name="chkFeature" value="resizable" type="checkbox" /><label for="chkPopupResizable" fckLang="DlgLnkPopResize">Resizable</label><br /> |
|||
<input id="chkPopupLocationBar" name="chkFeature" value="location" type="checkbox" /><label for="chkPopupLocationBar" fckLang="DlgLnkPopLocation">Location |
|||
Bar</label><br /> |
|||
<input id="chkPopupManuBar" name="chkFeature" value="menubar" type="checkbox" /><label for="chkPopupManuBar" fckLang="DlgLnkPopMenu">Menu |
|||
Bar</label><br /> |
|||
<input id="chkPopupScrollBars" name="chkFeature" value="scrollbars" type="checkbox" /><label for="chkPopupScrollBars" fckLang="DlgLnkPopScroll">Scroll |
|||
Bars</label> |
|||
</td> |
|||
<td></td> |
|||
<td valign="top" nowrap="nowrap" width="50%"> |
|||
<input id="chkPopupStatusBar" name="chkFeature" value="status" type="checkbox" /><label for="chkPopupStatusBar" fckLang="DlgLnkPopStatus">Status |
|||
Bar</label><br /> |
|||
<input id="chkPopupToolbar" name="chkFeature" value="toolbar" type="checkbox" /><label for="chkPopupToolbar" fckLang="DlgLnkPopToolbar">Toolbar</label><br /> |
|||
<input id="chkPopupFullScreen" name="chkFeature" value="fullscreen" type="checkbox" /><label for="chkPopupFullScreen" fckLang="DlgLnkPopFullScrn">Full |
|||
Screen (IE)</label><br /> |
|||
<input id="chkPopupDependent" name="chkFeature" value="dependent" type="checkbox" /><label for="chkPopupDependent" fckLang="DlgLnkPopDependent">Dependent |
|||
(Netscape)</label> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td valign="top" nowrap="nowrap" width="50%"> </td> |
|||
<td></td> |
|||
<td valign="top" nowrap="nowrap" width="50%"></td> |
|||
</tr> |
|||
<tr> |
|||
<td valign="top"> |
|||
<table cellspacing="0" cellpadding="0" border="0"> |
|||
<tr> |
|||
<td nowrap="nowrap"><span fckLang="DlgLnkPopWidth">Width</span></td> |
|||
<td> <input id="txtPopupWidth" type="text" maxlength="4" size="4" /></td> |
|||
</tr> |
|||
<tr> |
|||
<td nowrap="nowrap"><span fckLang="DlgLnkPopHeight">Height</span></td> |
|||
<td> <input id="txtPopupHeight" type="text" maxlength="4" size="4" /></td> |
|||
</tr> |
|||
</table> |
|||
</td> |
|||
<td> </td> |
|||
<td valign="top"> |
|||
<table cellspacing="0" cellpadding="0" border="0"> |
|||
<tr> |
|||
<td nowrap="nowrap"><span fckLang="DlgLnkPopLeft">Left Position</span></td> |
|||
<td> <input id="txtPopupLeft" type="text" maxlength="4" size="4" /></td> |
|||
</tr> |
|||
<tr> |
|||
<td nowrap="nowrap"><span fckLang="DlgLnkPopTop">Top Position</span></td> |
|||
<td> <input id="txtPopupTop" type="text" maxlength="4" size="4" /></td> |
|||
</tr> |
|||
</table> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</div> |
|||
<div id="divAttribs" style="DISPLAY: none"> |
|||
<table cellspacing="0" cellpadding="0" width="100%" align="center" border="0"> |
|||
<tr> |
|||
<td valign="top" width="50%"> |
|||
<span fckLang="DlgGenId">Id</span><br /> |
|||
<input id="txtAttId" style="WIDTH: 100%" type="text" /> |
|||
</td> |
|||
<td width="1"></td> |
|||
<td valign="top"> |
|||
<table cellspacing="0" cellpadding="0" width="100%" align="center" border="0"> |
|||
<tr> |
|||
<td width="60%"> |
|||
<span fckLang="DlgGenLangDir">Language Direction</span><br /> |
|||
<select id="cmbAttLangDir" style="WIDTH: 100%"> |
|||
<option value="" fckLang="DlgGenNotSet" selected><not set></option> |
|||
<option value="ltr" fckLang="DlgGenLangDirLtr">Left to Right (LTR)</option> |
|||
<option value="rtl" fckLang="DlgGenLangDirRtl">Right to Left (RTL)</option> |
|||
</select> |
|||
</td> |
|||
<td width="1%"> </td> |
|||
<td nowrap="nowrap"><span fckLang="DlgGenAccessKey">Access Key</span><br /> |
|||
<input id="txtAttAccessKey" style="WIDTH: 100%" type="text" maxlength="1" size="1" /> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td valign="top" width="50%"> |
|||
<span fckLang="DlgGenName">Name</span><br /> |
|||
<input id="txtAttName" style="WIDTH: 100%" type="text" /> |
|||
</td> |
|||
<td width="1"></td> |
|||
<td valign="top"> |
|||
<table cellspacing="0" cellpadding="0" width="100%" align="center" border="0"> |
|||
<tr> |
|||
<td width="60%"> |
|||
<span fckLang="DlgGenLangCode">Language Code</span><br /> |
|||
<input id="txtAttLangCode" style="WIDTH: 100%" type="text" /> |
|||
</td> |
|||
<td width="1%"> </td> |
|||
<td nowrap="nowrap"> |
|||
<span fckLang="DlgGenTabIndex">Tab Index</span><br /> |
|||
<input id="txtAttTabIndex" style="WIDTH: 100%" type="text" maxlength="5" size="5" /> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td valign="top" width="50%"> </td> |
|||
<td width="1"></td> |
|||
<td valign="top"></td> |
|||
</tr> |
|||
<tr> |
|||
<td valign="top" width="50%"> |
|||
<span fckLang="DlgGenTitle">Advisory Title</span><br /> |
|||
<input id="txtAttTitle" style="WIDTH: 100%" type="text" /> |
|||
</td> |
|||
<td width="1"> </td> |
|||
<td valign="top"> |
|||
<span fckLang="DlgGenContType">Advisory Content Type</span><br /> |
|||
<input id="txtAttContentType" style="WIDTH: 100%" type="text" /> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td valign="top"> |
|||
<span fckLang="DlgGenClass">Stylesheet Classes</span><br /> |
|||
<input id="txtAttClasses" style="WIDTH: 100%" type="text" /> |
|||
</td> |
|||
<td></td> |
|||
<td valign="top"> |
|||
<span fckLang="DlgGenLinkCharset">Linked Resource Charset</span><br /> |
|||
<input id="txtAttCharSet" style="WIDTH: 100%" type="text" /> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
<table cellspacing="0" cellpadding="0" width="100%" align="center" border="0"> |
|||
<tr> |
|||
<td> |
|||
<span fckLang="DlgGenStyle">Style</span><br /> |
|||
<input id="txtAttStyle" style="WIDTH: 100%" type="text" /> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</div> |
|||
</body> |
|||
</html> |
|||
@ -0,0 +1,98 @@ |
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > |
|||
<html xmlns="http://www.w3.org/1999/xhtml"> |
|||
<head> |
|||
<title></title> |
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
|||
<meta content="noindex, nofollow" name="robots" /> |
|||
<script src="common/fck_dialog_common.js" type="text/javascript"></script> |
|||
<script type="text/javascript"> |
|||
|
|||
var dialog = window.parent ; |
|||
var oEditor = dialog.InnerDialogLoaded() ; |
|||
|
|||
// Gets the document DOM |
|||
var oDOM = oEditor.FCK.EditorDocument ; |
|||
var sListType = ( location.search == '?OL' ? 'OL' : 'UL' ) ; |
|||
|
|||
var oActiveEl = dialog.Selection.GetSelection().MoveToAncestorNode( sListType ) ; |
|||
var oActiveSel ; |
|||
|
|||
window.onload = function() |
|||
{ |
|||
// First of all, translate the dialog box texts |
|||
oEditor.FCKLanguageManager.TranslatePage(document) ; |
|||
|
|||
if ( sListType == 'UL' ) |
|||
oActiveSel = GetE('selBulleted') ; |
|||
else |
|||
{ |
|||
if ( oActiveEl ) |
|||
{ |
|||
oActiveSel = GetE('selNumbered') ; |
|||
GetE('eStart').style.display = '' ; |
|||
GetE('txtStartPosition').value = GetAttribute( oActiveEl, 'start' ) ; |
|||
} |
|||
} |
|||
|
|||
oActiveSel.style.display = '' ; |
|||
|
|||
if ( oActiveEl ) |
|||
{ |
|||
if ( oActiveEl.getAttribute('type') ) |
|||
oActiveSel.value = oActiveEl.getAttribute('type') ; |
|||
} |
|||
|
|||
dialog.SetOkButton( true ) ; |
|||
dialog.SetAutoSize( true ) ; |
|||
|
|||
SelectField( 'txtStartPosition' ) ; |
|||
} |
|||
|
|||
function Ok() |
|||
{ |
|||
if ( oActiveEl ){ |
|||
SetAttribute( oActiveEl, 'type' , oActiveSel.value ) ; |
|||
if(oActiveEl.tagName == 'OL') |
|||
SetAttribute( oActiveEl, 'start', GetE('txtStartPosition').value ) ; |
|||
} |
|||
|
|||
return true ; |
|||
} |
|||
|
|||
</script> |
|||
</head> |
|||
<body style="overflow: hidden"> |
|||
<table width="100%" style="height: 100%"> |
|||
<tr> |
|||
<td style="text-align:center"> |
|||
<table cellspacing="0" cellpadding="0" border="0" style="margin-left: auto; margin-right: auto;"> |
|||
<tr> |
|||
<td id="eStart" style="display: none; padding-right: 5px; padding-left: 5px"> |
|||
<span fcklang="DlgLstStart">Start</span><br /> |
|||
<input type="text" id="txtStartPosition" size="5" /> |
|||
</td> |
|||
<td style="padding-right: 5px; padding-left: 5px"> |
|||
<span fcklang="DlgLstType">List Type</span><br /> |
|||
<select id="selBulleted" style="display: none"> |
|||
<option value="" selected="selected"></option> |
|||
<option value="circle" fcklang="DlgLstTypeCircle">Circle</option> |
|||
<option value="disc" fcklang="DlgLstTypeDisc">Disc</option> |
|||
<option value="square" fcklang="DlgLstTypeSquare">Square</option> |
|||
</select> |
|||
<select id="selNumbered" style="display: none"> |
|||
<option value="" selected="selected"></option> |
|||
<option value="1" fcklang="DlgLstTypeNumbers">Numbers (1, 2, 3)</option> |
|||
<option value="a" fcklang="DlgLstTypeLCase">Lowercase Letters (a, b, c)</option> |
|||
<option value="A" fcklang="DlgLstTypeUCase">Uppercase Letters (A, B, C)</option> |
|||
<option value="i" fcklang="DlgLstTypeSRoman">Small Roman Numerals (i, ii, iii)</option> |
|||
<option value="I" fcklang="DlgLstTypeLRoman">Large Roman Numerals (I, II, III)</option> |
|||
</select> |
|||
|
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</body> |
|||
</html> |
|||
@ -0,0 +1,323 @@ |
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
|||
<html xmlns="http://www.w3.org/1999/xhtml"> |
|||
<head> |
|||
<title></title> |
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
|||
<meta name="robots" content="noindex, nofollow" /> |
|||
<script src="common/fck_dialog_common.js" type="text/javascript"></script> |
|||
<script type="text/javascript"> |
|||
var dialog = window.parent ; |
|||
var oEditor = dialog.InnerDialogLoaded() ; |
|||
var FCK = oEditor.FCK; |
|||
var FCKTools = oEditor.FCKTools ; |
|||
var FCKConfig = oEditor.FCKConfig ; |
|||
var FCKBrowserInfo = oEditor.FCKBrowserInfo ; |
|||
window.onload = function () |
|||
{ |
|||
// First of all, translate the dialog box texts |
|||
oEditor.FCKLanguageManager.TranslatePage(document) ; |
|||
|
|||
var sPastingType = dialog.Args().CustomValue ; |
|||
|
|||
if ( sPastingType == 'Word' || sPastingType == 'Security' ) |
|||
{ |
|||
if ( sPastingType == 'Security' ) |
|||
document.getElementById( 'xSecurityMsg' ).style.display = '' ; |
|||
|
|||
// For document.domain compatibility (#123) we must do all the magic in |
|||
// the URL for IE. |
|||
var sFrameUrl = !oEditor.FCK_IS_CUSTOM_DOMAIN || !FCKBrowserInfo.IsIE ? |
|||
'javascript:void(0)' : |
|||
'javascript:void( (function(){' + |
|||
'document.open() ;' + |
|||
'document.domain=\'' + document.domain + '\' ;' + |
|||
'document.write(\'<html><head><script>window.onerror = function() { return true ; };<\/script><\/head><body><\/body><\/html>\') ;' + |
|||
'document.close() ;' + |
|||
'document.body.contentEditable = true ;' + |
|||
'window.focus() ;' + |
|||
'})() )' ; |
|||
|
|||
var eFrameSpace = document.getElementById( 'xFrameSpace' ) ; |
|||
eFrameSpace.innerHTML = '<iframe id="frmData" src="' + sFrameUrl + '" ' + |
|||
'height="98%" width="99%" frameborder="0" style="border: #000000 1px; background-color: #ffffff"></iframe>' ; |
|||
|
|||
var oFrame = eFrameSpace.firstChild ; |
|||
|
|||
if ( !oEditor.FCK_IS_CUSTOM_DOMAIN || !FCKBrowserInfo.IsIE ) |
|||
{ |
|||
// Avoid errors if the pasted content has any script that fails: #389 |
|||
var oDoc = oFrame.contentWindow.document ; |
|||
oDoc.open() ; |
|||
oDoc.write('<html><head><script>window.onerror = function() { return true ; };<\/script><\/head><body><\/body><\/html>') ; |
|||
oDoc.close() ; |
|||
|
|||
if ( FCKBrowserInfo.IsIE ) |
|||
oDoc.body.contentEditable = true ; |
|||
else |
|||
oDoc.designMode = 'on' ; |
|||
|
|||
oFrame.contentWindow.focus(); |
|||
} |
|||
} |
|||
else |
|||
{ |
|||
document.getElementById('txtData').style.display = '' ; |
|||
} |
|||
|
|||
if ( sPastingType != 'Word' ) |
|||
document.getElementById('oWordCommands').style.display = 'none' ; |
|||
|
|||
dialog.SetOkButton( true ) ; |
|||
dialog.SetAutoSize( true ) ; |
|||
} |
|||
|
|||
function Ok() |
|||
{ |
|||
// Before doing anything, save undo snapshot. |
|||
oEditor.FCKUndo.SaveUndoStep() ; |
|||
|
|||
var sHtml ; |
|||
|
|||
var sPastingType = dialog.Args().CustomValue ; |
|||
|
|||
if ( sPastingType == 'Word' || sPastingType == 'Security' ) |
|||
{ |
|||
var oFrame = document.getElementById('frmData') ; |
|||
var oBody ; |
|||
|
|||
if ( oFrame.contentDocument ) |
|||
oBody = oFrame.contentDocument.body ; |
|||
else |
|||
oBody = oFrame.contentWindow.document.body ; |
|||
|
|||
if ( sPastingType == 'Word' ) |
|||
{ |
|||
// If a extend creates a FCK.CustomCleanWord function it will be called instead of the default one |
|||
if ( typeof( FCK.CustomCleanWord ) == 'function' ) |
|||
sHtml = FCK.CustomCleanWord( oBody, document.getElementById('chkRemoveFont').checked, document.getElementById('chkRemoveStyles').checked ) ; |
|||
else |
|||
sHtml = CleanWord( oBody, document.getElementById('chkRemoveFont').checked, document.getElementById('chkRemoveStyles').checked ) ; |
|||
} |
|||
else |
|||
sHtml = oBody.innerHTML ; |
|||
|
|||
// Fix relative anchor URLs (IE automatically adds the current page URL). |
|||
var re = new RegExp( window.location + "#", "g" ) ; |
|||
sHtml = sHtml.replace( re, '#') ; |
|||
} |
|||
else |
|||
{ |
|||
sHtml = oEditor.FCKTools.HTMLEncode( document.getElementById('txtData').value ) ; |
|||
sHtml = FCKTools.ProcessLineBreaks( oEditor, FCKConfig, sHtml ) ; |
|||
|
|||
// FCK.InsertHtml() does not work for us, since document fragments cannot contain node fragments. :( |
|||
// Use the marker method instead. It's primitive, but it works. |
|||
var range = new oEditor.FCKDomRange( oEditor.FCK.EditorWindow ) ; |
|||
var oDoc = oEditor.FCK.EditorDocument ; |
|||
dialog.Selection.EnsureSelection() ; |
|||
range.MoveToSelection() ; |
|||
range.DeleteContents() ; |
|||
var marker = [] ; |
|||
for ( var i = 0 ; i < 5 ; i++ ) |
|||
marker.push( parseInt(Math.random() * 100000, 10 ) ) ; |
|||
marker = marker.join( "" ) ; |
|||
range.InsertNode ( oDoc.createTextNode( marker ) ) ; |
|||
var bookmark = range.CreateBookmark() ; |
|||
|
|||
// Now we've got a marker indicating the paste position in the editor document. |
|||
// Find its position in the HTML code. |
|||
var htmlString = oDoc.body.innerHTML ; |
|||
var index = htmlString.indexOf( marker ) ; |
|||
|
|||
// Split it the HTML code up, add the code we generated, and put them back together. |
|||
var htmlList = [] ; |
|||
htmlList.push( htmlString.substr( 0, index ) ) ; |
|||
htmlList.push( sHtml ) ; |
|||
htmlList.push( htmlString.substr( index + marker.length ) ) ; |
|||
htmlString = htmlList.join( "" ) ; |
|||
|
|||
if ( oEditor.FCKBrowserInfo.IsIE ) |
|||
oEditor.FCK.SetInnerHtml( htmlString ) ; |
|||
else |
|||
oDoc.body.innerHTML = htmlString ; |
|||
|
|||
range.MoveToBookmark( bookmark ) ; |
|||
range.Collapse( false ) ; |
|||
range.Select() ; |
|||
range.Release() ; |
|||
return true ; |
|||
} |
|||
|
|||
oEditor.FCK.InsertHtml( sHtml ) ; |
|||
|
|||
return true ; |
|||
} |
|||
|
|||
// This function will be called from the PasteFromWord dialog (fck_paste.html) |
|||
// Input: oNode a DOM node that contains the raw paste from the clipboard |
|||
// bIgnoreFont, bRemoveStyles booleans according to the values set in the dialog |
|||
// Output: the cleaned string |
|||
function CleanWord( oNode, bIgnoreFont, bRemoveStyles ) |
|||
{ |
|||
var html = oNode.innerHTML ; |
|||
|
|||
html = html.replace(/<o:p>\s*<\/o:p>/g, '') ; |
|||
html = html.replace(/<o:p>.*?<\/o:p>/g, ' ') ; |
|||
|
|||
// Remove mso-xxx styles. |
|||
html = html.replace( /\s*mso-[^:]+:[^;"]+;?/gi, '' ) ; |
|||
|
|||
// Remove margin styles. |
|||
html = html.replace( /\s*MARGIN: 0cm 0cm 0pt\s*;/gi, '' ) ; |
|||
html = html.replace( /\s*MARGIN: 0cm 0cm 0pt\s*"/gi, "\"" ) ; |
|||
|
|||
html = html.replace( /\s*TEXT-INDENT: 0cm\s*;/gi, '' ) ; |
|||
html = html.replace( /\s*TEXT-INDENT: 0cm\s*"/gi, "\"" ) ; |
|||
|
|||
html = html.replace( /\s*TEXT-ALIGN: [^\s;]+;?"/gi, "\"" ) ; |
|||
|
|||
html = html.replace( /\s*PAGE-BREAK-BEFORE: [^\s;]+;?"/gi, "\"" ) ; |
|||
|
|||
html = html.replace( /\s*FONT-VARIANT: [^\s;]+;?"/gi, "\"" ) ; |
|||
|
|||
html = html.replace( /\s*tab-stops:[^;"]*;?/gi, '' ) ; |
|||
html = html.replace( /\s*tab-stops:[^"]*/gi, '' ) ; |
|||
|
|||
// Remove FONT face attributes. |
|||
if ( bIgnoreFont ) |
|||
{ |
|||
html = html.replace( /\s*face="[^"]*"/gi, '' ) ; |
|||
html = html.replace( /\s*face=[^ >]*/gi, '' ) ; |
|||
|
|||
html = html.replace( /\s*FONT-FAMILY:[^;"]*;?/gi, '' ) ; |
|||
} |
|||
|
|||
// Remove Class attributes |
|||
html = html.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi, "<$1$3") ; |
|||
|
|||
// Remove styles. |
|||
if ( bRemoveStyles ) |
|||
html = html.replace( /<(\w[^>]*) style="([^\"]*)"([^>]*)/gi, "<$1$3" ) ; |
|||
|
|||
// Remove empty styles. |
|||
html = html.replace( /\s*style="\s*"/gi, '' ) ; |
|||
|
|||
html = html.replace( /<SPAN\s*[^>]*>\s* \s*<\/SPAN>/gi, ' ' ) ; |
|||
|
|||
html = html.replace( /<SPAN\s*[^>]*><\/SPAN>/gi, '' ) ; |
|||
|
|||
// Remove Lang attributes |
|||
html = html.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi, "<$1$3") ; |
|||
|
|||
html = html.replace( /<SPAN\s*>(.*?)<\/SPAN>/gi, '$1' ) ; |
|||
|
|||
html = html.replace( /<FONT\s*>(.*?)<\/FONT>/gi, '$1' ) ; |
|||
|
|||
// Remove Meta attributes (For Firefox) |
|||
html = html.replace( /<LINK\s*[^>]*>/gi, '' ) ; |
|||
html = html.replace( /<META\s*[^>]*>/gi, '' ) ; |
|||
html = html.replace( /<\/META>/gi, '' ) ; |
|||
|
|||
// Remove XML elements and declarations |
|||
html = html.replace(/<\\?\?xml[^>]*>/gi, '' ) ; |
|||
|
|||
// Remove Tags with XML namespace declarations: <o:p><\/o:p> |
|||
html = html.replace(/<\/?\w+:[^>]*>/gi, '' ) ; |
|||
|
|||
// Remove comments [SF BUG-1481861]. |
|||
html = html.replace(/<\!--.*?-->/g, '' ) ; |
|||
|
|||
html = html.replace( /<(U|I|STRIKE)> <\/\1>/g, ' ' ) ; |
|||
|
|||
html = html.replace( /<H\d>\s*<\/H\d>/gi, '' ) ; |
|||
|
|||
// Remove "display:none" tags. |
|||
html = html.replace( /<(\w+)[^>]*\sstyle="[^"]*DISPLAY\s?:\s?none(.*?)<\/\1>/ig, '' ) ; |
|||
|
|||
// Remove language tags |
|||
html = html.replace( /<(\w[^>]*) language=([^ |>]*)([^>]*)/gi, "<$1$3") ; |
|||
|
|||
// Remove onmouseover and onmouseout events (from MS Word comments effect) |
|||
html = html.replace( /<(\w[^>]*) onmouseover="([^\"]*)"([^>]*)/gi, "<$1$3") ; |
|||
html = html.replace( /<(\w[^>]*) onmouseout="([^\"]*)"([^>]*)/gi, "<$1$3") ; |
|||
|
|||
if ( FCKConfig.CleanWordKeepsStructure ) |
|||
{ |
|||
// The original <Hn> tag send from Word is something like this: <Hn style="margin-top:0px;margin-bottom:0px"> |
|||
html = html.replace( /<H(\d)([^>]*)>/gi, '<h$1>' ) ; |
|||
|
|||
// Word likes to insert extra <font> tags, when using MSIE. (Wierd). |
|||
html = html.replace( /<(H\d)><FONT[^>]*>(.*?)<\/FONT><\/\1>/gi, '<$1>$2<\/$1>' ); |
|||
html = html.replace( /<(H\d)><EM>(.*?)<\/EM><\/\1>/gi, '<$1>$2<\/$1>' ); |
|||
} |
|||
else |
|||
{ |
|||
html = html.replace( /<H1([^>]*)>/gi, '<div$1><b><font size="6">' ) ; |
|||
html = html.replace( /<H2([^>]*)>/gi, '<div$1><b><font size="5">' ) ; |
|||
html = html.replace( /<H3([^>]*)>/gi, '<div$1><b><font size="4">' ) ; |
|||
html = html.replace( /<H4([^>]*)>/gi, '<div$1><b><font size="3">' ) ; |
|||
html = html.replace( /<H5([^>]*)>/gi, '<div$1><b><font size="2">' ) ; |
|||
html = html.replace( /<H6([^>]*)>/gi, '<div$1><b><font size="1">' ) ; |
|||
|
|||
html = html.replace( /<\/H\d>/gi, '<\/font><\/b><\/div>' ) ; |
|||
|
|||
// Transform <P> to <DIV> |
|||
var re = new RegExp( '(<P)([^>]*>.*?)(<\/P>)', 'gi' ) ; // Different because of a IE 5.0 error |
|||
html = html.replace( re, '<div$2<\/div>' ) ; |
|||
|
|||
// Remove empty tags (three times, just to be sure). |
|||
// This also removes any empty anchor |
|||
html = html.replace( /<([^\s>]+)(\s[^>]*)?>\s*<\/\1>/g, '' ) ; |
|||
html = html.replace( /<([^\s>]+)(\s[^>]*)?>\s*<\/\1>/g, '' ) ; |
|||
html = html.replace( /<([^\s>]+)(\s[^>]*)?>\s*<\/\1>/g, '' ) ; |
|||
} |
|||
|
|||
html = html.replace( /<PRE\s*[^>]*>(.*?)<\/PRE>/gi, '<p>$1</p>' ) ; |
|||
html = html.replace( /<P\s*[^>]*>\s* \s*<\/P>/gi, '' ) ; |
|||
html = html.replace( /<DIV\s*[^>]*>\s* \s*<\/DIV>/gi, '' ) ; |
|||
return html ; |
|||
} |
|||
|
|||
</script> |
|||
|
|||
</head> |
|||
<body style="overflow: hidden"> |
|||
<table cellspacing="0" cellpadding="0" width="100%" border="0" style="height: 98%"> |
|||
<tr> |
|||
<td> |
|||
<div id="xSecurityMsg" style="display: none"> |
|||
<span fcklang="DlgPasteSec">Because of your browser security settings, |
|||
the editor is not able to access your clipboard data directly. You are required |
|||
to paste it again in this window.</span><br /> |
|||
|
|||
</div> |
|||
<div> |
|||
<span fcklang="DlgPasteMsg2">Please paste inside the following box using the keyboard |
|||
(<strong>Ctrl+V</strong>) and hit <strong>OK</strong>.</span><br /> |
|||
|
|||
</div> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td id="xFrameSpace" valign="top" height="100%" style="border: #000000 1px solid"> |
|||
<textarea id="txtData" cols="80" rows="5" style="border: #000000 1px; display: none; |
|||
width: 99%; height: 98%"></textarea> |
|||
</td> |
|||
</tr> |
|||
<tr id="oWordCommands"> |
|||
<td> |
|||
|
|||
<input id="chkRemoveFont" type="checkbox" checked="checked"/> |
|||
<label for="chkRemoveFont" fcklang="DlgPasteIgnoreFont"> |
|||
Ignore Font Face definitions</label> |
|||
<br /> |
|||
<input id="chkRemoveStyles" type="checkbox" checked="checked"/> |
|||
<label for="chkRemoveStyles" fcklang="DlgPasteRemoveStyles"> |
|||
Remove Styles definitions</label> |
|||
|
|||
</td> |
|||
</tr> |
|||
</table> |
|||
<script type="text/javascript">if(!oEditor.FCKConfig.IsAdmin) GetE('oWordCommands').style.display='none';</script> |
|||
</body> |
|||
</html> |
|||
@ -0,0 +1,508 @@ |
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
|||
<html xmlns="http://www.w3.org/1999/xhtml"> |
|||
<head> |
|||
<title></title> |
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
|||
<meta content="noindex, nofollow" name="robots" /> |
|||
<script src="common/fck_dialog_common.js" type="text/javascript"></script> |
|||
<script type="text/javascript"> |
|||
|
|||
var dialog = window.parent ; |
|||
var oEditor = dialog.InnerDialogLoaded() ; |
|||
var dialogArguments = dialog.Args() ; |
|||
|
|||
var FCKLang = oEditor.FCKLang ; |
|||
|
|||
dialog.AddTab( 'Find', FCKLang.DlgFindTitle ) ; |
|||
dialog.AddTab( 'Replace', FCKLang.DlgReplaceTitle ) ; |
|||
var idMap = {} ; |
|||
|
|||
function OnDialogTabChange( tabCode ) |
|||
{ |
|||
ShowE( 'divFind', ( tabCode == 'Find' ) ) ; |
|||
ShowE( 'divReplace', ( tabCode == 'Replace' ) ) ; |
|||
idMap['FindText'] = 'txtFind' + tabCode ; |
|||
idMap['CheckCase'] = 'chkCase' + tabCode ; |
|||
idMap['CheckWord'] = 'chkWord' + tabCode ; |
|||
|
|||
if ( tabCode == 'Replace' ) |
|||
dialog.SetAutoSize( true ) ; |
|||
} |
|||
|
|||
// Place a range at the start of document. |
|||
// This will be the starting point of our search. |
|||
var GlobalRange = new oEditor.FCKDomRange( oEditor.FCK.EditorWindow ) ; |
|||
|
|||
function ResetGlobalRange() |
|||
{ |
|||
GlobalRange.SetStart( oEditor.FCK.EditorDocument.body, 1 ) ; |
|||
GlobalRange.SetEnd( oEditor.FCK.EditorDocument.body, 1 ) ; |
|||
GlobalRange.Collapse( true ) ; |
|||
} |
|||
ResetGlobalRange() ; |
|||
|
|||
var HighlightRange = null ; |
|||
function Highlight() |
|||
{ |
|||
if ( HighlightRange ) |
|||
ClearHighlight() ; |
|||
var cloneRange = GlobalRange.Clone() ; |
|||
oEditor.FCKStyles.GetStyle( '_FCK_SelectionHighlight' ).ApplyToRange( cloneRange, false, true ) ; |
|||
HighlightRange = cloneRange ; |
|||
GlobalRange = HighlightRange.Clone() ; |
|||
} |
|||
|
|||
function ClearHighlight() |
|||
{ |
|||
if ( HighlightRange ) |
|||
{ |
|||
oEditor.FCKStyles.GetStyle( '_FCK_SelectionHighlight' ).RemoveFromRange( HighlightRange, false, true ) ; |
|||
HighlightRange = null ; |
|||
} |
|||
} |
|||
|
|||
function OnLoad() |
|||
{ |
|||
// First of all, translate the dialog box texts. |
|||
oEditor.FCKLanguageManager.TranslatePage( document ) ; |
|||
|
|||
// Show the appropriate tab at startup. |
|||
if ( dialogArguments.CustomValue == 'Find' ) |
|||
{ |
|||
dialog.SetSelectedTab( 'Find' ) ; |
|||
dialog.SetAutoSize( true ) ; |
|||
} |
|||
else |
|||
dialog.SetSelectedTab( 'Replace' ) ; |
|||
|
|||
SelectField( 'txtFind' + dialogArguments.CustomValue ) ; |
|||
} |
|||
|
|||
function btnStat() |
|||
{ |
|||
GetE('btnReplace').disabled = |
|||
GetE('btnReplaceAll').disabled = |
|||
GetE('btnFind').disabled = |
|||
( GetE(idMap["FindText"]).value.length == 0 ) ; |
|||
} |
|||
|
|||
function btnStatDelayed() |
|||
{ |
|||
setTimeout( btnStat, 1 ) ; |
|||
} |
|||
|
|||
function GetSearchString() |
|||
{ |
|||
return GetE(idMap['FindText']).value ; |
|||
} |
|||
|
|||
function GetReplaceString() |
|||
{ |
|||
return GetE("txtReplace").value ; |
|||
} |
|||
|
|||
function GetCheckCase() |
|||
{ |
|||
return !! ( GetE(idMap['CheckCase']).checked ) ; |
|||
} |
|||
|
|||
function GetMatchWord() |
|||
{ |
|||
return !! ( GetE(idMap['CheckWord']).checked ) ; |
|||
} |
|||
|
|||
// Get the data pointed to by a bookmark. |
|||
function GetData( bookmark ) |
|||
{ |
|||
var cursor = oEditor.FCK.EditorDocument.documentElement ; |
|||
for ( var i = 0 ; i < bookmark.length ; i++ ) |
|||
{ |
|||
var target = bookmark[i] ; |
|||
var currentIndex = -1 ; |
|||
if ( cursor.nodeType != 3 ) |
|||
{ |
|||
for (var j = 0 ; j < cursor.childNodes.length ; j++ ) |
|||
{ |
|||
var candidate = cursor.childNodes[j] ; |
|||
if ( candidate.nodeType == 3 && |
|||
candidate.previousSibling && |
|||
candidate.previousSibling.nodeType == 3 ) |
|||
continue ; |
|||
currentIndex++ ; |
|||
if ( currentIndex == target ) |
|||
{ |
|||
cursor = candidate ; |
|||
break ; |
|||
} |
|||
} |
|||
if ( currentIndex < target ) |
|||
return null ; |
|||
} |
|||
else |
|||
{ |
|||
if ( i != bookmark.length - 1 ) |
|||
return null ; |
|||
while ( target >= cursor.length && cursor.nextSibling && cursor.nextSibling.nodeType == 3 ) |
|||
{ |
|||
target -= cursor.length ; |
|||
cursor = cursor.nextSibling ; |
|||
} |
|||
cursor = cursor.nodeValue.charAt( target ) ; |
|||
if ( cursor == "" ) |
|||
cursor = null ; |
|||
} |
|||
} |
|||
return cursor ; |
|||
} |
|||
|
|||
// With this function, we can treat the bookmark as an iterator for DFS. |
|||
function NextPosition( bookmark ) |
|||
{ |
|||
// See if there's anything further down the tree. |
|||
var next = bookmark.concat( [0] ) ; |
|||
if ( GetData( next ) != null ) |
|||
return next ; |
|||
|
|||
// Nothing down there? See if there's anything next to me. |
|||
var next = bookmark.slice( 0, bookmark.length - 1 ).concat( [ bookmark[ bookmark.length - 1 ] + 1 ] ) ; |
|||
if ( GetData( next ) != null ) |
|||
return next ; |
|||
|
|||
// Nothing even next to me? See if there's anything next to my ancestors. |
|||
for ( var i = bookmark.length - 1 ; i > 0 ; i-- ) |
|||
{ |
|||
var next = bookmark.slice( 0, i - 1 ).concat( [ bookmark[ i - 1 ] + 1 ] ) ; |
|||
if ( GetData( next ) != null ) |
|||
return next ; |
|||
} |
|||
|
|||
// There's absolutely nothing left to walk, return null. |
|||
return null ; |
|||
} |
|||
|
|||
// Is this character a unicode whitespace? |
|||
// Reference: http://unicode.org/Public/UNIDATA/PropList.txt |
|||
function CheckIsWhitespace( c ) |
|||
{ |
|||
var code = c.charCodeAt( 0 ); |
|||
if ( code >= 9 && code <= 0xd ) |
|||
return true; |
|||
if ( code >= 0x2000 && code <= 0x200a ) |
|||
return true; |
|||
switch ( code ) |
|||
{ |
|||
case 0x20: |
|||
case 0x85: |
|||
case 0xa0: |
|||
case 0x1680: |
|||
case 0x180e: |
|||
case 0x2028: |
|||
case 0x2029: |
|||
case 0x202f: |
|||
case 0x205f: |
|||
case 0x3000: |
|||
return true; |
|||
default: |
|||
return false; |
|||
} |
|||
} |
|||
|
|||
// Knuth-Morris-Pratt Algorithm for stream input |
|||
KMP_NOMATCH = 0 ; |
|||
KMP_ADVANCED = 1 ; |
|||
KMP_MATCHED = 2 ; |
|||
function KmpMatch( pattern, ignoreCase ) |
|||
{ |
|||
var overlap = [ -1 ] ; |
|||
for ( var i = 0 ; i < pattern.length ; i++ ) |
|||
{ |
|||
overlap.push( overlap[i] + 1 ) ; |
|||
while ( overlap[ i + 1 ] > 0 && pattern.charAt( i ) != pattern.charAt( overlap[ i + 1 ] - 1 ) ) |
|||
overlap[ i + 1 ] = overlap[ overlap[ i + 1 ] - 1 ] + 1 ; |
|||
} |
|||
this._Overlap = overlap ; |
|||
this._State = 0 ; |
|||
this._IgnoreCase = ( ignoreCase === true ) ; |
|||
if ( ignoreCase ) |
|||
this.Pattern = pattern.toLowerCase(); |
|||
else |
|||
this.Pattern = pattern ; |
|||
} |
|||
KmpMatch.prototype = { |
|||
"FeedCharacter" : function( c ) |
|||
{ |
|||
if ( this._IgnoreCase ) |
|||
c = c.toLowerCase(); |
|||
|
|||
while ( true ) |
|||
{ |
|||
if ( c == this.Pattern.charAt( this._State ) ) |
|||
{ |
|||
this._State++ ; |
|||
if ( this._State == this.Pattern.length ) |
|||
{ |
|||
// found a match, start over, don't care about partial matches involving the current match |
|||
this._State = 0; |
|||
return KMP_MATCHED; |
|||
} |
|||
return KMP_ADVANCED ; |
|||
} |
|||
else if ( this._State == 0 ) |
|||
return KMP_NOMATCH; |
|||
else |
|||
this._State = this._Overlap[ this._State ]; |
|||
} |
|||
|
|||
return null ; |
|||
}, |
|||
"Reset" : function() |
|||
{ |
|||
this._State = 0 ; |
|||
} |
|||
}; |
|||
|
|||
function _Find() |
|||
{ |
|||
// Start from the end of the current selection. |
|||
var matcher = new KmpMatch( GetSearchString(), ! GetCheckCase() ) ; |
|||
var cursor = GlobalRange.CreateBookmark2().End ; |
|||
var matchState = KMP_NOMATCH ; |
|||
var matchBookmark = null ; |
|||
var matchBookmarkStart = [] ; |
|||
|
|||
// Match finding. |
|||
while ( true ) |
|||
{ |
|||
// Perform KMP stream matching. |
|||
// - Reset KMP matcher if we encountered a block element. |
|||
var data = GetData( cursor ) ; |
|||
if ( data ) |
|||
{ |
|||
if ( data.tagName ) |
|||
{ |
|||
if ( oEditor.FCKListsLib.BlockElements[ data.tagName.toLowerCase() ] ) |
|||
{ |
|||
matcher.Reset(); |
|||
matchBookmarkStart = [] ; |
|||
} |
|||
} |
|||
else if ( data.charAt != undefined ) |
|||
{ |
|||
matchState = matcher.FeedCharacter(data) ; |
|||
|
|||
// No possible match of any useful substring in the pattern for the currently scanned character. |
|||
// So delete any positional information. |
|||
if ( matchState == KMP_NOMATCH ) |
|||
matchBookmarkStart = [] ; |
|||
// We've matched something, but it's not a complete match, so let's just mark down the position for backtracking later. |
|||
else if ( matchState == KMP_ADVANCED ) |
|||
{ |
|||
matchBookmarkStart.push( cursor.concat( [] ) ) ; |
|||
if ( matchBookmarkStart.length > matcher._State ) |
|||
matchBookmarkStart.shift() ; |
|||
} |
|||
// Found a complete match! Mark down the ending position as well. |
|||
else if ( matchState == KMP_MATCHED ) |
|||
{ |
|||
// It is possible to get a KMP_MATCHED without KMP_ADVANCED when the match pattern is only 1 character. |
|||
// So need to check and mark down the starting position as well. |
|||
if ( matchBookmarkStart.length == 0 ) |
|||
matchBookmarkStart = [cursor.concat( [] )] ; |
|||
|
|||
matchBookmark = { 'Start' : matchBookmarkStart.shift(), 'End' : cursor.concat( [] ) } ; |
|||
matchBookmark.End[ matchBookmark.End.length - 1 ]++; |
|||
|
|||
// Wait, do we have to match a whole word? |
|||
// If yes, carry out additional checks on what we've got. |
|||
if ( GetMatchWord() ) |
|||
{ |
|||
var startOk = false ; |
|||
var endOk = false ; |
|||
var start = matchBookmark.Start ; |
|||
var end = matchBookmark.End ; |
|||
if ( start[ start.length - 1 ] == 0 ) |
|||
startOk = true ; |
|||
else |
|||
{ |
|||
var cursorBeforeStart = start.slice( 0, start.length - 1 ) ; |
|||
cursorBeforeStart.push( start[ start.length - 1 ] - 1 ) ; |
|||
var dataBeforeStart = GetData( cursorBeforeStart ) ; |
|||
if ( dataBeforeStart == null || dataBeforeStart.charAt == undefined ) |
|||
startOk = true ; |
|||
else if ( CheckIsWhitespace( dataBeforeStart ) ) |
|||
startOk = true ; |
|||
} |
|||
|
|||
// this is already one character beyond the last char, no need to move |
|||
var cursorAfterEnd = end ; |
|||
var dataAfterEnd = GetData( cursorAfterEnd ); |
|||
if ( dataAfterEnd == null || dataAfterEnd.charAt == undefined ) |
|||
endOk = true ; |
|||
else if ( CheckIsWhitespace( dataAfterEnd ) ) |
|||
endOk = true ; |
|||
|
|||
if ( startOk && endOk ) |
|||
break ; |
|||
else |
|||
matcher.Reset() ; |
|||
} |
|||
else |
|||
break ; |
|||
} |
|||
} |
|||
} |
|||
|
|||
// Perform DFS across the document, until we've reached the end. |
|||
cursor = NextPosition( cursor ) ; |
|||
if ( cursor == null ) |
|||
break; |
|||
} |
|||
|
|||
// If we've found a match, highlight the match. |
|||
if ( matchState == KMP_MATCHED ) |
|||
{ |
|||
GlobalRange.MoveToBookmark2( matchBookmark ) ; |
|||
Highlight() ; |
|||
var focus = GlobalRange._Range.endContainer ; |
|||
while ( focus && focus.nodeType != 1 ) |
|||
focus = focus.parentNode ; |
|||
|
|||
if ( focus ) |
|||
{ |
|||
if ( oEditor.FCKBrowserInfo.IsSafari ) |
|||
oEditor.FCKDomTools.ScrollIntoView( focus, false ) ; |
|||
else |
|||
focus.scrollIntoView( false ) ; |
|||
} |
|||
|
|||
return true ; |
|||
} |
|||
else |
|||
{ |
|||
ResetGlobalRange() ; |
|||
return false ; |
|||
} |
|||
} |
|||
|
|||
function Find() |
|||
{ |
|||
if ( ! _Find() ) |
|||
{ |
|||
ClearHighlight() ; |
|||
alert( FCKLang.DlgFindNotFoundMsg ) ; |
|||
} |
|||
} |
|||
|
|||
function Replace() |
|||
{ |
|||
if ( GlobalRange.CheckIsCollapsed() ) |
|||
{ |
|||
if (! _Find() ) |
|||
{ |
|||
ClearHighlight() ; |
|||
alert( FCKLang.DlgFindNotFoundMsg ) ; |
|||
} |
|||
} |
|||
else |
|||
{ |
|||
oEditor.FCKUndo.SaveUndoStep() ; |
|||
GlobalRange.DeleteContents() ; |
|||
GlobalRange.InsertNode( oEditor.FCK.EditorDocument.createTextNode( GetReplaceString() ) ) ; |
|||
GlobalRange.Collapse( false ) ; |
|||
} |
|||
} |
|||
|
|||
function ReplaceAll() |
|||
{ |
|||
oEditor.FCKUndo.SaveUndoStep() ; |
|||
var replaceCount = 0 ; |
|||
|
|||
while ( _Find() ) |
|||
{ |
|||
dialog.Selection.EnsureSelection() ; |
|||
GlobalRange.DeleteContents() ; |
|||
GlobalRange.InsertNode( oEditor.FCK.EditorDocument.createTextNode( GetReplaceString() ) ) ; |
|||
GlobalRange.Collapse( false ) ; |
|||
replaceCount++ ; |
|||
} |
|||
if ( replaceCount == 0 ) |
|||
{ |
|||
ClearHighlight() ; |
|||
alert( FCKLang.DlgFindNotFoundMsg ) ; |
|||
} |
|||
dialog.Cancel() ; |
|||
} |
|||
|
|||
window.onunload = function(){ ClearHighlight() ; } |
|||
</script> |
|||
</head> |
|||
<body onload="OnLoad()" style="overflow: hidden"> |
|||
<div id="divFind" style="display: none"> |
|||
<table cellspacing="3" cellpadding="2" width="100%" border="0"> |
|||
<tr> |
|||
<td nowrap="nowrap"> |
|||
<label for="txtFindFind" fcklang="DlgReplaceFindLbl"> |
|||
Find what:</label> |
|||
</td> |
|||
<td width="100%"> |
|||
<input id="txtFindFind" onkeyup="btnStat()" oninput="btnStat()" onpaste="btnStatDelayed()" style="width: 100%" tabindex="1" |
|||
type="text" /> |
|||
</td> |
|||
<td> |
|||
<input id="btnFind" style="width: 80px" disabled="disabled" onclick="Find();" |
|||
type="button" value="Find" fcklang="DlgFindFindBtn" /> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td valign="bottom" colspan="3"> |
|||
<input id="chkCaseFind" tabindex="3" type="checkbox" /><label for="chkCaseFind" fcklang="DlgReplaceCaseChk">Match |
|||
case</label> |
|||
<br /> |
|||
<input id="chkWordFind" tabindex="4" type="checkbox" /><label for="chkWordFind" fcklang="DlgReplaceWordChk">Match |
|||
whole word</label> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</div> |
|||
<div id="divReplace" style="display:none"> |
|||
<table cellspacing="3" cellpadding="2" width="100%" border="0"> |
|||
<tr> |
|||
<td nowrap="nowrap"> |
|||
<label for="txtFindReplace" fcklang="DlgReplaceFindLbl"> |
|||
Find what:</label> |
|||
</td> |
|||
<td width="100%"> |
|||
<input id="txtFindReplace" onkeyup="btnStat()" oninput="btnStat()" onpaste="btnStatDelayed()" style="width: 100%" tabindex="1" |
|||
type="text" /> |
|||
</td> |
|||
<td> |
|||
<input id="btnReplace" style="width: 80px" disabled="disabled" onclick="Replace();" |
|||
type="button" value="Replace" fcklang="DlgReplaceReplaceBtn" /> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td valign="top" nowrap="nowrap"> |
|||
<label for="txtReplace" fcklang="DlgReplaceReplaceLbl"> |
|||
Replace with:</label> |
|||
</td> |
|||
<td valign="top"> |
|||
<input id="txtReplace" style="width: 100%" tabindex="2" type="text" /> |
|||
</td> |
|||
<td> |
|||
<input id="btnReplaceAll" style="width: 80px" disabled="disabled" onclick="ReplaceAll()" type="button" |
|||
value="Replace All" fcklang="DlgReplaceReplAllBtn" /> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td valign="bottom" colspan="3"> |
|||
<input id="chkCaseReplace" tabindex="3" type="checkbox" /><label for="chkCaseReplace" fcklang="DlgReplaceCaseChk">Match |
|||
case</label> |
|||
<br /> |
|||
<input id="chkWordReplace" tabindex="4" type="checkbox" /><label for="chkWordReplace" fcklang="DlgReplaceWordChk">Match |
|||
whole word</label> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</div> |
|||
</body> |
|||
</html> |
|||
@ -0,0 +1,89 @@ |
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > |
|||
<html xmlns="http://www.w3.org/1999/xhtml"> |
|||
<head> |
|||
<title></title> |
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
|||
<meta name="robots" content="noindex, nofollow" /> |
|||
<style type="text/css"> |
|||
.Hand |
|||
{ |
|||
cursor: pointer; |
|||
cursor: hand; |
|||
} |
|||
</style> |
|||
<script src="common/fck_dialog_common.js" type="text/javascript"></script> |
|||
<script type="text/javascript"> |
|||
|
|||
var dialog = window.parent ; |
|||
var oEditor = dialog.InnerDialogLoaded() ; |
|||
|
|||
window.onload = function () |
|||
{ |
|||
// First of all, translate the dialog box texts |
|||
oEditor.FCKLanguageManager.TranslatePage(document) ; |
|||
|
|||
dialog.SetAutoSize( true ) ; |
|||
} |
|||
|
|||
function InsertSmiley( url ) |
|||
{ |
|||
oEditor.FCKUndo.SaveUndoStep() ; |
|||
|
|||
var oImg = oEditor.FCK.InsertElement( 'img' ) ; |
|||
oImg.src = url ; |
|||
oImg.setAttribute( '_fcksavedurl', url ) ; |
|||
|
|||
// For long smileys list, it seams that IE continues loading the images in |
|||
// the background when you quickly select one image. so, let's clear |
|||
// everything before closing. |
|||
document.body.innerHTML = '' ; |
|||
|
|||
dialog.Cancel() ; |
|||
} |
|||
|
|||
function over(td) |
|||
{ |
|||
td.className = 'LightBackground Hand' ; |
|||
} |
|||
|
|||
function out(td) |
|||
{ |
|||
td.className = 'DarkBackground Hand' ; |
|||
} |
|||
</script> |
|||
</head> |
|||
<body style="overflow: hidden"> |
|||
<table cellpadding="2" cellspacing="2" align="center" border="0" width="100%" height="100%"> |
|||
<script type="text/javascript"> |
|||
|
|||
var FCKConfig = oEditor.FCKConfig ; |
|||
|
|||
var sBasePath = FCKConfig.SmileyPath ; |
|||
var aImages = FCKConfig.SmileyImages ; |
|||
var iCols = FCKConfig.SmileyColumns ; |
|||
var iColWidth = parseInt( 100 / iCols, 10 ) ; |
|||
|
|||
var i = 0 ; |
|||
while (i < aImages.length) |
|||
{ |
|||
document.write( '<tr>' ) ; |
|||
for(var j = 0 ; j < iCols ; j++) |
|||
{ |
|||
if (aImages[i]) |
|||
{ |
|||
var sUrl = sBasePath + aImages[i] ; |
|||
document.write( '<td width="' + iColWidth + '%" align="center" class="DarkBackground Hand" onclick="InsertSmiley(\'' + sUrl.replace(/'/g, "\\'" ) + '\')" onmouseover="over(this)" onmouseout="out(this)">' ) ; |
|||
document.write( '<img src="' + sUrl + '" border="0" />' ) ; |
|||
} |
|||
else |
|||
document.write( '<td width="' + iColWidth + '%" class="DarkBackground"> ' ) ; |
|||
document.write( '<\/td>' ) ; |
|||
i++ ; |
|||
} |
|||
document.write('<\/tr>') ; |
|||
} |
|||
|
|||
</script> |
|||
</table> |
|||
</body> |
|||
</html> |
|||
@ -0,0 +1,44 @@ |
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > |
|||
<html> |
|||
<head> |
|||
<title>Source</title> |
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
|||
<meta name="robots" content="noindex, nofollow"> |
|||
<script src="common/fck_dialog_common.js" type="text/javascript"></script> |
|||
<script language="javascript"> |
|||
|
|||
var oEditor = window.parent.InnerDialogLoaded() ; |
|||
var FCK = oEditor.FCK ; |
|||
var FCKConfig = oEditor.FCKConfig ; |
|||
var FCKTools = oEditor.FCKTools ; |
|||
|
|||
document.write( FCKTools.GetStyleHtml( GetCommonDialogCss() ) ) ; |
|||
|
|||
window.onload = function() |
|||
{ |
|||
document.getElementById('txtSource').value = FCK.GetXHTML( FCKConfig.FormatSource ) ; |
|||
|
|||
// Activate the "OK" button. |
|||
window.parent.SetOkButton( true ) ; |
|||
} |
|||
|
|||
//#### The OK button was hit. |
|||
function Ok() |
|||
{ |
|||
if ( oEditor.FCKBrowserInfo.IsIE ) |
|||
oEditor.FCKUndo.SaveUndoStep() ; |
|||
|
|||
FCK.SetData( document.getElementById('txtSource').value, false ) ; |
|||
|
|||
return true ; |
|||
} |
|||
</script> |
|||
</head> |
|||
<body scroll="no" style="OVERFLOW: hidden"> |
|||
<table width="100%" height="100%"> |
|||
<tr> |
|||
<td height="100%"><textarea id="txtSource" dir="ltr" style="PADDING-RIGHT: 5px; PADDING-LEFT: 5px; FONT-SIZE: 14px; PADDING-BOTTOM: 5px; WIDTH: 100%; PADDING-TOP: 5px; FONT-FAMILY: Monospace; HEIGHT: 100%">Loading. Please wait...</textarea></td> |
|||
</tr> |
|||
</table> |
|||
</body> |
|||
</html> |
|||
@ -0,0 +1,99 @@ |
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > |
|||
<html> |
|||
<head> |
|||
<meta name="robots" content="noindex, nofollow"> |
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
|||
<style type="text/css"> |
|||
.Hand |
|||
{ |
|||
cursor: pointer ; |
|||
cursor: hand ; |
|||
} |
|||
.Sample { font-size: 24px; } |
|||
</style> |
|||
<script src="common/fck_dialog_common.js" type="text/javascript"></script> |
|||
<script type="text/javascript"> |
|||
|
|||
var oEditor = window.parent.InnerDialogLoaded() ; |
|||
|
|||
var oSample ; |
|||
|
|||
function insertChar(charValue) |
|||
{ |
|||
oEditor.FCKUndo.SaveUndoStep() ; |
|||
oEditor.FCK.InsertHtml( charValue || "" ) ; |
|||
window.parent.Cancel() ; |
|||
} |
|||
|
|||
function over(td) |
|||
{ |
|||
if ( ! oSample ) |
|||
return ; |
|||
oSample.innerHTML = td.innerHTML ; |
|||
td.className = 'LightBackground SpecialCharsOver Hand' ; |
|||
} |
|||
|
|||
function out(td) |
|||
{ |
|||
if ( ! oSample ) |
|||
return ; |
|||
oSample.innerHTML = " " ; |
|||
td.className = 'DarkBackground SpecialCharsOut Hand' ; |
|||
} |
|||
|
|||
function setDefaults() |
|||
{ |
|||
// Gets the sample placeholder. |
|||
oSample = document.getElementById("SampleTD") ; |
|||
|
|||
// First of all, translates the dialog box texts. |
|||
oEditor.FCKLanguageManager.TranslatePage(document) ; |
|||
|
|||
window.parent.SetAutoSize( true ) ; |
|||
} |
|||
|
|||
</script> |
|||
</head> |
|||
<body onload="setDefaults()" style="overflow: hidden"> |
|||
<table cellpadding="0" cellspacing="0" width="100%" height="100%"> |
|||
<tr> |
|||
<td width="100%"> |
|||
<table cellpadding="1" cellspacing="1" align="center" border="0" width="100%" height="100%"> |
|||
<script type="text/javascript"> |
|||
var aChars = ["!",""","#","$","%","&","\\'","(",")","*","+","-",".","/","0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","?","@","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","[","]","^","_","`","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","{","|","}","~","€","‘","’","’","“","”","–","—","¡","¢","£","¤","¥","¦","§","¨","©","ª","«","¬","®","¯","°","±","²","³","´","µ","¶","·","¸","¹","º","»","¼","½","¾","¿","À","Á","Â","Ã","Ä","Å","Æ","Ç","È","É","Ê","Ë","Ì","Í","Î","Ï","Ð","Ñ","Ò","Ó","Ô","Õ","Ö","×","Ø","Ù","Ú","Û","Ü","Ý","Þ","ß","à","á","â","ã","ä","å","æ","ç","è","é","ê","ë","ì","í","î","ï","ð","ñ","ò","ó","ô","õ","ö","÷","ø","ù","ú","û","ü","ü","ý","þ","ÿ","Œ","œ","Ŵ","Ŷ","ŵ","ŷ","‚","‛","„","…","™","►","•","→","⇒","⇔","♦","≈"] ; |
|||
|
|||
var cols = 20 ; |
|||
|
|||
var i = 0 ; |
|||
while (i < aChars.length) |
|||
{ |
|||
document.write("<TR>") ; |
|||
for(var j = 0 ; j < cols ; j++) |
|||
{ |
|||
if (aChars[i]) |
|||
{ |
|||
document.write('<TD width="1%" class="DarkBackground SpecialCharsOut Hand" align="center" onclick="insertChar(\'' + aChars[i].replace(/&/g, "&") + '\')" onmouseover="over(this)" onmouseout="out(this)">') ; |
|||
document.write(aChars[i]) ; |
|||
} |
|||
else |
|||
document.write("<TD class='DarkBackground SpecialCharsOut'> ") ; |
|||
document.write("<\/TD>") ; |
|||
i++ ; |
|||
} |
|||
document.write("<\/TR>") ; |
|||
} |
|||
</script> |
|||
</table> |
|||
</td> |
|||
<td nowrap> </td> |
|||
<td valign="top"> |
|||
<table width="40" cellpadding="0" cellspacing="0" border="0"> |
|||
<tr> |
|||
<td id="SampleTD" width="40" height="40" align="center" class="DarkBackground SpecialCharsOut Sample"> </td> |
|||
</tr> |
|||
</table> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</body> |
|||
</html> |
|||
@ -0,0 +1,276 @@ |
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > |
|||
<html xmlns="http://www.w3.org/1999/xhtml"> |
|||
<head> |
|||
<title>Table Properties</title> |
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
|||
<meta name="robots" content="noindex, nofollow" /> |
|||
<script src="common/fck_dialog_common.js" type="text/javascript"></script> |
|||
<script type="text/javascript"> |
|||
|
|||
var dialog = window.parent ; |
|||
var oEditor = dialog.InnerDialogLoaded() ; |
|||
var dialogArguments = dialog.Args() ; |
|||
|
|||
// Gets the document DOM |
|||
var oDOM = oEditor.FCK.EditorDocument ; |
|||
|
|||
// Gets the table if there is one selected. |
|||
var table ; |
|||
var e = dialog.Selection.GetSelectedElement() ; |
|||
|
|||
if ( ( !e && document.location.search.substr(1) == 'Parent' ) || ( e && e.tagName != 'TABLE' ) ) |
|||
e = oEditor.FCKSelection.MoveToAncestorNode( 'TABLE' ) ; |
|||
|
|||
if ( e && e.tagName == "TABLE" ) |
|||
table = e ; |
|||
|
|||
// Fired when the window loading process is finished. It sets the fields with the |
|||
// actual values if a table is selected in the editor. |
|||
window.onload = function() |
|||
{ |
|||
// First of all, translate the dialog box texts |
|||
oEditor.FCKLanguageManager.TranslatePage(document) ; |
|||
|
|||
if (table) |
|||
{ |
|||
document.getElementById('txtRows').value = table.rows.length ; |
|||
document.getElementById('txtColumns').value = table.rows[0].cells.length ; |
|||
|
|||
// Gets the value from the Width or the Style attribute |
|||
var iWidth = (table.style.width ? table.style.width : table.width ) ; |
|||
var iHeight = (table.style.height ? table.style.height : table.height ) ; |
|||
|
|||
if (iWidth.indexOf('%') >= 0) // Percentual = % |
|||
{ |
|||
iWidth = parseInt( iWidth.substr(0,iWidth.length - 1), 10 ) ; |
|||
document.getElementById('selWidthType').value = "percent" ; |
|||
} |
|||
else if (iWidth.indexOf('px') >= 0) // Style Pixel = px |
|||
{ // |
|||
iWidth = iWidth.substr(0,iWidth.length - 2); |
|||
document.getElementById('selWidthType').value = "pixels" ; |
|||
} |
|||
|
|||
if (iHeight && iHeight.indexOf('px') >= 0) // Style Pixel = px |
|||
iHeight = iHeight.substr(0,iHeight.length - 2); |
|||
|
|||
document.getElementById('txtWidth').value = iWidth || '' ; |
|||
document.getElementById('txtHeight').value = iHeight || '' ; |
|||
document.getElementById('txtBorder').value = GetAttribute( table, 'border', '' ) ; |
|||
document.getElementById('selAlignment').value = GetAttribute( table, 'align', '' ) ; |
|||
document.getElementById('txtCellPadding').value = GetAttribute( table, 'cellPadding', '' ) ; |
|||
document.getElementById('txtCellSpacing').value = GetAttribute( table, 'cellSpacing', '' ) ; |
|||
document.getElementById('txtSummary').value = GetAttribute( table, 'summary', '' ) ; |
|||
// document.getElementById('cmbFontStyle').value = table.className ; |
|||
|
|||
var eCaption = oEditor.FCKDomTools.GetFirstChild( table, 'CAPTION' ) ; |
|||
if ( eCaption ) document.getElementById('txtCaption').value = eCaption.innerHTML ; |
|||
|
|||
document.getElementById('txtRows').disabled = true ; |
|||
document.getElementById('txtColumns').disabled = true ; |
|||
SelectField( 'txtWidth' ) ; |
|||
} |
|||
else |
|||
SelectField( 'txtRows' ) ; |
|||
|
|||
dialog.SetOkButton( true ) ; |
|||
dialog.SetAutoSize( true ) ; |
|||
} |
|||
|
|||
// Fired when the user press the OK button |
|||
function Ok() |
|||
{ |
|||
var bExists = ( table != null ) ; |
|||
|
|||
if ( ! bExists ) |
|||
table = oEditor.FCK.EditorDocument.createElement( "TABLE" ) ; |
|||
|
|||
// Removes the Width and Height styles |
|||
if ( bExists && table.style.width ) table.style.width = null ; //.removeAttribute("width") ; |
|||
if ( bExists && table.style.height ) table.style.height = null ; //.removeAttribute("height") ; |
|||
|
|||
var sWidth = GetE('txtWidth').value ; |
|||
if ( sWidth.length > 0 && GetE('selWidthType').value == 'percent' ) |
|||
sWidth += '%' ; |
|||
|
|||
SetAttribute( table, 'width' , sWidth ) ; |
|||
SetAttribute( table, 'height' , GetE('txtHeight').value ) ; |
|||
SetAttribute( table, 'border' , GetE('txtBorder').value ) ; |
|||
SetAttribute( table, 'align' , GetE('selAlignment').value ) ; |
|||
SetAttribute( table, 'cellPadding' , GetE('txtCellPadding').value ) ; |
|||
SetAttribute( table, 'cellSpacing' , GetE('txtCellSpacing').value ) ; |
|||
SetAttribute( table, 'summary' , GetE('txtSummary').value ) ; |
|||
|
|||
var eCaption = oEditor.FCKDomTools.GetFirstChild( table, 'CAPTION' ) ; |
|||
|
|||
if ( document.getElementById('txtCaption').value != '') |
|||
{ |
|||
if ( !eCaption ) |
|||
{ |
|||
eCaption = oEditor.FCK.EditorDocument.createElement( 'CAPTION' ) ; |
|||
table.insertBefore( eCaption, table.firstChild ) ; |
|||
} |
|||
|
|||
eCaption.innerHTML = document.getElementById('txtCaption').value ; |
|||
} |
|||
else if ( bExists && eCaption ) |
|||
{ |
|||
// TODO: It causes an IE internal error if using removeChild or |
|||
// table.deleteCaption() (see #505). |
|||
if ( oEditor.FCKBrowserInfo.IsIE ) |
|||
eCaption.innerHTML = '' ; |
|||
else |
|||
eCaption.parentNode.removeChild( eCaption ) ; |
|||
} |
|||
|
|||
if (! bExists) |
|||
{ |
|||
var iRows = document.getElementById('txtRows').value ; |
|||
var iCols = document.getElementById('txtColumns').value ; |
|||
|
|||
for ( var r = 0 ; r < iRows ; r++ ) |
|||
{ |
|||
var oRow = table.insertRow(-1) ; |
|||
for ( var c = 0 ; c < iCols ; c++ ) |
|||
{ |
|||
var oCell = oRow.insertCell(-1) ; |
|||
if ( oEditor.FCKBrowserInfo.IsGeckoLike ) |
|||
oEditor.FCKTools.AppendBogusBr( oCell ) ; |
|||
} |
|||
} |
|||
|
|||
oEditor.FCKUndo.SaveUndoStep() ; |
|||
|
|||
oEditor.FCK.InsertElement( table ) ; |
|||
} |
|||
|
|||
return true ; |
|||
} |
|||
|
|||
</script> |
|||
</head> |
|||
<body style="overflow: hidden"> |
|||
<table id="otable" cellspacing="0" cellpadding="0" width="100%" border="0" style="height: 100%"> |
|||
<tr> |
|||
<td> |
|||
<table cellspacing="1" cellpadding="1" width="100%" border="0"> |
|||
<tr> |
|||
<td valign="top"> |
|||
<table cellspacing="0" cellpadding="0" border="0"> |
|||
<tr> |
|||
<td> |
|||
<span fcklang="DlgTableRows">Rows</span>:</td> |
|||
<td> |
|||
<input id="txtRows" type="text" maxlength="3" size="2" value="3" name="txtRows" |
|||
onkeypress="return IsDigit(event);" /></td> |
|||
</tr> |
|||
<tr> |
|||
<td> |
|||
<span fcklang="DlgTableColumns">Columns</span>:</td> |
|||
<td> |
|||
<input id="txtColumns" type="text" maxlength="2" size="2" value="2" name="txtColumns" |
|||
onkeypress="return IsDigit(event);" /></td> |
|||
</tr> |
|||
<tr> |
|||
<td> |
|||
</td> |
|||
<td> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td> |
|||
<span fcklang="DlgTableBorder">Border size</span>:</td> |
|||
<td> |
|||
<input id="txtBorder" type="text" maxlength="2" size="2" value="1" name="txtBorder" |
|||
onkeypress="return IsDigit(event);" /></td> |
|||
</tr> |
|||
<tr> |
|||
<td> |
|||
<span fcklang="DlgTableAlign">Alignment</span>:</td> |
|||
<td> |
|||
<select id="selAlignment" name="selAlignment"> |
|||
<option fcklang="DlgTableAlignNotSet" value="" selected="selected"><Not set></option> |
|||
<option fcklang="DlgTableAlignLeft" value="left">Left</option> |
|||
<option fcklang="DlgTableAlignCenter" value="center">Center</option> |
|||
<option fcklang="DlgTableAlignRight" value="right">Right</option> |
|||
</select></td> |
|||
</tr> |
|||
</table> |
|||
</td> |
|||
<td> |
|||
</td> |
|||
<td align="right" valign="top"> |
|||
<table cellspacing="0" cellpadding="0" border="0"> |
|||
<tr> |
|||
<td> |
|||
<span fcklang="DlgTableWidth">Width</span>:</td> |
|||
<td> |
|||
<input id="txtWidth" type="text" maxlength="4" size="3" value="200" name="txtWidth" |
|||
onkeypress="return IsDigit(event);" /></td> |
|||
<td> |
|||
<select id="selWidthType" name="selWidthType"> |
|||
<option fcklang="DlgTableWidthPx" value="pixels" selected="selected">pixels</option> |
|||
<option fcklang="DlgTableWidthPc" value="percent">percent</option> |
|||
</select></td> |
|||
</tr> |
|||
<tr> |
|||
<td> |
|||
<span fcklang="DlgTableHeight">Height</span>:</td> |
|||
<td> |
|||
<input id="txtHeight" type="text" maxlength="4" size="3" name="txtHeight" onkeypress="return IsDigit(event);" /></td> |
|||
<td> |
|||
<span fcklang="DlgTableWidthPx">pixels</span></td> |
|||
</tr> |
|||
<tr> |
|||
<td> |
|||
</td> |
|||
<td> |
|||
</td> |
|||
<td> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td nowrap="nowrap"> |
|||
<span fcklang="DlgTableCellSpace">Cell spacing</span>:</td> |
|||
<td> |
|||
<input id="txtCellSpacing" type="text" maxlength="2" size="2" value="1" name="txtCellSpacing" |
|||
onkeypress="return IsDigit(event);" /></td> |
|||
<td> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td nowrap="nowrap"> |
|||
<span fcklang="DlgTableCellPad">Cell padding</span>:</td> |
|||
<td> |
|||
<input id="txtCellPadding" type="text" maxlength="2" size="2" value="1" name="txtCellPadding" |
|||
onkeypress="return IsDigit(event);" /></td> |
|||
<td> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
<table cellspacing="0" cellpadding="0" width="100%" border="0"> |
|||
<tr> |
|||
<td nowrap="nowrap"> |
|||
<span fcklang="DlgTableCaption">Caption</span>: </td> |
|||
<td> |
|||
</td> |
|||
<td width="100%" nowrap="nowrap"> |
|||
<input id="txtCaption" type="text" style="width: 100%" /></td> |
|||
</tr> |
|||
<tr> |
|||
<td nowrap="nowrap"> |
|||
<span fcklang="DlgTableSummary">Summary</span>: </td> |
|||
<td> |
|||
</td> |
|||
<td width="100%" nowrap="nowrap"> |
|||
<input id="txtSummary" type="text" style="width: 100%" /></td> |
|||
</tr> |
|||
</table> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</body> |
|||
</html> |
|||
@ -0,0 +1,235 @@ |
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > |
|||
<html xmlns="http://www.w3.org/1999/xhtml"> |
|||
<head> |
|||
<title>Table Cell Properties</title> |
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
|||
<meta name="robots" content="noindex, nofollow" /> |
|||
<script src="common/fck_dialog_common.js" type="text/javascript"></script> |
|||
<script type="text/javascript"> |
|||
|
|||
var dialog = window.parent ; |
|||
var oEditor = dialog.InnerDialogLoaded() ; |
|||
|
|||
// Gets the document DOM |
|||
var oDOM = oEditor.FCK.EditorDocument ; |
|||
|
|||
// Array of selected Cells |
|||
var aCells = oEditor.FCKTableHandler.GetSelectedCells() ; |
|||
|
|||
window.onload = function() |
|||
{ |
|||
// First of all, translate the dialog box texts |
|||
oEditor.FCKLanguageManager.TranslatePage( document ) ; |
|||
|
|||
SetStartupValue() ; |
|||
|
|||
dialog.SetOkButton( true ) ; |
|||
dialog.SetAutoSize( true ) ; |
|||
SelectField( 'txtWidth' ) ; |
|||
} |
|||
|
|||
function SetStartupValue() |
|||
{ |
|||
if ( aCells.length > 0 ) |
|||
{ |
|||
var oCell = aCells[0] ; |
|||
var iWidth = GetAttribute( oCell, 'width' ) ; |
|||
|
|||
if ( iWidth.indexOf && iWidth.indexOf( '%' ) >= 0 ) |
|||
{ |
|||
iWidth = iWidth.substr( 0, iWidth.length - 1 ) ; |
|||
GetE('selWidthType').value = 'percent' ; |
|||
} |
|||
|
|||
if ( oCell.attributes['noWrap'] != null && oCell.attributes['noWrap'].specified ) |
|||
GetE('selWordWrap').value = !oCell.noWrap ; |
|||
|
|||
GetE('txtWidth').value = iWidth ; |
|||
GetE('txtHeight').value = GetAttribute( oCell, 'height' ) ; |
|||
GetE('selHAlign').value = GetAttribute( oCell, 'align' ) ; |
|||
GetE('selVAlign').value = GetAttribute( oCell, 'vAlign' ) ; |
|||
GetE('txtRowSpan').value = GetAttribute( oCell, 'rowSpan' ) ; |
|||
GetE('txtCollSpan').value = GetAttribute( oCell, 'colSpan' ) ; |
|||
GetE('txtBackColor').value = GetAttribute( oCell, 'bgColor' ) ; |
|||
GetE('txtBorderColor').value = GetAttribute( oCell, 'borderColor' ) ; |
|||
// GetE('cmbFontStyle').value = oCell.className ; |
|||
} |
|||
} |
|||
|
|||
// Fired when the user press the OK button |
|||
function Ok() |
|||
{ |
|||
for( i = 0 ; i < aCells.length ; i++ ) |
|||
{ |
|||
if ( GetE('txtWidth').value.length > 0 ) |
|||
aCells[i].width = GetE('txtWidth').value + ( GetE('selWidthType').value == 'percent' ? '%' : '') ; |
|||
else |
|||
aCells[i].removeAttribute( 'width', 0 ) ; |
|||
|
|||
if ( GetE('selWordWrap').value == 'false' ) |
|||
SetAttribute( aCells[i], 'noWrap', 'nowrap' ) ; |
|||
else |
|||
aCells[i].removeAttribute( 'noWrap' ) ; |
|||
|
|||
SetAttribute( aCells[i], 'height' , GetE('txtHeight').value ) ; |
|||
SetAttribute( aCells[i], 'align' , GetE('selHAlign').value ) ; |
|||
SetAttribute( aCells[i], 'vAlign' , GetE('selVAlign').value ) ; |
|||
SetAttribute( aCells[i], 'rowSpan' , GetE('txtRowSpan').value ) ; |
|||
SetAttribute( aCells[i], 'colSpan' , GetE('txtCollSpan').value ) ; |
|||
SetAttribute( aCells[i], 'bgColor' , GetE('txtBackColor').value ) ; |
|||
SetAttribute( aCells[i], 'borderColor' , GetE('txtBorderColor').value ) ; |
|||
// SetAttribute( aCells[i], 'className' , GetE('cmbFontStyle').value ) ; |
|||
} |
|||
|
|||
return true ; |
|||
} |
|||
|
|||
function SelectBackColor( color ) |
|||
{ |
|||
if ( color && color.length > 0 ) |
|||
GetE('txtBackColor').value = color ; |
|||
} |
|||
|
|||
function SelectBorderColor( color ) |
|||
{ |
|||
if ( color && color.length > 0 ) |
|||
GetE('txtBorderColor').value = color ; |
|||
} |
|||
|
|||
function SelectColor( wich ) |
|||
{ |
|||
oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', oEditor.FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 410, 320, wich == 'Back' ? SelectBackColor : SelectBorderColor, window ) ; |
|||
} |
|||
|
|||
</script> |
|||
</head> |
|||
<body scroll="no" style="overflow: hidden"> |
|||
<table cellspacing="0" cellpadding="0" width="100%" border="0" height="100%"> |
|||
<tr> |
|||
<td> |
|||
<table cellspacing="1" cellpadding="1" width="100%" border="0"> |
|||
<tr> |
|||
<td> |
|||
<table cellspacing="0" cellpadding="0" border="0"> |
|||
<tr> |
|||
<td nowrap="nowrap"> |
|||
<span fcklang="DlgCellWidth">Width</span>:</td> |
|||
<td> |
|||
<input onkeypress="return IsDigit(event);" id="txtWidth" type="text" maxlength="4" |
|||
size="3" name="txtWidth" /> <select id="selWidthType" name="selWidthType"> |
|||
<option fcklang="DlgCellWidthPx" value="pixels" selected="selected">pixels</option> |
|||
<option fcklang="DlgCellWidthPc" value="percent">percent</option> |
|||
</select></td> |
|||
</tr> |
|||
<tr> |
|||
<td nowrap="nowrap"> |
|||
<span fcklang="DlgCellHeight">Height</span>:</td> |
|||
<td> |
|||
<input id="txtHeight" type="text" maxlength="4" size="3" name="txtHeight" onkeypress="return IsDigit(event);" /> <span |
|||
fcklang="DlgCellWidthPx">pixels</span></td> |
|||
</tr> |
|||
<tr> |
|||
<td> |
|||
</td> |
|||
<td> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td nowrap="nowrap"> |
|||
<span fcklang="DlgCellWordWrap">Word Wrap</span>:</td> |
|||
<td> |
|||
<select id="selWordWrap" name="selAlignment"> |
|||
<option fcklang="DlgCellWordWrapYes" value="true" selected="selected">Yes</option> |
|||
<option fcklang="DlgCellWordWrapNo" value="false">No</option> |
|||
</select></td> |
|||
</tr> |
|||
<tr> |
|||
<td> |
|||
</td> |
|||
<td> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td nowrap="nowrap"> |
|||
<span fcklang="DlgCellHorAlign">Horizontal Alignment</span>:</td> |
|||
<td> |
|||
<select id="selHAlign" name="selAlignment"> |
|||
<option fcklang="DlgCellHorAlignNotSet" value="" selected><Not set></option> |
|||
<option fcklang="DlgCellHorAlignLeft" value="left">Left</option> |
|||
<option fcklang="DlgCellHorAlignCenter" value="center">Center</option> |
|||
<option fcklang="DlgCellHorAlignRight" value="right">Right</option> |
|||
</select></td> |
|||
</tr> |
|||
<tr> |
|||
<td nowrap="nowrap"> |
|||
<span fcklang="DlgCellVerAlign">Vertical Alignment</span>:</td> |
|||
<td> |
|||
<select id="selVAlign" name="selAlignment"> |
|||
<option fcklang="DlgCellVerAlignNotSet" value="" selected><Not set></option> |
|||
<option fcklang="DlgCellVerAlignTop" value="top">Top</option> |
|||
<option fcklang="DlgCellVerAlignMiddle" value="middle">Middle</option> |
|||
<option fcklang="DlgCellVerAlignBottom" value="bottom">Bottom</option> |
|||
<option fcklang="DlgCellVerAlignBaseline" value="baseline">Baseline</option> |
|||
</select></td> |
|||
</tr> |
|||
</table> |
|||
</td> |
|||
<td> |
|||
</td> |
|||
<td align="right"> |
|||
<table cellspacing="0" cellpadding="0" border="0"> |
|||
<tr> |
|||
<td nowrap="nowrap"> |
|||
<span fcklang="DlgCellRowSpan">Rows Span</span>:</td> |
|||
<td> |
|||
|
|||
<input onkeypress="return IsDigit(event);" id="txtRowSpan" type="text" maxlength="3" size="2" |
|||
name="txtRows"></td> |
|||
<td> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td nowrap="nowrap"> |
|||
<span fcklang="DlgCellCollSpan">Columns Span</span>:</td> |
|||
<td> |
|||
|
|||
<input onkeypress="return IsDigit(event);" id="txtCollSpan" type="text" maxlength="2" |
|||
size="2" name="txtColumns"></td> |
|||
<td> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td> |
|||
</td> |
|||
<td> |
|||
</td> |
|||
<td> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td nowrap="nowrap"> |
|||
<span fcklang="DlgCellBackColor">Background Color</span>:</td> |
|||
<td> |
|||
<input id="txtBackColor" type="text" size="8" name="txtCellSpacing"></td> |
|||
<td> |
|||
|
|||
<input type="button" fcklang="DlgCellBtnSelect" value="Select..." onclick="SelectColor( 'Back' )"></td> |
|||
</tr> |
|||
<tr> |
|||
<td nowrap="nowrap"> |
|||
<span fcklang="DlgCellBorderColor">Border Color</span>:</td> |
|||
<td> |
|||
<input id="txtBorderColor" type="text" size="8" name="txtCellPadding" /></td> |
|||
<td> |
|||
|
|||
<input type="button" fcklang="DlgCellBtnSelect" value="Select..." onclick="SelectColor( 'Border' )" /></td> |
|||
</tr> |
|||
</table> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</body> |
|||
</html> |
|||
@ -0,0 +1,220 @@ |
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
|||
<html xmlns="http://www.w3.org/1999/xhtml"> |
|||
<head> |
|||
<title></title> |
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
|||
<meta name="robots" content="noindex, nofollow" /> |
|||
<style type="text/css"> |
|||
.TplList |
|||
{ |
|||
border: #dcdcdc 2px solid; |
|||
background-color: #ffffff; |
|||
overflow: auto; |
|||
width: 90%; |
|||
} |
|||
|
|||
.TplItem |
|||
{ |
|||
margin: 5px; |
|||
padding: 7px; |
|||
border: #eeeeee 1px solid; |
|||
} |
|||
|
|||
.TplItem TABLE |
|||
{ |
|||
display: inline; |
|||
} |
|||
|
|||
.TplTitle |
|||
{ |
|||
font-weight: bold; |
|||
} |
|||
</style> |
|||
<script src="common/fck_dialog_common.js" type="text/javascript"></script> |
|||
<script type="text/javascript"> |
|||
|
|||
var oEditor = window.parent.InnerDialogLoaded() ; |
|||
var FCK = oEditor.FCK ; |
|||
var FCKLang = oEditor.FCKLang ; |
|||
var FCKConfig = oEditor.FCKConfig ; |
|||
|
|||
window.onload = function() |
|||
{ |
|||
// Set the right box height (browser dependent). |
|||
GetE('eList').style.height = document.all ? '100%' : '295px' ; |
|||
|
|||
// Translate the dialog box texts. |
|||
oEditor.FCKLanguageManager.TranslatePage(document) ; |
|||
|
|||
GetE('xChkReplaceAll').checked = ( FCKConfig.TemplateReplaceAll !== false ) ; |
|||
|
|||
if ( FCKConfig.TemplateReplaceCheckbox !== false ) |
|||
GetE('xReplaceBlock').style.display = '' ; |
|||
|
|||
window.parent.SetAutoSize( true ) ; |
|||
|
|||
LoadTemplatesXml() ; |
|||
} |
|||
|
|||
function LoadTemplatesXml() |
|||
{ |
|||
var oTemplate ; |
|||
|
|||
if ( !FCK._Templates ) |
|||
{ |
|||
GetE('eLoading').style.display = '' ; |
|||
|
|||
// Create the Templates array. |
|||
FCK._Templates = new Array() ; |
|||
|
|||
// Load the XML file. |
|||
var oXml = new oEditor.FCKXml() ; |
|||
oXml.LoadUrl( FCKConfig.TemplatesXmlPath ) ; |
|||
|
|||
// Get the Images Base Path. |
|||
var oAtt = oXml.SelectSingleNode( 'Templates/@imagesBasePath' ) ; |
|||
var sImagesBasePath = oAtt ? oAtt.value : '' ; |
|||
|
|||
// Get the "Template" nodes defined in the XML file. |
|||
var aTplNodes = oXml.SelectNodes( 'Templates/Template' ) ; |
|||
|
|||
for ( var i = 0 ; i < aTplNodes.length ; i++ ) |
|||
{ |
|||
var oNode = aTplNodes[i] ; |
|||
|
|||
oTemplate = new Object() ; |
|||
|
|||
var oPart ; |
|||
|
|||
// Get the Template Title. |
|||
if ( (oPart = oNode.attributes.getNamedItem('title')) ) |
|||
oTemplate.Title = oPart.value ; |
|||
else |
|||
oTemplate.Title = 'Template ' + ( i + 1 ) ; |
|||
|
|||
// Get the Template Description. |
|||
if ( (oPart = oXml.SelectSingleNode( 'Description', oNode )) ) |
|||
oTemplate.Description = oPart.text ? oPart.text : oPart.textContent ; |
|||
|
|||
// Get the Template Image. |
|||
if ( (oPart = oNode.attributes.getNamedItem('image')) ) |
|||
oTemplate.Image = sImagesBasePath + oPart.value ; |
|||
|
|||
// Get the Template HTML. |
|||
if ( (oPart = oXml.SelectSingleNode( 'Html', oNode )) ) |
|||
oTemplate.Html = oPart.text ? oPart.text : oPart.textContent ; |
|||
else |
|||
{ |
|||
alert( 'No HTML defined for template index ' + i + '. Please review the "' + FCKConfig.TemplatesXmlPath + '" file.' ) ; |
|||
continue ; |
|||
} |
|||
|
|||
FCK._Templates[ FCK._Templates.length ] = oTemplate ; |
|||
} |
|||
|
|||
GetE('eLoading').style.display = 'none' ; |
|||
} |
|||
|
|||
if ( FCK._Templates.length == 0 ) |
|||
GetE('eEmpty').style.display = '' ; |
|||
else |
|||
{ |
|||
for ( var j = 0 ; j < FCK._Templates.length ; j++ ) |
|||
{ |
|||
oTemplate = FCK._Templates[j] ; |
|||
|
|||
var oItemDiv = GetE('eList').appendChild( document.createElement( 'DIV' ) ) ; |
|||
oItemDiv.TplIndex = j ; |
|||
oItemDiv.className = 'TplItem' ; |
|||
|
|||
// Build the inner HTML of our new item DIV. |
|||
var sInner = '<table><tr>' ; |
|||
|
|||
if ( oTemplate.Image ) |
|||
sInner += '<td valign="top"><img src="' + oTemplate.Image + '"><\/td>' ; |
|||
|
|||
sInner += '<td valign="top"><div class="TplTitle">' + oTemplate.Title + '<\/div>' ; |
|||
|
|||
if ( oTemplate.Description ) |
|||
sInner += '<div>' + oTemplate.Description + '<\/div>' ; |
|||
|
|||
sInner += '<\/td><\/tr><\/table>' ; |
|||
|
|||
oItemDiv.innerHTML = sInner ; |
|||
|
|||
oItemDiv.onmouseover = ItemDiv_OnMouseOver ; |
|||
oItemDiv.onmouseout = ItemDiv_OnMouseOut ; |
|||
oItemDiv.onclick = ItemDiv_OnClick ; |
|||
} |
|||
} |
|||
} |
|||
|
|||
function ItemDiv_OnMouseOver() |
|||
{ |
|||
this.className += ' PopupSelectionBox' ; |
|||
} |
|||
|
|||
function ItemDiv_OnMouseOut() |
|||
{ |
|||
this.className = this.className.replace( /\s*PopupSelectionBox\s*/, '' ) ; |
|||
} |
|||
|
|||
function ItemDiv_OnClick() |
|||
{ |
|||
SelectTemplate( this.TplIndex ) ; |
|||
} |
|||
|
|||
function SelectTemplate( index ) |
|||
{ |
|||
oEditor.FCKUndo.SaveUndoStep() ; |
|||
|
|||
if ( GetE('xChkReplaceAll').checked ) |
|||
FCK.SetData( FCK._Templates[index].Html ) ; |
|||
else |
|||
FCK.InsertHtml( FCK._Templates[index].Html ) ; |
|||
|
|||
window.parent.Cancel( true ) ; |
|||
} |
|||
|
|||
</script> |
|||
</head> |
|||
<body style="overflow: hidden"> |
|||
<table width="100%" style="height: 100%"> |
|||
<tr> |
|||
<td align="center"> |
|||
<span fcklang="DlgTemplatesSelMsg">Please select the template to open in the editor<br /> |
|||
(the actual contents will be lost):</span> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td height="100%" align="center"> |
|||
<div id="eList" align="left" class="TplList"> |
|||
<div id="eLoading" align="center" style="display: none"> |
|||
<br /> |
|||
<span fcklang="DlgTemplatesLoading">Loading templates list. Please wait...</span> |
|||
</div> |
|||
<div id="eEmpty" align="center" style="display: none"> |
|||
<br /> |
|||
<span fcklang="DlgTemplatesNoTpl">(No templates defined)</span> |
|||
</div> |
|||
</div> |
|||
</td> |
|||
</tr> |
|||
<tr id="xReplaceBlock" style="display: none"> |
|||
<td> |
|||
<table cellpadding="0" cellspacing="0"> |
|||
<tr> |
|||
<td> |
|||
<input id="xChkReplaceAll" type="checkbox" /></td> |
|||
<td> |
|||
</td> |
|||
<td> |
|||
<label for="xChkReplaceAll" fcklang="DlgTemplatesReplace"> |
|||
Replace actual contents</label></td> |
|||
</tr> |
|||
</table> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</body> |
|||
</html> |
|||
@ -0,0 +1,41 @@ |
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|||
<html xmlns="http://www.w3.org/1999/xhtml"> |
|||
<head> |
|||
<title>DTD Test Page</title> |
|||
<script type="text/javascript"> |
|||
|
|||
// Define an object for this test page, so the assignment to FCK.DTD works |
|||
var FCK = {} ; |
|||
</script> |
|||
<script type="text/javascript" src="../_source/internals/fcktools.js"></script> |
|||
<script type="text/javascript" src="fck_xhtml10transitional.js"></script> |
|||
</head> |
|||
<body> |
|||
<h1> |
|||
DTD Contents |
|||
</h1> |
|||
<table border="1"> |
|||
<script type="text/javascript"> |
|||
|
|||
for ( var p in FCK.DTD ) |
|||
{ |
|||
document.write( '<tr><td><b>' + p + '</b></td><td>' ) ; |
|||
|
|||
var isFirst = true ; |
|||
|
|||
for ( var c in FCK.DTD[p] ) |
|||
{ |
|||
if ( !isFirst ) |
|||
document.write( ', ' ) ; |
|||
isFirst = false ; |
|||
|
|||
document.write( c ) ; |
|||
} |
|||
|
|||
|
|||
document.write( '</td></tr>' ) ; |
|||
} |
|||
</script> |
|||
</table> |
|||
</body> |
|||
</html> |
|||
@ -0,0 +1,93 @@ |
|||
FCK.DTD = (function() |
|||
{ |
|||
var X = FCKTools.Merge ; |
|||
|
|||
var H,I,J,K,C,L,M,A,B,D,E,G,N,F ; |
|||
A = {ins:1, del:1, script:1} ; |
|||
B = {hr:1, ul:1, div:1, blockquote:1, noscript:1, table:1, address:1, pre:1, p:1, h5:1, dl:1, h4:1, ol:1, h6:1, h1:1, h3:1, h2:1} ; |
|||
C = X({fieldset:1}, B) ; |
|||
D = X({sub:1, bdo:1, 'var':1, sup:1, br:1, kbd:1, map:1, samp:1, b:1, acronym:1, '#':1, abbr:1, code:1, i:1, cite:1, tt:1, strong:1, q:1, em:1, big:1, small:1, span:1, dfn:1}, A) ; |
|||
E = X({img:1, object:1}, D) ; |
|||
F = {input:1, button:1, textarea:1, select:1, label:1} ; |
|||
G = X({a:1}, F) ; |
|||
H = {img:1, noscript:1, br:1, kbd:1, button:1, h5:1, h4:1, samp:1, h6:1, ol:1, h1:1, h3:1, h2:1, form:1, select:1, '#':1, ins:1, abbr:1, label:1, code:1, table:1, script:1, cite:1, input:1, strong:1, textarea:1, big:1, small:1, span:1, hr:1, sub:1, bdo:1, 'var':1, div:1, object:1, sup:1, map:1, dl:1, del:1, fieldset:1, ul:1, b:1, acronym:1, a:1, blockquote:1, i:1, address:1, tt:1, q:1, pre:1, p:1, em:1, dfn:1} ; |
|||
|
|||
I = X({form:1, fieldset:1}, B, E, G) ; |
|||
J = {tr:1} ; |
|||
K = {'#':1} ; |
|||
L = X(E, G) ; |
|||
M = {li:1} ; |
|||
N = X({form:1}, A, C) ; |
|||
|
|||
return { |
|||
col: {}, |
|||
tr: {td:1, th:1}, |
|||
img: {}, |
|||
colgroup: {col:1}, |
|||
noscript: N, |
|||
td: I, |
|||
br: {}, |
|||
th: I, |
|||
kbd: L, |
|||
button: X(B, E), |
|||
h5: L, |
|||
h4: L, |
|||
samp: L, |
|||
h6: L, |
|||
ol: M, |
|||
h1: L, |
|||
h3: L, |
|||
option: K, |
|||
h2: L, |
|||
form: X(A, C), |
|||
select: {optgroup:1, option:1}, |
|||
ins: I, |
|||
abbr: L, |
|||
label: L, |
|||
code: L, |
|||
table: {thead:1, col:1, tbody:1, tr:1, colgroup:1, caption:1, tfoot:1}, |
|||
script: K, |
|||
tfoot: J, |
|||
cite: L, |
|||
li: I, |
|||
input: {}, |
|||
strong: L, |
|||
textarea: K, |
|||
big: L, |
|||
small: L, |
|||
span: L, |
|||
dt: L, |
|||
hr: {}, |
|||
sub: L, |
|||
optgroup: {option:1}, |
|||
bdo: L, |
|||
param: {}, |
|||
'var': L, |
|||
div: I, |
|||
object: X({param:1}, H), |
|||
sup: L, |
|||
dd: I, |
|||
area: {}, |
|||
map: X({form:1, area:1}, A, C), |
|||
dl: {dt:1, dd:1}, |
|||
del: I, |
|||
fieldset: X({legend:1}, H), |
|||
thead: J, |
|||
ul: M, |
|||
acronym: L, |
|||
b: L, |
|||
a: X({img:1, object:1}, D, F), |
|||
blockquote: N, |
|||
caption: L, |
|||
i: L, |
|||
tbody: J, |
|||
address: L, |
|||
tt: L, |
|||
legend: L, |
|||
q: L, |
|||
pre: X({a:1}, D, F), |
|||
p: L, |
|||
em: L, |
|||
dfn: L |
|||
} ; |
|||
})() ; |
|||
@ -0,0 +1,117 @@ |
|||
FCK.DTD = (function() |
|||
{ |
|||
var X = FCKTools.Merge ; |
|||
|
|||
var A,L,J,M,N,O,D,H,P,K,Q,F,G,C,B,E,I ; |
|||
A = {isindex:1, fieldset:1} ; |
|||
B = {input:1, button:1, select:1, textarea:1, label:1} ; |
|||
C = X({a:1}, B) ; |
|||
D = X({iframe:1}, C) ; |
|||
E = {hr:1, ul:1, menu:1, div:1, blockquote:1, noscript:1, table:1, center:1, address:1, dir:1, pre:1, h5:1, dl:1, h4:1, noframes:1, h6:1, ol:1, h1:1, h3:1, h2:1} ; |
|||
F = {ins:1, del:1, script:1} ; |
|||
G = X({b:1, acronym:1, bdo:1, 'var':1, '#':1, abbr:1, code:1, br:1, i:1, cite:1, kbd:1, u:1, strike:1, s:1, tt:1, strong:1, q:1, samp:1, em:1, dfn:1, span:1}, F) ; |
|||
H = X({sub:1, img:1, object:1, sup:1, basefont:1, map:1, applet:1, font:1, big:1, small:1}, G) ; |
|||
I = X({p:1}, H) ; |
|||
J = X({iframe:1}, H, B) ; |
|||
K = {img:1, noscript:1, br:1, kbd:1, center:1, button:1, basefont:1, h5:1, h4:1, samp:1, h6:1, ol:1, h1:1, h3:1, h2:1, form:1, font:1, '#':1, select:1, menu:1, ins:1, abbr:1, label:1, code:1, table:1, script:1, cite:1, input:1, iframe:1, strong:1, textarea:1, noframes:1, big:1, small:1, span:1, hr:1, sub:1, bdo:1, 'var':1, div:1, object:1, sup:1, strike:1, dir:1, map:1, dl:1, applet:1, del:1, isindex:1, fieldset:1, ul:1, b:1, acronym:1, a:1, blockquote:1, i:1, u:1, s:1, tt:1, address:1, q:1, pre:1, p:1, em:1, dfn:1} ; |
|||
|
|||
L = X({a:1}, J) ; |
|||
M = {tr:1} ; |
|||
N = {'#':1} ; |
|||
O = X({param:1}, K) ; |
|||
P = X({form:1}, A, D, E, I) ; |
|||
Q = {li:1} ; |
|||
|
|||
return { |
|||
col: {}, |
|||
tr: {td:1, th:1}, |
|||
img: {}, |
|||
colgroup: {col:1}, |
|||
noscript: P, |
|||
td: P, |
|||
br: {}, |
|||
th: P, |
|||
center: P, |
|||
kbd: L, |
|||
button: X(I, E), |
|||
basefont: {}, |
|||
h5: L, |
|||
h4: L, |
|||
samp: L, |
|||
h6: L, |
|||
ol: Q, |
|||
h1: L, |
|||
h3: L, |
|||
option: N, |
|||
h2: L, |
|||
form: X(A, D, E, I), |
|||
select: {optgroup:1, option:1}, |
|||
font: J, // Changed from L to J (see (1))
|
|||
ins: P, |
|||
menu: Q, |
|||
abbr: L, |
|||
label: L, |
|||
table: {thead:1, col:1, tbody:1, tr:1, colgroup:1, caption:1, tfoot:1}, |
|||
code: L, |
|||
script: N, |
|||
tfoot: M, |
|||
cite: L, |
|||
li: P, |
|||
input: {}, |
|||
iframe: P, |
|||
strong: J, // Changed from L to J (see (1))
|
|||
textarea: N, |
|||
noframes: P, |
|||
big: J, // Changed from L to J (see (1))
|
|||
small: J, // Changed from L to J (see (1))
|
|||
span: J, // Changed from L to J (see (1))
|
|||
hr: {}, |
|||
dt: L, |
|||
sub: J, // Changed from L to J (see (1))
|
|||
optgroup: {option:1}, |
|||
param: {}, |
|||
bdo: L, |
|||
'var': J, // Changed from L to J (see (1))
|
|||
div: P, |
|||
object: O, |
|||
sup: J, // Changed from L to J (see (1))
|
|||
dd: P, |
|||
strike: J, // Changed from L to J (see (1))
|
|||
area: {}, |
|||
dir: Q, |
|||
map: X({area:1, form:1, p:1}, A, F, E), |
|||
applet: O, |
|||
dl: {dt:1, dd:1}, |
|||
del: P, |
|||
isindex: {}, |
|||
fieldset: X({legend:1}, K), |
|||
thead: M, |
|||
ul: Q, |
|||
acronym: L, |
|||
b: J, // Changed from L to J (see (1))
|
|||
a: J, |
|||
blockquote: P, |
|||
caption: L, |
|||
i: J, // Changed from L to J (see (1))
|
|||
u: J, // Changed from L to J (see (1))
|
|||
tbody: M, |
|||
s: L, |
|||
address: X(D, I), |
|||
tt: J, // Changed from L to J (see (1))
|
|||
legend: L, |
|||
q: L, |
|||
pre: X(G, C), |
|||
p: L, |
|||
em: J, // Changed from L to J (see (1))
|
|||
dfn: L |
|||
} ; |
|||
})() ; |
|||
|
|||
/* |
|||
Notes: |
|||
(1) According to the DTD, many elements, like <b> accept <a> elements |
|||
inside of them. But, to produce better output results, we have manually |
|||
changed the map to avoid breaking the links on pieces, having |
|||
"<b>this is a </b><a><b>link</b> test</a>", instead of |
|||
"<b>this is a <a>link</a></b><a> test</a>". |
|||
*/ |
|||
@ -0,0 +1,130 @@ |
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
|||
<html xmlns="http://www.w3.org/1999/xhtml"> |
|||
<head> |
|||
<title>FCKeditor Debug Window</title> |
|||
<meta name="robots" content="noindex, nofollow" /> |
|||
<script type="text/javascript"> |
|||
|
|||
var oWindow ; |
|||
var oDiv ; |
|||
|
|||
if ( !window.FCKMessages ) |
|||
window.FCKMessages = new Array() ; |
|||
|
|||
window.onload = function() |
|||
{ |
|||
oWindow = document.getElementById('xOutput').contentWindow ; |
|||
oWindow.document.open() ; |
|||
oWindow.document.write( '<div id="divMsg"><\/div>' ) ; |
|||
oWindow.document.close() ; |
|||
oDiv = oWindow.document.getElementById('divMsg') ; |
|||
} |
|||
|
|||
function Output( message, color, noParse ) |
|||
{ |
|||
if ( !noParse && message != null && isNaN( message ) ) |
|||
message = message.replace(/</g, "<") ; |
|||
|
|||
if ( color ) |
|||
message = '<font color="' + color + '">' + message + '<\/font>' ; |
|||
|
|||
window.FCKMessages[ window.FCKMessages.length ] = message ; |
|||
StartTimer() ; |
|||
} |
|||
|
|||
function OutputObject( anyObject, color ) |
|||
{ |
|||
var message ; |
|||
|
|||
if ( anyObject != null ) |
|||
{ |
|||
message = 'Properties of: ' + anyObject + '</b><blockquote>' ; |
|||
|
|||
for (var prop in anyObject) |
|||
{ |
|||
try |
|||
{ |
|||
var sVal = anyObject[ prop ] != null ? anyObject[ prop ] + '' : '[null]' ; |
|||
message += '<b>' + prop + '</b> : ' + sVal.replace(/</g, '<') + '<br>' ; |
|||
} |
|||
catch (e) |
|||
{ |
|||
try |
|||
{ |
|||
message += '<b>' + prop + '</b> : [' + typeof( anyObject[ prop ] ) + ']<br>' ; |
|||
} |
|||
catch (e) |
|||
{ |
|||
message += '<b>' + prop + '</b> : [-error-]<br>' ; |
|||
} |
|||
} |
|||
} |
|||
|
|||
message += '</blockquote><b>' ; |
|||
} else |
|||
message = 'OutputObject : Object is "null".' ; |
|||
|
|||
Output( message, color, true ) ; |
|||
} |
|||
|
|||
function StartTimer() |
|||
{ |
|||
window.setTimeout( 'CheckMessages()', 100 ) ; |
|||
} |
|||
|
|||
function CheckMessages() |
|||
{ |
|||
if ( window.FCKMessages.length > 0 ) |
|||
{ |
|||
// Get the first item in the queue |
|||
var sMessage = window.FCKMessages[0] ; |
|||
|
|||
// Removes the first item from the queue |
|||
var oTempArray = new Array() ; |
|||
for ( i = 1 ; i < window.FCKMessages.length ; i++ ) |
|||
oTempArray[ i - 1 ] = window.FCKMessages[ i ] ; |
|||
window.FCKMessages = oTempArray ; |
|||
|
|||
var d = new Date() ; |
|||
var sTime = |
|||
( d.getHours() + 100 + '' ).substr( 1,2 ) + ':' + |
|||
( d.getMinutes() + 100 + '' ).substr( 1,2 ) + ':' + |
|||
( d.getSeconds() + 100 + '' ).substr( 1,2 ) + ':' + |
|||
( d.getMilliseconds() + 1000 + '' ).substr( 1,3 ) ; |
|||
|
|||
var oMsgDiv = oWindow.document.createElement( 'div' ) ; |
|||
oMsgDiv.innerHTML = sTime + ': <b>' + sMessage + '<\/b>' ; |
|||
oDiv.appendChild( oMsgDiv ) ; |
|||
oMsgDiv.scrollIntoView() ; |
|||
} |
|||
} |
|||
|
|||
function Clear() |
|||
{ |
|||
oDiv.innerHTML = '' ; |
|||
} |
|||
</script> |
|||
</head> |
|||
<body style="margin: 10px"> |
|||
<table style="height: 100%" cellspacing="5" cellpadding="0" width="100%" border="0"> |
|||
<tr> |
|||
<td> |
|||
<table cellspacing="0" cellpadding="0" width="100%" border="0"> |
|||
<tr> |
|||
<td style="font-weight: bold; font-size: 1.2em;"> |
|||
FCKeditor Debug Window</td> |
|||
<td align="right"> |
|||
<input type="button" value="Clear" onclick="Clear();" /></td> |
|||
</tr> |
|||
</table> |
|||
</td> |
|||
</tr> |
|||
<tr style="height: 100%"> |
|||
<td style="border: #696969 1px solid"> |
|||
<iframe id="xOutput" width="100%" height="100%" scrolling="auto" src="javascript:void(0)" |
|||
frameborder="0"></iframe> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</body> |
|||
</html> |
|||
@ -0,0 +1,399 @@ |
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|||
<html xmlns="http://www.w3.org/1999/xhtml"> |
|||
<head> |
|||
<title></title> |
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
|||
<meta name="robots" content="noindex, nofollow" /> |
|||
<script type="text/javascript"> |
|||
(function() { |
|||
var d = document.domain; |
|||
while (true) { |
|||
try { |
|||
var parentDomain = (Args().TopWindow || E).document.domain; |
|||
if (document.domain != parentDomain) document.domain = parentDomain; |
|||
break; |
|||
} catch(e) {} |
|||
d = d.replace(/.*?(?:\.|$)/, ''); |
|||
if (d.length == 0) break; |
|||
document.domain = d; |
|||
} |
|||
})(); |
|||
var E = frameElement._DialogArguments.Editor; |
|||
function Args() { return frameElement._DialogArguments; } |
|||
function ParentDialog(dialog) { return dialog ? dialog._ParentDialog : frameElement._ParentDialog; } |
|||
var FCK = E.FCK; |
|||
var FCKTools = E.FCKTools; |
|||
var FCKDomTools = E.FCKDomTools; |
|||
var FCKDialog = E.FCKDialog; |
|||
var FCKBrowserInfo = E.FCKBrowserInfo; |
|||
var FCKConfig = E.FCKConfig; |
|||
window.focus(); |
|||
document.write(FCKTools.GetStyleHtml(FCKConfig.SkinDialogCSS)); |
|||
var langDir = document.documentElement.dir = E.FCKLang.Dir; |
|||
if (FCKBrowserInfo.IsIE && !FCKBrowserInfo.IsIE7) document.write('<' + 'script type="text/javascript" src="' + FCKConfig.SkinPath + 'fck_dialog_ie6.js"><' + '\/script>'); |
|||
FCKTools.RegisterDollarFunction(window); |
|||
var Sizer = function() { |
|||
var bAutoSize = false; |
|||
var retval = { |
|||
SetAutoSize : function(autoSize) { |
|||
bAutoSize = autoSize; |
|||
this.RefreshSize(); |
|||
}, |
|||
RefreshContainerSize : function() { |
|||
var frmMain = $('frmMain'); |
|||
if (frmMain) { |
|||
var height = $('contents').offsetHeight; |
|||
height -= $('TitleArea').offsetHeight; |
|||
height -= $('TabsRow').offsetHeight; |
|||
height -= $('PopupButtons').offsetHeight; |
|||
frmMain.style.height = Math.max(height, 0) + 'px'; |
|||
} |
|||
}, |
|||
ResizeDialog : function(width, height) { |
|||
FCKDomTools.SetElementStyles(window.frameElement, { |
|||
'width' : width + 'px', |
|||
'height' : height + 'px' |
|||
}); |
|||
if (typeof window.DoResizeFixes == 'function') window.DoResizeFixes(); |
|||
}, |
|||
RefreshSize : function() { |
|||
if (bAutoSize) { |
|||
var frmMain = $('frmMain'); |
|||
var innerDoc = frmMain.contentWindow.document; |
|||
var isStrict = FCKTools.IsStrictMode(innerDoc); |
|||
var innerWidth = isStrict ? innerDoc.documentElement.scrollWidth : innerDoc.body.scrollWidth; |
|||
var innerHeight = isStrict ? innerDoc.documentElement.scrollHeight : innerDoc.body.scrollHeight; |
|||
var frameSize = FCKTools.GetViewPaneSize(frmMain.contentWindow); |
|||
var deltaWidth = innerWidth - frameSize.Width; |
|||
var deltaHeight = innerHeight - frameSize.Height; |
|||
if (deltaWidth <= 0 && deltaHeight <= 0) return; |
|||
var dialogWidth = frameElement.offsetWidth + Math.max(deltaWidth, 0); |
|||
var dialogHeight = frameElement.offsetHeight + Math.max(deltaHeight, 0); |
|||
this.ResizeDialog(dialogWidth, dialogHeight); |
|||
} |
|||
this.RefreshContainerSize(); |
|||
} |
|||
} |
|||
if (FCKBrowserInfo.IsSafari) { |
|||
var originalRefreshSize = retval.RefreshSize; |
|||
retval.RefreshSize = function() { FCKTools.SetTimeout(originalRefreshSize, 1, retval); } |
|||
} |
|||
window.onresize = function() { retval.RefreshContainerSize(); } |
|||
window.SetAutoSize = FCKTools.Bind(retval, retval.SetAutoSize); |
|||
return retval; |
|||
}(); |
|||
var Throbber = function() { |
|||
var timer; |
|||
var updateThrobber = function() { |
|||
var throbberParent = $('throbberBlock'); |
|||
var throbberBlocks = throbberParent.childNodes; |
|||
var lastClass = throbberParent.lastChild.className; |
|||
for (var i = throbberBlocks.length - 1; i > 0; i--) throbberBlocks[i].className = throbberBlocks[i-1].className; |
|||
throbberBlocks[0].className = lastClass; |
|||
} |
|||
return { |
|||
Show : function(waitMilliseconds) { |
|||
if (waitMilliseconds && waitMilliseconds > 0) { |
|||
timer = FCKTools.SetTimeout(this.Show, waitMilliseconds, this, null, window); return; |
|||
} |
|||
var throbberParent = $('throbberBlock'); |
|||
var classIds = [ 1,2,3,4,5,4,3,2 ]; |
|||
while (classIds.length > 0) throbberParent.appendChild(document.createElement('div')).className = ' throbber_' + classIds.shift(); |
|||
var frm = $('contents'); |
|||
var frmCoords = FCKTools.GetDocumentPosition(window, frm); |
|||
var x = frmCoords.x + (frm.offsetWidth - throbberParent.offsetWidth) / 2; |
|||
var y = frmCoords.y + (frm.offsetHeight - throbberParent.offsetHeight) / 2; |
|||
throbberParent.style.left = parseInt(x, 10) + 'px'; |
|||
throbberParent.style.top = parseInt(y, 10) + 'px'; |
|||
throbberParent.style.visibility = '' ; |
|||
timer = setInterval(updateThrobber, 100); |
|||
}, |
|||
Hide : function() { |
|||
if (timer) { clearInterval(timer); timer = null; } |
|||
var throbberParent = document.getElementById('throbberBlock'); |
|||
if (throbberParent) FCKDomTools.RemoveNode(throbberParent); |
|||
} |
|||
}; |
|||
}(); |
|||
var DragAndDrop = function() { |
|||
var registeredWindows = []; |
|||
var lastCoords; |
|||
var currentPos; |
|||
var cleanUpHandlers = function() { |
|||
for (var i = 0; i < registeredWindows.length; i++) { |
|||
FCKTools.RemoveEventListener(registeredWindows[i].document, 'mousemove', dragMouseMoveHandler); |
|||
FCKTools.RemoveEventListener(registeredWindows[i].document, 'mouseup', dragMouseUpHandler); |
|||
} |
|||
} |
|||
var dragMouseMoveHandler = function(evt) { |
|||
if (!lastCoords) return; |
|||
if (!evt) evt = FCKTools.GetElementDocument(this).parentWindow.event; |
|||
var currentCoords = { |
|||
x : evt.screenX, |
|||
y : evt.screenY |
|||
}; |
|||
currentPos = { |
|||
x : currentPos.x + (currentCoords.x - lastCoords.x), |
|||
y : currentPos.y + (currentCoords.y - lastCoords.y) |
|||
}; |
|||
lastCoords = currentCoords; |
|||
frameElement.style.left = currentPos.x + 'px'; |
|||
frameElement.style.top = currentPos.y + 'px'; |
|||
if (evt.preventDefault) evt.preventDefault(); else evt.returnValue = false; |
|||
} |
|||
var dragMouseUpHandler = function(evt) { |
|||
if (!lastCoords) return; |
|||
if (!evt) evt = FCKTools.GetElementDocument(this).parentWindow.event; |
|||
cleanUpHandlers(); |
|||
lastCoords = null; |
|||
} |
|||
return { |
|||
MouseDownHandler : function(evt) { |
|||
var view = null; |
|||
if (!evt) { |
|||
view = FCKTools.GetElementDocument(this).parentWindow; |
|||
evt = view.event; |
|||
} else { |
|||
view = evt.view; |
|||
} |
|||
var target = evt.srcElement || evt.target; |
|||
if (target.id == 'closeButton' || target.className == 'PopupTab' || target.className == 'PopupTabSelected') return; |
|||
lastCoords = { |
|||
x : evt.screenX, |
|||
y : evt.screenY |
|||
}; |
|||
currentPos = { |
|||
x : parseInt(FCKDomTools.GetCurrentElementStyle(frameElement, 'left'), 10), |
|||
y : parseInt(FCKDomTools.GetCurrentElementStyle(frameElement, 'top'), 10) |
|||
}; |
|||
for (var i = 0; i < registeredWindows.length; i++) { |
|||
FCKTools.AddEventListener(registeredWindows[i].document, 'mousemove', dragMouseMoveHandler); |
|||
FCKTools.AddEventListener(registeredWindows[i].document, 'mouseup', dragMouseUpHandler); |
|||
} |
|||
if (evt.preventDefault) evt.preventDefault(); else evt.returnValue = false; |
|||
}, |
|||
RegisterHandlers : function(w) { registeredWindows.push(w); } |
|||
} |
|||
}(); |
|||
var Selection = { |
|||
EnsureSelection : function() { FCK.Selection.Restore(); }, |
|||
GetSelection : function() { return FCK.Selection; }, |
|||
GetSelectedElement : function() { return FCK.Selection.GetSelectedElement(); } |
|||
} |
|||
var Tabs = function() { |
|||
var oTabs = new Object(); |
|||
var setSelectedTab = function(tabCode) { |
|||
for(var sCode in oTabs) { |
|||
if (sCode == tabCode) $(oTabs[sCode]).className = 'PopupTabSelected'; else $(oTabs[sCode]).className = 'PopupTab'; |
|||
} |
|||
if(typeof(window.frames["frmMain"].OnDialogTabChange) == 'function') window.frames["frmMain"].OnDialogTabChange(tabCode); |
|||
} |
|||
function TabDiv_OnClick() { setSelectedTab(this.TabCode); } |
|||
window.AddTab = function(tabCode, tabText, startHidden) { |
|||
if(typeof(oTabs[ tabCode ]) != 'undefined') return; |
|||
var eTabsRow = $('Tabs'); |
|||
var oCell = eTabsRow.insertCell( eTabsRow.cells.length - 1); |
|||
oCell.noWrap = true; |
|||
var oDiv = document.createElement('DIV'); |
|||
oDiv.className = 'PopupTab'; |
|||
oDiv.innerHTML = tabText; |
|||
oDiv.TabCode = tabCode; |
|||
oDiv.onclick = TabDiv_OnClick; |
|||
oDiv.id = Math.random(); |
|||
if(startHidden) oDiv.style.display = 'none'; |
|||
eTabsRow = $('TabsRow'); |
|||
oCell.appendChild(oDiv); |
|||
if(eTabsRow.style.display == 'none') { |
|||
var eTitleArea = $('TitleArea'); |
|||
eTitleArea.className = 'PopupTitle'; |
|||
oDiv.className = 'PopupTabSelected'; |
|||
eTabsRow.style.display = ''; |
|||
if (window.onresize)window.onresize(); |
|||
} |
|||
oTabs[ tabCode ] = oDiv.id; |
|||
FCKTools.DisableSelection(oDiv); |
|||
}; |
|||
window.SetSelectedTab = setSelectedTab; |
|||
window.SetTabVisibility = function(tabCode, isVisible) { |
|||
var oTab = $(oTabs[ tabCode ]); |
|||
oTab.style.display = isVisible ? '' : 'none'; |
|||
if (! isVisible && oTab.className == 'PopupTabSelected') { |
|||
for (var sCode in oTabs) { |
|||
if ($(oTabs[sCode]).style.display != 'none') { |
|||
setSelectedTab(sCode); |
|||
break; |
|||
} |
|||
} |
|||
} |
|||
}; |
|||
}(); |
|||
var onReadyRegister = function() { |
|||
if (this.readyState != 'complete') return; |
|||
DragAndDrop.RegisterHandlers(this.contentWindow); |
|||
}; |
|||
(function() { |
|||
var setOnKeyDown = function(targetDocument) { |
|||
targetDocument.onkeydown = function (e) { |
|||
e = e || event || this.parentWindow.event; |
|||
switch (e.keyCode) { |
|||
case 13 : |
|||
var oTarget = e.srcElement || e.target; |
|||
if (oTarget.tagName == 'TEXTAREA') return true; |
|||
Ok(); |
|||
return false; |
|||
case 27 : |
|||
Cancel(); |
|||
return false; |
|||
} |
|||
return true; |
|||
} |
|||
}; |
|||
var contextMenuBlocker = function(e) { |
|||
var sTagName = e.target.tagName; |
|||
if (! ((sTagName == "INPUT" && e.target.type == "text") || sTagName == "TEXTAREA")) e.preventDefault(); |
|||
}; |
|||
var disableContextMenu = function(targetDocument) { |
|||
if (FCKBrowserInfo.IsIE) return; |
|||
targetDocument.addEventListener('contextmenu', contextMenuBlocker, true); |
|||
}; |
|||
window.Init = function() { |
|||
Throbber.Show(1000); |
|||
Sizer.RefreshContainerSize(); |
|||
LoadInnerDialog(); |
|||
FCKTools.DisableSelection(document.body); |
|||
var titleElement = $('header'); |
|||
titleElement.onmousedown = DragAndDrop.MouseDownHandler; |
|||
DragAndDrop.RegisterHandlers(window); |
|||
DragAndDrop.RegisterHandlers(Args().TopWindow); |
|||
if (ParentDialog()) { |
|||
ParentDialog().contentWindow.SetEnabled(false); |
|||
if (FCKBrowserInfo.IsIE && !FCKBrowserInfo.IsIE7) { |
|||
var currentParent = ParentDialog(); |
|||
while (currentParent) { |
|||
var blockerFrame = currentParent.contentWindow.$('blocker'); |
|||
if (blockerFrame.readyState == 'complete') |
|||
DragAndDrop.RegisterHandlers(blockerFrame.contentWindow); |
|||
else |
|||
blockerFrame.onreadystatechange = onReadyRegister; |
|||
currentParent = ParentDialog(currentParent); |
|||
} |
|||
} else { |
|||
var currentParent = ParentDialog(); |
|||
while (currentParent) { |
|||
DragAndDrop.RegisterHandlers(currentParent.contentWindow); |
|||
currentParent = ParentDialog(currentParent); |
|||
} |
|||
} |
|||
} |
|||
if (FCKBrowserInfo.IsIE && !FCKBrowserInfo.IsIE7) { |
|||
var blockerFrame = FCKDialog.GetCover().firstChild; |
|||
if (blockerFrame.readyState == 'complete') DragAndDrop.RegisterHandlers(blockerFrame.contentWindow); else blockerFrame.onreadystatechange = onReadyRegister; |
|||
} |
|||
setOnKeyDown(document); |
|||
disableContextMenu(document); |
|||
}; |
|||
window.LoadInnerDialog = function() { |
|||
if (window.onresize) window.onresize(); |
|||
E.FCKLanguageManager.TranslatePage(document); |
|||
$('innerContents').innerHTML = '<iframe id="frmMain" src="' + Args().Page + '" name="frmMain" frameborder="0" width="100%" height="100%" scrolling="auto" style="visibility: hidden;" allowtransparency="true"></iframe>'; |
|||
}; |
|||
window.InnerDialogLoaded = function() { |
|||
if (!frameElement.parentNode) return null; |
|||
Throbber.Hide(); |
|||
var frmMain = $('frmMain'); |
|||
var innerWindow = frmMain.contentWindow; |
|||
var innerDoc = innerWindow.document; |
|||
frmMain.style.visibility = ''; |
|||
innerDoc.documentElement.dir = langDir; |
|||
innerDoc.write(FCKTools.GetStyleHtml(FCKConfig.SkinDialogCSS)); |
|||
setOnKeyDown(innerDoc); |
|||
disableContextMenu(innerDoc); |
|||
Sizer.RefreshContainerSize(); |
|||
DragAndDrop.RegisterHandlers(innerWindow); |
|||
innerWindow.focus(); |
|||
return E; |
|||
}; |
|||
window.SetOkButton = function(showIt) { $('btnOk').style.visibility = (showIt ? '' : 'hidden'); }; |
|||
window.Ok = function() { |
|||
Selection.EnsureSelection(); |
|||
var frmMain = window.frames["frmMain"]; |
|||
if (frmMain.Ok && frmMain.Ok()) CloseDialog(); else frmMain.focus(); |
|||
}; |
|||
window.Cancel = function(dontFireChange) { |
|||
Selection.EnsureSelection(); |
|||
return CloseDialog(dontFireChange); |
|||
}; |
|||
window.CloseDialog = function(dontFireChange) { |
|||
Throbber.Hide(); |
|||
if ($('frmMain')) $('frmMain').src = FCKTools.GetVoidUrl(); |
|||
if (!dontFireChange && !FCK.EditMode) setTimeout(function() { FCK.Events.FireEvent('OnSelectionChange'); }, 0); |
|||
FCKDialog.OnDialogClose(window); |
|||
}; |
|||
window.SetEnabled = function(isEnabled) { |
|||
var cover = $('cover'); |
|||
cover.style.display = isEnabled ? 'none' : ''; |
|||
if (FCKBrowserInfo.IsIE && !FCKBrowserInfo.IsIE7) { |
|||
if (!isEnabled) { |
|||
var blocker = document.createElement('iframe'); |
|||
blocker.src = FCKTools.GetVoidUrl(); |
|||
blocker.hideFocus = true; |
|||
blocker.frameBorder = 0; |
|||
blocker.id = blocker.className = 'blocker'; |
|||
cover.appendChild(blocker); |
|||
} else { |
|||
var blocker = $('blocker'); |
|||
if (blocker && blocker.parentNode) blocker.parentNode.removeChild(blocker); |
|||
} |
|||
} |
|||
}; |
|||
})(); |
|||
</script> |
|||
</head> |
|||
<body onload="Init();" class="PopupBody"> |
|||
<div class="contents" id="contents"> |
|||
<div id="header"> |
|||
<div id="TitleArea" class="PopupTitle PopupTitleBorder"> |
|||
<script type="text/javascript">document.write(Args().Title);</script> |
|||
<div id="closeButton" onclick="Cancel();"></div> |
|||
</div> |
|||
<div id="TabsRow" class="PopupTabArea" style="display: none"> |
|||
<table border="0" cellpadding="0" cellspacing="0" width="100%"> |
|||
<tr id="Tabs"> |
|||
<td class="PopupTabEmptyArea"> </td> |
|||
<td class="PopupTabEmptyArea" width="100%"> </td> |
|||
</tr> |
|||
</table> |
|||
</div> |
|||
</div> |
|||
<div id="innerContents"></div> |
|||
<div id="PopupButtons" class="PopupButtons"> |
|||
<table border="0" cellpadding="0" cellspacing="0"> |
|||
<tr> |
|||
<td width="100%"> </td> |
|||
<td nowrap="nowrap"> |
|||
<input id="btnOk" style="visibility: hidden;" type="button" value="Ok" class="Button" onclick="Ok();" fckLang="DlgBtnOK" /> |
|||
|
|||
<input id="btnCancel" type="button" value="Cancel" class="Button" onclick="Cancel();" fckLang="DlgBtnCancel" /> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</div> |
|||
</div> |
|||
<div class="tl"></div> |
|||
<div class="tc"></div> |
|||
<div class="tr"></div> |
|||
<div class="ml"></div> |
|||
<div class="mr"></div> |
|||
<div class="bl"></div> |
|||
<div class="bc"></div> |
|||
<div class="br"></div> |
|||
<div class="cover" id="cover" style="display:none"></div> |
|||
<div id="throbberBlock" style="position: absolute; visibility: hidden"></div> |
|||
<script type="text/javascript"> |
|||
document.body.className += ' ' + langDir; |
|||
var cover = $('cover'); |
|||
cover.style.backgroundColor = FCKConfig.BackgroundBlockerColor; |
|||
FCKDomTools.SetOpacity(cover, FCKConfig.BackgroundBlockerOpacity); |
|||
</script> |
|||
</body> |
|||
</html> |
|||
@ -0,0 +1,145 @@ |
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
|||
<html><head> |
|||
<title>FCKeditor</title> |
|||
<meta name="robots" content="noindex, nofollow"> |
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
|||
<meta http-equiv="Cache-Control" content="public"> |
|||
<script type="text/javascript"> |
|||
/* DT ADD 2009-11-07//*/ |
|||
var uaL = navigator.userAgent.toLowerCase(); |
|||
var IsIE8 = /*@cc_on!@*/false && (parseInt( uaL.match( /msie (\d+)/ )[1], 10) >= 8); |
|||
var IsIE10x = uaL.indexOf("msie 1") != -1; |
|||
var GLOBAL_POPUP_BUCKET_FCK_IE8 = []; |
|||
//if(sAgent.indexOf("msie 1") != -1) IsIE8 = false;//DT 2012/11/9 IE10+ |
|||
if(IsIE8) for(i=0; i<10; i++) { GLOBAL_POPUP_BUCKET_FCK_IE8.push(window.createPopup()); } |
|||
/* DT ADD 2009-11-07\\*/ |
|||
var FCK_ORIGINAL_DOMAIN; |
|||
(function() { |
|||
var d = FCK_ORIGINAL_DOMAIN = document.domain; |
|||
while (true) { |
|||
try |
|||
{ |
|||
var test = window.parent.document.domain ; |
|||
/* DT ADD 2011-06-22// Fix Firefox 4+*/ |
|||
if(uaL.indexOf('firefox') != -1 && parseInt(uaL.match(/firefox\/(\d+)/)[1], 10) >= 4) { |
|||
if(test != document.domain) document.domain = test; |
|||
} |
|||
/* DT ADD 2011-06-22\\*/ |
|||
break ; |
|||
} |
|||
catch( e ) {} |
|||
d = d.replace(/.*?(?:\.|$)/, ''); |
|||
if(d.length == 0) break; |
|||
try { |
|||
/* DT ADD 2009-11-07//*/ |
|||
if(IsIE8) { |
|||
for(i=0; i < GLOBAL_POPUP_BUCKET_FCK_IE8.length; i++) { |
|||
GLOBAL_POPUP_BUCKET_FCK_IE8[i].document.domain = d; |
|||
} |
|||
} |
|||
/* DT ADD 2009-11-07\\*/ |
|||
document.domain = d; |
|||
} catch (e) {break;} |
|||
} |
|||
})(); |
|||
var FCK_RUNTIME_DOMAIN = document.domain; |
|||
var FCK_IS_CUSTOM_DOMAIN = (FCK_ORIGINAL_DOMAIN != FCK_RUNTIME_DOMAIN); |
|||
function LoadScript(url) {document.write('<scr' + 'ipt type="text/javascript" src="' + url + '?v=6.0"><\/scr' + 'ipt>');} |
|||
var sSuffix = (/*@cc_on!@*/false) ? 'ie' : 'gecko'; |
|||
//LoadScript('js/fckeditorcode_' + sSuffix + '.js?x='+Math.random()); No cache |
|||
LoadScript('js/fckeditorcode_' + sSuffix + '.js'); |
|||
LoadScript('../fckconfig.js'); |
|||
</script> |
|||
<script type="text/javascript"> |
|||
if(FCKBrowserInfo.IsAIR) LoadScript('js/fckadobeair.js'); |
|||
if(FCKBrowserInfo.IsIE) { |
|||
try {document.execCommand('BackgroundImageCache', false, true);}catch (e){} |
|||
FCK.IECleanup = new FCKIECleanup(window); |
|||
FCK.IECleanup.AddItem(FCKTempBin, FCKTempBin.Reset); |
|||
FCK.IECleanup.AddItem(FCK, FCK_Cleanup); |
|||
} |
|||
FCK.Events.AttachEvent( 'OnSelectionChange', function() { FCKStyles.CheckSelectionChanges(); }); |
|||
//FCK.Events.AttachEvent( 'OnPaste', function() { alert(1); }); |
|||
FCKConfig.ProcessHiddenField(); |
|||
if (FCKConfig.CustomConfigurationsPath.length > 0) LoadScript(FCKConfig.CustomConfigurationsPath); |
|||
</script> |
|||
<script type="text/javascript"> |
|||
FCKConfig_LoadPageConfig() ; |
|||
FCKConfig_PreProcess() ; |
|||
// CSS minified by http://iceyboard.no-ip.org/projects/css_compressor |
|||
var FCK_InternalCSS = FCKTools.FixCssUrls( FCKConfig.FullBasePath + 'css/', 'html{min-height:100%}table.FCK__ShowTableBorders,table.FCK__ShowTableBorders td,table.FCK__ShowTableBorders th{border:#d3d3d3 1px solid}form{border:1px dotted #F00;padding:2px}.FCK__Flash{border:#a9a9a9 1px solid;background-position:center center;background-image:url(images/fck_flashlogo.gif);background-repeat:no-repeat;width:80px;height:80px}.FCK__Anchor{border:1px dotted #00F;background-position:center center;background-image:url(images/fck_anchor.gif);background-repeat:no-repeat;width:16px;height:15px;vertical-align:middle}.FCK__AnchorC{border:1px dotted #00F;background-position:1px center;background-image:url(images/fck_anchor.gif);background-repeat:no-repeat;padding-left:18px}a[name]{border:1px dotted #00F;background-position:0 center;background-image:url(images/fck_anchor.gif);background-repeat:no-repeat;padding-left:18px}.FCK__PageBreak{background-position:center center;background-image:url(images/fck_pagebreak.gif);background-repeat:no-repeat;clear:both;display:block;float:none;width:100%;border-top:#999 1px dotted;border-bottom:#999 1px dotted;border-right:0;border-left:0;height:5px}.FCK__InputHidden{width:19px;height:18px;background-image:url(images/fck_hiddenfield.gif);background-repeat:no-repeat;vertical-align:text-bottom;background-position:center center}.FCK__ShowBlocks p,.FCK__ShowBlocks div,.FCK__ShowBlocks pre,.FCK__ShowBlocks address,.FCK__ShowBlocks blockquote,.FCK__ShowBlocks h1,.FCK__ShowBlocks h2,.FCK__ShowBlocks h3,.FCK__ShowBlocks h4,.FCK__ShowBlocks h5,.FCK__ShowBlocks h6{background-repeat:no-repeat;border:1px dotted gray;padding-top:8px;padding-left:8px}.FCK__ShowBlocks p{background-image:url(images/block_p.png)}.FCK__ShowBlocks div{background-image:url(images/block_div.png)}.FCK__ShowBlocks pre{background-image:url(images/block_pre.png)}.FCK__ShowBlocks address{background-image:url(images/block_address.png)}.FCK__ShowBlocks blockquote{background-image:url(images/block_blockquote.png)}.FCK__ShowBlocks h1{background-image:url(images/block_h1.png)}.FCK__ShowBlocks h2{background-image:url(images/block_h2.png)}.FCK__ShowBlocks h3{background-image:url(images/block_h3.png)}.FCK__ShowBlocks h4{background-image:url(images/block_h4.png)}.FCK__ShowBlocks h5{background-image:url(images/block_h5.png)}.FCK__ShowBlocks h6{background-image:url(images/block_h6.png)}' ) ; |
|||
var FCK_ShowTableBordersCSS = FCKTools.FixCssUrls( FCKConfig.FullBasePath + 'css/', 'table:not([border]),table:not([border]) > tr > td,table:not([border]) > tr > th,table:not([border]) > tbody > tr > td,table:not([border]) > tbody > tr > th,table:not([border]) > thead > tr > td,table:not([border]) > thead > tr > th,table:not([border]) > tfoot > tr > td,table:not([border]) > tfoot > tr > th,table[border=\"0\"],table[border=\"0\"] > tr > td,table[border=\"0\"] > tr > th,table[border=\"0\"] > tbody > tr > td,table[border=\"0\"] > tbody > tr > th,table[border=\"0\"] > thead > tr > td,table[border=\"0\"] > thead > tr > th,table[border=\"0\"] > tfoot > tr > td,table[border=\"0\"] > tfoot > tr > th{border:#d3d3d3 1px dotted}' ); |
|||
if ( FCKConfig.Debug ) FCKDebug._GetWindow(); |
|||
document.write( FCKTools.GetStyleHtml( FCKConfig.SkinEditorCSS )); |
|||
FCKLanguageManager.Initialize(); |
|||
LoadScript( 'lang/' + FCKLanguageManager.ActiveLanguage.Code + '.js' ); |
|||
</script> |
|||
<script type="text/javascript"> |
|||
FCK_ContextMenu_Init(); |
|||
FCKPlugins.Load(); |
|||
</script> |
|||
<script type="text/javascript"> |
|||
window.document.dir = FCKLang.Dir ; |
|||
</script> |
|||
<script type="text/javascript"> |
|||
window.onload = function() { |
|||
InitializeAPI(); |
|||
if(FCKBrowserInfo.IsIE) { FCK_PreloadImages(); } else {LoadToolbarSetup();} |
|||
} |
|||
function LoadToolbarSetup(){FCKeditorAPI._FunctionQueue.Add(LoadToolbar);} |
|||
function LoadToolbar(){ |
|||
var oToolbarSet = FCK.ToolbarSet = FCKToolbarSet_Create(); |
|||
if(oToolbarSet.IsLoaded){StartEditor();}else{oToolbarSet.OnLoad = StartEditor;oToolbarSet.Load(FCKURLParams['Toolbar'] || 'Default');} |
|||
} |
|||
function StartEditor() { |
|||
FCK.ToolbarSet.OnLoad = null; |
|||
FCKeditorAPI._FunctionQueue.Remove(LoadToolbar); |
|||
FCK.Events.AttachEvent('OnStatusChange', WaitForActive); |
|||
FCK.StartEditor(); |
|||
} |
|||
function WaitForActive(editorInstance, newStatus) { |
|||
if(newStatus == FCK_STATUS_ACTIVE) { |
|||
if(FCKBrowserInfo.IsGecko) FCKTools.RunFunction(window.onresize); |
|||
_AttachFormSubmitToAPI(); |
|||
FCK.SetStatus(FCK_STATUS_COMPLETE); |
|||
if(typeof(window.parent.FCKeditor_OnComplete) == 'function') window.parent.FCKeditor_OnComplete(FCK); |
|||
} |
|||
} |
|||
if(FCKBrowserInfo.IsGecko && !FCKBrowserInfo.IsOpera) { |
|||
window.onresize = function(e) { |
|||
if(e && e.originalTarget !== document && e.originalTarget !== window && (!e.originalTarget.ownerDocument || e.originalTarget.ownerDocument != document)) return; |
|||
var oCell = document.getElementById('xEditingArea'); |
|||
var eInnerElement = oCell.firstChild; |
|||
if(eInnerElement) { |
|||
eInnerElement.style.height = '0px'; |
|||
eInnerElement.style.height = (oCell.scrollHeight - 2) + 'px'; |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
</head> |
|||
<body> |
|||
<table width="100%" cellpadding="0" cellspacing="0" style="height: 100%; table-layout: fixed"> |
|||
<tr id="xToolbarRow" style="display: none"> |
|||
<td id="xToolbarSpace" style="overflow: hidden"> |
|||
<table width="100%" cellpadding="0" cellspacing="0"> |
|||
<tr id="xCollapsed" style="display: none"> |
|||
<td id="xExpandHandle" class="TB_Expand" colspan="3"> |
|||
<img class="TB_ExpandImg" alt="" src="images/spacer.gif" width="8" height="4" /></td> |
|||
</tr> |
|||
<tr id="xExpanded" style="display: none"> |
|||
<td id="xTBLeftBorder" class="TB_SideBorder" style="width: 1px; display: none;"></td> |
|||
<td id="xCollapseHandle" style="display: none" class="TB_Collapse" valign="bottom"> |
|||
<img class="TB_CollapseImg" alt="" src="images/spacer.gif" width="8" height="4" /></td> |
|||
<td id="xToolbar" class="TB_ToolbarSet"></td> |
|||
<td class="TB_SideBorder" style="width: 1px"></td> |
|||
</tr> |
|||
</table> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td id="xEditingArea" valign="top" style="height: 100%"></td> |
|||
</tr> |
|||
</table> |
|||
</body> |
|||
</html> |
|||
|
After Width: 16 | Height: 15 | Size: 184 B |
|
After Width: 4 | Height: 7 | Size: 49 B |
|
After Width: 4 | Height: 7 | Size: 49 B |
|
After Width: 16 | Height: 16 | Size: 213 B |
|
After Width: 16 | Height: 16 | Size: 127 B |
|
After Width: 16 | Height: 16 | Size: 621 B |
@ -0,0 +1 @@ |
|||
<meta http-equiv="refresh" content="0;url=../"> |
|||
|
After Width: 16 | Height: 16 | Size: 212 B |
|
After Width: 16 | Height: 16 | Size: 86 B |
|
After Width: 16 | Height: 16 | Size: 1.0 KiB |
|
After Width: 16 | Height: 16 | Size: 122 B |
|
After Width: 16 | Height: 16 | Size: 446 B |
|
After Width: 16 | Height: 16 | Size: 132 B |
|
After Width: 16 | Height: 16 | Size: 604 B |
|
After Width: 19 | Height: 19 | Size: 887 B |
|
After Width: 19 | Height: 19 | Size: 2.2 KiB |
|
After Width: 19 | Height: 19 | Size: 1.5 KiB |
|
After Width: 19 | Height: 19 | Size: 1022 B |
|
After Width: 19 | Height: 19 | Size: 818 B |
|
After Width: 19 | Height: 19 | Size: 856 B |
|
After Width: 19 | Height: 19 | Size: 1.1 KiB |
|
After Width: 19 | Height: 19 | Size: 1.2 KiB |
|
After Width: 19 | Height: 19 | Size: 1.0 KiB |