1
|
<!-- BEGIN main_block -->
|
2
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
3
|
<html>
|
4
|
<head>
|
5
|
<title>WB Link - Insert Website Baker Link</title>
|
6
|
<meta http-equiv="Content-Type" content="text/html; charset={CHARSET}">
|
7
|
<meta content="noindex, nofollow" name="robots">
|
8
|
<script type="text/javascript" src="fckwbmodules.js"></script>
|
9
|
<script type="text/javascript">
|
10
|
<!--
|
11
|
var oEditor = window.parent.InnerDialogLoaded();
|
12
|
var FCK = oEditor.FCK;
|
13
|
var FCKLang = oEditor.FCKLang ;
|
14
|
var FCKConfig = oEditor.FCKConfig ;
|
15
|
//var FCKCMSCCMSModules = oEditor.FCKCMSModules;
|
16
|
|
17
|
// oLink: The actual selected link in the editor.
|
18
|
var oLink = FCK.Selection.MoveToAncestorNode( 'A' ) ;
|
19
|
if ( oLink )
|
20
|
FCK.Selection.SelectNode( oLink ) ;
|
21
|
|
22
|
window.onload = function () {
|
23
|
// First of all, translates the dialog box texts.
|
24
|
oEditor.FCKLanguageManager.TranslatePage(document);
|
25
|
|
26
|
LoadSelected(); //See function below
|
27
|
window.parent.SetOkButton( true ); //Show the "Ok" button.
|
28
|
|
29
|
}
|
30
|
|
31
|
//If an anchor (A) object is currently selected, load the properties into the dialog
|
32
|
function LoadSelected() {
|
33
|
var sSelected;
|
34
|
|
35
|
if ( oEditor.FCKBrowserInfo.IsGecko || oEditor.FCKBrowserInfo.IsSafari || oEditor.FCKBrowserInfo.IsChrome ) {
|
36
|
sSelected = FCK.EditorWindow.getSelection();
|
37
|
} else {
|
38
|
sSelected = FCK.EditorDocument.selection.createRange().text;
|
39
|
}
|
40
|
|
41
|
if ( sSelected == "" ) {
|
42
|
alert( FCKLang.WBModulesErrSelection );
|
43
|
window.parent.Cancel();
|
44
|
}
|
45
|
|
46
|
}
|
47
|
|
48
|
//Code that runs after the OK button is clicked
|
49
|
function Ok() {
|
50
|
//Validate is option is selected
|
51
|
var oPageList = document.getElementById( 'cmbPages' ) ;
|
52
|
if(oPageList.selectedIndex == -1) {
|
53
|
alert( FCKLang.WBModulesErrPageSelect );
|
54
|
return false;
|
55
|
}
|
56
|
|
57
|
var oTagLink = document.getElementById( 'chkTaglink' );
|
58
|
|
59
|
var sPageId = oPageList[oPageList.selectedIndex].value;
|
60
|
oLink = oEditor.FCK.CreateLink( sPageId ) ;
|
61
|
// the following line was commented out as it creates an error message in some browser (e.g. IE)
|
62
|
// even Firefox seems not to make use of the title so we remove this option for know (doc)
|
63
|
// SetAttribute( oLink, 'title', document.getElementById( 'txtTitle' ).value ) ;
|
64
|
return true;
|
65
|
|
66
|
}
|
67
|
|
68
|
//-->
|
69
|
</script>
|
70
|
</head>
|
71
|
|
72
|
<body scroll="no" style="overflow:hidden;">
|
73
|
<table height="100%" cellSpacing="0" cellPadding="0" width="100%" border="0">
|
74
|
<tr>
|
75
|
<td>
|
76
|
<table width="100%">
|
77
|
<tr>
|
78
|
<td colspan="2"><span fckLang="WBModuleslblPageSelection">Select a WB Page to link to:</span> </td>
|
79
|
</tr>
|
80
|
<tr>
|
81
|
<td colspan="2">
|
82
|
<select id="cmbPages" style="WIDTH: 100%" size="14" name="cmbPages">
|
83
|
<!-- BEGIN page_list_block -->
|
84
|
<option value="{LINK}"{SELECTED}>{TITLE}</option>
|
85
|
<!-- END page_list_block -->
|
86
|
</select>
|
87
|
</td>
|
88
|
</tr>
|
89
|
<!-- commented out as this option will not work in all browsers (doc)
|
90
|
<tr>
|
91
|
<td nowrap><span fckLang="WBModuleslblTitle">Title</span> </td>
|
92
|
<td width="100%" style="align:right;"><input id="txtTitle" style="WIDTH: 98%" type="text" name="txtTitle"></td>
|
93
|
</tr>
|
94
|
-->
|
95
|
</table>
|
96
|
</td>
|
97
|
</tr>
|
98
|
</table>
|
99
|
|
100
|
</body>
|
101
|
</html>
|
102
|
<!-- END main_block -->
|