Printing data on numpad key press, first version. Settings page for mapping key to actions.

This commit is contained in:
kplaczek
2018-05-06 21:03:42 +02:00
parent 283c5b905e
commit e5f44b92e4
12 changed files with 535 additions and 61 deletions

View File

@@ -12,17 +12,11 @@
name="text">{{ $text }}</textarea>
<input type="hidden" name="icon" id="icon" value="{{ $icon_selected }}"/>
<div class="icons">
<span class="icon @if(!isset($icon_selected) ) selected @endif empty" title="empty"></span>
@foreach ($icons as $icon)<span
class="icon {{ str_before($icon, '.') }} @if(isset($icon_selected) && $icon == basename($icon_selected)) selected @endif " title="{{ $icon }}">
class="icon {{ str_before($icon, '.') }} @if(isset($icon_selected) && $icon == basename($icon_selected)) selected @endif "
title="{{ $icon }}">
</span>@endforeach
</div>
</div>
@@ -38,8 +32,6 @@
<button class="ui reset button js-reset" type="reset">Wyczyść</button>
@if(isset($id))
<button class="ui delete button js-delete red" type="submit" name="delete">Usuń</button>
@endif
</form>

View File

@@ -12,8 +12,10 @@
</div>
@endif
<h1 class="ui header">Szybka notatka</h1>
<div class="flex header space-between">
<h1 class="ui header">Szybka notatka</h1>
<a class="ui right floated" href="/settings">Ustawienia</a>
</div>
<div class="ui container">
<div class="ui one column middle aligned stackable grid">
<div class="ui column">

View File

@@ -0,0 +1,54 @@
@extends('layouts.base')
@section('content')
<div class="ui container">
@if(Session::has('print_status'))
<div class="ui info message">
<div class="header">
{{ Session::get('print_status') }}
</div>
</div>
@endif
<div class="flex header space-between">
<h1 class="ui header">Ustawienia</h1>
<a class="ui right floated" href="/">Notatki</a>
</div>
</div>
<div class="ui container">
<h3 class="ui header">Przypisanie klawiszy</h3>
<form class="ui form" method="POST">
{{ csrf_field() }}
@foreach($keyboard as $element)
<div class="inline fields">
<div class="three wide field">
Klawisz: {{ $element->key }}
</div>
<div class="left floated content">
<div class="field">
Akcja:
<select class="ui" name="key[{{ $element->id }}]">
@foreach($actions as $actionKey => $action)
@if($action == 'separator')
<optgroup label=""></optgroup>
@else
<option @if($element->action == $actionKey)selected="selected"
@endif
value="{{ $actionKey }}">{{ $action }}</optionvalue>
@endif
@endforeach
</select>
</div>
</div>
</div>
@endforeach
<button class="ui blue button" type="submit">Zapisz</button>
</form>
</div>
@endsection