comur / ComurImageBundle

Image upload / crop bundle for Symfony2
105 stars 76 forks source link

modal #26

Closed mehrdad-masoumi closed 9 years ago

mehrdad-masoumi commented 9 years ago

after install with composer click add or edit not responding and modal not open plz help me.

carlosequiz commented 9 years ago

Hi! Your problem it's related to your Bootstrap version. Check 1.0 branch.

carlosequiz commented 9 years ago

You can see: https://github.com/comur/ComurImageBundle/blob/master/Resources/views/Form/croppable_image_modal.html.twig#L32

and

https://github.com/comur/ComurImageBundle/blob/1.0/Resources/views/Form/croppable_image_modal.html.twig#L32

Hope this helps!

comur commented 9 years ago

Hi @mehrdad69 Was it just bootstrap version or other issue ?

Thanks

mehrdad-masoumi commented 9 years ago

hi crustafari!!! tank u for help. you can send example for me? mehrdad.msi69@gmail.com or record video totourial and upload in host and download it form host

comur commented 9 years ago

@mehrdad69 i copy paste your last message here to not make same effort multiple times:

after do app/console assets:install --symlink web

  [Symfony\Component\Filesystem\Exception\IOException]                         
  Unable to create symlink due to error code 1314: 'A required privilege is n  
  ot held by the client'. Do you have the required Administrator-rights?       

assets:install [--symlink] [--relative] [target]

but after do app/console assets:install
css,js,font,img add in web/bundles/comurimage

tow script add in base.html.twig?in javascripts block?????
<script src="{{ asset('bundles/fosjsrouting/js/router.js') }}"></script>
<script src="{{ path('fos_js_routing_js', {"callback": "fos.Router.setData"}) }}"></script>
tank you for help me

I think you have to recreate your template properly. First of all, i suggest you to read about twig block to understand how to use them and why use them.

Then check in your inspector, i'm pretty sure that you have some missing files or javascript errors.

It's better to write here (and not by email) to keep a trace for other who may have same question.

mehrdad-masoumi commented 9 years ago

I really do not know how to thank you. to send me a sample project?

mehrdad-masoumi commented 9 years ago

it is true? "uploadUrl":"H:\workspace\modal\src\Mehr\SliderBundle\Entity\/..\/..\/..\/..\/..\/web\/bundles\/uploads\/myentity\/gallery", \ 2 slash?

mehrdad-masoumi commented 9 years ago

in page source i see "uploadUrl":"H:\workspace\modal\src\Mehr\SliderBundle\Entity\/..\/..\/..\/..\/..\/web\/bundles\/uploads\/myentity\/gallery", "webDir":"bundles\/uploads\/myentity\/gallery",

comur commented 9 years ago

If you look at your inspector when you try to use the modal, you can see if there is an error or not with this code. Can you check and tell me if you have an error please ?

mehrdad-masoumi commented 9 years ago

show this error SyntaxError: JSON.parse: bad escaped character at line 1 column 67 of the JSON data

...function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typ...

mehrdad-masoumi commented 9 years ago

how to resolve this problem?

mehrdad-masoumi commented 9 years ago

hi after click on add image two error show

TypeError: $(...).sortable is not a function

$( "#gallery_preview_mehr_sliderbundle_ex_gallery_gallery" ).sortable({

new (line 141) 2 SyntaxError: JSON.parse: bad escaped character at line 1 column 67 of the JSON data

...function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typ...

how to resolve it?

On 11/25/2014 6:37 PM, Can OMUR wrote:

If you look at your inspector when you try to use the modal, you can see if there is an error or not with this code. Can you check and tell me if you have an error please ?

— Reply to this email directly or view it on GitHub https://github.com/comur/ComurImageBundle/issues/26#issuecomment-64413021.

mehrdad-masoumi commented 9 years ago

tank u all.i solved this problem. this was th error in form type after load new action upload directory and web directory loader with // and address faild

mehrdad-masoumi commented 9 years ago

bad news. in form type i force use direct link uploadUrl' => 'bundles/mehrslider/upload',// required 'webDir' =>'bundles/mehrslider/upload',
and after use $myentity->getUploadRootDir() modal not open becuse this address is invalid

comur commented 9 years ago

So please reread ReadMe, you didn't follow all steps https://github.com/comur/ComurImageBundle#usage

comur commented 9 years ago

If you are testing on windows, try to use this PR: https://github.com/comur/ComurImageBundle/pull/21 Didn't have time to merge it yet, there is a fix for windows routes you webdir must not point on bundles directory but your upload directory

mehrdad-masoumi commented 9 years ago

i use direct url but jcrop in firefox not working in google chorm work currently by dir rtl. in firefox work with dir ltr