step 18 : animate modal show and hover button cancel, save
This commit is contained in:
466
v1/settings.html
466
v1/settings.html
@@ -157,243 +157,251 @@
|
||||
</div>
|
||||
|
||||
<!-- modal add desktop -->
|
||||
<div x-show="showDialogAdd">
|
||||
<div class="fixed z-10 inset-0">
|
||||
<div class="flex items-center justify-center min-h-screen bg-[#0F0F0F4D] transition-all">
|
||||
<!-- box -->
|
||||
<div class="flex flex-col bg-white rounded-lg w-2/3">
|
||||
<!-- header -->
|
||||
<div class="bg-[#2196F3] flex w-full h-10 rounded-tl-lg rounded-tr-lg">
|
||||
<h3 class="text-xl font-bold uppercase text-white px-4 py-1">add</h3>
|
||||
</div>
|
||||
<!-- body -->
|
||||
<div class="flex flex-1 bg-white px-6 py-5">
|
||||
<div class="relative w-full">
|
||||
<!-- <p x-text="selectedJenis.idJenis"></p><br /> -->
|
||||
<!-- buka dropdown -->
|
||||
<fieldset @click.outside="openJenis = false"
|
||||
class="relative border border-gray-400 rounded-md focus-within:border-blue-500 focus-within:ring-1 focus-within:ring-blue-500 px-3 pt-2 pb-2">
|
||||
<span x-text="selectedJenis.idJenis != -1 ? 'Jenis' : selectedJenis.namaJenis"
|
||||
class="pointer-events-none absolute start-2.5 top-0 -translate-y-1/2 bg-white p-0.5 text-xs text-gray-700 transition-all peer-placeholder-shown:top-1/2 peer-placeholder-shown:text-sm peer-focus:top-0 peer-focus:text-xs">
|
||||
</span>
|
||||
<button @click="openJenis = !openJenis" type="button"
|
||||
class="w-full flex items-center justify-between bg-transparent text-gray-900 py-0.5 focus:outline-none">
|
||||
<span x-text="selectedJenis.namaJenis" class="text-left"></span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 transition-transform"
|
||||
:class="{ 'rotate-180': openJenis }" fill="none" viewBox="0 0 24 24"
|
||||
stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M19 9l-7 7-7-7" />
|
||||
</svg>
|
||||
</button>
|
||||
</fieldset>
|
||||
<div x-show="showDialogAdd" x-transition.duration.200ms class="fixed z-10 inset-0">
|
||||
<div class="flex items-center justify-center min-h-screen bg-[#0F0F0F4D] transition-all">
|
||||
<!-- box -->
|
||||
<div class="flex flex-col bg-white rounded-lg w-2/3">
|
||||
<!-- header -->
|
||||
<div class="bg-[#2196F3] flex w-full h-10 rounded-tl-lg rounded-tr-lg">
|
||||
<h3 class="text-xl font-bold uppercase text-white px-4 py-1">add</h3>
|
||||
</div>
|
||||
<!-- body -->
|
||||
<div class="flex flex-1 bg-white px-6 py-5">
|
||||
<div class="relative w-full">
|
||||
<!-- <p x-text="selectedJenis.idJenis"></p><br /> -->
|
||||
<!-- buka dropdown -->
|
||||
<fieldset @click.outside="openJenis = false"
|
||||
class="relative border border-gray-400 rounded-md focus-within:border-blue-500 focus-within:ring-1 focus-within:ring-blue-500 px-3 pt-2 pb-2">
|
||||
<span x-text="selectedJenis.idJenis != -1 ? 'Jenis' : selectedJenis.namaJenis"
|
||||
class="pointer-events-none absolute start-2.5 top-0 -translate-y-1/2 bg-white p-0.5 text-xs text-gray-700 transition-all peer-placeholder-shown:top-1/2 peer-placeholder-shown:text-sm peer-focus:top-0 peer-focus:text-xs">
|
||||
</span>
|
||||
<button @click="openJenis = !openJenis" type="button"
|
||||
class="w-full flex items-center justify-between bg-transparent text-gray-900 py-0.5 focus:outline-none">
|
||||
<span x-text="selectedJenis.namaJenis" class="text-left"></span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 transition-transform"
|
||||
:class="{ 'rotate-180': openJenis }" fill="none" viewBox="0 0 24 24"
|
||||
stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M19 9l-7 7-7-7" />
|
||||
</svg>
|
||||
</button>
|
||||
</fieldset>
|
||||
|
||||
<!-- list menu -->
|
||||
<div x-show="openJenis"
|
||||
class="absolute bg-white w-full border border-gray-300 rounded-md shadow-lg z-10 max-h-[200px] overflow-y-auto">
|
||||
<ul>
|
||||
<template x-for="item in dataJenis" :key="item.idJenis">
|
||||
<li :id="item.idJenis" @click="onChangeJenis(item)"
|
||||
class="py-2 px-3 hover:bg-blue-100 cursor-pointer text-gray-700">
|
||||
<button x-text="item.namaJenis"></button>
|
||||
</li>
|
||||
</template>
|
||||
</ul>
|
||||
<!-- list menu -->
|
||||
<div x-show="openJenis"
|
||||
class="absolute bg-white w-full border border-gray-300 rounded-md shadow-lg z-10 max-h-[200px] overflow-y-auto">
|
||||
<ul>
|
||||
<template x-for="item in dataJenis" :key="item.idJenis">
|
||||
<li :id="item.idJenis" @click="onChangeJenis(item)"
|
||||
class="py-2 px-3 hover:bg-blue-100 cursor-pointer text-gray-700">
|
||||
<button x-text="item.namaJenis"></button>
|
||||
</li>
|
||||
</template>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- garis putus putus -->
|
||||
<template x-if="selectedJenis.idJenis !== -1">
|
||||
<div class="border-t border-dashed border-gray-400 mt-5 mb-5"></div>
|
||||
</template>
|
||||
|
||||
|
||||
<!-- namaJenis TCP Server -->
|
||||
<template x-if="selectedJenis.idJenis === 1">
|
||||
<div>
|
||||
<!-- port -->
|
||||
<label for="Port"
|
||||
class="relative block rounded-md border border-gray-400 focus-within:border-blue-600 focus-within:ring-1 focus-within:ring-blue-600">
|
||||
<input type="text" id="Port"
|
||||
class="peer pl-2 border-none py-3 bg-transparent placeholder-transparent focus:border-transparent focus:ring-0 focus:outline-hidden"
|
||||
placeholder="Port" />
|
||||
|
||||
<span
|
||||
class="pointer-events-none absolute start-2.5 top-0 -translate-y-1/2 bg-white p-0.5 text-xs text-gray-700 transition-all peer-placeholder-shown:top-1/2 peer-placeholder-shown:text-sm peer-focus:top-0 peer-focus:text-xs">
|
||||
Port
|
||||
</span>
|
||||
</label>
|
||||
<div class="mb-5"></div>
|
||||
<!-- interface -->
|
||||
<fieldset @click.outside="openInterface = false"
|
||||
class="relative border border-gray-400 rounded-md focus-within:border-blue-500 focus-within:ring-1 focus-within:ring-blue-500 px-3 pt-2 pb-2">
|
||||
<span
|
||||
x-text="selectedInterface.idInterface != -1 ? 'Interface' : selectedInterface.namaInterface"
|
||||
class="pointer-events-none absolute start-2.5 top-0 -translate-y-1/2 bg-white p-0.5 text-xs text-gray-700 transition-all peer-placeholder-shown:top-1/2 peer-placeholder-shown:text-sm peer-focus:top-0 peer-focus:text-xs">
|
||||
</span>
|
||||
<button @click="openInterface = !openInterface" type="button"
|
||||
class="w-full flex items-center justify-between bg-transparent text-gray-900 py-0.5 focus:outline-none">
|
||||
<span x-text="selectedInterface.namaInterface" class="text-left"></span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg"
|
||||
class="h-5 w-5 transition-transform"
|
||||
:class="{ 'rotate-180': openInterface }" fill="none"
|
||||
viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round"
|
||||
stroke-width="2" d="M19 9l-7 7-7-7" />
|
||||
</svg>
|
||||
</button>
|
||||
</fieldset>
|
||||
<div x-show="openInterface"
|
||||
class="absolute bg-white w-full border border-gray-300 rounded-md shadow-lg z-10 max-h-[200px] overflow-y-auto">
|
||||
<ul>
|
||||
<template x-for="item in dataInterface" :key="item.idInterface">
|
||||
<li :id="item.idInterface" @click="onChangeInterface(item)"
|
||||
class="py-2 px-3 hover:bg-blue-100 cursor-pointer text-gray-700">
|
||||
<button x-text="item.namaInterface"></button>
|
||||
</li>
|
||||
</template>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="mb-5"></div>
|
||||
<!-- instrument -->
|
||||
<fieldset @click.outside="openInstrument = false"
|
||||
class="relative border border-gray-400 rounded-md focus-within:border-blue-500 focus-within:ring-1 focus-within:ring-blue-500 px-3 pt-2 pb-2">
|
||||
<span
|
||||
x-text="selectedInstrument.idInstrument != -1 ? 'Instrument' : selectedInstrument.namaInstrument"
|
||||
class="pointer-events-none absolute start-2.5 top-0 -translate-y-1/2 bg-white p-0.5 text-xs text-gray-700 transition-all peer-placeholder-shown:top-1/2 peer-placeholder-shown:text-sm peer-focus:top-0 peer-focus:text-xs">
|
||||
</span>
|
||||
<button @click="openInstrument = !openInstrument" type="button"
|
||||
class="w-full flex items-center justify-between bg-transparent text-gray-900 py-0.5 focus:outline-none">
|
||||
<span x-text="selectedInstrument.namaInstrument"
|
||||
class="text-left"></span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg"
|
||||
class="h-5 w-5 transition-transform"
|
||||
:class="{ 'rotate-180': openInstrument }" fill="none"
|
||||
viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round"
|
||||
stroke-width="2" d="M19 9l-7 7-7-7" />
|
||||
</svg>
|
||||
</button>
|
||||
</fieldset>
|
||||
<div x-show="openInstrument"
|
||||
class="absolute bg-white w-full border border-gray-300 rounded-md shadow-lg z-10 max-h-[200px] overflow-y-auto">
|
||||
<ul>
|
||||
<template x-for="item in dataInstrument" :key="item.idInstrument">
|
||||
<li :id="item.idInstrument" @click="onChangeInstrument(item)"
|
||||
class="py-2 px-3 hover:bg-blue-100 cursor-pointer text-gray-700">
|
||||
<button x-text="item.namaInstrument"></button>
|
||||
</li>
|
||||
</template>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="mb-5"></div>
|
||||
</div>
|
||||
</template>
|
||||
<!-- namaJenis TCP Server -->
|
||||
|
||||
<!-- garis putus putus -->
|
||||
<template x-if="selectedJenis.idJenis !== -1">
|
||||
<div class="border-t border-dashed border-gray-400 mt-5 mb-5"></div>
|
||||
</template>
|
||||
<!-- namaJenis TCP Client -->
|
||||
<template x-if="selectedJenis.idJenis === 2">
|
||||
<div>
|
||||
<!-- server -->
|
||||
<label for="Server"
|
||||
class="relative block rounded-md border border-gray-400 focus-within:border-blue-600 focus-within:ring-1 focus-within:ring-blue-600">
|
||||
<input type="text" id="Server"
|
||||
class="peer pl-2 border-none py-3 bg-transparent placeholder-transparent focus:border-transparent focus:ring-0 focus:outline-hidden"
|
||||
placeholder="Server" />
|
||||
|
||||
<span
|
||||
class="pointer-events-none absolute start-2.5 top-0 -translate-y-1/2 bg-white p-0.5 text-xs text-gray-700 transition-all peer-placeholder-shown:top-1/2 peer-placeholder-shown:text-sm peer-focus:top-0 peer-focus:text-xs">
|
||||
Server
|
||||
</span>
|
||||
</label>
|
||||
<div class="mb-5"></div>
|
||||
<!-- port -->
|
||||
<label for="Port"
|
||||
class="relative block rounded-md border border-gray-400 focus-within:border-blue-600 focus-within:ring-1 focus-within:ring-blue-600">
|
||||
<input type="text" id="Port"
|
||||
class="peer pl-2 border-none py-3 bg-transparent placeholder-transparent focus:border-transparent focus:ring-0 focus:outline-hidden"
|
||||
placeholder="Port" />
|
||||
|
||||
<!-- namaJenis TCP Server -->
|
||||
<template x-if="selectedJenis.idJenis === 1">
|
||||
<div>
|
||||
<!-- port -->
|
||||
<label for="Port"
|
||||
class="relative block rounded-md border border-gray-400 focus-within:border-blue-600 focus-within:ring-1 focus-within:ring-blue-600">
|
||||
<input type="text" id="Port"
|
||||
class="peer pl-2 border-none py-3 bg-transparent placeholder-transparent focus:border-transparent focus:ring-0 focus:outline-hidden"
|
||||
placeholder="Port" />
|
||||
|
||||
<span
|
||||
class="pointer-events-none absolute start-2.5 top-0 -translate-y-1/2 bg-white p-0.5 text-xs text-gray-700 transition-all peer-placeholder-shown:top-1/2 peer-placeholder-shown:text-sm peer-focus:top-0 peer-focus:text-xs">
|
||||
Port
|
||||
</span>
|
||||
</label>
|
||||
<div class="mb-5"></div>
|
||||
<!-- interface -->
|
||||
<fieldset @click.outside="openInterface = false"
|
||||
class="relative border border-gray-400 rounded-md focus-within:border-blue-500 focus-within:ring-1 focus-within:ring-blue-500 px-3 pt-2 pb-2">
|
||||
<span
|
||||
x-text="selectedInterface.idInterface != -1 ? 'Interface' : selectedInterface.namaInterface"
|
||||
class="pointer-events-none absolute start-2.5 top-0 -translate-y-1/2 bg-white p-0.5 text-xs text-gray-700 transition-all peer-placeholder-shown:top-1/2 peer-placeholder-shown:text-sm peer-focus:top-0 peer-focus:text-xs">
|
||||
</span>
|
||||
<button @click="openInterface = !openInterface" type="button"
|
||||
class="w-full flex items-center justify-between bg-transparent text-gray-900 py-0.5 focus:outline-none">
|
||||
<span x-text="selectedInterface.namaInterface" class="text-left"></span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg"
|
||||
class="h-5 w-5 transition-transform"
|
||||
:class="{ 'rotate-180': openInterface }" fill="none"
|
||||
viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round"
|
||||
stroke-width="2" d="M19 9l-7 7-7-7" />
|
||||
</svg>
|
||||
</button>
|
||||
</fieldset>
|
||||
<div x-show="openInterface"
|
||||
class="absolute bg-white w-full border border-gray-300 rounded-md shadow-lg z-10 max-h-[200px] overflow-y-auto">
|
||||
<ul>
|
||||
<template x-for="item in dataInterface" :key="item.idInterface">
|
||||
<li :id="item.idInterface" @click="onChangeInterface(item)"
|
||||
class="py-2 px-3 hover:bg-blue-100 cursor-pointer text-gray-700">
|
||||
<button x-text="item.namaInterface"></button>
|
||||
</li>
|
||||
</template>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="mb-5"></div>
|
||||
<!-- instrument -->
|
||||
<fieldset @click.outside="openInstrument = false"
|
||||
class="relative border border-gray-400 rounded-md focus-within:border-blue-500 focus-within:ring-1 focus-within:ring-blue-500 px-3 pt-2 pb-2">
|
||||
<span
|
||||
x-text="selectedInstrument.idInstrument != -1 ? 'Instrument' : selectedInstrument.namaInstrument"
|
||||
class="pointer-events-none absolute start-2.5 top-0 -translate-y-1/2 bg-white p-0.5 text-xs text-gray-700 transition-all peer-placeholder-shown:top-1/2 peer-placeholder-shown:text-sm peer-focus:top-0 peer-focus:text-xs">
|
||||
</span>
|
||||
<button @click="openInstrument = !openInstrument" type="button"
|
||||
class="w-full flex items-center justify-between bg-transparent text-gray-900 py-0.5 focus:outline-none">
|
||||
<span x-text="selectedInstrument.namaInstrument"
|
||||
class="text-left"></span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg"
|
||||
class="h-5 w-5 transition-transform"
|
||||
:class="{ 'rotate-180': openInstrument }" fill="none"
|
||||
viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round"
|
||||
stroke-width="2" d="M19 9l-7 7-7-7" />
|
||||
</svg>
|
||||
</button>
|
||||
</fieldset>
|
||||
<div x-show="openInstrument"
|
||||
class="absolute bg-white w-full border border-gray-300 rounded-md shadow-lg z-10 max-h-[200px] overflow-y-auto">
|
||||
<ul>
|
||||
<template x-for="item in dataInstrument" :key="item.idInstrument">
|
||||
<li :id="item.idInstrument" @click="onChangeInstrument(item)"
|
||||
class="py-2 px-3 hover:bg-blue-100 cursor-pointer text-gray-700">
|
||||
<button x-text="item.namaInstrument"></button>
|
||||
</li>
|
||||
</template>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="mb-5"></div>
|
||||
<span
|
||||
class="pointer-events-none absolute start-2.5 top-0 -translate-y-1/2 bg-white p-0.5 text-xs text-gray-700 transition-all peer-placeholder-shown:top-1/2 peer-placeholder-shown:text-sm peer-focus:top-0 peer-focus:text-xs">
|
||||
Port
|
||||
</span>
|
||||
</label>
|
||||
<div class="mb-5"></div>
|
||||
<!-- interface -->
|
||||
<fieldset @click.outside="openInterface = false"
|
||||
class="relative border border-gray-400 rounded-md focus-within:border-blue-500 focus-within:ring-1 focus-within:ring-blue-500 px-3 pt-2 pb-2">
|
||||
<span
|
||||
x-text="selectedInterface.idInterface != -1 ? 'Interface' : selectedInterface.namaInterface"
|
||||
class="pointer-events-none absolute start-2.5 top-0 -translate-y-1/2 bg-white p-0.5 text-xs text-gray-700 transition-all peer-placeholder-shown:top-1/2 peer-placeholder-shown:text-sm peer-focus:top-0 peer-focus:text-xs">
|
||||
</span>
|
||||
<button @click="openInterface = !openInterface" type="button"
|
||||
class="w-full flex items-center justify-between bg-transparent text-gray-900 py-0.5 focus:outline-none">
|
||||
<span x-text="selectedInterface.namaInterface" class="text-left"></span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg"
|
||||
class="h-5 w-5 transition-transform"
|
||||
:class="{ 'rotate-180': openInterface }" fill="none"
|
||||
viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round"
|
||||
stroke-width="2" d="M19 9l-7 7-7-7" />
|
||||
</svg>
|
||||
</button>
|
||||
</fieldset>
|
||||
<div x-show="openInterface"
|
||||
class="absolute bg-white w-full border border-gray-300 rounded-md shadow-lg z-10 max-h-[200px] overflow-y-auto">
|
||||
<ul>
|
||||
<template x-for="item in dataInterface" :key="item.idInterface">
|
||||
<li :id="item.idInterface" @click="onChangeInterface(item)"
|
||||
class="py-2 px-3 hover:bg-blue-100 cursor-pointer text-gray-700">
|
||||
<button x-text="item.namaInterface"></button>
|
||||
</li>
|
||||
</template>
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
<!-- namaJenis TCP Server -->
|
||||
|
||||
<!-- namaJenis TCP Client -->
|
||||
<template x-if="selectedJenis.idJenis === 2">
|
||||
<div>
|
||||
<!-- server -->
|
||||
<label for="Server"
|
||||
class="relative block rounded-md border border-gray-400 focus-within:border-blue-600 focus-within:ring-1 focus-within:ring-blue-600">
|
||||
<input type="text" id="Server"
|
||||
class="peer pl-2 border-none py-3 bg-transparent placeholder-transparent focus:border-transparent focus:ring-0 focus:outline-hidden"
|
||||
placeholder="Server" />
|
||||
|
||||
<span
|
||||
class="pointer-events-none absolute start-2.5 top-0 -translate-y-1/2 bg-white p-0.5 text-xs text-gray-700 transition-all peer-placeholder-shown:top-1/2 peer-placeholder-shown:text-sm peer-focus:top-0 peer-focus:text-xs">
|
||||
Server
|
||||
</span>
|
||||
</label>
|
||||
<div class="mb-5"></div>
|
||||
<!-- port -->
|
||||
<label for="Port"
|
||||
class="relative block rounded-md border border-gray-400 focus-within:border-blue-600 focus-within:ring-1 focus-within:ring-blue-600">
|
||||
<input type="text" id="Port"
|
||||
class="peer pl-2 border-none py-3 bg-transparent placeholder-transparent focus:border-transparent focus:ring-0 focus:outline-hidden"
|
||||
placeholder="Port" />
|
||||
|
||||
<span
|
||||
class="pointer-events-none absolute start-2.5 top-0 -translate-y-1/2 bg-white p-0.5 text-xs text-gray-700 transition-all peer-placeholder-shown:top-1/2 peer-placeholder-shown:text-sm peer-focus:top-0 peer-focus:text-xs">
|
||||
Port
|
||||
</span>
|
||||
</label>
|
||||
<div class="mb-5"></div>
|
||||
<!-- interface -->
|
||||
<fieldset @click.outside="openInterface = false"
|
||||
class="relative border border-gray-400 rounded-md focus-within:border-blue-500 focus-within:ring-1 focus-within:ring-blue-500 px-3 pt-2 pb-2">
|
||||
<span
|
||||
x-text="selectedInterface.idInterface != -1 ? 'Interface' : selectedInterface.namaInterface"
|
||||
class="pointer-events-none absolute start-2.5 top-0 -translate-y-1/2 bg-white p-0.5 text-xs text-gray-700 transition-all peer-placeholder-shown:top-1/2 peer-placeholder-shown:text-sm peer-focus:top-0 peer-focus:text-xs">
|
||||
</span>
|
||||
<button @click="openInterface = !openInterface" type="button"
|
||||
class="w-full flex items-center justify-between bg-transparent text-gray-900 py-0.5 focus:outline-none">
|
||||
<span x-text="selectedInterface.namaInterface" class="text-left"></span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg"
|
||||
class="h-5 w-5 transition-transform"
|
||||
:class="{ 'rotate-180': openInterface }" fill="none"
|
||||
viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round"
|
||||
stroke-width="2" d="M19 9l-7 7-7-7" />
|
||||
</svg>
|
||||
</button>
|
||||
</fieldset>
|
||||
<div x-show="openInterface"
|
||||
class="absolute bg-white w-full border border-gray-300 rounded-md shadow-lg z-10 max-h-[200px] overflow-y-auto">
|
||||
<ul>
|
||||
<template x-for="item in dataInterface" :key="item.idInterface">
|
||||
<li :id="item.idInterface" @click="onChangeInterface(item)"
|
||||
class="py-2 px-3 hover:bg-blue-100 cursor-pointer text-gray-700">
|
||||
<button x-text="item.namaInterface"></button>
|
||||
</li>
|
||||
</template>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="mb-5"></div>
|
||||
<!-- instrument -->
|
||||
<fieldset @click.outside="openInstrument = false"
|
||||
class="relative border border-gray-400 rounded-md focus-within:border-blue-500 focus-within:ring-1 focus-within:ring-blue-500 px-3 pt-2 pb-2">
|
||||
<span
|
||||
x-text="selectedInstrument.idInstrument != -1 ? 'Instrument' : selectedInstrument.namaInstrument"
|
||||
class="pointer-events-none absolute start-2.5 top-0 -translate-y-1/2 bg-white p-0.5 text-xs text-gray-700 transition-all peer-placeholder-shown:top-1/2 peer-placeholder-shown:text-sm peer-focus:top-0 peer-focus:text-xs">
|
||||
</span>
|
||||
<button @click="openInstrument = !openInstrument" type="button"
|
||||
class="w-full flex items-center justify-between bg-transparent text-gray-900 py-0.5 focus:outline-none">
|
||||
<span x-text="selectedInstrument.namaInstrument"
|
||||
class="text-left"></span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg"
|
||||
class="h-5 w-5 transition-transform"
|
||||
:class="{ 'rotate-180': openInstrument }" fill="none"
|
||||
viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round"
|
||||
stroke-width="2" d="M19 9l-7 7-7-7" />
|
||||
</svg>
|
||||
</button>
|
||||
</fieldset>
|
||||
<div x-show="openInstrument"
|
||||
class="absolute bg-white w-full border border-gray-300 rounded-md shadow-lg z-10 max-h-[200px] overflow-y-auto">
|
||||
<ul>
|
||||
<template x-for="item in dataInstrument" :key="item.idInstrument">
|
||||
<li :id="item.idInstrument" @click="onChangeInstrument(item)"
|
||||
class="py-2 px-3 hover:bg-blue-100 cursor-pointer text-gray-700">
|
||||
<button x-text="item.namaInstrument"></button>
|
||||
</li>
|
||||
</template>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="mb-5"></div>
|
||||
<div class="mb-5"></div>
|
||||
<!-- instrument -->
|
||||
<fieldset @click.outside="openInstrument = false"
|
||||
class="relative border border-gray-400 rounded-md focus-within:border-blue-500 focus-within:ring-1 focus-within:ring-blue-500 px-3 pt-2 pb-2">
|
||||
<span
|
||||
x-text="selectedInstrument.idInstrument != -1 ? 'Instrument' : selectedInstrument.namaInstrument"
|
||||
class="pointer-events-none absolute start-2.5 top-0 -translate-y-1/2 bg-white p-0.5 text-xs text-gray-700 transition-all peer-placeholder-shown:top-1/2 peer-placeholder-shown:text-sm peer-focus:top-0 peer-focus:text-xs">
|
||||
</span>
|
||||
<button @click="openInstrument = !openInstrument" type="button"
|
||||
class="w-full flex items-center justify-between bg-transparent text-gray-900 py-0.5 focus:outline-none">
|
||||
<span x-text="selectedInstrument.namaInstrument"
|
||||
class="text-left"></span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg"
|
||||
class="h-5 w-5 transition-transform"
|
||||
:class="{ 'rotate-180': openInstrument }" fill="none"
|
||||
viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round"
|
||||
stroke-width="2" d="M19 9l-7 7-7-7" />
|
||||
</svg>
|
||||
</button>
|
||||
</fieldset>
|
||||
<div x-show="openInstrument"
|
||||
class="absolute bg-white w-full border border-gray-300 rounded-md shadow-lg z-10 max-h-[200px] overflow-y-auto">
|
||||
<ul>
|
||||
<template x-for="item in dataInstrument" :key="item.idInstrument">
|
||||
<li :id="item.idInstrument" @click="onChangeInstrument(item)"
|
||||
class="py-2 px-3 hover:bg-blue-100 cursor-pointer text-gray-700">
|
||||
<button x-text="item.namaInstrument"></button>
|
||||
</li>
|
||||
</template>
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
<!-- namaJenis TCP Client -->
|
||||
</div>
|
||||
<div class="mb-5"></div>
|
||||
</div>
|
||||
</template>
|
||||
<!-- namaJenis TCP Client -->
|
||||
|
||||
<!-- -->
|
||||
</div>
|
||||
<!-- footer -->
|
||||
<div class="h-10 px-4 py-2">
|
||||
<div class="flex items-end justify-end">
|
||||
<button
|
||||
class="mr-3 text-[#FF5252] font-bold text-sm uppercase" @click="closeDialog()">Cancel</button>
|
||||
<button class="text-[#1976D2] font-bold text-sm uppercase">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- footer -->
|
||||
<div class="h-10 px-4 py-2 mb-5">
|
||||
<div class="flex items-end justify-end">
|
||||
<button
|
||||
@click="closeDialog()"
|
||||
class="mr-3 text-[#FF5252] hover:text-white font-bold text-sm uppercase transition duration-200
|
||||
hover:bg-[#FF5252] px-4 py-2 rounded-md">
|
||||
Cancel
|
||||
</button>
|
||||
<button
|
||||
class="text-[#1976D2] font-bold text-sm uppercase px-4 py-2 rounded-md transition duration-200
|
||||
hover:bg-[#1976D2] hover:text-white">
|
||||
Save
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user