comm.blade.php
2.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
{{--update by Richer 于 2022年3月8日14:10:31--}}
{{--inline edit popover--}}
<span class="ie-wrap">
<a
href="javascript:void(0);"
class="{{ $trigger }}"
data-toggle="popover"
data-target="{{ $target }}"
data-value="{{ $value }}"
data-original="{{ $value }}"
data-key="{{ $key }}"
data-name="{{ $name }}"
>
<span class="ie-display">
{{ $display }}
</span>
{{--<span class="ie-display">
@php
$displays = explode(';', $display);
@endphp
@foreach($displays as $vo)
<span class="label label-success" style="white-space:nowrap;">{{$vo}}</span>
@endforeach
</span>--}}
<i class="fa fa-edit btn-sm btn-primary">编辑</i>
{{--<i class="fa fa-edit" style="visibility: hidden;"></i>--}}
</a>
</span>
<template>
<template id="{{ $target }}">
<div class="ie-content ie-content-{{ $name }}">
<div class="ie-container">
@yield('field')
<div class="error"></div>
</div>
<div class="ie-action">
<button class="btn btn-primary btn-sm ie-submit">{{ __('admin.submit') }}</button>
<button class="btn btn-default btn-sm ie-cancel">{{ __('admin.cancel') }}</button>
</div>
</div>
</template>
</template>
<style>
.ie-wrap>a {
padding: 3px;
border-radius: 3px;
color:#777;
}
.ie-wrap>a:hover {
text-decoration: none;
background-color: #ddd;
color:#777;
}
.ie-wrap>a:hover i {
visibility: visible !important;
}
.ie-action button {
margin: 10px 0 10px 10px;
float: right;
}
.ie-container {
width: 250px;
position: relative;
}
.ie-container .error {
color: #dd4b39;
font-weight: 700;
}
</style>
<script>
$(document).on('click', '.ie-action .ie-cancel', function () {
$('[data-toggle="popover"]').popover('hide');
});
$('body').on('click', function (e) {
if ($(e.target).data('toggle') !== 'popover'
&& $(e.target).parents('[data-toggle="popover"]').length === 0
&& $(e.target).parents('.popover.in').length === 0) {
$('[data-toggle="popover"]').popover('hide');
}
});
</script>
@yield('assert')