@@ -75,10 +75,9 @@ $this->render('@backend/views/user/_menu_filter.php',[ | |||
<?php //$form->field($mailForm, 'message')->textarea(['rows' => '15']) ; ?> | |||
<?= $form->field($mailForm, 'message')->widget(letyii\tinymce\Tinymce::class, [ | |||
'configs' => [ | |||
'plugins' => Yii::$app->parameterBag->get('tinyMcePlugins'), | |||
] | |||
'plugins' => Yii::$app->parameterBag->get('tinyMcePlugins') | |||
], | |||
]); ?> | |||
<div class="form-group form-buttons"> | |||
<?= Html::submitButton( 'Envoyer', ['class' => 'btn btn-primary']) ?> | |||
</div> |
@@ -3285,4 +3285,15 @@ termes. | |||
.distribution-index #orders table .column-delivery-note { | |||
display: none; | |||
} | |||
/* line 173, ../sass/_responsive.scss */ | |||
.communicate-email { | |||
/*#mailform-message { | |||
display: block !important; | |||
height: 250px; | |||
} | |||
.tox-tinymce { | |||
display: none; | |||
}*/ | |||
} | |||
} |
@@ -58,6 +58,7 @@ $(document).ready(function () { | |||
opendistrib_point_sale_form(); | |||
opendistrib_check_all_checkboxes(); | |||
opendistrib_dashboard_admin_statistics(); | |||
opendistrib_tinymce_responsive(); | |||
}); | |||
var UrlManager = { | |||
@@ -69,6 +70,15 @@ var UrlManager = { | |||
} | |||
}; | |||
function opendistrib_tinymce_responsive() { | |||
// tinymce.activeEditor.mode.set('readonly'); | |||
//tinymce.activeEditor.hide(); | |||
//tinymce.EditorManager.execCommand('mceRemoveEditor',true, 'textarea#mailform-message'); | |||
//tinyMCE.init({readonly : 1}); | |||
//tinymce.activeEditor.getBody().setAttribute('contenteditable', false); | |||
//tinyMCE.get('mailform-message').getBody().setAttribute('contenteditable', false); | |||
} | |||
function opendistrib_dashboard_admin_statistics() { | |||
var selector = '#dashboard-admin-statistics-html'; | |||
if($(selector).length) { |
@@ -169,4 +169,15 @@ termes. | |||
} | |||
} | |||
} | |||
.communicate-email { | |||
// désactivation de tinymce sur mobile car copier/coller impossible | |||
/*#mailform-message { | |||
display: block !important; | |||
height: 250px; | |||
} | |||
.tox-tinymce { | |||
display: none; | |||
}*/ | |||
} | |||
} |
@@ -105,6 +105,20 @@ class PointSaleSolver extends AbstractService implements SolverInterface | |||
return $str; | |||
} | |||
public function getLocalityWithAddressTooltip(PointSale $pointSale): string | |||
{ | |||
$html = ''; | |||
if($pointSale->address && strlen($pointSale->address) > 0) { | |||
$html .= '<span data-toggle="tooltip" data-placement="bottom" title="'.Html::encode($pointSale->address).'">'.Html::encode($pointSale->locality).'</span>'; | |||
} | |||
else { | |||
$html .= Html::encode($pointSale->locality); | |||
} | |||
return $html; | |||
} | |||
public function isPublic(PointSale $pointSale): bool | |||
{ | |||
if($pointSale->restricted_access || ($pointSale->code && strlen($pointSale->code))) { |
@@ -94,7 +94,9 @@ $this->setTitle('Confirmation de commande') ; | |||
<?php if($order->pointSale->is_bread_box && $order->pointSale->bread_box_code): ?> | |||
(Code : <strong><?= $order->pointSale->bread_box_code; ?></strong>) | |||
<?php endif; ?> | |||
<br /> <span class="locality">à <?= Html::encode($order->pointSale->locality) ?></span><?php endif; ?> | |||
<span class="locality">à <?= $pointSaleModule->getSolver()->getLocalityWithAddressTooltip($order->pointSale) ?></span> | |||
<?php endif; ?> | |||
<?php endif; ?> | |||
</li> | |||
<?php |
@@ -40,6 +40,7 @@ use common\helpers\Image; | |||
use common\helpers\Price; | |||
use domain\Distribution\Distribution\DistributionModule; | |||
use domain\Distribution\PointSaleDistribution\PointSaleDistribution; | |||
use domain\PointSale\PointSale\PointSaleModule; | |||
use domain\Producer\Producer\Producer; | |||
use domain\Producer\Producer\ProducerModule; | |||
use domain\Product\Product\ProductModule; | |||
@@ -49,6 +50,7 @@ use yii\helpers\Html; | |||
$productModule = ProductModule::getInstance(); | |||
$producerModule = ProducerModule::getInstance(); | |||
$distributionModule = DistributionModule::getInstance(); | |||
$pointSaleModule = PointSaleModule::getInstance(); | |||
$producer = $this->context->getProducerCurrent(); | |||
@@ -76,10 +78,10 @@ $this->setPageTitle(Html::encode($producer->type . ' à ' . $producer->city)); | |||
'attribute' => 'name', | |||
'format' => 'raw', | |||
'contentOptions' => ['class' => 'name'], | |||
'value' => function ($model) { | |||
'value' => function ($model) use ($pointSaleModule) { | |||
$html = '<span class="the-name">' . Html::encode($model->name) . '</span>'; | |||
if (strlen($model->locality)) { | |||
$html .= '<br />à ' . Html::encode($model->locality); | |||
$html .= '<br />à ' . $pointSaleModule->getSolver()->getLocalityWithAddressTooltip($model); | |||
} | |||
return $html; | |||
} |