Compare commits

...

1 Commits
main ... v.1.01

Author SHA1 Message Date
abdurahman
9250b863f7 added a way to add an image from a smartphone camera 2023-12-24 10:42:21 +05:00
6 changed files with 1318 additions and 596 deletions

View File

@ -115,6 +115,7 @@ return [
'file_size_limit_help' => 'Enter file size limit in MB', 'file_size_limit_help' => 'Enter file size limit in MB',
'allowed_file' => 'Allowed File Type', 'allowed_file' => 'Allowed File Type',
'specify_file_type' => 'Specify allowed types', 'specify_file_type' => 'Specify allowed types',
'image_file_type' => 'Camera + file',
'all_types' => 'All types', 'all_types' => 'All types',
'add_file_type' => 'Add file types', 'add_file_type' => 'Add file types',
'add_file_type_help_text' => 'Comma separated string of file types.Ex: .jpg, .png, .jpeg', 'add_file_type_help_text' => 'Comma separated string of file types.Ex: .jpg, .png, .jpeg',

View File

@ -115,6 +115,7 @@ return [
'file_size_limit_help' => 'Sisestage faili suuruse piirang megabaitides', 'file_size_limit_help' => 'Sisestage faili suuruse piirang megabaitides',
'allowed_file' => 'Lubatud failitüüp', 'allowed_file' => 'Lubatud failitüüp',
'specify_file_type' => 'Määrake lubatud tüübid', 'specify_file_type' => 'Määrake lubatud tüübid',
'image_file_type' => 'Camera + file',
'all_types' => 'Kõik tüübid', 'all_types' => 'Kõik tüübid',
'add_file_type' => 'Lisa failitüüpe', 'add_file_type' => 'Lisa failitüüpe',
'add_file_type_help_text' => 'Failitüüpide komaga eraldatud string. Näiteks: .jpg, .png, .jpeg', 'add_file_type_help_text' => 'Failitüüpide komaga eraldatud string. Näiteks: .jpg, .png, .jpeg',

View File

@ -115,6 +115,7 @@ return [
'file_size_limit_help' => 'Введите ограничение размера файла в МБ', 'file_size_limit_help' => 'Введите ограничение размера файла в МБ',
'allowed_file' => 'Допустимый тип файла', 'allowed_file' => 'Допустимый тип файла',
'specify_file_type' => 'Укажите разрешенные типы', 'specify_file_type' => 'Укажите разрешенные типы',
'image_file_type' => 'Camera + file',
'all_types' => 'Все типы', 'all_types' => 'Все типы',
'add_file_type' => 'Добавить типы файлов', 'add_file_type' => 'Добавить типы файлов',
'add_file_type_help_text' => 'Строка с разделенными запятыми типами файлов. Например, .jpg, .png, .jpeg', 'add_file_type_help_text' => 'Строка с разделенными запятыми типами файлов. Например, .jpg, .png, .jpeg',

2
package-lock.json generated
View File

@ -1,5 +1,5 @@
{ {
"name": "uniquesoft.es", "name": "Aknaproff1",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {

File diff suppressed because it is too large Load Diff

View File

@ -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 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/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" <script type="text/javascript"
src="//cdnjs.cloudflare.com/ajax/libs/rangeslider.js/2.3.2/rangeslider.min.js?v={{ $asset_version }}"></script> src="//cdnjs.cloudflare.com/ajax/libs/rangeslider.js/2.3.2/rangeslider.min.js?v={{ $asset_version }}"></script>
<script type="text/javascript" <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" <script type="text/javascript"
src="//cdnjs.cloudflare.com/ajax/libs/dropzone/5.5.1/min/dropzone.min.js?v={{ $asset_version }}"></script> src="//cdnjs.cloudflare.com/ajax/libs/dropzone/5.5.1/min/dropzone.min.js?v={{ $asset_version }}"></script>
<script type="text/javascript" <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" <script type="text/javascript"
src="//cdnjs.cloudflare.com/ajax/libs/summernote/0.8.12/summernote-bs4.min.js?v={{ $asset_version }}"></script> 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> type="text/javascript"></script>
<!-- if you need to use a theme, then include the theme Js file --> <!-- if you need to use a theme, then include the theme Js file -->
<script <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 --> <!-- 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> --> <!-- <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)--> <!-- 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> <script src="{{ asset('/plugins/countdowntimer/countdowntimer.min.js') . '?v=' . $asset_version }}"></script>
@if (!$is_download) @if (!$is_download)
<!-- app js values --> <!-- app js values -->
<script type="application/javascript"> <script type="application/javascript">
var APP = {}; var APP = {};
@ -91,20 +95,23 @@
</script> </script>
<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="//cdn.jsdelivr.net/npm/sweetalert2@11?v={{ $asset_version }}"></script>
{{-- <script src="/js/sweetalert2.all.js"></script> --}}
<script type="text/javascript" <script type="text/javascript"
src="//cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/pdfmake.min.js?v={{ $asset_version }}"></script> src="//cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/pdfmake.min.js?v={{ $asset_version }}"></script>
<script type="text/javascript" <script type="text/javascript"
src="//cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/vfs_fonts.js?v={{ $asset_version }}"></script> src="//cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/vfs_fonts.js?v={{ $asset_version }}"></script>
<script type="text/javascript" <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 --> <!-- ladda.js -->
<script type="text/javascript" <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/Ladda/1.0.6/spin.min.js?v={{ $asset_version }}">
src="//cdnjs.cloudflare.com/ajax/libs/Ladda/1.0.6/spin.min.js?v={{$asset_version}}"></script> </script>
<script type="text/javascript" <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/Ladda/1.0.6/ladda.min.js?v={{ $asset_version }}">
src="//cdnjs.cloudflare.com/ajax/libs/Ladda/1.0.6/ladda.min.js?v={{$asset_version}}"></script> </script>
<!-- localization --> <!-- localization -->
<script src="{{ url('/js/lang.js') . '?v=' . $asset_version }}"></script> <script src="{{ url('/js/lang.js') . '?v=' . $asset_version }}"></script>
<script src="{{ asset(mix('js/app.js')) }}" defer></script> <script src="{{ asset(mix('js/app.js')) }}" defer></script>
@ -115,7 +122,6 @@
@endif @endif
<script type="text/javascript"> <script type="text/javascript">
jQuery.validator.setDefaults({ jQuery.validator.setDefaults({
errorPlacement: function(error, element) { errorPlacement: function(error, element) {
if (element.hasClass('select2') && element.parent().hasClass('input-group')) { if (element.hasClass('select2') && element.parent().hasClass('input-group')) {
@ -150,7 +156,8 @@
jQuery.extend($.fn.dataTable.defaults, { jQuery.extend($.fn.dataTable.defaults, {
fixedHeader: false, fixedHeader: false,
aLengthMenu: [ 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, iDisplayLength: 25,
dom: 'lfrtip', dom: 'lfrtip',
@ -180,7 +187,9 @@
}); });
$.ajaxSetup({ $.ajaxSetup({
headers: {'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')} headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
}); });
@endif @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 start = null;
var end = null; var end = null;
var format = ''; var format = '';
@ -254,8 +264,7 @@
$('#' + element_name).rangeslider({ $('#' + element_name).rangeslider({
polyfill: false, polyfill: false,
//Callback function //Callback function
onInit: function () { onInit: function() {},
},
// Callback function // Callback function
onSlide: function(position, value) { onSlide: function(position, value) {
$('.' + element_name).text(value); $('.' + element_name).text(value);
@ -265,7 +274,8 @@
Dropzone.autoDiscover = false; 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"; var file_remove_url = "library/delete_file.php";
if (url == null) { if (url == null) {
@ -286,6 +296,7 @@
maxFilesize: max_file_size, maxFilesize: max_file_size,
dictDefaultMessage: file_upload_msg, dictDefaultMessage: file_upload_msg,
maxFiles: no_of_files_can_be_uploaded, maxFiles: no_of_files_can_be_uploaded,
capture: allowed_file_type == 'image/*' ? 'image/*' : null,
headers: { headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') '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 //function to be use on editing a form, to display existing files
if ($('input#' + element_name).val().length > 0) { if ($('input#' + element_name).val().length > 0) {
window[`${element_name}_myDropzone`] = this; window[`${element_name}_myDropzone`] = this;
var file_obj = {files: $('input#' + element_name).val()}; var file_obj = {
files: $('input#' + element_name).val()
};
$.ajax({ $.ajax({
method: "GET", method: "GET",
url: '/existing-file-display', url: '/existing-file-display',
@ -303,10 +316,17 @@
success: function(result) { success: function(result) {
if (result.success) { if (result.success) {
$.each(result.files, function(key, file) { $.each(result.files, function(key, file) {
var mockFile = {name: file.name, uploaded_as: file.uploaded_as, size: file.size}; var mockFile = {
window[`${element_name}_myDropzone`].emit("addedfile", mockFile); name: file.name,
window[`${element_name}_myDropzone`].emit("thumbnail", mockFile, file.path); uploaded_as: file.uploaded_as,
window[`${element_name}_myDropzone`].emit("complete", mockFile); 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) { this.on("removedfile", function(file) {
$.ajax({ $.ajax({
url: file_remove_url, url: file_remove_url,
data: {"file_name": file.uploaded_as}, data: {
"file_name": file.uploaded_as
},
type: "POST", type: "POST",
success: function(result) { success: function(result) {
if (typeof(result) == 'string') { if (typeof(result) == 'string') {