Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Form/Type/CroppableGalleryType.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,13 @@ public function configureOptions(OptionsResolver $resolver)
*/
public function buildView(FormView $view, FormInterface $form, array $options)
{
// @Tersoal
// Hack to fix windows routes. Windows create routes with \ instead of /
foreach($options['uploadConfig'] as $key => $optiontotransform) {
$options['uploadConfig'][$key] = str_replace('\\', '/', $optiontotransform);
}
// @Tersoal

$uploadConfig = $options['uploadConfig'];
$cropConfig = $options['cropConfig'];
// $options['type'] = 'text';
Expand Down
7 changes: 7 additions & 0 deletions Form/Type/CroppableImageType.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,13 @@ public function buildView(FormView $view, FormInterface $form, array $options)
{
$originalPhotoFieldId = null;

// @Tersoal
// Hack to fix windows routes. Windows create routes with \ instead of /
foreach($options['uploadConfig'] as $key => $optiontotransform) {
$options['uploadConfig'][$key] = str_replace('\\', '/', $optiontotransform);
}
// @Tersoal

$uploadConfig = $options['uploadConfig'];
$cropConfig = $options['cropConfig'];

Expand Down
8 changes: 4 additions & 4 deletions Resources/config/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ parameters:
comur_gallery_type_class: Comur\ImageBundle\Form\Type\CroppableGalleryType
services:
comur_image_bundle.image_type:
class: %comur_image_type_class%
class: "%comur_image_type_class%"
tags:
- { name: form.type, alias: comur_image }
# arguments: [%comur_image.translation_domain%]
comur_image_bundle.gallery_type:
class: %comur_gallery_type_class%
class: "%comur_gallery_type_class%"
tags:
- { name: form.type, alias: comur_gallery }
arguments: [%comur_image.gallery_dir%, %comur_image.thumbs_dir%, %comur_image.gallery_thumb_size%]
arguments: ["%comur_image.gallery_dir%", "%comur_image.thumbs_dir%", "%comur_image.gallery_thumb_size%"]
comur.twig.thumb_extension:
class: Comur\ImageBundle\Twig\ThumbExtension
tags:
- { name: twig.extension }
arguments: [%comur_image.cropped_image_dir%, %comur_image.thumbs_dir%, "@service_container", %comur_image.web_dirname%, %comur_image.translation_domain%, %comur_image.gallery_dir%]
arguments: ["%comur_image.cropped_image_dir%", "%comur_image.thumbs_dir%", "@service_container", "%comur_image.web_dirname%", "%comur_image.translation_domain%", "%comur_image.gallery_dir%"]
10 changes: 10 additions & 0 deletions Resources/public/css/comur.image_bundle.css
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@
position: relative;
margin: 0;
}
.fileinput-button {
margin-bottom: 20px;
}

.fileinput-button input {
/*position: absolute;
top: 0;
Expand All @@ -81,6 +85,7 @@
-ms-filter: 'alpha(opacity=0)';
max-width: 0;
width: 0;
display: none;
}

.image_upload_drop_zone
Expand Down Expand Up @@ -113,6 +118,11 @@
box-shadow: 0px 0px 15px #000;
}

#image_upload_modal
{
overflow-x: auto;
}

#image_upload_modal .modal-dialog
{
width: 850px;
Expand Down
12 changes: 12 additions & 0 deletions Resources/public/js/holder.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
"symfony/class-loader":"~2.2|3.*",
"twig/twig": "~1.12",
"twig/extensions": "~1.0",
"friendsofsymfony/jsrouting-bundle": "@stable",
"jms/translation-bundle": "^1.2.2"
"friendsofsymfony/jsrouting-bundle": "~2.2.0",
"jms/translation-bundle": "^1.2.2"
},
"target-dir": "Comur/ImageBundle",
"autoload": {
Expand Down