no backspace on readonly auto-complete

This commit is contained in:
Arno Kaimbacher 2018-11-29 11:58:00 +01:00
parent 88d90b930d
commit d0ed3e9105
5 changed files with 26 additions and 4 deletions

View File

@ -0,0 +1,13 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
// models/CountryTranslation.php
class TitleTranslation extends Model
{
public $timestamps = false;
protected $fillable = ['title', 'description'];
protected $guarded = ['id'];
}

File diff suppressed because one or more lines are too long

View File

@ -2,7 +2,7 @@
https://alligator.io/vuejs/vue-autocomplete-component/ --> https://alligator.io/vuejs/vue-autocomplete-component/ -->
<template> <template>
<div style="position:relative"> <div style="position:relative">
<input type="search" @input="searchChanged" v-model="search" v-bind:disabled="isLoading == true" v-bind:title="title" v-bind:placeholder="title" <input type="search" @input="searchChanged" v-model="search" v-bind:readonly="isLoading == true" v-bind:title="title" v-bind:placeholder="title"
class="pure-u-23-24" v-on:keydown.down="onArrowDown" v-on:keydown.up="onArrowUp" v-on:keydown.enter="onEnter"> class="pure-u-23-24" v-on:keydown.down="onArrowDown" v-on:keydown.up="onArrowUp" v-on:keydown.enter="onEnter">
<!-- <ul class="autocomplete-results" v-show="results.length > 0"> --> <!-- <ul class="autocomplete-results" v-show="results.length > 0"> -->
<ul class="autocomplete-results pure-u-23-24" v-show="isOpen"> <ul class="autocomplete-results pure-u-23-24" v-show="isOpen">

View File

@ -89,7 +89,7 @@
<h3 class="header-title">Reports</h3> <h3 class="header-title">Reports</h3>
</div> </div>
<div class="pure-g box-content"> <div class="pure-g box-content">
<div class="pure-u-1 pure-u-md-2-3"> <div class="pure-u-1 pure-u-md-1">
{{-- <canvas id="myChart" width="400" height="260"></canvas> --}} {{-- <canvas id="myChart" width="400" height="260"></canvas> --}}
<div class="php-info"> <div class="php-info">
@php @php

View File

@ -186,6 +186,15 @@
<script type="text/javascript" src="{{ asset('js/lib.js') }}"></script> <script type="text/javascript" src="{{ asset('js/lib.js') }}"></script>
<script type="text/javascript"> <script type="text/javascript">
$('div.alert').not('alert-important');//.delay(3000).slideUp(300); $('div.alert').not('alert-important');//.delay(3000).slideUp(300);
// A $( document ).ready() block.
$(document).ready(function() {
$(document).on("keydown", function (e) {
if (e.which === 8 && !$(e.target).is("input:not([type=radio]):not([type=checkbox]), textarea, [contentEditable], [contentEditable=true]")) {
e.preventDefault();
}
});
});
</script> </script>
<script type="text/javascript" src="{{ asset('backend/functions.js') }}"></script> <script type="text/javascript" src="{{ asset('backend/functions.js') }}"></script>
@yield('after-scripts') @yield('after-scripts')