Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add search via select2 for application dropdown #1155

Merged
merged 1 commit into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion resources/views/items/form.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</div>
<div class="appoptions">
<div class="optdetails">
<div><button class="dark">{{ __('app.apps.apptype') }}</button></div>
<div><button id="optdetails-button" class="dark">{{ __('app.apps.apptype') }}</button></div>
<div class="optvalue">
<div class="input">
{!! Form::select('appid', App\Application::applist(), null, array('class' => 'form-control config-item', 'id' => 'apptype', 'data-config' => 'type')) !!}
Expand Down
7 changes: 7 additions & 0 deletions resources/views/items/scripts.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@
})

$('.tags').select2();
document.getElementById('optdetails-button').addEventListener("click", function(event) {
$('#apptype').select2({
placeholder: "Select...",
allowClear: true,
width: "100%"
});
}, {once: true});

if($('#appurl').val() !== '') {
if ($('#appurl').val().indexOf("://") !== -1) {
Expand Down