diff --git a/README.md b/README.md
index 2cb873ea..35259d08 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@
`Package Name: IT`
-`Version: 1.6.37`
+`Version: 1.6.38`
`Offline Docs: 1.1` - [Online Docs](https://it.phpanonymous.com/docs)
diff --git a/composer.json b/composer.json
index 52b88671..afd1ee98 100644
--- a/composer.json
+++ b/composer.json
@@ -22,7 +22,7 @@
},
"extra": {
"branch-alias": {
- "dev-master": "1.6.37.x-dev"
+ "dev-master": "1.6.38.x-dev"
},
"laravel": {
"providers": [
@@ -33,7 +33,7 @@
}
}
},
- "version":"1.6.37",
+ "version":"1.6.38",
"minimum-stability": "dev",
"prefer-stable": true
}
diff --git a/it/environment/resources/views/admin/ajax.blade.php b/it/environment/resources/views/admin/ajax.blade.php
index a2a7d633..41d99a17 100644
--- a/it/environment/resources/views/admin/ajax.blade.php
+++ b/it/environment/resources/views/admin/ajax.blade.php
@@ -71,14 +71,13 @@
@if($selectedvalue > 0)
var selectIDValue = $('#'+selectID+' option:selected').val();
-
$.ajax({
url:'{{ $url }}',
dataType:'html',
type:'post',
data:{
_token:'{{ csrf_token() }}',
- '{{ $selectID }}': '{{ $selectedvalue }}',
+ '{{ $selectID }}': '{{ $parentValue }}',
select:'{{ $selectedvalue }}'
},
beforeSend: function(){
diff --git a/it/environment/resources/views/admin/dropzone.blade.php b/it/environment/resources/views/admin/dropzone.blade.php
index 67774b8c..504a9837 100644
--- a/it/environment/resources/views/admin/dropzone.blade.php
+++ b/it/environment/resources/views/admin/dropzone.blade.php
@@ -124,9 +124,13 @@
var myDropzone{{$dz_param}} = new Dropzone(
"#drop_{{ $dz_param }}",
+
{ // Make the whole body a dropzone
+ timeout: "999999",
url: "{{ aurl($route.'/upload/multi') }}", // Set the url
paramName:"{{ $dz_param }}",
+ // crossDomain: true,
+ // format: "json",
thumbnailWidth: '{{ !empty($thumbnailWidth)?$thumbnailWidth:80 }}',
thumbnailHeight: '{{ !empty($thumbnailHeight)?$thumbnailHeight:80 }}',
parallelUploads: '{{ !empty($parallelUploads)?$parallelUploads:20 }}',
@@ -137,6 +141,11 @@
autoQueue: {{ !empty($autoQueue)?$autoQueue:'false' }} , // Make sure the files aren't queued until manually added
previewsContainer: "#previews_{{ $dz_param }}", // Define the container to display the previews
clickable: ".fileinput-button_{{ $dz_param }}", // Define the element that should be used as click trigger to select files.
+ headers: {
+ 'X-CSRF-TOKEN': '{{ csrf_token() }}',
+ 'X-XSRF-TOKEN': '{{ csrf_token() }}',
+ 'x-csrftoken': '{{ csrf_token() }}',
+ },
@if(!empty($acceptedMimeTypes))
acceptedMimeTypes:"{{ str_replace('|',',',$acceptedMimeTypes) }}",
diff --git a/it/helper/it.php b/it/helper/it.php
index 361a2bf0..57cea5f1 100644
--- a/it/helper/it.php
+++ b/it/helper/it.php
@@ -8,13 +8,13 @@ function disable_folder_list() {
if (!function_exists('getnamespace')) {
function getnamespace($namespaces) {
$namespaces = str_replace('App/Http/Controllers/', '', str_replace('\\', '/', $namespaces));
- $namespaces = app_path('Http/Controllers/' . $namespaces);
- foreach (array_filter(glob($namespaces . '/*'), 'is_dir') as $namespace) {
- $controller_namespace_prefix = str_replace('/', '\\', 'App\\' . explode('app', $namespace)[1]);
+ $namespaces = app_path('Http/Controllers/'.$namespaces);
+ foreach (array_filter(glob($namespaces.'/*'), 'is_dir') as $namespace) {
+ $controller_namespace_prefix = str_replace('/', '\\', 'App\\'.explode('app', $namespace)[1]);
$controller_namespace_prefix = str_replace('\\\\', '\\', $controller_namespace_prefix);
echo getnamespace($namespaces);
echo $namespace;
- echo '';
+ echo '';
}
}
@@ -23,20 +23,20 @@ function getnamespace($namespaces) {
if (!function_exists('get_model_baboon')) {
function get_model_baboon($model_list) {
$model_list = str_replace('App/Http/Controllers/', '', str_replace('\\', '/', $model_list));
- $model_list = app_path('Http/Controllers/' . $model_list);
- foreach (array_filter(glob($model_list . '/*'), 'is_dir') as $namespace) {
- $model_list_files = str_replace('/', '\\', 'App\\' . explode('app', $namespace)[1]);
+ $model_list = app_path('Http/Controllers/'.$model_list);
+ foreach (array_filter(glob($model_list.'/*'), 'is_dir') as $namespace) {
+ $model_list_files = str_replace('/', '\\', 'App\\'.explode('app', $namespace)[1]);
$model_list_files = str_replace('\\\\', '\\', $model_list_files);
echo get_model_baboon($model_list);
echo $namespace;
- echo '';
+ echo '';
}
}
}
if (!function_exists('check_package')) {
function check_package($packageName) {
- $file = base_path('composer.lock');
+ $file = base_path('composer.lock');
$packages = json_decode(file_get_contents($file), true)['packages'];
foreach ($packages as $package) {
if ($package['name'] == $packageName) {
@@ -56,26 +56,26 @@ function it_int() {
if (!function_exists('it_views')) {
// Init & RUN Baboon Module Class
function it_views($view, $data = []) {
- return view('it::' . $view, $data);
+ return view('it::'.$view, $data);
}
}
if (!function_exists('it_version_message')) {
function it_version_message() {
- $version = '[it v ' . it_version() . ']';
+ $version = '[it v '.it_version().']';
app()->singleton('it_version_message', function () use ($version) {
- return $version;
- });
+ return $version;
+ });
return $version;
}
}
if (!function_exists('it_version')) {
function it_version() {
- $version = '1.6.37';
+ $version = '1.6.38';
app()->singleton('it_version', function () use ($version) {
- return $version;
- });
+ return $version;
+ });
return $version;
}
}
@@ -94,13 +94,13 @@ function it_laravelversion() {
if (!function_exists('it_trans')) {
function it_trans($trans, $choose = []) {
- return Lang::get('it::' . $trans, $choose);
+ return Lang::get('it::'.$trans, $choose);
}
}
if (!function_exists('it_des')) {
function it_des($path) {
- return url('it_des/' . $path);
+ return url('it_des/'.$path);
}
}
@@ -108,52 +108,52 @@ function it_des($path) {
function it_permissions($path) {
$perms = fileperms($path);
- switch ($perms & 0xF000) {
- case 0xC000: // socket
- $info = 's';
- break;
- case 0xA000: // symbolic link
- $info = 'l';
- break;
- case 0x8000: // regular
- $info = 'r';
- break;
- case 0x6000: // block special
- $info = 'b';
- break;
- case 0x4000: // directory
- $info = 'd';
- break;
- case 0x2000: // character special
- $info = 'c';
- break;
- case 0x1000: // FIFO pipe
- $info = 'p';
- break;
- default: // unknown
- $info = 'u';
+ switch ($perms&0xF000) {
+ case 0xC000:// socket
+ $info = 's';
+ break;
+ case 0xA000:// symbolic link
+ $info = 'l';
+ break;
+ case 0x8000:// regular
+ $info = 'r';
+ break;
+ case 0x6000:// block special
+ $info = 'b';
+ break;
+ case 0x4000:// directory
+ $info = 'd';
+ break;
+ case 0x2000:// character special
+ $info = 'c';
+ break;
+ case 0x1000:// FIFO pipe
+ $info = 'p';
+ break;
+ default:// unknown
+ $info = 'u';
}
// Owner
- $info .= (($perms & 0x0100) ? 'r' : '-');
- $info .= (($perms & 0x0080) ? 'w' : '-');
- $info .= (($perms & 0x0040) ?
- (($perms & 0x0800) ? 's' : 'x') :
- (($perms & 0x0800) ? 'S' : '-'));
+ $info .= (($perms&0x0100)?'r':'-');
+ $info .= (($perms&0x0080)?'w':'-');
+ $info .= (($perms&0x0040)?
+ (($perms&0x0800)?'s':'x'):
+ (($perms&0x0800)?'S':'-'));
// Group
- $info .= (($perms & 0x0020) ? 'r' : '-');
- $info .= (($perms & 0x0010) ? 'w' : '-');
- $info .= (($perms & 0x0008) ?
- (($perms & 0x0400) ? 's' : 'x') :
- (($perms & 0x0400) ? 'S' : '-'));
+ $info .= (($perms&0x0020)?'r':'-');
+ $info .= (($perms&0x0010)?'w':'-');
+ $info .= (($perms&0x0008)?
+ (($perms&0x0400)?'s':'x'):
+ (($perms&0x0400)?'S':'-'));
// World
- $info .= (($perms & 0x0004) ? 'r' : '-');
- $info .= (($perms & 0x0002) ? 'w' : '-');
- $info .= (($perms & 0x0001) ?
- (($perms & 0x0200) ? 't' : 'x') :
- (($perms & 0x0200) ? 'T' : '-'));
+ $info .= (($perms&0x0004)?'r':'-');
+ $info .= (($perms&0x0002)?'w':'-');
+ $info .= (($perms&0x0001)?
+ (($perms&0x0200)?'t':'x'):
+ (($perms&0x0200)?'T':'-'));
return $info;
}
@@ -164,30 +164,30 @@ function it_permissions($path) {
function it_rule_convention($attribute, $value, $fail) {
$i = explode('.', $attribute)[1];
// Name Column
- $name = '(' . request('col_name')[$i] . ' - ' . request(explode('.', $attribute)[0])[$i] . ')';
+ $name = '('.request('col_name')[$i].' - '.request(explode('.', $attribute)[0])[$i].')';
if (in_array(request('col_type')[$i], ['text', 'number', 'email', 'url', 'textarea', 'textarea_ckeditor', 'file', 'dropzone', 'password', 'date', 'date_time', 'time', 'timestamp', 'color'])) {
- preg_match("/[^A-Za-z0-9'_' ']/", $value) ?
- $fail($name . 'There should not be any signs such as (!@#$%^&*()|><) only numbers and letters')
- : '';
+ preg_match("/[^A-Za-z0-9'_' ']/", $value)?
+ $fail($name.'There should not be any signs such as (!@#$%^&*()|><) only numbers and letters')
+ :'';
} elseif (in_array(request('col_type')[$i], ['checkbox', 'radio'])) {
$secound_value = explode('#', $value);
- !preg_match("/#/i", $value) || empty($secound_value[1]) ?
- $fail($name . ' There should have signs such as (column_name#value)')
- : '';
+ !preg_match("/#/i", $value) || empty($secound_value[1])?
+ $fail($name.' There should have signs such as (column_name#value)')
+ :'';
} elseif (in_array(request('col_type')[$i], ['select'])) {
$secound_value = explode('|', $value);
- !preg_match('/(\d+)\+(\d+)|,/i', $value) || empty($secound_value[1]) ?
- $fail($name . ' There should have signs such as (status|accept,Accept/pending,Pending) or ( user_id|App\Models\User::pluck("name","id") )')
- : '';
+ !preg_match('/(\d+)\+(\d+)|,/i', $value) || empty($secound_value[1])?
+ $fail($name.' There should have signs such as (status|accept,Accept/pending,Pending) or ( user_id|App\Models\User::pluck("name","id") )')
+ :'';
// Scan if have forgin key and exisit pluck model
if (preg_match('/App\\\\/i', request(explode('.', $attribute)[0])[$i])) {
- if (empty(request('references' . $i)) || empty(request('forgin_table_name' . $i))) {
- $fail($name . ' Should be complete Schema Relation add References and Table Name');
+ if (empty(request('references'.$i)) || empty(request('forgin_table_name'.$i))) {
+ $fail($name.' Should be complete Schema Relation add References and Table Name');
} elseif (empty(request('schema_name')) || !in_array($secound_value[0], request('schema_name'))) {
- $fail($name . ' click releations tab and add new relation key ' . $secound_value[0] . ' and choose model from dropdown ');
+ $fail($name.' click releations tab and add new relation key '.$secound_value[0].' and choose model from dropdown ');
}
}
}
@@ -197,7 +197,7 @@ function it_rule_convention($attribute, $value, $fail) {
if (!function_exists('checkIfExisitValue')) {
function checkIfExisitValue($request_name, $value) {
- return !empty(request($request_name)) && in_array($value, request($request_name)) ? true : false;
+ return !empty(request($request_name)) && in_array($value, request($request_name))?true:false;
}
}
if (!function_exists('api_check')) {
@@ -217,6 +217,6 @@ function api_check($name) {
if (!function_exists('faker_locale')) {
function faker_locale($val, $module_data) {
- return !empty($module_data) && !empty($module_data->faker_local) && $module_data->faker_local == $val ? true : false;
+ return !empty($module_data) && !empty($module_data->faker_local) && $module_data->faker_local == $val?true:false;
}
}
\ No newline at end of file
diff --git a/it/patch_update/resources/views/admin/dropzone.blade.baboon b/it/patch_update/resources/views/admin/dropzone.blade.baboon
index 67774b8c..504a9837 100644
--- a/it/patch_update/resources/views/admin/dropzone.blade.baboon
+++ b/it/patch_update/resources/views/admin/dropzone.blade.baboon
@@ -124,9 +124,13 @@ $temp_id = !empty(request('temp_id'))?request('temp_id'):(time()*rand(0000,9999)
var myDropzone{{$dz_param}} = new Dropzone(
"#drop_{{ $dz_param }}",
+
{ // Make the whole body a dropzone
+ timeout: "999999",
url: "{{ aurl($route.'/upload/multi') }}", // Set the url
paramName:"{{ $dz_param }}",
+ // crossDomain: true,
+ // format: "json",
thumbnailWidth: '{{ !empty($thumbnailWidth)?$thumbnailWidth:80 }}',
thumbnailHeight: '{{ !empty($thumbnailHeight)?$thumbnailHeight:80 }}',
parallelUploads: '{{ !empty($parallelUploads)?$parallelUploads:20 }}',
@@ -137,6 +141,11 @@ $temp_id = !empty(request('temp_id'))?request('temp_id'):(time()*rand(0000,9999)
autoQueue: {{ !empty($autoQueue)?$autoQueue:'false' }} , // Make sure the files aren't queued until manually added
previewsContainer: "#previews_{{ $dz_param }}", // Define the container to display the previews
clickable: ".fileinput-button_{{ $dz_param }}", // Define the element that should be used as click trigger to select files.
+ headers: {
+ 'X-CSRF-TOKEN': '{{ csrf_token() }}',
+ 'X-XSRF-TOKEN': '{{ csrf_token() }}',
+ 'x-csrftoken': '{{ csrf_token() }}',
+ },
@if(!empty($acceptedMimeTypes))
acceptedMimeTypes:"{{ str_replace('|',',',$acceptedMimeTypes) }}",