Subversion Repositories Applications.papyrus

Rev

Rev 431 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 431 Rev 521
Line 6... Line 6...
6
 * 		http://www.opensource.org/licenses/lgpl-license.php
6
 * 		http://www.opensource.org/licenses/lgpl-license.php
7
 * 
7
 * 
8
 * For further information visit:
8
 * For further information visit:
9
 * 		http://www.fckeditor.net/
9
 * 		http://www.fckeditor.net/
10
 * 
10
 * 
-
 
11
 * "Support Open Source software. What about a donation today?"
-
 
12
 * 
11
 * File Name: fck_link.js
13
 * File Name: fck_link.js
12
 * 	Scripts related to the Link dialog window (see fck_link.html).
14
 * 	Scripts related to the Link dialog window (see fck_link.html).
13
 * 
15
 * 
14
 * File Authors:
16
 * File Authors:
15
 * 		Frederico Caldeira Knabben (fredck@fckeditor.net)
17
 * 		Frederico Caldeira Knabben (fredck@fckeditor.net)
Line 51... Line 53...
51
 
53
 
52
oRegex.UrlOnChangeProtocol = new RegExp('') ;
54
oRegex.UrlOnChangeProtocol = new RegExp('') ;
Line 53... Line 55...
53
oRegex.UrlOnChangeProtocol.compile( '^(http|https|ftp|news)://(?=.)', 'gi' ) ;
55
oRegex.UrlOnChangeProtocol.compile( '^(http|https|ftp|news)://(?=.)', 'gi' ) ;
54
 
56
 
-
 
57
oRegex.UrlOnChangeTestOther = new RegExp('') ;
Line 55... Line 58...
55
oRegex.UrlOnChangeTestOther = new RegExp('') ;
58
//oRegex.UrlOnChangeTestOther.compile( '^(javascript:|#|/)', 'gi' ) ;
56
oRegex.UrlOnChangeTestOther.compile( '^(javascript:|#|/)', 'gi' ) ;
59
oRegex.UrlOnChangeTestOther.compile( '^((javascript:)|[#/\.])', 'gi' ) ; 
Line 57... Line 60...
57
 
60
 
Line 151... Line 154...
151
 
154
 
Line 152... Line 155...
152
var bHasAnchors ;
155
var bHasAnchors ;
153
 
156
 
-
 
157
function LoadAnchorNamesAndIds()
-
 
158
{
-
 
159
	// Since version 2.0, the anchors are replaced in the DOM by IMGs so the user see the icon 
-
 
160
	// to edit them. So, we must look for that images now.
154
function LoadAnchorNamesAndIds()
161
	var aAnchors = new Array() ;
-
 
162
	
-
 
163
	var oImages = oEditor.FCK.EditorDocument.getElementsByTagName( 'IMG' ) ;
-
 
164
	for( var i = 0 ; i < oImages.length ; i++ )
-
 
165
	{
-
 
166
		if ( oImages[i].getAttribute('_fckanchor') )
-
 
167
			aAnchors[ aAnchors.length ] = oEditor.FCK.GetRealElement( oImages[i] ) ;
155
{
168
	}
Line 156... Line 169...
156
	var aAnchors	= oEditor.FCK.EditorDocument.anchors ;
169
	
Line 157... Line 170...
157
	var aIds		= oEditor.FCKTools.GetAllChildrenIds( oEditor.FCK.EditorDocument.body ) ;
170
	var aIds = oEditor.FCKTools.GetAllChildrenIds( oEditor.FCK.EditorDocument.body ) ;
158
 
171
 
Line 503... Line 516...
503
{
516
{
504
	// Set the browser window feature.
517
	// Set the browser window feature.
505
	var iWidth	= FCKConfig.LinkBrowserWindowWidth ;
518
	var iWidth	= FCKConfig.LinkBrowserWindowWidth ;
506
	var iHeight	= FCKConfig.LinkBrowserWindowHeight ;
519
	var iHeight	= FCKConfig.LinkBrowserWindowHeight ;
Line 507... Line 520...
507
 
520
 
508
	var iLeft = (screen.width  - iWidth) / 2 ;
521
	var iLeft = (FCKConfig.ScreenWidth  - iWidth) / 2 ;
Line 509... Line 522...
509
	var iTop  = (screen.height - iHeight) / 2 ;
522
	var iTop  = (FCKConfig.ScreenHeight - iHeight) / 2 ;
510
 
523
 
511
	var sOptions = "toolbar=no,status=no,resizable=yes,dependent=yes" ;
524
	var sOptions = "toolbar=no,status=no,resizable=yes,dependent=yes" ;
512
	sOptions += ",width=" + iWidth ;
525
	sOptions += ",width=" + iWidth ;
513
	sOptions += ",height=" + iHeight ;
526
	sOptions += ",height=" + iHeight ;
Line -... Line 527...
-
 
527
	sOptions += ",left=" + iLeft ;
-
 
528
	sOptions += ",top=" + iTop ;
-
 
529
 
-
 
530
	if ( oEditor.FCKBrowserInfo.IsIE )
-
 
531
	{
-
 
532
		// The following change has been made otherwise IE will open the file 
-
 
533
		// browser on a different server session (on some cases):
514
	sOptions += ",left=" + iLeft ;
534
		// http://support.microsoft.com/default.aspx?scid=kb;en-us;831678
-
 
535
		// by Simone Chiaretta.
-
 
536
		var oWindow = oEditor.window.open( FCKConfig.LinkBrowserURL, "FCKBrowseWindow", sOptions ) ;
515
	sOptions += ",top=" + iTop ;
537
		oWindow.opener = window ;
516
 
538
    }
Line 517... Line 539...
517
	// Open the browser window.
539
    else
518
	var oWindow = window.open( FCKConfig.LinkBrowserURL, "FCKBrowseWindow", sOptions ) ;
540
		window.open( FCKConfig.LinkBrowserURL, "FCKBrowseWindow", sOptions ) ;
519
}
541
}