From 1e5926e06ce188ef23a3df8b02d15b50d204266b Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Fri, 7 Feb 2014 17:38:07 +0100 Subject: [PATCH] remove harcoded tinymce. Fix #202 --- core/lib/Thelia/Action/Coupon.php | 6 +++--- .../AdminIncludes/coupon-create-js.html | 1 + .../AdminIncludes/coupon-update-js.html | 1 + .../AdminIncludes/document-edit-js.html | 1 + .../Tinymce/AdminIncludes/image-edit-js.html | 1 + .../backOffice/default/coupon-create.html | 18 ----------------- .../backOffice/default/coupon-update.html | 17 ---------------- .../backOffice/default/document-edit.html | 20 ------------------- templates/backOffice/default/image-edit.html | 20 ------------------- 9 files changed, 7 insertions(+), 78 deletions(-) create mode 100644 local/modules/Tinymce/AdminIncludes/coupon-create-js.html create mode 100644 local/modules/Tinymce/AdminIncludes/coupon-update-js.html create mode 100644 local/modules/Tinymce/AdminIncludes/document-edit-js.html create mode 100644 local/modules/Tinymce/AdminIncludes/image-edit-js.html diff --git a/core/lib/Thelia/Action/Coupon.php b/core/lib/Thelia/Action/Coupon.php index 088185168..d9bbf4eb6 100644 --- a/core/lib/Thelia/Action/Coupon.php +++ b/core/lib/Thelia/Action/Coupon.php @@ -174,9 +174,9 @@ class Coupon extends BaseAction implements EventSubscriberInterface // Set default condition if none found /** @var ConditionInterface $noConditionRule */ - $noConditionRule = $this->getContainer()->get('thelia.condition.match_for_everyone'); + $noConditionRule = $this->noConditionRule; /** @var ConditionFactory $conditionFactory */ - $conditionFactory = $this->getContainer()->get('thelia.condition.factory'); + $conditionFactory = $this->conditionFactory; $couponRuleCollection = new ConditionCollection(); $couponRuleCollection[] = $noConditionRule; $defaultSerializedRule = $conditionFactory->serializeConditionCollection( @@ -215,7 +215,7 @@ class Coupon extends BaseAction implements EventSubscriberInterface $coupon->setDispatcher($event->getDispatcher()); /** @var ConditionFactory $conditionFactory */ - $conditionFactory = $this->getContainer()->get('thelia.condition.factory'); + $conditionFactory = $this->conditionFactory; $coupon->createOrUpdateConditions( $conditionFactory->serializeConditionCollection($event->getConditions()), diff --git a/local/modules/Tinymce/AdminIncludes/coupon-create-js.html b/local/modules/Tinymce/AdminIncludes/coupon-create-js.html new file mode 100644 index 000000000..209efdd16 --- /dev/null +++ b/local/modules/Tinymce/AdminIncludes/coupon-create-js.html @@ -0,0 +1 @@ +{include file="include/tinymce_init.tpl"} diff --git a/local/modules/Tinymce/AdminIncludes/coupon-update-js.html b/local/modules/Tinymce/AdminIncludes/coupon-update-js.html new file mode 100644 index 000000000..a75604b18 --- /dev/null +++ b/local/modules/Tinymce/AdminIncludes/coupon-update-js.html @@ -0,0 +1 @@ +{include file="include/tinymce_init.tpl"} \ No newline at end of file diff --git a/local/modules/Tinymce/AdminIncludes/document-edit-js.html b/local/modules/Tinymce/AdminIncludes/document-edit-js.html new file mode 100644 index 000000000..a75604b18 --- /dev/null +++ b/local/modules/Tinymce/AdminIncludes/document-edit-js.html @@ -0,0 +1 @@ +{include file="include/tinymce_init.tpl"} \ No newline at end of file diff --git a/local/modules/Tinymce/AdminIncludes/image-edit-js.html b/local/modules/Tinymce/AdminIncludes/image-edit-js.html new file mode 100644 index 000000000..a75604b18 --- /dev/null +++ b/local/modules/Tinymce/AdminIncludes/image-edit-js.html @@ -0,0 +1 @@ +{include file="include/tinymce_init.tpl"} \ No newline at end of file diff --git a/templates/backOffice/default/coupon-create.html b/templates/backOffice/default/coupon-create.html index aa6b7d353..79cf6e4fa 100644 --- a/templates/backOffice/default/coupon-create.html +++ b/templates/backOffice/default/coupon-create.html @@ -41,25 +41,7 @@ {/javascripts} - {/javascripts} - {/javascripts} - - - {/block} {block name="javascript-last-call"} diff --git a/templates/backOffice/default/image-edit.html b/templates/backOffice/default/image-edit.html index 316c8c4ff..77d4633e9 100644 --- a/templates/backOffice/default/image-edit.html +++ b/templates/backOffice/default/image-edit.html @@ -145,26 +145,6 @@ {/javascripts} - - - {/block} {block name="javascript-last-call"}