From 4016ed4a80d7fed2ba44f37146c9fc6a68bdbc48 Mon Sep 17 00:00:00 2001 From: Muah <muah003@gmail.com> Date: Thu, 26 Oct 2017 14:33:10 +0200 Subject: [PATCH] update view rdme cleanup view names, add modal partial v2.0.1 --- README.md | 4 ++-- logs/v2.0.0.txt | 12 ----------- logs/v2.0.1.txt | 7 +++++++ src/Controllers/MediaController.php | 3 +-- src/resources/assets/sass/shared/animate.scss | 2 +- ...{_partial.blade.php => _manager.blade.php} | 20 +++++++++---------- src/resources/views/_modal.blade.php | 10 ++++++++++ ...{media-bulma.blade.php => media.blade.php} | 9 +++++++-- 8 files changed, 38 insertions(+), 29 deletions(-) delete mode 100644 logs/v2.0.0.txt create mode 100644 logs/v2.0.1.txt rename src/resources/views/{_partial.blade.php => _manager.blade.php} (97%) create mode 100644 src/resources/views/_modal.blade.php rename src/resources/views/{media-bulma.blade.php => media.blade.php} (74%) diff --git a/README.md b/README.md index 36963e3..b008630 100644 --- a/README.md +++ b/README.md @@ -183,14 +183,14 @@ npm install vue dropzone keycode vue-tippy vue2-filters vuemit vue-notif --save > ***Or Use another Framework*** > -> - duplicate `views/vendor/MediaManager/media-bulma` and rename it to the framework you want ex.`media-bootstrap` +> - edit `views/vendor/MediaManager` files. > - duplicate `assets/vendor/MediaManager/js/components/media-bulma.vue` and rename it to the framework you want ex.`media-bootstrap.vue` > - duplicate `assets/vendor/MediaManager/sass/media-bulma.scss` and rename it to the framework you want ex.`media-bootstrap.scss` > - set `MIX_MM_FRAMEWORK` to the framework name ex.`MIX_MM_FRAMEWORK=bootstrap` > - start editing the new files. - add this one liner to your main js file and run `npm run watch` to compile your `js/css` files. - + if you are having issues with `npm run production`, [Check](https://ctf0.wordpress.com/2017/09/12/laravel-mix-es6/) + + if you are having issues [Check](https://ctf0.wordpress.com/2017/09/12/laravel-mix-es6/) ```js // ex. "resources/assets/js/app.js" diff --git a/logs/v2.0.0.txt b/logs/v2.0.0.txt deleted file mode 100644 index 2d71047..0000000 --- a/logs/v2.0.0.txt +++ /dev/null @@ -1,12 +0,0 @@ -- use manager from modal “check wiki” -- you can now download all selected files, thanx to https://github.com/PixelsCommander/Download-File-JS -- now the manager will have its own script file so you only load it when needed instead of merging it with your main script, better loading time for users. -- fix pattern for names with `()` -- fix file names cleanup not working properly -- change config sanitized text to `uniqid()` instead for better ux -- add new “folder restriction” feature “check wiki” -- changed js structure instead of the bazillion folders everywhere -- fix move btn not updating correctly on first load -- remove event listener on destroy -- update assets -- update read me \ No newline at end of file diff --git a/logs/v2.0.1.txt b/logs/v2.0.1.txt new file mode 100644 index 0000000..372628d --- /dev/null +++ b/logs/v2.0.1.txt @@ -0,0 +1,7 @@ +- add `_modal` partial +- renamed `_partial` to `_manager` +- renamed `media-bulma` to `media` +- updated `media` view with the correct html headers +- renamed `animated` to `mm-animated` to avoid conflict with container page `animated` +- update wiki +- update readme \ No newline at end of file diff --git a/src/Controllers/MediaController.php b/src/Controllers/MediaController.php index 0039877..d9f13b2 100755 --- a/src/Controllers/MediaController.php +++ b/src/Controllers/MediaController.php @@ -30,7 +30,6 @@ public function __construct() $this->sanitizedText = config('mediaManager.sanitized_text'); $this->unallowed_mimes = config('mediaManager.unallowed_mimes'); $this->LMF = config('mediaManager.last_modified_format'); - $this->fw = config('mediaManager.framework'); } /** @@ -40,7 +39,7 @@ public function __construct() */ public function index() { - return view("MediaManager::media-{$this->fw}"); + return view('MediaManager::media'); } /** diff --git a/src/resources/assets/sass/shared/animate.scss b/src/resources/assets/sass/shared/animate.scss index b56b9f7..f4c0759 100644 --- a/src/resources/assets/sass/shared/animate.scss +++ b/src/resources/assets/sass/shared/animate.scss @@ -1,4 +1,4 @@ -.animated { +.mm-animated { animation-duration: 600ms; animation-timing-function: cubic-bezier(1, 0, 0, 1); animation-fill-mode: both; diff --git a/src/resources/views/_partial.blade.php b/src/resources/views/_manager.blade.php similarity index 97% rename from src/resources/views/_partial.blade.php rename to src/resources/views/_manager.blade.php index ef98c8b..cd43104 100644 --- a/src/resources/views/_partial.blade.php +++ b/src/resources/views/_manager.blade.php @@ -329,9 +329,9 @@ class="button" <template v-if="selectedFile"> <div class="detail_img"> <template v-if="selectedFileIs('image')"> - <div class="modal animated fadeIn mm-modal" id="img_modal"> + <div class="modal mm-animated fadeIn mm-modal" id="img_modal"> <div class="modal-background pointer" @click="toggleModal()"></div> - <div class="modal-content animated fadeInDown"> + <div class="modal-content mm-animated fadeInDown"> <p class="image"> <img :src="selectedFile.path"> </p> @@ -406,10 +406,10 @@ class="button" {{-- ====================================================================== --}} {{-- modals --}} - <div class="modal animated fadeIn mm-modal" id="new_folder_modal"> + <div class="modal mm-animated fadeIn mm-modal" id="new_folder_modal"> {{ Form::open(['route' => 'media.new_folder', '@submit.prevent'=>'NewFolderForm($event)']) }} <div class="modal-background pointer" @click="toggleModal()"></div> - <div class="modal-card animated fadeInDown"> + <div class="modal-card mm-animated fadeInDown"> <header class="modal-card-head is-link"> <p class="modal-card-title"> <span class="icon"><i class="fa fa-folder"></i></span> @@ -434,10 +434,10 @@ class="button" {{ Form::close() }} </div> - <div class="modal animated fadeIn mm-modal" id="rename_file_modal"> + <div class="modal mm-animated fadeIn mm-modal" id="rename_file_modal"> {{ Form::open(['route' => 'media.rename_file', '@submit.prevent'=>'RenameFileForm($event)']) }} <div class="modal-background pointer" @click="toggleModal()"></div> - <div class="modal-card animated fadeInDown"> + <div class="modal-card mm-animated fadeInDown"> <header class="modal-card-head is-warning"> <p class="modal-card-title"> <span class="icon"><i class="fa fa-i-cursor"></i></span> @@ -464,10 +464,10 @@ class="button" {{ Form::close() }} </div> - <div class="modal animated fadeIn mm-modal" id="move_file_modal"> + <div class="modal mm-animated fadeIn mm-modal" id="move_file_modal"> {{ Form::open(['route' => 'media.move_file', '@submit.prevent'=>'MoveFileForm($event)']) }} <div class="modal-background pointer" @click="toggleModal()"></div> - <div class="modal-card animated fadeInDown"> + <div class="modal-card mm-animated fadeInDown"> <header class="modal-card-head is-warning"> <p class="modal-card-title"> <span class="icon"><i class="fa fa-share"></i></span> @@ -505,10 +505,10 @@ class="button" {{ Form::close() }} </div> - <div class="modal animated fadeIn mm-modal" id="confirm_delete_modal"> + <div class="modal mm-animated fadeIn mm-modal" id="confirm_delete_modal"> {{ Form::open(['route' => 'media.delete_file', '@submit.prevent'=>'DeleteFileForm($event)']) }} <div class="modal-background pointer" @click="toggleModal()"></div> - <div class="modal-card animated fadeInDown"> + <div class="modal-card mm-animated fadeInDown"> <header class="modal-card-head is-danger"> <p class="modal-card-title"> <span class="icon"><i class="fa fa-warning"></i></span> diff --git a/src/resources/views/_modal.blade.php b/src/resources/views/_modal.blade.php new file mode 100644 index 0000000..f2291d7 --- /dev/null +++ b/src/resources/views/_modal.blade.php @@ -0,0 +1,10 @@ +{{-- manager --}} +<div class="modal mm-animated fadeIn is-active" v-if="showModal"> + <div class="modal-background" @click="toggleModal()"></div> + <div class="modal-content mm-animated fadeInDown" style="width: 70%;"> + <div class="box"> + @include('MediaManager::_manager') + </div> + </div> + <button class="modal-close is-large" @click="toggleModal()"></button> +</div> diff --git a/src/resources/views/media-bulma.blade.php b/src/resources/views/media.blade.php similarity index 74% rename from src/resources/views/media-bulma.blade.php rename to src/resources/views/media.blade.php index 2e53499..45b0f77 100755 --- a/src/resources/views/media-bulma.blade.php +++ b/src/resources/views/media.blade.php @@ -1,8 +1,13 @@ <!DOCTYPE html> <html> <head> + <meta charset="utf-8"> + <meta http-equiv="x-ua-compatible" content="ie=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <meta name="csrf-token" content="{{ csrf_token() }}"> <title>Media Manager</title> - {{-- bulma --}} + + {{-- Styles --}} <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/bulma/0.6.0/css/bulma.min.css"> </head> <body> @@ -17,7 +22,7 @@ <div class="columns"> {{-- media manager --}} <div class="column"> - @include('MediaManager::_partial') + @include('MediaManager::_manager') </div> </div> </div>