v0.10.11a - Made hide filter, filter washing machine search semi done, and texts fixs

This commit is contained in:
2020-08-20 14:59:22 +02:00
parent 4f9cf41656
commit 89276c5af1
10 changed files with 115 additions and 14 deletions
@@ -15,9 +15,12 @@
<form method="post" action="{{ route("users.store") }}">
@csrf
<input type="text" class="form-controller" id="search" name="search" placeholder="Søg på navn,titel,email,tf"></input>
<input type="text" class="form-controller" id="search" name="search" placeholder="Søg på navn,titel,email,tf">
</form>
<button id="filterButton" type="button" class="btn btn-sde-blue mb-0">Filter</button>
</div>
<div id="showHideCheckbox" class="mt-1 ">
<input class="checkbox-inline" type="checkbox" name="checkbox" id="navn" value="navn">
<label for="navn">Navn</label>
<input class="checkbox-inline" type="checkbox" name="checkbox" id="titel" value="titel">
@@ -26,9 +29,8 @@
<label for="efternavn">Email</label>
<input class="checkbox-inline" type="checkbox" name="checkbox" id="tf" value="tf">
<label for="efternavn">Telefon</label>
<p></p>
</div>
<div id="showHideCheckboxs" style="margin-bottom: -38px">
</div>
<table class="tbl mt-2">
<tr>
@@ -90,6 +92,18 @@
}
});
});
//Show hide search filter
$('#showHideCheckbox').hide();
$('#showHideCheckboxs').hide();
$("#filterButton").click(function(){
$('#showHideCheckbox').toggle();
$('#showHideCheckboxs').toggle();
});
</script>
@@ -27,7 +27,7 @@
<form method="post" action="{{ route("events.store") }}" enctype="multipart/form-data">
@csrf
<label for="name">Aktivitet Navn:</label>
<label hidden id="error" for="errormesseages">Dette Aktivitet navn findes allerede</label>
<label hidden id="error" for="errormesseages">Dette navn findes allerede</label>
<input type="text" name="name" id="name" max="60" required>
<label for="accountable">Aktivitet Ansvarlig:</label>
<input type="text" name="accountable" id="accountable" required>
@@ -15,7 +15,7 @@
<form method="post" action="{{ route("events.store") }}">
@csrf
<input type="text" class="form-controller" id="search" name="search" placeholder="Søg på Navn, Dato"></input>
<input type="text" class="form-controller" id="search" name="search" placeholder="Søg på Navn, Ansvarlig, Dato"></input>
</form>
</div>
@@ -17,10 +17,10 @@
@csrf
<input type="text" class="form-controller" id="search" name="search" placeholder="Søg efter navn,email,tlf"><br>
</form>
<button id="filterButton" type="button" class="btn btn-sde-blue">Søg filter</button>
<button id="filterButton" type="button" class="btn btn-sde-blue mb-0">Filter</button>
</div>
<div id="showHideCheckbox">
<div id="showHideCheckbox" class="mt-1 ">
<input class="checkbox-inline" type="checkbox" name="checkbox" id="navn" value="navn">
<label for="navn">Navn</label>
<input class="checkbox-inline" type="checkbox" name="checkbox" id="efternavn" value="efternavn">
@@ -32,6 +32,8 @@
<input class="checkbox-inline" type="checkbox" id="rolle" name="checkbox"value="rolle">
<label for="rolle">Rolle</label>
</div>
<div id="showHideCheckboxs" style="margin-bottom: -38px">
</div>
<table class="tbl mt-2">
<tr>
@@ -96,9 +98,10 @@
<script>
$(document).ready(function(){
var $box;
$("input:checkbox").on('click', function() {
var $box = $(this);
$box = $(this);
if ($box.is(":checked")) {
var group = "input:checkbox[name='" + $box.attr("name") + "']";
$(group).prop("checked", false);
@@ -107,16 +110,18 @@
$box.prop("checked", false);
}
});
});
//Show hide search filter
$('#showHideCheckbox').hide();
$('#showHideCheckboxs').hide();
$("#filterButton").click(function(){
$('#showHideCheckbox').toggle();
$('#showHideCheckboxs').toggle();
});
</script>
@@ -12,6 +12,14 @@
@section("content")
<div class="row align-items-center">
<a class="btn btn-inline btn-sde-blue mb-0" href="{{ route('washing-machines.create') }}"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Vaskemaskine</a>
<div class="mt-1 ml-1">
<select name="risRosName" id="locationID">
<option selected="selected" name="all" value="all">Alle</option>
@foreach(\App\Location::query()->get() as $location)
<option value="{{$location->name}}">{{$location->name}}</option>
@endforeach
</select> <label>Vælg bygning</label>
</div>
</div>
<table class="tbl mt-2">
<tr>
@@ -35,4 +43,21 @@
</tr>
@endforeach
</table>
<script>
$('#locationID').change(function () {
$value = $('#locationID').find(":selected").val();
// alert($value);
$.ajax({
type: 'get',
url: '{{route('locations.search')}}',
data: {'option':$value},
success:function (data) {
$('tbody').html(data);
},
error:function (data) {
console.log(data);
}
});
})
</script>
@endsection
@@ -1,7 +1,7 @@
<html style="padding: 0; margin: 0; width: 100%; height: 100%;" lang="">
<head style="padding: 0; margin: 0; width: 100%; height: 100%;">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Title</title>
<title>Menuplan_uge_{{$menuPlan->week}}</title>
</head>
<style>
@page { margin: 0; }