added a way to add an image from a smartphone camera
This commit is contained in:
parent
0de0459ce1
commit
9250b863f7
@ -115,6 +115,7 @@ return [
|
||||
'file_size_limit_help' => 'Enter file size limit in MB',
|
||||
'allowed_file' => 'Allowed File Type',
|
||||
'specify_file_type' => 'Specify allowed types',
|
||||
'image_file_type' => 'Camera + file',
|
||||
'all_types' => 'All types',
|
||||
'add_file_type' => 'Add file types',
|
||||
'add_file_type_help_text' => 'Comma separated string of file types.Ex: .jpg, .png, .jpeg',
|
||||
|
@ -115,6 +115,7 @@ return [
|
||||
'file_size_limit_help' => 'Sisestage faili suuruse piirang megabaitides',
|
||||
'allowed_file' => 'Lubatud failitüüp',
|
||||
'specify_file_type' => 'Määrake lubatud tüübid',
|
||||
'image_file_type' => 'Camera + file',
|
||||
'all_types' => 'Kõik tüübid',
|
||||
'add_file_type' => 'Lisa failitüüpe',
|
||||
'add_file_type_help_text' => 'Failitüüpide komaga eraldatud string. Näiteks: .jpg, .png, .jpeg',
|
||||
|
@ -115,6 +115,7 @@ return [
|
||||
'file_size_limit_help' => 'Введите ограничение размера файла в МБ',
|
||||
'allowed_file' => 'Допустимый тип файла',
|
||||
'specify_file_type' => 'Укажите разрешенные типы',
|
||||
'image_file_type' => 'Camera + file',
|
||||
'all_types' => 'Все типы',
|
||||
'add_file_type' => 'Добавить типы файлов',
|
||||
'add_file_type_help_text' => 'Строка с разделенными запятыми типами файлов. Например, .jpg, .png, .jpeg',
|
||||
|
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "uniquesoft.es",
|
||||
"name": "Aknaproff1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -19,17 +19,20 @@
|
||||
|
||||
<script type="text/javascript" src="//cdn.jsdelivr.net/npm/moment@2.24.0/moment.min.js?v={{ $asset_version }}"></script>
|
||||
<script src="//cdn.jsdelivr.net/npm/toastr@2.1.4/build/toastr.min.js?v={{ $asset_version }}"></script>
|
||||
<script src="//cdn.jsdelivr.net/npm/jquery-validation@1.17.0/dist/jquery.validate.min.js?v={{$asset_version}}"></script>
|
||||
<script src="//cdn.jsdelivr.net/npm/jquery-validation@1.17.0/dist/jquery.validate.min.js?v={{ $asset_version }}">
|
||||
</script>
|
||||
<script type="text/javascript"
|
||||
src="//cdnjs.cloudflare.com/ajax/libs/rangeslider.js/2.3.2/rangeslider.min.js?v={{ $asset_version }}"></script>
|
||||
<script type="text/javascript"
|
||||
src="//cdnjs.cloudflare.com/ajax/libs/tempusdominus-bootstrap-4/5.1.2/js/tempusdominus-bootstrap-4.min.js?v={{$asset_version}}"></script>
|
||||
src="//cdnjs.cloudflare.com/ajax/libs/tempusdominus-bootstrap-4/5.1.2/js/tempusdominus-bootstrap-4.min.js?v={{ $asset_version }}">
|
||||
</script>
|
||||
|
||||
<script type="text/javascript"
|
||||
src="//cdnjs.cloudflare.com/ajax/libs/dropzone/5.5.1/min/dropzone.min.js?v={{ $asset_version }}"></script>
|
||||
|
||||
<script type="text/javascript"
|
||||
src="//cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.13.10/js/bootstrap-select.min.js?v={{$asset_version}}"></script>
|
||||
src="//cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.13.10/js/bootstrap-select.min.js?v={{ $asset_version }}">
|
||||
</script>
|
||||
<script type="text/javascript"
|
||||
src="//cdnjs.cloudflare.com/ajax/libs/summernote/0.8.12/summernote-bs4.min.js?v={{ $asset_version }}"></script>
|
||||
|
||||
@ -39,16 +42,17 @@
|
||||
type="text/javascript"></script>
|
||||
<!-- if you need to use a theme, then include the theme Js file -->
|
||||
<script
|
||||
src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-star-rating/4.0.6/themes/krajee-svg/theme.js?v={{$asset_version}}"></script>
|
||||
src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-star-rating/4.0.6/themes/krajee-svg/theme.js?v={{ $asset_version }}">
|
||||
</script>
|
||||
<!-- optionally if you need translation for your language then include locale file as mentioned below -->
|
||||
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-star-rating/4.0.6/js/locales/<lang>.js"></script> -->
|
||||
<!-- signature pad (https://github.com/szimek/signature_pad)-->
|
||||
<script src="https://cdn.jsdelivr.net/npm/signature_pad@2.3.2/dist/signature_pad.min.js?v={{$asset_version}}"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/signature_pad@2.3.2/dist/signature_pad.min.js?v={{ $asset_version }}">
|
||||
</script>
|
||||
|
||||
<script src="{{ asset('/plugins/countdowntimer/countdowntimer.min.js') . '?v=' . $asset_version }}"></script>
|
||||
|
||||
@if (!$is_download)
|
||||
|
||||
<!-- app js values -->
|
||||
<script type="application/javascript">
|
||||
var APP = {};
|
||||
@ -91,20 +95,23 @@
|
||||
</script>
|
||||
|
||||
<script
|
||||
src="//cdn.jsdelivr.net/npm/jquery-validation-unobtrusive@3.2.10/dist/jquery.validate.unobtrusive.min.js?v={{$asset_version}}"></script>
|
||||
src="//cdn.jsdelivr.net/npm/jquery-validation-unobtrusive@3.2.10/dist/jquery.validate.unobtrusive.min.js?v={{ $asset_version }}">
|
||||
</script>
|
||||
<script src="//cdn.jsdelivr.net/npm/sweetalert2@11?v={{ $asset_version }}"></script>
|
||||
{{-- <script src="/js/sweetalert2.all.js"></script> --}}
|
||||
<script type="text/javascript"
|
||||
src="//cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/pdfmake.min.js?v={{ $asset_version }}"></script>
|
||||
<script type="text/javascript"
|
||||
src="//cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/vfs_fonts.js?v={{ $asset_version }}"></script>
|
||||
<script type="text/javascript"
|
||||
src="//cdn.datatables.net/v/bs4/jszip-2.5.0/dt-1.10.18/b-1.5.6/b-colvis-1.5.6/b-flash-1.5.6/b-html5-1.5.6/b-print-1.5.6/fc-3.3.1/fh-3.1.4/datatables.min.js?v={{$asset_version}}"></script>
|
||||
src="//cdn.datatables.net/v/bs4/jszip-2.5.0/dt-1.10.18/b-1.5.6/b-colvis-1.5.6/b-flash-1.5.6/b-html5-1.5.6/b-print-1.5.6/fc-3.3.1/fh-3.1.4/datatables.min.js?v={{ $asset_version }}">
|
||||
</script>
|
||||
|
||||
<!-- ladda.js -->
|
||||
<script type="text/javascript"
|
||||
src="//cdnjs.cloudflare.com/ajax/libs/Ladda/1.0.6/spin.min.js?v={{$asset_version}}"></script>
|
||||
<script type="text/javascript"
|
||||
src="//cdnjs.cloudflare.com/ajax/libs/Ladda/1.0.6/ladda.min.js?v={{$asset_version}}"></script>
|
||||
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/Ladda/1.0.6/spin.min.js?v={{ $asset_version }}">
|
||||
</script>
|
||||
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/Ladda/1.0.6/ladda.min.js?v={{ $asset_version }}">
|
||||
</script>
|
||||
<!-- localization -->
|
||||
<script src="{{ url('/js/lang.js') . '?v=' . $asset_version }}"></script>
|
||||
<script src="{{ asset(mix('js/app.js')) }}" defer></script>
|
||||
@ -115,7 +122,6 @@
|
||||
@endif
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
jQuery.validator.setDefaults({
|
||||
errorPlacement: function(error, element) {
|
||||
if (element.hasClass('select2') && element.parent().hasClass('input-group')) {
|
||||
@ -150,7 +156,8 @@
|
||||
jQuery.extend($.fn.dataTable.defaults, {
|
||||
fixedHeader: false,
|
||||
aLengthMenu: [
|
||||
[25, 50, 100, 200, 500, 1000, -1], [25, 50, 100, 200, 500, 1000, "{{__('messages.all')}}"]
|
||||
[25, 50, 100, 200, 500, 1000, -1],
|
||||
[25, 50, 100, 200, 500, 1000, "{{ __('messages.all') }}"]
|
||||
],
|
||||
iDisplayLength: 25,
|
||||
dom: 'lfrtip',
|
||||
@ -180,7 +187,9 @@
|
||||
});
|
||||
|
||||
$.ajaxSetup({
|
||||
headers: {'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')}
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
}
|
||||
});
|
||||
@endif
|
||||
|
||||
@ -190,7 +199,8 @@
|
||||
});
|
||||
});
|
||||
|
||||
function initialize_datetimepicker(element_name, element_date, start_date, end_date, date_format, time_format, disabled_days, enable_time_picker, time_picker_inline) {
|
||||
function initialize_datetimepicker(element_name, element_date, start_date, end_date, date_format, time_format,
|
||||
disabled_days, enable_time_picker, time_picker_inline) {
|
||||
var start = null;
|
||||
var end = null;
|
||||
var format = '';
|
||||
@ -254,8 +264,7 @@
|
||||
$('#' + element_name).rangeslider({
|
||||
polyfill: false,
|
||||
//Callback function
|
||||
onInit: function () {
|
||||
},
|
||||
onInit: function() {},
|
||||
// Callback function
|
||||
onSlide: function(position, value) {
|
||||
$('.' + element_name).text(value);
|
||||
@ -265,7 +274,8 @@
|
||||
|
||||
Dropzone.autoDiscover = false;
|
||||
|
||||
function initialize_dropzone(element_name, file_upload_msg, no_of_files_can_be_uploaded, max_file_size, allowed_file_type, url = null) {
|
||||
function initialize_dropzone(element_name, file_upload_msg, no_of_files_can_be_uploaded, max_file_size,
|
||||
allowed_file_type, url = null) {
|
||||
|
||||
var file_remove_url = "library/delete_file.php";
|
||||
if (url == null) {
|
||||
@ -286,6 +296,7 @@
|
||||
maxFilesize: max_file_size,
|
||||
dictDefaultMessage: file_upload_msg,
|
||||
maxFiles: no_of_files_can_be_uploaded,
|
||||
capture: allowed_file_type == 'image/*' ? 'image/*' : null,
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
},
|
||||
@ -294,7 +305,9 @@
|
||||
//function to be use on editing a form, to display existing files
|
||||
if ($('input#' + element_name).val().length > 0) {
|
||||
window[`${element_name}_myDropzone`] = this;
|
||||
var file_obj = {files: $('input#' + element_name).val()};
|
||||
var file_obj = {
|
||||
files: $('input#' + element_name).val()
|
||||
};
|
||||
$.ajax({
|
||||
method: "GET",
|
||||
url: '/existing-file-display',
|
||||
@ -303,10 +316,17 @@
|
||||
success: function(result) {
|
||||
if (result.success) {
|
||||
$.each(result.files, function(key, file) {
|
||||
var mockFile = {name: file.name, uploaded_as: file.uploaded_as, size: file.size};
|
||||
window[`${element_name}_myDropzone`].emit("addedfile", mockFile);
|
||||
window[`${element_name}_myDropzone`].emit("thumbnail", mockFile, file.path);
|
||||
window[`${element_name}_myDropzone`].emit("complete", mockFile);
|
||||
var mockFile = {
|
||||
name: file.name,
|
||||
uploaded_as: file.uploaded_as,
|
||||
size: file.size
|
||||
};
|
||||
window[`${element_name}_myDropzone`].emit(
|
||||
"addedfile", mockFile);
|
||||
window[`${element_name}_myDropzone`].emit(
|
||||
"thumbnail", mockFile, file.path);
|
||||
window[`${element_name}_myDropzone`].emit(
|
||||
"complete", mockFile);
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -317,7 +337,9 @@
|
||||
this.on("removedfile", function(file) {
|
||||
$.ajax({
|
||||
url: file_remove_url,
|
||||
data: {"file_name": file.uploaded_as},
|
||||
data: {
|
||||
"file_name": file.uploaded_as
|
||||
},
|
||||
type: "POST",
|
||||
success: function(result) {
|
||||
if (typeof(result) == 'string') {
|
||||
|
Loading…
Reference in New Issue
Block a user