mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 06:04:30 -04:00
Added Quill to email signature
This commit is contained in:
parent
e18ae1aac0
commit
0953fbe7cd
@ -1,5 +1,12 @@
|
|||||||
@extends('header')
|
@extends('header')
|
||||||
|
|
||||||
|
@section('head')
|
||||||
|
@parent
|
||||||
|
|
||||||
|
<link href="{{ asset('css/quill.snow.css') }}" rel="stylesheet" type="text/css"/>
|
||||||
|
<script src="{{ asset('js/quill.min.js') }}" type="text/javascript"></script>
|
||||||
|
@stop
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
@parent
|
@parent
|
||||||
|
|
||||||
@ -33,7 +40,6 @@
|
|||||||
{!! Former::text('vat_number') !!}
|
{!! Former::text('vat_number') !!}
|
||||||
{!! Former::text('work_email') !!}
|
{!! Former::text('work_email') !!}
|
||||||
{!! Former::text('work_phone') !!}
|
{!! Former::text('work_phone') !!}
|
||||||
{!! Former::textarea('email_footer')->label(trans('texts.signature'))->rows(4) !!}
|
|
||||||
{!! Former::file('logo')->max(2, 'MB')->accept('image')->inlineHelp(trans('texts.logo_help')) !!}
|
{!! Former::file('logo')->max(2, 'MB')->accept('image')->inlineHelp(trans('texts.logo_help')) !!}
|
||||||
|
|
||||||
|
|
||||||
@ -46,6 +52,7 @@
|
|||||||
|
|
||||||
{!! Former::select('size_id')->addOption('','')->fromQuery($sizes, 'name', 'id') !!}
|
{!! Former::select('size_id')->addOption('','')->fromQuery($sizes, 'name', 'id') !!}
|
||||||
{!! Former::select('industry_id')->addOption('','')->fromQuery($industries, 'name', 'id') !!}
|
{!! Former::select('industry_id')->addOption('','')->fromQuery($industries, 'name', 'id') !!}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -65,6 +72,21 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="panel panel-default">
|
||||||
|
<div class="panel-heading">
|
||||||
|
<h3 class="panel-title">{!! trans('texts.signature') !!}</h3>
|
||||||
|
</div>
|
||||||
|
<div class="panel-body">
|
||||||
|
|
||||||
|
<div class="col-md-10 col-md-offset-1">
|
||||||
|
{!! Former::textarea('email_footer')->style('display:none')->raw() !!}
|
||||||
|
<div id="signatureEditor" class="form-control" style="min-height:160px" onclick="focusEditor()"></div>
|
||||||
|
@include('partials/quill_toolbar', ['name' => 'signature'])
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@ -82,9 +104,31 @@
|
|||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
var editor = false;
|
||||||
$(function() {
|
$(function() {
|
||||||
$('#country_id').combobox();
|
$('#country_id').combobox();
|
||||||
|
|
||||||
|
editor = new Quill('#signatureEditor', {
|
||||||
|
modules: {
|
||||||
|
'toolbar': { container: '#signatureToolbar' },
|
||||||
|
'link-tooltip': true
|
||||||
|
},
|
||||||
|
theme: 'snow'
|
||||||
});
|
});
|
||||||
|
editor.setHTML($('#email_footer').val());
|
||||||
|
editor.on('text-change', function(delta, source) {
|
||||||
|
if (source == 'api') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var html = editor.getHTML();
|
||||||
|
$('#email_footer').val(html);
|
||||||
|
NINJA.formIsChanged = true;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
function focusEditor() {
|
||||||
|
editor.focus();
|
||||||
|
}
|
||||||
|
|
||||||
function deleteLogo() {
|
function deleteLogo() {
|
||||||
if (confirm("{!! trans('texts.are_you_sure') !!}")) {
|
if (confirm("{!! trans('texts.are_you_sure') !!}")) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<div role="tabpanel" class="tab-pane {{ isset($active) && $active ? 'active' : '' }}" id="{{ $field }}">
|
<div role="tabpanel" class="tab-pane {{ isset($active) && $active ? 'active' : '' }}" id="{{ $field }}">
|
||||||
<div class="panel-body">
|
<div class="panel-body" style="padding-bottom: 0px">
|
||||||
@if (isset($isReminder) && $isReminder)
|
@if (isset($isReminder) && $isReminder)
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
@ -65,6 +65,7 @@
|
|||||||
var html = editors['{{ $field }}'].getHTML();
|
var html = editors['{{ $field }}'].getHTML();
|
||||||
$('#email_template_{{ $field }}').val(html);
|
$('#email_template_{{ $field }}').val(html);
|
||||||
refreshPreview();
|
refreshPreview();
|
||||||
|
NINJA.formIsChanged = true;
|
||||||
});
|
});
|
||||||
editors['{{ $field }}'] = editor;
|
editors['{{ $field }}'] = editor;
|
||||||
});
|
});
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
<div class="quill-wrapper">
|
|
||||||
<div id="toolbar-toolbar" class="toolbar ql-toolbar ql-snow">
|
<div id="toolbar-toolbar" class="toolbar ql-toolbar ql-snow">
|
||||||
<div id="{{ $field }}Toolbar" class="toolbar" style="padding-left: 0px">
|
<div id="{{ $name }}Toolbar" class="toolbar" style="padding-left: 0px">
|
||||||
<span class="ql-format-group">
|
<span class="ql-format-group">
|
||||||
<select title="Font" class="ql-font">
|
<select title="Font" class="ql-font">
|
||||||
<option value="sans-serif" selected="">Sans Serif</option>
|
<option value="sans-serif" selected="">Sans Serif</option>
|
||||||
@ -117,4 +116,3 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
Loading…
x
Reference in New Issue
Block a user