-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
357 additions
and
202 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?php | ||
|
||
return [ | ||
'success' => 'Copied', | ||
'error' => 'Press Ctrl+C to copy', | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?php | ||
|
||
return [ | ||
'success' => 'Copié', | ||
'error' => 'Appuyez sur Ctrl+C pour copier', | ||
]; |
58 changes: 58 additions & 0 deletions
58
resources/views/bootstrap-4/components/buttons/actions/copy.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<button | ||
{{ $attributes->class([ | ||
'btn btn-'.$variant.($size !== null ? ' btn-'.$size : ''), | ||
'btn-clipboard' => !$disabled, | ||
]) }} | ||
type="{{ $type }}" | ||
@if ($formId !== null) | ||
form="{!! $formId !!}" | ||
@endif | ||
@disabled($disabled) | ||
@if ($target !== null) | ||
data-clipboard-target="{{ $target }}" | ||
@elseif ($string !== null) | ||
data-clipboard-text="{{ $string }}" | ||
@endif | ||
@include('blade-ui-kit-bootstrap::bootstrap-4.components.buttons.partials.attributes') | ||
> | ||
@include('blade-ui-kit-bootstrap::bootstrap-4.components.buttons.partials.content') | ||
</button> | ||
|
||
@push('blade-ui-kit-bs-scripts') | ||
@once | ||
<script> | ||
window.ClipboardJS.on('success', function(e) { | ||
let triggerButton = e.trigger; | ||
let dataBsOriginalTitle = triggerButton.getAttribute("data-original-title"); | ||
triggerButton.setAttribute("data-original-title", "{{ trans('blade-ui-kit-bootstrap::clipboard.success') }}"); | ||
let bsTooltip = $(triggerButton).tooltip(); | ||
bsTooltip.tooltip('show'); | ||
if (dataBsOriginalTitle !== null) { | ||
triggerButton.setAttribute("data-original-title", dataBsOriginalTitle); | ||
} | ||
e.clearSelection(); | ||
}); | ||
window.ClipboardJS.on('error', function(e) { | ||
let triggerButton = e.trigger; | ||
let dataBsOriginalTitle = triggerButton.getAttribute("data-original-title"); | ||
triggerButton.setAttribute("data-original-title", "{{ trans('blade-ui-kit-bootstrap::clipboard.error') }}"); | ||
let bsTooltip = $(triggerButton).tooltip(); | ||
bsTooltip.tooltip('show'); | ||
if (dataBsOriginalTitle !== null) { | ||
triggerButton.setAttribute("data-original-title", dataBsOriginalTitle); | ||
} | ||
e.clearSelection(); | ||
}); | ||
</script> | ||
@endonce | ||
@endpush |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
resources/views/bootstrap-4/components/buttons/partials/attributes.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
@if ($title !== null) | ||
data-toggle="tooltip" | ||
title="{!! $title !!}" | ||
@endif | ||
@if ($confirm !== null) | ||
data-buk-confirm="{!! $confirm !!}" | ||
data-buk-confirm-modal="confirm-modal-{!! $confirmId !!}" | ||
<x-modal-confirm :id="'confirm-modal-'.$confirmId" :title="$confirmTitle" :confirmVariant="$confirmVariant" /> | ||
@endif |
23 changes: 23 additions & 0 deletions
23
resources/views/bootstrap-4/components/buttons/partials/content.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
@if ($startIcon !== null) | ||
{!! $startIcon !!} | ||
@endif | ||
@if ($startContent !== null) | ||
{!! $startContent !!} | ||
@endif | ||
@if ($slot->isEmpty()) | ||
@if ($hideText) | ||
<span class="sr-only"> | ||
{!! $text !!} | ||
</span> | ||
@else | ||
{!! $text !!} | ||
@endif | ||
@else | ||
{!! $slot !!} | ||
@endif | ||
@if ($endContent !== null) | ||
{!! $endContent !!} | ||
@endif | ||
@if ($endIcon !== null) | ||
{!! $endIcon !!} | ||
@endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
resources/views/bootstrap-5/components/buttons/actions/copy.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<button | ||
{{ $attributes->class([ | ||
'btn btn-'.$variant.($size !== null ? ' btn-'.$size : ''), | ||
'btn-clipboard' => !$disabled, | ||
]) }} | ||
type="{{ $type }}" | ||
@if ($formId !== null) | ||
form="{!! $formId !!}" | ||
@endif | ||
@disabled($disabled) | ||
@if ($target !== null) | ||
data-clipboard-target="{{ $target }}" | ||
@elseif ($string !== null) | ||
data-clipboard-text="{{ $string }}" | ||
@endif | ||
@include('blade-ui-kit-bootstrap::bootstrap-5.components.buttons.partials.attributes') | ||
> | ||
@include('blade-ui-kit-bootstrap::bootstrap-5.components.buttons.partials.content') | ||
</button> | ||
|
||
@push('blade-ui-kit-bs-scripts') | ||
@once | ||
<script> | ||
window.ClipboardJS.on('success', function(e) { | ||
let triggerButton = e.trigger; | ||
let dataBsOriginalTitle = triggerButton.getAttribute("data-bs-original-title"); | ||
triggerButton.setAttribute("data-bs-original-title", "{{ trans('blade-ui-kit-bootstrap::clipboard.success') }}"); | ||
let bsTooltip = bootstrap.Tooltip.getInstance(triggerButton); | ||
bsTooltip.show(); | ||
if (dataBsOriginalTitle !== null) { | ||
triggerButton.setAttribute("data-bs-original-title", dataBsOriginalTitle); | ||
} | ||
e.clearSelection(); | ||
}); | ||
window.ClipboardJS.on('error', function(e) { | ||
let triggerButton = e.trigger; | ||
let dataBsOriginalTitle = triggerButton.getAttribute("data-bs-original-title"); | ||
triggerButton.setAttribute("data-bs-original-title", "{{ trans('blade-ui-kit-bootstrap::clipboard.error') }}"); | ||
let bsTooltip = bootstrap.Tooltip.getInstance(triggerButton); | ||
bsTooltip.show(); | ||
if (dataBsOriginalTitle !== null) { | ||
triggerButton.setAttribute("data-bs-original-title", dataBsOriginalTitle); | ||
} | ||
e.clearSelection(); | ||
}); | ||
</script> | ||
@endonce | ||
@endpush |
Oops, something went wrong.