ctf0 / Laravel-Media-Manager

A "Vuejs & Laravel" Media Manager With Tons of Features
MIT License
829 stars 179 forks source link

Use the Manager from a Modal #67

Closed BechirAhmed closed 5 years ago

BechirAhmed commented 5 years ago

What version of Laravel are you using? (nothing lower than v5.4).

I use Laravel v5.7

is it an issue related to installation or usage ?

Usage from modal

what is the error you are getting ?

I use The Manager from a modal to update or set my app logo, by following this example Use The Manager From A Modal, but it's not working.

Extra Info "attaching a screen shot would be very helpful"

Maybe i didn't understand the example or the way to use the manager from a modal. If there a real example well explained please provide it. Thanks!

Do You Know A Solution For this Issue ?

...

ctf0 commented 5 years ago

can u make a repo with ur current progress ?

BechirAhmed commented 5 years ago

can u make a repo with ur current progress ?

@ctf0 I've already have a project on github with the manager implemented, repo

ctf0 commented 5 years ago

i will check it and get back to u

BechirAhmed commented 5 years ago

i will check it and get back to u

Thanks so much

ctf0 commented 5 years ago

sorry for the delay, i've checked the code and i believe u were using the old wiki 👎

plz check the new one 🏆 and update ur view accordingly 💯

BechirAhmed commented 5 years ago

Thanks @ctf0 for your time, but I use the last one new one, and my view it's the same as the wiki, So please if you can made those changes u meant for me I'll appreciate that, cuz i've tried every solution i can imagine. And if u want any explanation of my code i can provide it to you.

BechirAhmed commented 5 years ago

I didn't understand this part of code

{{-- items selector --}}
<media-modal old="{{ old('logo', asset('storage/'.AppSettings::get('logo', 'default value'))) }}" item="logo" :name="inputName"></media-modal>

<form action="" method="" role="form">

   {{-- logo --}}
   <section>
     <img :src="logo">
     <input type="hidden" name="logo" :value="logo"/>
     <button @click="toggleModalFor('logo')">Upload logo</button>
   </section>
</form>

Cuz when ever i clicked on that button(Upload logo), the form submitted and refresh the page, and the url of the passed to url, but i don't have a choice to select the picture for first!

ctf0 commented 5 years ago

but I use the last one new one, and my view it's the same as the wiki,

u r right, i was confused between the media-manager-modal & media-modal, sorry for that.

Cuz when ever i clicked on that button(Upload logo), the form submitted and refresh the page, and the url of the passed to url, but i don't have a choice to select the picture for first!

the reason its not working as expected is that button inside forms have the default type of submit, so u can add type="button" to the upload logo button or use any other tag ex.

<div @click="toggleModalFor('logo')">Upload logo</div>
BechirAhmed commented 5 years ago

Thanks so much for your time, it works like a charm