Merge branch 'master' into master
This commit is contained in:
commit
a47ec436ae
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
**BUGS:**
|
||||
|
||||
To encourage active collaboration, Bagisto encourages pull requests, not just bug reports. "Bug reports" may also be sent in the form of a pull request containing negative test.
|
||||
To encourage active collaboration, Bagisto encourages pull requests, not just bug reports. "Bug reports" may also be sent in the form of a pull request containing a negative test.
|
||||
|
||||
However, when filing a bug report, your issue should contain a title and a clear description of the issue. You should also include as much relevant information as possible and a code sample that demonstrates the issue. The goal of a bug report is to make it easy for yourself - and others - to replicate the bug and develop a fix.
|
||||
|
||||
|
|
@ -40,7 +40,7 @@ If you are submitting a change that will affect a compiled file, such as most of
|
|||
|
||||
**Code style:**
|
||||
|
||||
Bagisto follow PSR-2 for coding standard and PSR-4 as of Laravel for autoloading standards.
|
||||
Bagisto follows PSR-2 for coding standard and PSR-4 as of Laravel for autoloading standards.
|
||||
|
||||
**PHPDoc:**
|
||||
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@
|
|||
|
||||
## Hactoberfest Rules
|
||||
- On 4 successful PR merges, Bagisto will provide a T-Shirt, Stickers, Notebook, Pen, and Bagisto Elephant.
|
||||
- We have added 'Hactoberfest' label to the issues with the difficulty level label.
|
||||
- Although we have added 'hactoberfest' topic in our repo, we will consider only PRs whose issue is labeled with 'Hactoberfest'. Below is the link,
|
||||
- We have added the 'Hactoberfest' label to the issues with the difficulty level label.
|
||||
- Although we have added the 'hactoberfest' topic in our repo, we will consider only PRs whose issue is labeled with 'Hactoberfest'. Below is the link,
|
||||
- [Hacktoberfest Labelled Issues](https://github.com/bagisto/bagisto/issues?q=is%3Aopen+is%3Aissue+label%3AHacktoberfest)
|
||||
|
||||
## Topics
|
||||
|
|
@ -86,7 +86,7 @@ Take advantage of two of the hottest frameworks used in this project -- Laravel
|
|||
|
||||
[Download the latest release](https://github.com/bagisto/bagisto/releases/latest)
|
||||
|
||||
##### b. Extract the contents of zip and execute the project in your browser:
|
||||
##### b. Extract the contents of the zip and execute the project in your browser:
|
||||
|
||||
~~~
|
||||
http(s)://example.com
|
||||
|
|
|
|||
|
|
@ -353,7 +353,6 @@ return [
|
|||
'Image' => Intervention\Image\Facades\Image::class,
|
||||
'PDF' => Barryvdh\DomPDF\Facade::class,
|
||||
'ProductImage' => Webkul\Product\Facades\ProductImage::class,
|
||||
'ProductGrid' => Webkul\Ui\DataGrid\Facades\ProductGrid::class,
|
||||
'ProductVideo' => Webkul\Product\Facades\ProductVideo::class,
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -275,16 +275,12 @@
|
|||
|
||||
renderDropdown: function () {
|
||||
return '<div class="uv-dropdown-list uv-bottom-left" style="display: block;"><ul></ul></div>';
|
||||
return '<ul class="rte-autocomplete dropdown-menu"><li class="loading"></li></ul>';
|
||||
},
|
||||
|
||||
render: function (item) {
|
||||
return `
|
||||
<li><a href="javascript:;"><span>${item[this.options.queryBy]}</span></a></li>
|
||||
`;
|
||||
return '<li>' +
|
||||
'<a href="javascript:;"><span>' + item[this.options.queryBy] + '</span></a>' +
|
||||
'</li>';
|
||||
},
|
||||
|
||||
autoCompleteClick: function (e) {
|
||||
|
|
@ -411,4 +407,4 @@
|
|||
|
||||
tinymce.PluginManager.add('mention', tinymce.plugins.Mention);
|
||||
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -75,7 +75,11 @@ class Install extends Command
|
|||
|
||||
// removing the installer directory
|
||||
if (is_dir('public/installer')) {
|
||||
shell_exec('rm -rf public/installer');
|
||||
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
|
||||
shell_exec('rmdir /s/q public\\installer');
|
||||
} else {
|
||||
shell_exec('rm -rf public/installer');
|
||||
}
|
||||
}
|
||||
|
||||
// final information
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import $ from 'jquery';
|
||||
import Vue from 'vue';
|
||||
import VeeValidate, { Validator } from 'vee-validate';
|
||||
import VeeValidate from 'vee-validate';
|
||||
import de from 'vee-validate/dist/locale/de';
|
||||
import ar from 'vee-validate/dist/locale/ar';
|
||||
import fa from 'vee-validate/dist/locale/fa';
|
||||
|
|
@ -141,4 +141,4 @@ $(document).ready(function () {
|
|||
});
|
||||
|
||||
window.app = app;
|
||||
});
|
||||
});
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -6,6 +6,7 @@ use Illuminate\Support\Str;
|
|||
use Webkul\Core\Traits\Sanitizer;
|
||||
use Webkul\Velocity\Helpers\Helper;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Support\Facades\File;
|
||||
use Webkul\Velocity\Repositories\VelocityMetadataRepository;
|
||||
|
||||
class ConfigurationController extends Controller
|
||||
|
|
@ -142,13 +143,12 @@ class ConfigurationController extends Controller
|
|||
public function uploadAdvertisementImages($data, $index, $advertisement)
|
||||
{
|
||||
$saveImage = [];
|
||||
$dir = 'velocity/images';
|
||||
|
||||
$saveData = $advertisement;
|
||||
|
||||
foreach ($data as $imageId => $image) {
|
||||
if ($image != "") {
|
||||
$file = 'images.' . $index . '.' . $imageId;
|
||||
$dir = 'velocity/images';
|
||||
|
||||
if (Str::contains($imageId, 'image_')) {
|
||||
if (request()->hasFile($file) && $image) {
|
||||
|
|
@ -177,9 +177,9 @@ class ConfigurationController extends Controller
|
|||
}
|
||||
}
|
||||
} else {
|
||||
if ($saveData) {
|
||||
$subIndex = substr($imageId, -1);
|
||||
$subIndex = substr($imageId, -1);
|
||||
|
||||
if ($saveData) {
|
||||
if (isset($advertisement[$index][$subIndex])) {
|
||||
$saveImage[$subIndex] = $advertisement[$index][$subIndex];
|
||||
|
||||
|
|
@ -189,6 +189,85 @@ class ConfigurationController extends Controller
|
|||
unset($advertisement[$index][$subIndex]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (! isset($advertisement[$index][$subIndex])) {
|
||||
if ( $index == 4 ) {
|
||||
switch ($subIndex) {
|
||||
case '1':
|
||||
$copyAdImage = $this->copyAdvertiseImages(public_path('/themes/velocity/assets/images/big-sale-banner.webp'), $dir);
|
||||
if ( $copyAdImage ) {
|
||||
$saveImage[$subIndex] = $copyAdImage;
|
||||
}
|
||||
break;
|
||||
case '2':
|
||||
$copyAdImage = $this->copyAdvertiseImages(public_path('/themes/velocity/assets/images/seasons.webp'), $dir);
|
||||
if ( $copyAdImage ) {
|
||||
$saveImage[$subIndex] = $copyAdImage;
|
||||
}
|
||||
break;
|
||||
case '3':
|
||||
$copyAdImage = $this->copyAdvertiseImages(public_path('/themes/velocity/assets/images/deals.webp'), $dir);
|
||||
if ( $copyAdImage ) {
|
||||
$saveImage[$subIndex] = $copyAdImage;
|
||||
}
|
||||
break;
|
||||
case '4':
|
||||
$copyAdImage = $this->copyAdvertiseImages(public_path('/themes/velocity/assets/images/kids.webp'), $dir);
|
||||
if ( $copyAdImage ) {
|
||||
$saveImage[$subIndex] = $copyAdImage;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
break;
|
||||
}
|
||||
} elseif ( $index == 3 ) {
|
||||
switch ($subIndex) {
|
||||
case '1':
|
||||
$copyAdImage = $this->copyAdvertiseImages(public_path('/themes/velocity/assets/images/headphones.webp'), $dir);
|
||||
if ( $copyAdImage ) {
|
||||
$saveImage[$subIndex] = $copyAdImage;
|
||||
}
|
||||
break;
|
||||
case '2':
|
||||
$copyAdImage = $this->copyAdvertiseImages(public_path('/themes/velocity/assets/images/watch.webp'), $dir);
|
||||
if ( $copyAdImage ) {
|
||||
$saveImage[$subIndex] = $copyAdImage;
|
||||
}
|
||||
break;
|
||||
case '3':
|
||||
$copyAdImage = $this->copyAdvertiseImages(public_path('/themes/velocity/assets/images/kids-2.webp'), $dir);
|
||||
if ( $copyAdImage ) {
|
||||
$saveImage[$subIndex] = $copyAdImage;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
break;
|
||||
}
|
||||
} elseif ( $index == 2 ) {
|
||||
switch ($subIndex) {
|
||||
case '1':
|
||||
$copyAdImage = $this->copyAdvertiseImages(public_path('/themes/velocity/assets/images/toster.webp'), $dir);
|
||||
if ( $copyAdImage ) {
|
||||
$saveImage[$subIndex] = $copyAdImage;
|
||||
}
|
||||
break;
|
||||
case '2':
|
||||
$copyAdImage = $this->copyAdvertiseImages(public_path('/themes/velocity/assets/images/trimmer.webp'), $dir);
|
||||
if ( $copyAdImage ) {
|
||||
$saveImage[$subIndex] = $copyAdImage;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -202,6 +281,29 @@ class ConfigurationController extends Controller
|
|||
return $saveImage;
|
||||
}
|
||||
|
||||
/**
|
||||
* Copy the default adversise images
|
||||
*
|
||||
* @param string $resourceImagePath
|
||||
* @param string $copiedPath
|
||||
* @return mixed
|
||||
*/
|
||||
private function copyAdvertiseImages($resourceImagePath, $copiedPath)
|
||||
{
|
||||
$result = null;
|
||||
$path = explode("/", $resourceImagePath);
|
||||
|
||||
$image = $copiedPath . '/' . end($path);
|
||||
|
||||
Storage::makeDirectory($copiedPath);
|
||||
|
||||
if ( File::copy($resourceImagePath, storage_path('app/public/' . $image)) ) {
|
||||
$result = $image;
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Manage add images.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ window.onload = function() {
|
|||
|
||||
var welcome = document.getElementById('welcome');
|
||||
var requirement = document.getElementById('requirement');
|
||||
var permission = document.getElementById('permission');
|
||||
var environment = document.getElementById('environment');
|
||||
var migration = document.getElementById('migration');
|
||||
var admin = document.getElementById('admin');
|
||||
|
|
@ -83,4 +82,4 @@ window.onload = function() {
|
|||
location.reload();
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue