Skip to content

Commit

Permalink
update sortby
Browse files Browse the repository at this point in the history
remove sortby name as its the default, and make it desc

...

Update MediaManagerServiceProvider.php

Update MediaController.php
  • Loading branch information
ctf0 committed Jul 26, 2017
1 parent ae8c60f commit 0191df3
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 10 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## Intro

- Inspired by [Voyager](https://github.com/the-control-group/voyager) & [October](https://github.com/octobercms/october)
- Inspired by [Voyager](https://github.com/the-control-group/voyager) & [October](https://github.com/octobercms/october) & [WordPress](https://codex.wordpress.org/Media_Library_Screen)
- Built using
+ [Vue](https://vuejs.org/)
+ [jQuery](https://jquery.com/)
Expand Down Expand Up @@ -59,8 +59,8 @@ npm install vue dropzone keycode vue-tippy vue2-filters vue-lightbox vuemit
+ video
+ text
- sortBy
+ name
+ size "still need some work for (kb vs mb)"
+ name "default"
+ size
+ last modified
- items count for
+ all
Expand Down Expand Up @@ -145,8 +145,8 @@ return [

after you are done, maybe you can send me a PR so everyone else can benefit from it :trophy:


## ToDo "ANY HELP IS DEEPLY APPRECIATED"

* [ ] Add Support To Other Css Frameworks.
* [ ] Add Support For Editors "tinymce / Ckeditor".
* [ ] Add Support For Editors "tinymce / Ckeditor/ etc".
* [ ] Fix `sortBy:size` To Work Properly With (kb vs Mb).
2 changes: 1 addition & 1 deletion src/Controllers/MediaController.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function __construct()
*/
public function index()
{
return view('MediaManager::'.$this->framework.'.media');
return view("MediaManager::{$this->framework}.media");
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/MediaManagerServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function boot()
if (File::exists($mix_file) && !str_contains(File::get($mix_file), $search)) {
$data = "\n// Media-Manager\nmix.js('resources/assets/vendor/MediaManager/js/media.js', 'public/assets/vendor/MediaManager/script.js')\n\t.sass('resources/assets/vendor/MediaManager/sass/' + process.env.MIX_MM_FRAMEWORK + '/media.scss', 'public/assets/vendor/MediaManager/style.css')\n\t.version();";

File::append(base_path('webpack.mix.js'), $data);
File::append($mix_file, $data);
}
}
}
1 change: 0 additions & 1 deletion src/resources/assets/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,6 @@ var manager = new Vue({
if (this.searchFor) {
this.updateSearchCount()
}

},
filterDir(dir) {
// dont show dirs that have similarity with selected item(s)
Expand Down
3 changes: 1 addition & 2 deletions src/resources/views/bulma/media.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ class="button"
<select v-model="showBy">
<option value="null" disabled>Sort By</option>
<option value="clear">Non</option>
<option value="name">Name</option>
<option value="size">Size</option>
<option value="last_modified">Last Modified</option>
</select>
Expand Down Expand Up @@ -226,7 +225,7 @@ class="button"
{{-- files box --}}
<div id="left">
<ul id="files" class="tile">
<li v-for="(file,index) in orderBy(filterBy(allFiles, searchFor, 'name'), showBy)"
<li v-for="(file,index) in orderBy(filterBy(allFiles, searchFor, 'name'), showBy, -1)"
@click="setSelected(file)" @dblclick="openFolder(file)">
<div class="file_link" :class="{'bulk-selected': IsInBulkList(file)}" :data-folder="file.name" :data-index="index">
<div class="link_icon">
Expand Down

0 comments on commit 0191df3

Please sign in to comment.