mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR Adding step indicators to "insert link" dialog
This commit is contained in:
parent
97bff7e83d
commit
e4d65ab01b
@ -375,7 +375,10 @@ body.cms-dialog { overflow: auto; background: url("../images/textures/bg_cms_mai
|
||||
.cms-dialog-content .ss-tabset.ui-tabs .ui-tabs-panel { border: 1px solid #AAAAAA; background: url("../images/textures/bg_cms_main_content.png") repeat left top #f0f3f4; }
|
||||
.cms-dialog-content .clear { clear: both; }
|
||||
|
||||
/** Numeric labels */
|
||||
/** -------------------------------------------- "Insert X" forms -------------------------------------------- */
|
||||
.htmleditorfield-linkform .step2 { margin-bottom: 16px; }
|
||||
|
||||
/** -------------------------------------------- Step labels -------------------------------------------- */
|
||||
.step-label > * { display: inline-block; vertical-align: top; }
|
||||
.step-label .flyout { height: 18px; font-size: 14px; font-weight: bold; -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; -o-border-top-left-radius: 3px; -ms-border-top-left-radius: 3px; -khtml-border-top-left-radius: 3px; border-top-left-radius: 3px; -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; -o-border-bottom-left-radius: 3px; -ms-border-bottom-left-radius: 3px; -khtml-border-bottom-left-radius: 3px; border-bottom-left-radius: 3px; background-color: #667980; padding: 4px 3px 4px 6px; text-align: center; text-shadow: none; color: #fff; }
|
||||
.step-label .arrow { height: 26px; width: 10px; background: url('../images/sprites/32x32-s8fc6dac693.png') 0 0 no-repeat; margin-right: 4px; }
|
||||
|
@ -919,9 +919,18 @@ body.cms-dialog {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Numeric labels
|
||||
*/
|
||||
/** --------------------------------------------
|
||||
* "Insert X" forms
|
||||
* -------------------------------------------- */
|
||||
.htmleditorfield-linkform {
|
||||
.step2 {
|
||||
margin-bottom: $grid-horizontal*2;
|
||||
}
|
||||
}
|
||||
|
||||
/** --------------------------------------------
|
||||
* Step labels
|
||||
* -------------------------------------------- */
|
||||
.step-label {
|
||||
|
||||
& > * {
|
||||
|
@ -236,6 +236,7 @@ class HtmlEditorField_Toolbar extends RequestHandler {
|
||||
// mimic the SiteTree::getMenuTitle(), which is bypassed when the search is performed
|
||||
$siteTree->setSearchFunction(array($this, 'siteTreeSearchCallback'));
|
||||
|
||||
$numericLabelTmpl = '<span class="step-label"><span class="flyout">%d</span><span class="arrow"></span><strong class="title">%s</strong></span>';
|
||||
$form = new Form(
|
||||
$this->controller,
|
||||
"{$this->name}/LinkForm",
|
||||
@ -247,7 +248,7 @@ class HtmlEditorField_Toolbar extends RequestHandler {
|
||||
$contentComposite = new CompositeField(
|
||||
new OptionsetField(
|
||||
'LinkType',
|
||||
_t('HtmlEditorField.LINKTO', 'Link to'),
|
||||
sprintf($numericLabelTmpl, '1', _t('HtmlEditorField.LINKTO', 'Link to')),
|
||||
array(
|
||||
'internal' => _t('HtmlEditorField.LINKINTERNAL', 'Page on the site'),
|
||||
'external' => _t('HtmlEditorField.LINKEXTERNAL', 'Another website'),
|
||||
@ -256,6 +257,9 @@ class HtmlEditorField_Toolbar extends RequestHandler {
|
||||
'file' => _t('HtmlEditorField.LINKFILE', 'Download a file'),
|
||||
)
|
||||
),
|
||||
new LiteralField('Step2',
|
||||
'<div class="step2">' . sprintf($numericLabelTmpl, '2', _t('HtmlEditorField.DETAILS', 'Details')) . '</div>'
|
||||
),
|
||||
$siteTree,
|
||||
new TextField('external', _t('HtmlEditorField.URL', 'URL'), 'http://'),
|
||||
new EmailField('email', _t('HtmlEditorField.EMAIL', 'Email address')),
|
||||
|
Loading…
Reference in New Issue
Block a user