Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit e17ad8c

Browse files
committed
updates & fixs
- add a solution for mix not picking up the env var in webpack.mix - updated select prev item to now work with blk_slct_all - add some animation to the **no_files** & **file_loader** instead of the dull defaults - update command - update rdme
1 parent c251fdf commit e17ad8c

File tree

5 files changed

+42
-35
lines changed

5 files changed

+42
-35
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ npm install vue dropzone keycode vue-tippy vue2-filters vue-lightbox vuemit
165165
> - duplicate `assets/vendor/MediaManager/js/components/bulma` and rename it to the framework you want ex.`bootstrap`
166166
> - duplicate `assets/vendor/MediaManager/sass/bulma` and rename it to the framework you want ex.`bootstrap`
167167
> - set `MIX_MM_FRAMEWORK` to the framework name ex.`MIX_MM_FRAMEWORK=bootstrap`
168+
> - open `webpack.mix.js` and change `fw` to the framework name ex.`const fw ='bootstrap'`
168169
> - start editing the new files.
169170
> - run `npm run watch` to compile your `js/css` files.
170171
>

src/Commands/MMAppend.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function handle()
5050
$mix_file = base_path('webpack.mix.js');
5151
$search = 'MediaManager';
5252
if (File::exists($mix_file) && !str_contains(File::get($mix_file), $search)) {
53-
$data = "\n// Media-Manager\nmix.sass('resources/assets/vendor/MediaManager/sass/' + process.env.MIX_MM_FRAMEWORK + '/media.scss', 'public/assets/vendor/MediaManager/style.css')\n\t.version();";
53+
$data = "\n// Media-Manager\nconst fw = 'bulma'\nmix.sass('resources/assets/vendor/MediaManager/sass/' + fw + '/media.scss', 'public/assets/vendor/MediaManager/style.css')\n\t.version();";
5454

5555
File::append($mix_file, $data);
5656
$this->comment("['mix.sass(..).version()'] added to [webpack.mix.js]");

src/resources/assets/js/components/bulma/media.vue

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ export default {
6161
createImageThumbnails: false,
6262
parallelUploads: 10,
6363
uploadMultiple: true,
64+
forceFallback: false,
6465
previewsContainer: '#uploadPreview',
6566
processingmultiple() {
6667
$('#uploadProgress').fadeIn()
@@ -634,15 +635,12 @@ export default {
634635
} else {
635636
this.bulkList.splice(this.bulkList.indexOf(file), 1)
636637
637-
// normal single selction behavior
638-
if (!$('#blk_slct_all').hasClass('is-warning')) {
639-
// select prev item
640-
if (this.bulkItemsCount) {
641-
this.selectedFile = this.bulkList[this.bulkItemsCount - 1]
642-
} else {
643-
// clear slection
644-
this.clearSelected()
645-
}
638+
// select prev item
639+
if (this.bulkItemsCount) {
640+
this.selectedFile = this.bulkList[this.bulkItemsCount - 1]
641+
} else {
642+
// clear slection
643+
this.clearSelected()
646644
}
647645
}
648646
},

src/resources/assets/sass/shared-styles.scss

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ $blue_2: #276cda;
139139
#left,
140140
#right {
141141
min-height: 400px;
142-
max-height: 584px;
143142
overflow: scroll;
144143
position: relative;
145144
}
@@ -224,30 +223,39 @@ $blue_2: #276cda;
224223
#file_loader{
225224
position: absolute;
226225
top: 0;
227-
height: 100%;
228226
bottom: 0;
229-
right: 0;
230227
left: 0;
231-
z-index: 9;
228+
right: 0;
232229
background: white;
233-
p {
234-
width: 100%;
235-
position: absolute;
236-
top: 50%;
237-
font-size: 12px;
238-
font-weight: 400;
230+
display: flex;
231+
align-items: center;
232+
justify-content: center;
233+
h3 {
234+
margin-left: 10px;
239235
text-align: center;
240-
.icon {
241-
vertical-align: middle;
242-
}
243236
}
244237
}
245238
#no_files {
246239
display: none;
247-
h3 {
248-
margin-top: 55px;
249-
text-align: center;
250-
color: $gray_6;
240+
position: absolute;
241+
top: 0;
242+
bottom: 0;
243+
left: 0;
244+
right: 0;
245+
background: white;
246+
> div {
247+
width: 100%;
248+
height: 100%;
249+
display: flex;
250+
align-items: center;
251+
justify-content: center;
252+
flex-direction: column;
253+
h3 {
254+
margin-left: 10px;
255+
}
256+
iframe {
257+
width: 5vw;
258+
}
251259
}
252260
}
253261
#right {

src/resources/views/bulma/media.blade.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -283,18 +283,18 @@ class="button"
283283

284284
{{-- loading data from server --}}
285285
<div id="file_loader">
286-
<p>
287-
<span class="control is-loading icon is-medium"></span>
288-
{{ trans('MediaManager::messages.loading') }}
289-
</p>
286+
<div>
287+
<iframe src="https://lottiefiles.com/iframe/61-octopus" frameborder="0" allowfullscreen></iframe>
288+
<h3>{{ trans('MediaManager::messages.loading') }}</h3>
289+
</div>
290290
</div>
291291

292292
{{-- no files --}}
293293
<div id="no_files">
294-
<h3>
295-
<span class="icon"><i class="fa fa-meh-o"></i></span>
296-
<span>{{ trans('MediaManager::messages.no_files_in_folder') }}</span>
297-
</h3>
294+
<div>
295+
<iframe src="https://lottiefiles.com/iframe/335-test" frameborder="0" allowfullscreen></iframe>
296+
<h3>{{ trans('MediaManager::messages.no_files_in_folder') }}</h3>
297+
</div>
298298
</div>
299299
</div>
300300

0 commit comments

Comments
 (0)