Version 3.3.4
This commit is contained in:
1 parent
78706903a2
commit
fb6b5baabc
2206 files changed
+409828
-382984
No files matched your search
+144
-144
@@ -1,144 +1,144 @@
|
||||
/*
|
||||
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.dialog.add( 'anchor', function( editor )
|
||||
{
|
||||
// Function called in onShow to load selected element.
|
||||
var loadElements = function( element )
|
||||
{
|
||||
this._.selectedElement = element;
|
||||
|
||||
var attributeValue = element.data( 'cke-saved-name' );
|
||||
this.setValueOf( 'info','txtName', attributeValue || '' );
|
||||
};
|
||||
|
||||
function createFakeAnchor( editor, anchor )
|
||||
{
|
||||
return editor.createFakeElement( anchor, 'cke_anchor', 'anchor' );
|
||||
}
|
||||
|
||||
return {
|
||||
title : editor.lang.anchor.title,
|
||||
minWidth : 300,
|
||||
minHeight : 60,
|
||||
onOk : function()
|
||||
{
|
||||
var name = this.getValueOf( 'info', 'txtName' );
|
||||
var attributes =
|
||||
{
|
||||
name : name,
|
||||
'data-cke-saved-name' : name
|
||||
};
|
||||
|
||||
if ( this._.selectedElement )
|
||||
{
|
||||
if ( this._.selectedElement.data( 'cke-realelement' ) )
|
||||
{
|
||||
var newFake = createFakeAnchor( editor, editor.document.createElement( 'a', { attributes: attributes } ) );
|
||||
newFake.replace( this._.selectedElement );
|
||||
}
|
||||
else
|
||||
this._.selectedElement.setAttributes( attributes );
|
||||
}
|
||||
else
|
||||
{
|
||||
var sel = editor.getSelection(),
|
||||
range = sel && sel.getRanges()[ 0 ];
|
||||
|
||||
// Empty anchor
|
||||
if ( range.collapsed )
|
||||
{
|
||||
if ( CKEDITOR.plugins.link.synAnchorSelector )
|
||||
attributes[ 'class' ] = 'cke_anchor_empty';
|
||||
|
||||
if ( CKEDITOR.plugins.link.emptyAnchorFix )
|
||||
{
|
||||
attributes[ 'contenteditable' ] = 'false';
|
||||
attributes[ 'data-cke-editable' ] = 1;
|
||||
}
|
||||
|
||||
var anchor = editor.document.createElement( 'a', { attributes: attributes } );
|
||||
|
||||
// Transform the anchor into a fake element for browsers that need it.
|
||||
if ( CKEDITOR.plugins.link.fakeAnchor )
|
||||
anchor = createFakeAnchor( editor, anchor );
|
||||
|
||||
range.insertNode( anchor );
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( CKEDITOR.env.ie && CKEDITOR.env.version < 9 )
|
||||
attributes['class'] = 'cke_anchor';
|
||||
|
||||
// Apply style.
|
||||
var style = new CKEDITOR.style( { element : 'a', attributes : attributes } );
|
||||
style.type = CKEDITOR.STYLE_INLINE;
|
||||
style.apply( editor.document );
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
onHide : function()
|
||||
{
|
||||
delete this._.selectedElement;
|
||||
},
|
||||
|
||||
onShow : function()
|
||||
{
|
||||
var selection = editor.getSelection(),
|
||||
fullySelected = selection.getSelectedElement(),
|
||||
partialSelected;
|
||||
|
||||
// Detect the anchor under selection.
|
||||
if ( fullySelected )
|
||||
{
|
||||
if ( CKEDITOR.plugins.link.fakeAnchor )
|
||||
{
|
||||
var realElement = CKEDITOR.plugins.link.tryRestoreFakeAnchor( editor, fullySelected );
|
||||
realElement && loadElements.call( this, realElement );
|
||||
this._.selectedElement = fullySelected;
|
||||
}
|
||||
else if ( fullySelected.is( 'a' ) && fullySelected.hasAttribute( 'name' ) )
|
||||
loadElements.call( this, fullySelected );
|
||||
}
|
||||
else
|
||||
{
|
||||
partialSelected = CKEDITOR.plugins.link.getSelectedLink( editor );
|
||||
if ( partialSelected )
|
||||
{
|
||||
loadElements.call( this, partialSelected );
|
||||
selection.selectElement( partialSelected );
|
||||
}
|
||||
}
|
||||
|
||||
this.getContentElement( 'info', 'txtName' ).focus();
|
||||
},
|
||||
contents : [
|
||||
{
|
||||
id : 'info',
|
||||
label : editor.lang.anchor.title,
|
||||
accessKey : 'I',
|
||||
elements :
|
||||
[
|
||||
{
|
||||
type : 'text',
|
||||
id : 'txtName',
|
||||
label : editor.lang.anchor.name,
|
||||
required: true,
|
||||
validate : function()
|
||||
{
|
||||
if ( !this.getValue() )
|
||||
{
|
||||
alert( editor.lang.anchor.errorName );
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
} );
|
||||
/*
|
||||
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.dialog.add( 'anchor', function( editor )
|
||||
{
|
||||
// Function called in onShow to load selected element.
|
||||
var loadElements = function( element )
|
||||
{
|
||||
this._.selectedElement = element;
|
||||
|
||||
var attributeValue = element.data( 'cke-saved-name' );
|
||||
this.setValueOf( 'info','txtName', attributeValue || '' );
|
||||
};
|
||||
|
||||
function createFakeAnchor( editor, anchor )
|
||||
{
|
||||
return editor.createFakeElement( anchor, 'cke_anchor', 'anchor' );
|
||||
}
|
||||
|
||||
return {
|
||||
title : editor.lang.anchor.title,
|
||||
minWidth : 300,
|
||||
minHeight : 60,
|
||||
onOk : function()
|
||||
{
|
||||
var name = this.getValueOf( 'info', 'txtName' );
|
||||
var attributes =
|
||||
{
|
||||
name : name,
|
||||
'data-cke-saved-name' : name
|
||||
};
|
||||
|
||||
if ( this._.selectedElement )
|
||||
{
|
||||
if ( this._.selectedElement.data( 'cke-realelement' ) )
|
||||
{
|
||||
var newFake = createFakeAnchor( editor, editor.document.createElement( 'a', { attributes: attributes } ) );
|
||||
newFake.replace( this._.selectedElement );
|
||||
}
|
||||
else
|
||||
this._.selectedElement.setAttributes( attributes );
|
||||
}
|
||||
else
|
||||
{
|
||||
var sel = editor.getSelection(),
|
||||
range = sel && sel.getRanges()[ 0 ];
|
||||
|
||||
// Empty anchor
|
||||
if ( range.collapsed )
|
||||
{
|
||||
if ( CKEDITOR.plugins.link.synAnchorSelector )
|
||||
attributes[ 'class' ] = 'cke_anchor_empty';
|
||||
|
||||
if ( CKEDITOR.plugins.link.emptyAnchorFix )
|
||||
{
|
||||
attributes[ 'contenteditable' ] = 'false';
|
||||
attributes[ 'data-cke-editable' ] = 1;
|
||||
}
|
||||
|
||||
var anchor = editor.document.createElement( 'a', { attributes: attributes } );
|
||||
|
||||
// Transform the anchor into a fake element for browsers that need it.
|
||||
if ( CKEDITOR.plugins.link.fakeAnchor )
|
||||
anchor = createFakeAnchor( editor, anchor );
|
||||
|
||||
range.insertNode( anchor );
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( CKEDITOR.env.ie && CKEDITOR.env.version < 9 )
|
||||
attributes['class'] = 'cke_anchor';
|
||||
|
||||
// Apply style.
|
||||
var style = new CKEDITOR.style( { element : 'a', attributes : attributes } );
|
||||
style.type = CKEDITOR.STYLE_INLINE;
|
||||
style.apply( editor.document );
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
onHide : function()
|
||||
{
|
||||
delete this._.selectedElement;
|
||||
},
|
||||
|
||||
onShow : function()
|
||||
{
|
||||
var selection = editor.getSelection(),
|
||||
fullySelected = selection.getSelectedElement(),
|
||||
partialSelected;
|
||||
|
||||
// Detect the anchor under selection.
|
||||
if ( fullySelected )
|
||||
{
|
||||
if ( CKEDITOR.plugins.link.fakeAnchor )
|
||||
{
|
||||
var realElement = CKEDITOR.plugins.link.tryRestoreFakeAnchor( editor, fullySelected );
|
||||
realElement && loadElements.call( this, realElement );
|
||||
this._.selectedElement = fullySelected;
|
||||
}
|
||||
else if ( fullySelected.is( 'a' ) && fullySelected.hasAttribute( 'name' ) )
|
||||
loadElements.call( this, fullySelected );
|
||||
}
|
||||
else
|
||||
{
|
||||
partialSelected = CKEDITOR.plugins.link.getSelectedLink( editor );
|
||||
if ( partialSelected )
|
||||
{
|
||||
loadElements.call( this, partialSelected );
|
||||
selection.selectElement( partialSelected );
|
||||
}
|
||||
}
|
||||
|
||||
this.getContentElement( 'info', 'txtName' ).focus();
|
||||
},
|
||||
contents : [
|
||||
{
|
||||
id : 'info',
|
||||
label : editor.lang.anchor.title,
|
||||
accessKey : 'I',
|
||||
elements :
|
||||
[
|
||||
{
|
||||
type : 'text',
|
||||
id : 'txtName',
|
||||
label : editor.lang.anchor.name,
|
||||
required: true,
|
||||
validate : function()
|
||||
{
|
||||
if ( !this.getValue() )
|
||||
{
|
||||
alert( editor.lang.anchor.errorName );
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
} );
|
||||
@@ -1,10 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
+1425
-1425
File diff suppressed because it is too large.
Load diff
@@ -1,10 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,10 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user