Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
services
t3o sites
extensions.typo3.org
extensions.typo3.org
Commits
dc4b9bd7
Commit
dc4b9bd7
authored
Sep 14, 2018
by
Thomas Löffler
Browse files
Add composer package name into detail view
* Show composer how to install * Click to copy to clipboard
parent
2d745a49
Pipeline
#5238
passed with stages
in 7 minutes and 27 seconds
Changes
4
Pipelines
1
Show whitespace changes
Inline
Side-by-side
html/typo3conf/ext/ter_fe2/Resources/Private/Partials/ComposerNameWithClipboard.html
0 → 100644
View file @
dc4b9bd7
<html
xmlns:f=
"http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
data-namespace-typo3-fluid=
"true"
>
<kbd
style=
"cursor: pointer;"
onclick=
"copyToClipboard(this);"
class=
"small"
>
composer req {composerName}
</kbd>
</html>
html/typo3conf/ext/ter_fe2/Resources/Private/Partials/InstallationHowTo.html
View file @
dc4b9bd7
...
...
@@ -33,7 +33,7 @@
</div>
</div>
</div>
<f:if
condition=
"{extension.composer
Package
Name}"
>
<f:if
condition=
"{extension.composerName}"
>
<div
class=
"card bgWhite"
>
<div
class=
"card-header"
role=
"tab"
id=
"headingTwo"
>
<h5
class=
"mb-0"
>
...
...
@@ -49,7 +49,7 @@
Go to your folder where the root composer.json file is located
</li>
<li>
Type:
<
code>
composer require {extension.composerPackageName}
</code
>
to get the latest version that runs on
Type:
<
f:render
partial=
"ComposerNameWithClipboard"
arguments=
"{composerName: extension.composerName}"
/
>
to get the latest version that runs on
your TYPO3 version.
</li>
</ol>
...
...
html/typo3conf/ext/ter_fe2/Resources/Private/Templates/Extension/Show.html
View file @
dc4b9bd7
...
...
@@ -94,6 +94,12 @@
<h3>
<f:render
partial=
"VersionSupportForTypo3"
arguments=
"{version: extension.lastVersion}"
/>
</h3>
<f:if
condition=
"{extension.composerName}"
>
<p
class=
"mb-3"
>
<h3>
Composer support
</h3>
<f:render
partial=
"ComposerNameWithClipboard"
arguments=
"{composerName: extension.composerName}"
/>
</p>
</f:if>
<f:if
condition=
"{extension.tags}"
>
<h3>
Tags
</h3>
<p
class=
"tags"
>
...
...
html/typo3conf/ext/ter_fe2/Resources/Public/Javascript/Default.js
View file @
dc4b9bd7
...
...
@@ -55,3 +55,66 @@ jQuery(document).ready(function ($) {
});
function
copyToClipboard
(
el
)
{
const
text
=
$
(
el
).
text
();
if
(
text
)
{
let
aux
=
document
.
createElement
(
"
input
"
);
aux
.
setAttribute
(
"
value
"
,
text
);
document
.
body
.
appendChild
(
aux
);
aux
.
select
();
document
.
execCommand
(
"
copy
"
);
document
.
body
.
removeChild
(
aux
);
$
.
notify
({
// options
icon
:
"
success
"
,
title
:
"
Copied to clipboard
"
,
message
:
"
Composer require command is in your clipboard now
"
},
{
// settings
element
:
"
body
"
,
position
:
"
fixed
"
,
type
:
"
success
"
,
allow_dismiss
:
true
,
newest_on_top
:
false
,
showProgressbar
:
false
,
placement
:
{
from
:
"
top
"
,
align
:
"
center
"
},
offset
:
20
,
spacing
:
10
,
z_index
:
9000
,
delay
:
5000
,
timer
:
1000
,
width
:
'
50%
'
,
url_target
:
"
_blank
"
,
mouse_over
:
null
,
animate
:
{
enter
:
"
animated fadeInDown
"
,
exit
:
"
animated fadeOutUp
"
},
onShow
:
null
,
onShown
:
null
,
onClose
:
null
,
onClosed
:
null
,
icon_type
:
"
class
"
,
template
:
[
'
<div class="col-sm-9" data-notify="container">
'
,
'
<div class="alert alert-{0}" role="alert">
'
,
'
<button type="button" aria-hidden="true" class="close" data-notify="dismiss">×</button>
'
,
'
<strong class="alert-heading" data-notify="title"><i class="fa fa-clipboard"></i> {1}</strong>
'
,
'
<span class="mb-0" data-notify="message">{2}</span>
'
,
'
<div class="progress" data-notify="progressbar">
'
,
'
<div class="progress-bar progress-bar-{0}" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;"></div>
'
,
'
</div>
'
,
'
<a href="{3}" target="{4}" data-notify="url"></a>
'
,
'
</div>
'
,
'
</div>
'
].
join
(
''
)
});
}
return
false
;
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment