mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merged revisions 50783 via svnmerge from
http://svn.silverstripe.com/open/modules/sapphire/branches/2.2.2 ........ r50783 | sminnee | 2008-03-10 16:02:12 +1300 (Mon, 10 Mar 2008) | 1 line Added 'anchor' option to link inserter ........ git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@50883 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
557abf6e60
commit
b8262b6d48
@ -203,6 +203,13 @@ class SSViewer extends Object {
|
|||||||
|
|
||||||
if(isset($_GET['debug_profile'])) Profiler::unmark("SSViewer::process", " for $template");
|
if(isset($_GET['debug_profile'])) Profiler::unmark("SSViewer::process", " for $template");
|
||||||
|
|
||||||
|
|
||||||
|
// If we have our crazy base tag, then fix # links referencing the current page.
|
||||||
|
if(strpos($output, '<base') !== false) {
|
||||||
|
$thisURLRelativeToBase = Director::makeRelative(Director::absoluteURL($_SERVER['REQUEST_URI']));
|
||||||
|
$output = preg_replace('/(<a[^>+]href *= *")#/i', '\\1' . $thisURLRelativeToBase . '#', $output);
|
||||||
|
}
|
||||||
|
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -360,6 +360,7 @@ class HtmlEditorField_Toolbar extends ViewableData {
|
|||||||
array(
|
array(
|
||||||
"internal" => _t('HtmlEditorField.LINKINTERNAL',"Page on the site"),
|
"internal" => _t('HtmlEditorField.LINKINTERNAL',"Page on the site"),
|
||||||
"external" => _t('HtmlEditorField.LINKEXTERNAL',"Another website"),
|
"external" => _t('HtmlEditorField.LINKEXTERNAL',"Another website"),
|
||||||
|
"anchor" => _t('HtmlEditorField.LINKANCHOR',"Anchor on this page"),
|
||||||
"email" => _t('HtmlEditorField.LINKEMAIL', "Email address"),
|
"email" => _t('HtmlEditorField.LINKEMAIL', "Email address"),
|
||||||
"file" => _t('HtmlEditorField.LINKFILE', "Download a file"),
|
"file" => _t('HtmlEditorField.LINKFILE', "Download a file"),
|
||||||
)
|
)
|
||||||
@ -368,6 +369,7 @@ class HtmlEditorField_Toolbar extends ViewableData {
|
|||||||
new TextField("external", _t('HtmlEditorField.URL', "URL"), 'http://'),
|
new TextField("external", _t('HtmlEditorField.URL', "URL"), 'http://'),
|
||||||
new EmailField("email", _t('HtmlEditorField.EMAIL', "Email address")),
|
new EmailField("email", _t('HtmlEditorField.EMAIL', "Email address")),
|
||||||
new TreeDropdownField("file",_t('HtmlEditorField.FILE', "File"),"File", "Filename"),
|
new TreeDropdownField("file",_t('HtmlEditorField.FILE', "File"),"File", "Filename"),
|
||||||
|
new TextField("Anchor", _t('HtmlEditorField.ANCHORVALUE', "Anchor")),
|
||||||
new TextField("Description", _t('HtmlEditorField.LINKDESCR', "Link description")),
|
new TextField("Description", _t('HtmlEditorField.LINKDESCR', "Link description")),
|
||||||
new CheckboxField("TargetBlank", _t('HtmlEditorField.LINKOPENNEWWIN', "Open link in a new window?"))
|
new CheckboxField("TargetBlank", _t('HtmlEditorField.LINKOPENNEWWIN', "Open link in a new window?"))
|
||||||
),
|
),
|
||||||
|
Loading…
Reference in New Issue
Block a user