Index: trunk/admin/editor/cmseditor/editor/dialog/fck_link/fck_link.js
===================================================================
diff -u -r1483 -r1974
--- trunk/admin/editor/cmseditor/editor/dialog/fck_link/fck_link.js (.../fck_link.js) (revision 1483)
+++ trunk/admin/editor/cmseditor/editor/dialog/fck_link/fck_link.js (.../fck_link.js) (revision 1974)
@@ -24,6 +24,8 @@
var ServerPath = '';
var from = '';
var anchor_ = '';
+var links_path = new Array()
+
//#### Dialog Tabs
// Set the dialog tabs.
@@ -293,7 +295,6 @@
GetE('txtUrl').value = sHRef ;
}
-
if ( !oPopupMatch )
{
// Get the target.
@@ -370,27 +371,78 @@
for ( var i = 0 ; i < oNodes.length ; i++ )
{
var sCmsPage = oNodes[i].attributes.getNamedItem('path').value ;
+ var sCmsId = oNodes[i].attributes.getNamedItem('st_id').value ;
var sTitle = oNodes[i].attributes.getNamedItem('title').value ;
ServerPath = oNodes[i].attributes.getNamedItem('serverpath').value;
- GetE('cmbImternalPagName').options[i] = new Option(sTitle, sCmsPage);
+ if (LinkTypeID()) {
+ links_path[i] = sCmsPage;
+ GetE('cmbImternalPagName').options[i] = new Option(sTitle, SetIDtag(sCmsId));
+ }
+ else
+ GetE('cmbImternalPagName').options[i] = new Option(sTitle, sCmsPage);
+
if (GetE('txtUrl')) {
tmpUrl = GetE('txtUrl').value;
if (tmpUrl.length == 0 && i == 0) {
window.frames["frmInternal"].document.location.href = ServerPath + sCmsPage+GetAdmin();
}
//alert(tmpUrl+' === '+sCmsPage);
- if (tmpUrl.match(sCmsPage+'$')) {
- GetE('cmbImternalPagName').options[i].selected=1;
- window.frames["frmInternal"].document.location.href = tmpUrl+GetAdmin();
+ if (LinkTypeID())
+ {
+ if (tmpUrl == SetIDtag(sCmsId) || tmpUrl == SetIDtagAMP(sCmsId) || tmpUrl == SetIDtagNoLtQt(sCmsId)) {
+ GetE('cmbImternalPagName').options[i].selected=1;
+ //alert(ServerPath+sCmsPage+GetAdmin());
+ window.frames["frmInternal"].document.location.href = ServerPath+sCmsPage+GetAdmin();
+ }
+ } else {
+ if (tmpUrl.match(sCmsPage+'$')) {
+ GetE('cmbImternalPagName').options[i].selected=1;
+ //alert(tmpUrl+GetAdmin());
+ window.frames["frmInternal"].document.location.href = tmpUrl+GetAdmin();
+ }
}
}
}
}
-function ChangeInternalUrl(url)
+function LinkTypeID()
{
- window.frames["frmInternal"].document.location.href = ServerPath + url+GetAdmin();
- //window.frames["frmInternal"].document.location.onload = LoadAnchorNamesAndIds();
+ if (typeof(oEditor.FCKConfig.LocalLinkType) != 'undefined')
+ {
+ if (oEditor.FCKConfig.LocalLinkType == 'ID')
+ return true;
+ }
+ return false;
+}
+
+function SetIDtagNoLtQt(id)
+{
+ return "<%cms:GetBlockData id='"+id+"' field='href'%>";
+}
+
+function SetIDtag(id)
+{
+ return "<%cms:GetBlockData id='"+id+"' field='href'%>";
+}
+function SetIDtagAMP(id)
+{
+ return "<%cms:GetBlockData id='"+id+"' field='href'%>";
+
+}
+
+function ChangeInternalUrl(url,obj)
+{
+ if(LinkTypeID()) {
+ for (var i=0; i < obj.options.length; i++) {
+ if (obj.options[i].value == url) {
+ url=links_path[i];
+ window.frames["frmInternal"].document.location.href = ServerPath + url + GetAdmin();
+ return;
+ }
+ }
+ } else
+ window.frames["frmInternal"].document.location.href = ServerPath + url+GetAdmin();
+ //window.frames["frmInternal"].document.location.onload = LoadAnchorNamesAndIds();
//LoadAnchorNamesAndIds();
}
@@ -476,8 +528,12 @@
{
case 'internal' :
- sUri = ServerPath+GetE('cmbImternalPagName').value;
+ if (LinkTypeID())
+ sUri = GetE('cmbImternalPagName').value
+ else
+ sUri = ServerPath+GetE('cmbImternalPagName').value;
//sUri = GetE('cmbLinkProtocol').value + sUri ;
+ //alert(sUri);
var cmbAnchorName = GetE('cmbAnchorName').value
if (cmbAnchorName.length > 0)
sUri = sUri+'#'+cmbAnchorName
@@ -548,7 +604,7 @@
window.location.href='dialog/fck_image.html?create';
return ;
}
-
+
if ( oLink )
oLink.href = sUri ;
else
Index: trunk/admin/editor/cmseditor/editor/fckeditor.html
===================================================================
diff -u -r1696 -r1974
--- trunk/admin/editor/cmseditor/editor/fckeditor.html (.../fckeditor.html) (revision 1696)
+++ trunk/admin/editor/cmseditor/editor/fckeditor.html (.../fckeditor.html) (revision 1974)
@@ -1,28 +1,47 @@
-
FCKeditor
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -43,17 +62,12 @@
-
+
-
- You are in HTML mode. Use the [Source] button to switch back to WYSIWYG mode.
- Please note that incorrect or invalid HTML may break the web site's layout or produce undesirable results.
- This mode should be utilized only by expert users. Intechnic Corporation assumes no responsibility for problems caused by incorrect modifications of the HTML code.
-
-
+