lfnds_donation - Version 2.0.0

Version Notes

Updated frontend and donation synchronization.

Download this release

Release Info

Developer elefunds GmbH
Extension lfnds_donation
Version 2.0.0
Comparing to
See all releases


Code changes from version 1.0.6 to 2.0.0

Files changed (124) hide show
  1. app/code/community/Lfnds/.DS_Store +0 -0
  2. app/code/community/Lfnds/Donation/.DS_Store +0 -0
  3. app/code/community/Lfnds/Donation/Block/Checkout/Banner.php +12 -35
  4. app/code/community/Lfnds/Donation/Block/Checkout/Socialmedia.php +25 -66
  5. app/code/community/Lfnds/Donation/Block/Page/Head.php +0 -101
  6. app/code/community/Lfnds/Donation/Block/Sales/Order/Email.php +8 -2
  7. app/code/community/Lfnds/Donation/Helper/Data.php +63 -108
  8. app/code/community/Lfnds/Donation/Manager/SyncManager.php +10 -61
  9. app/code/community/Lfnds/Donation/Model/Donation.php +2 -2
  10. app/code/community/Lfnds/Donation/Model/Mysql4/Receiver/Collection.php +0 -103
  11. app/code/community/Lfnds/Donation/Model/Observer.php +12 -12
  12. app/code/community/Lfnds/Donation/Model/Receiver.php +0 -105
  13. app/code/community/Lfnds/Donation/Model/System/Config/Source/Color.php +0 -76
  14. app/code/community/Lfnds/Donation/Model/System/Config/Source/Theme.php +3 -2
  15. app/code/community/Lfnds/Donation/etc/config.xml +7 -9
  16. app/code/community/Lfnds/Donation/etc/system.xml +15 -33
  17. app/code/community/Lfnds/Donation/sql/lfnds_donation_setup/mysql4-install-1.0.0.php +1 -1
  18. app/code/community/Lfnds/Donation/{Model/Mysql4/Receiver.php → sql/lfnds_donation_setup/mysql4-upgrade-1.0.0-2.0.0.php} +14 -12
  19. app/design/frontend/base/default/layout/lfnds_donation.xml +21 -13
  20. app/design/frontend/base/default/template/lfnds/.DS_Store +0 -0
  21. app/design/frontend/base/default/template/lfnds/donation/.DS_Store +0 -0
  22. app/design/frontend/base/default/template/lfnds/donation/checkout/.DS_Store +0 -0
  23. app/design/frontend/base/default/template/lfnds/donation/checkout/onepage/.DS_Store +0 -0
  24. app/design/frontend/base/default/template/lfnds/donation/checkout/onepage/review/donation_banner.phtml +47 -47
  25. app/design/frontend/base/default/template/lfnds/donation/checkout/onepage/review/donation_banner_after.phtml +2 -4
  26. app/design/frontend/base/default/template/lfnds/donation/checkout/onepage/review/donation_banner_before.phtml +1 -4
  27. app/design/frontend/base/default/template/lfnds/donation/checkout/onepage/socialmedia.phtml +5 -10
  28. app/design/frontend/base/default/template/lfnds/donation/mail/description.phtml +1 -2
  29. app/design/frontend/base/default/template/lfnds/donation/page/.DS_Store +0 -0
  30. app/locale/de_DE/Lfnds_Donation.csv +1 -6
  31. app/locale/en_US/Lfnds_Donation.csv +2 -2
  32. lib/Elefunds/Configuration/BaseConfiguration.php +0 -344
  33. lib/Elefunds/Documentation/PHPGuideBasics.md +0 -160
  34. lib/Elefunds/Documentation/PHPGuideConfiguration.md +0 -146
  35. lib/Elefunds/Documentation/PHPGuideTemplating.md +0 -235
  36. lib/Elefunds/Example/rawDataExample.php +0 -110
  37. lib/Elefunds/Example/shopExample.php +0 -81
  38. lib/Elefunds/Example/shopExampleCheckoutSuccess.php +0 -60
  39. lib/Elefunds/Template/Shop/CheckoutConfiguration.php +0 -119
  40. lib/Elefunds/Template/Shop/CheckoutSuccess.phtml +0 -18
  41. lib/Elefunds/Template/Shop/CheckoutSuccessConfiguration.php +0 -115
  42. lib/Elefunds/Template/Shop/Css/color.less +0 -2
  43. lib/Elefunds/Template/Shop/Css/elefunds.less +0 -436
  44. lib/Elefunds/Template/Shop/Css/elefunds_dark_blue.min.css +0 -1
  45. lib/Elefunds/Template/Shop/Css/elefunds_dark_green.min.css +0 -1
  46. lib/Elefunds/Template/Shop/Css/elefunds_dark_grey.min.css +0 -1
  47. lib/Elefunds/Template/Shop/Css/elefunds_dark_orange.min.css +0 -1
  48. lib/Elefunds/Template/Shop/Css/elefunds_dark_purple.min.css +0 -1
  49. lib/Elefunds/Template/Shop/Css/elefunds_light_blue.min.css +0 -1
  50. lib/Elefunds/Template/Shop/Css/elefunds_light_green.min.css +0 -1
  51. lib/Elefunds/Template/Shop/Css/elefunds_light_grey.min.css +0 -1
  52. lib/Elefunds/Template/Shop/Css/elefunds_light_orange.min.css +0 -1
  53. lib/Elefunds/Template/Shop/Css/elefunds_light_purple.min.css +0 -1
  54. lib/Elefunds/Template/Shop/Css/elements.less +0 -156
  55. lib/Elefunds/Template/Shop/Helper/RequestHelper.php +0 -154
  56. lib/Elefunds/Template/Shop/Hooks/ShopHooks.php +0 -307
  57. lib/Elefunds/Template/Shop/Images/elefunds_item_main.png +0 -0
  58. lib/Elefunds/Template/Shop/Images/elefunds_item_small.png +0 -0
  59. lib/Elefunds/Template/Shop/Images/elefunds_item_thumbnail.png +0 -0
  60. lib/Elefunds/Template/Shop/Javascript/elefunds.jquery.js +0 -227
  61. lib/Elefunds/Template/Shop/Javascript/elefunds.jquery.min.js +0 -1
  62. lib/Elefunds/Template/Shop/Javascript/elefundsTT.jquery.js +0 -211
  63. lib/Elefunds/Template/Shop/View.phtml +0 -92
  64. lib/Elefunds/Test/Unit/Configuration/BaseConfigurationTest.php +0 -197
  65. lib/{Elefunds → Lfnds}/Communication/CurlRequest.php +33 -15
  66. lib/Lfnds/Communication/README.md +53 -0
  67. lib/{Elefunds → Lfnds}/Communication/RestInterface.php +20 -8
  68. lib/{Elefunds → Lfnds}/Communication/certificate/GandiProSSLCA.pem +0 -0
  69. lib/Lfnds/Configuration/BaseConfiguration.php +368 -0
  70. lib/{Elefunds → Lfnds}/Configuration/ConfigurationInterface.php +44 -24
  71. lib/{Elefunds/Test/Unit/Configuration/DefaultConfigurationTest.php → Lfnds/Configuration/DefaultConfiguration.php} +27 -16
  72. lib/{Elefunds → Lfnds}/Exception/ElefundsCommunicationException.php +7 -3
  73. lib/{Elefunds → Lfnds}/Exception/ElefundsException.php +10 -7
  74. lib/{Elefunds → Lfnds}/Facade.php +179 -125
  75. lib/Lfnds/FacadeInterface.php +188 -0
  76. lib/{Elefunds → Lfnds}/Model/Donation.php +26 -21
  77. lib/{Elefunds → Lfnds}/Model/DonationInterface.php +21 -17
  78. lib/{Elefunds → Lfnds}/Model/Factory.php +17 -12
  79. lib/{Elefunds → Lfnds}/Model/Receiver.php +23 -54
  80. lib/{Elefunds → Lfnds}/Model/ReceiverInterface.php +16 -34
  81. lib/{Elefunds → Lfnds}/README.md +0 -0
  82. lib/Lfnds/Template/Shop/Checkout.phtml +5 -0
  83. lib/{Elefunds/Template/Shop/ShopConfiguration.php → Lfnds/Template/Shop/CheckoutConfiguration.php} +40 -41
  84. lib/Lfnds/Template/Shop/CheckoutSuccess.phtml +6 -0
  85. lib/{Elefunds/Example/ShopExampleCheckoutSuccessConfiguration.php → Lfnds/Template/Shop/CheckoutSuccessConfiguration.php} +15 -15
  86. lib/Lfnds/Template/Shop/Helper/RequestHelper.php +234 -0
  87. lib/{Elefunds/Example/RawDataConfiguration.php → Lfnds/Template/Shop/Hooks/ShopHooks.php} +18 -16
  88. lib/{Elefunds/Example/ShopExampleConfiguration.php → Lfnds/Template/Shop/ShopConfiguration.php} +32 -25
  89. lib/Lfnds/Test/Unit/Communication/CurlRequestTest.php +234 -0
  90. lib/Lfnds/Test/Unit/Communication/curlMock.php +71 -0
  91. lib/Lfnds/Test/Unit/Configuration/BaseConfigurationTest.php +254 -0
  92. lib/{Elefunds/Configuration/DefaultConfiguration.php → Lfnds/Test/Unit/Configuration/DefaultConfigurationTest.php} +28 -26
  93. lib/{Elefunds → Lfnds}/Test/Unit/Exception/ElefundsExceptionTest.php +17 -9
  94. lib/{Elefunds → Lfnds}/Test/Unit/FacadeTest.php +210 -46
  95. lib/{Elefunds → Lfnds}/Test/Unit/Model/DonationTest.php +34 -23
  96. lib/{Elefunds → Lfnds}/Test/Unit/Model/FactoryTest.php +25 -19
  97. lib/{Elefunds → Lfnds}/Test/Unit/Model/ReceiverTest.php +24 -49
  98. lib/Lfnds/Test/Unit/Template/Shop/CheckoutConfigurationTest.php +155 -0
  99. lib/Lfnds/Test/Unit/Template/Shop/CheckoutSuccessConfigurationTest.php +85 -0
  100. lib/Lfnds/Test/Unit/Template/Shop/Helper/RequestHelperTest.php +348 -0
  101. lib/Lfnds/Test/Unit/Template/Shop/ShopConfigurationTest.php +70 -0
  102. lib/{Elefunds → Lfnds}/Test/Unit/View/BaseViewTest.php +47 -36
  103. lib/{Elefunds → Lfnds}/View/BaseView.php +88 -47
  104. lib/{Elefunds → Lfnds}/View/ViewInterface.php +39 -19
  105. package.xml +8 -8
  106. skin/frontend/base/default/css/lfnds_donation/additional/elefunds_magento_additional.css +0 -9
  107. skin/frontend/base/default/css/lfnds_donation/additional/elefunds_magento_onestep_additional.css +0 -454
  108. skin/frontend/base/default/css/lfnds_donation/elefunds_dark_blue.min.css +0 -1
  109. skin/frontend/base/default/css/lfnds_donation/elefunds_dark_green.min.css +0 -1
  110. skin/frontend/base/default/css/lfnds_donation/elefunds_dark_grey.min.css +0 -1
  111. skin/frontend/base/default/css/lfnds_donation/elefunds_dark_orange.min.css +0 -1
  112. skin/frontend/base/default/css/lfnds_donation/elefunds_dark_purple.min.css +0 -1
  113. skin/frontend/base/default/css/lfnds_donation/elefunds_light_blue.min.css +0 -1
  114. skin/frontend/base/default/css/lfnds_donation/elefunds_light_green.min.css +0 -1
  115. skin/frontend/base/default/css/lfnds_donation/elefunds_light_grey.min.css +0 -1
  116. skin/frontend/base/default/css/lfnds_donation/elefunds_light_orange.min.css +0 -1
  117. skin/frontend/base/default/css/lfnds_donation/elefunds_light_purple.min.css +0 -1
  118. skin/frontend/base/default/js/lfnds_donation/additional/elefunds_magento_onepage_additional.js +0 -147
  119. skin/frontend/base/default/js/lfnds_donation/additional/elefunds_magento_onestep_additional.js +0 -171
  120. skin/frontend/base/default/js/lfnds_donation/elefunds.jquery.js +0 -227
  121. skin/frontend/base/default/js/lfnds_donation/elefunds.jquery.min.js +0 -1
  122. skin/frontend/base/default/js/lfnds_donation/elefundsTT.jquery.js +0 -211
  123. skin/frontend/base/default/js/lfnds_donation/jQueryNoConflict.js +0 -1
  124. skin/frontend/base/default/js/lfnds_donation/jquery-1.9.1.min.js +0 -5
app/code/community/Lfnds/.DS_Store ADDED
Binary file
app/code/community/Lfnds/Donation/.DS_Store ADDED
Binary file
app/code/community/Lfnds/Donation/Block/Checkout/Banner.php CHANGED
@@ -71,54 +71,32 @@ class Lfnds_Donation_Block_Checkout_Banner extends Mage_Core_Block_Template {
71
  }
72
 
73
  /**
74
- * Returns the API Template.
75
- *
76
- * If we cannot display the Template, we return an empty string.
77
  *
78
  * Used and shown in /design/frontend/base/default/template/lfnds/donation/checkout/onepage/review/donation_banner.phtml
79
  *
80
  * @return string The rendered HTML Snippet
81
  */
82
- public function getApiTemplate() {
 
 
83
 
84
  if (!$this->helper->isOneStepCheckoutInstalled()) {
85
  // The event does not work with one step checkout.
86
  // That's because the payment methods are not configured prior to the module.
87
  Mage::dispatchEvent('elefunds_checkout_review_before_enable', array('object' => $this));
88
  } else {
89
- $this->helper->getConfiguredFacade()->getConfiguration()->getView()->assign('toolTipPosition', 'right');
90
  }
91
- $template = '';
92
-
93
- if ($this->helper->isActive()) {
94
-
95
- try {
96
- $facade = $this->helper->getConfiguredFacade();
97
 
98
- $banner_width = Mage::getStoreConfig('lfnds_donation/advanced/banner_width');
99
- $total = Mage::getModel('checkout/cart')->getQuote()->getGrandTotal();
100
- $localeCode = Mage::app()->getLocale()->getLocaleCode();
101
- $symbols = Zend_Locale_Data::getList($localeCode, 'symbols');
102
-
103
- $receivers = $this->helper->getReceivers();
104
 
105
- if (count($receivers) >= 3) {
 
 
 
106
 
107
- $facade->getConfiguration()
108
- ->getView()
109
- ->assign('shopWidth', $banner_width)
110
- ->assign('currencyDelimiter', $symbols['decimal'])
111
- ->assign('total', round($total * 100))
112
- ->assign('receivers', $receivers);
113
-
114
- $template = $facade->renderTemplate();
115
-
116
- }
117
- } catch (Elefunds_Exception_ElefundsCommunicationException $exception) {
118
- Mage::logException($exception);
119
- }
120
- }
121
- return $template;
122
  }
123
 
124
  public function getExcludedPaymentMethods() {
@@ -137,6 +115,5 @@ class Lfnds_Donation_Block_Checkout_Banner extends Mage_Core_Block_Template {
137
  public function deactivateBanner() {
138
  $this->helper->deactivate();
139
  }
140
-
141
-
142
  }
71
  }
72
 
73
  /**
74
+ * Returns the API JSON.
 
 
75
  *
76
  * Used and shown in /design/frontend/base/default/template/lfnds/donation/checkout/onepage/review/donation_banner.phtml
77
  *
78
  * @return string The rendered HTML Snippet
79
  */
80
+ public function getJson() {
81
+
82
+ $facade = $this->helper->getConfiguredFacade();
83
 
84
  if (!$this->helper->isOneStepCheckoutInstalled()) {
85
  // The event does not work with one step checkout.
86
  // That's because the payment methods are not configured prior to the module.
87
  Mage::dispatchEvent('elefunds_checkout_review_before_enable', array('object' => $this));
88
  } else {
89
+ $facade->getConfiguration()->getView()->assign('orientation', 'vertical');
90
  }
 
 
 
 
 
 
91
 
 
 
 
 
 
 
92
 
93
+ $total = Mage::getModel('checkout/cart')->getQuote()->getGrandTotal();
94
+ $facade->getConfiguration()
95
+ ->getView()
96
+ ->assign('sumExcludingDonation', round($total * 100));
97
 
98
+ $assigns = $facade->getConfiguration()->getView()->getAssignments();
99
+ return json_encode($assigns);
 
 
 
 
 
 
 
 
 
 
 
 
 
100
  }
101
 
102
  public function getExcludedPaymentMethods() {
115
  public function deactivateBanner() {
116
  $this->helper->deactivate();
117
  }
118
+
 
119
  }
app/code/community/Lfnds/Donation/Block/Checkout/Socialmedia.php CHANGED
@@ -34,6 +34,7 @@
34
  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35
  * POSSIBILITY OF SUCH DAMAGE.
36
  */
 
37
 
38
  /**
39
  * General helper function to access and configure the SDK in magento
@@ -58,88 +59,46 @@ class Lfnds_Donation_Block_Checkout_Socialmedia extends Mage_Core_Block_Template
58
  */
59
  protected $helper;
60
 
 
 
61
  public function __construct() {
62
  $this->helper = Mage::helper('lfnds_donation');
63
  }
64
 
65
- /**
66
- * Adds the elefunds page head to the layout.
67
- */
68
- protected function _prepareLayout() {
69
- $headBlock = $this->getLayout()->createBlock('lfnds_donation/page_head', 'elefunds.head');
70
- $this->getLayout()->getBlock('head')->setChild('elefunds.head', $headBlock);
71
 
72
- parent::_prepareLayout();
73
- }
74
 
75
- /**
76
- * Checks whether a donation exists in the actual order.
77
- *
78
- * @return bool
79
- */
80
- public function existDonation() {
81
- $virtualProduct = $this->helper->getVirtualProduct();
82
- if (!$virtualProduct) {
83
- Mage::log('Unable to retrieve virtual product for elefunds.');
84
- } else {
85
- if ($this->getOrder() !== NULL && $this->getOrder()->getItemsCollection()->getItemByColumnValue('product_id', $virtualProduct->getId())) {
86
- return TRUE;
87
- }
88
- }
89
- return FALSE;
90
- }
91
 
92
- /**
93
- * Retrieves the current order.
94
- *
95
- * @return Mage_Sales_Model_Order
96
- */
97
- public function getOrder() {
98
- if (!$this->order) {
99
- $orderId = Mage::getSingleton('checkout/session')->getLastRealOrderId();
100
- if ($orderId) {
101
- $order = Mage::getModel('sales/order')->loadByIncrementId($orderId);
102
- $this->order = $order;
103
- if (!$order->getId()) {
104
- $this->order = NULL;
105
- }
106
  }
107
  }
108
- return $this->order;
109
- }
110
 
111
- /**
112
- * Renders the social media template or returns an empty string if we do have nothing to show.
113
- *
114
- * @return string
115
- */
116
- public function renderSocialMedia() {
117
- $order = $this->getOrder();
118
-
119
- /** @var Elefunds_Facade $facade */
120
- $facade = $this->helper->getConfiguredFacade(TRUE);
121
-
122
- $donationItem = Mage::getModel('lfnds_donation/donation');
123
  /** @var Lfnds_Donation_Model_Donation $donationItem */
124
  $donationItem->loadByAttribute('foreign_id', $order->getIncrementId());
125
 
126
  if ($donationItem->getId()) {
127
- $receivers = $this->helper->getReceivers();
128
-
129
- $receiverIds = $donationItem->getReceiverIds();
130
- $receiversArray = array();
131
- foreach ($receivers as $receiver) {
132
- if (in_array($receiver->getId(TRUE), $receiverIds)) {
133
- $receiversArray[$receiver->getId(TRUE)] = $receiver->getName();
134
- }
135
- }
136
-
137
  $facade->getConfiguration()->getView()->assign('foreignId', $donationItem->getForeignId());
138
- $facade->getConfiguration()->getView()->assign('receivers', $receiversArray);
139
-
140
- return $facade->renderTemplate('CheckoutSuccess');
141
  }
 
 
142
 
143
- return '';
 
 
 
 
 
 
144
  }
145
  }
34
  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35
  * POSSIBILITY OF SUCH DAMAGE.
36
  */
37
+ use Lfnds\Facade;
38
 
39
  /**
40
  * General helper function to access and configure the SDK in magento
59
  */
60
  protected $helper;
61
 
62
+ protected $json;
63
+
64
  public function __construct() {
65
  $this->helper = Mage::helper('lfnds_donation');
66
  }
67
 
68
+ public function canRenderSocialMedia() {
 
 
 
 
 
69
 
70
+ /** @var Facade $facade */
71
+ $facade = $this->helper->getConfiguredFacade(TRUE);
72
 
73
+ $donationItem = Mage::getModel('lfnds_donation/donation');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
 
75
+ $orderId = Mage::getSingleton('checkout/session')->getLastRealOrderId();
76
+ $order = NULL;
77
+ if ($orderId) {
78
+ $order = Mage::getModel('sales/order')->loadByIncrementId($orderId);
79
+ if (!$order->getId()) {
80
+ return FALSE;
 
 
 
 
 
 
 
 
81
  }
82
  }
 
 
83
 
 
 
 
 
 
 
 
 
 
 
 
 
84
  /** @var Lfnds_Donation_Model_Donation $donationItem */
85
  $donationItem->loadByAttribute('foreign_id', $order->getIncrementId());
86
 
87
  if ($donationItem->getId()) {
 
 
 
 
 
 
 
 
 
 
88
  $facade->getConfiguration()->getView()->assign('foreignId', $donationItem->getForeignId());
89
+ $assigns = $facade->getConfiguration()->getView()->getAssignments();
90
+ $this->json = json_encode($assigns);
91
+ return TRUE;
92
  }
93
+ return FALSE;
94
+ }
95
 
96
+ /**
97
+ * Renders the social media template or returns an empty string if we do have nothing to show.
98
+ *
99
+ * @return string
100
+ */
101
+ public function getJson() {
102
+ return $this->json;
103
  }
104
  }
app/code/community/Lfnds/Donation/Block/Page/Head.php DELETED
@@ -1,101 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * elefunds Magento Module
5
- *
6
- * Copyright (c) 2012, elefunds GmbH <hello@elefunds.de>.
7
- * All rights reserved.
8
- *
9
- * Redistribution and use in source and binary forms, with or without
10
- * modification, are permitted provided that the following conditions
11
- * are met:
12
- *
13
- * * Redistributions of source code must retain the above copyright
14
- * notice, this list of conditions and the following disclaimer.
15
- *
16
- * * Redistributions in binary form must reproduce the above copyright
17
- * notice, this list of conditions and the following disclaimer in
18
- * the documentation and/or other materials provided with the
19
- * distribution.
20
- *
21
- * * Neither the name of the elefunds GmbH nor the names of its
22
- * contributors may be used to endorse or promote products derived
23
- * from this software without specific prior written permission.
24
- *
25
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
28
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
29
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
30
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
31
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
32
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
33
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
35
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36
- * POSSIBILITY OF SUCH DAMAGE.
37
- */
38
-
39
- /**
40
- * General helper function to access and configure the SDK in magento
41
- *
42
- * @package elefunds Magento Module
43
- * @subpackage Block
44
- * @author Raul Armando Salamanca Gonzalez <raul.salamanca@gmx.de>, Christian Peters <christian@elefunds.de>
45
- * @copyright 2012 elefunds GmbH <hello@elefunds.de>
46
- * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
47
- * @link http://www.elefunds.de
48
- * @since File available since Release 1.0.0
49
- */
50
- class Lfnds_Donation_Block_Page_Head extends Mage_Core_Block_Template {
51
-
52
- /**
53
- * Gets CSS- and Javascript-files from the Elefunds Facade and adds them to the head block
54
- */
55
- protected function _prepareLayout() {
56
-
57
- /** @var Lfnds_Donation_Helper_Data $helper */
58
- $helper = Mage::helper('lfnds_donation');
59
- $headBlock = $this->getLayout()->getBlock('head');
60
-
61
- try {
62
- $includeJQuery = Mage::getStoreConfig('lfnds_donation/advanced/include_jquery');
63
-
64
- $facade = $helper->getConfiguredFacade();
65
-
66
- // Javascript includes
67
- $scriptFiles = $facade->getTemplateJavascriptFiles();
68
-
69
- if ($includeJQuery) {
70
- array_unshift($scriptFiles, 'jQueryNoConflict.js');
71
- array_unshift($scriptFiles, 'jquery-1.9.1.min.js');
72
- }
73
-
74
- foreach ($scriptFiles as $jsFile) {
75
- $headBlock->addItem('skin_js', 'js' . DS . 'lfnds_donation' . DS . basename($jsFile));
76
- }
77
-
78
- if ($helper->isOneStepCheckoutInstalled()) {
79
- $jsAdditional = '/elefunds_magento_onestep_additional.js';
80
- $headBlock->addItem('skin_js', 'js' . DS . 'lfnds_donation' . DS . 'additional' . DS . basename($jsAdditional));
81
- }
82
-
83
- // CSS included
84
- // This CSS is not used in OneStepCheckout
85
- // Check layout/lfnds_donation.xml for OneStepCheckout CSS
86
- if (!$helper->isOneStepCheckoutInstalled()) {
87
- $cssFiles = $facade->getTemplateCssFiles();
88
- foreach ($cssFiles as $cssFile) {
89
- $headBlock->addCss('css' . DS . 'lfnds_donation' . DS . basename($cssFile));
90
- }
91
- } else {
92
- $headBlock->addCss('css' . DS . 'lfnds_donation' . DS . 'additional' . DS . 'elefunds_magento_onestep_additional.css');
93
- }
94
-
95
-
96
- } catch (Exception $exception) {
97
- Mage::logException($exception);
98
- }
99
- parent::_prepareLayout();
100
- }
101
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Lfnds/Donation/Block/Sales/Order/Email.php CHANGED
@@ -50,9 +50,15 @@ class Lfnds_Donation_Block_Sales_Order_Email extends Mage_Core_Block_Template {
50
 
51
  protected function _toHtml() {
52
  $item = $this->getLayout()->getBlock('additional.product.info')->getItem();
53
-
54
  if ($item->getSku() === Lfnds_Donation_Model_Donation::ELEFUNDS_VIRTUAL_PRODUCT_SKU) {
55
- return parent::_toHtml();
 
 
 
 
 
 
56
  }
57
  return '';
58
  }
50
 
51
  protected function _toHtml() {
52
  $item = $this->getLayout()->getBlock('additional.product.info')->getItem();
53
+
54
  if ($item->getSku() === Lfnds_Donation_Model_Donation::ELEFUNDS_VIRTUAL_PRODUCT_SKU) {
55
+ $locale = Mage::app()->getLocale()->getLocaleCode();
56
+ // Magento does calculate the available csv's wrong for email templating
57
+ // Therefore the fix.
58
+ if (strpos($locale, 'de') === 0) {
59
+ return '<br /><br />Die Spende wird vereinnahmt für die elefunds Stiftung gUG und zu 100% an die ausgewählten Organisationen weitergeleitet. Der Kaufbeleg ersetzt keine Spendenbescheinigung im Sinne des Steuerrechts.';
60
+ }
61
+ return '<br /><br />' . $this->__('Your donation is processed by the elefunds Foundation gUG which forwards 100% to your chosen charities.');
62
  }
63
  return '';
64
  }
app/code/community/Lfnds/Donation/Helper/Data.php CHANGED
@@ -35,6 +35,10 @@
35
  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36
  * POSSIBILITY OF SUCH DAMAGE.
37
  */
 
 
 
 
38
 
39
  /**
40
  * General helper function to access and configure the SDK in magento
@@ -59,11 +63,6 @@ class Lfnds_Donation_Helper_Data extends Mage_Core_Helper_Abstract {
59
  */
60
  protected $facade = array();
61
 
62
- /**
63
- * @var Elefunds_Template_Shop_Helper_RequestHelper
64
- */
65
- protected $requestHelper;
66
-
67
  /**
68
  * @var array
69
  */
@@ -88,47 +87,68 @@ class Lfnds_Donation_Helper_Data extends Mage_Core_Helper_Abstract {
88
  * Configures the facade based on the plugin settings and the current locale.
89
  *
90
  * @param bool $checkoutSuccess
91
- * @param bool $autoFetchReceivers
92
- * @return Elefunds_Facade
93
  */
94
- public function getConfiguredFacade($checkoutSuccess = FALSE, $autoFetchReceivers = TRUE) {
95
  $configurationType = $checkoutSuccess ? 'CheckoutSuccess' : 'Checkout';
96
 
97
  if (!isset($this->facade[$configurationType])) {
98
 
99
- $configPath = Mage::getBaseDir('lib') . DS . 'Elefunds' . DS . 'Template'
100
- . DS . 'Shop' . DS . $configurationType . 'Configuration.php';
101
- $facadePath = Mage::getBaseDir('lib') . DS . 'Elefunds' . DS . 'Facade.php';
102
-
103
- $className = 'Elefunds_Template_Shop_'.$configurationType.'Configuration';
104
-
105
- require_once($facadePath);
106
- require_once($configPath);
107
 
108
- /** @var Elefunds_Configuration_ConfigurationInterface $configuration */
109
- $configuration = new $className();
 
 
 
 
 
 
 
 
 
 
 
 
110
 
111
- $magentoConfigBasePath = 'lfnds_donation/general';
112
- $clientId = Mage::getStoreConfig($magentoConfigBasePath . '/client_id');
113
- $apiKey = Mage::getStoreConfig($magentoConfigBasePath . '/api_key');
114
- $countryCode = substr(Mage::app()->getLocale()->getLocaleCode(), 0, 2);
115
 
116
- $configuration->setClientId($clientId)
117
- ->setApiKey($apiKey)
118
- ->setCountrycode($countryCode);
119
 
120
- $theme = Mage::getStoreConfig($magentoConfigBasePath . '/theme');
121
- $color = Mage::getStoreConfig($magentoConfigBasePath . '/color');
122
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
123
 
124
- $facade = new Elefunds_Facade($configuration);
125
- $facade->getConfiguration()->getView()->assign(
126
- 'skin',
127
- array(
128
- 'theme' => $theme,
129
- 'color' => $color
130
- )
131
- );
132
 
133
  $this->facade[$configurationType] = $facade;
134
  }
@@ -139,82 +159,13 @@ class Lfnds_Donation_Helper_Data extends Mage_Core_Helper_Abstract {
139
  /**
140
  * A helper to verify the request for elefunds donations.
141
  *
142
- * @param array $request
143
- * @return Elefunds_Template_Shop_Helper_RequestHelper
144
  */
145
- public function getRequestHelper(array $request = array()) {
146
- if ($this->requestHelper === NULL) {
147
- $helperPath = Mage::getBaseDir('lib') . DS . 'Elefunds' . DS . 'Template'
148
- . DS . 'Shop' . DS . 'Helper' . DS . 'RequestHelper.php';
149
  require_once $helperPath;
150
- $this->requestHelper = new Elefunds_Template_Shop_Helper_RequestHelper();
151
- }
152
- $this->requestHelper->setRequest($request);
153
- return $this->requestHelper;
154
- }
155
-
156
-
157
- /**
158
- * Returns a valid set of receivers.
159
- *
160
- * @return array
161
- */
162
- public function getReceivers() {
163
-
164
- if ($this->receivers === NULL) {
165
- $time = new DateTime();
166
 
167
- /** @var Lfnds_Donation_Model_Mysql4_Receiver_Collection $receiversCollection */
168
- $receiversCollection = Mage::getModel('lfnds_donation/receiver')->getCollection();
169
-
170
-
171
- $receiversCollection->addFieldToFilter(
172
- 'valid', array(
173
- 'from' => $time->format("Y-m-d H:i:s")
174
- )
175
- )
176
- ->addFieldToFilter('countrycode', substr(Mage::app()->getLocale()->getLocaleCode(), 0, 2));
177
-
178
- try {
179
- if ($receiversCollection->getSize() < 3) {
180
- $this->receivers = $this->getSyncManager()->syncReceivers();
181
-
182
- if (count($this->receivers) < 3) {
183
- // Okay, this line of code will hopefully never execute! We do ALWAYS provide three receivers.
184
- $this->receivers = array();
185
- }
186
- } else {
187
- $this->receivers = $receiversCollection;
188
- }
189
- } catch (Exception $exception) {
190
- Mage::logException($exception);
191
- Mage::log('Elefunds database tables not available or module improperly configured.');
192
-
193
- $this->receivers = array();
194
- }
195
-
196
-
197
- }
198
-
199
- return $this->receivers;
200
- }
201
-
202
- /**
203
- * Returns the available receiver ids
204
- *
205
- * @return array
206
- */
207
- public function getAvailableReceiverIds() {
208
- $ids = array();
209
- /** @var Lfnds_Donation_Model_Mysql4_Receiver_Collection $receiversCollection */
210
- $receiversCollection = Mage::getModel('lfnds_donation/receiver')->getCollection();
211
- $receiversCollection->addFieldToFilter('countrycode', substr(Mage::app()->getLocale()->getLocaleCode(), 0, 2));
212
-
213
- /** Lfnds_Donation_Model_Receiver $receiver */
214
- foreach ($receiversCollection as $receiver) {
215
- $ids[] = $receiver->getReceiverId();
216
- }
217
- return $ids;
218
  }
219
 
220
  /**
@@ -249,10 +200,14 @@ class Lfnds_Donation_Helper_Data extends Mage_Core_Helper_Abstract {
249
  * @return bool
250
  */
251
  public function isOneStepCheckoutInstalled() {
 
 
 
252
  if ($this->usesOneStepCheckout === NULL) {
253
  $this->usesOneStepCheckout = Mage::getStoreConfig('lfnds_donation/advanced/uses_onestepcheckout');
254
  }
255
  return $this->usesOneStepCheckout;
 
256
  }
257
 
258
  /**
35
  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36
  * POSSIBILITY OF SUCH DAMAGE.
37
  */
38
+ use Lfnds\Facade;
39
+ use Lfnds\Template\Shop\Helper\RequestHelper;
40
+ use Lfnds\Template\Shop\CheckoutConfiguration;
41
+ use Lfnds\Template\Shop\CheckoutSuccessConfiguration;
42
 
43
  /**
44
  * General helper function to access and configure the SDK in magento
63
  */
64
  protected $facade = array();
65
 
 
 
 
 
 
66
  /**
67
  * @var array
68
  */
87
  * Configures the facade based on the plugin settings and the current locale.
88
  *
89
  * @param bool $checkoutSuccess
90
+ * @return Facade
 
91
  */
92
+ public function getConfiguredFacade($checkoutSuccess = FALSE) {
93
  $configurationType = $checkoutSuccess ? 'CheckoutSuccess' : 'Checkout';
94
 
95
  if (!isset($this->facade[$configurationType])) {
96
 
97
+ $magentoConfigBasePath = 'lfnds_donation/general';
 
 
 
 
 
 
 
98
 
99
+ if ($checkoutSuccess) {
100
+ require_once(Mage::getBaseDir('lib') . '/Lfnds/Template/Shop/CheckoutSuccessConfiguration.php');
101
+ $configuration = new CheckoutSuccessConfiguration();
102
+ } else {
103
+ require_once(Mage::getBaseDir('lib') . '/Lfnds/Template/Shop/CheckoutConfiguration.php');
104
+ $clientId = Mage::getStoreConfig($magentoConfigBasePath . '/client_id');
105
+ $apiKey = Mage::getStoreConfig($magentoConfigBasePath . '/api_key');
106
+ $countryCode = substr(Mage::app()->getLocale()->getLocaleCode(), 0, 2);
107
+
108
+ $configuration = new CheckoutConfiguration();
109
+ $configuration->setClientId($clientId)
110
+ ->setApiKey($apiKey)
111
+ ->setCountrycode($countryCode);
112
+ }
113
 
114
+ require_once(Mage::getBaseDir('lib') . '/Lfnds/Facade.php');
115
+ $facade = new Facade($configuration);
 
 
116
 
117
+ if ($configurationType === 'Checkout') {
118
+ $theme = Mage::getStoreConfig($magentoConfigBasePath . '/theme');
119
+ $color = Mage::getStoreConfig($magentoConfigBasePath . '/color');
120
 
121
+ $localeCode = Mage::app()->getLocale()->getLocaleCode();
122
+ $symbols = Zend_Locale_Data::getList($localeCode, 'symbols');
123
 
124
+ if (preg_match('~^#(?:[0-9a-fA-F]{3}){1,2}$~', $color) !== 1) {
125
+ // If color is not a valid hexcode, we fallback to default.
126
+ $color = '#00efa2';
127
+ }
128
+ $facade->getConfiguration()->getView()->assignMultiple(
129
+ array(
130
+ 'skin' => array(
131
+ 'theme' => $theme,
132
+ 'color' => $color
133
+ ),
134
+ 'currencyDelimiter' => $symbols['decimal'],
135
+ 'formSelector' => '#donation-form',
136
+ 'totalSelector' => '#checkout-review-table tfoot tr.last .price',
137
+ 'rowContainer' => '#checkout-review-table tfoot tr.first + tr',
138
+ 'rowLabel' => 'td:first-child',
139
+ 'rowValue' => 'td.last'
140
+ )
141
+ );
142
+
143
+ $facade->getConfiguration()->getView()->assign(
144
+ 'skin',
145
+ array(
146
+ 'theme' => $theme,
147
+ 'color' => $color
148
+ )
149
+ );
150
 
151
+ }
 
 
 
 
 
 
 
152
 
153
  $this->facade[$configurationType] = $facade;
154
  }
159
  /**
160
  * A helper to verify the request for elefunds donations.
161
  *
162
+ * @return RequestHelper
 
163
  */
164
+ public function getRequestHelper() {
165
+ $helperPath = Mage::getBaseDir('lib') . '/Lfnds/Template/Shop/Helper/RequestHelper.php';
 
 
166
  require_once $helperPath;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
167
 
168
+ return new RequestHelper();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
169
  }
170
 
171
  /**
200
  * @return bool
201
  */
202
  public function isOneStepCheckoutInstalled() {
203
+ return FALSE;
204
+
205
+ /** +++ Disabled for 2.0.0 +++ *
206
  if ($this->usesOneStepCheckout === NULL) {
207
  $this->usesOneStepCheckout = Mage::getStoreConfig('lfnds_donation/advanced/uses_onestepcheckout');
208
  }
209
  return $this->usesOneStepCheckout;
210
+ * ^^^ Disabled for 2.0.0 ^^^ */
211
  }
212
 
213
  /**
app/code/community/Lfnds/Donation/Manager/SyncManager.php CHANGED
@@ -35,6 +35,9 @@
35
  * POSSIBILITY OF SUCH DAMAGE.
36
  */
37
 
 
 
 
38
  /**
39
  * Syncs between database and API.
40
  *
@@ -50,73 +53,19 @@ class Lfnds_Donation_Manager_SyncManager
50
  {
51
 
52
  /**
53
- * @var Elefunds_Facade
54
  */
55
  protected $facade;
56
 
57
  /**
58
  * Initialisation of the sync process.
59
  *
60
- * @param Elefunds_Facade $facade
61
  */
62
- public function __construct(Elefunds_Facade $facade) {
63
  $this->facade = $facade;
64
  }
65
 
66
- /**
67
- * Retrieves fresh sets of receivers.
68
- *
69
- * The sync is done for the german and english language. For convenience,
70
- * the receivers of the current magento locale are returned.
71
- *
72
- * @return array with receivers of the facade's original countrycode
73
- */
74
- public function syncReceivers() {
75
-
76
- /** @var Lfnds_Donation_Model_Mysql4_Receiver_Collection $receiverCollection */
77
- $receiverCollection = Mage::getModel('lfnds_donation/receiver')->getCollection();
78
-
79
- // We want this to be available from anywhere, so we do not set state!
80
- $originalCountryCode = $this->facade->getConfiguration()->getCountrycode();
81
-
82
- $returnedReceivers = array();
83
- $germanReceivers = array();
84
- $englishReceivers = array();
85
-
86
- try {
87
- $this->facade->getConfiguration()->setCountrycode('de');
88
- $germanReceivers = $this->facade->getReceivers();
89
-
90
- $this->facade->getConfiguration()->setCountrycode('en');
91
- $englishReceivers = $this->facade->getReceivers();
92
-
93
- } catch (Elefunds_Exception_ElefundsCommunicationException $exception) {
94
- // Pass, we still use the old receivers.
95
- }
96
-
97
- if (count($germanReceivers) > 0) {
98
- $receiverCollection->removeByLanguage('de')
99
- ->mapArrayOfSDKReceiversToEntitiesAndSave($germanReceivers, 'de');
100
- }
101
-
102
- if (count($englishReceivers) > 0) {
103
- $receiverCollection->removeByLanguage('en')
104
- ->mapArrayOfSDKReceiversToEntitiesAndSave($englishReceivers, 'en');
105
- }
106
-
107
- if ($originalCountryCode === 'de') {
108
- $returnedReceivers = $germanReceivers;
109
- }
110
-
111
- if ($originalCountryCode === 'en') {
112
- $returnedReceivers = $englishReceivers;
113
- }
114
-
115
- $this->facade->getConfiguration()->setCountrycode($originalCountryCode);
116
-
117
- return $returnedReceivers;
118
- }
119
-
120
  /**
121
  * Syncs all donations to the API.
122
  *
@@ -160,7 +109,7 @@ class Lfnds_Donation_Manager_SyncManager
160
  try {
161
  $this->facade->addDonations($this->mapArrayOfEntitiesToSDKObject($donationsToBeAdded));
162
  $donationCollection->setStates($donationsToBeAdded, Lfnds_Donation_Model_Donation::PENDING);
163
- } catch (Elefunds_Exception_ElefundsCommunicationException $exception) {
164
  $donationCollection->setStates($donationsToBeAdded, Lfnds_Donation_Model_Donation::SCHEDULED_FOR_ADDING);
165
  }
166
 
@@ -168,7 +117,7 @@ class Lfnds_Donation_Manager_SyncManager
168
  try {
169
  $this->facade->cancelDonations(array_keys($donationsToBeCancelled));
170
  $donationCollection->setStates($donationsToBeCancelled, Lfnds_Donation_Model_Donation::CANCELLED);
171
- } catch (Elefunds_Exception_ElefundsCommunicationException $exception) {
172
  $donationCollection->setStates($donationsToBeCancelled, Lfnds_Donation_Model_Donation::SCHEDULED_FOR_CANCELLATION);
173
  }
174
 
@@ -176,7 +125,7 @@ class Lfnds_Donation_Manager_SyncManager
176
  try {
177
  $this->facade->completeDonations(array_keys($donationsToBeCompleted));
178
  $donationCollection->setStates($donationsToBeCompleted, Lfnds_Donation_Model_Donation::COMPLETED);
179
- } catch (Elefunds_Exception_ElefundsCommunicationException $exception) {
180
  $donationCollection->setStates($donationsToBeCompleted, Lfnds_Donation_Model_Donation::SCHEDULED_FOR_COMPLETION);
181
  }
182
 
@@ -193,7 +142,7 @@ class Lfnds_Donation_Manager_SyncManager
193
 
194
  $sdkDonations = array();
195
 
196
- /** @var Donation $donationModel */
197
  foreach ($donationModels as $donationModel) {
198
 
199
  $donation = $this->facade->createDonation()
35
  * POSSIBILITY OF SUCH DAMAGE.
36
  */
37
 
38
+ use Lfnds\Exception\ElefundsCommunicationException;
39
+ use Lfnds\Facade;
40
+
41
  /**
42
  * Syncs between database and API.
43
  *
53
  {
54
 
55
  /**
56
+ * @var Facade
57
  */
58
  protected $facade;
59
 
60
  /**
61
  * Initialisation of the sync process.
62
  *
63
+ * @param Facade $facade
64
  */
65
+ public function __construct(Facade $facade) {
66
  $this->facade = $facade;
67
  }
68
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
  /**
70
  * Syncs all donations to the API.
71
  *
109
  try {
110
  $this->facade->addDonations($this->mapArrayOfEntitiesToSDKObject($donationsToBeAdded));
111
  $donationCollection->setStates($donationsToBeAdded, Lfnds_Donation_Model_Donation::PENDING);
112
+ } catch (ElefundsCommunicationException $exception) {
113
  $donationCollection->setStates($donationsToBeAdded, Lfnds_Donation_Model_Donation::SCHEDULED_FOR_ADDING);
114
  }
115
 
117
  try {
118
  $this->facade->cancelDonations(array_keys($donationsToBeCancelled));
119
  $donationCollection->setStates($donationsToBeCancelled, Lfnds_Donation_Model_Donation::CANCELLED);
120
+ } catch (ElefundsCommunicationException $exception) {
121
  $donationCollection->setStates($donationsToBeCancelled, Lfnds_Donation_Model_Donation::SCHEDULED_FOR_CANCELLATION);
122
  }
123
 
125
  try {
126
  $this->facade->completeDonations(array_keys($donationsToBeCompleted));
127
  $donationCollection->setStates($donationsToBeCompleted, Lfnds_Donation_Model_Donation::COMPLETED);
128
+ } catch (ElefundsCommunicationException $exception) {
129
  $donationCollection->setStates($donationsToBeCompleted, Lfnds_Donation_Model_Donation::SCHEDULED_FOR_COMPLETION);
130
  }
131
 
142
 
143
  $sdkDonations = array();
144
 
145
+ /** @var Lfnds_Donation_Model_Donation $donationModel */
146
  foreach ($donationModels as $donationModel) {
147
 
148
  $donation = $this->facade->createDonation()
app/code/community/Lfnds/Donation/Model/Donation.php CHANGED
@@ -109,7 +109,7 @@ class Lfnds_Donation_Model_Donation extends Mage_Core_Model_Abstract
109
  * @return array
110
  */
111
  public function getReceiverIds() {
112
- return array_map(function($x) { return (int)$x;}, explode(',',parent::getReceiverIds()));
113
  }
114
 
115
  /**
@@ -130,7 +130,7 @@ class Lfnds_Donation_Model_Donation extends Mage_Core_Model_Abstract
130
  * @return array
131
  */
132
  public function getAvailableReceiverIds() {
133
- return array_map(function($x) { return (int)$x;}, explode(',',parent::getAvailableReceiverIds()));
134
  }
135
 
136
 
109
  * @return array
110
  */
111
  public function getReceiverIds() {
112
+ return array_map(function($x) { return (int)$x;}, explode(',', parent::getReceiverIds()));
113
  }
114
 
115
  /**
130
  * @return array
131
  */
132
  public function getAvailableReceiverIds() {
133
+ return array_map(function($x) { return (int)$x;}, explode(',', parent::getAvailableReceiverIds()));
134
  }
135
 
136
 
app/code/community/Lfnds/Donation/Model/Mysql4/Receiver/Collection.php DELETED
@@ -1,103 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * elefunds Magento Module
5
- *
6
- * Copyright (c) 2012, elefunds GmbH <hello@elefunds.de>.
7
- * All rights reserved.
8
- *
9
- * Redistribution and use in source and binary forms, with or without
10
- * modification, are permitted provided that the following conditions
11
- * are met:
12
- *
13
- * * Redistributions of source code must retain the above copyright
14
- * notice, this list of conditions and the following disclaimer.
15
- *
16
- * * Redistributions in binary form must reproduce the above copyright
17
- * notice, this list of conditions and the following disclaimer in
18
- * the documentation and/or other materials provided with the
19
- * distribution.
20
- *
21
- * * Neither the name of the elefunds GmbH nor the names of its
22
- * contributors may be used to endorse or promote products derived
23
- * from this software without specific prior written permission.
24
- *
25
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
28
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
29
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
30
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
31
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
32
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
33
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
35
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36
- * POSSIBILITY OF SUCH DAMAGE.
37
- */
38
-
39
- /**
40
- * General helper function to access and configure the SDK in magento
41
- *
42
- * @package elefunds Magento Module
43
- * @subpackage Model
44
- * @author Raul Armando Salamanca Gonzalez <raul.salamanca@gmx.de>, Christian Peters <christian@elefunds.de>
45
- * @copyright 2012 elefunds GmbH <hello@elefunds.de>
46
- * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
47
- * @link http://www.elefunds.de
48
- * @since File available since Release 1.0.0
49
- */
50
- class Lfnds_Donation_Model_Mysql4_Receiver_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
51
- {
52
- public function _construct()
53
- {
54
- $this->_init('lfnds_donation/receiver');
55
- }
56
-
57
- /**
58
- * Removes receivers by given language.
59
- *
60
- * @param string $code
61
- * @return $this
62
- */
63
- public function removeByLanguage($code) {
64
-
65
- $receivers = $this->addFieldToFilter('countrycode', $code);
66
- /** @var Lfnds_Donation_Model_Receiver $receiver */
67
- foreach ($receivers as $receiver) {
68
- $receiver->delete();
69
- }
70
-
71
- return $this->_reset();
72
- }
73
-
74
- /**
75
- * Maps an array of receivers (as returned from the SDK) to a doctrine model.
76
- *
77
- * @param array $receivers that are implementing Elefunds_Model_ReceiverInterface
78
- * @param string $languageCode
79
- *
80
- * @return $this
81
- */
82
- public function mapArrayOfSDKReceiversToEntitiesAndSave(array $receivers, $languageCode) {
83
-
84
- /** @var Elefunds_Model_ReceiverInterface $receiver */
85
- foreach ($receivers as $receiver) {
86
- /** @var Lfnds_Donation_Model_Receiver $entity */
87
- $entity = Mage::getModel('lfnds_donation/receiver');
88
- $entity->setReceiverId($receiver->getId())
89
- ->setName($receiver->getName())
90
- ->setImage($receiver->getImage('horizontal', 'medium'))
91
- ->setValid($receiver->getValidTime())
92
- ->setDescription($receiver->getDescription())
93
- ->setCountrycode($languageCode);
94
-
95
- try {
96
- $entity->save();
97
- } catch (Exception $exception) {
98
- Mage::logException($exception);
99
- }
100
- }
101
- return $this;
102
- }
103
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Lfnds/Donation/Model/Observer.php CHANGED
@@ -36,6 +36,8 @@
36
  * POSSIBILITY OF SUCH DAMAGE.
37
  */
38
 
 
 
39
  /**
40
  * Watches for events that are interacting with the elefunds module.
41
  *
@@ -68,10 +70,8 @@ class Lfnds_Donation_Model_Observer
68
  */
69
  public function onPreDispatchSaveOrder(Varien_Event_Observer $observer) {
70
 
71
- $params = Mage::app()->getRequest()->getParams();
72
-
73
- /** @var Elefunds_Template_Shop_Helper_RequestHelper $requestHelper */
74
- $requestHelper = $this->helper->getRequestHelper($params);
75
  if ($requestHelper->isActiveAndValid()) {
76
 
77
  /** @var Mage_Checkout_Model_Session $checkoutSession */
@@ -90,7 +90,7 @@ class Lfnds_Donation_Model_Observer
90
  return;
91
  }
92
 
93
- $roundUpAsFloat = $requestHelper->getRoundUpAsFloat();
94
  $elefundsProduct->setPrice($roundUpAsFloat);
95
  $elefundsProduct->setBasePrice($roundUpAsFloat);
96
  $quote->addProduct($elefundsProduct);
@@ -107,10 +107,8 @@ class Lfnds_Donation_Model_Observer
107
  */
108
  public function onSaveOrderAfter(Varien_Event_Observer $observer) {
109
 
110
- $params = Mage::app()->getRequest()->getParams();
111
-
112
- /** @var Elefunds_Template_Shop_Helper_RequestHelper $requestHelper */
113
- $requestHelper = $this->helper->getRequestHelper($params);
114
 
115
  if($requestHelper->isActiveAndValid()) {
116
 
@@ -139,7 +137,7 @@ class Lfnds_Donation_Model_Observer
139
  $requestHelper->getRoundUp(),
140
  $order->getTotalDue() * 100,
141
  $requestHelper->getReceiverIds(),
142
- $this->helper->getAvailableReceiverIds(),
143
  $user,
144
  $order->getBillingAddress()->getCountryId(),
145
  $requestHelper->getSuggestedRoundUp(),
@@ -278,7 +276,7 @@ class Lfnds_Donation_Model_Observer
278
  $elefundsItem = NULL;
279
  /** @var Mage_Sales_Model_Order_Item $item */
280
  foreach ($order->getAllItems() as $item) {
281
- if ($item->getSku() === Lfnds_Donation_Model_Donation::ELEFUNDS_VIRTUAL_PRODUCT_SKU) {
282
  $elefundsItem = $item;
283
  break;
284
  }
@@ -301,7 +299,7 @@ class Lfnds_Donation_Model_Observer
301
 
302
  /** @var Mage_Sales_Model_Quote_Item $item */
303
  foreach ($allItems as $item) {
304
- if ($item->getSku() !== Lfnds_Donation_Model_Donation::ELEFUNDS_VIRTUAL_PRODUCT_SKU) {
305
  $quote->addItem($item);
306
  }
307
  }
@@ -317,6 +315,7 @@ class Lfnds_Donation_Model_Observer
317
  /** @var Lfnds_Donation_Block_Checkout_Banner $block */
318
  $block = $observer->getEvent()->getObject();
319
 
 
320
  try {
321
  $paymentCode = Mage::getSingleton('checkout/session')->getQuote()
322
  ->getPayment()
@@ -348,4 +347,5 @@ class Lfnds_Donation_Model_Observer
348
  $quoteItem->setDiscountCalculationPrice(0);
349
  }
350
  }
 
351
  }
36
  * POSSIBILITY OF SUCH DAMAGE.
37
  */
38
 
39
+ use Lfnds\Template\Shop\Helper\RequestHelper;
40
+
41
  /**
42
  * Watches for events that are interacting with the elefunds module.
43
  *
70
  */
71
  public function onPreDispatchSaveOrder(Varien_Event_Observer $observer) {
72
 
73
+ /** @var RequestHelper $requestHelper */
74
+ $requestHelper = $this->helper->getRequestHelper();
 
 
75
  if ($requestHelper->isActiveAndValid()) {
76
 
77
  /** @var Mage_Checkout_Model_Session $checkoutSession */
90
  return;
91
  }
92
 
93
+ $roundUpAsFloat = $requestHelper->getRoundUpAsFloatedString();
94
  $elefundsProduct->setPrice($roundUpAsFloat);
95
  $elefundsProduct->setBasePrice($roundUpAsFloat);
96
  $quote->addProduct($elefundsProduct);
107
  */
108
  public function onSaveOrderAfter(Varien_Event_Observer $observer) {
109
 
110
+ /** @var RequestHelper $requestHelper */
111
+ $requestHelper = $this->helper->getRequestHelper();
 
 
112
 
113
  if($requestHelper->isActiveAndValid()) {
114
 
137
  $requestHelper->getRoundUp(),
138
  $order->getTotalDue() * 100,
139
  $requestHelper->getReceiverIds(),
140
+ $requestHelper->getAvailableReceiverIds(),
141
  $user,
142
  $order->getBillingAddress()->getCountryId(),
143
  $requestHelper->getSuggestedRoundUp(),
276
  $elefundsItem = NULL;
277
  /** @var Mage_Sales_Model_Order_Item $item */
278
  foreach ($order->getAllItems() as $item) {
279
+ if (strtolower($item->getSku()) === Lfnds_Donation_Model_Donation::ELEFUNDS_VIRTUAL_PRODUCT_SKU) {
280
  $elefundsItem = $item;
281
  break;
282
  }
299
 
300
  /** @var Mage_Sales_Model_Quote_Item $item */
301
  foreach ($allItems as $item) {
302
+ if (strtolower($item->getSku()) !== Lfnds_Donation_Model_Donation::ELEFUNDS_VIRTUAL_PRODUCT_SKU) {
303
  $quote->addItem($item);
304
  }
305
  }
315
  /** @var Lfnds_Donation_Block_Checkout_Banner $block */
316
  $block = $observer->getEvent()->getObject();
317
 
318
+ $paymentCode = NULL;
319
  try {
320
  $paymentCode = Mage::getSingleton('checkout/session')->getQuote()
321
  ->getPayment()
347
  $quoteItem->setDiscountCalculationPrice(0);
348
  }
349
  }
350
+
351
  }
app/code/community/Lfnds/Donation/Model/Receiver.php DELETED
@@ -1,105 +0,0 @@
1
- <?php
2
- /**
3
- * elefunds Magento Module
4
- *
5
- * Copyright (c) 2012, elefunds GmbH <hello@elefunds.de>.
6
- * All rights reserved.
7
- *
8
- * Redistribution and use in source and binary forms, with or without
9
- * modification, are permitted provided that the following conditions
10
- * are met:
11
- *
12
- * * Redistributions of source code must retain the above copyright
13
- * notice, this list of conditions and the following disclaimer.
14
- *
15
- * * Redistributions in binary form must reproduce the above copyright
16
- * notice, this list of conditions and the following disclaimer in
17
- * the documentation and/or other materials provided with the
18
- * distribution.
19
- *
20
- * * Neither the name of the elefunds GmbH nor the names of its
21
- * contributors may be used to endorse or promote products derived
22
- * from this software without specific prior written permission.
23
- *
24
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
27
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
28
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
29
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
30
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
31
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
32
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
34
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35
- * POSSIBILITY OF SUCH DAMAGE.
36
- */
37
-
38
- /**
39
- * Elefunds Receiver Model
40
- *
41
- * @package elefunds Magento Module
42
- * @subpackage Model
43
- * @author Raul Armando Salamanca Gonzalez <raul.salamanca@gmx.de>
44
- * @copyright 2012 elefunds GmbH <hello@elefunds.de>
45
- * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
46
- * @link http://www.elefunds.de
47
- * @since File available since Release 1.0.0
48
- */
49
- class Lfnds_Donation_Model_Receiver extends Mage_Core_Model_Abstract
50
- {
51
- protected $_eventPrefix = 'elefunds_receiver';
52
-
53
- /**
54
- * We want to have the receiver model interchangeable with the SDK receivers.
55
- * Since getID is reserved, we provide an additional parameter that selectively
56
- * bypasses this behaviour.
57
- *
58
- * @param bool $bypassInternalIdentifier
59
- * @return int
60
- */
61
- public function getId($bypassInternalIdentifier = FALSE) {
62
- if ($bypassInternalIdentifier) {
63
- return $this->getReceiverId();
64
- } else {
65
- return parent::getId();
66
- }
67
- }
68
-
69
- /**
70
- * This methods just fakes the SDK signature to make calls interchangeable.
71
- *
72
- * @param string $direction
73
- * @param string $size
74
- * @return string
75
- */
76
- public function getImage($direction, $size) {
77
- return parent::getImage();
78
- }
79
-
80
- /**
81
- * Timestamp wrapper for time.
82
- *
83
- * @param DateTime $time
84
- * @return $this
85
- */
86
- public function setValid(DateTime $time) {
87
- parent::setValid($time->format('Y-m-d H:i:s'));
88
- return $this;
89
- }
90
-
91
- /**
92
- * Timestamp wrapper for time.
93
- *
94
- * @return DateTime
95
- */
96
- public function getValid() {
97
- return Datetime::createFromFormat('Y-m-d H:i:s', parent::getValid(), new DateTimeZone('UTC'));
98
- }
99
-
100
- protected function _construct()
101
- {
102
- $this->_init('lfnds_donation/receiver');
103
- }
104
-
105
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Lfnds/Donation/Model/System/Config/Source/Color.php DELETED
@@ -1,76 +0,0 @@
1
- <?php
2
- /**
3
- * elefunds Magento Module
4
- *
5
- * Copyright (c) 2012, elefunds GmbH <hello@elefunds.de>.
6
- * All rights reserved.
7
- *
8
- * Redistribution and use in source and binary forms, with or without
9
- * modification, are permitted provided that the following conditions
10
- * are met:
11
- *
12
- * * Redistributions of source code must retain the above copyright
13
- * notice, this list of conditions and the following disclaimer.
14
- *
15
- * * Redistributions in binary form must reproduce the above copyright
16
- * notice, this list of conditions and the following disclaimer in
17
- * the documentation and/or other materials provided with the
18
- * distribution.
19
- *
20
- * * Neither the name of the elefunds GmbH nor the names of its
21
- * contributors may be used to endorse or promote products derived
22
- * from this software without specific prior written permission.
23
- *
24
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
27
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
28
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
29
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
30
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
31
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
32
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
34
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35
- * POSSIBILITY OF SUCH DAMAGE.
36
- */
37
-
38
- /**
39
- * Retrieves available themes.
40
- *
41
- * @package elefunds Magento Module
42
- * @subpackage Model
43
- * @author Christian Peters, <christian@elefunds.de>
44
- * @copyright 2012 elefunds GmbH <hello@elefunds.de>
45
- * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
46
- * @link http://www.elefunds.de
47
- * @since File available since Release 1.0.0
48
- */
49
- class Lfnds_Donation_Model_System_Config_Source_Color
50
- {
51
- protected $_options;
52
-
53
- public function toOptionArray()
54
- {
55
- /** @var Lfnds_Donation_Helper_Data $helper */
56
- $helper = Mage::helper('lfnds_donation');
57
- $facade = $helper->getConfiguredFacade(TRUE);
58
- if (!$this->_options) {
59
-
60
- /** @var Elefunds_Template_Shop_ShopConfiguration $configuration */
61
- $configuration = $facade->getConfiguration();
62
- $colors = $configuration->getAvailableColors();
63
-
64
- foreach ($colors as $color) {
65
- $optionsArray[] = array(
66
- 'value' => $color,
67
- 'label' => $color,
68
- );
69
- }
70
-
71
- $this->_options = $optionsArray;
72
- }
73
-
74
- return $this->_options;
75
- }
76
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Lfnds/Donation/Model/System/Config/Source/Theme.php CHANGED
@@ -34,6 +34,7 @@
34
  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35
  * POSSIBILITY OF SUCH DAMAGE.
36
  */
 
37
 
38
  /**
39
  * Retrieves available themes.
@@ -54,10 +55,10 @@ class Lfnds_Donation_Model_System_Config_Source_Theme
54
  {
55
  /** @var Lfnds_Donation_Helper_Data $helper */
56
  $helper = Mage::helper('lfnds_donation');
57
- $facade = $helper->getConfiguredFacade(TRUE);
58
  if (!$this->_options) {
59
 
60
- /** @var Elefunds_Template_Shop_ShopConfiguration $configuration */
61
  $configuration = $facade->getConfiguration();
62
  $themes = $configuration->getAvailableThemes();
63
 
34
  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35
  * POSSIBILITY OF SUCH DAMAGE.
36
  */
37
+ use Lfnds\Template\Shop\CheckoutConfiguration;
38
 
39
  /**
40
  * Retrieves available themes.
55
  {
56
  /** @var Lfnds_Donation_Helper_Data $helper */
57
  $helper = Mage::helper('lfnds_donation');
58
+ $facade = $helper->getConfiguredFacade();
59
  if (!$this->_options) {
60
 
61
+ /** @var CheckoutConfiguration $configuration */
62
  $configuration = $facade->getConfiguration();
63
  $themes = $configuration->getAvailableThemes();
64
 
app/code/community/Lfnds/Donation/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Lfnds_Donation>
5
- <version>1.0.0</version>
6
  </Lfnds_Donation>
7
  </modules>
8
 
@@ -18,13 +18,9 @@
18
  <donation>
19
  <table>lfnds_donation_donation</table>
20
  </donation>
21
- <receiver>
22
- <table>lfnds_donation_receiver</table>
23
- </receiver>
24
  </entities>
25
  </donation_mysql4>
26
  </models>
27
-
28
  <blocks>
29
  <lfnds_donation>
30
  <class>Lfnds_Donation_Block</class>
@@ -73,6 +69,7 @@
73
  </observers>
74
  </sales_convert_order_to_quote>
75
  </events>
 
76
  </global>
77
 
78
  <adminhtml>
@@ -205,13 +202,14 @@
205
  <general>
206
  <active>0</active>
207
  <theme>light</theme>
208
- <color>orange</color>
209
  </general>
210
  <advanced>
211
  <include_jquery>1</include_jquery>
212
- <banner_width>681</banner_width>
213
- <banner_position>bottom</banner_position>
214
- <uses_onestepcheckout>0</uses_onestepcheckout>
 
215
  </advanced>
216
  </lfnds_donation>
217
  </default>
2
  <config>
3
  <modules>
4
  <Lfnds_Donation>
5
+ <version>2.0.0</version>
6
  </Lfnds_Donation>
7
  </modules>
8
 
18
  <donation>
19
  <table>lfnds_donation_donation</table>
20
  </donation>
 
 
 
21
  </entities>
22
  </donation_mysql4>
23
  </models>
 
24
  <blocks>
25
  <lfnds_donation>
26
  <class>Lfnds_Donation_Block</class>
69
  </observers>
70
  </sales_convert_order_to_quote>
71
  </events>
72
+
73
  </global>
74
 
75
  <adminhtml>
202
  <general>
203
  <active>0</active>
204
  <theme>light</theme>
205
+ <color>#00efa2</color>
206
  </general>
207
  <advanced>
208
  <include_jquery>1</include_jquery>
209
+ <banner_position>top</banner_position>
210
+ <!-- +++ Disabled for 2.0.0 +++ -->
211
+ <!--<uses_onestepcheckout>0</uses_onestepcheckout>-->
212
+ <!-- ^^^ Disabled for 2.0.0 ^^^ -->
213
  </advanced>
214
  </lfnds_donation>
215
  </default>
app/code/community/Lfnds/Donation/etc/system.xml CHANGED
@@ -61,8 +61,7 @@
61
  </theme>
62
  <color translate="label comment">
63
  <label>Color</label>
64
- <frontend_type>select</frontend_type>
65
- <source_model>lfnds_donation/system_config_source_color</source_model>
66
  <show_in_default>1</show_in_default>
67
  <show_in_website>1</show_in_website>
68
  <show_in_store>1</show_in_store>
@@ -78,15 +77,6 @@
78
  <show_in_website>1</show_in_website>
79
  <show_in_store>1</show_in_store>
80
  <fields>
81
- <banner_width translate="label comment">
82
- <label>Banner width</label>
83
- <frontend_type>text</frontend_type>
84
- <show_in_default>1</show_in_default>
85
- <show_in_website>1</show_in_website>
86
- <show_in_store>1</show_in_store>
87
- <sort_order>10</sort_order>
88
- <comment>The modul width in pixel. Adjust this number if the modul does not fit perfectly in your checkout.</comment>
89
- </banner_width>
90
  <banner_position translate="label comment">
91
  <label>Banner position</label>
92
  <frontend_type>select</frontend_type>
@@ -94,29 +84,21 @@
94
  <show_in_default>1</show_in_default>
95
  <show_in_website>1</show_in_website>
96
  <show_in_store>1</show_in_store>
97
- <sort_order>20</sort_order>
98
  <comment>Choose where to position the module relative to the article listing.</comment>
99
  </banner_position>
100
- <include_jquery translate="label">
101
- <label>Include jQuery</label>
102
- <frontend_type>select</frontend_type>
103
- <source_model>adminhtml/system_config_source_yesno</source_model>
104
- <show_in_default>1</show_in_default>
105
- <show_in_website>1</show_in_website>
106
- <show_in_store>1</show_in_store>
107
- <sort_order>30</sort_order>
108
- <comment>Load jQuery in the frontend, if it's not already loaded.</comment>
109
- </include_jquery>
110
- <uses_onestepcheckout translate="label comment">
111
- <label>Uses one step checkout?</label>
112
- <frontend_type>select</frontend_type>
113
- <source_model>adminhtml/system_config_source_yesno</source_model>
114
- <show_in_default>1</show_in_default>
115
- <show_in_website>1</show_in_website>
116
- <show_in_store>1</show_in_store>
117
- <sort_order>40</sort_order>
118
- <comment>Set to yes, if your shop uses the module from onestepcheckout.com.</comment>
119
- </uses_onestepcheckout>
120
  <excluded_payment_methods translate="label comment">
121
  <label>Excluded payment methods</label>
122
  <frontend_type>multiselect</frontend_type>
@@ -124,7 +106,7 @@
124
  <show_in_default>1</show_in_default>
125
  <show_in_website>1</show_in_website>
126
  <show_in_store>1</show_in_store>
127
- <sort_order>50</sort_order>
128
  <comment>Elefunds won't be displayed in the selected payment methods.</comment>
129
  <can_be_empty>1</can_be_empty>
130
  </excluded_payment_methods>
61
  </theme>
62
  <color translate="label comment">
63
  <label>Color</label>
64
+ <frontend_type>text</frontend_type>
 
65
  <show_in_default>1</show_in_default>
66
  <show_in_website>1</show_in_website>
67
  <show_in_store>1</show_in_store>
77
  <show_in_website>1</show_in_website>
78
  <show_in_store>1</show_in_store>
79
  <fields>
 
 
 
 
 
 
 
 
 
80
  <banner_position translate="label comment">
81
  <label>Banner position</label>
82
  <frontend_type>select</frontend_type>
84
  <show_in_default>1</show_in_default>
85
  <show_in_website>1</show_in_website>
86
  <show_in_store>1</show_in_store>
87
+ <sort_order>10</sort_order>
88
  <comment>Choose where to position the module relative to the article listing.</comment>
89
  </banner_position>
90
+ <!-- +++ Disabled for 2.0.0 +++ -->
91
+ <!--<uses_onestepcheckout translate="label comment">-->
92
+ <!--<label>Uses one step checkout?</label>-->
93
+ <!--<frontend_type>select</frontend_type>-->
94
+ <!--<source_model>adminhtml/system_config_source_yesno</source_model>-->
95
+ <!--<show_in_default>1</show_in_default>-->
96
+ <!--<show_in_website>1</show_in_website>-->
97
+ <!--<show_in_store>1</show_in_store>-->
98
+ <!--<sort_order>20</sort_order>-->
99
+ <!--<comment>Set to yes, if your shop uses the module from onestepcheckout.com.</comment>-->
100
+ <!--</uses_onestepcheckout>-->
101
+ <!-- ^^^ Disabled for 2.0.0 ^^^ -->
 
 
 
 
 
 
 
 
102
  <excluded_payment_methods translate="label comment">
103
  <label>Excluded payment methods</label>
104
  <frontend_type>multiselect</frontend_type>
106
  <show_in_default>1</show_in_default>
107
  <show_in_website>1</show_in_website>
108
  <show_in_store>1</show_in_store>
109
+ <sort_order>30</sort_order>
110
  <comment>Elefunds won't be displayed in the selected payment methods.</comment>
111
  <can_be_empty>1</can_be_empty>
112
  </excluded_payment_methods>
app/code/community/Lfnds/Donation/sql/lfnds_donation_setup/mysql4-install-1.0.0.php CHANGED
@@ -157,7 +157,7 @@ if (!$installer->tableExists('lfnds_donation_donation')) {
157
  ), 'Donation ID')
158
  ->addColumn('foreign_id', Varien_Db_Ddl_Table::TYPE_VARCHAR, 255, array(
159
  'nullable' => FALSE,
160
- ), 'Store ID')
161
  ->addColumn('amount', Varien_Db_Ddl_Table::TYPE_INTEGER, NULL, array(
162
  'nullable' => TRUE,
163
  ), 'Amount')
157
  ), 'Donation ID')
158
  ->addColumn('foreign_id', Varien_Db_Ddl_Table::TYPE_VARCHAR, 255, array(
159
  'nullable' => FALSE,
160
+ ), 'ForeignId ID')
161
  ->addColumn('amount', Varien_Db_Ddl_Table::TYPE_INTEGER, NULL, array(
162
  'nullable' => TRUE,
163
  ), 'Amount')
app/code/community/Lfnds/Donation/{Model/Mysql4/Receiver.php → sql/lfnds_donation_setup/mysql4-upgrade-1.0.0-2.0.0.php} RENAMED
@@ -3,7 +3,7 @@
3
  /**
4
  * elefunds Magento Module
5
  *
6
- * Copyright (c) 2012, elefunds GmbH <hello@elefunds.de>.
7
  * All rights reserved.
8
  *
9
  * Redistribution and use in source and binary forms, with or without
@@ -37,20 +37,22 @@
37
  */
38
 
39
  /**
40
- * General helper function to access and configure the SDK in magento
41
  *
42
  * @package elefunds Magento Module
43
- * @subpackage Model
44
- * @author Raul Armando Salamanca Gonzalez <raul.salamanca@gmx.de>
45
  * @copyright 2012 elefunds GmbH <hello@elefunds.de>
46
  * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
47
  * @link http://www.elefunds.de
48
- * @since File available since Release 1.0.0
49
  */
50
- class Lfnds_Donation_Model_Mysql4_Receiver extends Mage_Core_Model_Mysql4_Abstract
51
- {
52
- public function _construct()
53
- {
54
- $this->_init('lfnds_donation/receiver', 'internal_identifier');
55
- }
56
- }
 
 
3
  /**
4
  * elefunds Magento Module
5
  *
6
+ * Copyright (c) 2013, elefunds GmbH <hello@elefunds.de>.
7
  * All rights reserved.
8
  *
9
  * Redistribution and use in source and binary forms, with or without
37
  */
38
 
39
  /**
40
+ * Upgrade script for 2.0
41
  *
42
  * @package elefunds Magento Module
43
+ * @subpackage sql
44
+ * @author Christian Peters <christian@elefunds.de>
45
  * @copyright 2012 elefunds GmbH <hello@elefunds.de>
46
  * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
47
  * @link http://www.elefunds.de
48
+ * @since File available since Release 2.0.0
49
  */
50
+
51
+ /**
52
+ * @var $this Mage_Core_Model_Resource_Setup
53
+ */
54
+ $receiverTable = $this->getTable('lfnds_donation_receiver');
55
+ $this->run("DROP TABLE IF EXISTS $receiverTable");
56
+
57
+ $donationTable = $this->getTable('lfnds_donation_donation');
58
+ $this->run("ALTER TABLE $donationTable MODIFY COLUMN donator_zip VARCHAR(12)");
app/design/frontend/base/default/layout/lfnds_donation.xml CHANGED
@@ -5,9 +5,11 @@
5
  <layout version="0.1.0">
6
  <checkout_onepage_index>
7
  <reference name="head">
8
- <action method="addItem"><type>skin_css</type><name>css/lfnds_donation/additional/elefunds_magento_additional.css</name></action>
9
- <block type="lfnds_donation/page_head" name="elefunds.head"/>
10
- <action method="addItem"><type>skin_js</type><name>js/lfnds_donation/additional/elefunds_magento_onepage_additional.js</name></action>
 
 
11
  </reference>
12
  </checkout_onepage_index>
13
 
@@ -21,17 +23,26 @@
21
  </checkout_onepage_review>
22
 
23
  <checkout_onepage_success>
24
- <!-- head was added by code, so it will be loaded only if a donation was done! -->
 
 
 
 
 
 
25
  <reference name="content">
26
- <block type="lfnds_donation/checkout_socialmedia" name="checkout.onepage.sucess.socialmedia" after="checkout.success" as="elefunds.socialmedia" template="lfnds/donation/checkout/onepage/socialmedia.phtml" />
27
  </reference>
28
  </checkout_onepage_success>
29
 
30
  <!-- +++ One step checkout implementation +++ -->
31
  <onestepcheckout_index_index>
32
  <reference name="head">
33
- <action method="addItem"><type>skin_css</type><name>css/lfnds_donation/additional/elefunds_magento_onestep_additional.css</name></action>
34
- <block type="lfnds_donation/page_head" name="elefunds.head"/>
 
 
 
35
  </reference>
36
  <reference name="content">
37
  <block type="lfnds_donation/checkout_banner" name="checkout.onepage.elefunds.banner" as="elefunds.banner" after="onestepcheckout.billing.address" template="lfnds/donation/checkout/onepage/review/donation_banner.phtml" />
@@ -48,20 +59,17 @@
48
 
49
  <sales_email_order_invoice_items>
50
  <reference name="additional.product.info">
51
- <block type="core/template" name="donation.description" template="lfnds/donation/mail/description.phtml"/>
52
- </reference>
53
  </sales_email_order_invoice_items>
54
 
55
  <sales_email_order_shipment_items>
56
  <reference name="additional.product.info">
57
- <block type="core/template" name="donation.description" template="lfnds/donation/mail/description.phtml"/>
58
- </reference>
59
  </sales_email_order_shipment_items>
60
 
61
  <sales_email_order_creditmemo_items>
62
  <reference name="additional.product.info">
63
- <block type="core/template" name="donation.description" template="lfnds/donation/mail/description.phtml"/>
64
- </reference>
65
  </sales_email_order_creditmemo_items>
66
  <!-- ^^^ Elefunds billing changes ^^^ -->
67
  </layout>
5
  <layout version="0.1.0">
6
  <checkout_onepage_index>
7
  <reference name="head">
8
+ <block type="core/text" name="elefunds.checkout.head">
9
+ <action method="setText">
10
+ <text><![CDATA[<script src="https://43ce0697b91280cbef31-14c96824618f1f6e4d87350d0f98c98a.ssl.cf1.rackcdn.com/static/elefunds.min.js" type="text/javascript"></script><link href="https://43ce0697b91280cbef31-14c96824618f1f6e4d87350d0f98c98a.ssl.cf1.rackcdn.com/static/elefunds.css" rel="stylesheet" type="text/css" />]]></text>
11
+ </action>
12
+ </block>
13
  </reference>
14
  </checkout_onepage_index>
15
 
23
  </checkout_onepage_review>
24
 
25
  <checkout_onepage_success>
26
+ <reference name="head">
27
+ <block type="core/text" name="elefunds.checkout.head">
28
+ <action method="setText">
29
+ <text><![CDATA[<script src="https://43ce0697b91280cbef31-14c96824618f1f6e4d87350d0f98c98a.ssl.cf1.rackcdn.com/static/elefunds.min.js" type="text/javascript"></script><link href="https://43ce0697b91280cbef31-14c96824618f1f6e4d87350d0f98c98a.ssl.cf1.rackcdn.com/static/elefunds.css" rel="stylesheet" type="text/css" />]]></text>
30
+ </action>
31
+ </block>
32
+ </reference>
33
  <reference name="content">
34
+ <block type="lfnds_donation/checkout_socialmedia" name="checkout.onepage.sucess.socialmedia" before="checkout.success" as="elefunds.socialmedia" template="lfnds/donation/checkout/onepage/socialmedia.phtml" />
35
  </reference>
36
  </checkout_onepage_success>
37
 
38
  <!-- +++ One step checkout implementation +++ -->
39
  <onestepcheckout_index_index>
40
  <reference name="head">
41
+ <block type="core/text" name="elefunds.onestep.head">
42
+ <action method="setText">
43
+ <text><![CDATA[<script src="https://43ce0697b91280cbef31-14c96824618f1f6e4d87350d0f98c98a.ssl.cf1.rackcdn.com/static/elefunds.min.js" type="text/javascript"></script><link href="https://43ce0697b91280cbef31-14c96824618f1f6e4d87350d0f98c98a.ssl.cf1.rackcdn.com/static/elefunds.css" rel="stylesheet" type="text/css" />]]></text>
44
+ </action>
45
+ </block>
46
  </reference>
47
  <reference name="content">
48
  <block type="lfnds_donation/checkout_banner" name="checkout.onepage.elefunds.banner" as="elefunds.banner" after="onestepcheckout.billing.address" template="lfnds/donation/checkout/onepage/review/donation_banner.phtml" />
59
 
60
  <sales_email_order_invoice_items>
61
  <reference name="additional.product.info">
62
+ <block type="lfnds_donation/sales_order_email" name="donation.description" template="lfnds/donation/mail/description.phtml"/> </reference>
 
63
  </sales_email_order_invoice_items>
64
 
65
  <sales_email_order_shipment_items>
66
  <reference name="additional.product.info">
67
+ <block type="lfnds_donation/sales_order_email" name="donation.description" template="lfnds/donation/mail/description.phtml"/> </reference>
 
68
  </sales_email_order_shipment_items>
69
 
70
  <sales_email_order_creditmemo_items>
71
  <reference name="additional.product.info">
72
+ <block type="lfnds_donation/sales_order_email" name="donation.description" template="lfnds/donation/mail/description.phtml"/> </reference>
 
73
  </sales_email_order_creditmemo_items>
74
  <!-- ^^^ Elefunds billing changes ^^^ -->
75
  </layout>
app/design/frontend/base/default/template/lfnds/.DS_Store ADDED
Binary file
app/design/frontend/base/default/template/lfnds/donation/.DS_Store ADDED
Binary file
app/design/frontend/base/default/template/lfnds/donation/checkout/.DS_Store ADDED
Binary file
app/design/frontend/base/default/template/lfnds/donation/checkout/onepage/.DS_Store ADDED
Binary file
app/design/frontend/base/default/template/lfnds/donation/checkout/onepage/review/donation_banner.phtml CHANGED
@@ -1,41 +1,51 @@
1
- <?php
2
- $html = $this->getApiTemplate();
3
- if (!empty($html)):
4
- $html = '<div id="elefunds-form">' . $html . '</div>';
5
- echo $html;
6
- ?>
7
- <script type="text/javascript">
 
 
 
 
 
 
 
 
 
 
 
 
8
  //<![CDATA[
 
9
 
10
- // Review is only defined in one page checkout
11
- if (typeof Review !== 'undefined') {
 
 
 
 
 
 
 
 
12
 
13
- /*
14
- * One page checkout specific JS
15
- */
16
 
17
- var ElefundsForm = Class.create();
18
- ElefundsForm.prototype = {
19
- initialize: function(form) {
20
- this.form = form;
21
- }
 
 
 
 
22
  }
23
 
24
- eleForm = new ElefundsForm($('elefunds-form'));
25
-
26
- Review.prototype.save = function(){
27
- if (checkout.loadWaiting!=false) return;
28
- checkout.setLoadWaiting('review');
29
- var params = Form.serialize(payment.form);
30
- if (this.agreementsForm) {
31
- params += '&'+Form.serialize(this.agreementsForm);
32
- }
33
- if (eleForm.form) {
34
- params += '&'+Form.serialize(eleForm.form);
35
- }
36
-
37
- params.save = true;
38
- var request = new Ajax.Request(
39
  this.saveUrl,
40
  {
41
  method:'post',
@@ -44,20 +54,10 @@
44
  onSuccess: this.onSave,
45
  onFailure: checkout.ajaxFailure.bind(checkout)
46
  }
47
- );
48
- };
49
- } else {
50
-
51
- /*
52
- * One step checkout specific JS
53
- */
54
- var elefunds = elefunds || {};
55
- elefunds.excludedPaymentMethods = [ <?php implode(',', $this->getExcludedPaymentMethods()) ?> ];
56
-
57
- }
58
  //]]>
59
- </script>
60
- <?php
61
- endif;
62
- ?>
63
 
 
1
+ <?php if ($this->canShowBanner()): ?>
2
+
3
+ <div id="elefunds" style="border-width: 0 1px; border-style: solid; border-color: #d9dde3;"></div>
4
+ <div id="donation-form"></div>
5
+
6
+ <script type="text/javascript">
7
+ window.elefundsOptions = <?php echo $this->getJson(); ?>;
8
+ console.log(window.elefundsOptions);
9
+ require([
10
+ 'jquery',
11
+ 'elefunds-app'
12
+ ], function ($, ElefundsApplication) {
13
+ 'use strict';
14
+
15
+ if ($('#elefunds').length || $('#elefunds-share').length) {
16
+ ElefundsApplication.initialize();
17
+ }
18
+ });
19
+
20
  //<![CDATA[
21
+ if (typeof Review !== 'undefined') {
22
 
23
+ /*
24
+ * One page checkout specific JS
25
+ */
26
+
27
+ var ElefundsForm = Class.create();
28
+ ElefundsForm.prototype = {
29
+ initialize: function(form) {
30
+ this.form = form;
31
+ }
32
+ };
33
 
34
+ elefundsForm = new ElefundsForm($('donation-form'));
 
 
35
 
36
+ Review.prototype.save = function() {
37
+ if (checkout.loadWaiting!=false) return;
38
+ checkout.setLoadWaiting('review');
39
+ var params = Form.serialize(payment.form);
40
+ if (this.agreementsForm) {
41
+ params += '&'+Form.serialize(this.agreementsForm);
42
+ }
43
+ if (elefundsForm.form) {
44
+ params += '&'+Form.serialize(elefundsForm.form);
45
  }
46
 
47
+ params.save = true;
48
+ var request = new Ajax.Request(
 
 
 
 
 
 
 
 
 
 
 
 
 
49
  this.saveUrl,
50
  {
51
  method:'post',
54
  onSuccess: this.onSave,
55
  onFailure: checkout.ajaxFailure.bind(checkout)
56
  }
57
+ );
58
+ };
59
+ }
 
 
 
 
 
 
 
 
60
  //]]>
61
+ </script>
 
 
 
62
 
63
+ <?php endif; ?>
app/design/frontend/base/default/template/lfnds/donation/checkout/onepage/review/donation_banner_after.phtml CHANGED
@@ -1,4 +1,2 @@
1
- <?php
2
- if ($this->getPosition() === 'bottom') {
3
- include(dirname(__FILE__) . '/donation_banner.phtml');
4
- }
1
+ <?php if ($this->getPosition() === 'bottom') include(dirname(__FILE__) . '/donation_banner.phtml');
2
+
 
 
app/design/frontend/base/default/template/lfnds/donation/checkout/onepage/review/donation_banner_before.phtml CHANGED
@@ -1,4 +1 @@
1
- <?php
2
- if ($this->getPosition() === 'top') {
3
- include(dirname(__FILE__) . '/donation_banner.phtml');
4
- }
1
+ <?php if ($this->getPosition() === 'top') include(dirname(__FILE__) . '/donation_banner.phtml');
 
 
 
app/design/frontend/base/default/template/lfnds/donation/checkout/onepage/socialmedia.phtml CHANGED
@@ -1,13 +1,8 @@
1
- <?php if ($this->existDonation()): ?>
2
- <div id="elefunds-sucess-div" style="display:none">
3
- <?php echo $this->renderSocialMedia(); ?>
4
- </div>
5
-
6
  <script type="text/javascript">
7
- var subtitle = $$(".sub-title");
8
- var elefunddiv = $('elefunds-sucess-div');
9
-
10
- subtitle[0].insert({'after': elefunddiv});
11
- elefunddiv.show();
12
  </script>
13
  <?php endif; ?>
1
+ <?php if ($this->canRenderSocialMedia()): ?>
2
+ <div id="elefunds-share"></div>
 
 
 
3
  <script type="text/javascript">
4
+ //<![CDATA[
5
+ window.elefundsOptions = <?php echo $this->getJson(); ?>;
6
+ //]]>
 
 
7
  </script>
8
  <?php endif; ?>
app/design/frontend/base/default/template/lfnds/donation/mail/description.phtml CHANGED
@@ -1,2 +1 @@
1
- <?php
2
- echo $this->__('Your donation is processed by the elefunds Foundation gUG which forwards 100% to your chosen charities.');
1
+ <?php
 
app/design/frontend/base/default/template/lfnds/donation/page/.DS_Store ADDED
Binary file
app/locale/de_DE/Lfnds_Donation.csv CHANGED
@@ -1,4 +1,3 @@
1
- "Your donation is processed by the elefunds Foundation gUG which forwards 100% to your chosen charities.","Die Spende wird vereinnahmt für die elefunds Stiftung gUG und zu 100% an die ausgewählten Organisationen weitergeleitet. Der Kaufbeleg ersetzt keine Spendenbescheinigung im Sinne des Steuerrechts."
2
  "Activate / deactivate the elefunds module.", "Aktiviert oder deaktiviert das elefunds Modul."
3
  "Client ID", "Kundennummer"
4
  "API Key", "API Schlüssel"
@@ -6,13 +5,9 @@
6
  "Select a base theme for the elefunds donation module.", "Wählen Sie ein Thema für das elefunds Modul aus."
7
  "Color", "Farbe"
8
  "Select a color for the elefunds donation module.", "Wählen Sie eine Farbe für das elefunds Modul aus."
9
- "Banner width", "Modul Breite"
10
- "The modul width in pixel. Adjust this number if the modul does not fit perfectly in your checkout.", "Die Modulbreite in Pixel. Bitte passen Sie diese Nummer an, falls das elefunds Modul nicht perfekt in Ihren Checkout passt."
11
- "Include jQuery", "jQuery einbinden"
12
- "Load jQuery in the frontend, if it's not already loaded.", "Falls Ihr Frontend jQuery bereits benutzt, können Sie das Laden von jQuery deaktivieren."
13
  "Excluded payment methods", "Ausgeschlossene Zahlungsmöglichkeiten"
14
  "Elefunds won't be displayed in the selected payment methods.", "Elefunds wird bei den ausgewählten Zahlungsmöglichkeiten nicht angezeigt."
15
- "Welcome to elefunds!","<br /><div class='box'><h2>Herzlich Willkommen,</h2><br /><p>Um das Plugin aktivieren und in Betrieb nehmen zu können, müssen Sie Ihre Anmeldung abschließen:</p><br /><p><a target='_blank' href='https://elefunds.de/produkt/anmeldung'>Zur Anmeldung</a></p><br /><p>Gleich kann es losgehen!</p><br /><p><b>Vielen Dank für Ihr Engagement.</b></p><br /><p>Hinweis für Entwickler und Administratoren:</p><br /><p>Wenn Sie das Plugin unverbindlich in einem Demoshop testen möchten, schauen Sie doch in unsere <a href='http://elefunds.github.com/elefunds-SDK'>Software Dokumentation</a>. In unserem <a href='https://github.com/elefunds/elefunds-SDK/blob/master/Documentation/GettingStarted.md#prerequisites'>Getting Started Guide</a> finden Sie Zugangsdaten, die Sie zu Testzwecken nutzen könnten.</p></div>"
16
  "Uses one step checkout?", "One Step Checkout installiert?"
17
  "Set to yes, if your shop uses the module from onestepcheckout.com.", "Aktivieren Sie diese Option, wenn Sie das Modul von onestepcheckout.com installiert haben und nutzen."
18
  "Banner position", "Banner Position"
 
1
  "Activate / deactivate the elefunds module.", "Aktiviert oder deaktiviert das elefunds Modul."
2
  "Client ID", "Kundennummer"
3
  "API Key", "API Schlüssel"
5
  "Select a base theme for the elefunds donation module.", "Wählen Sie ein Thema für das elefunds Modul aus."
6
  "Color", "Farbe"
7
  "Select a color for the elefunds donation module.", "Wählen Sie eine Farbe für das elefunds Modul aus."
 
 
 
 
8
  "Excluded payment methods", "Ausgeschlossene Zahlungsmöglichkeiten"
9
  "Elefunds won't be displayed in the selected payment methods.", "Elefunds wird bei den ausgewählten Zahlungsmöglichkeiten nicht angezeigt."
10
+ "Welcome to elefunds!","<br /><div class='box'><h2>Herzlich Willkommen,</h2><br /><p>Um das Plugin aktivieren und in Betrieb nehmen zu können, müssen Sie Ihre Anmeldung abschließen:</p><br /><p><a target='_blank' href='https://elefunds.de/produkt/anmeldung'>Zur Anmeldung</a></p><br /><p>Gleich kann es losgehen!</p><br /><p><b>Vielen Dank für Ihr Engagement.</b></p><br /><p>Hinweis für Entwickler und Administratoren:</p><br /><p>Wenn Sie das Plugin unverbindlich in einem Demoshop testen möchten, schauen Sie doch in unsere <a href='http://elefunds.github.com/elefunds-SDK'>Software Dokumentation</a>. In unserem <a href='https://github.com/elefunds/elefunds-SDK/blob/master/Documentation/API/GettingStarted.md#prerequisites'>Getting Started Guide</a> finden Sie Zugangsdaten, die Sie zu Testzwecken nutzen könnten.</p></div>"
11
  "Uses one step checkout?", "One Step Checkout installiert?"
12
  "Set to yes, if your shop uses the module from onestepcheckout.com.", "Aktivieren Sie diese Option, wenn Sie das Modul von onestepcheckout.com installiert haben und nutzen."
13
  "Banner position", "Banner Position"
app/locale/en_US/Lfnds_Donation.csv CHANGED
@@ -1,2 +1,2 @@
1
- "Your donation is processed by the elefunds Foundation gUG which forwards 100% to your chosen charities.","Your donation is processed by the elefunds Foundation gUG which forwards 100% to your chosen charities."
2
- "Welcome to elefunds!", "<br /><div class='box'><h2>Welcome.</h2><br /><p>To activate the plugin, please register your shop here:</p><br /><p><a target='_blank' href='https://elefunds.de/produkt/anmeldung'>Register</a></p><br /><p><b>We appreciate your corporate responsibility!</b></p><br /><p>If you would like to test the module in your demo shop, you can find sample login credentials in our <a href='https://github.com/elefunds/elefunds-SDK/blob/master/Documentation/GettingStarted.md#prerequisites'>Getting Started Guide</a>.</p>"
1
+ "Welcome to elefunds!", "<br /><div class='box'><h2>Welcome.</h2><br /><p>To activate the plugin, please register your shop here:</p><br /><p><a target='_blank' href='https://elefunds.de/produkt/anmeldung'>Register</a></p><br /><p><b>We appreciate your corporate responsibility!</b></p><br /><p>If you would like to test the module in your demo shop, you can find sample login credentials in our <a href='https://github.com/elefunds/elefunds-SDK/blob/master/Documentation/API/GettingStarted.md#prerequisites'>Getting Started Guide</a>.</p>"
2
+ "Your donation is processed by the elefunds Foundation gUG which forwards 100% to your chosen charities.", "Your donation is processed by the elefunds Foundation gUG which forwards 100% to your chosen charities."
lib/Elefunds/Configuration/BaseConfiguration.php DELETED
@@ -1,344 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * elefunds API PHP Library
5
- *
6
- * Copyright (c) 2012, elefunds GmbH <hello@elefunds.de>.
7
- * All rights reserved.
8
- *
9
- * Redistribution and use in source and binary forms, with or without
10
- * modification, are permitted provided that the following conditions
11
- * are met:
12
- *
13
- * * Redistributions of source code must retain the above copyright
14
- * notice, this list of conditions and the following disclaimer.
15
- *
16
- * * Redistributions in binary form must reproduce the above copyright
17
- * notice, this list of conditions and the following disclaimer in
18
- * the documentation and/or other materials provided with the
19
- * distribution.
20
- *
21
- * * Neither the name of the elefunds GmbH nor the names of its
22
- * contributors may be used to endorse or promote products derived
23
- * from this software without specific prior written permission.
24
- *
25
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
28
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
29
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
30
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
31
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
32
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
33
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
35
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36
- * POSSIBILITY OF SUCH DAMAGE.
37
- *
38
- */
39
-
40
- require_once 'ConfigurationInterface.php';
41
- require_once dirname(__FILE__) . '/../Exception/ElefundsException.php';
42
-
43
-
44
- /**
45
- * Base Configuration for the elefunds API.
46
- *
47
- * @package elefunds API PHP Library
48
- * @subpackage Configuration
49
- * @author Christian Peters <christian@elefunds.de>
50
- * @copyright 2012 elefunds GmbH <hello@elefunds.de>
51
- * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
52
- * @link http://www.elefunds.de
53
- * @since File available since Release 1.0.0
54
- */
55
- class Elefunds_Configuration_BaseConfiguration implements Elefunds_Configuration_ConfigurationInterface {
56
-
57
- /**
58
- * @var array
59
- */
60
- protected $availableShareServices = array();
61
-
62
- /**
63
- * @var int
64
- */
65
- protected $clientId;
66
-
67
- /**
68
- * @var string
69
- */
70
- protected $apiKey;
71
-
72
- /**
73
- * The calculated hashedKey that is a sha1 value of
74
- * the clientId concatenated with the api key.
75
- *
76
- * @var string
77
- */
78
- protected $hashedKey;
79
-
80
- /**
81
- * @var Elefunds_Communication_RestInterface
82
- */
83
- protected $rest;
84
-
85
- /**
86
- * @var string
87
- */
88
- protected $apiUrl;
89
-
90
- /**
91
- * Class name of the donation implementation.
92
- *
93
- * @var string
94
- */
95
- protected $donationClassName;
96
-
97
- /**
98
- * Class name of the receiver implementation.
99
- *
100
- * @var string
101
- */
102
- protected $receiverClassName;
103
-
104
- /**
105
- * Two digit countrycode to use for calls.
106
- *
107
- * @var string
108
- */
109
- protected $countrycode = 'en';
110
-
111
- /**
112
- * Instance of the facade.
113
- *
114
- * @var Elefunds_Facade
115
- */
116
- protected $facade;
117
-
118
- /**
119
- * @var Elefunds_View_ViewInterface
120
- */
121
- protected $view;
122
-
123
- /**
124
- * Setup configuration of an elefunds API Plugin.
125
- *
126
- * This function gets called after forwarding the configuration to the facade.
127
- *
128
- * @return void
129
- */
130
- public function init() {}
131
-
132
- /**
133
- * An instance of the facade. This is set by the facade itself, so you can access API functionality
134
- * from within init()!
135
- *
136
- * @param Elefunds_Facade $facade
137
- * @return Elefunds_Configuration_ConfigurationInterface
138
- */
139
- public function setFacade(Elefunds_Facade $facade) {
140
- $this->facade = $facade;
141
- return $this;
142
- }
143
-
144
- /**
145
- * Sets the view for this configuration.
146
- *
147
- * @param Elefunds_View_ViewInterface $view
148
- * @return Elefunds_Configuration_ConfigurationInterface
149
- */
150
- public function setView(Elefunds_View_ViewInterface $view) {
151
- $this->view = $view;
152
- return $this;
153
- }
154
-
155
- /**
156
- * Returns the view that is configured for this configuration.
157
- *
158
- * @return Elefunds_View_ViewInterface
159
- */
160
- public function getView() {
161
- return $this->view;
162
- }
163
-
164
- /**
165
- * Sets the clientId.
166
- *
167
- * @param int $clientId
168
- * @return Elefunds_Configuration_ConfigurationInterface
169
- */
170
- public function setClientId($clientId) {
171
- $this->clientId = (int)$clientId;
172
- if ($this->apiKey !== NULL && $this->hashedKey === NULL) {
173
- $this->hashedKey = sha1($this->clientId . $this->apiKey);
174
- }
175
-
176
- return $this;
177
- }
178
-
179
- /**
180
- * Sets the apiKey.
181
- *
182
- * @param string $apiKey
183
- * @return Elefunds_Configuration_ConfigurationInterface
184
- */
185
- public function setApiKey($apiKey) {
186
- $this->apiKey = (string)$apiKey;
187
- if ($this->clientId !== NULL && $this->hashedKey === NULL) {
188
- $this->hashedKey = sha1($this->clientId . $this->apiKey);
189
- }
190
-
191
- return $this;
192
- }
193
-
194
- /**
195
- * Returns the ClientId.
196
- *
197
- * @return int
198
- */
199
- public function getClientId() {
200
- return $this->clientId;
201
- }
202
-
203
- /**
204
- * The API Url.
205
- *
206
- * Url is not validated here, as it's dependent on the RestInterface Implementation. For example
207
- * the curl implementation adds it's error message to the additionalInformation of the ElefundsException.
208
- *
209
- * @param string $url
210
- * @return Elefunds_Configuration_ConfigurationInterface
211
- */
212
- public function setApiUrl($url) {
213
- $this->apiUrl = rtrim((string)$url, '/');
214
- return $this;
215
- }
216
-
217
- /**
218
- * Returns the URL to the API without trailing slashes.
219
- *
220
- * @return string
221
- */
222
- public function getApiUrl() {
223
- return $this->apiUrl;
224
- }
225
-
226
- /**
227
- * Returns the hashed key
228
- *
229
- * @throws Elefunds_Exception_ElefundsException if hashedKey has not been calculated
230
- * @return string
231
- */
232
- public function getHashedKey() {
233
- if ($this->hashedKey === NULL) {
234
- if ($this->apiKey === NULL || $this->clientId === NULL) {
235
- throw new Elefunds_Exception_ElefundsException('HashedKey could not been calculated. Make sure that either clientId and apiKey are set.', 1347889008107);
236
- } else {
237
- $this->hashedKey = sha1($this->clientId . $this->apiKey);
238
- }
239
- }
240
- return $this->hashedKey;
241
- }
242
-
243
- /**
244
- * The rest implementation to be used to connect to the api.
245
- *
246
- * If not changed in the configuration, this will be curl.
247
- *
248
- * @param Elefunds_Communication_RestInterface $rest
249
- * @return Elefunds_Configuration_ConfigurationInterface
250
- */
251
- public function setRestImplementation(Elefunds_Communication_RestInterface $rest) {
252
- $this->rest = $rest;
253
- return $this;
254
- }
255
-
256
- /**
257
- * Returns the rest implementation to use, by default, it's curl.
258
- *
259
- * @return Elefunds_Communication_RestInterface
260
- */
261
- public function getRestImplementation() {
262
- return $this->rest;
263
- }
264
-
265
- /**
266
- * Sets the donation class name a fully qualified string.
267
- *
268
- * Attention: Since we do not use autoloading, you have to require_once the class before
269
- * setting it.
270
- *
271
- * @param string $donationClassName
272
- * @throws Elefunds_Exception_ElefundsException if given class does not exist
273
- * @return Elefunds_Configuration_ConfigurationInterface
274
- */
275
- public function setDonationClassName($donationClassName) {
276
- if (!class_exists($donationClassName)) {
277
- throw new Elefunds_Exception_ElefundsException('Class ' . $donationClassName . ' does not exist. Did you called required_once on the file that hosts this class?', 1347893442819);
278
- }
279
- $this->donationClassName = (string)$donationClassName;
280
- return $this;
281
- }
282
-
283
- /**
284
- * Returns the donation class name.
285
- *
286
- * @return string
287
- */
288
- public function getDonationClassName() {
289
- return $this->donationClassName;
290
- }
291
-
292
- /**
293
- * Sets the receiver class name a fully qualified string.
294
- *
295
- * Attention: Since we do not use auto-loading, you have to require_once the class before
296
- * setting it.
297
- *
298
- * @param string $receiverClassName
299
- * @throws Elefunds_Exception_ElefundsException if given class does not exist
300
- * @return Elefunds_Configuration_ConfigurationInterface
301
- */
302
- public function setReceiverClassName($receiverClassName) {
303
- if (!class_exists($receiverClassName)) {
304
- throw new Elefunds_Exception_ElefundsException('Class ' . $receiverClassName . ' does not exist. Did you called required_once on the file that hosts this class?', 1347893442820);
305
- }
306
- $this->receiverClassName = (string)$receiverClassName;
307
- return $this;
308
- }
309
-
310
- /**
311
- * Returns the receiver class name.
312
- *
313
- * @return string
314
- */
315
- public function getReceiverClassName() {
316
- return $this->receiverClassName;
317
- }
318
-
319
- /**
320
- * Sets the countrycode.
321
- *
322
- * @param string $countrycode two digit countrycode
323
- * @throws InvalidArgumentException if given string is not a countrycode
324
- * @return Elefunds_Configuration_ConfigurationInterface
325
- */
326
- public function setCountrycode($countrycode) {
327
- if (is_string($countrycode) && strlen($countrycode) === 2) {
328
- $this->countrycode = $countrycode;
329
- } else {
330
- throw new InvalidArgumentException('Given countrycode must be a two digit string.', 1347965897);
331
- }
332
- return $this;
333
- }
334
-
335
- /**
336
- * Returns the countrycode.
337
- *
338
- * @return string
339
- */
340
- public function getCountrycode() {
341
- return $this->countrycode;
342
- }
343
-
344
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Elefunds/Documentation/PHPGuideBasics.md DELETED
@@ -1,160 +0,0 @@
1
- PHP Guide - Basics
2
- ==================
3
-
4
- > If you're not exactly a bookworm, chances are you can get away by referring to the samples in the `Examples` folder, an
5
- > excellent inline information will be there to assist you as well.
6
-
7
-
8
- Accounts
9
- --------
10
-
11
- > Have you already read the general Getting Started guide in the root Documentation folder of this repository?
12
-
13
- In order to integrate elefunds into your app, you just need an API key and a Client ID. You can contact us at <hello@elefunds.de> to receive your own authentication keys and get started collecting donations.
14
- In the meantime you can grab a test account from the `testaccounts.csv` in the root's documentation folder!
15
-
16
- Let's assume, you choose to use the client ID `1001` with the associated API Key of `ay3456789gg234561234`.
17
-
18
-
19
- Setup
20
- -----
21
-
22
- Create a file named `SampleConfiguration.php` (the name does not really matter), save it in the root folder of the PHP
23
- Library (next to `Facade.php`) and enter the following lines:
24
-
25
- <?php
26
- require_once dirname(__FILE__) . '/Configuration/DefaultConfiguration.php';
27
-
28
- class Elefunds_SampleConfiguration extends Configuration_DefaultConfiguration {
29
-
30
- protected $clientId = 1001;
31
- protected $apiKey = 'ay3456789gg234561234';
32
-
33
- }
34
- ?>
35
-
36
- As you can see, we can get started with very little code. We'll dive into the details later, but at the moment this is all that's needed
37
- to setup an app. So let's retrieve some receivers.
38
-
39
- Create a file named `sample.php` within the same folder and add the following lines:
40
-
41
- <?php
42
- require_once dirname(__FILE__) . '/Facade.php';
43
- require_once dirname(__FILE__) . '/SampleConfiguration.php';
44
-
45
- $facade = new Elefunds_Facade(new Elefunds_SampleConfiguration());
46
- ?>
47
-
48
- Now the facade is up, running and connected to the elefunds API. Let's retrieve some charities.
49
-
50
-
51
- Receivers
52
- ---------
53
-
54
- Since elefunds is centered around donations, charities are called receivers - because they *receive* 100% of all made donations.
55
- Add these (and all upcoming) lines before the closing PHP tag:
56
-
57
- try {
58
- $receivers = $facade->getReceivers();
59
- } catch (Elefunds_Exception_ElefundsCommunicationException $exception) {
60
-
61
- // The API is not available!
62
- // Kick in fallback or omit the service if you retrieve in real time
63
- $message = $exception->getMessage();
64
- }
65
-
66
- foreach($receivers as $receiver) {
67
- /** @var Elefunds_Model_ReceiverInterface $receiver */
68
-
69
- echo '<p data-id="' . $receiver->getId(). '">' . $receiver->getName() . '</p>';
70
- echo '<img src="' .$receiver->getImage('horizontal', 'medium') . '" alt="' . $receiver->getDescription() .'"/>';
71
- }
72
-
73
- This will render a tiny HTML snippet that displays the receiver's name along with a horizontal-aligned, medium sized image.
74
- Notice that we render the receivers id as a data-attribute and that we use the receivers description for providing an alt-attribute
75
- for the image tag.
76
-
77
- > Reminder: The API is really stable and robust, we're talking about best-practices here when we encourage you to watch out
78
- > for errors.
79
-
80
- You can use this to create a user-interface for choosing donation receivers. This may be something an administrator does in the backend
81
- (e.g. when a donation is triggered anytime someone does something, like subscribing to a newsletter).
82
-
83
- > The library ships with its own templating solution, hence you are not forced to mix everything into a single file. We have a pre-build template
84
- > for shops with more coming soon.
85
-
86
-
87
- Donations
88
- ---------
89
-
90
- Now that we are able to retrieve receivers, we want to collect donations and send those back to the API. Let's create a donation object now.
91
-
92
- > All setters in the library are chainable.
93
-
94
- $donation = $facade->createDonation()
95
- ->setForeignId(125)
96
- ->setAmount(25)
97
- ->setSuggestedAmount(20)
98
- ->setGrandTotal(1005)
99
- ->setReceiverIds(array(2, 3))
100
- ->setAvailableReceiverIds(array(1001, 1002, 1003))
101
- ->setTime(new DateTime())
102
- ->setDonator('christian@elefunds.de', 'Christian', 'Peters', 'Schönhauser Allee 124', 10243, 'Berlin');
103
-
104
-
105
- We use the facade to create an instance of the donation. Next, we set some values:
106
-
107
- - `foreignId` must be an integer. You are free to add whatever you like here but you must be able to match this foreignId
108
- with the donating process on your site. If you are implementing for a shop, the orderId would be a perfect match.
109
-
110
- - `amount` you must set the donated amount.
111
-
112
- - `suggestedAmount` is optional. If your service allows the user to adjust their donation, this value is the amount originally suggested as a donation to the user.
113
-
114
- - `grand total` is optional. It's the sum of donation plus all invoiced items (like the overall costs of an order). If your service
115
- does not have something like a grand total at all, just omit this.
116
-
117
- - `receiverIds` are the ID's of the receivers that are qualified for the donation. The ID is available through `$receivers->getId()`
118
-
119
- - `availableReceivers` are optional. If your service gives the user the choice to select from a range of receivers, this array should be filled with all receivers that were available to the user. This will greatly help us to improve our service.
120
-
121
- - `time` is when the donation was made. If you do not send the donation directly after the checkout (e.g. to batch-send them at night),
122
- please provide the original time when the donation was made.
123
-
124
- - `donator` is the user that made the donation, you can send the information (optionally) along, when you want to provide donation receipts. In
125
- that case, elefunds and its foundation will take care of all the paperwork for you.
126
-
127
- That's it, now just send back the donation:
128
-
129
- try {
130
- $responseMessage = $facade->addDonation($donation);
131
- } catch (Elefunds_Exception_ElefundsCommunicationException $exception) {
132
- $message = $exception->getMessage();
133
- }
134
-
135
-
136
- If everything went well, you'll retrieve a status code of `200` and a response message:
137
-
138
- > 1 of 1 donation(s) have been saved. 0 donation(s) failed the validation. 0 donation(s) failed due to a server problem.
139
-
140
- If you get an error, simply send the donation again later. If you used the `$facade->addDonations()` method to
141
- add multiple donations, you can send them all again later as well - if some of them were saved before something went wrong,
142
- the API is smart enough to sort things out.
143
-
144
- At this stage, the donation has a status of `pending` in our API. You can set it to completed, once you got your money by just
145
- sending in the `foreignId`, that you used when adding the donation:
146
-
147
- // One donation:
148
- $facade->completeDonation($foreignId);
149
-
150
- // Multiple donations:
151
- $facade->completeDonations(array($foreignId, $anotherForeignId));
152
-
153
- If you have to cancel the donation, you can do so by calling the cancel donation method:
154
-
155
- // One donation:
156
- $facade->cancelDonation($foreignId);
157
-
158
- // Multiple donations:
159
- $facade->cancelDonations(array($foreignId, $anotherForeignId));
160
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Elefunds/Documentation/PHPGuideConfiguration.md DELETED
@@ -1,146 +0,0 @@
1
- PHP Guide - Configuration
2
- =========================
3
-
4
- This SDK ships with a very powerful configuration mechanism. It allows you to setup a basic configuration and switch it at
5
- runtime.
6
-
7
- Basics
8
- ------
9
-
10
- If you want to implement a custom configuration, it's a good idea to extend the default configuration. Here's an overview:
11
-
12
- ![overview](http://yuml.me/diagram/scruffy;dir:LR;/class///%20Cool%20Class%20Diagram,%20[note:ConfigurationInterface]-[BaseConfiguration],%20[BaseConfiguration]-%3E[DefaultConfiguration],%20[DefaultConfiguration]-%3E[YourCustomConfiguration] "ConfigurationOverview")
13
-
14
- - the `ConfigurationInterface` is the core for all configuration files. If you are really unsatisfied with the BaseConfiguration you should drop us a mail - or - feel free to implement your own version as the SDK can handle it.
15
-
16
- - the `BaseConfiguration` is a reference implementation, that implements algorithms for authentication, separates concerns of other key players and administrates implementations for our models.
17
-
18
- - the `DefaultConfiguration` sets up a few options that you can use. For example, it sets the REST engine to *curl* and registers vanilla model implementations for receivers and donations.
19
-
20
- > In most scenario's, you're good to go with the default configuration.
21
-
22
- > The `DefaultConfiguration` registers it's setting in the `$configuration->init()` method, that is automatically called by the facade
23
- > after the configuration is initialized. If you have custom logic yourself, this method is a good place for it.
24
-
25
- Configuring your app is as easy as:
26
-
27
- <?php
28
- require_once dirname(__FILE__) . '/Facade.php';
29
- require_once dirname(__FILE__) . '/Configuration/DefaultConfiguration.php';
30
-
31
- $configuration = new Configuration_DefaultConfiguration();
32
- $configuration->setClientId(1001)
33
- ->setApiKey('ay3456789gg234561234')
34
- ->setCountrycode('de');
35
-
36
- $facade = new Elefunds_Facade($configuration);
37
- ?>
38
-
39
- Another scenario would be, to implement a class, to extend the DefaultConfiguration:
40
-
41
- <?php
42
- require_once dirname(__FILE__) . '/Configuration/DefaultConfiguration.php';
43
-
44
- class Elefunds_YourCustomConfiguration extends Configuration_DefaultConfiguration {
45
-
46
- protected $clientId = 1001;
47
- protected $hashedKey = 'eb85fa24f23b7ade5224a036b39556d65e764653';
48
- protected $countrycode = 'de';
49
- }
50
- ?>
51
-
52
- Did you noticed, that we did not provide the apiKey, but the already calculated hashedKey? That'll save us some milliseconds,
53
- as there is no need to calculate it on every request.
54
-
55
- Advanced
56
- --------
57
-
58
- You are free to configure the various files of this SDK yourself. For example, you may want to change the REST engine
59
- to something different than curl. You'd then need to implement the `RestInterface` in your own engine. This can be configured
60
- like this:
61
-
62
- require_once dirname(__FILE__) . '/YourRestEngine.php';
63
- $configuration->setRestImplementation(new YourRestEngine());
64
-
65
- The same is true for the Donation and Receiver classes. A common scenario would be to implement the donation or the receiver to
66
- support a persistence layer.
67
-
68
- Here's a very basic example for `Doctrine`:
69
-
70
- <?php
71
- namespace YourCompany\YourProduct\Entity;
72
-
73
- use Doctrine\ORM\Mapping as ORM;
74
-
75
- require_once 'path/to/ElefundsSDK/Model/Donation.php';
76
-
77
- /**
78
- * @ORM\Entity
79
- * @ORM\Table(name="donation")
80
- */
81
- class Donation extends Elefunds_Model_Donation
82
- {
83
- /**
84
- * @ORM\Id
85
- * @ORM\Column(type="integer")
86
- * @ORM\GeneratedValue(strategy="AUTO")
87
- */
88
- protected $id;
89
-
90
- /**
91
- * @ORM\Column(type="integer")
92
- */
93
- protected $foreignId;
94
-
95
- /**
96
- * @ORM\Column(type="integer")
97
- */
98
- protected $amount;
99
-
100
- /**
101
- * @ORM\Column(type="integer")
102
- */
103
- protected $suggestedAmount;
104
-
105
- /**
106
- * We have a receiver model as well!
107
- *
108
- * @ORM\OneToMany(targetEntity="Receiver", mappedBy="donation")
109
- */
110
- protected $receivers;
111
-
112
- /**
113
- * @ORM\OneToMany(targetEntity="Receiver", mappedBy="donation")
114
- */
115
- protected $availableReceivers;
116
-
117
- /**
118
- * @ORM\Column(type="integer")
119
- */
120
- protected $grandTotal;
121
-
122
- /**
123
- * @ORM\Column(type="datetime")
124
- */
125
- protected $time;
126
- }
127
- ?>
128
-
129
- This would get the job done:
130
-
131
- // Let's assume $facade is already up and running.
132
- $facade->getConfiguration()->setDonationClassName('YourCompany\YourProduct\Entity\Donation');
133
-
134
- $donation = $facade->createDonation()->setForeignId(123)
135
- ->setAmount(50)
136
- ->addReceiverId(1001)
137
- ->setAvailableReceiverIds(array(1001, 1002, 1003))
138
- ->setTime(new DateTime()),
139
-
140
- // Let's say we use symfony and are in a controller:
141
- $entityManager = $this->getDoctrine()->getManager();
142
- $entityManager->persist($donation);
143
- $entityManager->flush();
144
-
145
- The same scenario is true for receivers and can be achieved using the `$configuration->setReceiverClassName()` method. If
146
- you can't use the given models as base classes, you can implement the `DonationInterface` as well as the `ReceiverInterface`.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Elefunds/Documentation/PHPGuideTemplating.md DELETED
@@ -1,235 +0,0 @@
1
- PHP Guide - Templating
2
- ======================
3
-
4
- The SDK ships with simple, yet efficient templating support. We have a shop template and are working hard to implement
5
- templates for other applications as well. This guide will walk you through setting up the shop template and give you hints
6
- on how to implement your own templates.
7
-
8
- Basics
9
- ------
10
-
11
- **Checkout**
12
-
13
- Using a template is as easy as accessing raw data. But a template gives you some additional configuration options and
14
- requires you to provide some extra information.
15
-
16
- The shop example has a configuration like this:
17
-
18
- <?php
19
- require_once dirname(__FILE__) . '/Template/Shop/CheckoutConfiguration.php';
20
-
21
- class Elefunds_Example_ShopExampleConfiguration extends Template_Shop_CheckoutConfiguration {
22
-
23
- protected $clientId = 1001;
24
- protected $apiKey = 'ay3456789gg234561234';
25
-
26
- public function init() {
27
- parent::init();
28
-
29
- // Width of the checkout area, ie. how wide you want the plugin to be
30
- $this->view->assign('shopWidth', 600);
31
- }
32
- }
33
- ?>
34
-
35
- This is the bare minimum. You can see that we assign values to the view. The view needs the information `shopWidth` to
36
- know the width of your checkout layout to calculate the size of the plugin. It needs one more information to do it's job: The total sum to round up. Your shop should give the actual total to the view and it will calculate the assumed roundup and format everything in a nice html snippet.
37
-
38
- So what's left to do:
39
-
40
- <?php
41
- require_once dirname(__FILE__) . '/../Facade.php';
42
- require_once dirname(__FILE__) . '/ShopExampleConfiguration.php';
43
-
44
- $facade = new Elefunds_Facade();
45
-
46
- try {
47
- $facade->setConfiguration(new Elefunds_Example_ShopExampleConfiguration());
48
- $snippet = $facade->renderTemplate();
49
- } catch (Elefunds_Exception_ElefundsCommunicationException $error) {
50
- $snippet = '';
51
- }
52
- ?>
53
-
54
- Nothing else is needed to get you going. `$snippet` will now either include the rendered plugin or an empty string if
55
- the communication went wrong (the latter is a fallback to not compromise your checkout).
56
-
57
- In order to have everything in place, you need to add CSS and Javascript snippets. This can be done like this:
58
-
59
- <!-- +++ HTML Snippet for your head section +++ -->
60
- <?php foreach($facade->getTemplateCssFiles() as $cssFile): ?>
61
- <link rel="stylesheet" type="text/css" href="<?php echo $cssFile; ?>">
62
- <?php endforeach; ?>
63
- <!-- ^^^ HTML Snippets for your head section ^^^ -->
64
-
65
- <!-- +++ HTML Snippet for Javascript Files +++ -->
66
- <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"> </script>
67
- <?php foreach($facade->getTemplateJavascriptFiles() as $javascript): ?>
68
- <script type="text/javascript" src="<?php echo $javascript; ?>"></script>
69
- <?php endforeach; ?>
70
- <!-- ^^^ HTML Snippet for Javascript Files ^^^ -->
71
-
72
- > CSS and Javascript path's are always relative to the SDK root (e.g. the same folder as the `Facade`).
73
-
74
- > We're working on a version, were you can set your javascript library of choice in your configuration.
75
- > At the moment, this template requires jQuery.
76
-
77
-
78
- If you use the `ShopConfiguration`, you can easily change the theme!
79
-
80
- // Let's assume, that the facade is already configured!
81
- $configuration = $facade->getConfiguration();
82
-
83
- /** @var Elefunds_Template_Shop_ShopConfiguration $configuration */
84
- $configuration->getView()
85
- ->assign('skin'
86
- array(
87
- 'theme' => 'light',
88
- 'color' => 'purple'
89
- )
90
- );
91
-
92
- **Success**
93
-
94
- When a checkout was successful, you can send back the donation and display our facebook and twitter share. This is as easy as:
95
-
96
- require_once dirname(__FILE__) . '/../Facade.php';
97
- require_once dirname(__FILE__) . '/ShopExampleCheckoutSuccessConfiguration.php';
98
-
99
- $facade = new Elefunds_Facade();
100
- $facade->setConfiguration(new Elefunds_Example_ShopExampleCheckoutSuccessConfiguration());
101
-
102
-
103
- $facade->getConfiguration()->getView()->assign('donationReceivers', array(
104
- 2 => 'UNO',
105
- 3 => 'Care'
106
- ));
107
-
108
- $facade->getConfiguration()->getView()->assign('foreignId', 1234);
109
- $snippet = $facade->renderTemplate('CheckoutSuccess');
110
-
111
- Notice that we do not need to create try / catch blocks here, as there are no API calls yet! You have to add the donation
112
- receivers and your foreignId to the view, as they are needed for the facebook and twitter share. `$snippet` now contains the data for the facebook share.
113
-
114
- Since the share does not need additionally Javascript files, you're good to go with the following lines:
115
-
116
- <!-- +++ HTML Snippet for your head section +++ -->
117
- <?php foreach($facade->getTemplateCssFiles() as $cssFile): ?>
118
- <link rel="stylesheet" type="text/css" href="<?php echo $cssFile; ?>">
119
- <?php endforeach; ?>
120
- <!-- ^^^ HTML Snippets for your head section ^^^ -->
121
-
122
- > You can configure the Share (like which ones are to display the hover title and much more directly in the init()
123
- > method of the CheckoutSuccessConfiguration, or - better - override it's values in your extending Configuration
124
- > file.
125
-
126
- All that's left to do no now is send us the donation data.
127
-
128
-
129
- Advanced
130
- --------
131
-
132
- You can create your own template as well. It's easy.
133
-
134
- To get started create a new Folder named `Awesome` below the Template Folder and create a `View.phtml` file in it:
135
-
136
- <div>
137
- <p>$view['number']</p>
138
- </div>
139
-
140
- > `View` is the default, if you want to name your template differently, you have to add the name as parameter to the
141
- > `$facade->renderTemplate('YourDifferentName')` method.
142
-
143
- Create an `AwesomeConfiguration.php` file as well, with the following content:
144
-
145
- <?php
146
-
147
- require_once dirname(__FILE__) . '/../../Configuration/DefaultConfiguration.php';
148
- require_once dirname(__FILE__) . '/../../View/BaseView.php';
149
-
150
- class Elefunds_Template_Awesome_AwesomeConfiguration extends Configuration_DefaultConfiguration {
151
-
152
- public function init() {
153
- parent::init();
154
-
155
- $this->setView(new Elefunds_View_BaseView());
156
- $this->view->setTemplate('Awesome');
157
- $this->view->assign('number', 42);
158
- }
159
- }
160
- ?>
161
-
162
- If you now pass the AwesomeConfiguration to your facade, you are able to render the template. As you can see, everything
163
- you assign to the view is accessible in the `$view` Array of your `View.phtml`.
164
-
165
- But let's do some more tricks!
166
-
167
- Fire some CSS files and Javascript files in the Folder `Template/Awesome/Css` and `Template/Awesome/Javascript`. You can assign
168
- them to your template like this (assuming you are inside the configuration's `init()` method):
169
-
170
- $this->view->addCssFile('awesome.min.css');
171
- $this->view->addJavascriptFile('awesome.jquery.min.js');
172
-
173
- > It's a good practise to provide minimized versions of your static files.
174
-
175
- Lets create a hook to multiply a number by ten.
176
-
177
- > You can see this trick in action if you are looking at the hooks in the shop template. For example, the suggested roundup gets
178
- > calculated that way when the total is assigned to the view.
179
-
180
- Create a file named `AwesomeHooks.php` and save it at `Template/Awesome/Hooks`. Then paste in the following content:
181
-
182
- <?php
183
- class Elefunds_Template_Awesome_Hooks_AwesomeHooks {
184
- public static function mulitplyByTen($view, $number) {
185
- $view->assign('number', $number * 10);
186
- }
187
- }
188
- ?>
189
-
190
- Now adjust your Configuration file like this:
191
-
192
- <?php
193
- require_once dirname(__FILE__) . '/../../Configuration/DefaultConfiguration.php';
194
- require_once dirname(__FILE__) . '/../../View/BaseView.php';
195
- require_once dirname(__FILE__) . '/Hooks/AwesomeHooks.php';
196
-
197
- class Elefunds_Template_Awesome_AwesomeConfiguration extends Configuration_DefaultConfiguration {
198
- public function init() {
199
- parent::init();
200
-
201
- $this->setView(new Elefunds_View_BaseView());
202
- $this->view->setTemplate('Awesome');
203
- $this->view->registerAssignHook('number', 'Elefunds_Template_Awesome_Hooks_AwesomeHooks', 'mulitplyByTen');
204
- }
205
- }
206
- ?>
207
-
208
- We have omitted the number but added a hook for it. If the number is assigned from the outside, the hook kicks in and adds
209
- a variable named `numberMultipliedByTen` to the view. If the number is set, it will be available like this:
210
-
211
- <div>
212
- <p><?php echo $view['number']; ?></p>
213
- <p><?php echo $view['numberMultipliedByTen']; ?></p>
214
- </div>
215
-
216
- In order for this to work, the number must be set, an example would be:
217
-
218
- <?php
219
- require_once 'Facade.php';
220
- require_once 'Template/Awesome/AwesomeConfiguration.php';
221
-
222
- $facade = new Elefunds_Facade(new Elefunds_Template_Awesome_AwesomeConfiguration());
223
- $facade->getConfiguration()->getView()->assign('number', 42);
224
- echo $facade->renderTemplate();
225
- ?>
226
-
227
- If the number is assigned, the multiplied version is assigned as well.
228
-
229
- > There's a whole lot more to explore. Be sure to check out the shop template to get an in-depth overview on what is
230
- > possible with this SDK's templating system.
231
-
232
-
233
-
234
-
235
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Elefunds/Example/rawDataExample.php DELETED
@@ -1,110 +0,0 @@
1
- <?php
2
-
3
- require_once dirname(__FILE__) . '/../Facade.php';
4
- require_once dirname(__FILE__) . '/RawDataConfiguration.php';
5
-
6
- // Set up API
7
- $facade = new Elefunds_Facade();
8
- $facade->setConfiguration(new Example_RawDataConfiguration());
9
-
10
- /**
11
- * BASIC ACTIONS
12
- */
13
-
14
- // Get receivers
15
- $receivers = $facade->getReceivers();
16
- var_dump($receivers);
17
-
18
- // Send donation
19
- $response = $facade->addDonations(
20
-
21
- array(
22
-
23
- $facade->createDonation()->setForeignId(123)
24
- ->setAmount(50)
25
- ->addReceiverId(1001)
26
- ->setAvailableReceiverIds(array(1001, 1002, 1003))
27
- ->setTime(new DateTime()),
28
-
29
- $facade->createDonation()->setForeignId(125)
30
- ->setAmount(25)
31
- ->setSuggestedAmount(20)
32
- ->setGrandTotal(1005)
33
- ->setReceiverIds(array(1001, 1002))
34
- ->setAvailableReceiverIds(array(1001, 1002, 1003))
35
- ->setTime(new DateTime())
36
- ->setDonator('hello@elefunds.de', 'Christian', 'Peters', 'Schönhauser Allee 124', 10243, 'Berlin')
37
-
38
- )
39
-
40
- );
41
-
42
- // Sample server response
43
- echo('<p>Added: ' . $response . '</p>');
44
-
45
- // Some users did not pay or an order got canceled? Just delete their donations with the corresponding foreignId
46
- $response = $facade->cancelDonation(123);
47
- // Or Multiple
48
- # $response = $facade->cancelDonations(array(123, 124));
49
-
50
- // Sample server response
51
- echo('<p>Deleted: ' . $response . '</p>');
52
-
53
- // NOTE: Normally you should wrap API calls around try ... catch! Like this:
54
- try {
55
- $receivers = $facade->getReceivers();
56
- } catch (Elefunds_Exception_ElefundsCommunicationException $exception) {
57
- $message = $exception->getMessage();
58
- $additionalInformation = $exception->getAdditionalInformation();
59
- }
60
-
61
- /**
62
- * COOL TRICKS
63
- */
64
-
65
- // Wanna change language at runtime? Here's an example for TYPO3:
66
- # $countrycode = $GLOBALS['TSFE']->sys_language_uid === 0 ? 'de' : 'en';
67
- # $facade->getConfiguration()->setCountrycode($countrycode);
68
- # $receivers = $facade->getReceivers();
69
-
70
- // Use the API for different shops and want to switch configuration at will?
71
- # $configuration = $shop->getId() === 1 ? new MyFirstShopConfiguration() : new MySecondShopConfiguration();
72
- # $facade->setConfiguration($configuration);
73
-
74
-
75
- // Wanna switch from curl to some rare php module no one uses?
76
- // You can opt to push this into your configuration file, but you're free to do it at runtime
77
-
78
- # require_once('path/to/class/that/implements/our/RestInterface/Implementation.php);
79
- # $facade->getConfiguration()->setRestImplementation(new Implementation());
80
-
81
-
82
- // You have three different shops, one on doctrine, one on propel and one on your self build persistence layer?
83
- // You want to have the donation class be a part of your backend, so it gets auto persisted after retrieving?
84
- // You want to decide at runtime, which backend to use?
85
-
86
- // 1. Generate a donation class for your backend and implement the Elefunds_Model_DonationInterface
87
- // 2. Use the full power of your persistence backend of choice
88
- // 3. Set the backend at runtime like this (assumes that your shop / framework uses autoloading for the persistence backend)
89
- // 4. That's it.
90
-
91
- /*
92
- switch($persistenceBackend) {
93
-
94
- case self::DOCTRINCE:
95
- $facade->getConfiguration()->setDonationClassName('Application\Domain\Model\YourDonationClass');
96
- break;
97
-
98
- case self::PROPEL:
99
- $facade->getConfiguration()->setDonationClassName('Application\Domain\Model\YourOtherDonationClass');
100
- break;
101
-
102
- case self::MYCOOLPERSISTENCEBACKEND:
103
- $facade->getConfiguration()->setDonationClassName('Application\Domain\Model\YourThirdDonationClass');
104
- break;
105
-
106
- }
107
- */
108
-
109
- // Same is true for Receivers!
110
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Elefunds/Example/shopExample.php DELETED
@@ -1,81 +0,0 @@
1
- <?php
2
-
3
- /*
4
- * A sample checkout page
5
- */
6
- require_once dirname(__FILE__) . '/../Facade.php';
7
- require_once dirname(__FILE__) . '/ShopExampleConfiguration.php';
8
-
9
- try {
10
- $facade = new Elefunds_Facade();
11
-
12
- $facade->setConfiguration(new Elefunds_Example_ShopExampleConfiguration());
13
-
14
- // Assign the total at runtime.
15
- //
16
- // Normally this would be coming from the grand total in the checkout process.
17
- // For our example, we'll hard-code the value.
18
- $actualTotal = 960;
19
- $facade->getConfiguration()->getView()->assign('total', $actualTotal);
20
-
21
- // Define the skin of the module. Currently, the skin is made up of the following
22
- // theme: 'light', 'dark'
23
- // color: 'orange', 'blue', 'green', 'purple'
24
- $facade->getConfiguration()->getView()->assign('skin',
25
- array(
26
- 'theme' => 'dark',
27
- 'color' => 'blue'
28
- )
29
- );
30
-
31
- $snippet = $facade->renderTemplate();
32
-
33
- } catch (Elefunds_Exception_ElefundsCommunicationException $error) {
34
-
35
- // If something goes wrong, we do not render anything at all.
36
- $snippet = '';
37
- }
38
-
39
- ?>
40
-
41
- <!DOCTYPE HTML >
42
- <html>
43
- <head>
44
- <meta http-equiv="content-type" content="text/html; charset=utf-8" />
45
- <title>My Shop</title>
46
- <?php foreach ($facade->getTemplateCssFiles() as $cssFile): ?>
47
- <link rel="stylesheet" type="text/css" href="../<?php echo $cssFile; ?>">
48
- <?php endforeach; ?>
49
- <!-- Be sure to include jQuery as it's required by our JavaScript files -->
50
- <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
51
- <style>
52
- body {
53
- font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
54
- }
55
- </style>
56
- </head>
57
- <body>
58
- <h2>My awesome Shop</h2>
59
-
60
- <!-- Lets assume the checkout total is 9.60€ -->
61
- <div style="margin-left: 780px; margin-bottom: 10px; font-weight: bold;">Total:&nbsp;&nbsp;&nbsp;&nbsp;9.60 €</div>
62
-
63
- <!-- Some other HTML here -->
64
-
65
- <!--
66
- This will render the template. If you are using a form, then you will have access to the selected
67
- receivers automatically, because they are all rendered as input fields, so you have them to your
68
- service upon your next request.
69
-
70
- You can opt to override the template in Template/Shop/View.phtml to fit your needs if you have
71
- another implementation.
72
- -->
73
- <?php echo $snippet; ?>
74
-
75
- <!-- Even more HTML here -->
76
-
77
- <?php foreach ($facade->getTemplateJavascriptFiles() as $javascript): ?>
78
- <script type="text/javascript" src="../<?php echo $javascript; ?>"></script>
79
- <?php endforeach; ?>
80
- </body>
81
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Elefunds/Example/shopExampleCheckoutSuccess.php DELETED
@@ -1,60 +0,0 @@
1
- <?php
2
-
3
- /*
4
- * A sample successful order page
5
- */
6
- require_once dirname(__FILE__) . '/../Facade.php';
7
- require_once dirname(__FILE__) . '/ShopExampleCheckoutSuccessConfiguration.php';
8
-
9
- $facade = new Elefunds_Facade();
10
- $facade->setConfiguration(new Elefunds_Example_ShopExampleCheckoutSuccessConfiguration());
11
-
12
- // We've prepared this for you: The names of all receivers are given as hidden field
13
- // in the checkout template and you get the ids of the receivers via the checked fields.
14
- //
15
- // Just check which receivers have been checked by the user and assign them here.
16
- //
17
- // You can get the id of the receiver from the checkbox input field id
18
- // Like this: $receiverIds = array_map(function($x) { return (int)$x; }, $params['elefunds_receiver']);
19
- //
20
- // We assume, that Care and UNO have been chosen.
21
- $facade->getConfiguration()->getView()->assign('receivers', array(
22
- 2 => 'UNO',
23
- 3 => 'Care'
24
- ));
25
-
26
- // Assign current orderId as foreignId
27
- $facade->getConfiguration()->getView()->assign('foreignId', 1234);
28
-
29
- // Define the skin of the module. Currently, the skin is made up of the following...
30
- // theme: 'light', 'dark'
31
- // color: 'orange', 'blue', 'green', 'purple'
32
- $facade->getConfiguration()->getView()->assign('skin',
33
- array(
34
- 'theme' => 'dark',
35
- 'color' => 'blue'
36
- )
37
- );
38
-
39
- ?>
40
-
41
- <!DOCTYPE HTML >
42
- <html>
43
- <head>
44
- <meta http-equiv="content-type" content="text/html; charset=utf-8" />
45
- <title>My awesome Shop</title>
46
- <?php foreach ($facade->getTemplateCssFiles() as $cssFile): ?>
47
- <link rel="stylesheet" type="text/css" href="../<?php echo $cssFile; ?>">
48
- <?php endforeach; ?>
49
- </head>
50
- <body>
51
- <h2>My awesome Shop</h2>
52
-
53
- <!-- Some other HTML here -->
54
-
55
- <?php echo $facade->renderTemplate('CheckoutSuccess'); ?>
56
-
57
- <!-- Even more HTML here -->
58
-
59
- </body>
60
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Elefunds/Template/Shop/CheckoutConfiguration.php DELETED
@@ -1,119 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * elefunds API PHP Library
5
- *
6
- * Copyright (c) 2012, elefunds GmbH <hello@elefunds.de>.
7
- * All rights reserved.
8
- *
9
- * Redistribution and use in source and binary forms, with or without
10
- * modification, are permitted provided that the following conditions
11
- * are met:
12
- *
13
- * * Redistributions of source code must retain the above copyright
14
- * notice, this list of conditions and the following disclaimer.
15
- *
16
- * * Redistributions in binary form must reproduce the above copyright
17
- * notice, this list of conditions and the following disclaimer in
18
- * the documentation and/or other materials provided with the
19
- * distribution.
20
- *
21
- * * Neither the name of the elefunds GmbH nor the names of its
22
- * contributors may be used to endorse or promote products derived
23
- * from this software without specific prior written permission.
24
- *
25
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
28
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
29
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
30
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
31
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
32
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
33
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
35
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36
- * POSSIBILITY OF SUCH DAMAGE.
37
- *
38
- */
39
-
40
- require_once dirname(__FILE__) . '/ShopConfiguration.php';
41
- require_once dirname(__FILE__) . '/../../View/BaseView.php';
42
- require_once dirname(__FILE__) . '/Hooks/ShopHooks.php';
43
-
44
- /**
45
- * Checkout Configuration for a shop template.
46
- *
47
- * @package elefunds API PHP Library
48
- * @subpackage Template\Shop
49
- * @author Christian Peters <christian@elefunds.de>
50
- * @copyright 2012 elefunds GmbH <hello@elefunds.de>
51
- * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
52
- * @link http://www.elefunds.de
53
- * @since File available since Release 1.0.0
54
- */
55
- class Elefunds_Template_Shop_CheckoutConfiguration extends Elefunds_Template_Shop_ShopConfiguration {
56
-
57
- /**
58
- * @var boolean
59
- */
60
- protected $autoFetchReceivers = TRUE;
61
-
62
- /**
63
- * Sets if receivers are auto fetched from the API.
64
- *
65
- * Set this to FALSE if you want to assign the receivers for yourself
66
- * (for example if you want to use caching).
67
- *
68
- * You should then call $this->view->assign('receivers', $receivers) for yourself.
69
- *
70
- * @param boolean $autoFetchReceivers
71
- */
72
- public function setAutoFetchReceivers($autoFetchReceivers)
73
- {
74
- $this->autoFetchReceivers = $autoFetchReceivers;
75
- }
76
-
77
- /**
78
- * Assigns the receivers.
79
- *
80
- * @return void
81
- */
82
- public function init() {
83
-
84
- parent::init();
85
-
86
- // If set to FALSE, no donation receipt if offered.
87
- // If TRUE you have to adjust T&Cs and send back donator information
88
- // Refer to the documentation for further information.
89
- $this->view->assign('offerDonationReceipt', TRUE);
90
-
91
- if ($this->autoFetchReceivers) {
92
- $this->view->assign('receivers', $this->facade->getReceivers());
93
- }
94
-
95
- // Defaults, you can opt to override this if you like.
96
- $this->view->assign('currency', '€');
97
- $this->view->assign('currencyDelimiter', '.');
98
- $this->view->assign('toolTipPosition', 'top');
99
-
100
- $this->view->assign('roundSum', 'elefunds_round_sum');
101
- $this->view->assign('roundSumContainer', 'elefunds_below_container');
102
-
103
- // L18n
104
- if ($this->countrycode === 'de') {
105
- $this->view->assign('elefundsDescription', 'Die elefunds Stiftung gUG leitet Deine Spende zu 100% an die ausgewählten Organisationen weiter.');
106
- $this->view->assign('slogan', 'Ja, ich möchte mit meinem Einkauf aufrunden und spenden!');
107
- $this->view->assign('receipt_slogan', 'Ich möchte eine Spendenquittung erhalten.');
108
- $this->view->assign('roundedSumString', 'Runde Summe');
109
- } else {
110
- $this->view->assign('elefundsDescription', 'elefunds is a charitable foundation proceeding 100% of your donation to the charities of your choice.');
111
- $this->view->assign('slogan', 'Yes, I want to roundup my purchase!');
112
- $this->view->assign('receipt_slogan', 'I want to receive a donation receipt.');
113
- $this->view->assign('roundedSumString', 'Round Sum');
114
- }
115
-
116
- $this->view->registerAssignHook('shopWidth', 'Elefunds_Template_Shop_Hooks_ShopHooks', 'calculatePadding');
117
- $this->view->registerAssignHook('total', 'Elefunds_Template_Shop_Hooks_ShopHooks', 'calculateRoundUp');
118
- }
119
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Elefunds/Template/Shop/CheckoutSuccess.phtml DELETED
@@ -1,18 +0,0 @@
1
- <div id="elefunds_share">
2
- <h3><?php echo $view['tellAboutIt']; ?></h3>
3
- <p><?php echo $view['IDonatedAndWantToTellAboutIt']; ?></p>
4
- <?php foreach($view['shares'] as $share): ?>
5
- <a title="<?php echo $share->title ?>" href="<?php echo $share->url; ?>" onclick="return elefunds_share('<?php echo $share->url; ?>', '<?php echo $share->title ?>', <?php echo $share->width; ?>, <?php echo $share->height; ?>)">
6
- <img src="<?php echo $share->imageUrl; ?>" />
7
- </a>
8
- &nbsp;&nbsp;
9
- <?php endforeach; ?>
10
- <span><?php echo $view['learnMore']; ?> <a href="http://elefunds.de" target="_blank"><img src="https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/elefunds_logo_s.png"></a></span>
11
- </div>
12
- <script language="javascript" type="text/javascript">
13
- function elefunds_share(url, title, width, height) {
14
- var newwindow=window.open(url,title,'left=100,top=50,width='+width+',height='+height);
15
- if (window.focus) {newwindow.focus()}
16
- return false;
17
- }
18
- </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Elefunds/Template/Shop/CheckoutSuccessConfiguration.php DELETED
@@ -1,115 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * elefunds API PHP Library
5
- *
6
- * Copyright (c) 2012, elefunds GmbH <hello@elefunds.de>.
7
- * All rights reserved.
8
- *
9
- * Redistribution and use in source and binary forms, with or without
10
- * modification, are permitted provided that the following conditions
11
- * are met:
12
- *
13
- * * Redistributions of source code must retain the above copyright
14
- * notice, this list of conditions and the following disclaimer.
15
- *
16
- * * Redistributions in binary form must reproduce the above copyright
17
- * notice, this list of conditions and the following disclaimer in
18
- * the documentation and/or other materials provided with the
19
- * distribution.
20
- *
21
- * * Neither the name of the elefunds GmbH nor the names of its
22
- * contributors may be used to endorse or promote products derived
23
- * from this software without specific prior written permission.
24
- *
25
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
28
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
29
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
30
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
31
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
32
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
33
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
35
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36
- * POSSIBILITY OF SUCH DAMAGE.
37
- *
38
- */
39
-
40
- require_once dirname(__FILE__) . '/ShopConfiguration.php';
41
- require_once dirname(__FILE__) . '/../../View/BaseView.php';
42
- require_once dirname(__FILE__) . '/Hooks/ShopHooks.php';
43
-
44
- /**
45
- * Base Configuration for the checkout success configuration of the shop template.
46
- *
47
- * @package elefunds API PHP Library
48
- * @subpackage Template\Shop
49
- * @author Christian Peters <christian@elefunds.de>
50
- * @copyright 2012 elefunds GmbH <hello@elefunds.de>
51
- * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
52
- * @link http://www.elefunds.de
53
- * @since File available since Release 1.0.0
54
- */
55
- class Elefunds_Template_Shop_CheckoutSuccessConfiguration extends Elefunds_Template_Shop_ShopConfiguration {
56
-
57
- /*
58
- * NOTE:
59
- *
60
- * To change this template, instead of modifying this file, do the following:
61
- *
62
- * * create a new Folder /Template/MyTemplate
63
- * * copy View.phtml and CheckoutSuccess.phtml in it (and adjust them)
64
- * * create a MyTemplateBaseConfiguration class, that extends this class (and adjust it)
65
- */
66
-
67
- /**
68
- * Assigns the basic variables for the shop.
69
- *
70
- * @return void
71
- */
72
- public function init() {
73
- parent::init();
74
-
75
- $this->view->assign('clientId', $this->facade->getConfiguration()->getClientId());
76
- $this->view->assign('hashedKey', $this->facade->getConfiguration()->getHashedKey());
77
-
78
- $this->view->assign('availableShareServices', array(
79
- 'facebook' => array(
80
- 'image' => 'https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/share_on_facebook.png',
81
- 'width' => 660,
82
- 'height' => 350,
83
- 'title' => $this->countrycode === 'de' ? 'Auf Facebook teilen' : 'Share on facebook'
84
- ),
85
- 'twitter' => array(
86
- 'image' => 'https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/tweet_on_twitter.png',
87
- 'width' => 620,
88
- 'height' => 415,
89
- 'title' => $this->countrycode === 'de' ? 'Auf Twitter tweeten' : 'Tweet on twitter'
90
- ),
91
- ));
92
-
93
- if($this->countrycode === 'de') {
94
- $this->view->assign('learnMore', 'Erfahre mehr über');
95
- } else {
96
- $this->view->assign('learnMore', 'Learn more about');
97
- }
98
-
99
- $this->view->assign('shareServices', array('facebook', 'twitter'));
100
-
101
- // L18n
102
- if ($this->countrycode === 'de') {
103
- $this->view->assign('tellAboutIt', 'Juhu! Vielen Dank für Deine Spende.');
104
- $this->view->assign('IDonatedAndWantToTellAboutIt', 'Teilen kann man nicht nur mit seinem Einkauf, sondern auch mit seinen Freunden.<br />Erzähle Deinen Freunden von elefunds!');
105
- } else {
106
- $this->view->assign('tellAboutIt', 'Yay! Thank you for your donation.');
107
- $this->view->assign('IDonatedAndWantToTellAboutIt', 'If everyone used their change for change we could make the world a better place. Tell your friends about elefunds.');
108
- }
109
-
110
- // Hooks
111
- $this->view->registerAssignHook('receivers', 'Elefunds_Template_Shop_Hooks_ShopHooks', 'onReceiversAdded');
112
- $this->view->registerAssignHook('foreignId', 'Elefunds_Template_Shop_Hooks_ShopHooks', 'onForeignIdAdded');
113
- }
114
-
115
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Elefunds/Template/Shop/Css/color.less DELETED
@@ -1,2 +0,0 @@
1
- @theme: "light";
2
- @theme-color: "grey";
 
 
lib/Elefunds/Template/Shop/Css/elefunds.less DELETED
@@ -1,436 +0,0 @@
1
- @import "elements";
2
- @import "color";
3
-
4
- @cdn-URL: "https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com";
5
-
6
- @font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
7
-
8
- @light-border: #8c8f91;
9
- @dark-border: #3a414a;
10
-
11
- @light-currency: #2c3238;
12
- @light-shadow: #C6CFD8;
13
- @light-input-color: #7f807f;
14
- @light-input-border: #7f807f;
15
- @light-label-color: #d0d9d2;
16
- @light-text-color: #000;
17
-
18
- @dark-currency: #C6CFD8;
19
- @dark-shadow: #2c3238;
20
- @dark-input-color: #c6cfd8;
21
- @dark-input-border: #2f3439;
22
- @dark-label-color: #C6CFD8;
23
- @dark-text-color: #fff;
24
-
25
- #elefunds_top {
26
- position: relative;
27
- background: url('@{cdn-URL}/@{theme}/top_bar.png') repeat-x;
28
- height: 49px;
29
-
30
- @border-color: "@{theme}-border";
31
- border-left: 1px solid @@border-color;
32
- border-right: 1px solid @@border-color;
33
- line-height: 1.4;
34
-
35
- .user-select(none);
36
-
37
- > div {
38
- float: right;
39
- margin-right: 10px;
40
- }
41
- }
42
-
43
- #elefunds_logo {
44
- position: absolute;
45
- top: 8px;
46
- left: 10px;
47
- }
48
-
49
- #elefunds_arrow {
50
- position: relative;
51
- display: inline-block;
52
- float: left;
53
- background: url('@{cdn-URL}/@{theme}/arrow_bg.png') repeat-x;
54
- height: 49px;
55
- padding: 0;
56
- }
57
-
58
- #elefunds_checkbox {
59
- position: absolute;
60
- top: 18px;
61
- left: 19px;
62
- width: 18px;
63
- line-height: normal;
64
- cursor: pointer;
65
- opacity: 0;
66
-
67
- + label {
68
- font-family: @font-family;
69
- font-size: 12px;
70
- font-weight: normal;
71
- @color: "@{theme}-label-color";
72
- color: @@color;
73
- padding: 9px 10px 9px 60px;
74
- height: 31px;
75
- margin: 0;
76
- max-width: 180px;
77
- float: left;
78
- cursor: pointer;
79
- background: url('@{cdn-URL}/@{theme}/@{theme-color}/arrow_off.png') no-repeat;
80
- }
81
-
82
- &:checked + label {
83
- background: url('@{cdn-URL}/@{theme}/@{theme-color}/arrow_on.png') no-repeat;
84
- }
85
- }
86
-
87
- #elefunds_arrow_end {
88
- width: 14px;
89
- height: 49px;
90
- display: inline-block;
91
- background: url('@{cdn-URL}/@{theme}/arrow_end.png') no-repeat;
92
- }
93
-
94
- #elefunds_plus_minus {
95
- float: left;
96
- padding: 13px 10px 0 30px;
97
-
98
- img {
99
- margin: 0 1px;
100
- }
101
- }
102
-
103
- #elefunds_input_container {
104
- float: left;
105
- padding-top: 11px;
106
- }
107
-
108
- #elefunds_currency {
109
- display: inline-block;
110
- width: auto;
111
- height: 18px;
112
- padding: 4px 8px;
113
- font-family: @font-family;
114
- font-size: 12px;
115
- font-weight: normal;
116
- line-height: 18px;
117
- text-align: center;
118
- @color: "@{theme}-currency";
119
- color: @@color;
120
-
121
- @shadow: "@{theme}-shadow";
122
- text-shadow: 0 1px 0 @@shadow;
123
- background: url('@{cdn-URL}/@{theme}/currency_bg.png') repeat-x;
124
-
125
- @border: "@{theme}-input-border";
126
- border: 1px solid @@border;
127
- border-radius: 3px 0 0 3px;
128
- margin-right: -1px;
129
- float: left;
130
- }
131
-
132
- #elefunds_input {
133
- display: inline-block;
134
- width: 48px;
135
- height: 18px;
136
- padding: 4px 2px 4px 0;
137
- margin: 0;
138
- vertical-align: middle;
139
- text-align: center;
140
- font-family: @font-family;
141
- font-size: 12px;
142
- @color: "@{theme}-input-color";
143
- color: @@color;
144
-
145
- @shadow: "@{theme}-shadow";
146
- text-shadow: 0 1px 0 @@shadow;
147
- background: url('@{cdn-URL}/@{theme}/input_bg.png') repeat-x;
148
-
149
- @border: "@{theme}-input-border";
150
- border: 1px solid @@border;
151
- float: left;
152
- outline: none;
153
- }
154
-
155
- .elefunds_input_active {
156
- @color: "@{theme}-text-color";
157
- color: @@color !important;
158
- }
159
-
160
- #elefunds_bottom {
161
- height: 62px;
162
- border-width: 0 1px 1px;
163
- border-style: solid;
164
- border-color: #cfd0d4 #b9bec4;
165
- line-height: 1.4;
166
-
167
- .user-select(none);
168
- }
169
-
170
- .elefunds_receiver {
171
- margin: 0;
172
- text-align: center;
173
- display: inline-block;
174
- border-left: 1px solid #a3a6ac;
175
- background: url('@{cdn-URL}/receiver_off_bg.png') repeat-x;
176
- float: left;
177
- position: relative;
178
-
179
- > label > img {
180
- vertical-align: middle;
181
- -webkit-filter: grayscale(1) opacity(0.7);
182
- -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
183
- filter: alpha(opacity=50);
184
- }
185
-
186
- > input {
187
- cursor: pointer;
188
- opacity: 0;
189
- font-size: 100%;
190
- margin: 0;
191
- vertical-align: baseline;
192
- width: 22px;
193
- position: absolute;
194
- top: 25px;
195
- left: 13px;
196
- }
197
-
198
- > input + label {
199
- height: 42px;
200
- width: 165px;
201
- margin: 0;
202
- cursor: pointer;
203
- background: url('@{cdn-URL}/checkbox_off.png') 10px 24px no-repeat;
204
- display: inline-block;
205
- border-left: 1px solid rgb(246, 246, 246);
206
- border-left: 1px solid rgba(255, 255, 255, 0.6);
207
- }
208
-
209
- > input:checked + label {
210
- background: url('@{cdn-URL}/checkbox_on.png') 10px 24px no-repeat;
211
- }
212
- }
213
-
214
- #elefunds_bottom > input:first-child + div {
215
- border-left: 0 !important;
216
- }
217
-
218
- .elefunds_receiver_selected {
219
- background: url('@{cdn-URL}/receiver_on_bg.png') repeat-x;
220
-
221
- > label > img {
222
- filter: none;
223
- -webkit-filter: none;
224
- -ms-filter: none;
225
- }
226
- }
227
-
228
- #elefunds_below_container {
229
- font-family: @font-family;
230
- font-size: 16px;
231
- margin: 0;
232
- padding: 15px 0 10px;
233
- text-align: right;
234
-
235
- label {
236
- font-weight: normal;
237
- }
238
- }
239
-
240
- #elefunds_round_sum_container {
241
- background: url('@{cdn-URL}/elefunds_highlight.png') right top no-repeat;
242
-
243
- strong {
244
- font-weight: bold;
245
- line-height: 1.5em;
246
- }
247
-
248
- strong:last-child {
249
- margin-right: 8px;
250
- }
251
- }
252
-
253
- #elefunds_round_sum {
254
- display: inline-block;
255
- width: 65px;
256
- color: #222;
257
- }
258
-
259
- #elefunds_receipt {
260
- position: relative;
261
- float: left;
262
- font-size: 12px;
263
- color: #333;
264
- margin: 5px 0 0 15px;
265
-
266
- .user-select(none);
267
- }
268
-
269
- #elefunds_receipt_checkbox {
270
- position: absolute;
271
- top: 1px;
272
- cursor: pointer;
273
- opacity: 0;
274
- font-size: 100%;
275
- margin: 0;
276
- vertical-align: baseline;
277
- width: 16px;
278
-
279
- + label {
280
- margin: 0;
281
- cursor: pointer;
282
- background: url('@{cdn-URL}/receipt_off.png') no-repeat;
283
- display: inline-block;
284
- padding-left: 20px;
285
- }
286
- }
287
-
288
-
289
- #elefunds_receipt > input:checked + label {
290
- background: url('@{cdn-URL}/receipt_on.png') no-repeat;
291
- }
292
-
293
- .elefunds_hidden {
294
- visibility: hidden;
295
- }
296
-
297
- /* Social Media Share */
298
-
299
- #elefunds_share {
300
- width: 450px;
301
- padding: 20px 20px 10px;
302
- background: #f4f4f4;
303
- border: 4px solid #ccc;
304
- border-radius: 8px;
305
- font-family: @font-family;
306
- text-align: center;
307
-
308
- > a {
309
- text-decoration: none;
310
- }
311
-
312
- h3 {
313
- font-weight: bold;
314
- color: #222;
315
- margin: 0;
316
- }
317
-
318
- p {
319
- font-size: 14px;
320
- color: #666;
321
- margin: 20px 0 10px;
322
- padding: 10px 10px 20px;
323
- }
324
-
325
- span {
326
- font-style: normal;
327
- font-size: 11px;
328
- line-height: 21px;
329
- margin-top: 6px;
330
- vertical-align: top;
331
- display: block;
332
- }
333
- }
334
-
335
- /* TOOLTIPS */
336
-
337
- #tiptip_content {
338
- font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
339
- background: #222;
340
- background: rgba(0, 0, 0, 0.7);
341
- padding: 3px;
342
- overflow: hidden;
343
- width: 260px;
344
-
345
- .rounded(6px);
346
- .drop-shadow(0, 3px, 7px, 0.3);
347
- }
348
-
349
- #tiptip_title {
350
- background-color: #f5f5f5;
351
- padding: 10px 15px 8px;
352
- color: #222;
353
- font-size: 18px;
354
- line-height: 1;
355
- text-align: center;
356
- font-weight: bold;
357
-
358
- .border-radius(3px, 3px, 0, 0);
359
-
360
- border-bottom: 1px solid #eee;
361
- margin: 0;
362
- }
363
-
364
- #tiptip_inner {
365
- font-size: 12px;
366
- color: #222;
367
- background-color: #fff;
368
- padding: 14px;
369
-
370
- .border-radius(0, 0, 3px, 3px);
371
-
372
- -webkit-background-clip: padding-box;
373
- -moz-background-clip: padding-box;
374
- background-clip: padding-box;
375
- }
376
-
377
- #tiptip_holder {
378
- display: none;
379
- position: absolute;
380
- top: 0;
381
- left: 0;
382
- z-index: 99999;
383
- }
384
-
385
- #tiptip_holder.tip_top {
386
- margin-bottom: 5px;
387
- }
388
-
389
- #tiptip_holder.tip_left {
390
- margin-right: 5px;
391
- }
392
-
393
- #tiptip_holder.tip_right {
394
- margin-left: 5px;
395
- }
396
-
397
- #tiptip_holder.tip_bottom {
398
- margin-top: 5px;
399
- }
400
-
401
- #tiptip_arrow, #tiptip_arrow_inner {
402
- position: absolute;
403
- border-color: transparent;
404
- border-style: solid;
405
- border-width: 6px;
406
- height: 0;
407
- width: 0;
408
- }
409
-
410
- #tiptip_holder.tip_top #tiptip_arrow_inner {
411
- margin-top: -7px;
412
- margin-left: -6px;
413
- border-top-color: rgb(25,25,25);
414
- border-top-color: rgba(25, 25, 25, 0.92);
415
- }
416
-
417
- #tiptip_holder.tip_right #tiptip_arrow_inner {
418
- margin-top: -6px;
419
- margin-left: -5px;
420
- border-right-color: rgb(25,25,25);
421
- border-right-color: rgba(25, 25, 25, 0.92);
422
- }
423
-
424
- #tiptip_holder.tip_bottom #tiptip_arrow_inner {
425
- margin-top: -5px;
426
- margin-left: -6px;
427
- border-bottom-color: rgb(25,25,25);
428
- border-bottom-color: rgba(25, 25, 25, 0.92);
429
- }
430
-
431
- #tiptip_holder.tip_left #tiptip_arrow_inner {
432
- margin-top: -6px;
433
- margin-left: -7px;
434
- border-left-color: rgb(25,25,25);
435
- border-left-color: rgba(25, 25, 25, 0.92);
436
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Elefunds/Template/Shop/Css/elefunds_dark_blue.min.css DELETED
@@ -1 +0,0 @@
1
- #elefunds_top{position:relative;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/top_bar.png') repeat-x;height:49px;border-left:1px solid #3a414a;border-right:1px solid #3a414a;line-height:1.4;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#elefunds_top>div{float:right;margin-right:10px}#elefunds_logo{position:absolute;top:8px;left:10px}#elefunds_arrow{position:relative;display:inline-block;float:left;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/arrow_bg.png') repeat-x;height:49px;padding:0}#elefunds_checkbox{position:absolute;top:18px;left:19px;width:18px;line-height:normal;cursor:pointer;opacity:0}#elefunds_checkbox+label{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;font-weight:normal;color:#c6cfd8;padding:9px 10px 9px 60px;height:31px;margin:0;max-width:180px;float:left;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/blue/arrow_off.png') no-repeat}#elefunds_checkbox:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/blue/arrow_on.png') no-repeat}#elefunds_arrow_end{width:14px;height:49px;display:inline-block;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/arrow_end.png') no-repeat}#elefunds_plus_minus{float:left;padding:13px 10px 0 30px}#elefunds_plus_minus img{margin:0 1px}#elefunds_input_container{float:left;padding-top:11px}#elefunds_currency{display:inline-block;width:auto;height:18px;padding:4px 8px;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;font-weight:normal;line-height:18px;text-align:center;color:#c6cfd8;text-shadow:0 1px 0 #2c3238;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/currency_bg.png') repeat-x;border:1px solid #2f3439;border-radius:3px 0 0 3px;margin-right:-1px;float:left}#elefunds_input{display:inline-block;width:48px;height:18px;padding:4px 2px 4px 0;margin:0;vertical-align:middle;text-align:center;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;color:#c6cfd8;text-shadow:0 1px 0 #2c3238;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/input_bg.png') repeat-x;border:1px solid #2f3439;float:left;outline:0}.elefunds_input_active{color:#fff!important}#elefunds_bottom{height:62px;border-width:0 1px 1px;border-style:solid;border-color:#cfd0d4 #b9bec4;line-height:1.4;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.elefunds_receiver{margin:0;text-align:center;display:inline-block;border-left:1px solid #a3a6ac;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receiver_off_bg.png') repeat-x;float:left;position:relative}.elefunds_receiver>label>img{vertical-align:middle;-webkit-filter:grayscale(1) opacity(0.7);-ms-filter:"alpha(opacity=50)";filter:alpha(opacity=50)}.elefunds_receiver>input{cursor:pointer;opacity:0;font-size:100%;margin:0;vertical-align:baseline;width:22px;position:absolute;top:25px;left:13px}.elefunds_receiver>input+label{height:42px;width:165px;margin:0;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/checkbox_off.png') 10px 24px no-repeat;display:inline-block;border-left:1px solid #f6f6f6;border-left:1px solid rgba(255,255,255,0.6)}.elefunds_receiver>input:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/checkbox_on.png') 10px 24px no-repeat}#elefunds_bottom>input:first-child+div{border-left:0!important}.elefunds_receiver_selected{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receiver_on_bg.png') repeat-x}.elefunds_receiver_selected>label>img{filter:none;-webkit-filter:none;-ms-filter:none}#elefunds_below_container{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:16px;margin:0;padding:15px 0 10px;text-align:right}#elefunds_below_container label{font-weight:normal}#elefunds_round_sum_container{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/elefunds_highlight.png') right top no-repeat}#elefunds_round_sum_container strong{font-weight:bold;line-height:1.5em}#elefunds_round_sum_container strong:last-child{margin-right:8px}#elefunds_round_sum{display:inline-block;width:65px;color:#222}#elefunds_receipt{position:relative;float:left;font-size:12px;color:#333;margin:5px 0 0 15px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#elefunds_receipt_checkbox{position:absolute;top:1px;cursor:pointer;opacity:0;font-size:100%;margin:0;vertical-align:baseline;width:16px}#elefunds_receipt_checkbox+label{margin:0;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receipt_off.png') no-repeat;display:inline-block;padding-left:20px}#elefunds_receipt>input:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receipt_on.png') no-repeat}.elefunds_hidden{visibility:hidden}#elefunds_share{width:450px;padding:20px 20px 10px;background:#f4f4f4;border:4px solid #ccc;border-radius:8px;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;text-align:center}#elefunds_share>a{text-decoration:none}#elefunds_share h3{font-weight:bold;color:#222;margin:0}#elefunds_share p{font-size:14px;color:#666;margin:20px 0 10px;padding:10px 10px 20px}#elefunds_share span{font-style:normal;font-size:11px;line-height:21px;margin-top:6px;vertical-align:top;display:block}#tiptip_content{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;background:#222;background:rgba(0,0,0,0.7);padding:3px;overflow:hidden;width:260px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0,0,0,0.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,0.3);box-shadow:0 3px 7px rgba(0,0,0,0.3)}#tiptip_title{background-color:#f5f5f5;padding:10px 15px 8px;color:#222;font-size:18px;line-height:1;text-align:center;font-weight:bold;-webkit-border-top-left-radius:3px;-webkit-border-top-right-radius:3px;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-moz-border-radius-topleft:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:0;border-bottom-left-radius:0;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box;border-bottom:1px solid #eee;margin:0}#tiptip_inner{font-size:12px;color:#222;background-color:#fff;padding:14px;-webkit-border-top-left-radius:0;-webkit-border-top-right-radius:0;-webkit-border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;-moz-border-radius-topleft:0;-moz-border-radius-topright:0;-moz-border-radius-bottomright:3px;-moz-border-radius-bottomleft:3px;border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px;-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box}#tiptip_holder{display:none;position:absolute;top:0;left:0;z-index:99999}#tiptip_holder.tip_top{margin-bottom:5px}#tiptip_holder.tip_left{margin-right:5px}#tiptip_holder.tip_right{margin-left:5px}#tiptip_holder.tip_bottom{margin-top:5px}#tiptip_arrow,#tiptip_arrow_inner{position:absolute;border-color:transparent;border-style:solid;border-width:6px;height:0;width:0}#tiptip_holder.tip_top #tiptip_arrow_inner{margin-top:-7px;margin-left:-6px;border-top-color:#191919;border-top-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_right #tiptip_arrow_inner{margin-top:-6px;margin-left:-5px;border-right-color:#191919;border-right-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_bottom #tiptip_arrow_inner{margin-top:-5px;margin-left:-6px;border-bottom-color:#191919;border-bottom-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_left #tiptip_arrow_inner{margin-top:-6px;margin-left:-7px;border-left-color:#191919;border-left-color:rgba(25,25,25,0.92)}
 
lib/Elefunds/Template/Shop/Css/elefunds_dark_green.min.css DELETED
@@ -1 +0,0 @@
1
- #elefunds_top{position:relative;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/top_bar.png') repeat-x;height:49px;border-left:1px solid #3a414a;border-right:1px solid #3a414a;line-height:1.4;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#elefunds_top>div{float:right;margin-right:10px}#elefunds_logo{position:absolute;top:8px;left:10px}#elefunds_arrow{position:relative;display:inline-block;float:left;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/arrow_bg.png') repeat-x;height:49px;padding:0}#elefunds_checkbox{position:absolute;top:18px;left:19px;width:18px;line-height:normal;cursor:pointer;opacity:0}#elefunds_checkbox+label{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;font-weight:normal;color:#c6cfd8;padding:9px 10px 9px 60px;height:31px;margin:0;max-width:180px;float:left;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/green/arrow_off.png') no-repeat}#elefunds_checkbox:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/green/arrow_on.png') no-repeat}#elefunds_arrow_end{width:14px;height:49px;display:inline-block;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/arrow_end.png') no-repeat}#elefunds_plus_minus{float:left;padding:13px 10px 0 30px}#elefunds_plus_minus img{margin:0 1px}#elefunds_input_container{float:left;padding-top:11px}#elefunds_currency{display:inline-block;width:auto;height:18px;padding:4px 8px;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;font-weight:normal;line-height:18px;text-align:center;color:#c6cfd8;text-shadow:0 1px 0 #2c3238;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/currency_bg.png') repeat-x;border:1px solid #2f3439;border-radius:3px 0 0 3px;margin-right:-1px;float:left}#elefunds_input{display:inline-block;width:48px;height:18px;padding:4px 2px 4px 0;margin:0;vertical-align:middle;text-align:center;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;color:#c6cfd8;text-shadow:0 1px 0 #2c3238;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/input_bg.png') repeat-x;border:1px solid #2f3439;float:left;outline:0}.elefunds_input_active{color:#fff!important}#elefunds_bottom{height:62px;border-width:0 1px 1px;border-style:solid;border-color:#cfd0d4 #b9bec4;line-height:1.4;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.elefunds_receiver{margin:0;text-align:center;display:inline-block;border-left:1px solid #a3a6ac;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receiver_off_bg.png') repeat-x;float:left;position:relative}.elefunds_receiver>label>img{vertical-align:middle;-webkit-filter:grayscale(1) opacity(0.7);-ms-filter:"alpha(opacity=50)";filter:alpha(opacity=50)}.elefunds_receiver>input{cursor:pointer;opacity:0;font-size:100%;margin:0;vertical-align:baseline;width:22px;position:absolute;top:25px;left:13px}.elefunds_receiver>input+label{height:42px;width:165px;margin:0;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/checkbox_off.png') 10px 24px no-repeat;display:inline-block;border-left:1px solid #f6f6f6;border-left:1px solid rgba(255,255,255,0.6)}.elefunds_receiver>input:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/checkbox_on.png') 10px 24px no-repeat}#elefunds_bottom>input:first-child+div{border-left:0!important}.elefunds_receiver_selected{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receiver_on_bg.png') repeat-x}.elefunds_receiver_selected>label>img{filter:none;-webkit-filter:none;-ms-filter:none}#elefunds_below_container{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:16px;margin:0;padding:15px 0 10px;text-align:right}#elefunds_below_container label{font-weight:normal}#elefunds_round_sum_container{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/elefunds_highlight.png') right top no-repeat}#elefunds_round_sum_container strong{font-weight:bold;line-height:1.5em}#elefunds_round_sum_container strong:last-child{margin-right:8px}#elefunds_round_sum{display:inline-block;width:65px;color:#222}#elefunds_receipt{position:relative;float:left;font-size:12px;color:#333;margin:5px 0 0 15px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#elefunds_receipt_checkbox{position:absolute;top:1px;cursor:pointer;opacity:0;font-size:100%;margin:0;vertical-align:baseline;width:16px}#elefunds_receipt_checkbox+label{margin:0;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receipt_off.png') no-repeat;display:inline-block;padding-left:20px}#elefunds_receipt>input:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receipt_on.png') no-repeat}.elefunds_hidden{visibility:hidden}#elefunds_share{width:450px;padding:20px 20px 10px;background:#f4f4f4;border:4px solid #ccc;border-radius:8px;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;text-align:center}#elefunds_share>a{text-decoration:none}#elefunds_share h3{font-weight:bold;color:#222;margin:0}#elefunds_share p{font-size:14px;color:#666;margin:20px 0 10px;padding:10px 10px 20px}#elefunds_share span{font-style:normal;font-size:11px;line-height:21px;margin-top:6px;vertical-align:top;display:block}#tiptip_content{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;background:#222;background:rgba(0,0,0,0.7);padding:3px;overflow:hidden;width:260px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0,0,0,0.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,0.3);box-shadow:0 3px 7px rgba(0,0,0,0.3)}#tiptip_title{background-color:#f5f5f5;padding:10px 15px 8px;color:#222;font-size:18px;line-height:1;text-align:center;font-weight:bold;-webkit-border-top-left-radius:3px;-webkit-border-top-right-radius:3px;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-moz-border-radius-topleft:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:0;border-bottom-left-radius:0;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box;border-bottom:1px solid #eee;margin:0}#tiptip_inner{font-size:12px;color:#222;background-color:#fff;padding:14px;-webkit-border-top-left-radius:0;-webkit-border-top-right-radius:0;-webkit-border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;-moz-border-radius-topleft:0;-moz-border-radius-topright:0;-moz-border-radius-bottomright:3px;-moz-border-radius-bottomleft:3px;border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px;-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box}#tiptip_holder{display:none;position:absolute;top:0;left:0;z-index:99999}#tiptip_holder.tip_top{margin-bottom:5px}#tiptip_holder.tip_left{margin-right:5px}#tiptip_holder.tip_right{margin-left:5px}#tiptip_holder.tip_bottom{margin-top:5px}#tiptip_arrow,#tiptip_arrow_inner{position:absolute;border-color:transparent;border-style:solid;border-width:6px;height:0;width:0}#tiptip_holder.tip_top #tiptip_arrow_inner{margin-top:-7px;margin-left:-6px;border-top-color:#191919;border-top-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_right #tiptip_arrow_inner{margin-top:-6px;margin-left:-5px;border-right-color:#191919;border-right-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_bottom #tiptip_arrow_inner{margin-top:-5px;margin-left:-6px;border-bottom-color:#191919;border-bottom-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_left #tiptip_arrow_inner{margin-top:-6px;margin-left:-7px;border-left-color:#191919;border-left-color:rgba(25,25,25,0.92)}
 
lib/Elefunds/Template/Shop/Css/elefunds_dark_grey.min.css DELETED
@@ -1 +0,0 @@
1
- #elefunds_top{position:relative;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/top_bar.png') repeat-x;height:49px;border-left:1px solid #3a414a;border-right:1px solid #3a414a;line-height:1.4;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#elefunds_top>div{float:right;margin-right:10px}#elefunds_logo{position:absolute;top:8px;left:10px}#elefunds_arrow{position:relative;display:inline-block;float:left;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/arrow_bg.png') repeat-x;height:49px;padding:0}#elefunds_checkbox{position:absolute;top:18px;left:19px;width:18px;line-height:normal;cursor:pointer;opacity:0}#elefunds_checkbox+label{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;font-weight:normal;color:#c6cfd8;padding:9px 10px 9px 60px;height:31px;margin:0;max-width:180px;float:left;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/grey/arrow_off.png') no-repeat}#elefunds_checkbox:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/grey/arrow_on.png') no-repeat}#elefunds_arrow_end{width:14px;height:49px;display:inline-block;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/arrow_end.png') no-repeat}#elefunds_plus_minus{float:left;padding:13px 10px 0 30px}#elefunds_plus_minus img{margin:0 1px}#elefunds_input_container{float:left;padding-top:11px}#elefunds_currency{display:inline-block;width:auto;height:18px;padding:4px 8px;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;font-weight:normal;line-height:18px;text-align:center;color:#c6cfd8;text-shadow:0 1px 0 #2c3238;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/currency_bg.png') repeat-x;border:1px solid #2f3439;border-radius:3px 0 0 3px;margin-right:-1px;float:left}#elefunds_input{display:inline-block;width:48px;height:18px;padding:4px 2px 4px 0;margin:0;vertical-align:middle;text-align:center;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;color:#c6cfd8;text-shadow:0 1px 0 #2c3238;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/input_bg.png') repeat-x;border:1px solid #2f3439;float:left;outline:0}.elefunds_input_active{color:#fff!important}#elefunds_bottom{height:62px;border-width:0 1px 1px;border-style:solid;border-color:#cfd0d4 #b9bec4;line-height:1.4;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.elefunds_receiver{margin:0;text-align:center;display:inline-block;border-left:1px solid #a3a6ac;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receiver_off_bg.png') repeat-x;float:left;position:relative}.elefunds_receiver>label>img{vertical-align:middle;-webkit-filter:grayscale(1) opacity(0.7);-ms-filter:"alpha(opacity=50)";filter:alpha(opacity=50)}.elefunds_receiver>input{cursor:pointer;opacity:0;font-size:100%;margin:0;vertical-align:baseline;width:22px;position:absolute;top:25px;left:13px}.elefunds_receiver>input+label{height:42px;width:165px;margin:0;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/checkbox_off.png') 10px 24px no-repeat;display:inline-block;border-left:1px solid #f6f6f6;border-left:1px solid rgba(255,255,255,0.6)}.elefunds_receiver>input:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/checkbox_on.png') 10px 24px no-repeat}#elefunds_bottom>input:first-child+div{border-left:0!important}.elefunds_receiver_selected{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receiver_on_bg.png') repeat-x}.elefunds_receiver_selected>label>img{filter:none;-webkit-filter:none;-ms-filter:none}#elefunds_below_container{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:16px;margin:0;padding:15px 0 10px;text-align:right}#elefunds_below_container label{font-weight:normal}#elefunds_round_sum_container{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/elefunds_highlight.png') right top no-repeat}#elefunds_round_sum_container strong{font-weight:bold;line-height:1.5em}#elefunds_round_sum_container strong:last-child{margin-right:8px}#elefunds_round_sum{display:inline-block;width:65px;color:#222}#elefunds_receipt{position:relative;float:left;font-size:12px;color:#333;margin:5px 0 0 15px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#elefunds_receipt_checkbox{position:absolute;top:1px;cursor:pointer;opacity:0;font-size:100%;margin:0;vertical-align:baseline;width:16px}#elefunds_receipt_checkbox+label{margin:0;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receipt_off.png') no-repeat;display:inline-block;padding-left:20px}#elefunds_receipt>input:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receipt_on.png') no-repeat}.elefunds_hidden{visibility:hidden}#elefunds_share{width:450px;padding:20px 20px 10px;background:#f4f4f4;border:4px solid #ccc;border-radius:8px;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;text-align:center}#elefunds_share>a{text-decoration:none}#elefunds_share h3{font-weight:bold;color:#222;margin:0}#elefunds_share p{font-size:14px;color:#666;margin:20px 0 10px;padding:10px 10px 20px}#elefunds_share span{font-style:normal;font-size:11px;line-height:21px;margin-top:6px;vertical-align:top;display:block}#tiptip_content{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;background:#222;background:rgba(0,0,0,0.7);padding:3px;overflow:hidden;width:260px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0,0,0,0.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,0.3);box-shadow:0 3px 7px rgba(0,0,0,0.3)}#tiptip_title{background-color:#f5f5f5;padding:10px 15px 8px;color:#222;font-size:18px;line-height:1;text-align:center;font-weight:bold;-webkit-border-top-left-radius:3px;-webkit-border-top-right-radius:3px;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-moz-border-radius-topleft:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:0;border-bottom-left-radius:0;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box;border-bottom:1px solid #eee;margin:0}#tiptip_inner{font-size:12px;color:#222;background-color:#fff;padding:14px;-webkit-border-top-left-radius:0;-webkit-border-top-right-radius:0;-webkit-border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;-moz-border-radius-topleft:0;-moz-border-radius-topright:0;-moz-border-radius-bottomright:3px;-moz-border-radius-bottomleft:3px;border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px;-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box}#tiptip_holder{display:none;position:absolute;top:0;left:0;z-index:99999}#tiptip_holder.tip_top{margin-bottom:5px}#tiptip_holder.tip_left{margin-right:5px}#tiptip_holder.tip_right{margin-left:5px}#tiptip_holder.tip_bottom{margin-top:5px}#tiptip_arrow,#tiptip_arrow_inner{position:absolute;border-color:transparent;border-style:solid;border-width:6px;height:0;width:0}#tiptip_holder.tip_top #tiptip_arrow_inner{margin-top:-7px;margin-left:-6px;border-top-color:#191919;border-top-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_right #tiptip_arrow_inner{margin-top:-6px;margin-left:-5px;border-right-color:#191919;border-right-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_bottom #tiptip_arrow_inner{margin-top:-5px;margin-left:-6px;border-bottom-color:#191919;border-bottom-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_left #tiptip_arrow_inner{margin-top:-6px;margin-left:-7px;border-left-color:#191919;border-left-color:rgba(25,25,25,0.92)}
 
lib/Elefunds/Template/Shop/Css/elefunds_dark_orange.min.css DELETED
@@ -1 +0,0 @@
1
- #elefunds_top{position:relative;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/top_bar.png') repeat-x;height:49px;border-left:1px solid #3a414a;border-right:1px solid #3a414a;line-height:1.4;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#elefunds_top>div{float:right;margin-right:10px}#elefunds_logo{position:absolute;top:8px;left:10px}#elefunds_arrow{position:relative;display:inline-block;float:left;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/arrow_bg.png') repeat-x;height:49px;padding:0}#elefunds_checkbox{position:absolute;top:18px;left:19px;width:18px;line-height:normal;cursor:pointer;opacity:0}#elefunds_checkbox+label{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;font-weight:normal;color:#c6cfd8;padding:9px 10px 9px 60px;height:31px;margin:0;max-width:180px;float:left;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/orange/arrow_off.png') no-repeat}#elefunds_checkbox:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/orange/arrow_on.png') no-repeat}#elefunds_arrow_end{width:14px;height:49px;display:inline-block;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/arrow_end.png') no-repeat}#elefunds_plus_minus{float:left;padding:13px 10px 0 30px}#elefunds_plus_minus img{margin:0 1px}#elefunds_input_container{float:left;padding-top:11px}#elefunds_currency{display:inline-block;width:auto;height:18px;padding:4px 8px;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;font-weight:normal;line-height:18px;text-align:center;color:#c6cfd8;text-shadow:0 1px 0 #2c3238;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/currency_bg.png') repeat-x;border:1px solid #2f3439;border-radius:3px 0 0 3px;margin-right:-1px;float:left}#elefunds_input{display:inline-block;width:48px;height:18px;padding:4px 2px 4px 0;margin:0;vertical-align:middle;text-align:center;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;color:#c6cfd8;text-shadow:0 1px 0 #2c3238;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/input_bg.png') repeat-x;border:1px solid #2f3439;float:left;outline:0}.elefunds_input_active{color:#fff!important}#elefunds_bottom{height:62px;border-width:0 1px 1px;border-style:solid;border-color:#cfd0d4 #b9bec4;line-height:1.4;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.elefunds_receiver{margin:0;text-align:center;display:inline-block;border-left:1px solid #a3a6ac;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receiver_off_bg.png') repeat-x;float:left;position:relative}.elefunds_receiver>label>img{vertical-align:middle;-webkit-filter:grayscale(1) opacity(0.7);-ms-filter:"alpha(opacity=50)";filter:alpha(opacity=50)}.elefunds_receiver>input{cursor:pointer;opacity:0;font-size:100%;margin:0;vertical-align:baseline;width:22px;position:absolute;top:25px;left:13px}.elefunds_receiver>input+label{height:42px;width:165px;margin:0;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/checkbox_off.png') 10px 24px no-repeat;display:inline-block;border-left:1px solid #f6f6f6;border-left:1px solid rgba(255,255,255,0.6)}.elefunds_receiver>input:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/checkbox_on.png') 10px 24px no-repeat}#elefunds_bottom>input:first-child+div{border-left:0!important}.elefunds_receiver_selected{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receiver_on_bg.png') repeat-x}.elefunds_receiver_selected>label>img{filter:none;-webkit-filter:none;-ms-filter:none}#elefunds_below_container{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:16px;margin:0;padding:15px 0 10px;text-align:right}#elefunds_below_container label{font-weight:normal}#elefunds_round_sum_container{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/elefunds_highlight.png') right top no-repeat}#elefunds_round_sum_container strong{font-weight:bold;line-height:1.5em}#elefunds_round_sum_container strong:last-child{margin-right:8px}#elefunds_round_sum{display:inline-block;width:65px;color:#222}#elefunds_receipt{position:relative;float:left;font-size:12px;color:#333;margin:5px 0 0 15px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#elefunds_receipt_checkbox{position:absolute;top:1px;cursor:pointer;opacity:0;font-size:100%;margin:0;vertical-align:baseline;width:16px}#elefunds_receipt_checkbox+label{margin:0;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receipt_off.png') no-repeat;display:inline-block;padding-left:20px}#elefunds_receipt>input:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receipt_on.png') no-repeat}.elefunds_hidden{visibility:hidden}#elefunds_share{width:450px;padding:20px 20px 10px;background:#f4f4f4;border:4px solid #ccc;border-radius:8px;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;text-align:center}#elefunds_share>a{text-decoration:none}#elefunds_share h3{font-weight:bold;color:#222;margin:0}#elefunds_share p{font-size:14px;color:#666;margin:20px 0 10px;padding:10px 10px 20px}#elefunds_share span{font-style:normal;font-size:11px;line-height:21px;margin-top:6px;vertical-align:top;display:block}#tiptip_content{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;background:#222;background:rgba(0,0,0,0.7);padding:3px;overflow:hidden;width:260px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0,0,0,0.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,0.3);box-shadow:0 3px 7px rgba(0,0,0,0.3)}#tiptip_title{background-color:#f5f5f5;padding:10px 15px 8px;color:#222;font-size:18px;line-height:1;text-align:center;font-weight:bold;-webkit-border-top-left-radius:3px;-webkit-border-top-right-radius:3px;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-moz-border-radius-topleft:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:0;border-bottom-left-radius:0;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box;border-bottom:1px solid #eee;margin:0}#tiptip_inner{font-size:12px;color:#222;background-color:#fff;padding:14px;-webkit-border-top-left-radius:0;-webkit-border-top-right-radius:0;-webkit-border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;-moz-border-radius-topleft:0;-moz-border-radius-topright:0;-moz-border-radius-bottomright:3px;-moz-border-radius-bottomleft:3px;border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px;-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box}#tiptip_holder{display:none;position:absolute;top:0;left:0;z-index:99999}#tiptip_holder.tip_top{margin-bottom:5px}#tiptip_holder.tip_left{margin-right:5px}#tiptip_holder.tip_right{margin-left:5px}#tiptip_holder.tip_bottom{margin-top:5px}#tiptip_arrow,#tiptip_arrow_inner{position:absolute;border-color:transparent;border-style:solid;border-width:6px;height:0;width:0}#tiptip_holder.tip_top #tiptip_arrow_inner{margin-top:-7px;margin-left:-6px;border-top-color:#191919;border-top-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_right #tiptip_arrow_inner{margin-top:-6px;margin-left:-5px;border-right-color:#191919;border-right-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_bottom #tiptip_arrow_inner{margin-top:-5px;margin-left:-6px;border-bottom-color:#191919;border-bottom-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_left #tiptip_arrow_inner{margin-top:-6px;margin-left:-7px;border-left-color:#191919;border-left-color:rgba(25,25,25,0.92)}
 
lib/Elefunds/Template/Shop/Css/elefunds_dark_purple.min.css DELETED
@@ -1 +0,0 @@
1
- #elefunds_top{position:relative;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/top_bar.png') repeat-x;height:49px;border-left:1px solid #3a414a;border-right:1px solid #3a414a;line-height:1.4;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#elefunds_top>div{float:right;margin-right:10px}#elefunds_logo{position:absolute;top:8px;left:10px}#elefunds_arrow{position:relative;display:inline-block;float:left;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/arrow_bg.png') repeat-x;height:49px;padding:0}#elefunds_checkbox{position:absolute;top:18px;left:19px;width:18px;line-height:normal;cursor:pointer;opacity:0}#elefunds_checkbox+label{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;font-weight:normal;color:#c6cfd8;padding:9px 10px 9px 60px;height:31px;margin:0;max-width:180px;float:left;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/purple/arrow_off.png') no-repeat}#elefunds_checkbox:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/purple/arrow_on.png') no-repeat}#elefunds_arrow_end{width:14px;height:49px;display:inline-block;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/arrow_end.png') no-repeat}#elefunds_plus_minus{float:left;padding:13px 10px 0 30px}#elefunds_plus_minus img{margin:0 1px}#elefunds_input_container{float:left;padding-top:11px}#elefunds_currency{display:inline-block;width:auto;height:18px;padding:4px 8px;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;font-weight:normal;line-height:18px;text-align:center;color:#c6cfd8;text-shadow:0 1px 0 #2c3238;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/currency_bg.png') repeat-x;border:1px solid #2f3439;border-radius:3px 0 0 3px;margin-right:-1px;float:left}#elefunds_input{display:inline-block;width:48px;height:18px;padding:4px 2px 4px 0;margin:0;vertical-align:middle;text-align:center;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;color:#c6cfd8;text-shadow:0 1px 0 #2c3238;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/input_bg.png') repeat-x;border:1px solid #2f3439;float:left;outline:0}.elefunds_input_active{color:#fff!important}#elefunds_bottom{height:62px;border-width:0 1px 1px;border-style:solid;border-color:#cfd0d4 #b9bec4;line-height:1.4;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.elefunds_receiver{margin:0;text-align:center;display:inline-block;border-left:1px solid #a3a6ac;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receiver_off_bg.png') repeat-x;float:left;position:relative}.elefunds_receiver>label>img{vertical-align:middle;-webkit-filter:grayscale(1) opacity(0.7);-ms-filter:"alpha(opacity=50)";filter:alpha(opacity=50)}.elefunds_receiver>input{cursor:pointer;opacity:0;font-size:100%;margin:0;vertical-align:baseline;width:22px;position:absolute;top:25px;left:13px}.elefunds_receiver>input+label{height:42px;width:165px;margin:0;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/checkbox_off.png') 10px 24px no-repeat;display:inline-block;border-left:1px solid #f6f6f6;border-left:1px solid rgba(255,255,255,0.6)}.elefunds_receiver>input:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/checkbox_on.png') 10px 24px no-repeat}#elefunds_bottom>input:first-child+div{border-left:0!important}.elefunds_receiver_selected{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receiver_on_bg.png') repeat-x}.elefunds_receiver_selected>label>img{filter:none;-webkit-filter:none;-ms-filter:none}#elefunds_below_container{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:16px;margin:0;padding:15px 0 10px;text-align:right}#elefunds_below_container label{font-weight:normal}#elefunds_round_sum_container{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/elefunds_highlight.png') right top no-repeat}#elefunds_round_sum_container strong{font-weight:bold;line-height:1.5em}#elefunds_round_sum_container strong:last-child{margin-right:8px}#elefunds_round_sum{display:inline-block;width:65px;color:#222}#elefunds_receipt{position:relative;float:left;font-size:12px;color:#333;margin:5px 0 0 15px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#elefunds_receipt_checkbox{position:absolute;top:1px;cursor:pointer;opacity:0;font-size:100%;margin:0;vertical-align:baseline;width:16px}#elefunds_receipt_checkbox+label{margin:0;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receipt_off.png') no-repeat;display:inline-block;padding-left:20px}#elefunds_receipt>input:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receipt_on.png') no-repeat}.elefunds_hidden{visibility:hidden}#elefunds_share{width:450px;padding:20px 20px 10px;background:#f4f4f4;border:4px solid #ccc;border-radius:8px;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;text-align:center}#elefunds_share>a{text-decoration:none}#elefunds_share h3{font-weight:bold;color:#222;margin:0}#elefunds_share p{font-size:14px;color:#666;margin:20px 0 10px;padding:10px 10px 20px}#elefunds_share span{font-style:normal;font-size:11px;line-height:21px;margin-top:6px;vertical-align:top;display:block}#tiptip_content{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;background:#222;background:rgba(0,0,0,0.7);padding:3px;overflow:hidden;width:260px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0,0,0,0.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,0.3);box-shadow:0 3px 7px rgba(0,0,0,0.3)}#tiptip_title{background-color:#f5f5f5;padding:10px 15px 8px;color:#222;font-size:18px;line-height:1;text-align:center;font-weight:bold;-webkit-border-top-left-radius:3px;-webkit-border-top-right-radius:3px;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-moz-border-radius-topleft:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:0;border-bottom-left-radius:0;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box;border-bottom:1px solid #eee;margin:0}#tiptip_inner{font-size:12px;color:#222;background-color:#fff;padding:14px;-webkit-border-top-left-radius:0;-webkit-border-top-right-radius:0;-webkit-border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;-moz-border-radius-topleft:0;-moz-border-radius-topright:0;-moz-border-radius-bottomright:3px;-moz-border-radius-bottomleft:3px;border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px;-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box}#tiptip_holder{display:none;position:absolute;top:0;left:0;z-index:99999}#tiptip_holder.tip_top{margin-bottom:5px}#tiptip_holder.tip_left{margin-right:5px}#tiptip_holder.tip_right{margin-left:5px}#tiptip_holder.tip_bottom{margin-top:5px}#tiptip_arrow,#tiptip_arrow_inner{position:absolute;border-color:transparent;border-style:solid;border-width:6px;height:0;width:0}#tiptip_holder.tip_top #tiptip_arrow_inner{margin-top:-7px;margin-left:-6px;border-top-color:#191919;border-top-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_right #tiptip_arrow_inner{margin-top:-6px;margin-left:-5px;border-right-color:#191919;border-right-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_bottom #tiptip_arrow_inner{margin-top:-5px;margin-left:-6px;border-bottom-color:#191919;border-bottom-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_left #tiptip_arrow_inner{margin-top:-6px;margin-left:-7px;border-left-color:#191919;border-left-color:rgba(25,25,25,0.92)}
 
lib/Elefunds/Template/Shop/Css/elefunds_light_blue.min.css DELETED
@@ -1 +0,0 @@
1
- #elefunds_top{position:relative;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/top_bar.png') repeat-x;height:49px;border-left:1px solid #8c8f91;border-right:1px solid #8c8f91;line-height:1.4;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#elefunds_top>div{float:right;margin-right:10px}#elefunds_logo{position:absolute;top:8px;left:10px}#elefunds_arrow{position:relative;display:inline-block;float:left;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/arrow_bg.png') repeat-x;height:49px;padding:0}#elefunds_checkbox{position:absolute;top:18px;left:19px;width:18px;line-height:normal;cursor:pointer;opacity:0}#elefunds_checkbox+label{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;font-weight:normal;color:#d0d9d2;padding:9px 10px 9px 60px;height:31px;margin:0;max-width:180px;float:left;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/blue/arrow_off.png') no-repeat}#elefunds_checkbox:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/blue/arrow_on.png') no-repeat}#elefunds_arrow_end{width:14px;height:49px;display:inline-block;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/arrow_end.png') no-repeat}#elefunds_plus_minus{float:left;padding:13px 10px 0 30px}#elefunds_plus_minus img{margin:0 1px}#elefunds_input_container{float:left;padding-top:11px}#elefunds_currency{display:inline-block;width:auto;height:18px;padding:4px 8px;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;font-weight:normal;line-height:18px;text-align:center;color:#2c3238;text-shadow:0 1px 0 #c6cfd8;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/currency_bg.png') repeat-x;border:1px solid #7f807f;border-radius:3px 0 0 3px;margin-right:-1px;float:left}#elefunds_input{display:inline-block;width:48px;height:18px;padding:4px 2px 4px 0;margin:0;vertical-align:middle;text-align:center;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;color:#7f807f;text-shadow:0 1px 0 #c6cfd8;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/input_bg.png') repeat-x;border:1px solid #7f807f;float:left;outline:0}.elefunds_input_active{color:#000!important}#elefunds_bottom{height:62px;border-width:0 1px 1px;border-style:solid;border-color:#cfd0d4 #b9bec4;line-height:1.4;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.elefunds_receiver{margin:0;text-align:center;display:inline-block;border-left:1px solid #a3a6ac;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receiver_off_bg.png') repeat-x;float:left;position:relative}.elefunds_receiver>label>img{vertical-align:middle;-webkit-filter:grayscale(1) opacity(0.7);-ms-filter:"alpha(opacity=50)";filter:alpha(opacity=50)}.elefunds_receiver>input{cursor:pointer;opacity:0;font-size:100%;margin:0;vertical-align:baseline;width:22px;position:absolute;top:25px;left:13px}.elefunds_receiver>input+label{height:42px;width:165px;margin:0;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/checkbox_off.png') 10px 24px no-repeat;display:inline-block;border-left:1px solid #f6f6f6;border-left:1px solid rgba(255,255,255,0.6)}.elefunds_receiver>input:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/checkbox_on.png') 10px 24px no-repeat}#elefunds_bottom>input:first-child+div{border-left:0!important}.elefunds_receiver_selected{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receiver_on_bg.png') repeat-x}.elefunds_receiver_selected>label>img{filter:none;-webkit-filter:none;-ms-filter:none}#elefunds_below_container{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:16px;margin:0;padding:15px 0 10px;text-align:right}#elefunds_below_container label{font-weight:normal}#elefunds_round_sum_container{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/elefunds_highlight.png') right top no-repeat}#elefunds_round_sum_container strong{font-weight:bold;line-height:1.5em}#elefunds_round_sum_container strong:last-child{margin-right:8px}#elefunds_round_sum{display:inline-block;width:65px;color:#222}#elefunds_receipt{position:relative;float:left;font-size:12px;color:#333;margin:5px 0 0 15px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#elefunds_receipt_checkbox{position:absolute;top:1px;cursor:pointer;opacity:0;font-size:100%;margin:0;vertical-align:baseline;width:16px}#elefunds_receipt_checkbox+label{margin:0;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receipt_off.png') no-repeat;display:inline-block;padding-left:20px}#elefunds_receipt>input:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receipt_on.png') no-repeat}.elefunds_hidden{visibility:hidden}#elefunds_share{width:450px;padding:20px 20px 10px;background:#f4f4f4;border:4px solid #ccc;border-radius:8px;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;text-align:center}#elefunds_share>a{text-decoration:none}#elefunds_share h3{font-weight:bold;color:#222;margin:0}#elefunds_share p{font-size:14px;color:#666;margin:20px 0 10px;padding:10px 10px 20px}#elefunds_share span{font-style:normal;font-size:11px;line-height:21px;margin-top:6px;vertical-align:top;display:block}#tiptip_content{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;background:#222;background:rgba(0,0,0,0.7);padding:3px;overflow:hidden;width:260px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0,0,0,0.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,0.3);box-shadow:0 3px 7px rgba(0,0,0,0.3)}#tiptip_title{background-color:#f5f5f5;padding:10px 15px 8px;color:#222;font-size:18px;line-height:1;text-align:center;font-weight:bold;-webkit-border-top-left-radius:3px;-webkit-border-top-right-radius:3px;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-moz-border-radius-topleft:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:0;border-bottom-left-radius:0;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box;border-bottom:1px solid #eee;margin:0}#tiptip_inner{font-size:12px;color:#222;background-color:#fff;padding:14px;-webkit-border-top-left-radius:0;-webkit-border-top-right-radius:0;-webkit-border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;-moz-border-radius-topleft:0;-moz-border-radius-topright:0;-moz-border-radius-bottomright:3px;-moz-border-radius-bottomleft:3px;border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px;-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box}#tiptip_holder{display:none;position:absolute;top:0;left:0;z-index:99999}#tiptip_holder.tip_top{margin-bottom:5px}#tiptip_holder.tip_left{margin-right:5px}#tiptip_holder.tip_right{margin-left:5px}#tiptip_holder.tip_bottom{margin-top:5px}#tiptip_arrow,#tiptip_arrow_inner{position:absolute;border-color:transparent;border-style:solid;border-width:6px;height:0;width:0}#tiptip_holder.tip_top #tiptip_arrow_inner{margin-top:-7px;margin-left:-6px;border-top-color:#191919;border-top-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_right #tiptip_arrow_inner{margin-top:-6px;margin-left:-5px;border-right-color:#191919;border-right-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_bottom #tiptip_arrow_inner{margin-top:-5px;margin-left:-6px;border-bottom-color:#191919;border-bottom-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_left #tiptip_arrow_inner{margin-top:-6px;margin-left:-7px;border-left-color:#191919;border-left-color:rgba(25,25,25,0.92)}
 
lib/Elefunds/Template/Shop/Css/elefunds_light_green.min.css DELETED
@@ -1 +0,0 @@
1
- #elefunds_top{position:relative;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/top_bar.png') repeat-x;height:49px;border-left:1px solid #8c8f91;border-right:1px solid #8c8f91;line-height:1.4;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#elefunds_top>div{float:right;margin-right:10px}#elefunds_logo{position:absolute;top:8px;left:10px}#elefunds_arrow{position:relative;display:inline-block;float:left;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/arrow_bg.png') repeat-x;height:49px;padding:0}#elefunds_checkbox{position:absolute;top:18px;left:19px;width:18px;line-height:normal;cursor:pointer;opacity:0}#elefunds_checkbox+label{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;font-weight:normal;color:#d0d9d2;padding:9px 10px 9px 60px;height:31px;margin:0;max-width:180px;float:left;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/green/arrow_off.png') no-repeat}#elefunds_checkbox:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/green/arrow_on.png') no-repeat}#elefunds_arrow_end{width:14px;height:49px;display:inline-block;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/arrow_end.png') no-repeat}#elefunds_plus_minus{float:left;padding:13px 10px 0 30px}#elefunds_plus_minus img{margin:0 1px}#elefunds_input_container{float:left;padding-top:11px}#elefunds_currency{display:inline-block;width:auto;height:18px;padding:4px 8px;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;font-weight:normal;line-height:18px;text-align:center;color:#2c3238;text-shadow:0 1px 0 #c6cfd8;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/currency_bg.png') repeat-x;border:1px solid #7f807f;border-radius:3px 0 0 3px;margin-right:-1px;float:left}#elefunds_input{display:inline-block;width:48px;height:18px;padding:4px 2px 4px 0;margin:0;vertical-align:middle;text-align:center;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;color:#7f807f;text-shadow:0 1px 0 #c6cfd8;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/input_bg.png') repeat-x;border:1px solid #7f807f;float:left;outline:0}.elefunds_input_active{color:#000!important}#elefunds_bottom{height:62px;border-width:0 1px 1px;border-style:solid;border-color:#cfd0d4 #b9bec4;line-height:1.4;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.elefunds_receiver{margin:0;text-align:center;display:inline-block;border-left:1px solid #a3a6ac;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receiver_off_bg.png') repeat-x;float:left;position:relative}.elefunds_receiver>label>img{vertical-align:middle;-webkit-filter:grayscale(1) opacity(0.7);-ms-filter:"alpha(opacity=50)";filter:alpha(opacity=50)}.elefunds_receiver>input{cursor:pointer;opacity:0;font-size:100%;margin:0;vertical-align:baseline;width:22px;position:absolute;top:25px;left:13px}.elefunds_receiver>input+label{height:42px;width:165px;margin:0;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/checkbox_off.png') 10px 24px no-repeat;display:inline-block;border-left:1px solid #f6f6f6;border-left:1px solid rgba(255,255,255,0.6)}.elefunds_receiver>input:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/checkbox_on.png') 10px 24px no-repeat}#elefunds_bottom>input:first-child+div{border-left:0!important}.elefunds_receiver_selected{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receiver_on_bg.png') repeat-x}.elefunds_receiver_selected>label>img{filter:none;-webkit-filter:none;-ms-filter:none}#elefunds_below_container{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:16px;margin:0;padding:15px 0 10px;text-align:right}#elefunds_below_container label{font-weight:normal}#elefunds_round_sum_container{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/elefunds_highlight.png') right top no-repeat}#elefunds_round_sum_container strong{font-weight:bold;line-height:1.5em}#elefunds_round_sum_container strong:last-child{margin-right:8px}#elefunds_round_sum{display:inline-block;width:65px;color:#222}#elefunds_receipt{position:relative;float:left;font-size:12px;color:#333;margin:5px 0 0 15px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#elefunds_receipt_checkbox{position:absolute;top:1px;cursor:pointer;opacity:0;font-size:100%;margin:0;vertical-align:baseline;width:16px}#elefunds_receipt_checkbox+label{margin:0;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receipt_off.png') no-repeat;display:inline-block;padding-left:20px}#elefunds_receipt>input:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receipt_on.png') no-repeat}.elefunds_hidden{visibility:hidden}#elefunds_share{width:450px;padding:20px 20px 10px;background:#f4f4f4;border:4px solid #ccc;border-radius:8px;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;text-align:center}#elefunds_share>a{text-decoration:none}#elefunds_share h3{font-weight:bold;color:#222;margin:0}#elefunds_share p{font-size:14px;color:#666;margin:20px 0 10px;padding:10px 10px 20px}#elefunds_share span{font-style:normal;font-size:11px;line-height:21px;margin-top:6px;vertical-align:top;display:block}#tiptip_content{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;background:#222;background:rgba(0,0,0,0.7);padding:3px;overflow:hidden;width:260px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0,0,0,0.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,0.3);box-shadow:0 3px 7px rgba(0,0,0,0.3)}#tiptip_title{background-color:#f5f5f5;padding:10px 15px 8px;color:#222;font-size:18px;line-height:1;text-align:center;font-weight:bold;-webkit-border-top-left-radius:3px;-webkit-border-top-right-radius:3px;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-moz-border-radius-topleft:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:0;border-bottom-left-radius:0;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box;border-bottom:1px solid #eee;margin:0}#tiptip_inner{font-size:12px;color:#222;background-color:#fff;padding:14px;-webkit-border-top-left-radius:0;-webkit-border-top-right-radius:0;-webkit-border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;-moz-border-radius-topleft:0;-moz-border-radius-topright:0;-moz-border-radius-bottomright:3px;-moz-border-radius-bottomleft:3px;border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px;-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box}#tiptip_holder{display:none;position:absolute;top:0;left:0;z-index:99999}#tiptip_holder.tip_top{margin-bottom:5px}#tiptip_holder.tip_left{margin-right:5px}#tiptip_holder.tip_right{margin-left:5px}#tiptip_holder.tip_bottom{margin-top:5px}#tiptip_arrow,#tiptip_arrow_inner{position:absolute;border-color:transparent;border-style:solid;border-width:6px;height:0;width:0}#tiptip_holder.tip_top #tiptip_arrow_inner{margin-top:-7px;margin-left:-6px;border-top-color:#191919;border-top-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_right #tiptip_arrow_inner{margin-top:-6px;margin-left:-5px;border-right-color:#191919;border-right-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_bottom #tiptip_arrow_inner{margin-top:-5px;margin-left:-6px;border-bottom-color:#191919;border-bottom-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_left #tiptip_arrow_inner{margin-top:-6px;margin-left:-7px;border-left-color:#191919;border-left-color:rgba(25,25,25,0.92)}
 
lib/Elefunds/Template/Shop/Css/elefunds_light_grey.min.css DELETED
@@ -1 +0,0 @@
1
- #elefunds_top{position:relative;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/top_bar.png') repeat-x;height:49px;border-left:1px solid #8c8f91;border-right:1px solid #8c8f91;line-height:1.4;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#elefunds_top>div{float:right;margin-right:10px}#elefunds_logo{position:absolute;top:8px;left:10px}#elefunds_arrow{position:relative;display:inline-block;float:left;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/arrow_bg.png') repeat-x;height:49px;padding:0}#elefunds_checkbox{position:absolute;top:18px;left:19px;width:18px;line-height:normal;cursor:pointer;opacity:0}#elefunds_checkbox+label{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;font-weight:normal;color:#d0d9d2;padding:9px 10px 9px 60px;height:31px;margin:0;max-width:180px;float:left;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/grey/arrow_off.png') no-repeat}#elefunds_checkbox:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/grey/arrow_on.png') no-repeat}#elefunds_arrow_end{width:14px;height:49px;display:inline-block;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/arrow_end.png') no-repeat}#elefunds_plus_minus{float:left;padding:13px 10px 0 30px}#elefunds_plus_minus img{margin:0 1px}#elefunds_input_container{float:left;padding-top:11px}#elefunds_currency{display:inline-block;width:auto;height:18px;padding:4px 8px;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;font-weight:normal;line-height:18px;text-align:center;color:#2c3238;text-shadow:0 1px 0 #c6cfd8;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/currency_bg.png') repeat-x;border:1px solid #7f807f;border-radius:3px 0 0 3px;margin-right:-1px;float:left}#elefunds_input{display:inline-block;width:48px;height:18px;padding:4px 2px 4px 0;margin:0;vertical-align:middle;text-align:center;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;color:#7f807f;text-shadow:0 1px 0 #c6cfd8;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/input_bg.png') repeat-x;border:1px solid #7f807f;float:left;outline:0}.elefunds_input_active{color:#000!important}#elefunds_bottom{height:62px;border-width:0 1px 1px;border-style:solid;border-color:#cfd0d4 #b9bec4;line-height:1.4;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.elefunds_receiver{margin:0;text-align:center;display:inline-block;border-left:1px solid #a3a6ac;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receiver_off_bg.png') repeat-x;float:left;position:relative}.elefunds_receiver>label>img{vertical-align:middle;-webkit-filter:grayscale(1) opacity(0.7);-ms-filter:"alpha(opacity=50)";filter:alpha(opacity=50)}.elefunds_receiver>input{cursor:pointer;opacity:0;font-size:100%;margin:0;vertical-align:baseline;width:22px;position:absolute;top:25px;left:13px}.elefunds_receiver>input+label{height:42px;width:165px;margin:0;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/checkbox_off.png') 10px 24px no-repeat;display:inline-block;border-left:1px solid #f6f6f6;border-left:1px solid rgba(255,255,255,0.6)}.elefunds_receiver>input:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/checkbox_on.png') 10px 24px no-repeat}#elefunds_bottom>input:first-child+div{border-left:0!important}.elefunds_receiver_selected{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receiver_on_bg.png') repeat-x}.elefunds_receiver_selected>label>img{filter:none;-webkit-filter:none;-ms-filter:none}#elefunds_below_container{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:16px;margin:0;padding:15px 0 10px;text-align:right}#elefunds_below_container label{font-weight:normal}#elefunds_round_sum_container{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/elefunds_highlight.png') right top no-repeat}#elefunds_round_sum_container strong{font-weight:bold;line-height:1.5em}#elefunds_round_sum_container strong:last-child{margin-right:8px}#elefunds_round_sum{display:inline-block;width:65px;color:#222}#elefunds_receipt{position:relative;float:left;font-size:12px;color:#333;margin:5px 0 0 15px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#elefunds_receipt_checkbox{position:absolute;top:1px;cursor:pointer;opacity:0;font-size:100%;margin:0;vertical-align:baseline;width:16px}#elefunds_receipt_checkbox+label{margin:0;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receipt_off.png') no-repeat;display:inline-block;padding-left:20px}#elefunds_receipt>input:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receipt_on.png') no-repeat}.elefunds_hidden{visibility:hidden}#elefunds_share{width:450px;padding:20px 20px 10px;background:#f4f4f4;border:4px solid #ccc;border-radius:8px;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;text-align:center}#elefunds_share>a{text-decoration:none}#elefunds_share h3{font-weight:bold;color:#222;margin:0}#elefunds_share p{font-size:14px;color:#666;margin:20px 0 10px;padding:10px 10px 20px}#elefunds_share span{font-style:normal;font-size:11px;line-height:21px;margin-top:6px;vertical-align:top;display:block}#tiptip_content{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;background:#222;background:rgba(0,0,0,0.7);padding:3px;overflow:hidden;width:260px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0,0,0,0.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,0.3);box-shadow:0 3px 7px rgba(0,0,0,0.3)}#tiptip_title{background-color:#f5f5f5;padding:10px 15px 8px;color:#222;font-size:18px;line-height:1;text-align:center;font-weight:bold;-webkit-border-top-left-radius:3px;-webkit-border-top-right-radius:3px;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-moz-border-radius-topleft:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:0;border-bottom-left-radius:0;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box;border-bottom:1px solid #eee;margin:0}#tiptip_inner{font-size:12px;color:#222;background-color:#fff;padding:14px;-webkit-border-top-left-radius:0;-webkit-border-top-right-radius:0;-webkit-border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;-moz-border-radius-topleft:0;-moz-border-radius-topright:0;-moz-border-radius-bottomright:3px;-moz-border-radius-bottomleft:3px;border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px;-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box}#tiptip_holder{display:none;position:absolute;top:0;left:0;z-index:99999}#tiptip_holder.tip_top{margin-bottom:5px}#tiptip_holder.tip_left{margin-right:5px}#tiptip_holder.tip_right{margin-left:5px}#tiptip_holder.tip_bottom{margin-top:5px}#tiptip_arrow,#tiptip_arrow_inner{position:absolute;border-color:transparent;border-style:solid;border-width:6px;height:0;width:0}#tiptip_holder.tip_top #tiptip_arrow_inner{margin-top:-7px;margin-left:-6px;border-top-color:#191919;border-top-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_right #tiptip_arrow_inner{margin-top:-6px;margin-left:-5px;border-right-color:#191919;border-right-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_bottom #tiptip_arrow_inner{margin-top:-5px;margin-left:-6px;border-bottom-color:#191919;border-bottom-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_left #tiptip_arrow_inner{margin-top:-6px;margin-left:-7px;border-left-color:#191919;border-left-color:rgba(25,25,25,0.92)}
 
lib/Elefunds/Template/Shop/Css/elefunds_light_orange.min.css DELETED
@@ -1 +0,0 @@
1
- #elefunds_top{position:relative;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/top_bar.png') repeat-x;height:49px;border-left:1px solid #8c8f91;border-right:1px solid #8c8f91;line-height:1.4;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#elefunds_top>div{float:right;margin-right:10px}#elefunds_logo{position:absolute;top:8px;left:10px}#elefunds_arrow{position:relative;display:inline-block;float:left;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/arrow_bg.png') repeat-x;height:49px;padding:0}#elefunds_checkbox{position:absolute;top:18px;left:19px;width:18px;line-height:normal;cursor:pointer;opacity:0}#elefunds_checkbox+label{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;font-weight:normal;color:#d0d9d2;padding:9px 10px 9px 60px;height:31px;margin:0;max-width:180px;float:left;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/orange/arrow_off.png') no-repeat}#elefunds_checkbox:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/orange/arrow_on.png') no-repeat}#elefunds_arrow_end{width:14px;height:49px;display:inline-block;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/arrow_end.png') no-repeat}#elefunds_plus_minus{float:left;padding:13px 10px 0 30px}#elefunds_plus_minus img{margin:0 1px}#elefunds_input_container{float:left;padding-top:11px}#elefunds_currency{display:inline-block;width:auto;height:18px;padding:4px 8px;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;font-weight:normal;line-height:18px;text-align:center;color:#2c3238;text-shadow:0 1px 0 #c6cfd8;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/currency_bg.png') repeat-x;border:1px solid #7f807f;border-radius:3px 0 0 3px;margin-right:-1px;float:left}#elefunds_input{display:inline-block;width:48px;height:18px;padding:4px 2px 4px 0;margin:0;vertical-align:middle;text-align:center;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;color:#7f807f;text-shadow:0 1px 0 #c6cfd8;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/input_bg.png') repeat-x;border:1px solid #7f807f;float:left;outline:0}.elefunds_input_active{color:#000!important}#elefunds_bottom{height:62px;border-width:0 1px 1px;border-style:solid;border-color:#cfd0d4 #b9bec4;line-height:1.4;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.elefunds_receiver{margin:0;text-align:center;display:inline-block;border-left:1px solid #a3a6ac;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receiver_off_bg.png') repeat-x;float:left;position:relative}.elefunds_receiver>label>img{vertical-align:middle;-webkit-filter:grayscale(1) opacity(0.7);-ms-filter:"alpha(opacity=50)";filter:alpha(opacity=50)}.elefunds_receiver>input{cursor:pointer;opacity:0;font-size:100%;margin:0;vertical-align:baseline;width:22px;position:absolute;top:25px;left:13px}.elefunds_receiver>input+label{height:42px;width:165px;margin:0;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/checkbox_off.png') 10px 24px no-repeat;display:inline-block;border-left:1px solid #f6f6f6;border-left:1px solid rgba(255,255,255,0.6)}.elefunds_receiver>input:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/checkbox_on.png') 10px 24px no-repeat}#elefunds_bottom>input:first-child+div{border-left:0!important}.elefunds_receiver_selected{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receiver_on_bg.png') repeat-x}.elefunds_receiver_selected>label>img{filter:none;-webkit-filter:none;-ms-filter:none}#elefunds_below_container{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:16px;margin:0;padding:15px 0 10px;text-align:right}#elefunds_below_container label{font-weight:normal}#elefunds_round_sum_container{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/elefunds_highlight.png') right top no-repeat}#elefunds_round_sum_container strong{font-weight:bold;line-height:1.5em}#elefunds_round_sum_container strong:last-child{margin-right:8px}#elefunds_round_sum{display:inline-block;width:65px;color:#222}#elefunds_receipt{position:relative;float:left;font-size:12px;color:#333;margin:5px 0 0 15px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#elefunds_receipt_checkbox{position:absolute;top:1px;cursor:pointer;opacity:0;font-size:100%;margin:0;vertical-align:baseline;width:16px}#elefunds_receipt_checkbox+label{margin:0;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receipt_off.png') no-repeat;display:inline-block;padding-left:20px}#elefunds_receipt>input:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receipt_on.png') no-repeat}.elefunds_hidden{visibility:hidden}#elefunds_share{width:450px;padding:20px 20px 10px;background:#f4f4f4;border:4px solid #ccc;border-radius:8px;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;text-align:center}#elefunds_share>a{text-decoration:none}#elefunds_share h3{font-weight:bold;color:#222;margin:0}#elefunds_share p{font-size:14px;color:#666;margin:20px 0 10px;padding:10px 10px 20px}#elefunds_share span{font-style:normal;font-size:11px;line-height:21px;margin-top:6px;vertical-align:top;display:block}#tiptip_content{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;background:#222;background:rgba(0,0,0,0.7);padding:3px;overflow:hidden;width:260px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0,0,0,0.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,0.3);box-shadow:0 3px 7px rgba(0,0,0,0.3)}#tiptip_title{background-color:#f5f5f5;padding:10px 15px 8px;color:#222;font-size:18px;line-height:1;text-align:center;font-weight:bold;-webkit-border-top-left-radius:3px;-webkit-border-top-right-radius:3px;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-moz-border-radius-topleft:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:0;border-bottom-left-radius:0;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box;border-bottom:1px solid #eee;margin:0}#tiptip_inner{font-size:12px;color:#222;background-color:#fff;padding:14px;-webkit-border-top-left-radius:0;-webkit-border-top-right-radius:0;-webkit-border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;-moz-border-radius-topleft:0;-moz-border-radius-topright:0;-moz-border-radius-bottomright:3px;-moz-border-radius-bottomleft:3px;border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px;-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box}#tiptip_holder{display:none;position:absolute;top:0;left:0;z-index:99999}#tiptip_holder.tip_top{margin-bottom:5px}#tiptip_holder.tip_left{margin-right:5px}#tiptip_holder.tip_right{margin-left:5px}#tiptip_holder.tip_bottom{margin-top:5px}#tiptip_arrow,#tiptip_arrow_inner{position:absolute;border-color:transparent;border-style:solid;border-width:6px;height:0;width:0}#tiptip_holder.tip_top #tiptip_arrow_inner{margin-top:-7px;margin-left:-6px;border-top-color:#191919;border-top-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_right #tiptip_arrow_inner{margin-top:-6px;margin-left:-5px;border-right-color:#191919;border-right-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_bottom #tiptip_arrow_inner{margin-top:-5px;margin-left:-6px;border-bottom-color:#191919;border-bottom-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_left #tiptip_arrow_inner{margin-top:-6px;margin-left:-7px;border-left-color:#191919;border-left-color:rgba(25,25,25,0.92)}
 
lib/Elefunds/Template/Shop/Css/elefunds_light_purple.min.css DELETED
@@ -1 +0,0 @@
1
- #elefunds_top{position:relative;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/top_bar.png') repeat-x;height:49px;border-left:1px solid #8c8f91;border-right:1px solid #8c8f91;line-height:1.4;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#elefunds_top>div{float:right;margin-right:10px}#elefunds_logo{position:absolute;top:8px;left:10px}#elefunds_arrow{position:relative;display:inline-block;float:left;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/arrow_bg.png') repeat-x;height:49px;padding:0}#elefunds_checkbox{position:absolute;top:18px;left:19px;width:18px;line-height:normal;cursor:pointer;opacity:0}#elefunds_checkbox+label{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;font-weight:normal;color:#d0d9d2;padding:9px 10px 9px 60px;height:31px;margin:0;max-width:180px;float:left;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/purple/arrow_off.png') no-repeat}#elefunds_checkbox:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/purple/arrow_on.png') no-repeat}#elefunds_arrow_end{width:14px;height:49px;display:inline-block;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/arrow_end.png') no-repeat}#elefunds_plus_minus{float:left;padding:13px 10px 0 30px}#elefunds_plus_minus img{margin:0 1px}#elefunds_input_container{float:left;padding-top:11px}#elefunds_currency{display:inline-block;width:auto;height:18px;padding:4px 8px;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;font-weight:normal;line-height:18px;text-align:center;color:#2c3238;text-shadow:0 1px 0 #c6cfd8;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/currency_bg.png') repeat-x;border:1px solid #7f807f;border-radius:3px 0 0 3px;margin-right:-1px;float:left}#elefunds_input{display:inline-block;width:48px;height:18px;padding:4px 2px 4px 0;margin:0;vertical-align:middle;text-align:center;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;color:#7f807f;text-shadow:0 1px 0 #c6cfd8;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/input_bg.png') repeat-x;border:1px solid #7f807f;float:left;outline:0}.elefunds_input_active{color:#000!important}#elefunds_bottom{height:62px;border-width:0 1px 1px;border-style:solid;border-color:#cfd0d4 #b9bec4;line-height:1.4;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.elefunds_receiver{margin:0;text-align:center;display:inline-block;border-left:1px solid #a3a6ac;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receiver_off_bg.png') repeat-x;float:left;position:relative}.elefunds_receiver>label>img{vertical-align:middle;-webkit-filter:grayscale(1) opacity(0.7);-ms-filter:"alpha(opacity=50)";filter:alpha(opacity=50)}.elefunds_receiver>input{cursor:pointer;opacity:0;font-size:100%;margin:0;vertical-align:baseline;width:22px;position:absolute;top:25px;left:13px}.elefunds_receiver>input+label{height:42px;width:165px;margin:0;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/checkbox_off.png') 10px 24px no-repeat;display:inline-block;border-left:1px solid #f6f6f6;border-left:1px solid rgba(255,255,255,0.6)}.elefunds_receiver>input:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/checkbox_on.png') 10px 24px no-repeat}#elefunds_bottom>input:first-child+div{border-left:0!important}.elefunds_receiver_selected{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receiver_on_bg.png') repeat-x}.elefunds_receiver_selected>label>img{filter:none;-webkit-filter:none;-ms-filter:none}#elefunds_below_container{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:16px;margin:0;padding:15px 0 10px;text-align:right}#elefunds_below_container label{font-weight:normal}#elefunds_round_sum_container{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/elefunds_highlight.png') right top no-repeat}#elefunds_round_sum_container strong{font-weight:bold;line-height:1.5em}#elefunds_round_sum_container strong:last-child{margin-right:8px}#elefunds_round_sum{display:inline-block;width:65px;color:#222}#elefunds_receipt{position:relative;float:left;font-size:12px;color:#333;margin:5px 0 0 15px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#elefunds_receipt_checkbox{position:absolute;top:1px;cursor:pointer;opacity:0;font-size:100%;margin:0;vertical-align:baseline;width:16px}#elefunds_receipt_checkbox+label{margin:0;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receipt_off.png') no-repeat;display:inline-block;padding-left:20px}#elefunds_receipt>input:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receipt_on.png') no-repeat}.elefunds_hidden{visibility:hidden}#elefunds_share{width:450px;padding:20px 20px 10px;background:#f4f4f4;border:4px solid #ccc;border-radius:8px;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;text-align:center}#elefunds_share>a{text-decoration:none}#elefunds_share h3{font-weight:bold;color:#222;margin:0}#elefunds_share p{font-size:14px;color:#666;margin:20px 0 10px;padding:10px 10px 20px}#elefunds_share span{font-style:normal;font-size:11px;line-height:21px;margin-top:6px;vertical-align:top;display:block}#tiptip_content{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;background:#222;background:rgba(0,0,0,0.7);padding:3px;overflow:hidden;width:260px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0,0,0,0.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,0.3);box-shadow:0 3px 7px rgba(0,0,0,0.3)}#tiptip_title{background-color:#f5f5f5;padding:10px 15px 8px;color:#222;font-size:18px;line-height:1;text-align:center;font-weight:bold;-webkit-border-top-left-radius:3px;-webkit-border-top-right-radius:3px;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-moz-border-radius-topleft:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:0;border-bottom-left-radius:0;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box;border-bottom:1px solid #eee;margin:0}#tiptip_inner{font-size:12px;color:#222;background-color:#fff;padding:14px;-webkit-border-top-left-radius:0;-webkit-border-top-right-radius:0;-webkit-border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;-moz-border-radius-topleft:0;-moz-border-radius-topright:0;-moz-border-radius-bottomright:3px;-moz-border-radius-bottomleft:3px;border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px;-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box}#tiptip_holder{display:none;position:absolute;top:0;left:0;z-index:99999}#tiptip_holder.tip_top{margin-bottom:5px}#tiptip_holder.tip_left{margin-right:5px}#tiptip_holder.tip_right{margin-left:5px}#tiptip_holder.tip_bottom{margin-top:5px}#tiptip_arrow,#tiptip_arrow_inner{position:absolute;border-color:transparent;border-style:solid;border-width:6px;height:0;width:0}#tiptip_holder.tip_top #tiptip_arrow_inner{margin-top:-7px;margin-left:-6px;border-top-color:#191919;border-top-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_right #tiptip_arrow_inner{margin-top:-6px;margin-left:-5px;border-right-color:#191919;border-right-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_bottom #tiptip_arrow_inner{margin-top:-5px;margin-left:-6px;border-bottom-color:#191919;border-bottom-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_left #tiptip_arrow_inner{margin-top:-6px;margin-left:-7px;border-left-color:#191919;border-left-color:rgba(25,25,25,0.92)}
 
lib/Elefunds/Template/Shop/Css/elements.less DELETED
@@ -1,156 +0,0 @@
1
- /*---------------------------------------------------
2
- LESS Elements 0.9
3
- ---------------------------------------------------
4
- A set of useful LESS mixins
5
- More info at: http://lesselements.com
6
- ---------------------------------------------------*/
7
-
8
- .gradient(@color: #F5F5F5, @start: #EEE, @stop: #FFF) {
9
- background: @color;
10
- background: -webkit-gradient(linear,
11
- left bottom,
12
- left top,
13
- color-stop(0, @start),
14
- color-stop(1, @stop));
15
- background: -ms-linear-gradient(bottom,
16
- @start,
17
- @stop);
18
- background: -moz-linear-gradient(center bottom,
19
- @start 0%,
20
- @stop 100%);
21
- background: -o-linear-gradient(@stop,
22
- @start);
23
- filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",@stop,@start));
24
- }
25
- .bw-gradient(@color: #F5F5F5, @start: 0, @stop: 255) {
26
- background: @color;
27
- background: -webkit-gradient(linear,
28
- left bottom,
29
- left top,
30
- color-stop(0, rgb(@start,@start,@start)),
31
- color-stop(1, rgb(@stop,@stop,@stop)));
32
- background: -ms-linear-gradient(bottom,
33
- rgb(@start,@start,@start) 0%,
34
- rgb(@stop,@stop,@stop) 100%);
35
- background: -moz-linear-gradient(center bottom,
36
- rgb(@start,@start,@start) 0%,
37
- rgb(@stop,@stop,@stop) 100%);
38
- background: -o-linear-gradient(rgb(@stop,@stop,@stop),
39
- rgb(@start,@start,@start));
40
- filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",rgb(@stop,@stop,@stop),rgb(@start,@start,@start)));
41
- }
42
- .bordered(@top-color: #EEE, @right-color: #EEE, @bottom-color: #EEE, @left-color: #EEE) {
43
- border-top: solid 1px @top-color;
44
- border-left: solid 1px @left-color;
45
- border-right: solid 1px @right-color;
46
- border-bottom: solid 1px @bottom-color;
47
- }
48
- .drop-shadow(@x-axis: 0, @y-axis: 1px, @blur: 2px, @alpha: 0.1) {
49
- -webkit-box-shadow: @x-axis @y-axis @blur rgba(0, 0, 0, @alpha);
50
- -moz-box-shadow: @x-axis @y-axis @blur rgba(0, 0, 0, @alpha);
51
- box-shadow: @x-axis @y-axis @blur rgba(0, 0, 0, @alpha);
52
- }
53
- .rounded(@radius: 2px) {
54
- -webkit-border-radius: @radius;
55
- -moz-border-radius: @radius;
56
- border-radius: @radius;
57
- }
58
- .border-radius(@topleft: 0, @topright: 0, @bottomright: 0, @bottomleft: 0) {
59
- -webkit-border-top-left-radius: @topleft;
60
- -webkit-border-top-right-radius: @topright;
61
- -webkit-border-bottom-right-radius: @bottomright;
62
- -webkit-border-bottom-left-radius: @bottomleft;
63
- -moz-border-radius-topleft: @topleft;
64
- -moz-border-radius-topright: @topright;
65
- -moz-border-radius-bottomright: @bottomright;
66
- -moz-border-radius-bottomleft: @bottomleft;
67
- border-top-left-radius: @topleft;
68
- border-top-right-radius: @topright;
69
- border-bottom-right-radius: @bottomright;
70
- border-bottom-left-radius: @bottomleft;
71
- .background-clip(padding-box);
72
- }
73
- .opacity(@opacity: 0.5) {
74
- -moz-opacity: @opacity;
75
- -khtml-opacity: @opacity;
76
- -webkit-opacity: @opacity;
77
- opacity: @opacity;
78
- @opperc: @opacity * 100;
79
- -ms-filter: ~"progid:DXImageTransform.Microsoft.Alpha(opacity=@{opperc})";
80
- filter: ~"alpha(opacity=@{opperc})";
81
- }
82
- .transition-duration(@duration: 0.2s) {
83
- -moz-transition-duration: @duration;
84
- -webkit-transition-duration: @duration;
85
- -o-transition-duration: @duration;
86
- transition-duration: @duration;
87
- }
88
- .transform(...) {
89
- -webkit-transform: @arguments;
90
- -moz-transform: @arguments;
91
- -o-transform: @arguments;
92
- -ms-transform: @arguments;
93
- transform: @arguments;
94
- }
95
- .rotation(@deg:5deg){
96
- .transform(rotate(@deg));
97
- }
98
- .scale(@ratio:1.5){
99
- .transform(scale(@ratio));
100
- }
101
- .transition(@duration:0.2s, @ease:ease-out) {
102
- -webkit-transition: all @duration @ease;
103
- -moz-transition: all @duration @ease;
104
- -o-transition: all @duration @ease;
105
- transition: all @duration @ease;
106
- }
107
- .inner-shadow(@horizontal:0, @vertical:1px, @blur:2px, @alpha: 0.4) {
108
- -webkit-box-shadow: inset @horizontal @vertical @blur rgba(0, 0, 0, @alpha);
109
- -moz-box-shadow: inset @horizontal @vertical @blur rgba(0, 0, 0, @alpha);
110
- box-shadow: inset @horizontal @vertical @blur rgba(0, 0, 0, @alpha);
111
- }
112
- .box-shadow(@arguments) {
113
- -webkit-box-shadow: @arguments;
114
- -moz-box-shadow: @arguments;
115
- box-shadow: @arguments;
116
- }
117
- .box-sizing(@sizing: border-box) {
118
- -ms-box-sizing: @sizing;
119
- -moz-box-sizing: @sizing;
120
- -webkit-box-sizing: @sizing;
121
- box-sizing: @sizing;
122
- }
123
- .user-select(@argument: none) {
124
- -webkit-user-select: @argument;
125
- -moz-user-select: @argument;
126
- -ms-user-select: @argument;
127
- user-select: @argument;
128
- }
129
- .columns(@colwidth: 250px, @colcount: 0, @colgap: 50px, @columnRuleColor: #EEE, @columnRuleStyle: solid, @columnRuleWidth: 1px) {
130
- -moz-column-width: @colwidth;
131
- -moz-column-count: @colcount;
132
- -moz-column-gap: @colgap;
133
- -moz-column-rule-color: @columnRuleColor;
134
- -moz-column-rule-style: @columnRuleStyle;
135
- -moz-column-rule-width: @columnRuleWidth;
136
- -webkit-column-width: @colwidth;
137
- -webkit-column-count: @colcount;
138
- -webkit-column-gap: @colgap;
139
- -webkit-column-rule-color: @columnRuleColor;
140
- -webkit-column-rule-style: @columnRuleStyle;
141
- -webkit-column-rule-width: @columnRuleWidth;
142
- column-width: @colwidth;
143
- column-count: @colcount;
144
- column-gap: @colgap;
145
- column-rule-color: @columnRuleColor;
146
- column-rule-style: @columnRuleStyle;
147
- column-rule-width: @columnRuleWidth;
148
- }
149
- .translate(@x:0, @y:0) {
150
- .transform(translate(@x, @y));
151
- }
152
- .background-clip(@argument: padding-box) {
153
- -moz-background-clip: @argument;
154
- -webkit-background-clip: @argument;
155
- background-clip: @argument;
156
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Elefunds/Template/Shop/Helper/RequestHelper.php DELETED
@@ -1,154 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * elefunds API PHP Library
5
- *
6
- * Copyright (c) 2012, elefunds GmbH <hello@elefunds.de>.
7
- * All rights reserved.
8
- *
9
- * Redistribution and use in source and binary forms, with or without
10
- * modification, are permitted provided that the following conditions
11
- * are met:
12
- *
13
- * * Redistributions of source code must retain the above copyright
14
- * notice, this list of conditions and the following disclaimer.
15
- *
16
- * * Redistributions in binary form must reproduce the above copyright
17
- * notice, this list of conditions and the following disclaimer in
18
- * the documentation and/or other materials provided with the
19
- * distribution.
20
- *
21
- * * Neither the name of the elefunds GmbH nor the names of its
22
- * contributors may be used to endorse or promote products derived
23
- * from this software without specific prior written permission.
24
- *
25
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
28
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
29
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
30
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
31
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
32
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
33
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
35
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36
- * POSSIBILITY OF SUCH DAMAGE.
37
- *
38
- */
39
-
40
- /**
41
- * Helper for request verification.
42
- *
43
- * @package elefunds API PHP Library
44
- * @subpackage Template\Shop
45
- * @author Christian Peters <christian@elefunds.de>
46
- * @copyright 2012 elefunds GmbH <hello@elefunds.de>
47
- * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
48
- * @link http://www.elefunds.de
49
- * @since File available since Release 1.2.1
50
- */
51
-
52
- class Elefunds_Template_Shop_Helper_RequestHelper {
53
-
54
- protected $request;
55
-
56
- /**
57
- * Accepts the request as array.
58
- *
59
- * @param array $request
60
- */
61
- public function __construct(array $request = array()) {
62
- $this->request = $request;
63
- }
64
-
65
- /**
66
- * Set the API request
67
- *
68
- * @param array $request
69
- */
70
- public function setRequest(array $request) {
71
- $this->request = $request;
72
- }
73
-
74
- /**
75
- * Checks if the given request contains the basic information for the elefunds module and checks
76
- * if the module is active. The module is active and valid if the following parameters are set:
77
- *
78
- * elefunds_agree: if the module is checked
79
- * elefunds_donation_cent: the donation amount in cent
80
- * elefunds_receivers[]: list of receivers the donation goes to
81
- * elefunds_receivers: alternative - comma separated list of receivers as a string (in case the value is read from a hidden field)
82
- *
83
- * @return bool
84
- */
85
- public function isActiveAndValid() {
86
-
87
- $agreedToElefunds = isset($this->request['elefunds_agree']) && $this->request['elefunds_agree'] !== 'false';
88
- $hasDonation = isset($this->request['elefunds_donation_cent']) && ctype_digit($this->request['elefunds_donation_cent']) && $this->request['elefunds_donation_cent'] > 0;
89
- $hasValidReceivers = FALSE;
90
-
91
- if (isset($this->request['elefunds_receivers'])) {
92
- if (is_array($this->request['elefunds_receivers'])) {
93
- $hasValidReceivers = count($this->request['elefunds_receivers']) > 0;
94
- } else {
95
- $hasValidReceivers = $this->request['elefunds_receivers'] !== '';
96
- }
97
- }
98
-
99
- return $agreedToElefunds && $hasDonation && $hasValidReceivers;
100
- }
101
-
102
- /**
103
- * Returns the roundup of the request.
104
- *
105
- * @return int
106
- */
107
- public function getRoundUp() {
108
- return (int)$this->request['elefunds_donation_cent'];
109
- }
110
-
111
- /**
112
- * Returns the roundup as float.
113
- *
114
- * @return float
115
- */
116
- public function getRoundUpAsFloat() {
117
- return number_format($this->getRoundUp() / 100, 2);
118
- }
119
-
120
- /**
121
- * Returns the receivers id's of the request, mapped to int.
122
- *
123
- * @return array
124
- */
125
- public function getReceiverIds() {
126
- if (is_array($this->request['elefunds_receivers'])) {
127
- return array_map(function($x) { return (int)$x; }, $this->request['elefunds_receivers']);
128
- } else {
129
- return array_map(function($x) { return (int)$x; }, explode(',', $this->request['elefunds_receivers']));
130
- }
131
- }
132
-
133
- /**
134
- * Returns the suggested roundup in Cent as integer.
135
- *
136
- * @return int
137
- */
138
- public function getSuggestedRoundUp() {
139
- if (isset($this->request['elefunds_suggested_round_up_cent']) && ctype_digit($this->request['elefunds_suggested_round_up_cent'])) {
140
- return (int)$this->request['elefunds_suggested_round_up_cent'];
141
- }
142
- return 0;
143
- }
144
-
145
- /**
146
- * Returns true if the customer requested a donation receipt.
147
- *
148
- * @return bool
149
- */
150
- public function isDonationReceiptRequested() {
151
- return isset($this->request['elefunds_receipt']) && $this->request['elefunds_receipt'] !== 'false';
152
- }
153
-
154
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Elefunds/Template/Shop/Hooks/ShopHooks.php DELETED
@@ -1,307 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * elefunds API PHP Library
5
- *
6
- * Copyright (c) 2012, elefunds GmbH <hello@elefunds.de>.
7
- * All rights reserved.
8
- *
9
- * Redistribution and use in source and binary forms, with or without
10
- * modification, are permitted provided that the following conditions
11
- * are met:
12
- *
13
- * * Redistributions of source code must retain the above copyright
14
- * notice, this list of conditions and the following disclaimer.
15
- *
16
- * * Redistributions in binary form must reproduce the above copyright
17
- * notice, this list of conditions and the following disclaimer in
18
- * the documentation and/or other materials provided with the
19
- * distribution.
20
- *
21
- * * Neither the name of the elefunds GmbH nor the names of its
22
- * contributors may be used to endorse or promote products derived
23
- * from this software without specific prior written permission.
24
- *
25
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
28
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
29
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
30
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
31
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
32
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
33
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
35
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36
- * POSSIBILITY OF SUCH DAMAGE.
37
- *
38
- */
39
-
40
- /**
41
- * Hooks for the shop template.
42
- *
43
- * @package elefunds API PHP Library
44
- * @subpackage Template\Shop
45
- * @author Christian Peters <christian@elefunds.de>
46
- * @copyright 2012 elefunds GmbH <hello@elefunds.de>
47
- * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
48
- * @link http://www.elefunds.de
49
- * @since File available since Release 1.0.0
50
- */
51
- class Elefunds_Template_Shop_Hooks_ShopHooks {
52
-
53
- private static $foreignId;
54
- private static $receiverIds;
55
-
56
- /**
57
- * Calculates the suggested roundup to be displayed in the shop.
58
- *
59
- * @param Elefunds_View_ViewInterface $view
60
- * @param int $total in the smallest unit of currency
61
- * @return void
62
- */
63
- public static function calculateRoundup(Elefunds_View_ViewInterface $view, $total) {
64
-
65
- //Convert to float
66
- $total = round(($total / 100), 2);
67
-
68
- //Checkout total price tiers
69
- $tiers = array(16, 100, 1000, 999999);
70
-
71
- //Percentage of checkout total
72
- $percent = array(0.10, 0.06, 0.04, 0.03);
73
-
74
- //Round to the nearest "round sum"
75
- $roundup = array(2, 5, 10, 20);
76
-
77
- //Default tier
78
- $tier = count($tiers)-1;
79
-
80
- //Determine checkout price tier
81
- foreach($tiers as $key => $value) {
82
- if ($total < $value) {
83
- $tier = $key;
84
- break;
85
- }
86
- }
87
-
88
- //Percentage of the checkout total...
89
- $donationSuggestion = $total * $percent[$tier];
90
-
91
- //Round up total sum, rounded to the nearest $roundup...
92
- $roundTotal = ceil(($total + $donationSuggestion) / $roundup[$tier]) * $roundup[$tier];
93
-
94
- //Donation suggestion is the difference between the round total and the checkout total
95
- $donationSuggestion = $roundTotal - $total;
96
-
97
- //In case the suggestion is higher than the nearest $roundup, we subtract the nearest $roundup
98
- //and adjust the $roundTotal
99
-
100
- if ($donationSuggestion > $roundup[$tier] && $tier < count($tiers)-2) {
101
- $donationSuggestion -= $roundup[$tier];
102
- }
103
-
104
- //Round the donationSuggestion to eliminate float bugs
105
-
106
- $assigns = $view->getAssignments();
107
- $suggestedDonationAmount = round($donationSuggestion, 2);
108
- $donationAmountString = number_format($suggestedDonationAmount, 2, $assigns['currencyDelimiter'], '');
109
- $roundedSum = number_format(($suggestedDonationAmount + $total), 2, $assigns['currencyDelimiter'], '');
110
-
111
- $view->assign('suggestedDonationAmountCent', $suggestedDonationAmount * 100);
112
- $view->assign('suggestedDonationAmount', $donationAmountString);
113
- $view->assign('roundedSum', $roundedSum);
114
- $view->assign('currencyDelimiter', $assigns['currencyDelimiter']);
115
-
116
- }
117
-
118
- /**
119
- * Calculates number of providers displayed and their sizes
120
- *
121
- * @param Elefunds_View_ViewInterface $view
122
- * @param int $width
123
- * @return void
124
- */
125
- public static function calculatePadding(Elefunds_View_ViewInterface $view, $width) {
126
-
127
- if ($width < 632) {
128
- $width = 632;
129
- }
130
-
131
- $width = $width - 2;
132
-
133
- // Max number of receivers that can be displayed
134
- $receiversCount = (int) floor($width / 210);
135
-
136
- // Adjust receivers & override assignments
137
- $assigns = $view->getAssignments();
138
-
139
- // If we have less receivers assigned than space available, reduce the count
140
- if (count($assigns['receivers']) < $receiversCount) {
141
- $receiversCount = count($assigns['receivers']);
142
- }
143
-
144
- $receivers = array_slice($assigns['receivers'], 0, $receiversCount);
145
- $view->assign('receivers', $receivers);
146
-
147
- if ($width % 210 == 0) {
148
- $paddingLeft = 8;
149
- } else {
150
- $paddingLeft = 9;
151
- }
152
-
153
- $paddingRight = 0;
154
-
155
- //subtract the borders between the buttons
156
- $padding = $width - ($receiversCount - 1);
157
-
158
- //subtract image width
159
- $padding = $padding - (166 * $receiversCount);
160
-
161
- //subtract min padding
162
- $padding = $padding - ($receiversCount * ($paddingLeft + $paddingRight));
163
-
164
- $paddingEach = $padding / $receiversCount;
165
-
166
- $mod = $padding % $receiversCount;
167
-
168
- if ($mod == 0) {
169
- $paddingEach = intval($paddingEach);
170
- $bonus = 0;
171
- } elseif ($mod == 1) {
172
- $paddingEach = floor($paddingEach);
173
- $bonus = 1;
174
- } else {
175
- $paddingEach = ceil($paddingEach);
176
- $bonus = $mod - $receiversCount;
177
- }
178
-
179
- //Padding of the receivers buttons
180
- $paddingLeft = $paddingLeft + ceil($paddingEach / 2);
181
- $paddingRight = $paddingRight + floor($paddingEach / 2);
182
-
183
- //Padding of the last receiver buttons
184
- $paddingLeftLast = $paddingLeft + floor($bonus / 2);
185
- $paddingRightLast = $paddingRight + ceil($bonus / 2);
186
-
187
- $view->assignMultiple(
188
- array(
189
- 'paddingLeft' => $paddingLeft . 'px',
190
- 'paddingRight' => $paddingRight . 'px',
191
- 'paddingLeftLast' => $paddingLeftLast . 'px',
192
- 'paddingRightLast' => $paddingRightLast . 'px',
193
- )
194
- );
195
-
196
- $view->assign('actualShopWidth', $width);
197
- }
198
-
199
- /**
200
- * Chooses the correct CSS to load in the view based on the theme and color defined in $skin
201
- *
202
- * @param Elefunds_View_ViewInterface $view
203
- * @param array $skin
204
- */
205
- public static function chooseCssFile(Elefunds_View_ViewInterface $view, array $skin) {
206
-
207
- $default_theme = 'light';
208
- $default_color = 'orange';
209
-
210
- if(!isset($skin['theme']) || !isset($skin['color'])) {
211
- $theme = $default_theme;
212
- $color = $default_color;
213
- } else {
214
- $theme = $skin['theme'];
215
- $color = $skin['color'];
216
- }
217
-
218
- //Set theme & color to use in the view
219
- $view->assign('theme', $theme);
220
- $view->assign('color', $color);
221
-
222
- //Reset the css array in case assign('skin') has already been invoked
223
- $view->flushCssFiles();
224
- $view->addCssFile('elefunds_' . $theme . '_' . $color . '.min.css');
225
- }
226
-
227
- /**
228
- * Forwards the handling to the assignShares method if foreignId is already set. If not,
229
- * it just assigns the receiverIds to a private property. The action will then be invoked
230
- * once the foreignId is added.
231
- *
232
- * Invokes as well calculateReceiversText.
233
- *
234
- * @param Elefunds_View_ViewInterface $view
235
- * @param array $receivers
236
- */
237
- public static function onReceiversAdded(Elefunds_View_ViewInterface $view, array $receivers) {
238
- self::$receiverIds = array_keys($receivers);
239
-
240
- if (self::$foreignId !== NULL) {
241
- self::assignShares($view);
242
- }
243
- }
244
-
245
- /**
246
- * Forwards the handling to the assignShares method if receiverIds are already set. If not,
247
- * it just assigns the foreignId to a private property. The action will then be invoked
248
- * once receivers are added.
249
- *
250
- * @param Elefunds_View_ViewInterface $view
251
- * @param $foreignId
252
- */
253
- public static function onForeignIdAdded(Elefunds_View_ViewInterface $view, $foreignId) {
254
- self::$foreignId = $foreignId;
255
-
256
- if (self::$receiverIds !== NULL) {
257
- self::assignShares($view);
258
- }
259
- }
260
-
261
- /**
262
- * Assigns shares to the success page!
263
- *
264
- * @param Elefunds_View_ViewInterface $view
265
- *
266
- * @throws InvalidArgumentException
267
- *
268
- * @return void
269
- */
270
- private static function assignShares(Elefunds_View_ViewInterface $view) {
271
-
272
- $assigns = $view->getAssignments();
273
-
274
- // No services are configured, hence we skip this.
275
- if (!isset($assigns['shareServices'])) {
276
- return;
277
- }
278
-
279
- $services = $assigns['shareServices'];
280
- $baseUrl = 'https://share.elefunds.de/on/%s/%d/%d/%s/%s';
281
- $receivers = implode(',', self::$receiverIds);
282
- $clientId = $assigns['clientId'];
283
- $hashedKey = $assigns['hashedKey'];
284
- $checksum = sha1($clientId . self::$foreignId . $receivers . $hashedKey);
285
-
286
- $shares = array();
287
- $availableShareServices = $assigns['availableShareServices'];
288
-
289
- foreach($services as $service) {
290
-
291
- if (!array_key_exists($service, $availableShareServices)) {
292
- throw new InvalidArgumentException('Service must be one of the following: ' . implode(', ', $availableShareServices));
293
- }
294
- $serviceObj = new stdClass();
295
- $serviceObj->url = sprintf($baseUrl, $service, $clientId, self::$foreignId, $receivers, $checksum);
296
- $serviceObj->imageUrl = $availableShareServices[$service]['image'];
297
- $serviceObj->width = $availableShareServices[$service]['width'];
298
- $serviceObj->height = $availableShareServices[$service]['height'];
299
- $serviceObj->title = $availableShareServices[$service]['title'];
300
- $shares[] = $serviceObj;
301
- }
302
- $view->assign('shares', $shares);
303
-
304
- }
305
-
306
-
307
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Elefunds/Template/Shop/Images/elefunds_item_main.png DELETED
Binary file
lib/Elefunds/Template/Shop/Images/elefunds_item_small.png DELETED
Binary file
lib/Elefunds/Template/Shop/Images/elefunds_item_thumbnail.png DELETED
Binary file
lib/Elefunds/Template/Shop/Javascript/elefunds.jquery.js DELETED
@@ -1,227 +0,0 @@
1
- var elefunds = (function(parent, $) {
2
-
3
- var roundSumContainer, roundSum, currency, decimal, decimalAlt, total, toolTipPosition;
4
- var enabled = false;
5
-
6
- function init(options) {
7
- roundSumContainer = options.roundSumContainer;
8
- roundSum = options.roundSum;
9
- currency = options.currency;
10
- decimal = options.decimal;
11
- decimalAlt = options.deciamlAlt;
12
- total = options.total;
13
- toolTipPosition = options.toolTipPosition;
14
-
15
- $('#elefunds').data('elefunds-roundSum', convertToFloat(total + parseInt($('#elefunds_donation_cent').val(), 10)));
16
- $('#elefunds').data('elefunds-donation', {donationCent: parseInt($('#elefunds_donation_cent').val(), 10), donationFloat: convertToFloat(parseInt($('#elefunds_donation_cent').val(), 10))});
17
-
18
- function enable() {
19
- $('#elefunds_checkbox').prop('checked', true);
20
- $("#elefunds_input").addClass('elefunds_input_active');
21
- roundSumContainer.slideDown();
22
-
23
- $('#elefunds').trigger('elefunds_enabled');
24
- enabled = true;
25
- }
26
-
27
- function disable() {
28
- $('#elefunds_checkbox').prop('checked', false);
29
- $('#elefunds_input').removeClass('elefunds_input_active');
30
- roundSumContainer.slideUp();
31
-
32
- $('#elefunds').trigger('elefunds_disabled');
33
- enabled = false;
34
- }
35
-
36
- // Change button backgrounds when (un)selected
37
- $('.elefunds_receiver > input').on('change', function() {
38
- //If all are unchecked
39
- if($('#elefunds_bottom').find('input[type="checkbox"]:checked').length == 0) {
40
- disable();
41
- } else if(!enabled) {
42
- enable();
43
- }
44
-
45
- $(this).parent().toggleClass('elefunds_receiver_selected');
46
- });
47
-
48
- // When the plugin is (de)activated
49
- $('#elefunds_checkbox').on('change', function() {
50
- if($('#elefunds_checkbox').prop('checked') && $('#elefunds_bottom').find('input[type="checkbox"]:checked').length == 0) {
51
- $('#elefunds_bottom').find('input[type="checkbox"]').prop('checked', true);
52
- $('#elefunds_bottom').find('input[type="checkbox"]').parent().toggleClass('elefunds_receiver_selected');
53
- }
54
-
55
- if(!$('#elefunds_checkbox:checked').length) {
56
- roundSumContainer.slideUp();
57
- $('#elefunds').trigger('elefunds_disabled');
58
- enabled = false;
59
-
60
- } else {
61
- if ($('#elefunds_checkbox:checked').length) {
62
- roundSumContainer.slideDown();
63
-
64
- //Store data
65
- var centValue = parseInt($('#elefunds_donation_cent').val(), 10);
66
- $('#elefunds').data('elefunds-donation', {donationCent: centValue, donationFloat: convertToFloat(centValue)});
67
-
68
- $('#elefunds').trigger('elefunds_enabled');
69
- enabled = true;
70
- }
71
- }
72
-
73
- $('#elefunds_input').toggleClass('elefunds_input_active');
74
- });
75
-
76
- $('#elefunds_input').keyup(function(e){
77
- if(e.which == 13) e.preventDefault();
78
- });
79
-
80
- // Enable tooltips
81
- $('.tiptip').tipTip({
82
- defaultPosition: toolTipPosition || 'top',
83
- edgeOffset: -12,
84
- delay: 200
85
- });
86
- } //END INIT
87
-
88
- //Check if elefunds has already been created in the view
89
- (function() {
90
- if(parent.hasOwnProperty('options')) {
91
- init(parent.options);
92
- }
93
- })();
94
-
95
- function convertToCent(floatValue) {
96
- var centValue;
97
- var centArray;
98
-
99
- if(floatValue.indexOf(decimal) !== -1) {
100
- centArray = floatValue.split(decimal,2);
101
- } else if(floatValue.indexOf(decimalAlt) !== -1) {
102
- centArray = floatValue.split(decimalAlt,2);
103
- } else {
104
- centArray = [floatValue, 0];
105
- }
106
-
107
- if(centArray[1].length > 2) {
108
- centArray[1] = centArray[1].substr(0,2);
109
- }
110
-
111
- while(centArray[1].length < 2) {
112
- centArray[1] += '0';
113
- }
114
-
115
- if(centArray[0].length < 1) {
116
- centArray[0] = 0;
117
- }
118
-
119
- centValue = parseInt(centArray[0], 10)*100 + parseInt(centArray[1], 10);
120
-
121
- // Check for valid value
122
- if(isNaN(centValue) || centValue < 0) {
123
- centValue = 0;
124
- }
125
-
126
- return centValue;
127
- }
128
-
129
- // Convert cent value to float currency equivalent
130
- function convertToFloat(centValue) {
131
- var floatValue;
132
-
133
- if(centValue < 10) {
134
- floatValue = '0' + decimal + '0' + centValue;
135
- } else if(centValue < 100) {
136
- floatValue = '0' + decimal + centValue;
137
- } else {
138
- centValue = centValue.toString();
139
- floatValue = centValue.slice(0, -2) + decimal + centValue.slice(-2);
140
- }
141
-
142
- return floatValue;
143
- }
144
-
145
- // Update the donation input field
146
- function updateDonation(centValue) {
147
- var floatValue = convertToFloat(centValue);
148
- $('#elefunds_input').val(floatValue);
149
-
150
- render(centValue);
151
-
152
- if(enabled) {
153
- $('#elefunds').trigger('elefunds_donationChange');
154
- }
155
- }
156
-
157
- function render(centValue) {
158
- // Update the hidden donation input field
159
- // containing the value of the donation in cents
160
- $('#elefunds_donation_cent').val(centValue);
161
-
162
- // Store data
163
- $('#elefunds').data('elefunds-roundSum', convertToFloat(total + centValue));
164
- $('#elefunds').data('elefunds-donation', {donationCent: centValue, donationFloat: convertToFloat(centValue)});
165
-
166
- //Update round sum
167
- if(roundSum) {
168
- roundSum.html(convertToFloat(total + centValue));
169
- }
170
- }
171
-
172
- return {
173
-
174
- init: function(options) {
175
- init(options);
176
- },
177
-
178
- // Decrease the donation sum by 1.00
179
- decreaseDonation: function() {
180
- var centValue = parseInt($('#elefunds_donation_cent').val(), 10);
181
-
182
- if(centValue > 100) {
183
- centValue = centValue - 100;
184
- updateDonation(centValue);
185
- }
186
-
187
- return centValue;
188
- },
189
-
190
- // Increase the donation sum by 1.00
191
- increaseDonation: function() {
192
- var centValue = parseInt($('#elefunds_donation_cent').val(), 10);
193
-
194
- centValue = parseInt(centValue, 10) + 100;
195
-
196
- updateDonation(centValue);
197
- return centValue;
198
- },
199
-
200
- // Update the hidden field with the current donation value
201
- donationChange: function(floatValue) {
202
- var centValue = convertToCent(floatValue);
203
- render(centValue);
204
-
205
- var timeHandler = $('#elefunds').data('elefunds-timer');
206
- var now = (new Date()).getTime();
207
- var delay = 800;
208
-
209
- if (typeof(timeHandler) !== 'undefined' && timeHandler !== null) {
210
- if(now - timeHandler.time < delay) {
211
- clearTimeout(timeHandler.timer);
212
- }
213
- }
214
-
215
- if(enabled) {
216
- var timer = setTimeout(function() {
217
- $('#elefunds').trigger('elefunds_donationChange');
218
- }, delay);
219
-
220
- $('#elefunds').data('elefunds-timer', {timer: timer, time: (new Date()).getTime()});
221
- }
222
-
223
- return centValue;
224
- }
225
-
226
- };
227
- }(elefunds || {}, jQuery));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Elefunds/Template/Shop/Javascript/elefunds.jquery.min.js DELETED
@@ -1 +0,0 @@
1
- (function(e){e.fn.tipTip=function(t){var n={activation:"hover",keepAlive:!1,maxWidth:"auto",edgeOffset:2,defaultPosition:"top",delay:50,fadeIn:50,fadeOut:100,attribute:"title",attribute2:"desc",content:"",enter:function(){},exit:function(){}},r=e.extend(n,t),i,s,o,u;if(e("#tiptip_holder").length<=0){i=e('<div id="tiptip_holder" style="max-width:'+r.maxWidth+';"></div>');s=e('<div id="tiptip_content"></div>');o=e('<div id="tiptip_inner"></div>');u=e('<div id="tiptip_arrow"></div>');e("body").append(i.html(s).prepend(u.html('<div id="tiptip_arrow_inner"></div>')))}else{i=e("#tiptip_holder");s=e("#tiptip_content");o=e("#tiptip_inner");u=e("#tiptip_arrow")}return this.each(function(){var t=e(this),n,a,f;if(t.attr(r.attribute)){n=t.attr(r.attribute);a=t.attr(r.attribute2)}else{n=r.title;a=r.content}if(n!==""){if(!r.content){t.removeAttr(r.attribute);t.removeAttr(r.attribute2)}f=!1;if(r.activation==="hover"){t.hover(function(){l()},function(){r.keepAlive||c()});r.keepAlive&&i.hover(function(){},function(){c()})}else if(r.activation==="focus")t.focus(function(){l()}).blur(function(){c()});else if(r.activation==="click"){t.click(function(){l();return!1}).hover(function(){},function(){r.keepAlive||c()});r.keepAlive&&i.hover(function(){},function(){c()})}function l(){r.enter.call(this);s.html('<h3 id="tiptip_title">'+n+"</h3>");o.html(a);s.append(o);i.hide().removeAttr("class").css("margin","0");u.removeAttr("style");var l=parseInt(t.offset().top);t.attr("id")==="elefunds_logo"&&(l-=8);var c=parseInt(t.offset().left),h=parseInt(t.width()),p=parseInt(t.height()),d=i.width(),v=i.height(),m=Math.round((h-d)/2),g=Math.round((p-v)/2),y=Math.round(c+m),b=Math.round(l+p+r.edgeOffset),w="",E="",S=Math.round(d-12)/2;r.defaultPosition==="bottom"?w="_bottom":r.defaultPosition==="top"?w="_top":r.defaultPosition==="left"?w="_left":r.defaultPosition==="right"&&(w="_right");var x=m+c<parseInt(e(window).scrollLeft()),T=d+c>parseInt(e(window).width());if(x&&m<0||w=="_right"&&!T||w=="_left"&&c<d+r.edgeOffset+5){w="_right";E=Math.round(v-13)/2;S=-12;y=Math.round(c+h+r.edgeOffset);b=Math.round(l+g)}else if(T&&m<0||w=="_left"&&!x){w="_left";E=Math.round(v-13)/2;S=Math.round(d);y=Math.round(c-(d+r.edgeOffset+5));b=Math.round(l+g)}var N=l+p+r.edgeOffset+v+8>parseInt(e(window).height()+e(window).scrollTop()),C=l+p-(r.edgeOffset+v+8)<0;if(N||w=="_bottom"&&N||w=="_top"&&!C){w=="_top"||w=="_bottom"?w="_top":w+="_top";E=v;b=Math.round(l-(v+5+r.edgeOffset))}else if(C|(w=="_top"&&C)||w=="_bottom"&&!N){w=="_top"||w=="_bottom"?w="_bottom":w+="_bottom";E=-12;b=Math.round(l+p+r.edgeOffset)}u.css({"margin-left":S+"px","margin-top":E+"px"});i.css({"margin-left":y+"px","margin-top":b+"px"}).attr("class","tip"+w);f&&clearTimeout(f);f=setTimeout(function(){i.stop(!0,!0).fadeIn(r.fadeIn)},r.delay)}function c(){r.exit.call(this);f&&clearTimeout(f);i.fadeOut(r.fadeOut)}}})}})(window.jQuery);var elefunds=function(e,t){function l(e){function l(){t("#elefunds_checkbox").prop("checked",!0);t("#elefunds_input").addClass("elefunds_input_active");n.slideDown();t("#elefunds").trigger("elefunds_enabled");f=!0}function c(){t("#elefunds_checkbox").prop("checked",!1);t("#elefunds_input").removeClass("elefunds_input_active");n.slideUp();t("#elefunds").trigger("elefunds_disabled");f=!1}n=e.roundSumContainer;r=e.roundSum;i=e.currency;s=e.decimal;o=e.deciamlAlt;u=e.total;a=e.toolTipPosition;t("#elefunds").data("elefunds-roundSum",h(u+parseInt(t("#elefunds_donation_cent").val(),10)));t("#elefunds").data("elefunds-donation",{donationCent:parseInt(t("#elefunds_donation_cent").val(),10),donationFloat:h(parseInt(t("#elefunds_donation_cent").val(),10))});t(".elefunds_receiver > input").on("change",function(){t("#elefunds_bottom").find('input[type="checkbox"]:checked').length==0?c():f||l();t(this).parent().toggleClass("elefunds_receiver_selected")});t("#elefunds_checkbox").on("change",function(){if(t("#elefunds_checkbox").prop("checked")&&t("#elefunds_bottom").find('input[type="checkbox"]:checked').length==0){t("#elefunds_bottom").find('input[type="checkbox"]').prop("checked",!0);t("#elefunds_bottom").find('input[type="checkbox"]').parent().toggleClass("elefunds_receiver_selected")}if(!t("#elefunds_checkbox:checked").length){n.slideUp();t("#elefunds").trigger("elefunds_disabled");f=!1}else if(t("#elefunds_checkbox:checked").length){n.slideDown();var e=parseInt(t("#elefunds_donation_cent").val(),10);t("#elefunds").data("elefunds-donation",{donationCent:e,donationFloat:h(e)});t("#elefunds").trigger("elefunds_enabled");f=!0}t("#elefunds_input").toggleClass("elefunds_input_active")});t("#elefunds_input").keyup(function(e){e.which==13&&e.preventDefault()});t(".tiptip").tipTip({defaultPosition:a||"top",edgeOffset:-12,delay:200})}function c(e){var t,n;e.indexOf(s)!==-1?n=e.split(s,2):e.indexOf(o)!==-1?n=e.split(o,2):n=[e,0];n[1].length>2&&(n[1]=n[1].substr(0,2));while(n[1].length<2)n[1]+="0";n[0].length<1&&(n[0]=0);t=parseInt(n[0],10)*100+parseInt(n[1],10);if(isNaN(t)||t<0)t=0;return t}function h(e){var t;if(e<10)t="0"+s+"0"+e;else if(e<100)t="0"+s+e;else{e=e.toString();t=e.slice(0,-2)+s+e.slice(-2)}return t}function p(e){var n=h(e);t("#elefunds_input").val(n);d(e);f&&t("#elefunds").trigger("elefunds_donationChange")}function d(e){t("#elefunds_donation_cent").val(e);t("#elefunds").data("elefunds-roundSum",h(u+e));t("#elefunds").data("elefunds-donation",{donationCent:e,donationFloat:h(e)});r&&r.html(h(u+e))}var n,r,i,s,o,u,a,f=!1;(function(){e.hasOwnProperty("options")&&l(e.options)})();return{init:function(e){l(e)},decreaseDonation:function(){var e=parseInt(t("#elefunds_donation_cent").val(),10);if(e>100){e-=100;p(e)}return e},increaseDonation:function(){var e=parseInt(t("#elefunds_donation_cent").val(),10);e=parseInt(e,10)+100;p(e);return e},donationChange:function(e){var n=c(e);d(n);var r=t("#elefunds").data("elefunds-timer"),i=(new Date).getTime(),s=800;typeof r!="undefined"&&r!==null&&i-r.time<s&&clearTimeout(r.timer);if(f){var o=setTimeout(function(){t("#elefunds").trigger("elefunds_donationChange")},s);t("#elefunds").data("elefunds-timer",{timer:o,time:(new Date).getTime()})}return n}}}(elefunds||{},jQuery);
 
lib/Elefunds/Template/Shop/Javascript/elefundsTT.jquery.js DELETED
@@ -1,211 +0,0 @@
1
- /*
2
- * TipTip
3
- * Copyright 2010 Drew Wilson
4
- * www.drewwilson.com
5
- * code.drewwilson.com/entry/tiptip-jquery-plugin
6
- *
7
- * Version 1.3 - Updated: Mar. 23, 2010
8
- *
9
- * This Plug-In will create a custom tooltip to replace the default
10
- * browser tooltip. It is extremely lightweight and very smart in
11
- * that it detects the edges of the browser window and will make sure
12
- * the tooltip stays within the current window size. As a result the
13
- * tooltip will adjust itself to be displayed above, below, to the left
14
- * or to the right depending on what is necessary to stay within the
15
- * browser window. It is completely customizable as well via CSS.
16
- *
17
- * This TipTip jQuery plug-in is dual licensed under the MIT and GPL licenses:
18
- * http://www.opensource.org/licenses/mit-license.php
19
- * http://www.gnu.org/licenses/gpl.html
20
- */
21
-
22
- (function ($) {
23
- $.fn.tipTip = function (options) {
24
- var defaults = {
25
- activation: "hover",
26
- keepAlive: false,
27
- maxWidth: "auto",
28
- edgeOffset: 2,
29
- defaultPosition: "top",
30
- delay: 50,
31
- fadeIn: 50,
32
- fadeOut: 100,
33
- attribute: "title",
34
- attribute2: "desc",
35
- content: '',
36
- enter: function () {},
37
- exit: function () {}
38
- },
39
- opts = $.extend(defaults, options),
40
- tiptip_holder,
41
- tiptip_content,
42
- tiptip_inner,
43
- tiptip_arrow;
44
-
45
- // Setup tip tip elements and render them to the DOM
46
- if ($("#tiptip_holder").length <= 0) {
47
- tiptip_holder = $('<div id="tiptip_holder" style="max-width:' + opts.maxWidth + ';"></div>');
48
- tiptip_content = $('<div id="tiptip_content"></div>');
49
- tiptip_inner = $('<div id="tiptip_inner"></div>');
50
- tiptip_arrow = $('<div id="tiptip_arrow"></div>');
51
- $("body").append(tiptip_holder.html(tiptip_content).prepend(tiptip_arrow.html('<div id="tiptip_arrow_inner"></div>')));
52
- } else {
53
- tiptip_holder = $('#tiptip_holder');
54
- tiptip_content = $('#tiptip_content');
55
- tiptip_inner = $('#tiptip_inner');
56
- tiptip_arrow = $("#tiptip_arrow");
57
- }
58
-
59
- return this.each(function () {
60
- var org_elem = $(this),
61
- org_title,
62
- org_desc,
63
- timeout;
64
-
65
- if (org_elem.attr(opts.attribute)) {
66
- org_title = org_elem.attr(opts.attribute);
67
- org_desc = org_elem.attr(opts.attribute2);
68
- } else {
69
- org_title = opts.title;
70
- org_desc = opts.content;
71
- }
72
-
73
- if (org_title !== "") {
74
- if (!opts.content) {
75
- org_elem.removeAttr(opts.attribute);
76
- org_elem.removeAttr(opts.attribute2);
77
- }
78
- timeout = false;
79
-
80
- if (opts.activation === "hover") {
81
- org_elem.hover(function () {
82
- active_tiptip();
83
- }, function () {
84
- if (!opts.keepAlive) {
85
- deactive_tiptip();
86
- }
87
- });
88
- if (opts.keepAlive) {
89
- tiptip_holder.hover(function () {}, function () {
90
- deactive_tiptip();
91
- });
92
- }
93
- } else if (opts.activation === "focus") {
94
- org_elem.focus(function () {
95
- active_tiptip();
96
- }).blur(function () {
97
- deactive_tiptip();
98
- });
99
- } else if (opts.activation === "click") {
100
- org_elem.click(function () {
101
- active_tiptip();
102
- return false;
103
- }).hover(function () {}, function () {
104
- if (!opts.keepAlive) {
105
- deactive_tiptip();
106
- }
107
- });
108
- if (opts.keepAlive) {
109
- tiptip_holder.hover(function () {}, function () {
110
- deactive_tiptip();
111
- });
112
- }
113
- }
114
-
115
- function active_tiptip() {
116
- opts.enter.call(this);
117
-
118
- tiptip_content.html('<h3 id="tiptip_title">' + org_title + '</h3>');
119
- tiptip_inner.html(org_desc);
120
- tiptip_content.append(tiptip_inner);
121
- tiptip_holder.hide().removeAttr("class").css("margin", "0");
122
- tiptip_arrow.removeAttr("style");
123
-
124
- var top = parseInt(org_elem.offset().top);
125
- if (org_elem.attr('id') === 'elefunds_logo') {
126
- top -= 8;
127
- }
128
-
129
- var left = parseInt(org_elem.offset().left),
130
- org_width = parseInt(org_elem.width()),
131
- org_height = parseInt(org_elem.height()),
132
- tip_w = tiptip_holder.width(),
133
- tip_h = tiptip_holder.height(),
134
- w_compare = Math.round((org_width - tip_w) / 2),
135
- h_compare = Math.round((org_height - tip_h) / 2),
136
- marg_left = Math.round(left + w_compare),
137
- marg_top = Math.round(top + org_height + opts.edgeOffset),
138
- t_class = "",
139
- arrow_top = "",
140
- arrow_left = Math.round(tip_w - 12) / 2;
141
-
142
- if (opts.defaultPosition === "bottom") {
143
- t_class = "_bottom";
144
- } else if (opts.defaultPosition === "top") {
145
- t_class = "_top";
146
- } else if (opts.defaultPosition === "left") {
147
- t_class = "_left";
148
- } else if (opts.defaultPosition === "right") {
149
- t_class = "_right";
150
- }
151
-
152
- var right_compare = (w_compare + left) < parseInt($(window).scrollLeft());
153
- var left_compare = (tip_w + left) > parseInt($(window).width());
154
-
155
- if((right_compare && w_compare < 0) || (t_class == "_right" && !left_compare) || (t_class == "_left" && left < (tip_w + opts.edgeOffset + 5))){
156
- t_class = "_right";
157
- arrow_top = Math.round(tip_h - 13) / 2;
158
- arrow_left = -12;
159
- marg_left = Math.round(left + org_width + opts.edgeOffset);
160
- marg_top = Math.round(top + h_compare);
161
- } else if((left_compare && w_compare < 0) || (t_class == "_left" && !right_compare)){
162
- t_class = "_left";
163
- arrow_top = Math.round(tip_h - 13) / 2;
164
- arrow_left = Math.round(tip_w);
165
- marg_left = Math.round(left - (tip_w + opts.edgeOffset + 5));
166
- marg_top = Math.round(top + h_compare);
167
- }
168
-
169
- var top_compare = (top + org_height + opts.edgeOffset + tip_h + 8) > parseInt($(window).height() + $(window).scrollTop()),
170
- bottom_compare = ((top + org_height) - (opts.edgeOffset + tip_h + 8)) < 0;
171
-
172
- if(top_compare || (t_class == "_bottom" && top_compare) || (t_class == "_top" && !bottom_compare)){
173
- if(t_class == "_top" || t_class == "_bottom"){
174
- t_class = "_top";
175
- } else {
176
- t_class = t_class+"_top";
177
- }
178
- arrow_top = tip_h;
179
- marg_top = Math.round(top - (tip_h + 5 + opts.edgeOffset));
180
- } else if(bottom_compare | (t_class == "_top" && bottom_compare) || (t_class == "_bottom" && !top_compare)){
181
- if(t_class == "_top" || t_class == "_bottom"){
182
- t_class = "_bottom";
183
- } else {
184
- t_class = t_class+"_bottom";
185
- }
186
- arrow_top = -12;
187
- marg_top = Math.round(top + org_height + opts.edgeOffset);
188
- }
189
-
190
- tiptip_arrow.css({"margin-left": arrow_left + "px", "margin-top": arrow_top + "px"});
191
- tiptip_holder.css({"margin-left": marg_left + "px", "margin-top": marg_top + "px"}).attr("class", "tip" + t_class);
192
-
193
- if (timeout) {
194
- clearTimeout(timeout);
195
- }
196
- timeout = setTimeout(function () {
197
- tiptip_holder.stop(true, true).fadeIn(opts.fadeIn);
198
- }, opts.delay);
199
- }
200
-
201
- function deactive_tiptip() {
202
- opts.exit.call(this);
203
- if (timeout) {
204
- clearTimeout(timeout);
205
- }
206
- tiptip_holder.fadeOut(opts.fadeOut);
207
- }
208
- }
209
- });
210
- };
211
- })(window.jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Elefunds/Template/Shop/View.phtml DELETED
@@ -1,92 +0,0 @@
1
- <div id="elefunds">
2
- <input type="hidden" id="elefunds_donation_cent" value="<?php echo $view['suggestedDonationAmountCent']; ?>" name="elefunds_donation_cent"/>
3
- <input type="hidden" id="<?php echo 'elefunds_suggested_round_up_cent'; ?>" name="<?php echo 'elefunds_suggested_round_up_cent'; ?>" value="<?php echo $view['suggestedDonationAmountCent'];?>"/>
4
- <div id="elefunds_top" style="width: <?php echo $view['actualShopWidth']; ?>px;">
5
- <img src="https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/<?php echo $view['theme'] ?>/elefunds_logo.png" id="elefunds_logo" class="tiptip" desc="<?php echo $view['elefundsDescription']; ?>" title="elefunds" />
6
- <div>
7
- <div id="elefunds_arrow">
8
- <input type="checkbox" id="elefunds_checkbox" name="elefunds_agree"/>
9
- <label for="elefunds_checkbox"><?php echo $view['slogan'];?></label>
10
- <span id="elefunds_arrow_end"></span>
11
- </div>
12
- <div id="elefunds_plus_minus">
13
- <a href="#" onclick="elefunds.decreaseDonation(); return false;" id="elefunds_decrease"><img src="https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/<?php echo $view['theme'] ?>/minus.png"></a> <a href="#" onclick="elefunds.increaseDonation(); return false;" id="elefunds_increase"><img src="https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/<?php echo $view['theme'] . '/' . $view['color'] ?>/plus.png"></a>
14
- </div>
15
- <div id="elefunds_input_container">
16
- <label id="elefunds_currency" for="elefunds_input"><?php echo $view['currency']; ?></label>
17
- <input type="text" id="elefunds_input" name="elefunds_round_up" onkeyup="elefunds.donationChange(this.value)" value="<?php echo $view['suggestedDonationAmount'];?>" />
18
- </div>
19
- </div>
20
- </div>
21
-
22
- <div id="elefunds_bottom" style="width: <?php echo $view['actualShopWidth']; ?>px;">
23
- <?php $numReceivers = count($view['receivers']); $i = 0; foreach ($view['receivers'] as $key => $receiver): ?>
24
- <input type="hidden" name="elefunds_receiver_name[]" value="<?php echo $receiver->getName(); ?>" />
25
- <div class="elefunds_receiver tiptip" desc="<?php echo $receiver->getDescription(); ?>" title="<?php echo $receiver->getName(); ?>">
26
- <input type="checkbox" id="<?php echo 'elefunds_receiver_' . $receiver->getId(TRUE); ?>" name="elefunds_receivers[]" value="<?php echo $receiver->getId(TRUE); ?>"/>
27
- <?php if(++$i !== $numReceivers) : ?>
28
- <label for="<?php echo 'elefunds_receiver_' . $receiver->getId(TRUE); ?>" style="padding: 12px <?php echo $view['paddingRight']; ?> 8px <?php echo $view['paddingLeft']; ?>;"><img src="<?php echo $receiver->getImage('horizontal', 'medium'); ?>" /></label>
29
- <?php else : ?>
30
- <label for="<?php echo 'elefunds_receiver_' . $receiver->getId(TRUE); ?>" style="padding: 12px <?php echo $view['paddingRightLast']; ?> 8px <?php echo $view['paddingLeftLast']; ?>;"><img src="<?php echo $receiver->getImage('horizontal', 'medium'); ?>" /></label>
31
- <?php endif; ?>
32
- </div>
33
- <?php endforeach; ?>
34
- </div>
35
-
36
- <div id="elefunds_below_container" style="width: <?php echo $view['actualShopWidth']; ?>px; display: none;">
37
- <?php if ($view['offerDonationReceipt']): ?>
38
- <div id="elefunds_receipt">
39
- <input type="checkbox" name="elefunds_receipt" id="elefunds_receipt_checkbox" /><label for="elefunds_receipt_checkbox"><?php echo $view['receipt_slogan'];?></label>
40
- </div>
41
- <?php endif; ?>
42
- <div id="elefunds_round_sum_container" class="elefunds_hidden">
43
- <strong><?php echo $view['roundedSumString']; ?></strong>
44
- <strong id="elefunds_round_sum"><?php echo $view['roundedSum'];?></strong>
45
- <strong><?php echo $view['currency']; ?></strong>
46
- </div>
47
- </div>
48
- </div>
49
-
50
- <script type="text/javascript">
51
- jQuery('<img src="https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/<?php echo $view['theme'] . '/' . $view['color'] ?>/arrow_on.png"/>');
52
- jQuery('<img src="https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/checkbox_on.png"/>');
53
- jQuery('<img src="https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receiver_on_bg.png"/>');
54
- jQuery('<img src="https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receipt_on.png"/>');
55
-
56
- var elefunds = (function(parent, $) {
57
- var options = {
58
- roundSumContainer: $('#<?php echo $view["roundSumContainer"]; ?>'),
59
- roundSum: $('#<?php echo $view["roundSum"]; ?>'),
60
- currency: '<?php echo $view["currency"]; ?>',
61
- decimal: '<?php echo $view["currencyDelimiter"]; ?>',
62
- decimalAlt: ',',
63
- total: <?php echo $view["total"]; ?>,
64
- toolTipPosition: '<?php echo $view["toolTipPosition"]; ?>'
65
- };
66
-
67
- if(options.decimal === options.decimalAlt) {
68
- options.decimalAlt = '.';
69
- }
70
-
71
- if(parent.hasOwnProperty('init')) {
72
- parent.init(options);
73
- }
74
-
75
- return {
76
- options: options,
77
-
78
- decreaseDonation: function() {
79
- return parent.decreaseDonation();
80
- },
81
-
82
- increaseDonation: function() {
83
- return parent.increaseDonation();
84
- },
85
-
86
- donationChange: function(floatValue) {
87
- return parent.donationChange(floatValue);
88
- }
89
- }
90
-
91
- }(window.elefunds || {}, jQuery));
92
- </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/Elefunds/Test/Unit/Configuration/BaseConfigurationTest.php DELETED
@@ -1,197 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * elefunds API PHP Library
5
- *
6
- * Copyright (c) 2012, elefunds GmbH <hello@elefunds.de>.
7
- * All rights reserved.
8
- *
9
- * Redistribution and use in source and binary forms, with or without
10
- * modification, are permitted provided that the following conditions
11
- * are met:
12
- *
13
- * * Redistributions of source code must retain the above copyright
14
- * notice, this list of conditions and the following disclaimer.
15
- *
16
- * * Redistributions in binary form must reproduce the above copyright
17
- * notice, this list of conditions and the following disclaimer in
18
- * the documentation and/or other materials provided with the
19
- * distribution.
20
- *
21
- * * Neither the name of the elefunds GmbH nor the names of its
22
- * contributors may be used to endorse or promote products derived
23
- * from this software without specific prior written permission.
24
- *
25
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
28
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
29
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
30
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
31
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
32
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
33
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
35
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36
- * POSSIBILITY OF SUCH DAMAGE.
37
- *
38
- */
39
-
40
- require_once dirname(__FILE__) . '/../../../Configuration/BaseConfiguration.php';
41
- require_once dirname(__FILE__) . '/../../../Communication/RestInterface.php';
42
- require_once dirname(__FILE__) . '/../../../View/ViewInterface.php';
43
-
44
- /**
45
- * Unit Test for Elefunds_Configuration_BaseConfiguration.
46
- *
47
- * @package elefunds API PHP Library
48
- * @subpackage Test
49
- * @author Christian Peters <christian@elefunds.de>
50
- * @copyright 2012 elefunds GmbH <hello@elefunds.de>
51
- * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
52
- * @link http://www.elefunds.de
53
- * @since File available since Release 1.0.0
54
- */
55
- class Elefunds_Test_Unit_Configuration_BaseConfigurationTest extends PHPUnit_Framework_TestCase {
56
-
57
- protected $baseConfiguration;
58
-
59
- /**
60
- * setClientCalculatesHashedKeyIfApiKeyIsAlreadySetAndGettersForClientIdAndHashedKeyAreWorking
61
- *
62
- * @test
63
- */
64
- public function setClientCalculatesHashedKeyIfApiKeyIsAlreadySetAndGettersForClientIdAndHashedKeyAreWorking() {
65
- $this->baseConfiguration = new Elefunds_Configuration_BaseConfiguration();
66
- $this->baseConfiguration->setApiKey('asdfaAdf123ddddddddd');
67
- $this->baseConfiguration->setClientId(1234);
68
-
69
- $this->assertSame(1234, $this->baseConfiguration->getClientId());
70
- $this->assertSame('3382a100edcb335c6af4efc1d5fb37b4ec264553', $this->baseConfiguration->getHashedKey());
71
- }
72
-
73
-
74
- /**
75
- * setApiKeyCalculatesHashedKeyIfClientIdIsAlreadySet
76
- *
77
- * @test
78
- */
79
- public function setApiKeyCalculatesHashedKeyIfClientIdIsAlreadySet() {
80
- $this->baseConfiguration = new Elefunds_Configuration_BaseConfiguration();
81
-
82
- $this->baseConfiguration->setClientId(1234);
83
- $this->baseConfiguration->setApiKey('asdfaAdf123ddddddddd');
84
-
85
- $this->assertSame('3382a100edcb335c6af4efc1d5fb37b4ec264553', $this->baseConfiguration->getHashedKey());
86
- }
87
-
88
- /**
89
- * getHashedKeyThrowsErrorIfNotClientIdAndApiKeyAreSet
90
- *
91
- * @test
92
- * @expectedException Elefunds_Exception_ElefundsException
93
- */
94
- public function getHashedKeyThrowsErrorIfNotClientIdAndApiKeyAreSet() {
95
- $this->baseConfiguration = new Elefunds_Configuration_BaseConfiguration();
96
- $this->baseConfiguration->getHashedKey();
97
-
98
- }
99
-
100
- /**
101
- * Tests if the view can be set.
102
- *
103
- * @test
104
- */
105
- public function setViewWorks() {
106
- $this->baseConfiguration = new Elefunds_Configuration_BaseConfiguration();
107
- $view = $this->getMock('Elefunds_View_ViewInterface');
108
-
109
- $this->baseConfiguration->setView($view);
110
- $this->assertSame($view, $this->baseConfiguration->getView());
111
- }
112
-
113
- /**
114
- * setRestImplementationWorks
115
- *
116
- * @test
117
- */
118
- public function setRestImplementationWorks() {
119
- $this->baseConfiguration = new Elefunds_Configuration_BaseConfiguration();
120
- $rest = $this->getMock('Elefunds_Communication_RestInterface');
121
-
122
- $this->baseConfiguration->setRestImplementation($rest);
123
- $this->assertSame($rest, $this->baseConfiguration->getRestImplementation());
124
- }
125
-
126
- /**
127
- * setDonationClassNameAcceptsOnlyLoadedClasses
128
- *
129
- * @test
130
- */
131
- public function setDonationClassNameAcceptsOnlyLoadedClasses() {
132
- $this->baseConfiguration = new Elefunds_Configuration_BaseConfiguration();
133
-
134
- // Interface reqs are tested by the factory, so we can pass any class here.
135
- $this->baseConfiguration->setDonationClassName('Elefunds_Test_Unit_Configuration_BaseConfigurationTest');
136
- $this->assertSame('Elefunds_Test_Unit_Configuration_BaseConfigurationTest', $this->baseConfiguration->getDonationClassName());
137
- }
138
-
139
- /**
140
- * setDonationClassNameThrowsErrorIfClassIsNotLoaded
141
- *
142
- * @test
143
- * @expectedException Elefunds_Exception_ElefundsException
144
- */
145
- public function setDonationClassNameThrowsErrorIfClassIsNotLoaded() {
146
- $this->baseConfiguration = new Elefunds_Configuration_BaseConfiguration();
147
- $this->baseConfiguration->setDonationClassName('Some_Made_Up_ClassName');
148
- }
149
-
150
- /**
151
- * setReceiverClassNameAcceptsOnlyLoadedClasses
152
- *
153
- * @test
154
- */
155
- public function setReceiverClassNameAcceptsOnlyLoadedClasses() {
156
- $this->baseConfiguration = new Elefunds_Configuration_BaseConfiguration();
157
-
158
- // Interface reqs are tested by the factory, so we can pass any class here.
159
- $this->baseConfiguration->setReceiverClassName('Elefunds_Test_Unit_Configuration_BaseConfigurationTest');
160
- $this->assertSame('Elefunds_Test_Unit_Configuration_BaseConfigurationTest', $this->baseConfiguration->getReceiverClassName());
161
- }
162
-
163
- /**
164
- * setReceiverClassNameThrowsErrorIfClassIsNotLoaded
165
- *
166
- * @test
167
- * @expectedException Elefunds_Exception_ElefundsException
168
- */
169
- public function setReceiverClassNameThrowsErrorIfClassIsNotLoaded() {
170
- $this->baseConfiguration = new Elefunds_Configuration_BaseConfiguration();
171
- $this->baseConfiguration->setReceiverClassName('Some_Made_Up_ClassName');
172
- }
173
-
174
- /**
175
- * setCountrycodeAcceptsCountrycodeAsString
176
- *
177
- * @test
178
- */
179
- public function setCountrycodeAcceptsCountrycodeAsString() {
180
- $this->baseConfiguration = new Elefunds_Configuration_BaseConfiguration();
181
- $this->baseConfiguration->setCountrycode('de');
182
- $this->assertSame('de', $this->baseConfiguration->getCountrycode());
183
- }
184
-
185
- /**
186
- * setLanguageThrowsErrorIfGivenParamIsNotACountrycode
187
- *
188
- * @test
189
- * @expectedException InvalidArgumentException
190
- */
191
- public function setLanguageThrowsErrorIfGivenParamIsNotACountrycode() {
192
- $this->baseConfiguration = new Elefunds_Configuration_BaseConfiguration();
193
- $this->baseConfiguration->setCountrycode('This is not a countrycode.');
194
- }
195
-
196
-
197
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/{Elefunds → Lfnds}/Communication/CurlRequest.php RENAMED
@@ -3,7 +3,7 @@
3
  /**
4
  * elefunds API PHP Library
5
  *
6
- * Copyright (c) 2012, elefunds GmbH <hello@elefunds.de>.
7
  * All rights reserved.
8
  *
9
  * Redistribution and use in source and binary forms, with or without
@@ -37,6 +37,10 @@
37
  *
38
  */
39
 
 
 
 
 
40
  require_once 'RestInterface.php';
41
 
42
  /**
@@ -49,12 +53,12 @@ require_once 'RestInterface.php';
49
  * @package elefunds API PHP Library
50
  * @subpackage Communication
51
  * @author Christian Peters <christian@elefunds.de>
52
- * @copyright 2012 elefunds GmbH <hello@elefunds.de>
53
  * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
54
  * @link http://www.elefunds.de
55
  * @since File available since Release 1.0.0
56
  */
57
- class Elefunds_Communication_CurlRequest implements Elefunds_Communication_RestInterface {
58
 
59
  /**
60
  * @var resource
@@ -69,11 +73,11 @@ class Elefunds_Communication_CurlRequest implements Elefunds_Communication_RestI
69
  /**
70
  * Initializes curl - if the extension is installed.
71
  *
72
- * @throws Elefunds_Exception_ElefundsException if curl is not installed
73
  */
74
  public function __construct() {
75
  if (!extension_loaded('curl')) {
76
- throw new Elefunds_Exception_ElefundsException(
77
  'You are using the curl request method without having curl installed on your server.
78
  Your options are to either use another implementation of the RestInterface or to install curl.',
79
  1347875278);
@@ -88,7 +92,7 @@ class Elefunds_Communication_CurlRequest implements Elefunds_Communication_RestI
88
  * Performs a GET Request against a given URL.
89
  *
90
  * @param string $restUrl with fully qualified resource path
91
- * @throws Elefunds_Exception_ElefundsCommunicationException if connection or authentication fails or retrieved http code is not 200
92
  * @return string the server response as JSON
93
  */
94
  public function get($restUrl) {
@@ -104,7 +108,7 @@ class Elefunds_Communication_CurlRequest implements Elefunds_Communication_RestI
104
  *
105
  * @param string $restUrl with fully qualified resource path
106
  * @param string $body the JSON body
107
- * @throws Elefunds_Exception_ElefundsCommunicationException if connection or authentication fails or retrieved http code is not 200
108
  * @return string the server response as JSON
109
  */
110
  public function post($restUrl, $body) {
@@ -118,11 +122,11 @@ class Elefunds_Communication_CurlRequest implements Elefunds_Communication_RestI
118
  }
119
 
120
  /**
121
- * Performs a DELETE Request against a given URL.
122
  *
123
  * @param string $restUrl with fully qualified resource path
124
  * @param string $body the JSON body
125
- * @throws Elefunds_Exception_ElefundsCommunicationException if connection or authentication fails or retrieved http code is not 200
126
  * @return string the server response as JSON
127
  */
128
  public function put($restUrl, $body = '') {
@@ -143,7 +147,7 @@ class Elefunds_Communication_CurlRequest implements Elefunds_Communication_RestI
143
  * Performs a DELETE Request against a given URL.
144
  *
145
  * @param string $restUrl with fully qualified resource path
146
- * @throws Elefunds_Exception_ElefundsCommunicationException if connection or authentication fails or retrieved http code is not 200
147
  * @return string the server response as JSON
148
  */
149
  public function delete($restUrl) {
@@ -156,13 +160,17 @@ class Elefunds_Communication_CurlRequest implements Elefunds_Communication_RestI
156
  /**
157
  * Performs the actual curl request.
158
  *
159
- * @throws Elefunds_Exception_ElefundsCommunicationException if connection or authentication fails or retrieved http code is not 200
 
160
  * @return string the server response as JSON
161
  */
162
  protected function performRequest() {
163
  $this->curlOptions[CURLOPT_RETURNTRANSFER] = TRUE;
164
- $this->curlOptions[CURLOPT_USERAGENT] = 'elefunds-php-1.1';
165
- $this->curlOptions[CURLOPT_CAINFO] = dirname(__FILE__) . '/certificate/GandiProSSLCA.pem';
 
 
 
166
 
167
  curl_setopt_array($this->curl, $this->curlOptions);
168
 
@@ -170,7 +178,7 @@ class Elefunds_Communication_CurlRequest implements Elefunds_Communication_RestI
170
 
171
  if ($serverResponse === FALSE) {
172
 
173
- throw new Elefunds_Exception_ElefundsCommunicationException(
174
  'Unable to connect to the elefunds API',
175
  1347878604,
176
  array(
@@ -183,7 +191,7 @@ class Elefunds_Communication_CurlRequest implements Elefunds_Communication_RestI
183
  $httpResponseCode = curl_getinfo($this->curl, CURLINFO_HTTP_CODE);
184
 
185
  if ($httpResponseCode !== 200) {
186
- throw new Elefunds_Exception_ElefundsCommunicationException(
187
  'An error occurred during the api call. Refer to additionalInformation of this exception for more details.',
188
  1347899756668,
189
  array(
@@ -199,4 +207,14 @@ class Elefunds_Communication_CurlRequest implements Elefunds_Communication_RestI
199
  return $serverResponse;
200
  }
201
 
 
 
 
 
 
 
 
 
 
 
202
  }
3
  /**
4
  * elefunds API PHP Library
5
  *
6
+ * Copyright (c) 2012 - 2013, elefunds GmbH <hello@elefunds.de>.
7
  * All rights reserved.
8
  *
9
  * Redistribution and use in source and binary forms, with or without
37
  *
38
  */
39
 
40
+ namespace Lfnds\Communication;
41
+ use Lfnds\Exception\ElefundsCommunicationException;
42
+ use Lfnds\Exception\ElefundsException;
43
+
44
  require_once 'RestInterface.php';
45
 
46
  /**
53
  * @package elefunds API PHP Library
54
  * @subpackage Communication
55
  * @author Christian Peters <christian@elefunds.de>
56
+ * @copyright 2012 - 2013 elefunds GmbH <hello@elefunds.de>
57
  * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
58
  * @link http://www.elefunds.de
59
  * @since File available since Release 1.0.0
60
  */
61
+ class CurlRequest implements RestInterface {
62
 
63
  /**
64
  * @var resource
73
  /**
74
  * Initializes curl - if the extension is installed.
75
  *
76
+ * @throws ElefundsException if curl is not installed
77
  */
78
  public function __construct() {
79
  if (!extension_loaded('curl')) {
80
+ throw new ElefundsException(
81
  'You are using the curl request method without having curl installed on your server.
82
  Your options are to either use another implementation of the RestInterface or to install curl.',
83
  1347875278);
92
  * Performs a GET Request against a given URL.
93
  *
94
  * @param string $restUrl with fully qualified resource path
95
+ * @throws ElefundsCommunicationException if connection or authentication fails or retrieved http code is not 200
96
  * @return string the server response as JSON
97
  */
98
  public function get($restUrl) {
108
  *
109
  * @param string $restUrl with fully qualified resource path
110
  * @param string $body the JSON body
111
+ * @throws ElefundsCommunicationException if connection or authentication fails or retrieved http code is not 200
112
  * @return string the server response as JSON
113
  */
114
  public function post($restUrl, $body) {
122
  }
123
 
124
  /**
125
+ * Performs a PUT Request against a given URL.
126
  *
127
  * @param string $restUrl with fully qualified resource path
128
  * @param string $body the JSON body
129
+ * @throws ElefundsCommunicationException if connection or authentication fails or retrieved http code is not 200
130
  * @return string the server response as JSON
131
  */
132
  public function put($restUrl, $body = '') {
147
  * Performs a DELETE Request against a given URL.
148
  *
149
  * @param string $restUrl with fully qualified resource path
150
+ * @throws ElefundsCommunicationException if connection or authentication fails or retrieved http code is not 200
151
  * @return string the server response as JSON
152
  */
153
  public function delete($restUrl) {
160
  /**
161
  * Performs the actual curl request.
162
  *
163
+ *
164
+ * @throws \Lfnds\Exception\ElefundsCommunicationException
165
  * @return string the server response as JSON
166
  */
167
  protected function performRequest() {
168
  $this->curlOptions[CURLOPT_RETURNTRANSFER] = TRUE;
169
+
170
+ if (!isset($this->curlOptions[CURLOPT_USERAGENT])) {
171
+ $this->curlOptions[CURLOPT_USERAGENT] = 'elefunds-php';
172
+ }
173
+ $this->curlOptions[CURLOPT_CAINFO] = __DIR__ . '/certificate/GandiProSSLCA.pem';
174
 
175
  curl_setopt_array($this->curl, $this->curlOptions);
176
 
178
 
179
  if ($serverResponse === FALSE) {
180
 
181
+ throw new ElefundsCommunicationException(
182
  'Unable to connect to the elefunds API',
183
  1347878604,
184
  array(
191
  $httpResponseCode = curl_getinfo($this->curl, CURLINFO_HTTP_CODE);
192
 
193
  if ($httpResponseCode !== 200) {
194
+ throw new ElefundsCommunicationException(
195
  'An error occurred during the api call. Refer to additionalInformation of this exception for more details.',
196
  1347899756668,
197
  array(
207
  return $serverResponse;
208
  }
209
 
210
+ /**
211
+ * Sets the user-agent that identifies the request.
212
+ *
213
+ * @param string $agent
214
+ * @return $this
215
+ */
216
+ public function setUserAgent($agent)
217
+ {
218
+ $this->curlOptions[CURLOPT_USERAGENT] = $agent;
219
+ }
220
  }
lib/Lfnds/Communication/README.md ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ elefunds API SDK v2.0.0
2
+ =======================
3
+
4
+ Welcome to the elefunds API SDK.
5
+
6
+ Be sure to checkout the the [Getting Started Guide](https://github.com/elefunds/elefunds-SDK/blob/master/Documentation/GettingStarted.md)
7
+ for a general introduction to the elefunds API, before moving on to the language of your choice.
8
+
9
+ The API itself is (naturally) language agnostic, but the SDKs are a great help and timesaver!
10
+
11
+ We have additional resources, that can drastically reduce the amount of work you have to do when implementing:
12
+
13
+ - a JavaScript SDK that takes care of a great amount of logic for various scenarios and that is useful for all kind of
14
+ browser-based use cases
15
+
16
+ - a PHP SDK that wrap most of the logic for backend processes and provides helper classes for logic that needs to be
17
+ implemented from your side. The PHP SDK itself uses the JavaScript SDK.
18
+
19
+ Best,
20
+ the elefunds team
21
+
22
+
23
+ Dive in
24
+ -------
25
+
26
+ [Getting Started](https://github.com/elefunds/elefunds-SDK/blob/master/Documentation/GettingStarted.md)
27
+
28
+ [Information for online retailers](https://github.com/elefunds/elefunds-SDK/blob/master/Documentation/InformationForOnlineRetailers.md)
29
+
30
+ [API Reference](https://github.com/elefunds/elefunds-SDK/blob/master/Documentation/APIReference.md)
31
+
32
+ [Social Media Share](https://github.com/elefunds/elefunds-SDK/blob/master/Documentation/SocialMediaShare.md)
33
+
34
+ Javascript SDK
35
+ --------------
36
+
37
+ [ROLAND]
38
+
39
+
40
+ PHP SDK
41
+ -------
42
+
43
+ [Basics](https://github.com/elefunds/elefunds-SDK/blob/master/PHP/Documentation/PHPGuideBasics.md)
44
+
45
+ [Configuration](https://github.com/elefunds/elefunds-SDK/blob/master/PHP/Documentation/PHPGuideConfiguration.md)
46
+
47
+ [Templating](https://github.com/elefunds/elefunds-SDK/blob/master/PHP/Documentation/PHPGuideTemplating.md)
48
+
49
+
50
+ License
51
+ -------
52
+
53
+ The elefunds API SDK is licensed under the [New BSD license](https://github.com/elefunds/elefunds-SDK/blob/master/LICENSE).
lib/{Elefunds → Lfnds}/Communication/RestInterface.php RENAMED
@@ -3,7 +3,7 @@
3
  /**
4
  * elefunds API PHP Library
5
  *
6
- * Copyright (c) 2012, elefunds GmbH <hello@elefunds.de>.
7
  * All rights reserved.
8
  *
9
  * Redistribution and use in source and binary forms, with or without
@@ -37,7 +37,11 @@
37
  *
38
  */
39
 
40
- require_once dirname(__FILE__) . '/../Exception/ElefundsCommunicationException.php';
 
 
 
 
41
 
42
  /**
43
  * Rest Interface
@@ -48,18 +52,26 @@ require_once dirname(__FILE__) . '/../Exception/ElefundsCommunicationException.p
48
  * @package elefunds API PHP Library
49
  * @subpackage Communication
50
  * @author Christian Peters <christian@elefunds.de>
51
- * @copyright 2012 elefunds GmbH <hello@elefunds.de>
52
  * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
53
  * @link http://www.elefunds.de
54
  * @since File available since Release 1.0.0
55
  */
56
- interface Elefunds_Communication_RestInterface {
 
 
 
 
 
 
 
 
57
 
58
  /**
59
  * Performs a GET Request against a given URL.
60
  *
61
  * @param string $restUrl with fully qualified resource path
62
- * @throws Elefunds_Exception_ElefundsCommunicationException if connection or authentication fails or retrieved http code is not 200
63
  * @return string the server response as JSON
64
  */
65
  public function get($restUrl);
@@ -69,7 +81,7 @@ interface Elefunds_Communication_RestInterface {
69
  *
70
  * @param string $restUrl with fully qualified resource path
71
  * @param string $body the JSON body
72
- * @throws Elefunds_Exception_ElefundsCommunicationException if connection or authentication fails or retrieved http code is not 200
73
  * @return string the server response as JSON
74
  */
75
  public function post($restUrl, $body);
@@ -79,7 +91,7 @@ interface Elefunds_Communication_RestInterface {
79
  *
80
  * @param string $restUrl with fully qualified resource path
81
  * @param string $body the JSON body
82
- * @throws Elefunds_Exception_ElefundsCommunicationException if connection or authentication fails or retrieved http code is not 200
83
  * @return string the server response as JSON
84
  */
85
  public function put($restUrl, $body = '');
@@ -88,7 +100,7 @@ interface Elefunds_Communication_RestInterface {
88
  * Performs a DELETE Request against a given URL.
89
  *
90
  * @param string $restUrl with fully qualified resource path
91
- * @throws Elefunds_Exception_ElefundsCommunicationException if connection or authentication fails or retrieved http code is not 200
92
  * @return string the server response as JSON
93
  */
94
  public function delete($restUrl);
3
  /**
4
  * elefunds API PHP Library
5
  *
6
+ * Copyright (c) 2012 - 2013, elefunds GmbH <hello@elefunds.de>.
7
  * All rights reserved.
8
  *
9
  * Redistribution and use in source and binary forms, with or without
37
  *
38
  */
39
 
40
+ namespace Lfnds\Communication;
41
+
42
+ use Lfnds\Exception\ElefundsCommunicationException;
43
+
44
+ require_once __DIR__ . '/../Exception/ElefundsCommunicationException.php';
45
 
46
  /**
47
  * Rest Interface
52
  * @package elefunds API PHP Library
53
  * @subpackage Communication
54
  * @author Christian Peters <christian@elefunds.de>
55
+ * @copyright 2012 - 2013 elefunds GmbH <hello@elefunds.de>
56
  * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
57
  * @link http://www.elefunds.de
58
  * @since File available since Release 1.0.0
59
  */
60
+ interface RestInterface {
61
+
62
+ /**
63
+ * Sets the user-agent that identifies the request.
64
+ *
65
+ * @param string $agent
66
+ * @return $this
67
+ */
68
+ public function setUserAgent($agent);
69
 
70
  /**
71
  * Performs a GET Request against a given URL.
72
  *
73
  * @param string $restUrl with fully qualified resource path
74
+ * @throws ElefundsCommunicationException if connection or authentication fails or retrieved http code is not 200
75
  * @return string the server response as JSON
76
  */
77
  public function get($restUrl);
81
  *
82
  * @param string $restUrl with fully qualified resource path
83
  * @param string $body the JSON body
84
+ * @throws ElefundsCommunicationException if connection or authentication fails or retrieved http code is not 200
85
  * @return string the server response as JSON
86
  */
87
  public function post($restUrl, $body);
91
  *
92
  * @param string $restUrl with fully qualified resource path
93
  * @param string $body the JSON body
94
+ * @throws ElefundsCommunicationException if connection or authentication fails or retrieved http code is not 200
95
  * @return string the server response as JSON
96
  */
97
  public function put($restUrl, $body = '');
100
  * Performs a DELETE Request against a given URL.
101
  *
102
  * @param string $restUrl with fully qualified resource path
103
+ * @throws ElefundsCommunicationException if connection or authentication fails or retrieved http code is not 200
104
  * @return string the server response as JSON
105
  */
106
  public function delete($restUrl);
lib/{Elefunds → Lfnds}/Communication/certificate/GandiProSSLCA.pem RENAMED
File without changes
lib/Lfnds/Configuration/BaseConfiguration.php ADDED
@@ -0,0 +1,368 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * elefunds API PHP Library
5
+ *
6
+ * Copyright (c) 2012 - 2013, elefunds GmbH <hello@elefunds.de>.
7
+ * All rights reserved.
8
+ *
9
+ * Redistribution and use in source and binary forms, with or without
10
+ * modification, are permitted provided that the following conditions
11
+ * are met:
12
+ *
13
+ * * Redistributions of source code must retain the above copyright
14
+ * notice, this list of conditions and the following disclaimer.
15
+ *
16
+ * * Redistributions in binary form must reproduce the above copyright
17
+ * notice, this list of conditions and the following disclaimer in
18
+ * the documentation and/or other materials provided with the
19
+ * distribution.
20
+ *
21
+ * * Neither the name of the elefunds GmbH nor the names of its
22
+ * contributors may be used to endorse or promote products derived
23
+ * from this software without specific prior written permission.
24
+ *
25
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
28
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
29
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
30
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
31
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
32
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
33
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
35
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36
+ * POSSIBILITY OF SUCH DAMAGE.
37
+ *
38
+ */
39
+
40
+ namespace Lfnds\Configuration;
41
+
42
+ use InvalidArgumentException;
43
+ use Lfnds\Communication\RestInterface;
44
+ use Lfnds\Exception\ElefundsException;
45
+ use Lfnds\Facade;
46
+ use Lfnds\FacadeInterface;
47
+ use Lfnds\Model\Factory as ModelFactory;
48
+ use Lfnds\View\ViewInterface;
49
+
50
+ require_once 'ConfigurationInterface.php';
51
+ require_once __DIR__ . '/../Exception/ElefundsException.php';
52
+
53
+
54
+ /**
55
+ * Base Configuration for the elefunds API.
56
+ *
57
+ * @package elefunds API PHP Library
58
+ * @subpackage Configuration
59
+ * @author Christian Peters <christian@elefunds.de>
60
+ * @copyright 2012 - 2013 elefunds GmbH <hello@elefunds.de>
61
+ * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
62
+ * @link http://www.elefunds.de
63
+ * @since File available since Release 1.0.0
64
+ */
65
+ class BaseConfiguration implements ConfigurationInterface {
66
+
67
+ /**
68
+ * @var array
69
+ */
70
+ protected $availableShareServices = array();
71
+
72
+ /**
73
+ * @var int
74
+ */
75
+ protected $clientId;
76
+
77
+ /**
78
+ * @var string
79
+ */
80
+ protected $apiKey;
81
+
82
+ /**
83
+ * The calculated hashedKey that is a sha1 value of
84
+ * the clientId concatenated with the api key.
85
+ *
86
+ * @var string
87
+ */
88
+ protected $hashedKey;
89
+
90
+ /**
91
+ * @var RestInterface
92
+ */
93
+ protected $rest;
94
+
95
+ /**
96
+ * @var string
97
+ */
98
+ protected $apiUrl;
99
+
100
+ /**
101
+ * Class name of the donation implementation.
102
+ *
103
+ * @var string
104
+ */
105
+ protected $donationClassName;
106
+
107
+ /**
108
+ * Class name of the receiver implementation.
109
+ *
110
+ * @var string
111
+ */
112
+ protected $receiverClassName;
113
+
114
+ /**
115
+ * Two digit countrycode to use for calls.
116
+ *
117
+ * @var string
118
+ */
119
+ protected $countrycode = 'en';
120
+
121
+ /**
122
+ * Instance of the facade.
123
+ *
124
+ * @var Facade
125
+ */
126
+ protected $facade;
127
+
128
+ /**
129
+ * @var ViewInterface
130
+ */
131
+ protected $view;
132
+
133
+ /**
134
+ * Setup configuration of an elefunds API Plugin.
135
+ *
136
+ * This function gets called after forwarding the configuration to the facade.
137
+ *
138
+ * @return void
139
+ */
140
+ public function init() {}
141
+
142
+ /**
143
+ * An instance of the facade. This is set by the facade itself, so you can access API functionality
144
+ * from within init()!
145
+ *
146
+ * @param FacadeInterface $facade
147
+ * @return ConfigurationInterface
148
+ */
149
+ public function setFacade(FacadeInterface $facade) {
150
+ $this->facade = $facade;
151
+ return $this;
152
+ }
153
+
154
+ /**
155
+ * Sets the view for this configuration.
156
+ *
157
+ * @param ViewInterface $view
158
+ * @return ConfigurationInterface
159
+ */
160
+ public function setView(ViewInterface $view) {
161
+ $this->view = $view;
162
+ return $this;
163
+ }
164
+
165
+ /**
166
+ * Returns the view that is configured for this configuration.
167
+ *
168
+ * @return ViewInterface
169
+ */
170
+ public function getView() {
171
+ return $this->view;
172
+ }
173
+
174
+ /**
175
+ * Sets the clientId.
176
+ *
177
+ * @param int $clientId
178
+ * @return ConfigurationInterface
179
+ */
180
+ public function setClientId($clientId) {
181
+ $this->clientId = (int)$clientId;
182
+ if ($this->apiKey !== NULL && $this->hashedKey === NULL) {
183
+ $this->hashedKey = sha1($this->clientId . $this->apiKey);
184
+ }
185
+
186
+ return $this;
187
+ }
188
+
189
+ /**
190
+ * Sets the apiKey.
191
+ *
192
+ * @param string $apiKey
193
+ * @return ConfigurationInterface
194
+ */
195
+ public function setApiKey($apiKey) {
196
+ $this->apiKey = (string)$apiKey;
197
+ if ($this->clientId !== NULL && $this->hashedKey === NULL) {
198
+ $this->hashedKey = sha1($this->clientId . $this->apiKey);
199
+ }
200
+
201
+ return $this;
202
+ }
203
+
204
+ /**
205
+ * Returns the ClientId.
206
+ *
207
+ * @return int
208
+ */
209
+ public function getClientId() {
210
+ return $this->clientId;
211
+ }
212
+
213
+ /**
214
+ * The API Url.
215
+ *
216
+ * Url is not validated here, as it's dependent on the RestInterface Implementation. For example
217
+ * the curl implementation adds it's error message to the additionalInformation of the ElefundsException.
218
+ *
219
+ * @param string $url
220
+ * @return ConfigurationInterface
221
+ */
222
+ public function setApiUrl($url) {
223
+ $this->apiUrl = rtrim((string)$url, '/');
224
+ return $this;
225
+ }
226
+
227
+ /**
228
+ * Returns the URL to the API without trailing slashes.
229
+ *
230
+ * @return string
231
+ */
232
+ public function getApiUrl() {
233
+ return $this->apiUrl;
234
+ }
235
+
236
+ /**
237
+ * Returns the hashed key
238
+ *
239
+ * @throws ElefundsException if hashedKey has not been calculated
240
+ * @return string
241
+ */
242
+ public function getHashedKey() {
243
+ if ($this->hashedKey === NULL) {
244
+ if ($this->apiKey === NULL || $this->clientId === NULL) {
245
+ throw new ElefundsException('HashedKey could not been calculated. Make sure that either clientId and apiKey are set.', 1347889008107);
246
+ } else {
247
+ $this->hashedKey = sha1($this->clientId . $this->apiKey);
248
+ }
249
+ }
250
+ return $this->hashedKey;
251
+ }
252
+
253
+ /**
254
+ * The rest implementation to be used to connect to the api.
255
+ *
256
+ * If not changed in the configuration, this will be curl.
257
+ *
258
+ * @param RestInterface $rest
259
+ * @return ConfigurationInterface
260
+ */
261
+ public function setRestImplementation(RestInterface $rest) {
262
+ $this->rest = $rest;
263
+ return $this;
264
+ }
265
+
266
+ /**
267
+ * Returns the rest implementation to use, by default, it's curl.
268
+ *
269
+ * @return RestInterface
270
+ */
271
+ public function getRestImplementation() {
272
+ return $this->rest;
273
+ }
274
+
275
+ /**
276
+ * Sets the donation class name a fully qualified string.
277
+ *
278
+ * Attention: Since we do not use autoloading, you have to require_once the class before
279
+ * setting it.
280
+ *
281
+ * @param string $donationClassName
282
+ * @throws ElefundsException if given class does not exist
283
+ * @return ConfigurationInterface
284
+ */
285
+ public function setDonationClassName($donationClassName) {
286
+ if (!class_exists($donationClassName)) {
287
+ throw new ElefundsException('Class ' . $donationClassName . ' does not exist. Did you called required_once on the file that hosts this class?', 1347893442819);
288
+ }
289
+ $this->donationClassName = (string)$donationClassName;
290
+ ModelFactory::setDonationImplementation($this->donationClassName);
291
+ return $this;
292
+ }
293
+
294
+ /**
295
+ * Returns the donation class name.
296
+ *
297
+ * @return string
298
+ */
299
+ public function getDonationClassName() {
300
+ return $this->donationClassName;
301
+ }
302
+
303
+ /**
304
+ * Sets the receiver class name a fully qualified string.
305
+ *
306
+ * Attention: Since we do not use auto-loading, you have to require_once the class before
307
+ * setting it.
308
+ *
309
+ * @param string $receiverClassName
310
+ * @throws ElefundsException if given class does not exist
311
+ * @return ConfigurationInterface
312
+ */
313
+ public function setReceiverClassName($receiverClassName) {
314
+ if (!class_exists($receiverClassName)) {
315
+ throw new ElefundsException('Class ' . $receiverClassName . ' does not exist. Did you called required_once on the file that hosts this class?', 1347893442820);
316
+ }
317
+ $this->receiverClassName = (string)$receiverClassName;
318
+ ModelFactory::setReceiverImplementation($this->receiverClassName);
319
+ return $this;
320
+ }
321
+
322
+ /**
323
+ * Returns the receiver class name.
324
+ *
325
+ * @return string
326
+ */
327
+ public function getReceiverClassName() {
328
+ return $this->receiverClassName;
329
+ }
330
+
331
+ /**
332
+ * Sets the countrycode.
333
+ *
334
+ * @param string $countrycode two digit countrycode
335
+ * @throws InvalidArgumentException if given string is not a countrycode
336
+ * @return ConfigurationInterface
337
+ */
338
+ public function setCountrycode($countrycode) {
339
+ if (is_string($countrycode) && strlen($countrycode) === 2) {
340
+ $this->countrycode = $countrycode;
341
+ } else {
342
+ throw new InvalidArgumentException('Given countrycode must be a two digit string.', 1347965897);
343
+ }
344
+ return $this;
345
+ }
346
+
347
+ /**
348
+ * Returns the countrycode.
349
+ *
350
+ * @return string
351
+ */
352
+ public function getCountrycode() {
353
+ return $this->countrycode;
354
+ }
355
+
356
+ /**
357
+ * Sets the version identifier and the module in use.
358
+ *
359
+ * @param string $version of type x.x.x (2.0.0)
360
+ * @param string $module a module identifier (e.g. elefunds-sdk or elefunds-magento)
361
+ * @return $this
362
+ */
363
+ public function setVersionAndModuleIdentifier($version = ConfigurationInterface::ELEFUNDS_SDK_VERSION, $module = 'elefunds-sdk')
364
+ {
365
+ $this->getRestImplementation()->setUserAgent(sprintf('%s v%s', $module, $version));
366
+ return $this;
367
+ }
368
+ }
lib/{Elefunds → Lfnds}/Configuration/ConfigurationInterface.php RENAMED
@@ -3,7 +3,7 @@
3
  /**
4
  * elefunds API PHP Library
5
  *
6
- * Copyright (c) 2012, elefunds GmbH <hello@elefunds.de>.
7
  * All rights reserved.
8
  *
9
  * Redistribution and use in source and binary forms, with or without
@@ -37,18 +37,29 @@
37
  *
38
  */
39
 
 
 
 
 
 
 
 
 
40
  /**
41
  * Elefunds Configuration Interface
42
  *
43
  * @package elefunds API PHP Library
44
  * @subpackage Configuration
45
  * @author Christian Peters <christian@elefunds.de>
46
- * @copyright 2012 elefunds GmbH <hello@elefunds.de>
47
  * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
48
  * @link http://www.elefunds.de
49
  * @since File available since Release 1.0.0
50
  */
51
- interface Elefunds_Configuration_ConfigurationInterface {
 
 
 
52
 
53
  /**
54
  * Setup configuration of an elefunds API Plugin.
@@ -64,24 +75,24 @@ interface Elefunds_Configuration_ConfigurationInterface {
64
  * An instance of the facade. This is set by the facade itself, so you can access API functionality
65
  * from within init()!
66
  *
67
- * @param Elefunds_Facade $facade
68
- * @return Elefunds_Configuration_ConfigurationInterface
69
  *
70
  */
71
- public function setFacade(Elefunds_Facade $facade);
72
 
73
  /**
74
  * Sets the view for this configuration.
75
  *
76
- * @param Elefunds_View_ViewInterface $view
77
- * @return Elefunds_Configuration_ConfigurationInterface
78
  */
79
- public function setView(Elefunds_View_ViewInterface $view);
80
 
81
  /**
82
  * Returns the view that is configured for this configuration.
83
  *
84
- * @return Elefunds_View_ViewInterface
85
  */
86
  public function getView();
87
 
@@ -89,7 +100,7 @@ interface Elefunds_Configuration_ConfigurationInterface {
89
  * Sets the clientId.
90
  *
91
  * @param int $clientId
92
- * @return Elefunds_Configuration_ConfigurationInterface
93
  */
94
  public function setClientId($clientId);
95
 
@@ -97,7 +108,7 @@ interface Elefunds_Configuration_ConfigurationInterface {
97
  * Sets the apiKey.
98
  *
99
  * @param string $apiKey
100
- * @return Elefunds_Configuration_ConfigurationInterface
101
  */
102
  public function setApiKey($apiKey);
103
 
@@ -113,7 +124,7 @@ interface Elefunds_Configuration_ConfigurationInterface {
113
  *
114
  * @param string $countrycode two digit countrycode
115
  * @throws InvalidArgumentException if given string is not a countrycode
116
- * @return Elefunds_Configuration_ConfigurationInterface
117
  */
118
  public function setCountrycode($countrycode);
119
 
@@ -131,7 +142,7 @@ interface Elefunds_Configuration_ConfigurationInterface {
131
  * the curl implementation adds it's error message to the additionalInformation of the ElefundsException.
132
  *
133
  * @param string $url
134
- * @return Elefunds_Configuration_ConfigurationInterface
135
  */
136
  public function setApiUrl($url);
137
 
@@ -145,7 +156,7 @@ interface Elefunds_Configuration_ConfigurationInterface {
145
  /**
146
  * Returns the hashed key
147
  *
148
- * @throws Elefunds_Exception_ElefundsException if hashedKey has not been calculated
149
  * @return string
150
  */
151
  public function getHashedKey();
@@ -155,27 +166,27 @@ interface Elefunds_Configuration_ConfigurationInterface {
155
  *
156
  * If not changed in the configuration, this will be curl.
157
  *
158
- * @param Elefunds_Communication_RestInterface $rest
159
- * @return Elefunds_Configuration_ConfigurationInterface
160
  */
161
- public function setRestImplementation(Elefunds_Communication_RestInterface $rest);
162
 
163
  /**
164
  * Returns the rest implementation to use, by default, it's curl.
165
  *
166
- * @return Elefunds_Communication_RestInterface
167
  */
168
  public function getRestImplementation();
169
 
170
- /**
171
  * Sets the donation class name a fully qualified string.
172
  *
173
  * Attention: Since we do not use autoloading, you have to require_once the class before
174
  * setting it.
175
  *
176
  * @param string $donationClassName
177
- * @throws Elefunds_Exception_ElefundsException if given class does not exist
178
- * @return Elefunds_Configuration_ConfigurationInterface
179
  */
180
  public function setDonationClassName($donationClassName);
181
 
@@ -193,8 +204,8 @@ interface Elefunds_Configuration_ConfigurationInterface {
193
  * setting it.
194
  *
195
  * @param string $receiverClassName
196
- * @throws Elefunds_Exception_ElefundsException if given class does not exist
197
- * @return Elefunds_Configuration_ConfigurationInterface
198
  */
199
  public function setReceiverClassName($receiverClassName);
200
 
@@ -205,4 +216,13 @@ interface Elefunds_Configuration_ConfigurationInterface {
205
  */
206
  public function getReceiverClassName();
207
 
 
 
 
 
 
 
 
 
 
208
  }
3
  /**
4
  * elefunds API PHP Library
5
  *
6
+ * Copyright (c) 2012 - 2013, elefunds GmbH <hello@elefunds.de>.
7
  * All rights reserved.
8
  *
9
  * Redistribution and use in source and binary forms, with or without
37
  *
38
  */
39
 
40
+ namespace Lfnds\Configuration;
41
+
42
+ use InvalidArgumentException;
43
+ use Lfnds\Communication\RestInterface;
44
+ use Lfnds\Exception\ElefundsException;
45
+ use Lfnds\FacadeInterface;
46
+ use Lfnds\View\ViewInterface;
47
+
48
  /**
49
  * Elefunds Configuration Interface
50
  *
51
  * @package elefunds API PHP Library
52
  * @subpackage Configuration
53
  * @author Christian Peters <christian@elefunds.de>
54
+ * @copyright 2012 - 2013 elefunds GmbH <hello@elefunds.de>
55
  * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
56
  * @link http://www.elefunds.de
57
  * @since File available since Release 1.0.0
58
  */
59
+ interface ConfigurationInterface {
60
+
61
+ const ELEFUNDS_SDK_VERSION = '2.0';
62
+
63
 
64
  /**
65
  * Setup configuration of an elefunds API Plugin.
75
  * An instance of the facade. This is set by the facade itself, so you can access API functionality
76
  * from within init()!
77
  *
78
+ * @param FacadeInterface $facade
79
+ * @return ConfigurationInterface
80
  *
81
  */
82
+ public function setFacade(FacadeInterface $facade);
83
 
84
  /**
85
  * Sets the view for this configuration.
86
  *
87
+ * @param ViewInterface $view
88
+ * @return ConfigurationInterface
89
  */
90
+ public function setView(ViewInterface $view);
91
 
92
  /**
93
  * Returns the view that is configured for this configuration.
94
  *
95
+ * @return ViewInterface
96
  */
97
  public function getView();
98
 
100
  * Sets the clientId.
101
  *
102
  * @param int $clientId
103
+ * @return ConfigurationInterface
104
  */
105
  public function setClientId($clientId);
106
 
108
  * Sets the apiKey.
109
  *
110
  * @param string $apiKey
111
+ * @return ConfigurationInterface
112
  */
113
  public function setApiKey($apiKey);
114
 
124
  *
125
  * @param string $countrycode two digit countrycode
126
  * @throws InvalidArgumentException if given string is not a countrycode
127
+ * @return ConfigurationInterface
128
  */
129
  public function setCountrycode($countrycode);
130
 
142
  * the curl implementation adds it's error message to the additionalInformation of the ElefundsException.
143
  *
144
  * @param string $url
145
+ * @return ConfigurationInterface
146
  */
147
  public function setApiUrl($url);
148
 
156
  /**
157
  * Returns the hashed key
158
  *
159
+ * @throws ElefundsException if hashedKey has not been calculated
160
  * @return string
161
  */
162
  public function getHashedKey();
166
  *
167
  * If not changed in the configuration, this will be curl.
168
  *
169
+ * @param RestInterface $rest
170
+ * @return ConfigurationInterface
171
  */
172
+ public function setRestImplementation(RestInterface $rest);
173
 
174
  /**
175
  * Returns the rest implementation to use, by default, it's curl.
176
  *
177
+ * @return RestInterface
178
  */
179
  public function getRestImplementation();
180
 
181
+ /**
182
  * Sets the donation class name a fully qualified string.
183
  *
184
  * Attention: Since we do not use autoloading, you have to require_once the class before
185
  * setting it.
186
  *
187
  * @param string $donationClassName
188
+ * @throws ElefundsException if given class does not exist
189
+ * @return ConfigurationInterface
190
  */
191
  public function setDonationClassName($donationClassName);
192
 
204
  * setting it.
205
  *
206
  * @param string $receiverClassName
207
+ * @throws ElefundsException if given class does not exist
208
+ * @return ConfigurationInterface
209
  */
210
  public function setReceiverClassName($receiverClassName);
211
 
216
  */
217
  public function getReceiverClassName();
218
 
219
+ /**
220
+ * Sets the version identifier and the module in use.
221
+ *
222
+ * @param string $version
223
+ * @param string $module
224
+ * @return $this
225
+ */
226
+ public function setVersionAndModuleIdentifier($version=ConfigurationInterface::ELEFUNDS_SDK_VERSION, $module = 'elefunds-sdk');
227
+
228
  }
lib/{Elefunds/Test/Unit/Configuration/DefaultConfigurationTest.php → Lfnds/Configuration/DefaultConfiguration.php} RENAMED
@@ -3,7 +3,7 @@
3
  /**
4
  * elefunds API PHP Library
5
  *
6
- * Copyright (c) 2012, elefunds GmbH <hello@elefunds.de>.
7
  * All rights reserved.
8
  *
9
  * Redistribution and use in source and binary forms, with or without
@@ -37,36 +37,47 @@
37
  *
38
  */
39
 
40
- require_once dirname(__FILE__) . '/../../../Configuration/DefaultConfiguration.php';
 
 
 
 
41
 
42
  /**
43
- * Unit Test for Elefunds_Configuration_BaseConfiguration.
44
  *
45
  * @package elefunds API PHP Library
46
- * @subpackage Test
47
  * @author Christian Peters <christian@elefunds.de>
48
- * @copyright 2012 elefunds GmbH <hello@elefunds.de>
49
  * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
50
  * @link http://www.elefunds.de
51
  * @since File available since Release 1.0.0
52
  */
53
- class Elefunds_Test_Unit_Configuration_DefaultConfigurationTest extends PHPUnit_Framework_TestCase {
54
 
55
- protected $defaultConfiguration;
56
 
57
  /**
58
- * initSetsCurlDonationAndReceiver
59
  *
60
- * Checks if the correct model factory pattern is set are not included here.
 
61
  *
62
- * @test
63
  */
64
- public function initSetsCurlDonationAndReceiver() {
65
- $this->defaultConfiguration = new Elefunds_Configuration_DefaultConfiguration();
66
- $this->defaultConfiguration->init();
67
 
68
- $this->assertEquals('Elefunds_Model_Receiver', $this->defaultConfiguration->getReceiverClassName());
69
- $this->assertEquals('Elefunds_Model_Donation', $this->defaultConfiguration->getDonationClassName());
 
70
 
 
 
 
 
 
71
  }
72
- }
 
3
  /**
4
  * elefunds API PHP Library
5
  *
6
+ * Copyright (c) 2012 - 2013, elefunds GmbH <hello@elefunds.de>.
7
  * All rights reserved.
8
  *
9
  * Redistribution and use in source and binary forms, with or without
37
  *
38
  */
39
 
40
+ namespace Lfnds\Configuration;
41
+ use Lfnds\Communication\CurlRequest;
42
+
43
+ require_once __DIR__ . '/BaseConfiguration.php';
44
+
45
 
46
  /**
47
+ * Default Configuration for the elefunds API.
48
  *
49
  * @package elefunds API PHP Library
50
+ * @subpackage Configuration
51
  * @author Christian Peters <christian@elefunds.de>
52
+ * @copyright 2012 - 2013 elefunds GmbH <hello@elefunds.de>
53
  * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
54
  * @link http://www.elefunds.de
55
  * @since File available since Release 1.0.0
56
  */
57
+ class DefaultConfiguration extends BaseConfiguration {
58
 
59
+ protected $apiUrl = 'https://connect.elefunds.de';
60
 
61
  /**
62
+ * Default configuration settings.
63
  *
64
+ * The default configuration uses the basic Donation and Receiver implementations that
65
+ * ship with the library, as well as a curl based REST connection.
66
  *
67
+ * @return void
68
  */
69
+ public function init() {
70
+
 
71
 
72
+ require_once __DIR__ . '/../Communication/CurlRequest.php';
73
+ $this->setRestImplementation(new CurlRequest());
74
+ $this->setVersionAndModuleIdentifier();
75
 
76
+ require_once __DIR__ . '/../Model/Donation.php';
77
+ $this->setDonationClassName('Lfnds\Model\Donation');
78
+
79
+ require_once __DIR__ . '/../Model/Receiver.php';
80
+ $this->setReceiverClassName('Lfnds\Model\Receiver');
81
  }
82
+
83
+ }
lib/{Elefunds → Lfnds}/Exception/ElefundsCommunicationException.php RENAMED
@@ -3,7 +3,7 @@
3
  /**
4
  * elefunds API PHP Library
5
  *
6
- * Copyright (c) 2012, elefunds GmbH <hello@elefunds.de>.
7
  * All rights reserved.
8
  *
9
  * Redistribution and use in source and binary forms, with or without
@@ -37,6 +37,10 @@
37
  *
38
  */
39
 
 
 
 
 
40
  /**
41
  * Elefunds communication error class.
42
  *
@@ -46,11 +50,11 @@
46
  * @package elefunds API PHP Library
47
  * @subpackage Exception
48
  * @author Christian Peters <christian@elefunds.de>
49
- * @copyright 2012 elefunds GmbH <hello@elefunds.de>
50
  * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
51
  * @link http://www.elefunds.de
52
  * @since File available since Release 1.0.0
53
  */
54
- class Elefunds_Exception_ElefundsCommunicationException extends Elefunds_Exception_ElefundsException {
55
 
56
  }
3
  /**
4
  * elefunds API PHP Library
5
  *
6
+ * Copyright (c) 2012 - 2013, elefunds GmbH <hello@elefunds.de>.
7
  * All rights reserved.
8
  *
9
  * Redistribution and use in source and binary forms, with or without
37
  *
38
  */
39
 
40
+ namespace Lfnds\Exception;
41
+
42
+ require_once 'ElefundsException.php';
43
+
44
  /**
45
  * Elefunds communication error class.
46
  *
50
  * @package elefunds API PHP Library
51
  * @subpackage Exception
52
  * @author Christian Peters <christian@elefunds.de>
53
+ * @copyright 2012 - 2013 elefunds GmbH <hello@elefunds.de>
54
  * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
55
  * @link http://www.elefunds.de
56
  * @since File available since Release 1.0.0
57
  */
58
+ class ElefundsCommunicationException extends ElefundsException {
59
 
60
  }
lib/{Elefunds → Lfnds}/Exception/ElefundsException.php RENAMED
@@ -3,7 +3,7 @@
3
  /**
4
  * elefunds API PHP Library
5
  *
6
- * Copyright (c) 2012, elefunds GmbH <hello@elefunds.de>.
7
  * All rights reserved.
8
  *
9
  * Redistribution and use in source and binary forms, with or without
@@ -37,6 +37,9 @@
37
  *
38
  */
39
 
 
 
 
40
  /**
41
  * Elefunds custom error class.
42
  *
@@ -45,12 +48,12 @@
45
  * @package elefunds API PHP Library
46
  * @subpackage Exception
47
  * @author Christian Peters <christian@elefunds.de>
48
- * @copyright 2012 elefunds GmbH <hello@elefunds.de>
49
  * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
50
  * @link http://www.elefunds.de
51
  * @since File available since Release 1.0.0
52
  */
53
- class Elefunds_Exception_ElefundsException extends Exception {
54
 
55
  /**
56
  * An elefunds error.
@@ -65,20 +68,20 @@ class Elefunds_Exception_ElefundsException extends Exception {
65
  parent::__construct($message, $code);
66
 
67
  }
68
-
69
-
70
  /**
71
  * Add additional information.
72
  *
73
  * @param array $additionalInformation
74
- * @return Elefunds_Exception_ElefundsException
75
  */
76
  public function addAdditionalInformation(array $additionalInformation) {
77
  $this->additionalInformation = array_merge($this->additionalInformation, $additionalInformation);
78
  return $this;
79
  }
80
 
81
-
82
  /**
83
  * Additional Information
84
  *
3
  /**
4
  * elefunds API PHP Library
5
  *
6
+ * Copyright (c) 2012 - 2013, elefunds GmbH <hello@elefunds.de>.
7
  * All rights reserved.
8
  *
9
  * Redistribution and use in source and binary forms, with or without
37
  *
38
  */
39
 
40
+ namespace Lfnds\Exception;
41
+ use Exception;
42
+
43
  /**
44
  * Elefunds custom error class.
45
  *
48
  * @package elefunds API PHP Library
49
  * @subpackage Exception
50
  * @author Christian Peters <christian@elefunds.de>
51
+ * @copyright 2012 - 2013 elefunds GmbH <hello@elefunds.de>
52
  * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
53
  * @link http://www.elefunds.de
54
  * @since File available since Release 1.0.0
55
  */
56
+ class ElefundsException extends Exception {
57
 
58
  /**
59
  * An elefunds error.
68
  parent::__construct($message, $code);
69
 
70
  }
71
+
72
+
73
  /**
74
  * Add additional information.
75
  *
76
  * @param array $additionalInformation
77
+ * @return $this
78
  */
79
  public function addAdditionalInformation(array $additionalInformation) {
80
  $this->additionalInformation = array_merge($this->additionalInformation, $additionalInformation);
81
  return $this;
82
  }
83
 
84
+
85
  /**
86
  * Additional Information
87
  *
lib/{Elefunds → Lfnds}/Facade.php RENAMED
@@ -3,7 +3,7 @@
3
  /**
4
  * elefunds API PHP Library
5
  *
6
- * Copyright (c) 2012, elefunds GmbH <hello@elefunds.de>.
7
  * All rights reserved.
8
  *
9
  * Redistribution and use in source and binary forms, with or without
@@ -37,7 +37,17 @@
37
  *
38
  */
39
 
40
- require_once dirname(__FILE__) . '/Model/Factory.php';
 
 
 
 
 
 
 
 
 
 
41
 
42
 
43
  /**
@@ -45,18 +55,17 @@ require_once dirname(__FILE__) . '/Model/Factory.php';
45
  *
46
  * @package elefunds API PHP Library
47
  * @author Christian Peters <christian@elefunds.de>
48
- * @copyright 2012 elefunds GmbH <hello@elefunds.de>
49
  * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
50
  * @link http://www.elefunds.de
51
  * @since File available since Release 1.0.0
52
  */
53
- class Elefunds_Facade {
54
 
55
  /**
56
- * @var Elefunds_Configuration_ConfigurationInterface
57
  */
58
  protected $configuration;
59
-
60
  /**
61
  * The cached receivers response - during one process there should only be one call.
62
  *
@@ -67,9 +76,9 @@ class Elefunds_Facade {
67
  /**
68
  * Sets up the facade and initializes configuration (if set).
69
  *
70
- * @param Elefunds_Configuration_ConfigurationInterface $configuration
71
  */
72
- public function __construct(Elefunds_Configuration_ConfigurationInterface $configuration = NULL) {
73
  if ($configuration !== NULL) {
74
  $this->setConfiguration($configuration);
75
  }
@@ -78,53 +87,22 @@ class Elefunds_Facade {
78
  /**
79
  * Returns a brand new donation.
80
  *
81
- * @return Elefunds_Model_DonationInterface
82
  */
83
  public function createDonation() {
84
- return Elefunds_Model_Factory::getDonation();
85
- }
86
-
87
- /**
88
- * Returns a brand new Receiver.
89
- *
90
- * @return Elefunds_Model_ReceiverInterface
91
- */
92
- public function createReceiver() {
93
- return Elefunds_Model_Factory::getReceiver();
94
- }
95
-
96
- /**
97
- * Sets the configuration.
98
- *
99
- * @param Elefunds_Configuration_ConfigurationInterface $configuration
100
- * @return Elefunds_Facade
101
- */
102
- public function setConfiguration(Elefunds_Configuration_ConfigurationInterface $configuration) {
103
- $this->configuration = $configuration;
104
- $this->configuration->setFacade($this);
105
- $this->configuration->init();
106
- return $this;
107
- }
108
-
109
- /**
110
- * Returns the configuration instance.
111
- *
112
- * @return Elefunds_Configuration_ConfigurationInterface
113
- */
114
- public function getConfiguration() {
115
- return $this->configuration;
116
  }
117
 
118
  /**
119
  * Returns the available receivers
120
  *
121
- * @throws Elefunds_Exception_ElefundsCommunicationException
122
  * @return array
123
  */
124
  public function getReceivers() {
125
 
126
  if (count($this->cachedReceivers) === 0) {
127
- $restUrl = $this->configuration->getApiUrl() . '/receivers/?clientId=' . $this->configuration->getClientId() . '&hashedKey=' . $this->configuration->getHashedKey();
128
  $rawJson = $this->configuration->getRestImplementation()->get($restUrl);
129
 
130
  $response = json_decode($rawJson, TRUE);
@@ -133,7 +111,7 @@ class Elefunds_Facade {
133
 
134
  // Let's get the country specific receivers
135
  if (!isset($this->cachedReceivers['receivers'][$this->configuration->getCountrycode()])) {
136
- throw new Elefunds_Exception_ElefundsCommunicationException(
137
  'Requested countrycode was not available. Available country codes are: ' . implode(', ', array_keys($this->cachedReceivers['receivers'])) . '.',
138
  1347966301
139
  );
@@ -146,57 +124,38 @@ class Elefunds_Facade {
146
  $receivers[] = $receiver->setId($rec['id'])
147
  ->setName($rec['name'])
148
  ->setDescription($rec['description'])
149
- ->setImages($rec['images'])
150
- ->setValidTime(new DateTime($this->cachedReceivers['meta']['valid']));
151
  }
152
 
153
  return $receivers;
154
  }
155
 
156
- /**
157
- * Adds a single Donation to the API.
158
- *
159
- * This is just a wrapper for the addDonations method.
160
- *
161
- * @param Elefunds_Model_DonationInterface
162
- * @throws Elefunds_Exception_ElefundsCommunicationException if connection or authentication fails or retrieved http code is not 200
163
- * @return string Message returned from the API
164
- */
165
- public function addDonation(Elefunds_Model_DonationInterface $donation) {
166
- return $this->addDonations(array($donation));
167
  }
168
 
169
- /**
170
- * Cancels a single Donation at the API.
171
- *
172
- * This is just a wrapper for the cancelDonations method.
173
- *
174
- * @param int $donationId
175
- * @throws Elefunds_Exception_ElefundsCommunicationException if connection or authentication fails or retrieved http code is not 200
176
- * @return string Message returned from the API
177
- */
178
- public function cancelDonation($donationId) {
179
- return $this->cancelDonations(array($donationId));
180
  }
181
 
182
- /**
183
- * Completes a single Donation in the API.
184
- *
185
- * This is just a wrapper for the completeDonations method.
186
- *
187
- * @param int $donationId
188
- * @throws Elefunds_Exception_ElefundsCommunicationException if connection or authentication fails or retrieved http code is not 200
189
- * @return string Message returned from the API
190
- */
191
- public function completeDonation($donationId) {
192
- return $this->completeDonations(array($donationId));
193
- }
194
-
195
  /**
196
  * Sends an array of donations to the API.
197
  *
198
  * @param array $donations
199
- * @throws Elefunds_Exception_ElefundsCommunicationException if connection or authentication fails or retrieved http code is not 200
200
  * @return string Message returned from the API
201
  */
202
  public function addDonations(array $donations) {
@@ -218,18 +177,63 @@ class Elefunds_Facade {
218
  }
219
  }
220
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
221
  /**
222
  * Cancels an array of donation from the API.
223
  *
224
- * @param array $donationIds with ids
 
 
 
225
  *
226
- * @throws Elefunds_Exception_ElefundsCommunicationException if connection or authentication fails or retrieved http code is not 200
227
  * @return string Message returned from the API
228
  */
229
- public function cancelDonations(array $donationIds) {
230
 
231
- if (count($donationIds) > 0) {
232
- $donationIds = array_filter($donationIds, create_function('$donationIds', 'return (string)$donationIds;'));
 
 
 
 
 
 
 
233
 
234
  $donationIdsString = implode(',', $donationIds);
235
 
@@ -243,17 +247,39 @@ class Elefunds_Facade {
243
  }
244
 
245
  /**
246
- * Completes an array of Donations in the API.
247
  *
248
- * @param array $donationIds with ids
249
  *
250
- * @throws Elefunds_Exception_ElefundsCommunicationException if connection or authentication fails or retrieved http code is not 200
 
251
  * @return string Message returned from the API
252
  */
253
- public function completeDonations(array $donationIds) {
 
 
254
 
255
- if (count($donationIds) > 0) {
256
- $donationIds = array_filter($donationIds, create_function('$donationIds', 'return (string)$donationIds;'));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
257
 
258
  $donationIdsString = implode(',', $donationIds);
259
 
@@ -267,35 +293,48 @@ class Elefunds_Facade {
267
  }
268
  }
269
 
270
- /**
271
- * Renders the template.
272
- *
273
- * @param string $templateName
274
- * @param bool $givenTemplateNameIsAbsolutePath
275
- * @throws Elefunds_Exception_ElefundsException
276
- * @return string The rendered HTML Snippet
277
- */
278
- public function renderTemplate($templateName = 'View', $givenTemplateNameIsAbsolutePath = FALSE) {
279
 
280
  $view = $this->getConfiguration()->getView();
281
 
282
  if ($view === NULL) {
283
- throw new Elefunds_Exception_ElefundsException('There is no template set in your configuration file. Please refer to the documentation or use one of the sample templates.', 1348051662593);
284
  }
285
 
286
- return $view->render($templateName, $givenTemplateNameIsAbsolutePath);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
287
  }
288
 
289
  /**
290
  * Returns the CSS Files required by the template.
291
  *
292
- * @throws Elefunds_Exception_ElefundsException if no template is configured
293
  * @return array with css files (path relative to this library)
294
  */
295
  public function getTemplateCssFiles() {
296
  $view = $this->getConfiguration()->getView();
297
  if ($view === NULL) {
298
- throw new Elefunds_Exception_ElefundsException('There is no template set in your configuration file. Please refer to the documentation or use one of the sample templates.', 1348051662593);
299
  } else {
300
  return $view->getCssFiles();
301
  }
@@ -304,38 +343,53 @@ class Elefunds_Facade {
304
  /**
305
  * Returns the Javascript Files required by the template.
306
  *
307
- * @throws Elefunds_Exception_ElefundsException if no template is configured
308
  * @return array with javascript files (path relative to this library)
309
  */
310
  public function getTemplateJavascriptFiles() {
311
  $view = $this->getConfiguration()->getView();
312
  if ($view === NULL) {
313
- throw new Elefunds_Exception_ElefundsException('There is no template set in your configuration file. Please refer to the documentation or use one of the sample templates.', 1348051662593);
314
  } else {
315
  return $view->getJavascriptFiles();
316
  }
317
  }
318
 
319
- /**
320
- * Maps a Elefunds_Model_DonationInterface to a JSON ready array.
321
- *
322
- * @param Elefunds_Model_DonationInterface
323
- * @throws Elefunds_Exception_ElefundsException if not all information are given that are needed for the API
324
- * @return array
325
- */
326
- protected function mapDonationToArray(Elefunds_Model_DonationInterface $donation) {
 
 
 
 
 
327
 
328
- if ($donation->getForeignId() === NULL || $donation->getTime() === NULL || $donation->getAmount() === NULL || $donation->getReceiverIds() === NULL || $donation->getAvailableReceiverIds() === NULL) {
329
- throw new Elefunds_Exception_ElefundsException('Given donation does not contain all information needed to be send to the API.', 1347975987321);
330
- }
331
 
332
- $donationAsArray = $donation->toArray();
 
 
 
 
 
 
 
 
 
 
 
333
 
334
- if (isset($donationAsArray['donator']) && !isset($donationAsArray['donator']['countryCode'])) {
335
- $donationAsArray['donator']['countryCode'] = $this->getConfiguration()->getCountrycode();
336
- }
337
 
338
- return $donationAsArray;
339
- }
 
 
 
 
340
 
341
  }
3
  /**
4
  * elefunds API PHP Library
5
  *
6
+ * Copyright (c) 2012 - 2013, elefunds GmbH <hello@elefunds.de>.
7
  * All rights reserved.
8
  *
9
  * Redistribution and use in source and binary forms, with or without
37
  *
38
  */
39
 
40
+ namespace Lfnds;
41
+
42
+ use Lfnds\Configuration\ConfigurationInterface;
43
+ use Lfnds\Exception\ElefundsCommunicationException;
44
+ use Lfnds\Exception\ElefundsException;
45
+ use Lfnds\Model\DonationInterface;
46
+ use Lfnds\Model\Factory as ModelFactory;
47
+ use Lfnds\Model\ReceiverInterface;
48
+
49
+ require_once __DIR__ . '/Model/Factory.php';
50
+ require_once __DIR__ . '/FacadeInterface.php';
51
 
52
 
53
  /**
55
  *
56
  * @package elefunds API PHP Library
57
  * @author Christian Peters <christian@elefunds.de>
58
+ * @copyright 2012 - 2013 elefunds GmbH <hello@elefunds.de>
59
  * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
60
  * @link http://www.elefunds.de
61
  * @since File available since Release 1.0.0
62
  */
63
+ class Facade implements FacadeInterface {
64
 
65
  /**
66
+ * @var ConfigurationInterface
67
  */
68
  protected $configuration;
 
69
  /**
70
  * The cached receivers response - during one process there should only be one call.
71
  *
76
  /**
77
  * Sets up the facade and initializes configuration (if set).
78
  *
79
+ * @param ConfigurationInterface $configuration
80
  */
81
+ public function __construct(ConfigurationInterface $configuration = NULL) {
82
  if ($configuration !== NULL) {
83
  $this->setConfiguration($configuration);
84
  }
87
  /**
88
  * Returns a brand new donation.
89
  *
90
+ * @return DonationInterface
91
  */
92
  public function createDonation() {
93
+ return ModelFactory::getDonation();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
  }
95
 
96
  /**
97
  * Returns the available receivers
98
  *
99
+ * @throws ElefundsCommunicationException
100
  * @return array
101
  */
102
  public function getReceivers() {
103
 
104
  if (count($this->cachedReceivers) === 0) {
105
+ $restUrl = $this->configuration->getApiUrl() . '/receivers/for/' . $this->configuration->getClientId();
106
  $rawJson = $this->configuration->getRestImplementation()->get($restUrl);
107
 
108
  $response = json_decode($rawJson, TRUE);
111
 
112
  // Let's get the country specific receivers
113
  if (!isset($this->cachedReceivers['receivers'][$this->configuration->getCountrycode()])) {
114
+ throw new ElefundsCommunicationException(
115
  'Requested countrycode was not available. Available country codes are: ' . implode(', ', array_keys($this->cachedReceivers['receivers'])) . '.',
116
  1347966301
117
  );
124
  $receivers[] = $receiver->setId($rec['id'])
125
  ->setName($rec['name'])
126
  ->setDescription($rec['description'])
127
+ ->setImages($rec['images']);
 
128
  }
129
 
130
  return $receivers;
131
  }
132
 
133
+ /**
134
+ * Returns a brand new Receiver.
135
+ *
136
+ * @return ReceiverInterface
137
+ */
138
+ public function createReceiver() {
139
+ return ModelFactory::getReceiver();
 
 
 
 
140
  }
141
 
142
+ /**
143
+ * Adds a single Donation to the API.
144
+ *
145
+ * This is just a wrapper for the addDonations method.
146
+ *
147
+ * @param Model\DonationInterface $donation
148
+ * @return string Message returned from the API
149
+ */
150
+ public function addDonation(DonationInterface $donation) {
151
+ return $this->addDonations(array($donation));
 
152
  }
153
 
 
 
 
 
 
 
 
 
 
 
 
 
 
154
  /**
155
  * Sends an array of donations to the API.
156
  *
157
  * @param array $donations
158
+ * @throws ElefundsCommunicationException if connection or authentication fails or retrieved http code is not 200
159
  * @return string Message returned from the API
160
  */
161
  public function addDonations(array $donations) {
177
  }
178
  }
179
 
180
+ /**
181
+ * Returns the configuration instance.
182
+ *
183
+ * @return ConfigurationInterface
184
+ */
185
+ public function getConfiguration() {
186
+ return $this->configuration;
187
+ }
188
+
189
+ /**
190
+ * Sets the configuration.
191
+ *
192
+ * @param ConfigurationInterface $configuration
193
+ * @return FacadeInterface
194
+ */
195
+ public function setConfiguration(ConfigurationInterface $configuration) {
196
+ $this->configuration = $configuration;
197
+ $this->configuration->setFacade($this);
198
+ $this->configuration->init();
199
+ return $this;
200
+ }
201
+
202
+ /**
203
+ * Cancels a single Donation at the API.
204
+ *
205
+ * This is just a wrapper for the cancelDonations method.
206
+ *
207
+ * @param mixed $donation either a foreignId (string) or instance of \Lfnds\Model\DonationInterface
208
+ * @throws ElefundsCommunicationException if connection or authentication fails or retrieved http code is not 200
209
+ * @return string Message returned from the API
210
+ */
211
+ public function cancelDonation($donation) {
212
+ return $this->cancelDonations(array($donation));
213
+ }
214
+
215
  /**
216
  * Cancels an array of donation from the API.
217
  *
218
+ * The API requires only the foreignID, so the array must contain foreignIds or donations
219
+ * (a mixture is possible as well).
220
+ *
221
+ * @param array $donations
222
  *
223
+ * @throws ElefundsCommunicationException if connection or authentication fails or retrieved http code is not 200
224
  * @return string Message returned from the API
225
  */
226
+ public function cancelDonations(array $donations) {
227
 
228
+ if (count($donations) > 0) {
229
+ $donationIds = array_map(function($donation) {
230
+ if (is_a($donation, 'Lfnds\Model\DonationInterface')) {
231
+ /** @var \Lfnds\Model\DonationInterface $donation*/
232
+ return $donation->getForeignId();
233
+ } else {
234
+ return (string)$donation;
235
+ }
236
+ }, $donations);
237
 
238
  $donationIdsString = implode(',', $donationIds);
239
 
247
  }
248
 
249
  /**
250
+ * Completes a single Donation in the API.
251
  *
252
+ * This is just a wrapper for the completeDonations method.
253
  *
254
+ * @param mixed $donation either a foreignId (string) or instance of \Lfnds\Model\DonationInterface
255
+ * @throws ElefundsCommunicationException if connection or authentication fails or retrieved http code is not 200
256
  * @return string Message returned from the API
257
  */
258
+ public function completeDonation($donation) {
259
+ return $this->completeDonations(array($donation));
260
+ }
261
 
262
+ /**
263
+ * Completes an array of Donations in the API.
264
+ *
265
+ * The API requires only the foreignID, so the array must contain foreignIds or donations
266
+ * (a mixture is possible as well).
267
+ *
268
+ * @param array $donations
269
+ *
270
+ * @return string Message returned from the API
271
+ */
272
+ public function completeDonations(array $donations) {
273
+
274
+ if (count($donations) > 0) {
275
+ $donationIds = array_map(function($donation) {
276
+ if (is_a($donation, 'Lfnds\Model\DonationInterface')) {
277
+ /** @var \Lfnds\Model\DonationInterface $donation*/
278
+ return $donation->getForeignId();
279
+ } else {
280
+ return (string)$donation;
281
+ }
282
+ }, $donations);
283
 
284
  $donationIdsString = implode(',', $donationIds);
285
 
293
  }
294
  }
295
 
296
+ /**
297
+ * Renders the template.
298
+ *
299
+ * @throws ElefundsException
300
+ * @return string The rendered HTML Snippet
301
+ */
302
+ public function renderTemplate() {
 
 
303
 
304
  $view = $this->getConfiguration()->getView();
305
 
306
  if ($view === NULL) {
307
+ throw new ElefundsException('There is no template set in your configuration file. Please refer to the documentation or use one of the sample templates.', 1348051662593);
308
  }
309
 
310
+ return $view->render();
311
+ }
312
+
313
+ /**
314
+ * Helper function to include get nicely formatted tags for all css files, ready to add to html.
315
+ *
316
+ * @throws ElefundsException if no template is configured
317
+ * @return string
318
+ */
319
+ public function getPrintableCssTagStrings() {
320
+
321
+ $tagStrings = '';
322
+ foreach ($this->getTemplateCssFiles() as $cssFile) {
323
+ $tagStrings .= sprintf('<link rel="stylesheet" type="text/css" href="%s" />', $cssFile);
324
+ }
325
+ return $tagStrings;
326
  }
327
 
328
  /**
329
  * Returns the CSS Files required by the template.
330
  *
331
+ * @throws ElefundsException if no template is configured
332
  * @return array with css files (path relative to this library)
333
  */
334
  public function getTemplateCssFiles() {
335
  $view = $this->getConfiguration()->getView();
336
  if ($view === NULL) {
337
+ throw new ElefundsException('There is no template set in your configuration file. Please refer to the documentation or use one of the sample templates.', 1348051662593);
338
  } else {
339
  return $view->getCssFiles();
340
  }
343
  /**
344
  * Returns the Javascript Files required by the template.
345
  *
346
+ * @throws ElefundsException if no template is configured
347
  * @return array with javascript files (path relative to this library)
348
  */
349
  public function getTemplateJavascriptFiles() {
350
  $view = $this->getConfiguration()->getView();
351
  if ($view === NULL) {
352
+ throw new ElefundsException('There is no template set in your configuration file. Please refer to the documentation or use one of the sample templates.', 1348051662593);
353
  } else {
354
  return $view->getJavascriptFiles();
355
  }
356
  }
357
 
358
+ /**
359
+ * Helper function to include get nicely formatted tags for all js files, ready to add to html.
360
+ *
361
+ * @throws ElefundsException if no template is configured
362
+ * @return string
363
+ */
364
+ public function getPrintableJavascriptTagStrings() {
365
+ $tagStrings = '';
366
+ foreach ($this->getTemplateJavascriptFiles() as $jsFile) {
367
+ $tagStrings .= sprintf('<script type="text/javascript" src="%s"></script>', $jsFile);
368
+ }
369
+ return $tagStrings;
370
+ }
371
 
 
 
 
372
 
373
+ /**
374
+ * Maps a DonationInterface to a JSON ready array.
375
+ *
376
+ * @param Model\DonationInterface $donation
377
+ * @throws Exception\ElefundsException
378
+ * @return array
379
+ */
380
+ protected function mapDonationToArray(DonationInterface $donation) {
381
+
382
+ if ($donation->getForeignId() === NULL || $donation->getTime() === NULL || $donation->getAmount() === NULL || $donation->getReceiverIds() === NULL || $donation->getAvailableReceiverIds() === NULL) {
383
+ throw new ElefundsException('Given donation does not contain all information needed to be send to the API.', 1347975987321);
384
+ }
385
 
386
+ $donationAsArray = $donation->toArray();
 
 
387
 
388
+ if (isset($donationAsArray['donator']) && !isset($donationAsArray['donator']['countryCode'])) {
389
+ $donationAsArray['donator']['countryCode'] = $this->getConfiguration()->getCountrycode();
390
+ }
391
+
392
+ return $donationAsArray;
393
+ }
394
 
395
  }
lib/Lfnds/FacadeInterface.php ADDED
@@ -0,0 +1,188 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * elefunds API PHP Library
5
+ *
6
+ * Copyright (c) 2012 - 2013, elefunds GmbH <hello@elefunds.de>.
7
+ * All rights reserved.
8
+ *
9
+ * Redistribution and use in source and binary forms, with or without
10
+ * modification, are permitted provided that the following conditions
11
+ * are met:
12
+ *
13
+ * * Redistributions of source code must retain the above copyright
14
+ * notice, this list of conditions and the following disclaimer.
15
+ *
16
+ * * Redistributions in binary form must reproduce the above copyright
17
+ * notice, this list of conditions and the following disclaimer in
18
+ * the documentation and/or other materials provided with the
19
+ * distribution.
20
+ *
21
+ * * Neither the name of the elefunds GmbH nor the names of its
22
+ * contributors may be used to endorse or promote products derived
23
+ * from this software without specific prior written permission.
24
+ *
25
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
28
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
29
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
30
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
31
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
32
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
33
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
35
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36
+ * POSSIBILITY OF SUCH DAMAGE.
37
+ *
38
+ */
39
+
40
+ namespace Lfnds;
41
+
42
+ use Lfnds\Configuration\ConfigurationInterface;
43
+ use Lfnds\Exception\ElefundsCommunicationException;
44
+ use Lfnds\Exception\ElefundsException;
45
+ use Lfnds\Model\DonationInterface;
46
+ use Lfnds\Model\ReceiverInterface;
47
+
48
+
49
+ /**
50
+ * Elefunds Facade Interface
51
+ *
52
+ * @package elefunds API PHP Library
53
+ * @author Christian Peters <christian@elefunds.de>
54
+ * @copyright 2012 - 2013 elefunds GmbH <hello@elefunds.de>
55
+ * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
56
+ * @link http://www.elefunds.de
57
+ * @since File available since Release 1.3.0
58
+ */
59
+ interface FacadeInterface {
60
+
61
+
62
+ /**
63
+ * Returns a brand new donation.
64
+ *
65
+ * @return DonationInterface
66
+ */
67
+ public function createDonation();
68
+
69
+ /**
70
+ * Returns a brand new Receiver.
71
+ *
72
+ * @return ReceiverInterface
73
+ */
74
+ public function createReceiver();
75
+
76
+ /**
77
+ * Sets the configuration.
78
+ *
79
+ * @param ConfigurationInterface $configuration
80
+ * @return FacadeInterface
81
+ */
82
+ public function setConfiguration(ConfigurationInterface $configuration);
83
+
84
+ /**
85
+ * Returns the configuration instance.
86
+ *
87
+ * @return ConfigurationInterface
88
+ */
89
+ public function getConfiguration();
90
+ /**
91
+ * Returns the available receivers
92
+ *
93
+ * @throws ElefundsCommunicationException
94
+ * @return array
95
+ */
96
+ public function getReceivers();
97
+
98
+ /**
99
+ * Adds a single Donation to the API.
100
+ *
101
+ * This is just a wrapper for the addDonations method.
102
+ *
103
+ * @param Model\DonationInterface $donation
104
+ * @return string Message returned from the API
105
+ */
106
+ public function addDonation(DonationInterface $donation);
107
+
108
+ /**
109
+ * Cancels a single Donation at the API.
110
+ *
111
+ * This is just a wrapper for the cancelDonations method.
112
+ *
113
+ * @param mixed $donation either a foreignId (string) or instance of \Lfnds\Model\DonationInterface
114
+ * @throws ElefundsCommunicationException if connection or authentication fails or retrieved http code is not 200
115
+ * @return string Message returned from the API
116
+ */
117
+ public function cancelDonation($donation);
118
+
119
+ /**
120
+ * Completes a single Donation in the API.
121
+ *
122
+ * This is just a wrapper for the completeDonations method.
123
+ *
124
+ * @param mixed $donation either a foreignId (string) or instance of \Lfnds\Model\DonationInterface
125
+ * @throws ElefundsCommunicationException if connection or authentication fails or retrieved http code is not 200
126
+ * @return string Message returned from the API
127
+ */
128
+ public function completeDonation($donation);
129
+
130
+ /**
131
+ * Sends an array of donations to the API.
132
+ *
133
+ * @param array $donations
134
+ * @throws ElefundsCommunicationException if connection or authentication fails or retrieved http code is not 200
135
+ * @return string Message returned from the API
136
+ */
137
+ public function addDonations(array $donations);
138
+
139
+ /**
140
+ * Cancels an array of donation from the API.
141
+ *
142
+ * The API requires only the foreignID, so the array must contain foreignIds or donations
143
+ * (a mixture is possible as well).
144
+ *
145
+ * @param array $donations
146
+ *
147
+ * @throws ElefundsCommunicationException if connection or authentication fails or retrieved http code is not 200
148
+ * @return string Message returned from the API
149
+ */
150
+ public function cancelDonations(array $donations);
151
+
152
+ /**
153
+ * Completes an array of Donations in the API.
154
+ *
155
+ * The API requires only the foreignID, so the array must contain foreignIds or donations
156
+ * (a mixture is possible as well).
157
+ *
158
+ * @param array $donations
159
+ *
160
+ * @return string Message returned from the API
161
+ */
162
+ public function completeDonations(array $donations);
163
+
164
+ /**
165
+ * Renders the template.
166
+ *
167
+ * @throws ElefundsException
168
+ * @return string The rendered HTML Snippet
169
+ */
170
+ public function renderTemplate();
171
+
172
+ /**
173
+ * Returns the CSS Files required by the template.
174
+ *
175
+ * @throws ElefundsException if no template is configured
176
+ * @return array with css files (path relative to this library)
177
+ */
178
+ public function getTemplateCssFiles();
179
+
180
+ /**
181
+ * Returns the Javascript Files required by the template.
182
+ *
183
+ * @throws ElefundsException if no template is configured
184
+ * @return array with javascript files (path relative to this library)
185
+ */
186
+ public function getTemplateJavascriptFiles();
187
+
188
+ }
lib/{Elefunds → Lfnds}/Model/Donation.php RENAMED
@@ -3,7 +3,7 @@
3
  /**
4
  * elefunds API PHP Library
5
  *
6
- * Copyright (c) 2012, elefunds GmbH <hello@elefunds.de>.
7
  * All rights reserved.
8
  *
9
  * Redistribution and use in source and binary forms, with or without
@@ -37,6 +37,11 @@
37
  *
38
  */
39
 
 
 
 
 
 
40
  require_once 'DonationInterface.php';
41
 
42
  /**
@@ -45,12 +50,12 @@ require_once 'DonationInterface.php';
45
  * @package elefunds API PHP Library
46
  * @subpackage Model
47
  * @author Christian Peters <christian@elefunds.de>
48
- * @copyright 2012 elefunds GmbH <hello@elefunds.de>
49
  * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
50
  * @link http://www.elefunds.de
51
  * @since File available since Release 1.0.0
52
  */
53
- class Elefunds_Model_Donation implements Elefunds_Model_DonationInterface {
54
 
55
  /**
56
  * Order or unique transaction ID
@@ -133,14 +138,14 @@ class Elefunds_Model_Donation implements Elefunds_Model_DonationInterface {
133
  * Sets the foreign ID. A unique ID to identify the order or transaction.
134
  *
135
  * @param string $foreignId
136
- * @throws InvalidArgumentException if type can't be casted to integer
137
- * @return Elefunds_Model_DonationInterface
138
  */
139
  public function setForeignId($foreignId) {
140
  if (preg_match('/^[A-Za-z0-9_+\-#:.,äüöÄÜÖß]*$/', $foreignId)) {
141
  $this->foreignId = (string)$foreignId;
142
  } else {
143
- throw new InvalidArgumentException('Given foreignId was not of of a type that can be casted to integer.', 1347557226);
144
  }
145
 
146
  return $this;
@@ -161,7 +166,7 @@ class Elefunds_Model_Donation implements Elefunds_Model_DonationInterface {
161
  * @param int $amount
162
  *
163
  * @throws InvalidArgumentException
164
- * @return Elefunds_Model_DonationInterface
165
  */
166
  public function setAmount($amount) {
167
  if (is_int($amount) || ctype_digit($amount)) {
@@ -185,7 +190,7 @@ class Elefunds_Model_Donation implements Elefunds_Model_DonationInterface {
185
  * Sets the time when the donation took place.
186
  *
187
  * @param DateTime $time
188
- * @return Elefunds_Model_DonationInterface
189
  */
190
  public function setTime(DateTime $time) {
191
  $this->time = $time;
@@ -207,7 +212,7 @@ class Elefunds_Model_Donation implements Elefunds_Model_DonationInterface {
207
  * @param int $amount
208
  *
209
  * @throws InvalidArgumentException
210
- * @return Elefunds_Model_DonationInterface
211
  */
212
  public function setSuggestedAmount($amount) {
213
  if (is_int($amount) || ctype_digit($amount)) {
@@ -224,7 +229,7 @@ class Elefunds_Model_Donation implements Elefunds_Model_DonationInterface {
224
  *
225
  * @param int $receiverId
226
  * @throws InvalidArgumentException if given id is not a positive integer
227
- * @return Elefunds_Model_DonationInterface
228
  */
229
  public function addReceiverId($receiverId) {
230
  if (is_int($receiverId) && $receiverId > 0) {
@@ -241,11 +246,11 @@ class Elefunds_Model_Donation implements Elefunds_Model_DonationInterface {
241
  *
242
  * @param array $receiverIds array with receiverIds (integers)
243
  * @throws InvalidArgumentException if given array contains a value that is not a positive integer
244
- * @return Elefunds_Model_DonationInterface
245
  */
246
  public function setReceiverIds(array $receiverIds) {
247
 
248
- $isValidArray = $receiverIds === array_filter($receiverIds, create_function('$receiverIds', 'return is_int($receiverIds) && $receiverIds > 0;'));
249
 
250
  if ($isValidArray) {
251
  $this->receiverIds = $receiverIds;
@@ -272,7 +277,7 @@ class Elefunds_Model_Donation implements Elefunds_Model_DonationInterface {
272
  *
273
  * @param int $receiverId
274
  * @throws InvalidArgumentException if given id is not a positive integer
275
- * @return Elefunds_Model_DonationInterface
276
  */
277
  public function addAvailableReceiverId($receiverId) {
278
  if (is_int($receiverId) && $receiverId > 0) {
@@ -288,11 +293,11 @@ class Elefunds_Model_Donation implements Elefunds_Model_DonationInterface {
288
  *
289
  * @param array $receiverIds array with receiverIds (integers)
290
  * @throws InvalidArgumentException if given array contains a value that is not a positive integer
291
- * @return Elefunds_Model_DonationInterface
292
  */
293
  public function setAvailableReceiverIds(array $receiverIds) {
294
 
295
- $isValidArray = $receiverIds === array_filter($receiverIds, create_function('$receiverIds', 'return is_int($receiverIds) && $receiverIds > 0;'));
296
 
297
  if ($isValidArray) {
298
  $this->availableReceiverIds = $receiverIds;
@@ -327,7 +332,7 @@ class Elefunds_Model_Donation implements Elefunds_Model_DonationInterface {
327
  *
328
  * @param int $grandTotal
329
  * @throws InvalidArgumentException if type can't be casted to integer
330
- * @return Elefunds_Model_DonationInterface
331
  */
332
  public function setGrandTotal($grandTotal) {
333
  if (is_int($grandTotal) || ctype_digit($grandTotal)) {
@@ -349,24 +354,24 @@ class Elefunds_Model_Donation implements Elefunds_Model_DonationInterface {
349
  * @param string $firstName
350
  * @param string $lastName
351
  * @param string $streetAddress
352
- * @param int $zip
353
  * @param string $city
354
  * @param string $countryCode two digit country code; if not given, the code from your settings will be used
355
  *
356
- * @return Elefunds_Model_Donation
357
  * @throws InvalidArgumentException
358
  */
359
  public function setDonator($email, $firstName, $lastName, $streetAddress, $zip, $city, $countryCode = NULL) {
360
  $validMail = filter_var($email, FILTER_VALIDATE_EMAIL) !== FALSE;
361
-
362
- if ($validMail && is_string($firstName) && is_string($lastName) && is_string($streetAddress) && is_int($zip) && is_string($city)) {
363
 
364
  $this->donator = array(
365
  'email' => $email,
366
  'firstName' => $firstName,
367
  'lastName' => $lastName,
368
  'streetAddress' => $streetAddress,
369
- 'zip' => $zip,
370
  'city' => $city,
371
  );
372
 
3
  /**
4
  * elefunds API PHP Library
5
  *
6
+ * Copyright (c) 2012 - 2013, elefunds GmbH <hello@elefunds.de>.
7
  * All rights reserved.
8
  *
9
  * Redistribution and use in source and binary forms, with or without
37
  *
38
  */
39
 
40
+ namespace Lfnds\Model;
41
+
42
+ use DateTime;
43
+ use InvalidArgumentException;
44
+
45
  require_once 'DonationInterface.php';
46
 
47
  /**
50
  * @package elefunds API PHP Library
51
  * @subpackage Model
52
  * @author Christian Peters <christian@elefunds.de>
53
+ * @copyright 2012 - 2013 elefunds GmbH <hello@elefunds.de>
54
  * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
55
  * @link http://www.elefunds.de
56
  * @since File available since Release 1.0.0
57
  */
58
+ class Donation implements DonationInterface {
59
 
60
  /**
61
  * Order or unique transaction ID
138
  * Sets the foreign ID. A unique ID to identify the order or transaction.
139
  *
140
  * @param string $foreignId
141
+ * @throws InvalidArgumentException if preg match turns out to be not a valid foreignID
142
+ * @return DonationInterface
143
  */
144
  public function setForeignId($foreignId) {
145
  if (preg_match('/^[A-Za-z0-9_+\-#:.,äüöÄÜÖß]*$/', $foreignId)) {
146
  $this->foreignId = (string)$foreignId;
147
  } else {
148
+ throw new InvalidArgumentException('Given foreignId was not valid.', 1347557226);
149
  }
150
 
151
  return $this;
166
  * @param int $amount
167
  *
168
  * @throws InvalidArgumentException
169
+ * @return DonationInterface
170
  */
171
  public function setAmount($amount) {
172
  if (is_int($amount) || ctype_digit($amount)) {
190
  * Sets the time when the donation took place.
191
  *
192
  * @param DateTime $time
193
+ * @return DonationInterface
194
  */
195
  public function setTime(DateTime $time) {
196
  $this->time = $time;
212
  * @param int $amount
213
  *
214
  * @throws InvalidArgumentException
215
+ * @return DonationInterface
216
  */
217
  public function setSuggestedAmount($amount) {
218
  if (is_int($amount) || ctype_digit($amount)) {
229
  *
230
  * @param int $receiverId
231
  * @throws InvalidArgumentException if given id is not a positive integer
232
+ * @return DonationInterface
233
  */
234
  public function addReceiverId($receiverId) {
235
  if (is_int($receiverId) && $receiverId > 0) {
246
  *
247
  * @param array $receiverIds array with receiverIds (integers)
248
  * @throws InvalidArgumentException if given array contains a value that is not a positive integer
249
+ * @return DonationInterface
250
  */
251
  public function setReceiverIds(array $receiverIds) {
252
 
253
+ $isValidArray = $receiverIds === array_filter($receiverIds, function($receiverIds) { return is_int($receiverIds) && $receiverIds > 0; });
254
 
255
  if ($isValidArray) {
256
  $this->receiverIds = $receiverIds;
277
  *
278
  * @param int $receiverId
279
  * @throws InvalidArgumentException if given id is not a positive integer
280
+ * @return DonationInterface
281
  */
282
  public function addAvailableReceiverId($receiverId) {
283
  if (is_int($receiverId) && $receiverId > 0) {
293
  *
294
  * @param array $receiverIds array with receiverIds (integers)
295
  * @throws InvalidArgumentException if given array contains a value that is not a positive integer
296
+ * @return DonationInterface
297
  */
298
  public function setAvailableReceiverIds(array $receiverIds) {
299
 
300
+ $isValidArray = $receiverIds === array_filter($receiverIds, function($receiverIds) { return is_int($receiverIds) && $receiverIds > 0; });
301
 
302
  if ($isValidArray) {
303
  $this->availableReceiverIds = $receiverIds;
332
  *
333
  * @param int $grandTotal
334
  * @throws InvalidArgumentException if type can't be casted to integer
335
+ * @return DonationInterface
336
  */
337
  public function setGrandTotal($grandTotal) {
338
  if (is_int($grandTotal) || ctype_digit($grandTotal)) {
354
  * @param string $firstName
355
  * @param string $lastName
356
  * @param string $streetAddress
357
+ * @param int|string $zip (if string, than digit only)
358
  * @param string $city
359
  * @param string $countryCode two digit country code; if not given, the code from your settings will be used
360
  *
361
+ * @return Donation
362
  * @throws InvalidArgumentException
363
  */
364
  public function setDonator($email, $firstName, $lastName, $streetAddress, $zip, $city, $countryCode = NULL) {
365
  $validMail = filter_var($email, FILTER_VALIDATE_EMAIL) !== FALSE;
366
+ $validZip = is_int($zip) || ctype_digit($zip);
367
+ if ($validMail && $validZip && is_string($firstName) && is_string($lastName) && is_string($streetAddress) && is_string($city)) {
368
 
369
  $this->donator = array(
370
  'email' => $email,
371
  'firstName' => $firstName,
372
  'lastName' => $lastName,
373
  'streetAddress' => $streetAddress,
374
+ 'zip' => (string)$zip,
375
  'city' => $city,
376
  );
377
 
lib/{Elefunds → Lfnds}/Model/DonationInterface.php RENAMED
@@ -3,7 +3,7 @@
3
  /**
4
  * elefunds API PHP Library
5
  *
6
- * Copyright (c) 2012, elefunds GmbH <hello@elefunds.de>.
7
  * All rights reserved.
8
  *
9
  * Redistribution and use in source and binary forms, with or without
@@ -37,25 +37,29 @@
37
  *
38
  */
39
 
 
 
 
 
40
  /**
41
  * elefunds Donation Interface
42
  *
43
  * @package elefunds API PHP Library
44
  * @subpackage Model
45
  * @author Christian Peters <christian@elefunds.de>
46
- * @copyright 2012 elefunds GmbH <hello@elefunds.de>
47
  * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
48
  * @link http://www.elefunds.de
49
  * @since File available since Release 1.0.0
50
  */
51
- interface Elefunds_Model_DonationInterface {
52
-
53
  /**
54
  * Sets the foreign ID. A unique ID to identify the order or transaction.
55
  *
56
- * @param int $foreignId
57
- * @throws InvalidArgumentException if type can't be casted to integer
58
- * @return Elefunds_Model_DonationInterface
59
  */
60
  public function setForeignId($foreignId);
61
 
@@ -70,7 +74,7 @@ interface Elefunds_Model_DonationInterface {
70
  * Sets the time when the donation took place.
71
  *
72
  * @param DateTime $time
73
- * @return Elefunds_Model_DonationInterface
74
  */
75
  public function setTime(DateTime $time);
76
 
@@ -85,7 +89,7 @@ interface Elefunds_Model_DonationInterface {
85
  * Sets the donated amount.
86
  *
87
  * @param int $amount
88
- * @return Elefunds_Model_DonationInterface
89
  */
90
  public function setAmount($amount);
91
 
@@ -100,7 +104,7 @@ interface Elefunds_Model_DonationInterface {
100
  * Sets the amount that was suggested to the customer.
101
  *
102
  * @param int $amount
103
- * @return Elefunds_Model_DonationInterface
104
  */
105
  public function setSuggestedAmount($amount);
106
 
@@ -117,7 +121,7 @@ interface Elefunds_Model_DonationInterface {
117
  *
118
  * @param int $receiverId
119
  * @throws InvalidArgumentException if given id is not a positive integer
120
- * @return Elefunds_Model_DonationInterface
121
  */
122
  public function addReceiverId($receiverId);
123
 
@@ -127,7 +131,7 @@ interface Elefunds_Model_DonationInterface {
127
  *
128
  * @param array $receiverIds array with receiverIds (integers)
129
  * @throws InvalidArgumentException if given array contains a value that is not a positive integer
130
- * @return Elefunds_Model_DonationInterface
131
  */
132
  public function setReceiverIds(array $receiverIds);
133
 
@@ -144,7 +148,7 @@ interface Elefunds_Model_DonationInterface {
144
  *
145
  * @param int $receiverId
146
  * @throws InvalidArgumentException if given id is not a positive integer
147
- * @return Elefunds_Model_DonationInterface
148
  */
149
  public function addAvailableReceiverId($receiverId);
150
 
@@ -153,7 +157,7 @@ interface Elefunds_Model_DonationInterface {
153
  *
154
  * @param array $receiverIds array with receiverIds (integers)
155
  * @throws InvalidArgumentException if given array contains a value that is not a positive integer
156
- * @return Elefunds_Model_DonationInterface
157
  */
158
  public function setAvailableReceiverIds(array $receiverIds);
159
 
@@ -177,7 +181,7 @@ interface Elefunds_Model_DonationInterface {
177
  *
178
  * @param int $grandTotal
179
  * @throws InvalidArgumentException if type can't be casted to integer
180
- * @return Elefunds_Model_DonationInterface
181
  */
182
  public function setGrandTotal($grandTotal);
183
 
@@ -192,11 +196,11 @@ interface Elefunds_Model_DonationInterface {
192
  * @param string $firstName
193
  * @param string $lastName
194
  * @param string $streetAddress
195
- * @param int $zip
196
  * @param string $city
197
  * @param string $countryCode two digit country code; if not given, the code from your settings will be used
198
  *
199
- * @return Elefunds_Model_Donation
200
  * @throws InvalidArgumentException
201
  */
202
  public function setDonator($email, $firstName, $lastName, $streetAddress, $zip, $city, $countryCode = NULL);
3
  /**
4
  * elefunds API PHP Library
5
  *
6
+ * Copyright (c) 2012 - 2013, elefunds GmbH <hello@elefunds.de>.
7
  * All rights reserved.
8
  *
9
  * Redistribution and use in source and binary forms, with or without
37
  *
38
  */
39
 
40
+ namespace Lfnds\Model;
41
+ use DateTime;
42
+ use InvalidArgumentException;
43
+
44
  /**
45
  * elefunds Donation Interface
46
  *
47
  * @package elefunds API PHP Library
48
  * @subpackage Model
49
  * @author Christian Peters <christian@elefunds.de>
50
+ * @copyright 2012 - 2013 elefunds GmbH <hello@elefunds.de>
51
  * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
52
  * @link http://www.elefunds.de
53
  * @since File available since Release 1.0.0
54
  */
55
+ interface DonationInterface {
56
+
57
  /**
58
  * Sets the foreign ID. A unique ID to identify the order or transaction.
59
  *
60
+ * @param string $foreignId
61
+ * @throws InvalidArgumentException if preg match turns out to be not a valid foreignID
62
+ * @return DonationInterface
63
  */
64
  public function setForeignId($foreignId);
65
 
74
  * Sets the time when the donation took place.
75
  *
76
  * @param DateTime $time
77
+ * @return DonationInterface
78
  */
79
  public function setTime(DateTime $time);
80
 
89
  * Sets the donated amount.
90
  *
91
  * @param int $amount
92
+ * @return DonationInterface
93
  */
94
  public function setAmount($amount);
95
 
104
  * Sets the amount that was suggested to the customer.
105
  *
106
  * @param int $amount
107
+ * @return DonationInterface
108
  */
109
  public function setSuggestedAmount($amount);
110
 
121
  *
122
  * @param int $receiverId
123
  * @throws InvalidArgumentException if given id is not a positive integer
124
+ * @return DonationInterface
125
  */
126
  public function addReceiverId($receiverId);
127
 
131
  *
132
  * @param array $receiverIds array with receiverIds (integers)
133
  * @throws InvalidArgumentException if given array contains a value that is not a positive integer
134
+ * @return DonationInterface
135
  */
136
  public function setReceiverIds(array $receiverIds);
137
 
148
  *
149
  * @param int $receiverId
150
  * @throws InvalidArgumentException if given id is not a positive integer
151
+ * @return DonationInterface
152
  */
153
  public function addAvailableReceiverId($receiverId);
154
 
157
  *
158
  * @param array $receiverIds array with receiverIds (integers)
159
  * @throws InvalidArgumentException if given array contains a value that is not a positive integer
160
+ * @return DonationInterface
161
  */
162
  public function setAvailableReceiverIds(array $receiverIds);
163
 
181
  *
182
  * @param int $grandTotal
183
  * @throws InvalidArgumentException if type can't be casted to integer
184
+ * @return DonationInterface
185
  */
186
  public function setGrandTotal($grandTotal);
187
 
196
  * @param string $firstName
197
  * @param string $lastName
198
  * @param string $streetAddress
199
+ * @param int|string $zip (if string, than digit only)
200
  * @param string $city
201
  * @param string $countryCode two digit country code; if not given, the code from your settings will be used
202
  *
203
+ * @return Donation
204
  * @throws InvalidArgumentException
205
  */
206
  public function setDonator($email, $firstName, $lastName, $streetAddress, $zip, $city, $countryCode = NULL);
lib/{Elefunds → Lfnds}/Model/Factory.php RENAMED
@@ -3,7 +3,7 @@
3
  /**
4
  * elefunds API PHP Library
5
  *
6
- * Copyright (c) 2012, elefunds GmbH <hello@elefunds.de>.
7
  * All rights reserved.
8
  *
9
  * Redistribution and use in source and binary forms, with or without
@@ -37,7 +37,12 @@
37
  *
38
  */
39
 
 
 
 
 
40
  require_once 'ReceiverInterface.php';
 
41
 
42
  /**
43
  * Elefunds Model Factory
@@ -45,12 +50,12 @@ require_once 'ReceiverInterface.php';
45
  * @package elefunds API PHP Library
46
  * @subpackage Model
47
  * @author Christian Peters <christian@elefunds.de>
48
- * @copyright 2012 elefunds GmbH <hello@elefunds.de>
49
  * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
50
  * @link http://www.elefunds.de
51
  * @since File available since Release 1.0.0
52
  */
53
- class Elefunds_Model_Factory {
54
 
55
  /**
56
  * @var string
@@ -89,14 +94,14 @@ class Elefunds_Model_Factory {
89
  /**
90
  * Returns a copy of the provided donation.
91
  *
92
- * @throws Elefunds_Exception_ElefundsException if class does not implement the DonationInterface
93
- * @return Elefunds_Model_DonationInterface
94
  */
95
  public static function getDonation() {
96
  $donationPrototype = new self::$donationPrototype();
97
- if ($donationPrototype instanceof Elefunds_Model_DonationInterface === FALSE) {
98
- throw new Elefunds_Exception_ElefundsException(
99
- 'Given prototype for donation does not implement Elefunds_Model_DonationInterface',
100
  1347883795444);
101
  }
102
  return $donationPrototype;
@@ -105,13 +110,13 @@ class Elefunds_Model_Factory {
105
  /**
106
  * Returns a copy of the provided receiver.
107
  *
108
- * @throws Elefunds_Exception_ElefundsException if class does not implement the ReceiverInterface
109
- * @return Elefunds_Model_ReceiverInterface
110
  */
111
  public static function getReceiver() {
112
  $receiverPrototype = new self::$receiverPrototype();
113
- if ($receiverPrototype instanceof Elefunds_Model_ReceiverInterface === FALSE) {
114
- throw new Elefunds_Exception_ElefundsException(
115
  'Given prototype for donation does not implement Elefunds_Model_ReceiverInterface',
116
  1347883795444);
117
  }
3
  /**
4
  * elefunds API PHP Library
5
  *
6
+ * Copyright (c) 2012 - 2013, elefunds GmbH <hello@elefunds.de>.
7
  * All rights reserved.
8
  *
9
  * Redistribution and use in source and binary forms, with or without
37
  *
38
  */
39
 
40
+ namespace Lfnds\Model;
41
+
42
+ use Lfnds\Exception\ElefundsException;
43
+
44
  require_once 'ReceiverInterface.php';
45
+ require_once 'DonationInterface.php';
46
 
47
  /**
48
  * Elefunds Model Factory
50
  * @package elefunds API PHP Library
51
  * @subpackage Model
52
  * @author Christian Peters <christian@elefunds.de>
53
+ * @copyright 2012 - 2013 elefunds GmbH <hello@elefunds.de>
54
  * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
55
  * @link http://www.elefunds.de
56
  * @since File available since Release 1.0.0
57
  */
58
+ class Factory {
59
 
60
  /**
61
  * @var string
94
  /**
95
  * Returns a copy of the provided donation.
96
  *
97
+ * @throws ElefundsException if class does not implement the DonationInterface
98
+ * @return DonationInterface
99
  */
100
  public static function getDonation() {
101
  $donationPrototype = new self::$donationPrototype();
102
+ if ($donationPrototype instanceof DonationInterface === FALSE) {
103
+ throw new ElefundsException(
104
+ 'Given prototype for donation does not implement DonationInterface',
105
  1347883795444);
106
  }
107
  return $donationPrototype;
110
  /**
111
  * Returns a copy of the provided receiver.
112
  *
113
+ * @throws ElefundsException if class does not implement the ReceiverInterface
114
+ * @return ReceiverInterface
115
  */
116
  public static function getReceiver() {
117
  $receiverPrototype = new self::$receiverPrototype();
118
+ if ($receiverPrototype instanceof ReceiverInterface === FALSE) {
119
+ throw new ElefundsException(
120
  'Given prototype for donation does not implement Elefunds_Model_ReceiverInterface',
121
  1347883795444);
122
  }
lib/{Elefunds → Lfnds}/Model/Receiver.php RENAMED
@@ -3,7 +3,7 @@
3
  /**
4
  * elefunds API PHP Library
5
  *
6
- * Copyright (c) 2012, elefunds GmbH <hello@elefunds.de>.
7
  * All rights reserved.
8
  *
9
  * Redistribution and use in source and binary forms, with or without
@@ -37,6 +37,9 @@
37
  *
38
  */
39
 
 
 
 
40
  require_once 'ReceiverInterface.php';
41
 
42
  /**
@@ -45,12 +48,12 @@ require_once 'ReceiverInterface.php';
45
  * @package elefunds API PHP Library
46
  * @subpackage Model
47
  * @author Christian Peters <christian@elefunds.de>
48
- * @copyright 2012 elefunds GmbH <hello@elefunds.de>
49
  * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
50
  * @link http://www.elefunds.de
51
  * @since File available since Release 1.0.0
52
  */
53
- class Elefunds_Model_Receiver implements Elefunds_Model_ReceiverInterface {
54
 
55
  const IMAGE_ORIENTATION_VERTICAL = 'vertical';
56
  const IMAGE_ORIENTATION_HORIZONTAL = 'horizontal';
@@ -93,11 +96,6 @@ class Elefunds_Model_Receiver implements Elefunds_Model_ReceiverInterface {
93
  */
94
  protected $images;
95
 
96
- /**
97
- * @var DateTime
98
- */
99
- protected $validTime;
100
-
101
  /**
102
  * Initializes the indices of the images array.
103
  */
@@ -123,7 +121,7 @@ class Elefunds_Model_Receiver implements Elefunds_Model_ReceiverInterface {
123
  *
124
  * @param int
125
  * @throws InvalidArgumentException if given type is not int
126
- * @return Elefunds_Model_ReceiverInterface
127
  */
128
  public function setId($id) {
129
  if (is_int($id) && $id > 0) {
@@ -149,7 +147,7 @@ class Elefunds_Model_Receiver implements Elefunds_Model_ReceiverInterface {
149
  *
150
  * @param string $name
151
  * @throws InvalidArgumentException if given type is not string
152
- * @return Elefunds_Model_ReceiverInterface
153
  */
154
  public function setName($name) {
155
  if (is_string($name)) {
@@ -175,7 +173,7 @@ class Elefunds_Model_Receiver implements Elefunds_Model_ReceiverInterface {
175
  *
176
  * @param string $description
177
  * @throws InvalidArgumentException if given type is not string
178
- * @return Elefunds_Model_ReceiverInterface
179
  */
180
  public function setDescription($description) {
181
  if (is_string($description)) {
@@ -203,16 +201,11 @@ class Elefunds_Model_Receiver implements Elefunds_Model_ReceiverInterface {
203
  * @param string $orientation must be either 'horizontal' or 'vertical'
204
  * @param string $size either 'small', 'medium' or 'large'
205
  * @throws InvalidArgumentException if url, orientation or size are not in correct format#
206
- * @return Elefunds_Model_ReceiverInterface
207
  */
208
  public function addImage($url, $orientation, $size) {
209
 
210
- // @todo remove once 5.3.3 or higher is supported php version
211
- // Fix for PHP <= 5.3.2
212
- // https://bugs.php.net/bug.php?id=51192
213
- $tempUrl = str_replace('-', '', $url);
214
-
215
- $validUrl = filter_var($tempUrl, FILTER_VALIDATE_URL) !== FALSE;
216
 
217
  if ($validUrl && isset($this->images[$orientation]) && isset($this->images[$orientation][$size])) {
218
  $this->images[$orientation][$size] = $url;
@@ -261,7 +254,7 @@ class Elefunds_Model_Receiver implements Elefunds_Model_ReceiverInterface {
261
  *
262
  * @param array $images
263
  * @throws InvalidArgumentException if array is not of correct structure
264
- * @return Elefunds_Model_ReceiverInterface
265
  */
266
  public function setImages(array $images) {
267
  foreach ($images as $orientation => $sizes) {
@@ -303,43 +296,19 @@ class Elefunds_Model_Receiver implements Elefunds_Model_ReceiverInterface {
303
  }
304
 
305
  /**
306
- * Checks whether the receiver is valid.
307
- *
308
- * When you are retrieving the receiver from the API
309
- * it should always be valid. However, if you are
310
- * persisting receivers or cache them, you can check
311
- * if you need to refresh with this method.
312
- *
313
- * @return bool
314
- */
315
- public function isValid() {
316
- return new DateTime() < $this->validTime;
317
- }
318
-
319
- /**
320
- * Returns the DateTime on which this receiver
321
- * expires.
322
- *
323
- * @return DateTime
324
- */
325
- public function getValidTime() {
326
- return $this->validTime;
327
- }
328
-
329
- /**
330
- * Setter for the time until which the receiver is
331
- * valid.
332
- *
333
- * @param DateTime $validTime
334
  *
335
- * @return Elefunds_Model_ReceiverInterface
336
  */
337
- public function setValidTime(DateTime $validTime) {
338
-
339
- $this->validTime = $validTime;
340
- return $this;
341
-
 
 
 
342
  }
343
-
344
  }
345
 
3
  /**
4
  * elefunds API PHP Library
5
  *
6
+ * Copyright (c) 2012 - 2013, elefunds GmbH <hello@elefunds.de>.
7
  * All rights reserved.
8
  *
9
  * Redistribution and use in source and binary forms, with or without
37
  *
38
  */
39
 
40
+ namespace Lfnds\Model;
41
+ use InvalidArgumentException;
42
+
43
  require_once 'ReceiverInterface.php';
44
 
45
  /**
48
  * @package elefunds API PHP Library
49
  * @subpackage Model
50
  * @author Christian Peters <christian@elefunds.de>
51
+ * @copyright 2012 - 2013 elefunds GmbH <hello@elefunds.de>
52
  * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
53
  * @link http://www.elefunds.de
54
  * @since File available since Release 1.0.0
55
  */
56
+ class Receiver implements ReceiverInterface {
57
 
58
  const IMAGE_ORIENTATION_VERTICAL = 'vertical';
59
  const IMAGE_ORIENTATION_HORIZONTAL = 'horizontal';
96
  */
97
  protected $images;
98
 
 
 
 
 
 
99
  /**
100
  * Initializes the indices of the images array.
101
  */
121
  *
122
  * @param int
123
  * @throws InvalidArgumentException if given type is not int
124
+ * @return ReceiverInterface
125
  */
126
  public function setId($id) {
127
  if (is_int($id) && $id > 0) {
147
  *
148
  * @param string $name
149
  * @throws InvalidArgumentException if given type is not string
150
+ * @return ReceiverInterface
151
  */
152
  public function setName($name) {
153
  if (is_string($name)) {
173
  *
174
  * @param string $description
175
  * @throws InvalidArgumentException if given type is not string
176
+ * @return ReceiverInterface
177
  */
178
  public function setDescription($description) {
179
  if (is_string($description)) {
201
  * @param string $orientation must be either 'horizontal' or 'vertical'
202
  * @param string $size either 'small', 'medium' or 'large'
203
  * @throws InvalidArgumentException if url, orientation or size are not in correct format#
204
+ * @return ReceiverInterface
205
  */
206
  public function addImage($url, $orientation, $size) {
207
 
208
+ $validUrl = filter_var($url, FILTER_VALIDATE_URL) !== FALSE;
 
 
 
 
 
209
 
210
  if ($validUrl && isset($this->images[$orientation]) && isset($this->images[$orientation][$size])) {
211
  $this->images[$orientation][$size] = $url;
254
  *
255
  * @param array $images
256
  * @throws InvalidArgumentException if array is not of correct structure
257
+ * @return ReceiverInterface
258
  */
259
  public function setImages(array $images) {
260
  foreach ($images as $orientation => $sizes) {
296
  }
297
 
298
  /**
299
+ * Returns an associative array with all available information
300
+ * about this receiver instance.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
301
  *
302
+ * @return array
303
  */
304
+ public function toArray()
305
+ {
306
+ return array(
307
+ "id" => $this->getId(),
308
+ "name" => $this->getName(),
309
+ "description" => $this->getDescription(),
310
+ "vertical" => $this->getImages()
311
+ );
312
  }
 
313
  }
314
 
lib/{Elefunds → Lfnds}/Model/ReceiverInterface.php RENAMED
@@ -3,7 +3,7 @@
3
  /**
4
  * elefunds API PHP Library
5
  *
6
- * Copyright (c) 2012, elefunds GmbH <hello@elefunds.de>.
7
  * All rights reserved.
8
  *
9
  * Redistribution and use in source and binary forms, with or without
@@ -37,25 +37,28 @@
37
  *
38
  */
39
 
 
 
 
40
  /**
41
  * Elefunds Receiver Interface
42
  *
43
  * @package elefunds API PHP Library
44
  * @subpackage Model
45
  * @author Christian Peters <christian@elefunds.de>
46
- * @copyright 2012 elefunds GmbH <hello@elefunds.de>
47
  * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
48
  * @link http://www.elefunds.de
49
  * @since File available since Release 1.0.0
50
  */
51
- interface Elefunds_Model_ReceiverInterface {
52
 
53
  /**
54
  * Sets the ID of the receiver.
55
  *
56
  * @param int
57
  * @throws InvalidArgumentException if given type is not int
58
- * @return Elefunds_Model_ReceiverInterface
59
  */
60
  public function setId($id);
61
 
@@ -71,7 +74,7 @@ interface Elefunds_Model_ReceiverInterface {
71
  *
72
  * @param string $name
73
  * @throws InvalidArgumentException if given type is not string
74
- * @return Elefunds_Model_ReceiverInterface
75
  */
76
  public function setName($name);
77
  /**
@@ -86,7 +89,7 @@ interface Elefunds_Model_ReceiverInterface {
86
  *
87
  * @param int
88
  * @throws InvalidArgumentException if given type is not string
89
- * @return Elefunds_Model_ReceiverInterface
90
  */
91
  public function setDescription($description);
92
 
@@ -104,7 +107,7 @@ interface Elefunds_Model_ReceiverInterface {
104
  * @param string $orientation must be either 'horizontal' or 'vertical'
105
  * @param string $size either 'small', 'medium' or 'large'
106
  * @throws InvalidArgumentException if url, orientation or size are not in correct format#
107
- * @return Elefunds_Model_ReceiverInterface
108
  */
109
  public function addImage($url, $orientation, $size);
110
 
@@ -140,7 +143,7 @@ interface Elefunds_Model_ReceiverInterface {
140
  *
141
  * @param array $images
142
  * @throws InvalidArgumentException if array is not of correct structure
143
- * @return Elefunds_Model_ReceiverInterface
144
  */
145
  public function setImages(array $images);
146
 
@@ -168,34 +171,13 @@ interface Elefunds_Model_ReceiverInterface {
168
  */
169
  public function getImages();
170
 
171
- /**
172
- * Checks whether the receiver is valid.
173
- *
174
- * When you are retrieving the receiver from the API
175
- * it should always be valid. However, if you are
176
- * persisting receivers or cache them, you can check
177
- * if you need to refresh with this method.
178
- *
179
- * @return bool
180
- */
181
- public function isValid();
182
-
183
  /**
184
- * Returns the DateTime on which this receiver
185
- * expires.
186
  *
187
- * @return DateTime
188
  */
189
- public function getValidTime();
 
190
 
191
- /**
192
- * Setter for the time until which the receiver is
193
- * valid.
194
- *
195
- * @param DateTime $validTime
196
- *
197
- * @return Elefunds_Model_ReceiverInterface
198
- */
199
- public function setValidTime(DateTime $validTime);
200
-
201
  }
3
  /**
4
  * elefunds API PHP Library
5
  *
6
+ * Copyright (c) 2012 - 2013, elefunds GmbH <hello@elefunds.de>.
7
  * All rights reserved.
8
  *
9
  * Redistribution and use in source and binary forms, with or without
37
  *
38
  */
39
 
40
+ namespace Lfnds\Model;
41
+ use InvalidArgumentException;
42
+
43
  /**
44
  * Elefunds Receiver Interface
45
  *
46
  * @package elefunds API PHP Library
47
  * @subpackage Model
48
  * @author Christian Peters <christian@elefunds.de>
49
+ * @copyright 2012 - 2013 elefunds GmbH <hello@elefunds.de>
50
  * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
51
  * @link http://www.elefunds.de
52
  * @since File available since Release 1.0.0
53
  */
54
+ interface ReceiverInterface {
55
 
56
  /**
57
  * Sets the ID of the receiver.
58
  *
59
  * @param int
60
  * @throws InvalidArgumentException if given type is not int
61
+ * @return ReceiverInterface
62
  */
63
  public function setId($id);
64
 
74
  *
75
  * @param string $name
76
  * @throws InvalidArgumentException if given type is not string
77
+ * @return ReceiverInterface
78
  */
79
  public function setName($name);
80
  /**
89
  *
90
  * @param int
91
  * @throws InvalidArgumentException if given type is not string
92
+ * @return ReceiverInterface
93
  */
94
  public function setDescription($description);
95
 
107
  * @param string $orientation must be either 'horizontal' or 'vertical'
108
  * @param string $size either 'small', 'medium' or 'large'
109
  * @throws InvalidArgumentException if url, orientation or size are not in correct format#
110
+ * @return ReceiverInterface
111
  */
112
  public function addImage($url, $orientation, $size);
113
 
143
  *
144
  * @param array $images
145
  * @throws InvalidArgumentException if array is not of correct structure
146
+ * @return ReceiverInterface
147
  */
148
  public function setImages(array $images);
149
 
171
  */
172
  public function getImages();
173
 
 
 
 
 
 
 
 
 
 
 
 
 
174
  /**
175
+ * Returns an associative array with all available information
176
+ * about this receiver instance.
177
  *
178
+ * @return array
179
  */
180
+ public function toArray();
181
+
182
 
 
 
 
 
 
 
 
 
 
 
183
  }
lib/{Elefunds → Lfnds}/README.md RENAMED
File without changes
lib/Lfnds/Template/Shop/Checkout.phtml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <div id="elefunds">
2
+ </div>
3
+ <script type="text/javascript">
4
+ window.elefundsOptions = <?php echo json_encode($view); ?>;
5
+ </script>
lib/{Elefunds/Template/Shop/ShopConfiguration.php → Lfnds/Template/Shop/CheckoutConfiguration.php} RENAMED
@@ -3,7 +3,7 @@
3
  /**
4
  * elefunds API PHP Library
5
  *
6
- * Copyright (c) 2012, elefunds GmbH <hello@elefunds.de>.
7
  * All rights reserved.
8
  *
9
  * Redistribution and use in source and binary forms, with or without
@@ -34,84 +34,83 @@
34
  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
35
  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36
  * POSSIBILITY OF SUCH DAMAGE.
37
- *
38
  */
39
 
40
- require_once dirname(__FILE__) . '/../../Configuration/DefaultConfiguration.php';
41
- require_once dirname(__FILE__) . '/../../View/BaseView.php';
42
- require_once dirname(__FILE__) . '/Hooks/ShopHooks.php';
 
43
 
44
  /**
45
- * Shop Configuration for a shop template.
46
  *
47
  * @package elefunds API PHP Library
48
  * @subpackage Template\Shop
49
  * @author Christian Peters <christian@elefunds.de>
50
- * @copyright 2013 elefunds GmbH <hello@elefunds.de>
51
  * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
52
  * @link http://www.elefunds.de
53
- * @since File available since Release 1.2.0
54
  */
55
- class Elefunds_Template_Shop_ShopConfiguration extends Elefunds_Configuration_DefaultConfiguration {
56
-
57
- /**
58
- * @var array
59
- */
60
- protected $themes;
61
 
62
  /**
63
- * @var array
64
- */
65
- protected $colors;
66
-
67
- /**
68
- * Assigns the receivers.
69
  *
70
  * @return void
71
  */
72
  public function init() {
73
 
74
  parent::init();
 
75
 
76
- $this->setView(new Elefunds_View_BaseView());
77
- $this->view->setTemplate('Shop');
 
 
 
 
 
 
 
 
 
 
 
 
78
 
79
- //Available theme and color choices
80
  $this->themes = array('light', 'dark');
81
- $this->colors = array('orange', 'blue', 'green', 'purple', 'grey');
82
 
83
- //Chose your theme and color
84
  $theme = $this->themes[0];
85
- $color = $this->colors[0];
86
 
87
- $this->view->addJavascriptFile('elefunds.jquery.min.js');
88
-
89
- $this->view->registerAssignHook('skin', 'Elefunds_Template_Shop_Hooks_ShopHooks', 'chooseCssFile');
90
  $this->view->assign('skin',
91
  array(
92
  'theme' => $theme,
93
- 'color' => $color
 
 
94
  )
95
  );
96
 
 
 
 
 
 
 
 
97
  }
98
 
 
99
  /**
100
- * Get the available theme options
101
  *
102
  * @return array
103
  */
104
  public function getAvailableThemes() {
105
  return $this->themes;
106
  }
107
-
108
- /**
109
- * Get the available color options
110
- *
111
- * @return array
112
- */
113
- public function getAvailableColors() {
114
- return $this->colors;
115
- }
116
-
117
  }
3
  /**
4
  * elefunds API PHP Library
5
  *
6
+ * Copyright (c) 2012 - 2013, elefunds GmbH <hello@elefunds.de>.
7
  * All rights reserved.
8
  *
9
  * Redistribution and use in source and binary forms, with or without
34
  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
35
  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36
  * POSSIBILITY OF SUCH DAMAGE.
 
37
  */
38
 
39
+ namespace Lfnds\Template\Shop;
40
+
41
+ require_once __DIR__ . '/ShopConfiguration.php';
42
+ require_once __DIR__ . '/../../View/BaseView.php';
43
 
44
  /**
45
+ * Checkout Configuration for a shop template.
46
  *
47
  * @package elefunds API PHP Library
48
  * @subpackage Template\Shop
49
  * @author Christian Peters <christian@elefunds.de>
50
+ * @copyright 2012 - 2013 elefunds GmbH <hello@elefunds.de>
51
  * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
52
  * @link http://www.elefunds.de
53
+ * @since File available since Release 1.0.0
54
  */
55
+ class CheckoutConfiguration extends ShopConfiguration {
 
 
 
 
 
56
 
57
  /**
58
+ * Define the checkout variables for the shop template.
 
 
 
 
 
59
  *
60
  * @return void
61
  */
62
  public function init() {
63
 
64
  parent::init();
65
+ $this->view->setRenderFile('Checkout.phtml');
66
 
67
+ $this->view->assignMultiple(
68
+ array(
69
+ 'clientId' => $this->getClientId(),
70
+ 'countryCode' => $this->getCountrycode(),
71
+ 'view' => 'module',
72
+ // If set to FALSE, no donation receipt if offered.
73
+ // If TRUE you have to adjust T&Cs and send back donator information
74
+ // Refer to the documentation for further information.
75
+ 'offerDonationReceipt' => TRUE,
76
+ // Defaults, you can opt to override this if you like.
77
+ 'currency' => '€',
78
+ 'currencyDelimiter' => ','
79
+ )
80
+ );
81
 
82
+ // Available theme and color choices
83
  $this->themes = array('light', 'dark');
 
84
 
85
+ // Chose your theme and color
86
  $theme = $this->themes[0];
87
+ $color = '#00efa2';
88
 
 
 
 
89
  $this->view->assign('skin',
90
  array(
91
  'theme' => $theme,
92
+ 'color' => $color,
93
+ // Receiver logo orientation
94
+ 'orientation' => 'horizontal'
95
  )
96
  );
97
 
98
+ // To implement this template in a shop, you have to add the following
99
+ // (preferably in your own extending class, or via $facade->getConfiguration->getView()->assign()):
100
+ // $this->view->assign('formSelector', '#css .selector .of .form');
101
+ // $this->view->assign('totalSelector', '#css .selector .of .total');
102
+ // $this->view->assign('rowLabel', '#css .selector .of .row .label');
103
+ // $this->view->assign('rowValue', '#css .selector .of .row .value');
104
+
105
  }
106
 
107
+
108
  /**
109
+ * Return the available theme choices.
110
  *
111
  * @return array
112
  */
113
  public function getAvailableThemes() {
114
  return $this->themes;
115
  }
 
 
 
 
 
 
 
 
 
 
116
  }
lib/Lfnds/Template/Shop/CheckoutSuccess.phtml ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <div id="elefunds-share"></div>
2
+ <script type="text/javascript">
3
+ //<![CDATA[
4
+ window.elefundsOptions = <?php echo json_encode($view); ?>;
5
+ //]]>
6
+ </script>
lib/{Elefunds/Example/ShopExampleCheckoutSuccessConfiguration.php → Lfnds/Template/Shop/CheckoutSuccessConfiguration.php} RENAMED
@@ -3,7 +3,7 @@
3
  /**
4
  * elefunds API PHP Library
5
  *
6
- * Copyright (c) 2012, elefunds GmbH <hello@elefunds.de>.
7
  * All rights reserved.
8
  *
9
  * Redistribution and use in source and binary forms, with or without
@@ -27,43 +27,43 @@
27
  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
28
  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
29
  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
30
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
31
  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
32
  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
33
  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34
  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
35
  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36
  * POSSIBILITY OF SUCH DAMAGE.
 
37
  */
38
 
39
- require_once dirname(__FILE__) . '/../Template/Shop/CheckoutSuccessConfiguration.php';
 
 
 
40
 
41
  /**
42
- * Sample Configuration for the elefunds API Shop Template Checkout view.
43
  *
44
  * @package elefunds API PHP Library
45
- * @subpackage Example
46
  * @author Christian Peters <christian@elefunds.de>
47
- * @copyright 2012 elefunds GmbH <hello@elefunds.de>
48
  * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
49
  * @link http://www.elefunds.de
50
  * @since File available since Release 1.0.0
51
  */
52
- class Elefunds_Example_ShopExampleCheckoutSuccessConfiguration extends Elefunds_Template_Shop_CheckoutSuccessConfiguration {
53
-
54
- //Insert your clientID and apiKey
55
- protected $clientId = 1001;
56
- protected $apiKey = 'ay3456789gg234561234';
57
-
58
- protected $countrycode = 'de';
59
 
60
  /**
61
- * Assigns the name of the shop.
62
  *
63
  * @return void
64
  */
65
  public function init() {
 
66
  parent::init();
 
 
67
  }
68
-
69
  }
3
  /**
4
  * elefunds API PHP Library
5
  *
6
+ * Copyright (c) 2012 - 2013, elefunds GmbH <hello@elefunds.de>.
7
  * All rights reserved.
8
  *
9
  * Redistribution and use in source and binary forms, with or without
27
  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
28
  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
29
  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
30
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIx^AL DAMAGES (INCLUDING,
31
  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
32
  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
33
  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34
  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
35
  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36
  * POSSIBILITY OF SUCH DAMAGE.
37
+ *
38
  */
39
 
40
+ namespace Lfnds\Template\Shop;
41
+
42
+ require_once __DIR__ . '/ShopConfiguration.php';
43
+ require_once __DIR__ . '/../../View/BaseView.php';
44
 
45
  /**
46
+ * Base Configuration for the checkout success configuration of the shop template.
47
  *
48
  * @package elefunds API PHP Library
49
+ * @subpackage Template\Shop
50
  * @author Christian Peters <christian@elefunds.de>
51
+ * @copyright 2012 - 2013 elefunds GmbH <hello@elefunds.de>
52
  * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
53
  * @link http://www.elefunds.de
54
  * @since File available since Release 1.0.0
55
  */
56
+ class CheckoutSuccessConfiguration extends ShopConfiguration {
 
 
 
 
 
 
57
 
58
  /**
59
+ * Define the checkout success variables for the shop template.
60
  *
61
  * @return void
62
  */
63
  public function init() {
64
+
65
  parent::init();
66
+ $this->view->setRenderFile('CheckoutSuccess.phtml');
67
+ $this->view->assign('view', 'socialMediaShare');
68
  }
 
69
  }
lib/Lfnds/Template/Shop/Helper/RequestHelper.php ADDED
@@ -0,0 +1,234 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * elefunds API PHP Library
5
+ *
6
+ * Copyright (c) 2012 - 2013, elefunds GmbH <hello@elefunds.de>.
7
+ * All rights reserved.
8
+ *
9
+ * Redistribution and use in source and binary forms, with or without
10
+ * modification, are permitted provided that the following conditions
11
+ * are met:
12
+ *
13
+ * * Redistributions of source code must retain the above copyright
14
+ * notice, this list of conditions and the following disclaimer.
15
+ *
16
+ * * Redistributions in binary form must reproduce the above copyright
17
+ * notice, this list of conditions and the following disclaimer in
18
+ * the documentation and/or other materials provided with the
19
+ * distribution.
20
+ *
21
+ * * Neither the name of the elefunds GmbH nor the names of its
22
+ * contributors may be used to endorse or promote products derived
23
+ * from this software without specific prior written permission.
24
+ *
25
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
28
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
29
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
30
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
31
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
32
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
33
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
35
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36
+ * POSSIBILITY OF SUCH DAMAGE.
37
+ *
38
+ */
39
+
40
+ namespace Lfnds\Template\Shop\Helper;
41
+
42
+ /**
43
+ * Helper for request verification.
44
+ *
45
+ * @package elefunds API PHP Library
46
+ * @subpackage Template\Shop
47
+ * @author Christian Peters <christian@elefunds.de>
48
+ * @copyright 2012 - 2013 elefunds GmbH <hello@elefunds.de>
49
+ * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
50
+ * @link http://www.elefunds.de
51
+ * @since File available since Release 1.2.1
52
+ */
53
+
54
+ class RequestHelper {
55
+
56
+ protected $request;
57
+
58
+ /**
59
+ * @var array
60
+ */
61
+ protected $receivers;
62
+
63
+ /**
64
+ * Accepts the request as array.
65
+ *
66
+ * However, it's recommended to not pass an request, the helper will then use (and NOT alter) the $_POST
67
+ * superglobal.
68
+ *
69
+ * @param array $request
70
+ */
71
+ public function __construct(array $request = NULL) {
72
+ if (is_null($request)) {
73
+ $this->request = $_POST;
74
+ } else {
75
+ $this->request = $request;
76
+ }
77
+ }
78
+
79
+ /**
80
+ * Checks if the given request contains the basic information for the elefunds module and checks
81
+ * if the module is active. The module is active and valid if the following parameters are set:
82
+ *
83
+ * elefunds_agree: if the module is checked
84
+ * elefunds_donation_cent: the donation amount in cent
85
+ * elefunds_receivers[]: list of receivers the donation goes to
86
+ * elefunds_receivers: alternative - comma separated list of receivers as a string (in case the value is read from a hidden field)
87
+ *
88
+ * @return bool
89
+ */
90
+ public function isActiveAndValid() {
91
+
92
+ $agreedToElefunds = isset($this->request['elefunds_agree']) && $this->request['elefunds_agree'] !== 'false';
93
+ $hasDonation = $this->isConvertableToPositiveInt('elefunds_donation_cent');
94
+ $hasValidReceivers = count($this->validatedReceivers()) > 0;
95
+
96
+ return $agreedToElefunds && $hasDonation && $hasValidReceivers;
97
+ }
98
+
99
+ /**
100
+ * Returns the roundup of the request.
101
+ *
102
+ * @return int
103
+ */
104
+ public function getRoundUp() {
105
+ return (int)$this->request['elefunds_donation_cent'];
106
+ }
107
+
108
+ /**
109
+ * Returns the roundup as floated string (two decimal)
110
+ *
111
+ * @return string
112
+ */
113
+ public function getRoundUpAsFloatedString() {
114
+ return number_format($this->getRoundUp() / 100, 2);
115
+ }
116
+
117
+ /**
118
+ * Returns the receivers id's of the request, mapped to int and validated!
119
+ *
120
+ * @return array
121
+ */
122
+ public function getReceiverIds() {
123
+ return $this->receivers;
124
+ }
125
+
126
+ /**
127
+ * Returns the receivers that were available during the checkout.
128
+ *
129
+ * @return array
130
+ */
131
+ public function getAvailableReceiverIds() {
132
+ return $this->validatedReceivers(TRUE);
133
+ }
134
+
135
+ /**
136
+ * Returns the receivers as comma separated string (WWF, Ärzte ohne Grenzen, SOS Kinderdörfer).
137
+ *
138
+ * This method should not break things, as the module works internally with ids. However, if you need them for
139
+ * informational purposes, they are available here.
140
+ *
141
+ * If the receivers are not available for some reason, an empty string is returned.
142
+ *
143
+ * @return string
144
+ */
145
+ public function getReceiversAsString() {
146
+ $receiversAsString = '';
147
+ if (!isset($this->request['elefunds_receiver_names'])) {
148
+ return $receiversAsString;
149
+ }
150
+
151
+ if (is_array($this->request['elefunds_receiver_names'])) {
152
+ $receiversAsString = implode(', ', $this->request['elefunds_receiver_names']);
153
+ } else {
154
+ // We have to add a space, that's why we have to remap the values:
155
+ $receiversAsString = implode(', ', explode(',', $this->request['elefunds_receiver_names']));
156
+ }
157
+
158
+ return $receiversAsString;
159
+ }
160
+
161
+ /**
162
+ * Returns the suggested roundup in Cent as integer.
163
+ *
164
+ * @return int
165
+ */
166
+ public function getSuggestedRoundUp() {
167
+ if ($this->isConvertableToPositiveInt('elefunds_suggested_round_up_cent')) {
168
+ return (int)$this->request['elefunds_suggested_round_up_cent'];
169
+ }
170
+ return 0;
171
+ }
172
+
173
+ /**
174
+ * Returns true if the customer requested a donation receipt.
175
+ *
176
+ * @return bool
177
+ */
178
+ public function isDonationReceiptRequested() {
179
+ return isset($this->request['elefunds_receipt']) && $this->request['elefunds_receipt'] !== 'false';
180
+ }
181
+
182
+ /**
183
+ * Returns true if the requestKey is positive.
184
+ *
185
+ * @param string $requestKey
186
+ * @return bool
187
+ */
188
+ protected function isConvertableToPositiveInt($requestKey) {
189
+
190
+ if (is_int($this->request[$requestKey])) {
191
+ $isInt = TRUE;
192
+ } else {
193
+ $isInt = isset($this->request[$requestKey]) && ctype_digit($this->request[$requestKey]);
194
+ }
195
+
196
+ return $isInt && (int)$this->request[$requestKey] > 0;
197
+
198
+ }
199
+
200
+ /**
201
+ * Returns the receivers id's of the request, mapped to int and validated and assigns them
202
+ * to $this->receivers.
203
+ *
204
+ * The returned array is empty if not exist or if not all receivers are valid. We're very strict here,
205
+ * if a part of the array does not match, we invalidate the entire request.
206
+ *
207
+ * If you set validateAvailable to TRUE, the elefunds_available_receivers is validated.
208
+ *
209
+ * @param bool $validateAvailable
210
+ * @return array
211
+ */
212
+ protected function validatedReceivers($validateAvailable = FALSE) {
213
+
214
+ $receivers = $validateAvailable ? 'elefunds_available_receivers' : 'elefunds_receivers';
215
+ if (!isset($this->request[$receivers])) {
216
+ return array();
217
+ }
218
+
219
+ if (is_array($this->request[$receivers])) {
220
+ $integerIds = array_map(function($x) { return (int)$x; }, $this->request[$receivers]);
221
+ } else {
222
+ $integerIds = array_map(function($x) { return (int)$x; }, explode(',', $this->request[$receivers]));
223
+ }
224
+
225
+ $filtered = array_unique(array_filter($integerIds, function($x) { return $x > 0; }));
226
+ if (count($filtered) !== count($integerIds)) {
227
+ return array();
228
+ };
229
+
230
+ $this->receivers = $filtered;
231
+ return $filtered;
232
+ }
233
+
234
+ }
lib/{Elefunds/Example/RawDataConfiguration.php → Lfnds/Template/Shop/Hooks/ShopHooks.php} RENAMED
@@ -1,9 +1,9 @@
1
  <?php
2
 
3
  /**
4
- * elefunds API PHP Library
5
  *
6
- * Copyright (c) 2012, elefunds GmbH <hello@elefunds.de>.
7
  * All rights reserved.
8
  *
9
  * Redistribution and use in source and binary forms, with or without
@@ -36,25 +36,27 @@
36
  * POSSIBILITY OF SUCH DAMAGE.
37
  *
38
  */
39
-
40
- require_once dirname(__FILE__) . '/../Configuration/DefaultConfiguration.php';
41
 
42
  /**
43
- * Sample Configuration for the elefunds API.
44
- *
45
  * @package elefunds API PHP Library
46
- * @subpackage Example
47
  * @author Christian Peters <christian@elefunds.de>
48
- * @copyright 2012 elefunds GmbH <hello@elefunds.de>
49
  * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
50
  * @link http://www.elefunds.de
51
  * @since File available since Release 1.0.0
52
  */
53
- class Elefunds_Example_RawDataConfiguration extends Elefunds_Configuration_DefaultConfiguration {
54
-
55
- //Insert your clientID and apiKey
56
- protected $clientId = 1001;
57
- protected $apiKey = 'ay3456789gg234561234';
58
-
59
- protected $countrycode = 'de';
60
- }
 
 
1
  <?php
2
 
3
  /**
4
+ * elefunds API PHP Library
5
  *
6
+ * Copyright (c) 2012 - 2013, elefunds GmbH <hello@elefunds.de>.
7
  * All rights reserved.
8
  *
9
  * Redistribution and use in source and binary forms, with or without
36
  * POSSIBILITY OF SUCH DAMAGE.
37
  *
38
  */
39
+
40
+ namespace Lfnds\Template\Shop\Hooks;
41
 
42
  /**
43
+ * Hooks for the shop template.
44
+ *
45
  * @package elefunds API PHP Library
46
+ * @subpackage Template\Shop
47
  * @author Christian Peters <christian@elefunds.de>
48
+ * @copyright 2012 - 2013 elefunds GmbH <hello@elefunds.de>
49
  * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
50
  * @link http://www.elefunds.de
51
  * @since File available since Release 1.0.0
52
  */
53
+ class ShopHooks {
54
+
55
+ /**
56
+ * We currently do not need hooks for the base template, but if you have dependencies, that
57
+ * need to be calculated upon view assignment, you're free to do it here.
58
+ *
59
+ * Please refer to the docs for additional information on how to implement configuration hooks.
60
+ */
61
+
62
+ }
lib/{Elefunds/Example/ShopExampleConfiguration.php → Lfnds/Template/Shop/ShopConfiguration.php} RENAMED
@@ -1,9 +1,9 @@
1
  <?php
2
 
3
  /**
4
- * elefunds API PHP Library
5
  *
6
- * Copyright (c) 2012, elefunds GmbH <hello@elefunds.de>.
7
  * All rights reserved.
8
  *
9
  * Redistribution and use in source and binary forms, with or without
@@ -36,42 +36,49 @@
36
  * POSSIBILITY OF SUCH DAMAGE.
37
  *
38
  */
39
-
40
- require_once dirname(__FILE__) . '/../Template/Shop/CheckoutConfiguration.php';
 
 
 
 
 
 
 
41
 
42
  /**
43
- * Sample Configuration for the elefunds API Shop Template.
44
- *
45
  * @package elefunds API PHP Library
46
- * @subpackage Example
47
  * @author Christian Peters <christian@elefunds.de>
48
- * @copyright 2012 elefunds GmbH <hello@elefunds.de>
49
  * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
50
  * @link http://www.elefunds.de
51
- * @since File available since Release 1.0.0
52
  */
53
- class Elefunds_Example_ShopExampleConfiguration extends Elefunds_Template_Shop_CheckoutConfiguration {
54
-
55
- //Insert your clientID and apiKey
56
- protected $clientId = 1001;
57
- protected $apiKey = 'ay3456789gg234561234';
58
 
59
- protected $countrycode = 'de';
 
 
 
60
 
61
  /**
62
- * Assigns the shop width and the currency delimiter that should be used for the elefunds module.
 
 
63
  */
64
  public function init() {
65
-
66
  parent::init();
67
 
68
- /** You have to assign some vars here, to calculate the view. */
69
-
70
- // Width of the checkout area, ie. how wide you want the plugin to be
71
- $this->view->assign('shopWidth', 900);
 
72
 
73
- // These are default Values, you can override this if you have another currency # $this->view->assign('currency', '€'); #
74
- $this->view->assign('currencyDelimiter', '.');
75
  }
76
-
77
- }
1
  <?php
2
 
3
  /**
4
+ * elefunds API PHP Library
5
  *
6
+ * Copyright (c) 2012 - 2013, elefunds GmbH <hello@elefunds.de>.
7
  * All rights reserved.
8
  *
9
  * Redistribution and use in source and binary forms, with or without
36
  * POSSIBILITY OF SUCH DAMAGE.
37
  *
38
  */
39
+
40
+ namespace Lfnds\Template\Shop;
41
+
42
+ use Lfnds\Configuration\DefaultConfiguration;
43
+ use Lfnds\View\BaseView;
44
+
45
+ require_once __DIR__ . '/../../Configuration/DefaultConfiguration.php';
46
+ require_once __DIR__ . '/../../View/BaseView.php';
47
+ require_once __DIR__ . '/Hooks/ShopHooks.php';
48
 
49
  /**
50
+ * Shop Configuration for a shop template.
51
+ *
52
  * @package elefunds API PHP Library
53
+ * @subpackage Template\Shop
54
  * @author Christian Peters <christian@elefunds.de>
55
+ * @copyright 2013 elefunds GmbH <hello@elefunds.de>
56
  * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
57
  * @link http://www.elefunds.de
58
+ * @since File available since Release 1.2.0
59
  */
60
+ class ShopConfiguration extends DefaultConfiguration {
 
 
 
 
61
 
62
+ /**
63
+ * @var array
64
+ */
65
+ protected $themes;
66
 
67
  /**
68
+ * Assigns the receivers.
69
+ *
70
+ * @return void
71
  */
72
  public function init() {
73
+
74
  parent::init();
75
 
76
+ $this->setView(new BaseView());
77
+ $this->view->setTemplate('Shop');
78
+
79
+ $this->view->addJavascriptFile('https://43ce0697b91280cbef31-14c96824618f1f6e4d87350d0f98c98a.ssl.cf1.rackcdn.com/static/elefunds.min.js');
80
+ $this->view->addCssFile('https://43ce0697b91280cbef31-14c96824618f1f6e4d87350d0f98c98a.ssl.cf1.rackcdn.com/static/elefunds.css');
81
 
 
 
82
  }
83
+
84
+ }
lib/Lfnds/Test/Unit/Communication/CurlRequestTest.php ADDED
@@ -0,0 +1,234 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * elefunds API PHP Library
5
+ *
6
+ * Copyright (c) 2012 - 2013, elefunds GmbH <hello@elefunds.de>.
7
+ * All rights reserved.
8
+ *
9
+ * Redistribution and use in source and binary forms, with or without
10
+ * modification, are permitted provided that the following conditions
11
+ * are met:
12
+ *
13
+ * * Redistributions of source code must retain the above copyright
14
+ * notice, this list of conditions and the following disclaimer.
15
+ *
16
+ * * Redistributions in binary form must reproduce the above copyright
17
+ * notice, this list of conditions and the following disclaimer in
18
+ * the documentation and/or other materials provided with the
19
+ * distribution.
20
+ *
21
+ * * Neither the name of the elefunds GmbH nor the names of its
22
+ * contributors may be used to endorse or promote products derived
23
+ * from this software without specific prior written permission.
24
+ *
25
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
28
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
29
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
30
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
31
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
32
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
33
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
35
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36
+ * POSSIBILITY OF SUCH DAMAGE.
37
+ */
38
+
39
+ namespace Lfnds\Test\Unit\Communication;
40
+ use Lfnds\Communication\CurlRequest;
41
+ use Lfnds\Exception\ElefundsCommunicationException;
42
+ use ReflectionClass;
43
+
44
+ require_once __DIR__ . '/curlMock.php';
45
+ require_once __DIR__ . '/../../../Communication/CurlRequest.php';
46
+ require_once __DIR__ . '/../../../Exception/ElefundsCommunicationException.php';
47
+
48
+
49
+ /**
50
+ * Unit Test for CurlRequest.
51
+ *
52
+ * @package elefunds API PHP Library
53
+ * @subpackage Test
54
+ * @author Christian Peters <christian@elefunds.de>
55
+ * @copyright 2012 - 2013 elefunds GmbH <hello@elefunds.de>
56
+ * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
57
+ * @link http://www.elefunds.de
58
+ * @since File available since Release 1.0.0
59
+ */
60
+ class CurlRequestTest extends \PHPUnit_Framework_TestCase {
61
+
62
+ /**
63
+ * @var CurlRequest
64
+ */
65
+ private $curl;
66
+
67
+ /**
68
+ * Set up the curl request tests.
69
+ */
70
+ public function setUp() {
71
+ global $curlMockResponses;
72
+ $curlMockResponses = [
73
+ 'curl_exec' => 'Yeah, it works',
74
+ 'curl_getinfo' => 200,
75
+ 'curl_loaded' => TRUE
76
+ ];
77
+ }
78
+
79
+
80
+ /**
81
+ * Throws an exception if curl is not installed.
82
+ *
83
+ * @test
84
+ * @expectedException \Lfnds\Exception\ElefundsException
85
+ */
86
+ public function exceptionIsThrownIfCurlIsNotInstalled() {
87
+ global $curlMockResponses;
88
+ $curlMockResponses['curl_loaded'] = FALSE;
89
+ new CurlRequest();
90
+ }
91
+
92
+ /**
93
+ * Initializes the basic curl mock for get, post, put and delete.
94
+ */
95
+ public function initCurl() {
96
+ $this->curl = $this->getMock('Lfnds\Communication\CurlRequest', ['performRequest'], [], '', FALSE);
97
+ $this->curl->expects($this->once())
98
+ ->method('performRequest')
99
+ ->will($this->returnValue('requestPerformed'));
100
+
101
+ $reflectionClass = new ReflectionClass('Lfnds\Communication\CurlRequest');
102
+
103
+ $reflectionProperty = $reflectionClass->getProperty('curlOptions');
104
+ $reflectionProperty->setAccessible(TRUE);
105
+ $reflectionProperty->setValue($this->curl, array());
106
+ }
107
+
108
+ /**
109
+ * getSetsHttpMethodAndURLBeforeItPerformsTheRequest
110
+ *
111
+ * @test
112
+ */
113
+ public function getSetsHttpMethodAndURLBeforeItPerformsTheRequest() {
114
+ $this->initCurl();
115
+ $response = $this->curl->get('https://connect.elefunds.de');
116
+ $options = $this->getCurlOptions();
117
+
118
+ $this->assertSame('requestPerformed', $response);
119
+ $this->assertSame('GET', $options[CURLOPT_CUSTOMREQUEST]);
120
+ $this->assertSame('https://connect.elefunds.de', $options[CURLOPT_URL]);
121
+ }
122
+
123
+ /**
124
+ * postSetsHttpMethodHeaderBodyAndURLBeforeItPerformsTheRequest
125
+ *
126
+ * @test
127
+ */
128
+ public function postSetsHttpMethodHeaderBodyAndURLBeforeItPerformsTheRequest() {
129
+ $this->initCurl();
130
+ $response = $this->curl->post('https://connect.elefunds.de', 'Some body');
131
+ $options = $this->getCurlOptions();
132
+
133
+ $this->assertSame('requestPerformed', $response);
134
+ $this->assertSame('POST', $options[CURLOPT_CUSTOMREQUEST]);
135
+ $this->assertSame('https://connect.elefunds.de', $options[CURLOPT_URL]);
136
+ $this->assertSame('Some body', $options[CURLOPT_POSTFIELDS]);
137
+ $this->assertSame(array('Content-Type: application/json'), $options[CURLOPT_HTTPHEADER]);
138
+ }
139
+
140
+ /**
141
+ * putSetsHttpMethodHeaderBodyAndURLBeforeItPerformsTheRequest
142
+ *
143
+ * @test
144
+ */
145
+ public function putSetsHttpMethodHeaderBodyAndURLBeforeItPerformsTheRequest() {
146
+ $this->initCurl();
147
+ $response = $this->curl->put('https://connect.elefunds.de', 'Some body');
148
+ $options = $this->getCurlOptions();
149
+
150
+ $this->assertSame('requestPerformed', $response);
151
+ $this->assertSame('PUT', $options[CURLOPT_CUSTOMREQUEST]);
152
+ $this->assertSame('https://connect.elefunds.de', $options[CURLOPT_URL]);
153
+ $this->assertSame('Some body', $options[CURLOPT_POSTFIELDS]);
154
+ $this->assertSame(array('Content-Type: application/json'), $options[CURLOPT_HTTPHEADER]);
155
+ }
156
+
157
+ /**
158
+ * deleteSetsHttpMethodAndURLBeforeItPerformsTheRequest
159
+ *
160
+ * @test
161
+ */
162
+ public function deleteSetsHttpMethodAndURLBeforeItPerformsTheRequest() {
163
+ $this->initCurl();
164
+ $response = $this->curl->delete('https://connect.elefunds.de');
165
+ $options = $this->getCurlOptions();
166
+
167
+ $this->assertSame('requestPerformed', $response);
168
+ $this->assertSame('DELETE', $options[CURLOPT_CUSTOMREQUEST]);
169
+ $this->assertSame('https://connect.elefunds.de', $options[CURLOPT_URL]);
170
+ }
171
+
172
+ /**
173
+ * We mocked curl_setopt_array in curlMock.php, it would throw an
174
+ * InvalidArgumentException, if not all defaults and options are set.
175
+ *
176
+ * @test
177
+ */
178
+ public function performRequestSetsAdditionalOptionsAndDefaultsAndResetsCurlOptions() {
179
+ $this->curl = new CurlRequest();
180
+ $this->curl->get('https://connect.elefunds.de');
181
+ $this->assertSame(0, count($this->getCurlOptions()));
182
+ }
183
+
184
+ /**
185
+ * performRequestThrowsElefundsCommunicationExceptionOnServerFailure
186
+ *
187
+ * @expectedException \Lfnds\Exception\ElefundsCommunicationException
188
+ * @test
189
+ */
190
+ public function performRequestThrowsElefundsCommunicationExceptionOnServerFailure() {
191
+ global $curlMockResponses;
192
+ $curlMockResponses['curl_exec'] = FALSE;
193
+ $this->curl = new CurlRequest();
194
+ $this->curl->get('https://connect.elefunds.de');
195
+ }
196
+
197
+ /**
198
+ * performRequestThrowsElefundsCommunicationExceptionIfResponseCodeIsNot200
199
+ *
200
+ * @expectedException \Lfnds\Exception\ElefundsCommunicationException
201
+ * @test
202
+ */
203
+ public function performRequestThrowsElefundsCommunicationExceptionIfResponseCodeIsNot200() {
204
+ global $curlMockResponses;
205
+ $curlMockResponses['curl_getinfo'] = 500;
206
+ $this->curl = new CurlRequest();
207
+ $this->curl->get('https://connect.elefunds.de');
208
+ }
209
+
210
+ /**
211
+ * setUserAgentSetCurlUserAgentOption
212
+ *
213
+ * @test
214
+ */
215
+ public function setUserAgentSetCurlUserAgentOption() {
216
+ $this->curl = new CurlRequest();
217
+ $this->curl->setUserAgent('elefunds-magento v1.2.9');
218
+ $options = $this->getCurlOptions();
219
+ $this->assertSame($options[CURLOPT_USERAGENT], 'elefunds-magento v1.2.9');
220
+ }
221
+
222
+ /**
223
+ * Returns the protected property curlOptions
224
+ *
225
+ * @return array
226
+ */
227
+ private function getCurlOptions() {
228
+ $reflectionClass = new ReflectionClass('Lfnds\Communication\CurlRequest');
229
+ $reflectionProperty = $reflectionClass->getProperty('curlOptions');
230
+ $reflectionProperty->setAccessible(TRUE);
231
+ return $reflectionProperty->getValue($this->curl);
232
+ }
233
+
234
+ }
lib/Lfnds/Test/Unit/Communication/curlMock.php ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * elefunds API PHP Library
5
+ *
6
+ * Copyright (c) 2012 - 2013, elefunds GmbH <hello@elefunds.de>.
7
+ * All rights reserved.
8
+ *
9
+ * Redistribution and use in source and binary forms, with or without
10
+ * modification, are permitted provided that the following conditions
11
+ * are met:
12
+ *
13
+ * * Redistributions of source code must retain the above copyright
14
+ * notice, this list of conditions and the following disclaimer.
15
+ *
16
+ * * Redistributions in binary form must reproduce the above copyright
17
+ * notice, this list of conditions and the following disclaimer in
18
+ * the documentation and/or other materials provided with the
19
+ * distribution.
20
+ *
21
+ * * Neither the name of the elefunds GmbH nor the names of its
22
+ * contributors may be used to endorse or promote products derived
23
+ * from this software without specific prior written permission.
24
+ *
25
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
28
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
29
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
30
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
31
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
32
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
33
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
35
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36
+ * POSSIBILITY OF SUCH DAMAGE.
37
+ */
38
+
39
+ namespace Lfnds\Communication;
40
+
41
+ $curlMockResponses = [
42
+ 'curl_exec' => 'Yeah, it works',
43
+ 'curl_getinfo' => 200,
44
+ 'curl_loaded' => TRUE
45
+ ];
46
+
47
+ function extension_loaded() {
48
+ global $curlMockResponses;
49
+ return $curlMockResponses['curl_loaded'];
50
+ }
51
+
52
+ function curl_setopt_array($curl, $options) {
53
+
54
+ if (in_array(FALSE, [
55
+ $options[CURLOPT_RETURNTRANSFER] === TRUE,
56
+ $options[CURLOPT_USERAGENT] === 'elefunds-php',
57
+ strpos($options[CURLOPT_CAINFO], '/certificate/GandiProSSLCA.pem') !== FALSE
58
+ ])) {
59
+ throw new \InvalidArgumentException();
60
+ }
61
+ }
62
+
63
+ function curl_exec() {
64
+ global $curlMockResponses;
65
+ return $curlMockResponses['curl_exec'];
66
+ }
67
+
68
+ function curl_getinfo() {
69
+ global $curlMockResponses;
70
+ return $curlMockResponses['curl_getinfo'];
71
+ }
lib/Lfnds/Test/Unit/Configuration/BaseConfigurationTest.php ADDED
@@ -0,0 +1,254 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * elefunds API PHP Library
5
+ *
6
+ * Copyright (c) 2012 - 2013, elefunds GmbH <hello@elefunds.de>.
7
+ * All rights reserved.
8
+ *
9
+ * Redistribution and use in source and binary forms, with or without
10
+ * modification, are permitted provided that the following conditions
11
+ * are met:
12
+ *
13
+ * * Redistributions of source code must retain the above copyright
14
+ * notice, this list of conditions and the following disclaimer.
15
+ *
16
+ * * Redistributions in binary form must reproduce the above copyright
17
+ * notice, this list of conditions and the following disclaimer in
18
+ * the documentation and/or other materials provided with the
19
+ * distribution.
20
+ *
21
+ * * Neither the name of the elefunds GmbH nor the names of its
22
+ * contributors may be used to endorse or promote products derived
23
+ * from this software without specific prior written permission.
24
+ *
25
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
28
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
29
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
30
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
31
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
32
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
33
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
35
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36
+ * POSSIBILITY OF SUCH DAMAGE.
37
+ *
38
+ */
39
+
40
+ namespace Lfnds\Test\Unit\Configuration;
41
+
42
+ use Lfnds\Configuration\BaseConfiguration;
43
+ use Lfnds\Exception\ElefundsException;
44
+ use PHPUnit_Framework_TestCase;
45
+
46
+ require_once __DIR__ . '/../../../Configuration/BaseConfiguration.php';
47
+ require_once __DIR__ . '/../../../Communication/RestInterface.php';
48
+ require_once __DIR__ . '/../../../View/ViewInterface.php';
49
+
50
+ /**
51
+ * Unit Test for BaseConfiguration.
52
+ *
53
+ * @package elefunds API PHP Library
54
+ * @subpackage Test
55
+ * @author Christian Peters <christian@elefunds.de>
56
+ * @copyright 2012 - 2013 elefunds GmbH <hello@elefunds.de>
57
+ * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
58
+ * @link http://www.elefunds.de
59
+ * @since File available since Release 1.0.0
60
+ */
61
+ class BaseConfigurationTest extends PHPUnit_Framework_TestCase
62
+ {
63
+
64
+
65
+ /**
66
+ * @var BaseConfiguration
67
+ */
68
+ protected $baseConfiguration;
69
+
70
+ /**
71
+ * setApiUrlTrimsSlashesFromUrlIfExists
72
+ *
73
+ * @test
74
+ */
75
+ public function setApiUrlTrimsSlashesFromUrlIfExists()
76
+ {
77
+ $this->baseConfiguration = new BaseConfiguration();
78
+
79
+ $this->baseConfiguration->setApiUrl('http://elefunds.de/');
80
+ $this->assertSame('http://elefunds.de', $this->baseConfiguration->getApiUrl());
81
+
82
+ $this->baseConfiguration->setApiUrl('http://elefunds.de');
83
+ $this->assertSame('http://elefunds.de', $this->baseConfiguration->getApiUrl());
84
+
85
+ }
86
+
87
+ /**
88
+ * setClientCalculatesHashedKeyIfApiKeyIsAlreadySetAndGettersForClientIdAndHashedKeyAreWorking
89
+ *
90
+ * @test
91
+ */
92
+ public function setClientCalculatesHashedKeyIfApiKeyIsAlreadySetAndGettersForClientIdAndHashedKeyAreWorking()
93
+ {
94
+ $this->baseConfiguration = new BaseConfiguration();
95
+ $this->baseConfiguration->setApiKey('asdfaAdf123ddddddddd');
96
+ $this->baseConfiguration->setClientId(1234);
97
+
98
+ $this->assertSame(1234, $this->baseConfiguration->getClientId());
99
+ $this->assertSame('3382a100edcb335c6af4efc1d5fb37b4ec264553', $this->baseConfiguration->getHashedKey());
100
+ }
101
+
102
+
103
+ /**
104
+ * setApiKeyCalculatesHashedKeyIfClientIdIsAlreadySet
105
+ *
106
+ * @test
107
+ */
108
+ public function setApiKeyCalculatesHashedKeyIfClientIdIsAlreadySet()
109
+ {
110
+ $this->baseConfiguration = new BaseConfiguration();
111
+
112
+ $this->baseConfiguration->setClientId(1234);
113
+ $this->baseConfiguration->setApiKey('asdfaAdf123ddddddddd');
114
+
115
+ $this->assertSame('3382a100edcb335c6af4efc1d5fb37b4ec264553', $this->baseConfiguration->getHashedKey());
116
+ }
117
+
118
+ /**
119
+ * getHashedKeyThrowsErrorIfNotClientIdAndApiKeyAreSet
120
+ *
121
+ * @test
122
+ * @expectedException \Lfnds\Exception\ElefundsException
123
+ */
124
+ public function getHashedKeyThrowsErrorIfNotClientIdAndApiKeyAreSet()
125
+ {
126
+ $this->baseConfiguration = new BaseConfiguration();
127
+ $this->baseConfiguration->getHashedKey();
128
+
129
+ }
130
+
131
+ /**
132
+ * Tests if the view can be set.
133
+ *
134
+ * @test
135
+ */
136
+ public function setViewWorks()
137
+ {
138
+ $this->baseConfiguration = new BaseConfiguration();
139
+ $view = $this->getMock('Lfnds\View\ViewInterface');
140
+
141
+ $this->baseConfiguration->setView($view);
142
+ $this->assertSame($view, $this->baseConfiguration->getView());
143
+ }
144
+
145
+ /**
146
+ * setRestImplementationWorks
147
+ *
148
+ * @test
149
+ */
150
+ public function setRestImplementationWorks()
151
+ {
152
+ $this->baseConfiguration = new BaseConfiguration();
153
+ $rest = $this->getMock('Lfnds\Communication\RestInterface');
154
+
155
+ $this->baseConfiguration->setRestImplementation($rest);
156
+ $this->assertSame($rest, $this->baseConfiguration->getRestImplementation());
157
+ }
158
+
159
+ /**
160
+ * setDonationClassNameAcceptsOnlyLoadedClasses
161
+ *
162
+ * @test
163
+ */
164
+ public function setDonationClassNameAcceptsOnlyLoadedClasses()
165
+ {
166
+ $this->baseConfiguration = new BaseConfiguration();
167
+
168
+ // Interface reqs are tested by the factory, so we can pass any class here.
169
+ $this->baseConfiguration->setDonationClassName('Lfnds\Test\Unit\Configuration\BaseConfigurationTest');
170
+ $this->assertSame('Lfnds\Test\Unit\Configuration\BaseConfigurationTest', $this->baseConfiguration->getDonationClassName());
171
+ }
172
+
173
+ /**
174
+ * setDonationClassNameThrowsErrorIfClassIsNotLoaded
175
+ *
176
+ * @test
177
+ * @expectedException \Lfnds\Exception\ElefundsException
178
+ */
179
+ public function setDonationClassNameThrowsErrorIfClassIsNotLoaded()
180
+ {
181
+ $this->baseConfiguration = new BaseConfiguration();
182
+ $this->baseConfiguration->setDonationClassName('Some\Made\Up\ClassName');
183
+ }
184
+
185
+ /**
186
+ * setReceiverClassNameAcceptsOnlyLoadedClasses
187
+ *
188
+ * @test
189
+ */
190
+ public function setReceiverClassNameAcceptsOnlyLoadedClasses()
191
+ {
192
+ $this->baseConfiguration = new BaseConfiguration();
193
+
194
+ // Interface reqs are tested by the factory, so we can pass any class here.
195
+ $this->baseConfiguration->setReceiverClassName('Lfnds\Test\Unit\Configuration\BaseConfigurationTest');
196
+ $this->assertSame('Lfnds\Test\Unit\Configuration\BaseConfigurationTest', $this->baseConfiguration->getReceiverClassName());
197
+ }
198
+
199
+ /**
200
+ * setReceiverClassNameThrowsErrorIfClassIsNotLoaded
201
+ *
202
+ * @test
203
+ * @expectedException \Lfnds\Exception\ElefundsException
204
+ */
205
+ public function setReceiverClassNameThrowsErrorIfClassIsNotLoaded()
206
+ {
207
+ $this->baseConfiguration = new BaseConfiguration();
208
+ $this->baseConfiguration->setReceiverClassName('Some\Made\Up\ClassName');
209
+ }
210
+
211
+ /**
212
+ * setCountrycodeAcceptsCountrycodeAsString
213
+ *
214
+ * @test
215
+ */
216
+ public function setCountrycodeAcceptsCountrycodeAsString()
217
+ {
218
+ $this->baseConfiguration = new BaseConfiguration();
219
+ $this->baseConfiguration->setCountrycode('de');
220
+ $this->assertSame('de', $this->baseConfiguration->getCountrycode());
221
+ }
222
+
223
+ /**
224
+ * setLanguageThrowsErrorIfGivenParamIsNotACountrycode
225
+ *
226
+ * @test
227
+ * @expectedException \InvalidArgumentException
228
+ */
229
+ public function setLanguageThrowsErrorIfGivenParamIsNotACountrycode()
230
+ {
231
+ $this->baseConfiguration = new BaseConfiguration();
232
+ $this->baseConfiguration->setCountrycode('This is not a countrycode.');
233
+ }
234
+
235
+ /**
236
+ * setVersionAndModuleIdentifierSetACorrectString
237
+ *
238
+ * @test
239
+ */
240
+ public function setVersionAndModuleIdentifierSetACorrectString()
241
+ {
242
+ $rest = $this->getMock('Lfnds\Communication\RestInterface');
243
+ $rest->expects($this->once())
244
+ ->method('setUserAgent')
245
+ ->with('elefunds-magento v1.9.9');
246
+
247
+ $this->baseConfiguration = new BaseConfiguration();
248
+ $this->baseConfiguration->setRestImplementation($rest)
249
+ ->setVersionAndModuleIdentifier('1.9.9', 'elefunds-magento');
250
+
251
+ }
252
+
253
+
254
+ }
lib/{Elefunds/Configuration/DefaultConfiguration.php → Lfnds/Test/Unit/Configuration/DefaultConfigurationTest.php} RENAMED
@@ -3,7 +3,7 @@
3
  /**
4
  * elefunds API PHP Library
5
  *
6
- * Copyright (c) 2012, elefunds GmbH <hello@elefunds.de>.
7
  * All rights reserved.
8
  *
9
  * Redistribution and use in source and binary forms, with or without
@@ -37,44 +37,46 @@
37
  *
38
  */
39
 
40
- require_once dirname(__FILE__) . '/BaseConfiguration.php';
41
 
 
 
 
 
42
 
43
  /**
44
- * Default Configuration for the elefunds API.
45
  *
46
  * @package elefunds API PHP Library
47
- * @subpackage Configuration
48
  * @author Christian Peters <christian@elefunds.de>
49
- * @copyright 2012 elefunds GmbH <hello@elefunds.de>
50
  * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
51
  * @link http://www.elefunds.de
52
  * @since File available since Release 1.0.0
53
  */
54
- class Elefunds_Configuration_DefaultConfiguration extends Elefunds_Configuration_BaseConfiguration {
55
 
56
- protected $apiUrl = 'https://connect.elefunds.de';
 
 
 
 
 
 
 
57
 
58
- /**
59
- * Default configuration settings.
60
- *
61
- * The default configuration uses the basic Donation and Receiver implementations that
62
- * ship with the library, as well as a curl based REST connection.
63
- *
64
- * @return void
65
- */
66
- public function init() {
67
- require_once dirname(__FILE__) . '/../Communication/CurlRequest.php';
68
- $this->setRestImplementation(new Elefunds_Communication_CurlRequest());
69
 
70
- require_once dirname(__FILE__) . '/../Model/Donation.php';
71
- $this->setDonationClassName('Elefunds_Model_Donation');
72
 
73
- require_once dirname(__FILE__) . '/../Model/Receiver.php';
74
- $this->setReceiverClassName('Elefunds_Model_Receiver');
75
 
76
- Elefunds_Model_Factory::setReceiverImplementation($this->getReceiverClassName());
77
- Elefunds_Model_Factory::setDonationImplementation($this->getDonationClassName());
78
- }
79
 
80
- }
 
3
  /**
4
  * elefunds API PHP Library
5
  *
6
+ * Copyright (c) 2012 - 2013, elefunds GmbH <hello@elefunds.de>.
7
  * All rights reserved.
8
  *
9
  * Redistribution and use in source and binary forms, with or without
37
  *
38
  */
39
 
40
+ namespace Lfnds\Test\Unit\Configuration;
41
 
42
+ use Lfnds\Configuration\DefaultConfiguration;
43
+ use PHPUnit_Framework_TestCase;
44
+
45
+ require_once __DIR__ . '/../../../Configuration/DefaultConfiguration.php';
46
 
47
  /**
48
+ * Unit Test for DefaultConfiguration.
49
  *
50
  * @package elefunds API PHP Library
51
+ * @subpackage Test
52
  * @author Christian Peters <christian@elefunds.de>
53
+ * @copyright 2012 - 2013 elefunds GmbH <hello@elefunds.de>
54
  * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
55
  * @link http://www.elefunds.de
56
  * @since File available since Release 1.0.0
57
  */
58
+ class DefaultConfigurationTest extends PHPUnit_Framework_TestCase {
59
 
60
+ /**
61
+ * initSetsCurlDonationAndReceiver
62
+ *
63
+ * Checks if the correct model factory pattern is set are not included here.
64
+ *
65
+ * @test
66
+ */
67
+ public function initSetsCurlDonationAndReceiverAndVersionAndModule() {
68
 
69
+ $defaultConfiguration = $this->getMock('Lfnds\Configuration\DefaultConfiguration', ['setVersionAndModuleIdentifier']);
70
+ $defaultConfiguration->expects($this->once())
71
+ ->method('setVersionAndModuleIdentifier');
 
 
 
 
 
 
 
 
72
 
73
+ /** @var \Lfnds\Configuration\DefaultConfiguration $defaultConfiguration*/
74
+ $defaultConfiguration->init();
75
 
76
+ $this->assertInstanceOf('Lfnds\Communication\CurlRequest', $defaultConfiguration->getRestImplementation());
 
77
 
78
+ $this->assertSame('Lfnds\Model\Receiver', $defaultConfiguration->getReceiverClassName());
79
+ $this->assertSame('Lfnds\Model\Donation', $defaultConfiguration->getDonationClassName());
 
80
 
81
+ }
82
+ }
lib/{Elefunds → Lfnds}/Test/Unit/Exception/ElefundsExceptionTest.php RENAMED
@@ -3,7 +3,7 @@
3
  /**
4
  * elefunds API PHP Library
5
  *
6
- * Copyright (c) 2012, elefunds GmbH <hello@elefunds.de>.
7
  * All rights reserved.
8
  *
9
  * Redistribution and use in source and binary forms, with or without
@@ -37,28 +37,36 @@
37
  *
38
  */
39
 
40
- require_once dirname(__FILE__) . '/../../../Exception/ElefundsException.php';
 
 
 
 
 
41
 
42
  /**
43
- * Unit Test for Elefunds_Exception_ElefundsException.
44
  *
45
  * @package elefunds API PHP Library
46
  * @subpackage Test
47
  * @author Christian Peters <christian@elefunds.de>
48
- * @copyright 2012 elefunds GmbH <hello@elefunds.de>
49
  * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
50
  * @link http://www.elefunds.de
51
  * @since File available since Release 1.0.0
52
  */
53
- class Elefunds_Test_Unit_Exception_ElefundsExceptionTest extends PHPUnit_Framework_TestCase {
54
-
55
- protected $elefundsException;
 
 
 
56
 
57
  /**
58
  * Sets up the class under test.
59
  */
60
  public function setUp() {
61
- $this->elefundsException = new Elefunds_Exception_ElefundsException('Test Message', 12345, array("error" => "Hello World!!!"));
62
  }
63
 
64
  /**
@@ -69,7 +77,7 @@ class Elefunds_Test_Unit_Exception_ElefundsExceptionTest extends PHPUnit_Framewo
69
  public function toStringReturnsValuableInformation() {
70
 
71
  $this->assertSame(
72
- 'Elefunds_Exception_ElefundsException [Errorcode: 12345] : Test Message' . PHP_EOL
73
  . 'Additional information:' . PHP_EOL
74
  . 'error = Hello World!!!' . PHP_EOL
75
 
3
  /**
4
  * elefunds API PHP Library
5
  *
6
+ * Copyright (c) 2012 - 2013, elefunds GmbH <hello@elefunds.de>.
7
  * All rights reserved.
8
  *
9
  * Redistribution and use in source and binary forms, with or without
37
  *
38
  */
39
 
40
+ namespace Lfnds\Test\Unit\Exception;
41
+
42
+ use Lfnds\Exception\ElefundsException;
43
+ use PHPUnit_Framework_TestCase;
44
+
45
+ require_once __DIR__ . '/../../../Exception/ElefundsException.php';
46
 
47
  /**
48
+ * Unit Test for ElefundsException.
49
  *
50
  * @package elefunds API PHP Library
51
  * @subpackage Test
52
  * @author Christian Peters <christian@elefunds.de>
53
+ * @copyright 2012 - 2013 elefunds GmbH <hello@elefunds.de>
54
  * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
55
  * @link http://www.elefunds.de
56
  * @since File available since Release 1.0.0
57
  */
58
+ class ElefundsExceptionTest extends PHPUnit_Framework_TestCase {
59
+
60
+ /**
61
+ * @var ElefundsException
62
+ */
63
+ protected $elefundsException;
64
 
65
  /**
66
  * Sets up the class under test.
67
  */
68
  public function setUp() {
69
+ $this->elefundsException = new ElefundsException('Test Message', 12345, array("error" => "Hello World!!!"));
70
  }
71
 
72
  /**
77
  public function toStringReturnsValuableInformation() {
78
 
79
  $this->assertSame(
80
+ 'Lfnds\Exception\ElefundsException [Errorcode: 12345] : Test Message' . PHP_EOL
81
  . 'Additional information:' . PHP_EOL
82
  . 'error = Hello World!!!' . PHP_EOL
83
 
lib/{Elefunds → Lfnds}/Test/Unit/FacadeTest.php RENAMED
@@ -1,9 +1,9 @@
1
- x<?php
2
 
3
  /**
4
  * elefunds API PHP Library
5
  *
6
- * Copyright (c) 2012, elefunds GmbH <hello@elefunds.de>.
7
  * All rights reserved.
8
  *
9
  * Redistribution and use in source and binary forms, with or without
@@ -37,7 +37,14 @@ x<?php
37
  *
38
  */
39
 
40
- require_once dirname(__FILE__) . '/../../Facade.php';
 
 
 
 
 
 
 
41
 
42
  /**
43
  * Unit Test for Elefunds_Facade
@@ -45,15 +52,15 @@ require_once dirname(__FILE__) . '/../../Facade.php';
45
  * @package elefunds API PHP Library
46
  * @subpackage Test
47
  * @author Christian Peters <christian@elefunds.de>
48
- * @copyright 2012 elefunds GmbH <hello@elefunds.de>
49
  * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
50
  * @link http://www.elefunds.de
51
  * @since File available since Release 1.0.0
52
  */
53
- class Elefunds_Test_Unit_Facade extends PHPUnit_Framework_TestCase {
54
 
55
  /**
56
- * @var Elefunds_Facade
57
  */
58
  protected $facade;
59
 
@@ -66,7 +73,7 @@ class Elefunds_Test_Unit_Facade extends PHPUnit_Framework_TestCase {
66
  * Sets up the class under test.
67
  */
68
  public function setUp() {
69
- $this->facade = new Elefunds_Facade();
70
 
71
  date_default_timezone_set('Europe/Berlin');
72
  $this->uniqueTimestampForAllTests = new DateTime();
@@ -78,8 +85,7 @@ class Elefunds_Test_Unit_Facade extends PHPUnit_Framework_TestCase {
78
  * @test
79
  */
80
  public function setConfigurationCallsInit() {
81
-
82
- $configuration = $this->getMock('Elefunds_Configuration_ConfigurationInterface');
83
 
84
  $configuration->expects($this->once())
85
  ->method('init');
@@ -92,11 +98,11 @@ class Elefunds_Test_Unit_Facade extends PHPUnit_Framework_TestCase {
92
  * We test that here.
93
  *
94
  * @test
95
- * @expectedException Elefunds_Exception_ElefundsException
96
  */
97
  public function addDonationsThrowsErrorIfDonationIsNotRichEnough() {
98
 
99
- $configuration = $this->getMock('Elefunds_Configuration_ConfigurationInterface');
100
 
101
  $configuration->expects($this->once())
102
  ->method('getApiUrl')
@@ -112,7 +118,7 @@ class Elefunds_Test_Unit_Facade extends PHPUnit_Framework_TestCase {
112
 
113
  $this->facade->setConfiguration($configuration);
114
 
115
- $donations = array($this->getMock('Elefunds_Model_DonationInterface'));
116
 
117
  $this->facade->addDonations($donations);
118
  }
@@ -123,7 +129,7 @@ class Elefunds_Test_Unit_Facade extends PHPUnit_Framework_TestCase {
123
  * @test
124
  */
125
  public function cancelDonationCalculatesCorrectApiUrl() {
126
- $configuration = $this->getMock('Elefunds_Configuration_ConfigurationInterface');
127
 
128
  $configuration->expects($this->once())
129
  ->method('getApiUrl')
@@ -137,7 +143,7 @@ class Elefunds_Test_Unit_Facade extends PHPUnit_Framework_TestCase {
137
  ->method('getHashedKey')
138
  ->will($this->returnValue('3382a100edcb335c6af4efc1d5fb37b4ec264553'));
139
 
140
- $rest = $this->getMock('Elefunds_Communication_RestInterface');
141
 
142
  $rest->expects($this->once())
143
  ->method('delete')
@@ -155,13 +161,52 @@ class Elefunds_Test_Unit_Facade extends PHPUnit_Framework_TestCase {
155
  $this->assertSame('Works like a charm!', $result);
156
  }
157
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
158
  /**
159
  * completeDonationCalculatesCorrectApiUrl
160
  *
161
  * @test
162
  */
163
  public function completeDonationCalculatesCorrectApiUrl() {
164
- $configuration = $this->getMock('Elefunds_Configuration_ConfigurationInterface');
165
 
166
  $configuration->expects($this->once())
167
  ->method('getApiUrl')
@@ -175,11 +220,11 @@ class Elefunds_Test_Unit_Facade extends PHPUnit_Framework_TestCase {
175
  ->method('getHashedKey')
176
  ->will($this->returnValue('3382a100edcb335c6af4efc1d5fb37b4ec264553'));
177
 
178
- $rest = $this->getMock('Elefunds_Communication_RestInterface');
179
 
180
  $rest->expects($this->once())
181
  ->method('put')
182
- ->with($this->equalTo('https://api.elefunds.de/donations/1234/?clientId=1234&hashedKey=3382a100edcb335c6af4efc1d5fb37b4ec264553'))
183
  ->will($this->returnValue(json_encode(array('message' => 'Works like a charm!'))));
184
 
185
  $configuration->expects($this->once())
@@ -189,7 +234,45 @@ class Elefunds_Test_Unit_Facade extends PHPUnit_Framework_TestCase {
189
 
190
  $this->facade->setConfiguration($configuration);
191
 
192
- $result = $this->facade->completeDonation(1234);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
193
  $this->assertSame('Works like a charm!', $result);
194
  }
195
 
@@ -200,7 +283,7 @@ class Elefunds_Test_Unit_Facade extends PHPUnit_Framework_TestCase {
200
  */
201
  public function addDonationsCallsCorrectAPiUrl() {
202
 
203
- $configuration = $this->getMock('Elefunds_Configuration_ConfigurationInterface');
204
 
205
  $configuration->expects($this->once())
206
  ->method('getApiUrl')
@@ -214,7 +297,7 @@ class Elefunds_Test_Unit_Facade extends PHPUnit_Framework_TestCase {
214
  ->method('getHashedKey')
215
  ->will($this->returnValue('3382a100edcb335c6af4efc1d5fb37b4ec264553'));
216
 
217
- $rest = $this->getMock('Elefunds_Communication_RestInterface');
218
 
219
  $rest->expects($this->once())
220
  ->method('post')
@@ -239,7 +322,7 @@ class Elefunds_Test_Unit_Facade extends PHPUnit_Framework_TestCase {
239
  ->method('getRestImplementation')
240
  ->will($this->returnValue($rest));
241
 
242
- $donation = $this->getMock('Elefunds_Model_DonationInterface');
243
 
244
  $donation->expects($this->any())
245
  ->method('getForeignId')
@@ -287,7 +370,7 @@ class Elefunds_Test_Unit_Facade extends PHPUnit_Framework_TestCase {
287
  */
288
  public function cancelDonationsCallsCorrectAPiUrl() {
289
 
290
- $configuration = $this->getMock('Elefunds_Configuration_ConfigurationInterface');
291
 
292
  $configuration->expects($this->once())
293
  ->method('getApiUrl')
@@ -301,7 +384,7 @@ class Elefunds_Test_Unit_Facade extends PHPUnit_Framework_TestCase {
301
  ->method('getHashedKey')
302
  ->will($this->returnValue('3382a100edcb335c6af4efc1d5fb37b4ec264553'));
303
 
304
- $rest = $this->getMock('Elefunds_Communication_RestInterface');
305
 
306
  $rest->expects($this->once())
307
  ->method('delete')
@@ -317,6 +400,45 @@ class Elefunds_Test_Unit_Facade extends PHPUnit_Framework_TestCase {
317
  $this->assertSame($result, 'Works like a charm!');
318
  }
319
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
320
  /**
321
  * completeDonationsCallsCorrectAPiUrl
322
  *
@@ -324,7 +446,7 @@ class Elefunds_Test_Unit_Facade extends PHPUnit_Framework_TestCase {
324
  */
325
  public function completeDonationsCallsCorrectAPiUrl() {
326
 
327
- $configuration = $this->getMock('Elefunds_Configuration_ConfigurationInterface');
328
 
329
  $configuration->expects($this->once())
330
  ->method('getApiUrl')
@@ -338,7 +460,7 @@ class Elefunds_Test_Unit_Facade extends PHPUnit_Framework_TestCase {
338
  ->method('getHashedKey')
339
  ->will($this->returnValue('3382a100edcb335c6af4efc1d5fb37b4ec264553'));
340
 
341
- $rest = $this->getMock('Elefunds_Communication_RestInterface');
342
 
343
  $rest->expects($this->once())
344
  ->method('put')
@@ -358,10 +480,10 @@ class Elefunds_Test_Unit_Facade extends PHPUnit_Framework_TestCase {
358
  * getReceiversCallsCorrectApiUrlAndThrowsErrorIfWrongCountryCodeIsSet
359
  *
360
  * @test
361
- * @expectedException Elefunds_Exception_ElefundsCommunicationException
362
  */
363
  public function getReceiversCallsCorrectApiUrlAndThrowsErrorIfWrongCountryCodeIsSet() {
364
- $configuration = $this->getMock('Elefunds_Configuration_ConfigurationInterface');
365
 
366
  $configuration->expects($this->once())
367
  ->method('getApiUrl')
@@ -371,16 +493,11 @@ class Elefunds_Test_Unit_Facade extends PHPUnit_Framework_TestCase {
371
  ->method('getClientId')
372
  ->will($this->returnValue(1234));
373
 
374
- $configuration->expects($this->once())
375
- ->method('getHashedKey')
376
- ->will($this->returnValue('3382a100edcb335c6af4efc1d5fb37b4ec264553'));
377
-
378
-
379
- $rest = $this->getMock('Elefunds_Communication_RestInterface');
380
 
381
  $rest->expects($this->once())
382
  ->method('get')
383
- ->with($this->equalTo('https://api.elefunds.de/receivers/?clientId=1234&hashedKey=3382a100edcb335c6af4efc1d5fb37b4ec264553'))
384
  ->will($this->returnValue(json_encode(
385
  array(
386
  'receivers' => array(
@@ -428,12 +545,12 @@ class Elefunds_Test_Unit_Facade extends PHPUnit_Framework_TestCase {
428
  */
429
  public function getTemplateCssFilesReturnsArray() {
430
 
431
- $view = $this->getMock('Elefunds_View_ViewInterface');
432
  $view->expects($this->once())
433
  ->method('getCssFiles')
434
  ->will($this->returnValue(array('http://path/to/css.css')));
435
 
436
- $configuration = $this->getMock('Elefunds_Configuration_ConfigurationInterface');
437
 
438
  $configuration->expects($this->once())
439
  ->method('getView')
@@ -445,6 +562,29 @@ class Elefunds_Test_Unit_Facade extends PHPUnit_Framework_TestCase {
445
  $this->assertSame(array('http://path/to/css.css'), $files);
446
  }
447
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
448
  /**
449
  * renderTemplateReturnsStringFromViewIfViewIsSet
450
  *
@@ -452,12 +592,12 @@ class Elefunds_Test_Unit_Facade extends PHPUnit_Framework_TestCase {
452
  */
453
  public function renderTemplateReturnsStringFromViewIfViewIsSet() {
454
 
455
- $view = $this->getMock('Elefunds_View_ViewInterface');
456
  $view->expects($this->once())
457
  ->method('render')
458
  ->will($this->returnValue('<p>Hello World!</p>'));
459
 
460
- $configuration = $this->getMock('Elefunds_Configuration_ConfigurationInterface');
461
 
462
  $configuration->expects($this->once())
463
  ->method('getView')
@@ -473,10 +613,10 @@ class Elefunds_Test_Unit_Facade extends PHPUnit_Framework_TestCase {
473
  * renderTemplateThrowsErrorIfNoViewIsGiven
474
  *
475
  * @test
476
- * @expectedException Elefunds_Exception_ElefundsException
477
  */
478
  public function renderTemplateThrowsErrorIfNoViewIsGiven() {
479
- $configuration = $this->getMock('Elefunds_Configuration_ConfigurationInterface');
480
 
481
  $configuration->expects($this->once())
482
  ->method('getView');
@@ -492,12 +632,12 @@ class Elefunds_Test_Unit_Facade extends PHPUnit_Framework_TestCase {
492
  */
493
  public function getTemplateJavascriptFilesReturnsArray() {
494
 
495
- $view = $this->getMock('Elefunds_View_ViewInterface');
496
  $view->expects($this->once())
497
  ->method('getJavascriptFiles')
498
  ->will($this->returnValue(array('http://path/to/script.js')));
499
 
500
- $configuration = $this->getMock('Elefunds_Configuration_ConfigurationInterface');
501
 
502
  $configuration->expects($this->once())
503
  ->method('getView')
@@ -509,14 +649,37 @@ class Elefunds_Test_Unit_Facade extends PHPUnit_Framework_TestCase {
509
  $this->assertSame(array('http://path/to/script.js'), $files);
510
  }
511
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
512
  /**
513
  * getTemplateCssFilesThrowsErrorIfNoViewGiven
514
  *
515
  * @test
516
- * @expectedException Elefunds_Exception_ElefundsException
517
  */
518
  public function getTemplateCssFilesThrowsErrorIfNoViewGiven() {
519
- $configuration = $this->getMock('Elefunds_Configuration_ConfigurationInterface');
520
 
521
  $configuration->expects($this->once())
522
  ->method('getView');
@@ -529,16 +692,17 @@ class Elefunds_Test_Unit_Facade extends PHPUnit_Framework_TestCase {
529
  * getTemplateJavascriptFilesThrowsErrorIfNoViewGiven
530
  *
531
  * @test
532
- * @expectedException Elefunds_Exception_ElefundsException
533
  */
534
  public function getTemplateJavascriptFilesThrowsErrorIfNoViewGiven() {
535
- $configuration = $this->getMock('Elefunds_Configuration_ConfigurationInterface');
536
 
537
  $configuration->expects($this->once())
538
  ->method('getView');
539
 
540
  $this->facade->setConfiguration($configuration);
541
  $this->facade->getTemplateJavascriptFiles();
 
542
  }
543
 
544
  }
1
+ <?php
2
 
3
  /**
4
  * elefunds API PHP Library
5
  *
6
+ * Copyright (c) 2012 - 2013, elefunds GmbH <hello@elefunds.de>.
7
  * All rights reserved.
8
  *
9
  * Redistribution and use in source and binary forms, with or without
37
  *
38
  */
39
 
40
+ namespace Lfnds\Test\Unit;
41
+
42
+ use DateTime;
43
+ use Lfnds\Exception\ElefundsException;
44
+ use PHPUnit_Framework_TestCase;
45
+ use Lfnds\Facade;
46
+
47
+ require_once __DIR__ . '/../../Facade.php';
48
 
49
  /**
50
  * Unit Test for Elefunds_Facade
52
  * @package elefunds API PHP Library
53
  * @subpackage Test
54
  * @author Christian Peters <christian@elefunds.de>
55
+ * @copyright 2012 - 2013 elefunds GmbH <hello@elefunds.de>
56
  * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
57
  * @link http://www.elefunds.de
58
  * @since File available since Release 1.0.0
59
  */
60
+ class FacadeTest extends PHPUnit_Framework_TestCase {
61
 
62
  /**
63
+ * @var Facade
64
  */
65
  protected $facade;
66
 
73
  * Sets up the class under test.
74
  */
75
  public function setUp() {
76
+ $this->facade = new Facade();
77
 
78
  date_default_timezone_set('Europe/Berlin');
79
  $this->uniqueTimestampForAllTests = new DateTime();
85
  * @test
86
  */
87
  public function setConfigurationCallsInit() {
88
+ $configuration = $this->getMock('Lfnds\Configuration\ConfigurationInterface');
 
89
 
90
  $configuration->expects($this->once())
91
  ->method('init');
98
  * We test that here.
99
  *
100
  * @test
101
+ * @expectedException \Lfnds\Exception\ElefundsException
102
  */
103
  public function addDonationsThrowsErrorIfDonationIsNotRichEnough() {
104
 
105
+ $configuration = $this->getMock('Lfnds\Configuration\ConfigurationInterface');
106
 
107
  $configuration->expects($this->once())
108
  ->method('getApiUrl')
118
 
119
  $this->facade->setConfiguration($configuration);
120
 
121
+ $donations = array($this->getMock('Lfnds\Model\DonationInterface'));
122
 
123
  $this->facade->addDonations($donations);
124
  }
129
  * @test
130
  */
131
  public function cancelDonationCalculatesCorrectApiUrl() {
132
+ $configuration = $this->getMock('Lfnds\Configuration\ConfigurationInterface');
133
 
134
  $configuration->expects($this->once())
135
  ->method('getApiUrl')
143
  ->method('getHashedKey')
144
  ->will($this->returnValue('3382a100edcb335c6af4efc1d5fb37b4ec264553'));
145
 
146
+ $rest = $this->getMock('Lfnds\Communication\RestInterface');
147
 
148
  $rest->expects($this->once())
149
  ->method('delete')
161
  $this->assertSame('Works like a charm!', $result);
162
  }
163
 
164
+ /**
165
+ * cancelDonationAcceptsDonationInstance
166
+ *
167
+ * @test
168
+ */
169
+ public function cancelDonationAcceptsDonationInstance() {
170
+ $configuration = $this->getMock('Lfnds\Configuration\ConfigurationInterface');
171
+
172
+ $configuration->expects($this->once())
173
+ ->method('getApiUrl')
174
+ ->will($this->returnValue('https://api.elefunds.de'));
175
+
176
+ $configuration->expects($this->once())
177
+ ->method('getClientId')
178
+ ->will($this->returnValue(1234));
179
+
180
+ $configuration->expects($this->once())
181
+ ->method('getHashedKey')
182
+ ->will($this->returnValue('3382a100edcb335c6af4efc1d5fb37b4ec264553'));
183
+
184
+ $rest = $this->getMock('Lfnds\Communication\RestInterface');
185
+
186
+ $rest->expects($this->once())
187
+ ->method('delete')
188
+ ->with($this->equalTo('https://api.elefunds.de/donations/1234/?clientId=1234&hashedKey=3382a100edcb335c6af4efc1d5fb37b4ec264553'))
189
+ ->will($this->returnValue(json_encode(array('message' => 'Works like a charm!'))));
190
+
191
+ $configuration->expects($this->once())
192
+ ->method('getRestImplementation')
193
+ ->will($this->returnValue($rest));
194
+
195
+
196
+ $this->facade->setConfiguration($configuration);
197
+
198
+ $result = $this->facade->cancelDonation(1234);
199
+ $this->assertSame('Works like a charm!', $result);
200
+ }
201
+
202
+
203
  /**
204
  * completeDonationCalculatesCorrectApiUrl
205
  *
206
  * @test
207
  */
208
  public function completeDonationCalculatesCorrectApiUrl() {
209
+ $configuration = $this->getMock('Lfnds\Configuration\ConfigurationInterface');
210
 
211
  $configuration->expects($this->once())
212
  ->method('getApiUrl')
220
  ->method('getHashedKey')
221
  ->will($this->returnValue('3382a100edcb335c6af4efc1d5fb37b4ec264553'));
222
 
223
+ $rest = $this->getMock('Lfnds\Communication\RestInterface');
224
 
225
  $rest->expects($this->once())
226
  ->method('put')
227
+ ->with($this->equalTo('https://api.elefunds.de/donations/AB1234/?clientId=1234&hashedKey=3382a100edcb335c6af4efc1d5fb37b4ec264553'))
228
  ->will($this->returnValue(json_encode(array('message' => 'Works like a charm!'))));
229
 
230
  $configuration->expects($this->once())
234
 
235
  $this->facade->setConfiguration($configuration);
236
 
237
+ $result = $this->facade->completeDonation("AB1234");
238
+ $this->assertSame('Works like a charm!', $result);
239
+ }
240
+
241
+ /**
242
+ * completeDonationAcceptsDonationInstance
243
+ *
244
+ * @test
245
+ */
246
+ public function completeDonationAcceptsDonationInstance() {
247
+ $configuration = $this->getMock('Lfnds\Configuration\ConfigurationInterface');
248
+
249
+ $configuration->expects($this->once())
250
+ ->method('getApiUrl')
251
+ ->will($this->returnValue('https://api.elefunds.de'));
252
+
253
+ $configuration->expects($this->once())
254
+ ->method('getClientId')
255
+ ->will($this->returnValue(1234));
256
+
257
+ $configuration->expects($this->once())
258
+ ->method('getHashedKey')
259
+ ->will($this->returnValue('3382a100edcb335c6af4efc1d5fb37b4ec264553'));
260
+
261
+ $rest = $this->getMock('Lfnds\Communication\RestInterface');
262
+
263
+ $rest->expects($this->once())
264
+ ->method('put')
265
+ ->with($this->equalTo('https://api.elefunds.de/donations/AB1234/?clientId=1234&hashedKey=3382a100edcb335c6af4efc1d5fb37b4ec264553'))
266
+ ->will($this->returnValue(json_encode(array('message' => 'Works like a charm!'))));
267
+
268
+ $configuration->expects($this->once())
269
+ ->method('getRestImplementation')
270
+ ->will($this->returnValue($rest));
271
+
272
+
273
+ $this->facade->setConfiguration($configuration);
274
+ $donation = $this->facade->createDonation()->setForeignId('AB1234');
275
+ $result = $this->facade->completeDonation($donation);
276
  $this->assertSame('Works like a charm!', $result);
277
  }
278
 
283
  */
284
  public function addDonationsCallsCorrectAPiUrl() {
285
 
286
+ $configuration = $this->getMock('Lfnds\Configuration\ConfigurationInterface');
287
 
288
  $configuration->expects($this->once())
289
  ->method('getApiUrl')
297
  ->method('getHashedKey')
298
  ->will($this->returnValue('3382a100edcb335c6af4efc1d5fb37b4ec264553'));
299
 
300
+ $rest = $this->getMock('Lfnds\Communication\RestInterface');
301
 
302
  $rest->expects($this->once())
303
  ->method('post')
322
  ->method('getRestImplementation')
323
  ->will($this->returnValue($rest));
324
 
325
+ $donation = $this->getMock('Lfnds\Model\DonationInterface');
326
 
327
  $donation->expects($this->any())
328
  ->method('getForeignId')
370
  */
371
  public function cancelDonationsCallsCorrectAPiUrl() {
372
 
373
+ $configuration = $this->getMock('Lfnds\Configuration\ConfigurationInterface');
374
 
375
  $configuration->expects($this->once())
376
  ->method('getApiUrl')
384
  ->method('getHashedKey')
385
  ->will($this->returnValue('3382a100edcb335c6af4efc1d5fb37b4ec264553'));
386
 
387
+ $rest = $this->getMock('Lfnds\Communication\RestInterface');
388
 
389
  $rest->expects($this->once())
390
  ->method('delete')
400
  $this->assertSame($result, 'Works like a charm!');
401
  }
402
 
403
+ /**
404
+ * cancelDonationsAcceptsDonationsInstance
405
+ *
406
+ * @test
407
+ */
408
+ public function cancelDonationsAcceptsDonationsInstance() {
409
+
410
+ $configuration = $this->getMock('Lfnds\Configuration\ConfigurationInterface');
411
+
412
+ $configuration->expects($this->once())
413
+ ->method('getApiUrl')
414
+ ->will($this->returnValue('https://api.elefunds.de'));
415
+
416
+ $configuration->expects($this->once())
417
+ ->method('getClientId')
418
+ ->will($this->returnValue(1234));
419
+
420
+ $configuration->expects($this->once())
421
+ ->method('getHashedKey')
422
+ ->will($this->returnValue('3382a100edcb335c6af4efc1d5fb37b4ec264553'));
423
+
424
+ $rest = $this->getMock('Lfnds\Communication\RestInterface');
425
+
426
+ $rest->expects($this->once())
427
+ ->method('delete')
428
+ ->with($this->equalTo('https://api.elefunds.de/donations/AB1234/?clientId=1234&hashedKey=3382a100edcb335c6af4efc1d5fb37b4ec264553'))
429
+ ->will($this->returnValue(json_encode(array('message' => 'Works like a charm!'))));
430
+
431
+ $configuration->expects($this->once())
432
+ ->method('getRestImplementation')
433
+ ->will($this->returnValue($rest));
434
+
435
+ $this->facade->setConfiguration($configuration);
436
+
437
+ $donation = $this->facade->createDonation()->setForeignId('AB1234');
438
+ $result = $this->facade->cancelDonation($donation);
439
+ $this->assertSame($result, 'Works like a charm!');
440
+ }
441
+
442
  /**
443
  * completeDonationsCallsCorrectAPiUrl
444
  *
446
  */
447
  public function completeDonationsCallsCorrectAPiUrl() {
448
 
449
+ $configuration = $this->getMock('Lfnds\Configuration\ConfigurationInterface');
450
 
451
  $configuration->expects($this->once())
452
  ->method('getApiUrl')
460
  ->method('getHashedKey')
461
  ->will($this->returnValue('3382a100edcb335c6af4efc1d5fb37b4ec264553'));
462
 
463
+ $rest = $this->getMock('Lfnds\Communication\RestInterface');
464
 
465
  $rest->expects($this->once())
466
  ->method('put')
480
  * getReceiversCallsCorrectApiUrlAndThrowsErrorIfWrongCountryCodeIsSet
481
  *
482
  * @test
483
+ * @expectedException \Lfnds\Exception\ElefundsCommunicationException
484
  */
485
  public function getReceiversCallsCorrectApiUrlAndThrowsErrorIfWrongCountryCodeIsSet() {
486
+ $configuration = $this->getMock('Lfnds\Configuration\ConfigurationInterface');
487
 
488
  $configuration->expects($this->once())
489
  ->method('getApiUrl')
493
  ->method('getClientId')
494
  ->will($this->returnValue(1234));
495
 
496
+ $rest = $this->getMock('Lfnds\Communication\RestInterface');
 
 
 
 
 
497
 
498
  $rest->expects($this->once())
499
  ->method('get')
500
+ ->with($this->equalTo('https://api.elefunds.de/receivers/for/1234'))
501
  ->will($this->returnValue(json_encode(
502
  array(
503
  'receivers' => array(
545
  */
546
  public function getTemplateCssFilesReturnsArray() {
547
 
548
+ $view = $this->getMock('Lfnds\View\ViewInterface');
549
  $view->expects($this->once())
550
  ->method('getCssFiles')
551
  ->will($this->returnValue(array('http://path/to/css.css')));
552
 
553
+ $configuration = $this->getMock('Lfnds\Configuration\ConfigurationInterface');
554
 
555
  $configuration->expects($this->once())
556
  ->method('getView')
562
  $this->assertSame(array('http://path/to/css.css'), $files);
563
  }
564
 
565
+ /**
566
+ * getPrintableCssReturnsTags
567
+ *
568
+ * @test
569
+ */
570
+ public function getPrintableCssReturnsTags() {
571
+ $view = $this->getMock('Lfnds\View\ViewInterface');
572
+ $view->expects($this->once())
573
+ ->method('getCssFiles')
574
+ ->will($this->returnValue(array('http://path/to/css.css')));
575
+
576
+ $configuration = $this->getMock('Lfnds\Configuration\ConfigurationInterface');
577
+
578
+ $configuration->expects($this->once())
579
+ ->method('getView')
580
+ ->will($this->returnValue($view));
581
+
582
+ $this->facade->setConfiguration($configuration);
583
+ $tags = $this->facade->getPrintableCssTagStrings();
584
+
585
+ $this->assertSame('<link rel="stylesheet" type="text/css" href="http://path/to/css.css">', $tags);
586
+ }
587
+
588
  /**
589
  * renderTemplateReturnsStringFromViewIfViewIsSet
590
  *
592
  */
593
  public function renderTemplateReturnsStringFromViewIfViewIsSet() {
594
 
595
+ $view = $this->getMock('Lfnds\View\ViewInterface');
596
  $view->expects($this->once())
597
  ->method('render')
598
  ->will($this->returnValue('<p>Hello World!</p>'));
599
 
600
+ $configuration = $this->getMock('Lfnds\Configuration\ConfigurationInterface');
601
 
602
  $configuration->expects($this->once())
603
  ->method('getView')
613
  * renderTemplateThrowsErrorIfNoViewIsGiven
614
  *
615
  * @test
616
+ * @expectedException \Lfnds\Exception\ElefundsException
617
  */
618
  public function renderTemplateThrowsErrorIfNoViewIsGiven() {
619
+ $configuration = $this->getMock('Lfnds\Configuration\ConfigurationInterface');
620
 
621
  $configuration->expects($this->once())
622
  ->method('getView');
632
  */
633
  public function getTemplateJavascriptFilesReturnsArray() {
634
 
635
+ $view = $this->getMock('Lfnds\View\ViewInterface');
636
  $view->expects($this->once())
637
  ->method('getJavascriptFiles')
638
  ->will($this->returnValue(array('http://path/to/script.js')));
639
 
640
+ $configuration = $this->getMock('Lfnds\Configuration\ConfigurationInterface');
641
 
642
  $configuration->expects($this->once())
643
  ->method('getView')
649
  $this->assertSame(array('http://path/to/script.js'), $files);
650
  }
651
 
652
+ /**
653
+ * getPrintableJavascriptReturnsTags
654
+ *
655
+ * @test
656
+ */
657
+ public function getPrintableJavascriptReturnsTags() {
658
+ $view = $this->getMock('Lfnds\View\ViewInterface');
659
+ $view->expects($this->once())
660
+ ->method('getJavascriptFiles')
661
+ ->will($this->returnValue(array('http://path/to/js.js')));
662
+
663
+ $configuration = $this->getMock('Lfnds\Configuration\ConfigurationInterface');
664
+
665
+ $configuration->expects($this->once())
666
+ ->method('getView')
667
+ ->will($this->returnValue($view));
668
+
669
+ $this->facade->setConfiguration($configuration);
670
+ $tags = $this->facade->getPrintableJavascriptTagStrings();
671
+
672
+ $this->assertSame('<script type="text/javascript" src="http://path/to/js.js"></script>', $tags);
673
+ }
674
+
675
  /**
676
  * getTemplateCssFilesThrowsErrorIfNoViewGiven
677
  *
678
  * @test
679
+ * @expectedException \Lfnds\Exception\ElefundsException
680
  */
681
  public function getTemplateCssFilesThrowsErrorIfNoViewGiven() {
682
+ $configuration = $this->getMock('Lfnds\Configuration\ConfigurationInterface');
683
 
684
  $configuration->expects($this->once())
685
  ->method('getView');
692
  * getTemplateJavascriptFilesThrowsErrorIfNoViewGiven
693
  *
694
  * @test
695
+ * @expectedException \Lfnds\Exception\ElefundsException
696
  */
697
  public function getTemplateJavascriptFilesThrowsErrorIfNoViewGiven() {
698
+ $configuration = $this->getMock('Lfnds\Configuration\ConfigurationInterface');
699
 
700
  $configuration->expects($this->once())
701
  ->method('getView');
702
 
703
  $this->facade->setConfiguration($configuration);
704
  $this->facade->getTemplateJavascriptFiles();
705
+
706
  }
707
 
708
  }
lib/{Elefunds → Lfnds}/Test/Unit/Model/DonationTest.php RENAMED
@@ -3,7 +3,7 @@
3
  /**
4
  * elefunds API PHP Library
5
  *
6
- * Copyright (c) 2012, elefunds GmbH <hello@elefunds.de>.
7
  * All rights reserved.
8
  *
9
  * Redistribution and use in source and binary forms, with or without
@@ -37,23 +37,29 @@
37
  *
38
  */
39
 
40
- require_once dirname(__FILE__) . '/../../../Model/Donation.php';
 
 
 
 
 
 
41
 
42
  /**
43
- * Unit Test for Elefunds_Models_Donation.
44
  *
45
  * @package elefunds API PHP Library
46
  * @subpackage Test
47
  * @author Christian Peters <christian@elefunds.de>
48
- * @copyright 2012 elefunds GmbH <hello@elefunds.de>
49
  * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
50
  * @link http://www.elefunds.de
51
  * @since File available since Release 1.0.0
52
  */
53
- class Elefunds_Test_Unit_Model_DonationTest extends PHPUnit_Framework_TestCase {
54
 
55
  /**
56
- * @var Elefunds_Model_Donation
57
  */
58
  protected $donation;
59
 
@@ -61,7 +67,7 @@ class Elefunds_Test_Unit_Model_DonationTest extends PHPUnit_Framework_TestCase {
61
  * Sets up the class under test.
62
  */
63
  public function setUp() {
64
- $this->donation = new Elefunds_Model_Donation();
65
  }
66
 
67
  /**
@@ -105,7 +111,7 @@ class Elefunds_Test_Unit_Model_DonationTest extends PHPUnit_Framework_TestCase {
105
  * setAmountThrowsErrorIfGivenStringIsNotCastableToInt
106
  *
107
  * @test
108
- * @expectedException InvalidArgumentException
109
  */
110
  public function setAmountThrowsErrorIfGivenStringIsNotCastableToInt() {
111
  $this->donation->setAmount('This string is not castable to int.');
@@ -115,7 +121,7 @@ class Elefunds_Test_Unit_Model_DonationTest extends PHPUnit_Framework_TestCase {
115
  * setAmountThrowsErrorIfGivenValueIsNeitherCastableStringOrInt
116
  *
117
  * @test
118
- * @expectedException InvalidArgumentException
119
  */
120
  public function setAmountThrowsErrorIfGivenValueIsNeitherCastableStringOrInt() {
121
  $this->donation->setAmount(array());
@@ -148,7 +154,7 @@ class Elefunds_Test_Unit_Model_DonationTest extends PHPUnit_Framework_TestCase {
148
  * setSuggestedAmountThrowsErrorIfGivenStringIsNotCastableToInt
149
  *
150
  * @test
151
- * @expectedException InvalidArgumentException
152
  */
153
  public function setSuggestedAmountThrowsErrorIfGivenStringIsNotCastableToInt() {
154
  $this->donation->setSuggestedAmount('This string is not castable to int.');
@@ -159,7 +165,7 @@ class Elefunds_Test_Unit_Model_DonationTest extends PHPUnit_Framework_TestCase {
159
  * setSuggestedAmountThrowsErrorIfGivenValueIsNeitherCastableStringOrInt
160
  *
161
  * @test
162
- * @expectedException InvalidArgumentException
163
  */
164
  public function setSuggestedAmountThrowsErrorIfGivenValueIsNeitherCastableStringOrInt() {
165
  $this->donation->setSuggestedAmount(array());
@@ -179,7 +185,7 @@ class Elefunds_Test_Unit_Model_DonationTest extends PHPUnit_Framework_TestCase {
179
  * addReceiverThrowsErrorIfGivenTypeIsNotInt
180
  *
181
  * @test
182
- * @expectedException InvalidArgumentException
183
  */
184
  public function addReceiverThrowsErrorIfGivenTypeIsNotInt() {
185
  $this->donation->addReceiverId('A string is given here.');
@@ -189,7 +195,7 @@ class Elefunds_Test_Unit_Model_DonationTest extends PHPUnit_Framework_TestCase {
189
  * addReceiverThrowsErrorIfGivenTypeNegativeInt
190
  *
191
  * @test
192
- * @expectedException InvalidArgumentException
193
  */
194
  public function addReceiverThrowsErrorIfGivenTypeNegativeInt() {
195
  $this->donation->addReceiverId(-5);
@@ -210,7 +216,7 @@ class Elefunds_Test_Unit_Model_DonationTest extends PHPUnit_Framework_TestCase {
210
  * setReceiverIdsThrowsErrorIfNotAllArrayValuesArePositiveInteger
211
  *
212
  * @test
213
- * @expectedException InvalidArgumentException
214
  */
215
  public function setReceiverIdsThrowsErrorIfNotAllArrayValuesArePositiveInteger() {
216
  $ids = array(1,2,3,4,-5,6,7,8,9);
@@ -221,7 +227,7 @@ class Elefunds_Test_Unit_Model_DonationTest extends PHPUnit_Framework_TestCase {
221
  * setReceiverIdsThrowsErrorIfNotAllArrayValuesAreInteger
222
  *
223
  * @test
224
- * @expectedException InvalidArgumentException
225
  */
226
  public function setReceiverIdsThrowsErrorIfNotAllArrayValuesAreInteger() {
227
  $ids = array(1,2,3,4, 'A string is injected into the array.',6,7,8,9);
@@ -242,7 +248,7 @@ class Elefunds_Test_Unit_Model_DonationTest extends PHPUnit_Framework_TestCase {
242
  * addAvailableReceiverThrowsErrorIfGivenTypeIsNotInt
243
  *
244
  * @test
245
- * @expectedException InvalidArgumentException
246
  */
247
  public function addAvailableReceiverThrowsErrorIfGivenTypeIsNotInt() {
248
  $this->donation->addAvailableReceiverId('A string is given here.');
@@ -252,7 +258,7 @@ class Elefunds_Test_Unit_Model_DonationTest extends PHPUnit_Framework_TestCase {
252
  * addAvailableReceiverThrowsErrorIfGivenTypeNegativeInt
253
  *
254
  * @test
255
- * @expectedException InvalidArgumentException
256
  */
257
  public function addAvailableReceiverThrowsErrorIfGivenTypeNegativeInt() {
258
  $this->donation->addAvailableReceiverId(-5);
@@ -273,7 +279,7 @@ class Elefunds_Test_Unit_Model_DonationTest extends PHPUnit_Framework_TestCase {
273
  * setAvailableReceiverIdsThrowsErrorIfNotAllArrayValuesArePositiveInteger
274
  *
275
  * @test
276
- * @expectedException InvalidArgumentException
277
  */
278
  public function setAvailableReceiverIdsThrowsErrorIfNotAllArrayValuesArePositiveInteger() {
279
  $ids = array(1,2,3,4,-5,6,7,8,9);
@@ -284,7 +290,7 @@ class Elefunds_Test_Unit_Model_DonationTest extends PHPUnit_Framework_TestCase {
284
  * setAvailableReceiverIdsThrowsErrorIfNotAllArrayValuesAreInteger
285
  *
286
  * @test
287
- * @expectedException InvalidArgumentException
288
  */
289
  public function setAvailableReceiverIdsThrowsErrorIfNotAllArrayValuesAreInteger() {
290
  $ids = array(1,2,3,4, 'A string is injected into the array.',6,7,8,9);
@@ -318,7 +324,7 @@ class Elefunds_Test_Unit_Model_DonationTest extends PHPUnit_Framework_TestCase {
318
  * setGrandTotalThrowsErrorIfGivenStringIsNotCastableToInt
319
  *
320
  * @test
321
- * @expectedException InvalidArgumentException
322
  */
323
  public function setGrandTotalThrowsErrorIfGivenStringIsNotCastableToInt() {
324
  $this->donation->setGrandTotal('This string is not castable to int.');
@@ -328,7 +334,7 @@ class Elefunds_Test_Unit_Model_DonationTest extends PHPUnit_Framework_TestCase {
328
  * setGrandTotalThrowsErrorIfGivenValueIsNeitherCastableStringOrInt
329
  *
330
  * @test
331
- * @expectedException InvalidArgumentException
332
  */
333
  public function setGrandTotalThrowsErrorIfGivenValueIsNeitherCastableStringOrInt() {
334
  $this->donation->setGrandTotal(array());
@@ -360,17 +366,22 @@ class Elefunds_Test_Unit_Model_DonationTest extends PHPUnit_Framework_TestCase {
360
  $this->assertSame($donator['firstName'], 'Christian');
361
  $this->assertSame($donator['lastName'], 'Peters');
362
  $this->assertSame($donator['streetAddress'], 'Schönhauser Allee 124');
363
- $this->assertSame($donator['zip'], 10243);
364
  $this->assertSame($donator['city'], 'Berlin');
365
  $this->assertSame($donator['countryCode'], 'de');
366
 
 
 
 
 
 
367
  }
368
 
369
  /**
370
  * setDonatorNeedsAValidEmail
371
  *
372
  * @test
373
- * @expectedException InvalidArgumentException
374
  */
375
  public function setDonatorNeedsAValidEmail() {
376
  $this->donation->setDonator('hello@elefunds', 'Christian', 'Peters', 'Schönhauser Allee 124', 10243, 'Berlin', 'de');
3
  /**
4
  * elefunds API PHP Library
5
  *
6
+ * Copyright (c) 2012 - 2013, elefunds GmbH <hello@elefunds.de>.
7
  * All rights reserved.
8
  *
9
  * Redistribution and use in source and binary forms, with or without
37
  *
38
  */
39
 
40
+ namespace Lfnds\Test\Unit\Model;
41
+
42
+ use DateTime;
43
+ use Lfnds\Model\Donation;
44
+ use PHPUnit_Framework_TestCase;
45
+
46
+ require_once __DIR__ . '/../../../Model/Donation.php';
47
 
48
  /**
49
+ * Unit Test for Donation.
50
  *
51
  * @package elefunds API PHP Library
52
  * @subpackage Test
53
  * @author Christian Peters <christian@elefunds.de>
54
+ * @copyright 2012 - 2013 elefunds GmbH <hello@elefunds.de>
55
  * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
56
  * @link http://www.elefunds.de
57
  * @since File available since Release 1.0.0
58
  */
59
+ class DonationTest extends PHPUnit_Framework_TestCase {
60
 
61
  /**
62
+ * @var Donation
63
  */
64
  protected $donation;
65
 
67
  * Sets up the class under test.
68
  */
69
  public function setUp() {
70
+ $this->donation = new Donation();
71
  }
72
 
73
  /**
111
  * setAmountThrowsErrorIfGivenStringIsNotCastableToInt
112
  *
113
  * @test
114
+ * @expectedException \InvalidArgumentException
115
  */
116
  public function setAmountThrowsErrorIfGivenStringIsNotCastableToInt() {
117
  $this->donation->setAmount('This string is not castable to int.');
121
  * setAmountThrowsErrorIfGivenValueIsNeitherCastableStringOrInt
122
  *
123
  * @test
124
+ * @expectedException \InvalidArgumentException
125
  */
126
  public function setAmountThrowsErrorIfGivenValueIsNeitherCastableStringOrInt() {
127
  $this->donation->setAmount(array());
154
  * setSuggestedAmountThrowsErrorIfGivenStringIsNotCastableToInt
155
  *
156
  * @test
157
+ * @expectedException \InvalidArgumentException
158
  */
159
  public function setSuggestedAmountThrowsErrorIfGivenStringIsNotCastableToInt() {
160
  $this->donation->setSuggestedAmount('This string is not castable to int.');
165
  * setSuggestedAmountThrowsErrorIfGivenValueIsNeitherCastableStringOrInt
166
  *
167
  * @test
168
+ * @expectedException \InvalidArgumentException
169
  */
170
  public function setSuggestedAmountThrowsErrorIfGivenValueIsNeitherCastableStringOrInt() {
171
  $this->donation->setSuggestedAmount(array());
185
  * addReceiverThrowsErrorIfGivenTypeIsNotInt
186
  *
187
  * @test
188
+ * @expectedException \InvalidArgumentException
189
  */
190
  public function addReceiverThrowsErrorIfGivenTypeIsNotInt() {
191
  $this->donation->addReceiverId('A string is given here.');
195
  * addReceiverThrowsErrorIfGivenTypeNegativeInt
196
  *
197
  * @test
198
+ * @expectedException \InvalidArgumentException
199
  */
200
  public function addReceiverThrowsErrorIfGivenTypeNegativeInt() {
201
  $this->donation->addReceiverId(-5);
216
  * setReceiverIdsThrowsErrorIfNotAllArrayValuesArePositiveInteger
217
  *
218
  * @test
219
+ * @expectedException \InvalidArgumentException
220
  */
221
  public function setReceiverIdsThrowsErrorIfNotAllArrayValuesArePositiveInteger() {
222
  $ids = array(1,2,3,4,-5,6,7,8,9);
227
  * setReceiverIdsThrowsErrorIfNotAllArrayValuesAreInteger
228
  *
229
  * @test
230
+ * @expectedException \InvalidArgumentException
231
  */
232
  public function setReceiverIdsThrowsErrorIfNotAllArrayValuesAreInteger() {
233
  $ids = array(1,2,3,4, 'A string is injected into the array.',6,7,8,9);
248
  * addAvailableReceiverThrowsErrorIfGivenTypeIsNotInt
249
  *
250
  * @test
251
+ * @expectedException \InvalidArgumentException
252
  */
253
  public function addAvailableReceiverThrowsErrorIfGivenTypeIsNotInt() {
254
  $this->donation->addAvailableReceiverId('A string is given here.');
258
  * addAvailableReceiverThrowsErrorIfGivenTypeNegativeInt
259
  *
260
  * @test
261
+ * @expectedException \InvalidArgumentException
262
  */
263
  public function addAvailableReceiverThrowsErrorIfGivenTypeNegativeInt() {
264
  $this->donation->addAvailableReceiverId(-5);
279
  * setAvailableReceiverIdsThrowsErrorIfNotAllArrayValuesArePositiveInteger
280
  *
281
  * @test
282
+ * @expectedException \InvalidArgumentException
283
  */
284
  public function setAvailableReceiverIdsThrowsErrorIfNotAllArrayValuesArePositiveInteger() {
285
  $ids = array(1,2,3,4,-5,6,7,8,9);
290
  * setAvailableReceiverIdsThrowsErrorIfNotAllArrayValuesAreInteger
291
  *
292
  * @test
293
+ * @expectedException \InvalidArgumentException
294
  */
295
  public function setAvailableReceiverIdsThrowsErrorIfNotAllArrayValuesAreInteger() {
296
  $ids = array(1,2,3,4, 'A string is injected into the array.',6,7,8,9);
324
  * setGrandTotalThrowsErrorIfGivenStringIsNotCastableToInt
325
  *
326
  * @test
327
+ * @expectedException \InvalidArgumentException
328
  */
329
  public function setGrandTotalThrowsErrorIfGivenStringIsNotCastableToInt() {
330
  $this->donation->setGrandTotal('This string is not castable to int.');
334
  * setGrandTotalThrowsErrorIfGivenValueIsNeitherCastableStringOrInt
335
  *
336
  * @test
337
+ * @expectedException \InvalidArgumentException
338
  */
339
  public function setGrandTotalThrowsErrorIfGivenValueIsNeitherCastableStringOrInt() {
340
  $this->donation->setGrandTotal(array());
366
  $this->assertSame($donator['firstName'], 'Christian');
367
  $this->assertSame($donator['lastName'], 'Peters');
368
  $this->assertSame($donator['streetAddress'], 'Schönhauser Allee 124');
369
+ $this->assertSame($donator['zip'], '10243');
370
  $this->assertSame($donator['city'], 'Berlin');
371
  $this->assertSame($donator['countryCode'], 'de');
372
 
373
+ // Should work for digit-only string as zip as well:
374
+ $this->donation->setDonator('hello@elefunds.de', 'Christian', 'Peters', 'Schönhauser Allee 124', '10243', 'Berlin', 'de');
375
+ $donator = $this->donation->getDonatorInformation();
376
+ $this->assertSame($donator['zip'], '10243');
377
+
378
  }
379
 
380
  /**
381
  * setDonatorNeedsAValidEmail
382
  *
383
  * @test
384
+ * @expectedException \InvalidArgumentException
385
  */
386
  public function setDonatorNeedsAValidEmail() {
387
  $this->donation->setDonator('hello@elefunds', 'Christian', 'Peters', 'Schönhauser Allee 124', 10243, 'Berlin', 'de');
lib/{Elefunds → Lfnds}/Test/Unit/Model/FactoryTest.php RENAMED
@@ -3,7 +3,7 @@
3
  /**
4
  * elefunds API PHP Library
5
  *
6
- * Copyright (c) 2012, elefunds GmbH <hello@elefunds.de>.
7
  * All rights reserved.
8
  *
9
  * Redistribution and use in source and binary forms, with or without
@@ -37,23 +37,29 @@
37
  *
38
  */
39
 
40
- require_once dirname(__FILE__) . '/../../../Model/Factory.php';
41
- require_once dirname(__FILE__) . '/../../../Model/Donation.php';
42
- require_once dirname(__FILE__) . '/../../../Model/Receiver.php';
 
 
 
 
 
 
43
 
44
 
45
  /**
46
- * Unit Test for Elefunds_Model_Factory.
47
  *
48
  * @package elefunds API PHP Library
49
  * @subpackage Test
50
  * @author Christian Peters <christian@elefunds.de>
51
- * @copyright 2012 elefunds GmbH <hello@elefunds.de>
52
  * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
53
  * @link http://www.elefunds.de
54
  * @since File available since Release 1.0.0
55
  */
56
- class Elefunds_Test_Unit_Model_FactoryTest extends PHPUnit_Framework_TestCase {
57
 
58
 
59
  /**
@@ -63,10 +69,10 @@ class Elefunds_Test_Unit_Model_FactoryTest extends PHPUnit_Framework_TestCase {
63
  */
64
  public function getDonationProducesDonationPrototype() {
65
 
66
- Elefunds_Model_Factory::setDonationImplementation('Elefunds_Model_Donation');
67
- $prototype = Elefunds_Model_Factory::getDonation();
68
 
69
- $this->assertInstanceOf('Elefunds_Model_DonationInterface', $prototype);
70
  }
71
 
72
  /**
@@ -76,32 +82,32 @@ class Elefunds_Test_Unit_Model_FactoryTest extends PHPUnit_Framework_TestCase {
76
  */
77
  public function getReceiverProducesReceiverPrototype() {
78
 
79
- Elefunds_Model_Factory::setReceiverImplementation('Elefunds_Model_Receiver');
80
- $prototype = Elefunds_Model_Factory::getReceiver();
81
 
82
- $this->assertInstanceOf('Elefunds_Model_ReceiverInterface', $prototype);
83
  }
84
 
85
  /**
86
  * getDonationProducesErrorIfGivenInstanceIsNotDonationInterface
87
  *
88
  * @test
89
- * @expectedException Elefunds_Exception_ElefundsException
90
  */
91
  public function getDonationProducesErrorIfGivenInstanceIsNotDonationInterface() {
92
- Elefunds_Model_Factory::setDonationImplementation('Elefunds_Model_Receiver');
93
- Elefunds_Model_Factory::getDonation();
94
  }
95
 
96
  /**
97
  * getReceiverProducesErrorIfGivenInstanceIsNotReceiverInterface
98
  *
99
  * @test
100
- * @expectedException Elefunds_Exception_ElefundsException
101
  */
102
  public function getReceiverProducesErrorIfGivenInstanceIsNotReceiverInterface() {
103
- Elefunds_Model_Factory::setReceiverImplementation('Elefunds_Model_Donation');
104
- Elefunds_Model_Factory::getReceiver();
105
  }
106
 
107
  }
3
  /**
4
  * elefunds API PHP Library
5
  *
6
+ * Copyright (c) 2012 - 2013, elefunds GmbH <hello@elefunds.de>.
7
  * All rights reserved.
8
  *
9
  * Redistribution and use in source and binary forms, with or without
37
  *
38
  */
39
 
40
+ namespace Lfnds\Test\Unit\Model;
41
+
42
+ use Lfnds\Exception\ElefundsException;
43
+ use Lfnds\Model\Factory;
44
+ use PHPUnit_Framework_TestCase;
45
+
46
+ require_once __DIR__ . '/../../../Model/Factory.php';
47
+ require_once __DIR__ . '/../../../Model/Donation.php';
48
+ require_once __DIR__ . '/../../../Model/Receiver.php';
49
 
50
 
51
  /**
52
+ * Unit Test for Factory.
53
  *
54
  * @package elefunds API PHP Library
55
  * @subpackage Test
56
  * @author Christian Peters <christian@elefunds.de>
57
+ * @copyright 2012 - 2013 elefunds GmbH <hello@elefunds.de>
58
  * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
59
  * @link http://www.elefunds.de
60
  * @since File available since Release 1.0.0
61
  */
62
+ class FactoryTest extends PHPUnit_Framework_TestCase {
63
 
64
 
65
  /**
69
  */
70
  public function getDonationProducesDonationPrototype() {
71
 
72
+ Factory::setDonationImplementation('Lfnds\Model\Donation');
73
+ $prototype = Factory::getDonation();
74
 
75
+ $this->assertInstanceOf('Lfnds\Model\DonationInterface', $prototype);
76
  }
77
 
78
  /**
82
  */
83
  public function getReceiverProducesReceiverPrototype() {
84
 
85
+ Factory::setReceiverImplementation('Lfnds\Model\Receiver');
86
+ $prototype = Factory::getReceiver();
87
 
88
+ $this->assertInstanceOf('Lfnds\Model\ReceiverInterface', $prototype);
89
  }
90
 
91
  /**
92
  * getDonationProducesErrorIfGivenInstanceIsNotDonationInterface
93
  *
94
  * @test
95
+ * @expectedException \Lfnds\Exception\ElefundsException
96
  */
97
  public function getDonationProducesErrorIfGivenInstanceIsNotDonationInterface() {
98
+ Factory::setDonationImplementation('Lfnds\Model\Receiver');
99
+ Factory::getDonation();
100
  }
101
 
102
  /**
103
  * getReceiverProducesErrorIfGivenInstanceIsNotReceiverInterface
104
  *
105
  * @test
106
+ * @expectedException \Lfnds\Exception\ElefundsException
107
  */
108
  public function getReceiverProducesErrorIfGivenInstanceIsNotReceiverInterface() {
109
+ Factory::setReceiverImplementation('Lfnds\Model\Donation');
110
+ Factory::getReceiver();
111
  }
112
 
113
  }
lib/{Elefunds → Lfnds}/Test/Unit/Model/ReceiverTest.php RENAMED
@@ -3,7 +3,7 @@
3
  /**
4
  * elefunds API PHP Library
5
  *
6
- * Copyright (c) 2012, elefunds GmbH <hello@elefunds.de>.
7
  * All rights reserved.
8
  *
9
  * Redistribution and use in source and binary forms, with or without
@@ -37,23 +37,30 @@
37
  *
38
  */
39
 
40
- require_once dirname(__FILE__) . '/../../../Model/Receiver.php';
 
 
 
 
 
 
 
41
 
42
  /**
43
- * Unit Test for Elefunds_Model_Receiver.
44
  *
45
  * @package elefunds API PHP Library
46
  * @subpackage Test
47
  * @author Christian Peters <christian@elefunds.de>
48
- * @copyright 2012 elefunds GmbH <hello@elefunds.de>
49
  * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
50
  * @link http://www.elefunds.de
51
  * @since File available since Release 1.0.0
52
  */
53
- class Elefunds_Test_Unit_Model_ReceiverTest extends PHPUnit_Framework_TestCase {
54
 
55
  /**
56
- * @var Elefunds_Model_Receiver
57
  */
58
  protected $receiver;
59
 
@@ -61,7 +68,7 @@ class Elefunds_Test_Unit_Model_ReceiverTest extends PHPUnit_Framework_TestCase {
61
  * Sets up the class under test.
62
  */
63
  public function setUp() {
64
- $this->receiver = new Elefunds_Model_Receiver();
65
  }
66
 
67
  /**
@@ -78,7 +85,7 @@ class Elefunds_Test_Unit_Model_ReceiverTest extends PHPUnit_Framework_TestCase {
78
  * setIdThrowsErrorIfNonPositiveIdIsGiven
79
  *
80
  * @test
81
- * @expectedException InvalidArgumentException
82
  */
83
  public function setIdThrowsErrorIfNonPositiveIdIsGiven() {
84
  $this->receiver->setId(0);
@@ -88,7 +95,7 @@ class Elefunds_Test_Unit_Model_ReceiverTest extends PHPUnit_Framework_TestCase {
88
  * setIdThrowsErrorIfGivenTypeIsNotInt
89
  *
90
  * @test
91
- * @expectedException InvalidArgumentException
92
  */
93
  public function setIdThrowsErrorIfGivenTypeIsNotInt() {
94
  $this->receiver->setId(new stdClass());
@@ -109,7 +116,7 @@ class Elefunds_Test_Unit_Model_ReceiverTest extends PHPUnit_Framework_TestCase {
109
  * setNameThrowsErrorIfGivenTypeIsNotString
110
  *
111
  * @test
112
- * @expectedException InvalidArgumentException
113
  */
114
  public function setNameThrowsErrorIfGivenTypeIsNotString() {
115
  $this->receiver->setName(new stdClass());
@@ -130,7 +137,7 @@ class Elefunds_Test_Unit_Model_ReceiverTest extends PHPUnit_Framework_TestCase {
130
  * setDescriptionThrowsErrorIfGivenTypeIsNotString
131
  *
132
  * @test
133
- * @expectedException InvalidArgumentException
134
  */
135
  public function setDescriptionThrowsErrorIfGivenTypeIsNotString() {
136
  $this->receiver->setDescription(new stdClass());
@@ -151,7 +158,7 @@ class Elefunds_Test_Unit_Model_ReceiverTest extends PHPUnit_Framework_TestCase {
151
  * addImagesAcceptsOnlyVerticalOrHorizontalAsFirstKey
152
  *
153
  * @test
154
- * @expectedException InvalidArgumentException
155
  */
156
  public function addImagesAcceptsOnlyVerticalOrHorizontalAsFirstKey() {
157
  $imageUrl = 'http://elefunds.de/img/logo.png';
@@ -162,7 +169,7 @@ class Elefunds_Test_Unit_Model_ReceiverTest extends PHPUnit_Framework_TestCase {
162
  * addImagesAcceptsOnlySmallMediumAndLargeAsSecondKey
163
  *
164
  * @test
165
- * @expectedException InvalidArgumentException
166
  */
167
  public function addImagesAcceptsOnlySmallMediumAndLargeAsSecondKey() {
168
  $imageUrl = 'http://elefunds.de/img/logo.png';
@@ -173,7 +180,7 @@ class Elefunds_Test_Unit_Model_ReceiverTest extends PHPUnit_Framework_TestCase {
173
  * getImagesAcceptsOnlyVerticalOrHorizontalAsFirstKey
174
  *
175
  * @test
176
- * @expectedException InvalidArgumentException
177
  */
178
  public function getImagesAcceptsOnlyVerticalOrHorizontalAsFirstKey() {
179
  $this->receiver->getImage('http://elefunds.de/img/sample.jpg', 'some invalid string', 'small');
@@ -183,7 +190,7 @@ class Elefunds_Test_Unit_Model_ReceiverTest extends PHPUnit_Framework_TestCase {
183
  * getImagesAcceptsOnlySmallMediumAndLargeAsSecondKey
184
  *
185
  * @test
186
- * @expectedException InvalidArgumentException
187
  */
188
  public function getImagesAcceptsOnlySmallMediumAndLargeAsSecondKey() {
189
  $this->receiver->getImage('http://elefunds.de/img/sample.jpg', 'horizontal', 'large');
@@ -257,7 +264,7 @@ class Elefunds_Test_Unit_Model_ReceiverTest extends PHPUnit_Framework_TestCase {
257
  * setImagesThrowsErrorOnInvalidArrayStructure
258
  *
259
  * @test
260
- * @expectedException InvalidArgumentException
261
  */
262
  public function setImagesThrowsErrorOnInvalidArrayStructure() {
263
  $images = array(
@@ -286,7 +293,7 @@ class Elefunds_Test_Unit_Model_ReceiverTest extends PHPUnit_Framework_TestCase {
286
  * setImagesThrowsErrorIfNoMultidimensionalArrayGiven
287
  *
288
  * @test
289
- * @expectedException InvalidArgumentException
290
  */
291
  public function setImagesThrowsErrorIfNoMultidimensionalArrayGiven() {
292
  $images = array(
@@ -305,36 +312,4 @@ class Elefunds_Test_Unit_Model_ReceiverTest extends PHPUnit_Framework_TestCase {
305
  $this->receiver->setImages($images);
306
  }
307
 
308
- /**
309
- * isValidReturnsTrueIfValidTimeIsInTheFuture
310
- *
311
- * @test
312
- */
313
- public function isValidReturnsTrueIfValidTimeIsInTheFuture() {
314
-
315
- $validTime = new DateTime();
316
- $validTime->modify('+ 1 month');
317
-
318
- $this->receiver->setValidTime($validTime);
319
-
320
- $this->assertSame(TRUE, $this->receiver->isValid());
321
-
322
- }
323
-
324
- /**
325
- * isValidReturnsFalseIfValidTimeIsInThePast
326
- *
327
- * @test
328
- */
329
- public function isValidReturnsFalseIfValidTimeIsInThePast() {
330
-
331
- $validTime = new DateTime();
332
- $validTime->modify('- 1 month');
333
-
334
- $this->receiver->setValidTime($validTime);
335
-
336
- $this->assertSame(FALSE, $this->receiver->isValid());
337
-
338
- }
339
-
340
  }
3
  /**
4
  * elefunds API PHP Library
5
  *
6
+ * Copyright (c) 2012 - 2013, elefunds GmbH <hello@elefunds.de>.
7
  * All rights reserved.
8
  *
9
  * Redistribution and use in source and binary forms, with or without
37
  *
38
  */
39
 
40
+ namespace Lfnds\Test\Unit\Model;
41
+
42
+ use DateTime;
43
+ use Lfnds\Model\Receiver;
44
+ use PHPUnit_Framework_TestCase;
45
+ use stdClass;
46
+
47
+ require_once __DIR__ . '/../../../Model/Receiver.php';
48
 
49
  /**
50
+ * Unit Test for Receiver.
51
  *
52
  * @package elefunds API PHP Library
53
  * @subpackage Test
54
  * @author Christian Peters <christian@elefunds.de>
55
+ * @copyright 2012 - 2013 elefunds GmbH <hello@elefunds.de>
56
  * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
57
  * @link http://www.elefunds.de
58
  * @since File available since Release 1.0.0
59
  */
60
+ class ReceiverTest extends PHPUnit_Framework_TestCase {
61
 
62
  /**
63
+ * @var Receiver
64
  */
65
  protected $receiver;
66
 
68
  * Sets up the class under test.
69
  */
70
  public function setUp() {
71
+ $this->receiver = new Receiver();
72
  }
73
 
74
  /**
85
  * setIdThrowsErrorIfNonPositiveIdIsGiven
86
  *
87
  * @test
88
+ * @expectedException \InvalidArgumentException
89
  */
90
  public function setIdThrowsErrorIfNonPositiveIdIsGiven() {
91
  $this->receiver->setId(0);
95
  * setIdThrowsErrorIfGivenTypeIsNotInt
96
  *
97
  * @test
98
+ * @expectedException \InvalidArgumentException
99
  */
100
  public function setIdThrowsErrorIfGivenTypeIsNotInt() {
101
  $this->receiver->setId(new stdClass());
116
  * setNameThrowsErrorIfGivenTypeIsNotString
117
  *
118
  * @test
119
+ * @expectedException \InvalidArgumentException
120
  */
121
  public function setNameThrowsErrorIfGivenTypeIsNotString() {
122
  $this->receiver->setName(new stdClass());
137
  * setDescriptionThrowsErrorIfGivenTypeIsNotString
138
  *
139
  * @test
140
+ * @expectedException \InvalidArgumentException
141
  */
142
  public function setDescriptionThrowsErrorIfGivenTypeIsNotString() {
143
  $this->receiver->setDescription(new stdClass());
158
  * addImagesAcceptsOnlyVerticalOrHorizontalAsFirstKey
159
  *
160
  * @test
161
+ * @expectedException \InvalidArgumentException
162
  */
163
  public function addImagesAcceptsOnlyVerticalOrHorizontalAsFirstKey() {
164
  $imageUrl = 'http://elefunds.de/img/logo.png';
169
  * addImagesAcceptsOnlySmallMediumAndLargeAsSecondKey
170
  *
171
  * @test
172
+ * @expectedException \InvalidArgumentException
173
  */
174
  public function addImagesAcceptsOnlySmallMediumAndLargeAsSecondKey() {
175
  $imageUrl = 'http://elefunds.de/img/logo.png';
180
  * getImagesAcceptsOnlyVerticalOrHorizontalAsFirstKey
181
  *
182
  * @test
183
+ * @expectedException \InvalidArgumentException
184
  */
185
  public function getImagesAcceptsOnlyVerticalOrHorizontalAsFirstKey() {
186
  $this->receiver->getImage('http://elefunds.de/img/sample.jpg', 'some invalid string', 'small');
190
  * getImagesAcceptsOnlySmallMediumAndLargeAsSecondKey
191
  *
192
  * @test
193
+ * @expectedException \InvalidArgumentException
194
  */
195
  public function getImagesAcceptsOnlySmallMediumAndLargeAsSecondKey() {
196
  $this->receiver->getImage('http://elefunds.de/img/sample.jpg', 'horizontal', 'large');
264
  * setImagesThrowsErrorOnInvalidArrayStructure
265
  *
266
  * @test
267
+ * @expectedException \InvalidArgumentException
268
  */
269
  public function setImagesThrowsErrorOnInvalidArrayStructure() {
270
  $images = array(
293
  * setImagesThrowsErrorIfNoMultidimensionalArrayGiven
294
  *
295
  * @test
296
+ * @expectedException \InvalidArgumentException
297
  */
298
  public function setImagesThrowsErrorIfNoMultidimensionalArrayGiven() {
299
  $images = array(
312
  $this->receiver->setImages($images);
313
  }
314
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
315
  }
lib/Lfnds/Test/Unit/Template/Shop/CheckoutConfigurationTest.php ADDED
@@ -0,0 +1,155 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * elefunds API PHP Library
5
+ *
6
+ * Copyright (c) 2012 - 2013, elefunds GmbH <hello@elefunds.de>.
7
+ * All rights reserved.
8
+ *
9
+ * Redistribution and use in source and binary forms, with or without
10
+ * modification, are permitted provided that the following conditions
11
+ * are met:
12
+ *
13
+ * * Redistributions of source code must retain the above copyright
14
+ * notice, this list of conditions and the following disclaimer.
15
+ *
16
+ * * Redistributions in binary form must reproduce the above copyright
17
+ * notice, this list of conditions and the following disclaimer in
18
+ * the documentation and/or other materials provided with the
19
+ * distribution.
20
+ *
21
+ * * Neither the name of the elefunds GmbH nor the names of its
22
+ * contributors may be used to endorse or promote products derived
23
+ * from this software without specific prior written permission.
24
+ *
25
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
28
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
29
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
30
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
31
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
32
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
33
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
35
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36
+ * POSSIBILITY OF SUCH DAMAGE.
37
+ */
38
+
39
+ namespace Lfnds\Test\Unit\Template\Shop;
40
+
41
+ use Lfnds\Template\Shop\CheckoutConfiguration;
42
+
43
+ require_once __DIR__ . '/../../../../Template/Shop/CheckoutConfiguration.php';
44
+ require_once __DIR__ . '/../../../../FacadeInterface.php';
45
+
46
+
47
+ /**
48
+ * Unit Test for CheckoutConfiguration.
49
+ *
50
+ * @package elefunds API PHP Library
51
+ * @subpackage Test
52
+ * @author Christian Peters <christian@elefunds.de>
53
+ * @copyright 2012 - 2013 elefunds GmbH <hello@elefunds.de>
54
+ * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
55
+ * @link http://www.elefunds.de
56
+ * @since File available since Release 2.0.0
57
+ */
58
+ class CheckoutConfigurationTest extends \PHPUnit_Framework_TestCase {
59
+
60
+
61
+ /**
62
+ * Tests if the correct renderer is set.
63
+ *
64
+ * @test
65
+ */
66
+ public function setsRenderer() {
67
+ $config = new CheckoutConfiguration();
68
+ $config->init();
69
+ $this->assertSame('Checkout.phtml', $config->getView()->getRenderFile());
70
+ }
71
+
72
+ /**
73
+ * donationReceiptIsOfferedByDefault
74
+ *
75
+ * @test
76
+ */
77
+ public function donationReceiptIsOfferedByDefault() {
78
+
79
+ $config = new CheckoutConfiguration();
80
+ $config->init();
81
+
82
+ $assigns = $config->getView()->getAssignments();
83
+ $this->assertTrue($assigns['offerDonationReceipt']);
84
+
85
+ }
86
+
87
+ /**
88
+ * configurationDefaultOptionsAreAssigned
89
+ *
90
+ * @test
91
+ */
92
+ public function configurationDefaultOptionsAreAssigned() {
93
+
94
+ $config = new CheckoutConfiguration();
95
+ $config->init();
96
+
97
+ $assigns = $config->getView()->getAssignments();
98
+
99
+ $this->assertSame($assigns['currency'], '€');
100
+ $this->assertSame($assigns['currencyDelimiter'], ',');
101
+ $this->assertSame($assigns['skin']['orientation'], 'horizontal');
102
+
103
+ }
104
+
105
+ /**
106
+ * clientIdAndCountryCodeAreAssigned
107
+ *
108
+ * @test
109
+ */
110
+ public function clientIdViewAndCountryCodeAreAssigned() {
111
+ $config = new CheckoutConfiguration();
112
+ $config->setClientId(1234);
113
+ $config->setCountrycode('de');
114
+ $config->init();
115
+
116
+ $assigns = $config->getView()->getAssignments();
117
+
118
+ $this->assertSame($assigns['clientId'], 1234);
119
+ $this->assertSame($assigns['countryCode'], 'de');
120
+ $this->assertSame($assigns['view'], 'module');
121
+ }
122
+
123
+
124
+ /**
125
+ * Tests if the themes are initialized.
126
+ *
127
+ * @test
128
+ */
129
+ public function initializesThemes() {
130
+
131
+ $config = new CheckoutConfiguration();
132
+ $config->init();
133
+
134
+ $this->assertSame(array('light', 'dark'), $config->getAvailableThemes());
135
+
136
+ }
137
+
138
+ /**
139
+ * Test: basicThemeIsLightOrange
140
+ *
141
+ * @test
142
+ */
143
+ public function basicThemeIsLightOrange() {
144
+ $config = new CheckoutConfiguration();
145
+ $config->init();
146
+
147
+ $theme = $config->getView()->getAssignments()['skin']['theme'];
148
+ $color = $config->getView()->getAssignments()['skin']['color'];
149
+
150
+ $this->assertSame('light', $theme);
151
+ $this->assertSame('#00efa2', $color);
152
+
153
+ }
154
+
155
+ }
lib/Lfnds/Test/Unit/Template/Shop/CheckoutSuccessConfigurationTest.php ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * elefunds API PHP Library
5
+ *
6
+ * Copyright (c) 2012 - 2013, elefunds GmbH <hello@elefunds.de>.
7
+ * All rights reserved.
8
+ *
9
+ * Redistribution and use in source and binary forms, with or without
10
+ * modification, are permitted provided that the following conditions
11
+ * are met:
12
+ *
13
+ * * Redistributions of source code must retain the above copyright
14
+ * notice, this list of conditions and the following disclaimer.
15
+ *
16
+ * * Redistributions in binary form must reproduce the above copyright
17
+ * notice, this list of conditions and the following disclaimer in
18
+ * the documentation and/or other materials provided with the
19
+ * distribution.
20
+ *
21
+ * * Neither the name of the elefunds GmbH nor the names of its
22
+ * contributors may be used to endorse or promote products derived
23
+ * from this software without specific prior written permission.
24
+ *
25
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
28
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
29
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
30
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
31
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
32
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
33
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
35
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36
+ * POSSIBILITY OF SUCH DAMAGE.
37
+ */
38
+
39
+ namespace Lfnds\Test\Unit\Template\Shop;
40
+
41
+ use Lfnds\Template\Shop\CheckoutSuccessConfiguration;
42
+
43
+ require_once __DIR__ . '/../../../../Template/Shop/CheckoutSuccessConfiguration.php';
44
+ require_once __DIR__ . '/../../../../FacadeInterface.php';
45
+
46
+
47
+ /**
48
+ * Unit Test for CheckoutConfiguration.
49
+ *
50
+ * @package elefunds API PHP Library
51
+ * @subpackage Test
52
+ * @author Christian Peters <christian@elefunds.de>
53
+ * @copyright 2012 - 2013 elefunds GmbH <hello@elefunds.de>
54
+ * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
55
+ * @link http://www.elefunds.de
56
+ * @since File available since Release 2.0.0
57
+ */
58
+ class CheckoutSuccessConfigurationTest extends \PHPUnit_Framework_TestCase {
59
+
60
+ /**
61
+ * Tests if the correct renderer is set.
62
+ *
63
+ * @test
64
+ */
65
+ public function setsRenderer() {
66
+ $config = new CheckoutSuccessConfiguration();
67
+ $config->init();
68
+ $this->assertSame('CheckoutSuccess.phtml', $config->getView()->getRenderFile());
69
+ }
70
+
71
+ /**
72
+ * Checks if the social media share module is assigned to the view.
73
+ *
74
+ * @test
75
+ */
76
+ public function moduleIsDefined() {
77
+
78
+ $config = new CheckoutSuccessConfiguration();
79
+ $config->init();
80
+
81
+ $assigns = $config->getView()->getAssignments();
82
+ $this->assertSame('socialMediaShare', $assigns['view']);
83
+ }
84
+
85
+ }
lib/Lfnds/Test/Unit/Template/Shop/Helper/RequestHelperTest.php ADDED
@@ -0,0 +1,348 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * elefunds API PHP Library
5
+ *
6
+ * Copyright (c) 2012 - 2013, elefunds GmbH <hello@elefunds.de>.
7
+ * All rights reserved.
8
+ *
9
+ * Redistribution and use in source and binary forms, with or without
10
+ * modification, are permitted provided that the following conditions
11
+ * are met:
12
+ *
13
+ * * Redistributions of source code must retain the above copyright
14
+ * notice, this list of conditions and the following disclaimer.
15
+ *
16
+ * * Redistributions in binary form must reproduce the above copyright
17
+ * notice, this list of conditions and the following disclaimer in
18
+ * the documentation and/or other materials provided with the
19
+ * distribution.
20
+ *
21
+ * * Neither the name of the elefunds GmbH nor the names of its
22
+ * contributors may be used to endorse or promote products derived
23
+ * from this software without specific prior written permission.
24
+ *
25
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
28
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
29
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
30
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
31
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
32
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
33
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
35
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36
+ * POSSIBILITY OF SUCH DAMAGE.
37
+ */
38
+
39
+ namespace Lfnds\Test\Unit\Template\Shop\Helper;
40
+ use Lfnds\Template\Shop\Helper\RequestHelper;
41
+ use ReflectionClass;
42
+
43
+ require_once __DIR__ . '/../../../../../Template/Shop/Helper/RequestHelper.php';
44
+
45
+
46
+ /**
47
+ * Unit Test for RequestHelper.
48
+ *
49
+ * @package elefunds API PHP Library
50
+ * @subpackage Test
51
+ * @author Christian Peters <christian@elefunds.de>
52
+ * @copyright 2012 - 2013 elefunds GmbH <hello@elefunds.de>
53
+ * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
54
+ * @link http://www.elefunds.de
55
+ * @since File available since Release 2.0.0
56
+ */
57
+ class RequestHelperTest extends \PHPUnit_Framework_TestCase {
58
+
59
+ /**
60
+ * missingRequestWillFallbackToPostSuperglobal
61
+ *
62
+ * @test
63
+ */
64
+ public function missingRequestWillFallbackToPostSuperglobal() {
65
+ $_POST['addedValue'] = TRUE;
66
+ $helper = new RequestHelper();
67
+
68
+ $reflectionClass = new ReflectionClass('Lfnds\Template\Shop\Helper\RequestHelper');
69
+
70
+ $reflectionProperty = $reflectionClass->getProperty('request');
71
+ $reflectionProperty->setAccessible(TRUE);
72
+ $request = $reflectionProperty->getValue($helper);
73
+
74
+ $this->assertSame(TRUE, isset($request['addedValue']));
75
+ $this->assertSame(TRUE, $request['addedValue']);
76
+
77
+ }
78
+
79
+ /**
80
+ * agreedToElefundsAGivenDonationAndValidReceiversLeadsToActiveAndValidRequest
81
+ *
82
+ * @test
83
+ */
84
+ public function agreedToElefundsAGivenDonationAndValidReceiversLeadsToActiveAndValidRequest() {
85
+
86
+ $request = [
87
+ 'elefunds_agree' => 'true',
88
+ 'elefunds_donation_cent' => '100',
89
+ 'elefunds_receivers' => [1,2,3]
90
+
91
+ ];
92
+
93
+ $helper = new RequestHelper($request);
94
+
95
+ $this->assertTrue($helper->isActiveAndValid());
96
+
97
+ // Test with int as donation:
98
+ $request['elefunds_donation_cent'] = 100;
99
+ $helper = new RequestHelper($request);
100
+ $this->assertTrue($helper->isActiveAndValid());
101
+ }
102
+
103
+ /**
104
+ * failsIfReceiversAreGivenAsCSV
105
+ *
106
+ * @test
107
+ */
108
+ public function receiverCanBeGivenAsCSV() {
109
+ // Test with csv as receivers:
110
+ $request = [
111
+ 'elefunds_agree' => 'true',
112
+ 'elefunds_donation_cent' => '100',
113
+ 'elefunds_receivers' => '1,2,3'
114
+
115
+ ];
116
+ $helper = new RequestHelper($request);
117
+ $this->assertTrue($helper->isActiveAndValid());
118
+
119
+ }
120
+
121
+ /**
122
+ * isActiveAndValidRequestFailsIfAgreementIsFalse
123
+ *
124
+ * @test
125
+ */
126
+ public function isActiveAndValidRequestFailsIfAgreementIsFalse() {
127
+ $request = [
128
+ 'elefunds_agree' => 'false',
129
+ 'elefunds_donation_cent' => '100',
130
+ 'elefunds_receivers' => [1,2,3]
131
+
132
+ ];
133
+
134
+ $helper = new RequestHelper($request);
135
+ $this->assertFalse($helper->isActiveAndValid());
136
+ }
137
+
138
+ /**
139
+ * isActiveAndValidRequestFailsIfDonationIsNotConvertableToPositiveInt
140
+ *
141
+ * @test
142
+ */
143
+ public function isActiveAndValidRequestFailsIfDonationIsNotConvertableToPositiveInt() {
144
+ $request = [
145
+ 'elefunds_agree' => 'true',
146
+ 'elefunds_donation_cent' => '-110',
147
+ 'elefunds_receivers' => [1,2,3]
148
+
149
+ ];
150
+
151
+ $helper = new RequestHelper($request);
152
+ $this->assertFalse($helper->isActiveAndValid());
153
+
154
+ $request['elefunds_donation_cent'] = '0';
155
+ $helper = new RequestHelper($request);
156
+ $this->assertFalse($helper->isActiveAndValid());
157
+
158
+ $request['elefunds_donation_cent'] = array();
159
+ $helper = new RequestHelper($request);
160
+ $this->assertFalse($helper->isActiveAndValid());
161
+
162
+ }
163
+
164
+ /**
165
+ * isActiveAndValidRequestFailsIfElefundsReceiversIsNotAnArrayOfPositiveInts
166
+ *
167
+ * @test
168
+ */
169
+ public function isActiveAndValidRequestFailsIfElefundsReceiversIsNotAnArrayOfPositiveInts() {
170
+ $request = [
171
+ 'elefunds_agree' => 'true',
172
+ 'elefunds_donation_cent' => '100',
173
+ 'elefunds_receivers' => [-1,2,3]
174
+
175
+ ];
176
+
177
+ $helper = new RequestHelper($request);
178
+ $this->assertFalse($helper->isActiveAndValid());
179
+
180
+ $request['elefunds_receivers'] = '0,2,3';
181
+ $helper = new RequestHelper($request);
182
+ $this->assertFalse($helper->isActiveAndValid());
183
+
184
+ $request['elefunds_receivers'] = array(4, 'Not a number');
185
+ $helper = new RequestHelper($request);
186
+ $this->assertFalse($helper->isActiveAndValid());
187
+ }
188
+
189
+ /**
190
+ * isActiveAndValidRequestFailsIfElefundsReceiversIsNotAnArrayOfPositiveInts
191
+ *
192
+ * @test
193
+ */
194
+ public function isActiveAndValidRequestFailsIfElefundsReceiversIsDoubled() {
195
+ $request = [
196
+ 'elefunds_agree' => 'true',
197
+ 'elefunds_donation_cent' => '100',
198
+ 'elefunds_receivers' => [1,1,3]
199
+
200
+ ];
201
+
202
+ $helper = new RequestHelper($request);
203
+ $this->assertFalse($helper->isActiveAndValid());
204
+ }
205
+
206
+ /**
207
+ * getAvailableReceiversReturnsAllAvailableReceivers
208
+ *
209
+ * @test
210
+ */
211
+ public function getAvailableReceiversReturnsAllAvailableReceivers() {
212
+ $helper = new RequestHelper(array('elefunds_available_receivers' => '1,2,3'));
213
+ $this->assertSame(array(1,2,3), $helper->getAvailableReceiverIds());
214
+
215
+ // Array should be possible as well
216
+ $helper = new RequestHelper(array('elefunds_available_receivers' => [1,2,3]));
217
+ $this->assertSame(array(1,2,3), $helper->getAvailableReceiverIds());
218
+ }
219
+
220
+ /**
221
+ * getAvailableReceiversReturnsEmptyArrayIfValidationFails
222
+ *
223
+ * @test
224
+ */
225
+ public function getAvailableReceiversReturnsEmptyArrayIfValidationFails() {
226
+ $helper = new RequestHelper(array('elefunds_available_receivers' => '1,fail,2'));
227
+ $this->assertEmpty($helper->getAvailableReceiverIds());
228
+
229
+ $helper = new RequestHelper(array('elefunds_available_receivers' => [1, -1, 2]));
230
+ $this->assertEmpty($helper->getAvailableReceiverIds());
231
+
232
+ $helper = new RequestHelper(array('elefunds_available_receivers' => [1, 1, 2]));
233
+ $this->assertEmpty($helper->getAvailableReceiverIds());
234
+
235
+ $helper = new RequestHelper(array('elefunds_available_receivers' => NULL));
236
+ $this->assertEmpty($helper->getAvailableReceiverIds());
237
+
238
+ $helper = new RequestHelper(array());
239
+ $this->assertEmpty($helper->getAvailableReceiverIds());
240
+ }
241
+
242
+ /**
243
+ * getReceiversAsStringReturnsEmptyStringIfReceiverStringsAreNotSet
244
+ *
245
+ * @test
246
+ */
247
+ public function getReceiversAsStringReturnsEmptyStringIfReceiverStringsAreNotSet() {
248
+ $helper = new RequestHelper(array());
249
+ $this->assertSame('', $helper->getReceiversAsString());
250
+ }
251
+
252
+ /**
253
+ * getReceiversAsStringAcceptsCSVValues
254
+ *
255
+ * @test
256
+ */
257
+ public function getReceiversAsStringAcceptsCSVValues() {
258
+ $helper = new RequestHelper(array('elefunds_receiver_names' => 'a,b,c'));
259
+ $this->assertSame('a, b, c', $helper->getReceiversAsString());
260
+ }
261
+
262
+ /**
263
+ * getReceiversAsStringReturnsCSV
264
+ *
265
+ * @test
266
+ */
267
+ public function getReceiversAsStringReturnsCSV() {
268
+ $helper = new RequestHelper(array('a', 'b', 'c'));
269
+ $this->assertSame('a, b, c', $helper->getReceiversAsString());
270
+ }
271
+
272
+ /**
273
+ * Test: getRoundupMapsToInt
274
+ *
275
+ * @test
276
+ */
277
+ public function getRoundupMapsToInt() {
278
+ $helper = new RequestHelper(['elefunds_donation_cent' => '100']);
279
+ $this->assertSame(100, $helper->getRoundUp());
280
+ }
281
+
282
+ /**
283
+ * getRoundupAsFloatDoesAValidRounding
284
+ *
285
+ * @test
286
+ */
287
+ public function getRoundupAsFloatDoesAValidRounding() {
288
+ $helper = new RequestHelper(['elefunds_donation_cent' => '100']);
289
+ $this->assertSame('1.00', $helper->getRoundUpAsFloatedString());
290
+
291
+ $helper = new RequestHelper(['elefunds_donation_cent' => '13294']);
292
+ $this->assertSame('132.94', $helper->getRoundUpAsFloatedString());
293
+
294
+ $helper = new RequestHelper(['elefunds_donation_cent' => '32']);
295
+ $this->assertSame('0.32', $helper->getRoundUpAsFloatedString());
296
+
297
+ }
298
+
299
+ /**
300
+ * suggestedRoundUpIsConvertedToInt
301
+ *
302
+ * @test
303
+ */
304
+ public function suggestedRoundUpIsConvertedToInt() {
305
+ $helper = new RequestHelper(['elefunds_suggested_round_up_cent' => '100']);
306
+ $this->assertSame(100, $helper->getSuggestedRoundUp());
307
+ }
308
+
309
+ /**
310
+ * suggestedRoundUpReturnsZeroIfIsNotConvertableToPositiveInt
311
+ *
312
+ * @test
313
+ */
314
+ public function suggestedRoundUpReturnsZeroIfIsNotConvertableToPositiveInt() {
315
+ $helper = new RequestHelper(['elefunds_suggested_round_up_cent' => '-100']);
316
+ $this->assertSame(0, $helper->getSuggestedRoundUp());
317
+ $helper = new RequestHelper(['elefunds_suggested_round_up_cent' => 'NAN']);
318
+ $this->assertSame(0, $helper->getSuggestedRoundUp());
319
+
320
+ $helper = new RequestHelper(['elefunds_suggested_round_up_cent' => 0]);
321
+ $this->assertSame(0, $helper->getSuggestedRoundUp());
322
+
323
+ $helper = new RequestHelper(['elefunds_suggested_round_up_cent' => array()]);
324
+ $this->assertSame(0, $helper->getSuggestedRoundUp());
325
+ }
326
+
327
+ /**
328
+ * isDonationReceiptRequestedReturnsTrueIfKeyIsNotFalse
329
+ *
330
+ * @test
331
+ */
332
+ public function isDonationReceiptRequestedReturnsTrueIfKeyIsNotFalse() {
333
+ $helper = new RequestHelper(['elefunds_receipt' => 'true']);
334
+ $this->assertTrue($helper->isDonationReceiptRequested());
335
+ }
336
+
337
+ /**
338
+ * isDonationReceiptRequestedReturnsFalsefKeyIsFalseOrNotSet
339
+ *
340
+ * @test
341
+ */
342
+ public function isDonationReceiptRequestedReturnsFalsefKeyIsFalseOrNotSet() {
343
+ $helper = new RequestHelper(['elefunds_receipt' => 'false']);
344
+ $this->assertFalse($helper->isDonationReceiptRequested());
345
+ $helper = new RequestHelper(array());
346
+ $this->assertFalse($helper->isDonationReceiptRequested());
347
+ }
348
+ }
lib/Lfnds/Test/Unit/Template/Shop/ShopConfigurationTest.php ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * elefunds API PHP Library
5
+ *
6
+ * Copyright (c) 2012 - 2013, elefunds GmbH <hello@elefunds.de>.
7
+ * All rights reserved.
8
+ *
9
+ * Redistribution and use in source and binary forms, with or without
10
+ * modification, are permitted provided that the following conditions
11
+ * are met:
12
+ *
13
+ * * Redistributions of source code must retain the above copyright
14
+ * notice, this list of conditions and the following disclaimer.
15
+ *
16
+ * * Redistributions in binary form must reproduce the above copyright
17
+ * notice, this list of conditions and the following disclaimer in
18
+ * the documentation and/or other materials provided with the
19
+ * distribution.
20
+ *
21
+ * * Neither the name of the elefunds GmbH nor the names of its
22
+ * contributors may be used to endorse or promote products derived
23
+ * from this software without specific prior written permission.
24
+ *
25
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
28
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
29
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
30
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
31
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
32
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
33
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
35
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36
+ * POSSIBILITY OF SUCH DAMAGE.
37
+ */
38
+
39
+ namespace Lfnds\Test\Unit\Template\Shop;
40
+ use Lfnds\Template\Shop\ShopConfiguration;
41
+
42
+ require_once __DIR__ . '/../../../../Template/Shop/ShopConfiguration.php';
43
+
44
+
45
+ /**
46
+ * Unit Test for ShopConfiguration.
47
+ *
48
+ * @package elefunds API PHP Library
49
+ * @subpackage Test
50
+ * @author Christian Peters <christian@elefunds.de>
51
+ * @copyright 2012 - 2013 elefunds GmbH <hello@elefunds.de>
52
+ * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
53
+ * @link http://www.elefunds.de
54
+ * @since File available since Release 2.0.0
55
+ */
56
+ class ShopConfigurationTest extends \PHPUnit_Framework_TestCase {
57
+
58
+ /**
59
+ * Test is template name is set to shop.
60
+ *
61
+ * @test
62
+ */
63
+ public function setsTemplateNameToShop() {
64
+ $config = new ShopConfiguration();
65
+ $config->init();
66
+
67
+ $this->assertSame('Shop', $config->getView()->getTemplate());
68
+ }
69
+
70
+ }
lib/{Elefunds → Lfnds}/Test/Unit/View/BaseViewTest.php RENAMED
@@ -3,7 +3,7 @@
3
  /**
4
  * elefunds API PHP Library
5
  *
6
- * Copyright (c) 2012, elefunds GmbH <hello@elefunds.de>.
7
  * All rights reserved.
8
  *
9
  * Redistribution and use in source and binary forms, with or without
@@ -37,23 +37,31 @@
37
  *
38
  */
39
 
40
- require_once dirname(__FILE__) . '/../../../View/BaseView.php';
 
 
 
 
 
 
 
 
41
 
42
  /**
43
- * Unit Test for Elefunds_View_BaseView.
44
  *
45
  * @package elefunds API PHP Library
46
  * @subpackage Test
47
  * @author Christian Peters <christian@elefunds.de>
48
- * @copyright 2012 elefunds GmbH <hello@elefunds.de>
49
  * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
50
  * @link http://www.elefunds.de
51
  * @since File available since Release 1.0.0
52
  */
53
- class Elefunds_Test_Unit_View_BaseViewTest extends PHPUnit_Framework_TestCase {
54
 
55
  /**
56
- * @var Elefunds_View_BaseView
57
  */
58
  protected $view;
59
 
@@ -68,13 +76,13 @@ class Elefunds_Test_Unit_View_BaseViewTest extends PHPUnit_Framework_TestCase {
68
  * Sets up the class under test.
69
  */
70
  public function setUp() {
71
- $this->view = new Elefunds_View_BaseView();
72
 
73
  // Set dummy test name
74
  $this->view->setTemplate('Dummy');
75
 
76
  // We need some reflection for more insight here ...
77
- $this->reflectionClass = new ReflectionClass('Elefunds_View_BaseView');
78
 
79
  }
80
 
@@ -82,7 +90,7 @@ class Elefunds_Test_Unit_View_BaseViewTest extends PHPUnit_Framework_TestCase {
82
  * registerHooksThrowsErrorIfClassDoesNotExist
83
  *
84
  * @test
85
- * @expectedException InvalidArgumentException
86
  */
87
  public function registerHooksThrowsErrorIfClassDoesNotExist() {
88
  $this->view->registerAssignHook('someVar', 'NonExistingClass', 'NonExistingMethod');
@@ -92,7 +100,7 @@ class Elefunds_Test_Unit_View_BaseViewTest extends PHPUnit_Framework_TestCase {
92
  * registerHooksThrowsErrorIfMethodDoesNotExist
93
  *
94
  * @test
95
- * @expectedException InvalidArgumentException
96
  */
97
  public function registerHooksThrowsErrorIfMethodDoesNotExist() {
98
  $this->view->registerAssignHook('someVar', $this, 'NonExistingMethod');
@@ -106,7 +114,7 @@ class Elefunds_Test_Unit_View_BaseViewTest extends PHPUnit_Framework_TestCase {
106
  public function registerHooksAddsHookIfClassAndMethodExistsAndItGetsCalledWhenAKeyIsAssigned() {
107
 
108
  // The class itself does not matter, we could use any as hook
109
- $sampleClass = $this->getMock('Elefunds_View_BaseView');
110
  $sampleClass->expects($this->once())
111
  ->method('getCssFiles');
112
 
@@ -126,14 +134,23 @@ class Elefunds_Test_Unit_View_BaseViewTest extends PHPUnit_Framework_TestCase {
126
  $additionalInformation = array();
127
  try {
128
  $this->view->addCssFile('test.css');
129
- } catch (Elefunds_Exception_ElefundsException $exception) {
130
-
131
  $additionalInformation = $exception->getAdditionalInformation();
132
  }
133
 
134
- $this->assertSame('Template/Dummy/Css/test.css', $additionalInformation['filepath']);
135
-
136
  }
 
 
 
 
 
 
 
 
 
 
 
137
 
138
  /**
139
  * setJavascriptFilesCalculatesTheCorrectPathAndChecksForExistance
@@ -145,13 +162,22 @@ class Elefunds_Test_Unit_View_BaseViewTest extends PHPUnit_Framework_TestCase {
145
  $additionalInformation = array();
146
  try {
147
  $this->view->addJavascriptFile('test.js');
148
- } catch (Elefunds_Exception_ElefundsException $exception) {
149
  $additionalInformation = $exception->getAdditionalInformation();
150
  }
151
 
152
- $this->assertSame('Template/Dummy/Javascript/test.js', $additionalInformation['filepath']);
153
-
154
  }
 
 
 
 
 
 
 
 
 
 
155
 
156
  /**
157
  * assignSetsValueToTheView
@@ -198,8 +224,9 @@ class Elefunds_Test_Unit_View_BaseViewTest extends PHPUnit_Framework_TestCase {
198
  public function renderCalculatesTheCorrectPathToViewPhtmlAndChecksForExistance() {
199
 
200
  try {
201
- $this->view->render('Test');
202
- } catch (Elefunds_Exception_ElefundsException $exception) {
 
203
  $additionalInformation = $exception->getAdditionalInformation();
204
  }
205
 
@@ -208,20 +235,4 @@ class Elefunds_Test_Unit_View_BaseViewTest extends PHPUnit_Framework_TestCase {
208
 
209
  }
210
 
211
- /**
212
- * renderTakesFullpathIfFlagIsSet
213
- *
214
- * @test
215
- */
216
- public function renderTakesFullpathIfFlagIsSet() {
217
- try {
218
- $this->view->render('FullyQualifiedGiven', TRUE);
219
- } catch (Elefunds_Exception_ElefundsException $exception) {
220
- $additionalInformation = $exception->getAdditionalInformation();
221
- }
222
-
223
- $filepathExtractDoesMatch = strpos($additionalInformation['filepath'], 'FullyQualifiedGiven') !== FALSE;
224
- $this->assertSame(TRUE, $filepathExtractDoesMatch);
225
- }
226
-
227
  }
3
  /**
4
  * elefunds API PHP Library
5
  *
6
+ * Copyright (c) 2012 - 2013, elefunds GmbH <hello@elefunds.de>.
7
  * All rights reserved.
8
  *
9
  * Redistribution and use in source and binary forms, with or without
37
  *
38
  */
39
 
40
+ namespace Lfnds\Test\Unit\View;
41
+
42
+ use Lfnds\Exception\ElefundsException;
43
+ use Lfnds\View\BaseView;
44
+ use PHPUnit_Framework_TestCase;
45
+ use ReflectionClass;
46
+ use stdClass;
47
+
48
+ require_once __DIR__ . '/../../../View/BaseView.php';
49
 
50
  /**
51
+ * Unit Test BaseView.
52
  *
53
  * @package elefunds API PHP Library
54
  * @subpackage Test
55
  * @author Christian Peters <christian@elefunds.de>
56
+ * @copyright 2012 - 2013 elefunds GmbH <hello@elefunds.de>
57
  * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
58
  * @link http://www.elefunds.de
59
  * @since File available since Release 1.0.0
60
  */
61
+ class BaseViewTest extends PHPUnit_Framework_TestCase {
62
 
63
  /**
64
+ * @var BaseView
65
  */
66
  protected $view;
67
 
76
  * Sets up the class under test.
77
  */
78
  public function setUp() {
79
+ $this->view = new BaseView();
80
 
81
  // Set dummy test name
82
  $this->view->setTemplate('Dummy');
83
 
84
  // We need some reflection for more insight here ...
85
+ $this->reflectionClass = new ReflectionClass('Lfnds\View\BaseView');
86
 
87
  }
88
 
90
  * registerHooksThrowsErrorIfClassDoesNotExist
91
  *
92
  * @test
93
+ * @expectedException \InvalidArgumentException
94
  */
95
  public function registerHooksThrowsErrorIfClassDoesNotExist() {
96
  $this->view->registerAssignHook('someVar', 'NonExistingClass', 'NonExistingMethod');
100
  * registerHooksThrowsErrorIfMethodDoesNotExist
101
  *
102
  * @test
103
+ * @expectedException \InvalidArgumentException
104
  */
105
  public function registerHooksThrowsErrorIfMethodDoesNotExist() {
106
  $this->view->registerAssignHook('someVar', $this, 'NonExistingMethod');
114
  public function registerHooksAddsHookIfClassAndMethodExistsAndItGetsCalledWhenAKeyIsAssigned() {
115
 
116
  // The class itself does not matter, we could use any as hook
117
+ $sampleClass = $this->getMock('Lfnds\View\BaseView');
118
  $sampleClass->expects($this->once())
119
  ->method('getCssFiles');
120
 
134
  $additionalInformation = array();
135
  try {
136
  $this->view->addCssFile('test.css');
137
+ } catch (ElefundsException $exception) {
 
138
  $additionalInformation = $exception->getAdditionalInformation();
139
  }
140
 
141
+ $this->assertSame('Template/Dummy/Resources/css/test.css', $additionalInformation['filepath']);
 
142
  }
143
+
144
+
145
+ /**
146
+ * setCssFileAcceptsUrl
147
+ *
148
+ * @test
149
+ */
150
+ public function setCssFileAcceptsUrl() {
151
+ $this->view->addCssFile('http://elefunds.de/test.css');
152
+ $this->assertSame($this->view->getCssFiles(), array('http://elefunds.de/test.css'));
153
+ }
154
 
155
  /**
156
  * setJavascriptFilesCalculatesTheCorrectPathAndChecksForExistance
162
  $additionalInformation = array();
163
  try {
164
  $this->view->addJavascriptFile('test.js');
165
+ } catch (ElefundsException $exception) {
166
  $additionalInformation = $exception->getAdditionalInformation();
167
  }
168
 
169
+ $this->assertSame('Template/Dummy/Resources/js/test.js', $additionalInformation['filepath']);
 
170
  }
171
+
172
+ /**
173
+ * setJavascriptFilesAcceptsUrl
174
+ *
175
+ * @test
176
+ */
177
+ public function setJavascriptFilesAcceptsUrl() {
178
+ $this->view->addJavascriptFile('http://elefunds.de/test.js');
179
+ $this->assertSame($this->view->getJavascriptFiles(), array('http://elefunds.de/test.js'));
180
+ }
181
 
182
  /**
183
  * assignSetsValueToTheView
224
  public function renderCalculatesTheCorrectPathToViewPhtmlAndChecksForExistance() {
225
 
226
  try {
227
+ $this->view->setRenderFile('Test.phtml');
228
+ $this->view->render();
229
+ } catch (ElefundsException $exception) {
230
  $additionalInformation = $exception->getAdditionalInformation();
231
  }
232
 
235
 
236
  }
237
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
238
  }
lib/{Elefunds → Lfnds}/View/BaseView.php RENAMED
@@ -3,7 +3,7 @@
3
  /**
4
  * elefunds API PHP Library
5
  *
6
- * Copyright (c) 2012, elefunds GmbH <hello@elefunds.de>.
7
  * All rights reserved.
8
  *
9
  * Redistribution and use in source and binary forms, with or without
@@ -37,8 +37,13 @@
37
  *
38
  */
39
 
40
- require_once dirname(__FILE__) . '/ViewInterface.php';
41
- require_once dirname(__FILE__) . '/../Exception/ElefundsException.php';
 
 
 
 
 
42
 
43
  /**
44
  * View for the elefunds API.
@@ -46,12 +51,12 @@ require_once dirname(__FILE__) . '/../Exception/ElefundsException.php';
46
  * @package elefunds API PHP Library
47
  * @subpackage View
48
  * @author Christian Peters <christian@elefunds.de>
49
- * @copyright 2012 elefunds GmbH <hello@elefunds.de>
50
  * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
51
  * @link http://www.elefunds.de
52
  * @since File available since Release 1.0.0
53
  */
54
- class Elefunds_View_BaseView implements Elefunds_View_ViewInterface {
55
 
56
  /**
57
  * @var array
@@ -64,6 +69,13 @@ class Elefunds_View_BaseView implements Elefunds_View_ViewInterface {
64
  * @var string
65
  */
66
  protected $template;
 
 
 
 
 
 
 
67
 
68
  /**
69
  * @var array
@@ -97,7 +109,7 @@ class Elefunds_View_BaseView implements Elefunds_View_ViewInterface {
97
  * the name of a folder in the Template folder.
98
  *
99
  * @param string $template
100
- * @return Elefunds_View_ViewInterface
101
  */
102
  public function setTemplate($template) {
103
  $this->template = ucfirst(strtolower($template));
@@ -187,7 +199,7 @@ class Elefunds_View_BaseView implements Elefunds_View_ViewInterface {
187
  * @param mixed $class string (class name) or instance
188
  * @param string $method
189
  * @throws InvalidArgumentException
190
- * @return Elefunds_View_ViewInterface
191
  */
192
  public function registerAssignHook($name, $class, $method) {
193
 
@@ -216,7 +228,7 @@ class Elefunds_View_BaseView implements Elefunds_View_ViewInterface {
216
  * @param string $key
217
  * @param mixed $value
218
  * @throws InvalidArgumentException if given key is not a string
219
- * @return Elefunds_View_ViewInterface
220
  */
221
  public function assign($key, $value) {
222
  if (is_string($key)) {
@@ -242,7 +254,7 @@ class Elefunds_View_BaseView implements Elefunds_View_ViewInterface {
242
  * Add multiple variables to the view.
243
  *
244
  * @param array $values array in the format array(key1 => value1, key2 => value2).
245
- * @return Elefunds_View_ViewInterface
246
  */
247
  public function assignMultiple(array $values) {
248
  foreach($values as $key => $value) {
@@ -255,32 +267,28 @@ class Elefunds_View_BaseView implements Elefunds_View_ViewInterface {
255
  /**
256
  * Renders the given output.
257
  *
258
- * @param string $templateName name of the template to render
259
- * @param bool $givenTemplateNameIsAbsolutePathWithFullyQualifiedFilename
260
- * @throws Elefunds_Exception_ElefundsException
261
- *
262
- * @return string the rendered HTML
263
  */
264
- public function render($templateName = 'View', $givenTemplateNameIsAbsolutePathWithFullyQualifiedFilename = FALSE) {
265
 
266
- if ($givenTemplateNameIsAbsolutePathWithFullyQualifiedFilename) {
267
- $filepath = $templateName;
268
- } else {
269
- $filepath = dirname(__FILE__) . '/../Template/' . $this->template . '/' . $templateName . '.phtml';
270
- }
271
 
272
  if (file_exists($filepath)) {
 
273
  $view = $this->view;
274
 
275
  ob_start();
276
- include_once $filepath;
277
- $output = ob_get_contents();
 
 
278
  ob_end_clean();
279
 
280
  return $output;
281
  } else {
282
- throw new Elefunds_Exception_ElefundsException('View.phtml not found in your template folder.',
283
- 1348041578910,
284
  array('filepath' => $filepath));
285
  }
286
  }
@@ -290,18 +298,23 @@ class Elefunds_View_BaseView implements Elefunds_View_ViewInterface {
290
  * as /Template/YourTemplateFolder/Css/styles.css
291
  *
292
  * @param string $file
293
- * @throws Elefunds_Exception_ElefundsException if file does not exist
294
- * @return Elefunds_View_ViewInterface
295
  */
296
  public function addCssFile($file) {
297
- $templateFolder = ucfirst(strtolower($this->template));
298
- $filepath = 'Template/' . $templateFolder . '/Css/' . $file;
299
- if (file_exists(dirname(__FILE__) . '/../' . $filepath)) {
300
- $this->cssFiles[] = $filepath;
301
  } else {
302
- throw new Elefunds_Exception_ElefundsException('Given CSS file ' . $file . ' does not exist.',
303
- 1348041578905,
304
- array('filepath' => $filepath));
 
 
 
 
 
 
305
  }
306
  }
307
 
@@ -311,8 +324,8 @@ class Elefunds_View_BaseView implements Elefunds_View_ViewInterface {
311
  * Wrapper for addCss($file).
312
  *
313
  * @param array $files
314
- * @throws Elefunds_Exception_ElefundsException if file does not exist
315
- * @return Elefunds_View_ViewInterface
316
  */
317
  public function addCssFiles(array $files) {
318
  foreach ($files as $file) {
@@ -325,18 +338,23 @@ class Elefunds_View_BaseView implements Elefunds_View_ViewInterface {
325
  * as /Template/YourTemplateFolder/Javascript/myjavascript.js
326
  *
327
  * @param string $file
328
- * @throws Elefunds_Exception_ElefundsException if file does not exist
329
- * @return Elefunds_View_ViewInterface
330
  */
331
  public function addJavascriptFile($file) {
332
- $templateFolder = ucfirst(strtolower($this->template));
333
- $filepath = 'Template/' . $templateFolder . '/Javascript/' . $file;
334
- if (file_exists(dirname(__FILE__) . '/../' . $filepath)) {
335
- $this->javascriptFiles[] = $filepath;
336
  } else {
337
- throw new Elefunds_Exception_ElefundsException('Given Javascript file ' . $file . ' does not exist.',
338
- 1348041578907,
339
- array('filepath' => $filepath));
 
 
 
 
 
 
340
  }
341
  }
342
 
@@ -346,13 +364,36 @@ class Elefunds_View_BaseView implements Elefunds_View_ViewInterface {
346
  * Wrapper for addJavascriptFiles($file).
347
  *
348
  * @param array $files
349
- * @throws Elefunds_Exception_ElefundsException if file does not exist
350
- * @return Elefunds_View_ViewInterface
351
  */
352
  public function addJavascriptFiles(array $files) {
353
  foreach ($files as $file) {
354
  $this->addJavascriptFile($file);
355
  }
356
  }
357
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
358
  }
3
  /**
4
  * elefunds API PHP Library
5
  *
6
+ * Copyright (c) 2012 - 2013, elefunds GmbH <hello@elefunds.de>.
7
  * All rights reserved.
8
  *
9
  * Redistribution and use in source and binary forms, with or without
37
  *
38
  */
39
 
40
+ namespace Lfnds\View;
41
+
42
+ use InvalidArgumentException;
43
+ use Lfnds\Exception\ElefundsException;
44
+
45
+ require_once __DIR__ . '/ViewInterface.php';
46
+ require_once __DIR__ . '/../Exception/ElefundsException.php';
47
 
48
  /**
49
  * View for the elefunds API.
51
  * @package elefunds API PHP Library
52
  * @subpackage View
53
  * @author Christian Peters <christian@elefunds.de>
54
+ * @copyright 2012 - 2013 elefunds GmbH <hello@elefunds.de>
55
  * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
56
  * @link http://www.elefunds.de
57
  * @since File available since Release 1.0.0
58
  */
59
+ class BaseView implements ViewInterface {
60
 
61
  /**
62
  * @var array
69
  * @var string
70
  */
71
  protected $template;
72
+
73
+ /**
74
+ * The file to be rendered with the applied information of this view.
75
+ *
76
+ * @var string
77
+ */
78
+ protected $renderer;
79
 
80
  /**
81
  * @var array
109
  * the name of a folder in the Template folder.
110
  *
111
  * @param string $template
112
+ * @return ViewInterface
113
  */
114
  public function setTemplate($template) {
115
  $this->template = ucfirst(strtolower($template));
199
  * @param mixed $class string (class name) or instance
200
  * @param string $method
201
  * @throws InvalidArgumentException
202
+ * @return ViewInterface
203
  */
204
  public function registerAssignHook($name, $class, $method) {
205
 
228
  * @param string $key
229
  * @param mixed $value
230
  * @throws InvalidArgumentException if given key is not a string
231
+ * @return ViewInterface
232
  */
233
  public function assign($key, $value) {
234
  if (is_string($key)) {
254
  * Add multiple variables to the view.
255
  *
256
  * @param array $values array in the format array(key1 => value1, key2 => value2).
257
+ * @return ViewInterface
258
  */
259
  public function assignMultiple(array $values) {
260
  foreach($values as $key => $value) {
267
  /**
268
  * Renders the given output.
269
  *
270
+ * @throws ElefundsException
271
+ * @return string
 
 
 
272
  */
273
+ public function render() {
274
 
275
+ $filepath = __DIR__ . '/../Template/' . $this->template . '/' . $this->renderer;
 
 
 
 
276
 
277
  if (file_exists($filepath)) {
278
+
279
  $view = $this->view;
280
 
281
  ob_start();
282
+
283
+ include_once $filepath;
284
+ $output = ob_get_contents();
285
+
286
  ob_end_clean();
287
 
288
  return $output;
289
  } else {
290
+ throw new ElefundsException('View.phtml not found in your template folder.',
291
+ 1348041578910,
292
  array('filepath' => $filepath));
293
  }
294
  }
298
  * as /Template/YourTemplateFolder/Css/styles.css
299
  *
300
  * @param string $file
301
+ * @throws ElefundsException if file does not exist
302
+ * @return ViewInterface
303
  */
304
  public function addCssFile($file) {
305
+
306
+ if (filter_var($file, FILTER_VALIDATE_URL)) {
307
+ $this->cssFiles[] = $file;
 
308
  } else {
309
+ $templateFolder = ucfirst(strtolower($this->template));
310
+ $filepath = 'Template/' . $templateFolder . '/Resources/css/' . $file;
311
+ if (file_exists(__DIR__ . '/../' . $filepath)) {
312
+ $this->cssFiles[] = $filepath;
313
+ } else {
314
+ throw new ElefundsException('Given CSS file ' . $file . ' does not exist.',
315
+ 1348041578905,
316
+ array('filepath' => $filepath));
317
+ }
318
  }
319
  }
320
 
324
  * Wrapper for addCss($file).
325
  *
326
  * @param array $files
327
+ * @throws ElefundsException if file does not exist
328
+ * @return ViewInterface
329
  */
330
  public function addCssFiles(array $files) {
331
  foreach ($files as $file) {
338
  * as /Template/YourTemplateFolder/Javascript/myjavascript.js
339
  *
340
  * @param string $file
341
+ * @throws ElefundsException if file does not exist
342
+ * @return ViewInterface
343
  */
344
  public function addJavascriptFile($file) {
345
+
346
+ if (filter_var($file, FILTER_VALIDATE_URL)) {
347
+ $this->javascriptFiles[] = $file;
 
348
  } else {
349
+ $templateFolder = ucfirst(strtolower($this->template));
350
+ $filepath = 'Template/' . $templateFolder . '/Resources/js/' . $file;
351
+ if (file_exists(__DIR__ . '/../' . $filepath)) {
352
+ $this->javascriptFiles[] = $filepath;
353
+ } else {
354
+ throw new ElefundsException('Given Javascript file ' . $file . ' does not exist.',
355
+ 1348041578907,
356
+ array('filepath' => $filepath));
357
+ }
358
  }
359
  }
360
 
364
  * Wrapper for addJavascriptFiles($file).
365
  *
366
  * @param array $files
367
+ * @throws ElefundsException if file does not exist
368
+ * @return ViewInterface
369
  */
370
  public function addJavascriptFiles(array $files) {
371
  foreach ($files as $file) {
372
  $this->addJavascriptFile($file);
373
  }
374
  }
375
+
376
+ /**
377
+ * Sets the file to be rendered with the applied view information.
378
+ * The path must be relative to the template.
379
+ *
380
+ * E.g. 'View.phtml' or 'views/sample.php'.
381
+ *
382
+ * @param string $file
383
+ * @return ViewInterface
384
+ */
385
+ public function setRenderFile($file)
386
+ {
387
+ $this->renderer = $file;
388
+ }
389
+
390
+ /**
391
+ * Returns the file to be rendered.
392
+ *
393
+ * @return string
394
+ */
395
+ public function getRenderFile()
396
+ {
397
+ return $this->renderer;
398
+ }
399
  }
lib/{Elefunds → Lfnds}/View/ViewInterface.php RENAMED
@@ -3,7 +3,7 @@
3
  /**
4
  * elefunds API PHP Library
5
  *
6
- * Copyright (c) 2012, elefunds GmbH <hello@elefunds.de>.
7
  * All rights reserved.
8
  *
9
  * Redistribution and use in source and binary forms, with or without
@@ -36,7 +36,12 @@
36
  * POSSIBILITY OF SUCH DAMAGE.
37
  *
38
  */
39
-
 
 
 
 
 
40
 
41
  /**
42
  * View Interface
@@ -44,19 +49,19 @@
44
  * @package elefunds API PHP Library
45
  * @subpackage View
46
  * @author Christian Peters <christian@elefunds.de>
47
- * @copyright 2012 elefunds GmbH <hello@elefunds.de>
48
  * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
49
  * @link http://www.elefunds.de
50
  * @since File available since Release 1.0.0
51
  */
52
- interface Elefunds_View_ViewInterface {
53
 
54
  /**
55
  * Sets the name of the template. This must be corresponding to
56
  * the name of a folder in the Template folder.
57
  *
58
  * @param string $template
59
- * @return Elefunds_View_BaseView
60
  */
61
  public function setTemplate($template);
62
 
@@ -66,6 +71,24 @@ interface Elefunds_View_ViewInterface {
66
  * @return string
67
  */
68
  public function getTemplate();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
 
70
  /**
71
  * Returns all javascript files that are required for this plugin to work in their correct order.
@@ -128,7 +151,7 @@ interface Elefunds_View_ViewInterface {
128
  * @param mixed $class string (class name) or instance
129
  * @param string $method
130
  * @throws InvalidArgumentException
131
- * @return Elefunds_View_ViewInterface
132
  */
133
  public function registerAssignHook($name, $class, $method);
134
 
@@ -145,7 +168,7 @@ interface Elefunds_View_ViewInterface {
145
  * @param string $key
146
  * @param mixed $value
147
  * @throws InvalidArgumentException if given key is not a string
148
- * @return Elefunds_View_BaseView
149
  */
150
  public function assign($key, $value);
151
 
@@ -153,27 +176,24 @@ interface Elefunds_View_ViewInterface {
153
  * Add multiple variables to the view.
154
  *
155
  * @param array $values array in the format array(key1 => value1, key2 => value2).
156
- * @return Elefunds_View_BaseView
157
  */
158
  public function assignMultiple(array $values);
159
 
160
  /**
161
  * Renders the given output.
162
  *
163
- * @param string $templateName name of the template to render
164
- * @param bool $givenTemplateNameIsAbsolutePathWithFullyQualifiedFilename
165
- *
166
  * @return string the rendered HTML
167
  */
168
- public function render($templateName = 'View', $givenTemplateNameIsAbsolutePathWithFullyQualifiedFilename = FALSE);
169
 
170
  /**
171
  * Add your css file with it's pure file name (e.g. 'styles.css') and save it
172
  * as /Template/YourTemplateFolder/Css/styles.css
173
  *
174
  * @param string $file
175
- * @throws Elefunds_Exception_ElefundsException if file does not exist
176
- * @return Elefunds_View_BaseView
177
  */
178
  public function addCssFile($file);
179
 
@@ -183,8 +203,8 @@ interface Elefunds_View_ViewInterface {
183
  * Wrapper for addCss($file).
184
  *
185
  * @param array $files
186
- * @throws Elefunds_Exception_ElefundsException if file does not exist
187
- * @return Elefunds_View_BaseView
188
  */
189
  public function addCssFiles(array $files);
190
 
@@ -194,7 +214,7 @@ interface Elefunds_View_ViewInterface {
194
  *
195
  * @param string $file
196
  * @throws InvalidArgumentException if given key is not a string
197
- * @return Elefunds_View_BaseView
198
  */
199
  public function addJavascriptFile($file);
200
 
@@ -204,8 +224,8 @@ interface Elefunds_View_ViewInterface {
204
  * Wrapper for addJavascriptFiles($file).
205
  *
206
  * @param array $files
207
- * @throws Elefunds_Exception_ElefundsException if file does not exist
208
- * @return Elefunds_View_BaseView
209
  */
210
  public function addJavascriptFiles(array $files);
211
 
3
  /**
4
  * elefunds API PHP Library
5
  *
6
+ * Copyright (c) 2012 - 2013, elefunds GmbH <hello@elefunds.de>.
7
  * All rights reserved.
8
  *
9
  * Redistribution and use in source and binary forms, with or without
36
  * POSSIBILITY OF SUCH DAMAGE.
37
  *
38
  */
39
+
40
+ namespace Lfnds\View;
41
+
42
+ use InvalidArgumentException;
43
+ use Lfnds\Exception\ElefundsException;
44
+
45
 
46
  /**
47
  * View Interface
49
  * @package elefunds API PHP Library
50
  * @subpackage View
51
  * @author Christian Peters <christian@elefunds.de>
52
+ * @copyright 2012 - 2013 elefunds GmbH <hello@elefunds.de>
53
  * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
54
  * @link http://www.elefunds.de
55
  * @since File available since Release 1.0.0
56
  */
57
+ interface ViewInterface {
58
 
59
  /**
60
  * Sets the name of the template. This must be corresponding to
61
  * the name of a folder in the Template folder.
62
  *
63
  * @param string $template
64
+ * @return ViewInterface
65
  */
66
  public function setTemplate($template);
67
 
71
  * @return string
72
  */
73
  public function getTemplate();
74
+
75
+ /**
76
+ * Sets the file to be rendered with the applied view information.
77
+ * The path must be relative to the template.
78
+ *
79
+ * E.g. 'View.phtml' or 'views/sample.php'.
80
+ *
81
+ * @param string $file
82
+ * @return ViewInterface
83
+ */
84
+ public function setRenderFile($file);
85
+
86
+ /**
87
+ * Returns the file to be rendered.
88
+ *
89
+ * @return string
90
+ */
91
+ public function getRenderFile();
92
 
93
  /**
94
  * Returns all javascript files that are required for this plugin to work in their correct order.
151
  * @param mixed $class string (class name) or instance
152
  * @param string $method
153
  * @throws InvalidArgumentException
154
+ * @return ViewInterface
155
  */
156
  public function registerAssignHook($name, $class, $method);
157
 
168
  * @param string $key
169
  * @param mixed $value
170
  * @throws InvalidArgumentException if given key is not a string
171
+ * @return ViewInterface
172
  */
173
  public function assign($key, $value);
174
 
176
  * Add multiple variables to the view.
177
  *
178
  * @param array $values array in the format array(key1 => value1, key2 => value2).
179
+ * @return ViewInterface
180
  */
181
  public function assignMultiple(array $values);
182
 
183
  /**
184
  * Renders the given output.
185
  *
 
 
 
186
  * @return string the rendered HTML
187
  */
188
+ public function render();
189
 
190
  /**
191
  * Add your css file with it's pure file name (e.g. 'styles.css') and save it
192
  * as /Template/YourTemplateFolder/Css/styles.css
193
  *
194
  * @param string $file
195
+ * @throws ElefundsException if file does not exist
196
+ * @return ViewInterface
197
  */
198
  public function addCssFile($file);
199
 
203
  * Wrapper for addCss($file).
204
  *
205
  * @param array $files
206
+ * @throws ElefundsException if file does not exist
207
+ * @return ViewInterface
208
  */
209
  public function addCssFiles(array $files);
210
 
214
  *
215
  * @param string $file
216
  * @throws InvalidArgumentException if given key is not a string
217
+ * @return ViewInterface
218
  */
219
  public function addJavascriptFile($file);
220
 
224
  * Wrapper for addJavascriptFiles($file).
225
  *
226
  * @param array $files
227
+ * @throws ElefundsException if file does not exist
228
+ * @return ViewInterface
229
  */
230
  public function addJavascriptFiles(array $files);
231
 
package.xml CHANGED
@@ -1,9 +1,9 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>lfnds_donation</name>
4
- <version>1.0.6</version>
5
  <stability>stable</stability>
6
- <license uri="http://www.opensource.org/licenses/BSD-3-Clause">The BSD 3-Clause License</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>elefunds erm&#xF6;glicht Kunden den zu zahlenden Betrag aufzurunden und an gemeinn&#xFC;tzige Organisationen zu spenden.</summary>
@@ -44,11 +44,11 @@ kontakt @ elefunds.de&lt;br /&gt;&#xD;
44
  Tel. +49 (0)30 48 49 24 38&lt;/p&gt;&#xD;
45
  &#xD;
46
  &lt;p&gt;&lt;i&gt;Wir bitten zu entschuldigen, dass im Interesse unserer Charitypartner Online Shops, die &#xFC;berwiegend Alkoholika und Zigaretten/Zigarren anbieten, den elefunds Service nicht nutzen k&#xF6;nnen. Grunds&#xE4;tzlich ausgeschlossen sind Online Shops, die Pornographie und Waffen jeglicher Art vertreiben.&lt;/i&gt;&lt;/p&gt;</description>
47
- <notes>Bugfix Release</notes>
48
- <authors><author><name>elefunds GmbH</name><user>elefunds</user><email>kontakt@elefunds.de</email></author></authors>
49
- <date>2013-07-26</date>
50
- <time>16:52:26</time>
51
- <contents><target name="magecommunity"><dir><dir name="Lfnds"><dir name="Donation"><dir name="Block"><dir name="Checkout"><file name="Banner.php" hash="c75768667011bbeca1395ea872138acf"/><file name="Socialmedia.php" hash="a60509fcf51e08980ee1545f8485d73e"/></dir><dir name="Page"><file name="Head.php" hash="a4d41da827b5e51e5f1081f105b1d7cb"/></dir><dir name="Sales"><dir name="Order"><file name="Email.php" hash="ed610afb13caaac6c37bcff9db593601"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="ab26d8dfc150f44659ba123c4f5afe41"/></dir><dir name="Manager"><file name="SyncManager.php" hash="d9f6e7b35f3757b62dcedf1484b44813"/></dir><dir name="Model"><file name="Donation.php" hash="1175fc24afa11ea58ac8f26bdde62e6f"/><dir name="Mysql4"><dir name="Donation"><file name="Collection.php" hash="8187802aca89ac243d256e9d7cb6dfe3"/></dir><file name="Donation.php" hash="004cad3e2fad4bf73f9b4b4c0afe1d12"/><dir name="Receiver"><file name="Collection.php" hash="992d049163b3a5f75568269fdf2272c5"/></dir><file name="Receiver.php" hash="95c929e7d06f519c4e2ee519e798b058"/></dir><file name="Observer.php" hash="dd84b17a4f2908f0bf5279b9842572b1"/><file name="Receiver.php" hash="30bf43323a7b651b83605fc98417128f"/><dir name="System"><dir name="Config"><dir name="Source"><file name="Color.php" hash="61f94ffc5df0db5238a6e6ee920ff9e6"/><file name="Payment.php" hash="2bf3a981e5b0a2dd92eaadc02fd0bdbd"/><file name="Position.php" hash="ec434ec88b85ca4b664026bfa066bc74"/><file name="Theme.php" hash="1b05ba613d2093ec5fc759a1dfbb1334"/></dir></dir></dir></dir><dir name="controllers"><file name="IndexController.php" hash="d56f46626aefb34798273181b4c7b706"/></dir><dir name="etc"><file name="config.xml" hash="779d52f354685c49f235d0e517c5d8e1"/><file name="system.xml" hash="8e2d02a862ce6d6864e826d49cb1a588"/></dir><dir name="sql"><dir name="lfnds_donation_setup"><file name="mysql4-install-1.0.0.php" hash="b926fa722faf59899f016649a8170d99"/></dir></dir></dir></dir></dir></target><target name="magedesign"><dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="lfnds_donation.xml" hash="cdaa84ebe0db2c6662d28e66e8326513"/></dir><dir name="template"><dir name="lfnds"><dir name="donation"><dir name="checkout"><dir name="onepage"><dir name="review"><file name="donation_banner.phtml" hash="9edf0cf0ed946a637bbe4c2a52e18d60"/><file name="donation_banner_after.phtml" hash="24183a92eb517b2e76e8022d34f63edd"/><file name="donation_banner_before.phtml" hash="dcd489753304685d2f89e5e36faa9a82"/></dir><file name="socialmedia.phtml" hash="c7984a5752211f28dfe04fde2d44626f"/></dir></dir><dir name="mail"><file name="description.phtml" hash="788968e611e3777c06130dcfca06dfc0"/></dir><dir name="page"><dir name="html"><file name="head.phtml" hash="ce407ff5715c837d02b1aba7975bf512"/></dir></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir><dir name="modules"><file name="Lfnds_Donation.xml" hash="49ee8216f94bda0701b6a5c7b1fb99c3"/></dir></dir></target><target name="magelocale"><dir><dir name="de_DE"><file name="Lfnds_Donation.csv" hash="e0a11e265781c36c8efd41da0c63667a"/></dir><dir name="en_US"><file name="Lfnds_Donation.csv" hash="af1ebb72d80a27e2c7f57950ea702c33"/></dir></dir></target><target name="magelib"><dir><dir name="Elefunds"><dir name="Communication"><file name="CurlRequest.php" hash="b0c6ead08836395c5df543c0e35f03c6"/><file name="RestInterface.php" hash="06a1b8fecd4abf1204d48ccbcec6b4b0"/><dir name="certificate"><file name="GandiProSSLCA.pem" hash="215597d5040603701d032e1fa299746e"/></dir></dir><dir name="Configuration"><file name="BaseConfiguration.php" hash="9e481bfc1aa6b3f0e3d5a5f2866518d6"/><file name="ConfigurationInterface.php" hash="3f39571485f8d6bcca49e69d899c86b6"/><file name="DefaultConfiguration.php" hash="e5f749ab07052186746871f20edd554f"/></dir><dir name="Documentation"><file name="PHPGuideBasics.md" hash="da7e409b76ed4c5c5fdf0b966e6c1756"/><file name="PHPGuideConfiguration.md" hash="6ab57ceca89500bda60c6e02c0b20ed0"/><file name="PHPGuideTemplating.md" hash="6682ad669ab3062d8a04ea00a1f17f03"/></dir><dir name="Example"><file name="RawDataConfiguration.php" hash="4716aa63da8f00ec9becec510d7d6709"/><file name="ShopExampleCheckoutSuccessConfiguration.php" hash="f73f364c454adc00bc1974d908660345"/><file name="ShopExampleConfiguration.php" hash="263fd5cfe055f335bc70811da175b0f7"/><file name="rawDataExample.php" hash="ee18d728a678e03afe367a69ba94fe8d"/><file name="shopExample.php" hash="79bf411089286392c0e6753492c6694e"/><file name="shopExampleCheckoutSuccess.php" hash="58f9e9b36975ff23410c01a005a0ebbc"/></dir><dir name="Exception"><file name="ElefundsCommunicationException.php" hash="74213ff89ef5dcc2afd30766f6e49e05"/><file name="ElefundsException.php" hash="8d0e54b748898eab2286bf3fe46ee7ec"/></dir><file name="Facade.php" hash="43fb7bde4bf4c361b27e3638c835eaee"/><dir name="Model"><file name="Donation.php" hash="957c897dca79616f49b30e60e5c8d9a1"/><file name="DonationInterface.php" hash="3969390f2d5898835c4c7c74361cb618"/><file name="Factory.php" hash="5b92a5696db598f1d7e8a943cb407299"/><file name="Receiver.php" hash="5b63f6c8c5068b483923c93fb250137d"/><file name="ReceiverInterface.php" hash="5bc575aea8ca44762e2b353eb86a2e32"/></dir><file name="README.md" hash="f479705edf62b3697aab2d074798aada"/><dir name="Template"><dir name="Shop"><file name="CheckoutConfiguration.php" hash="42afcf507ef01c5b84cace0a6c500370"/><file name="CheckoutSuccess.phtml" hash="564c95ae206d22f50f38126cd1a7e351"/><file name="CheckoutSuccessConfiguration.php" hash="ba8c339472e44e3b8d9d82d6979fbc8a"/><dir name="Css"><file name="color.less" hash="4f18721f13cd8b26dbabcd2c11e844ac"/><file name="elefunds.less" hash="b879f32dacf258521b0cf413ea88976c"/><file name="elefunds_dark_blue.min.css" hash="c30bca596ddb732c81fc3941d3ed0f52"/><file name="elefunds_dark_green.min.css" hash="47deea1b8f397eb279b71ba82e89e7e8"/><file name="elefunds_dark_grey.min.css" hash="1f202144f1d68547e07b0bee053ed8cd"/><file name="elefunds_dark_orange.min.css" hash="4660e08faadc310f23ba068020023473"/><file name="elefunds_dark_purple.min.css" hash="4f759f90f164dcc1d447d56a34d376cd"/><file name="elefunds_light_blue.min.css" hash="e39509ea7f014055528616a986b3ddbe"/><file name="elefunds_light_green.min.css" hash="b85854be499f48744f7d4d7bb451fb0a"/><file name="elefunds_light_grey.min.css" hash="f244fdce75ad270d56feeeffd2b5130d"/><file name="elefunds_light_orange.min.css" hash="e264e5d60e73bda315f5de53ce794783"/><file name="elefunds_light_purple.min.css" hash="719e20b305282e2750607ba90fd57687"/><file name="elements.less" hash="7e01dcb516db8e55c7f031f7da0492cf"/></dir><dir name="Helper"><file name="RequestHelper.php" hash="8f13e8e53fc699e3d079c462c06a8930"/></dir><dir name="Hooks"><file name="ShopHooks.php" hash="9a46f66b1ec8fa37d45e2e15467e5952"/></dir><dir name="Images"><file name="elefunds_item_main.png" hash="b89c61fbdc9c669034a92e9f40ce601b"/><file name="elefunds_item_small.png" hash="f55ceccecc0e76a8d019d8206905db88"/><file name="elefunds_item_thumbnail.png" hash="84bf08fff98b2f8a3f2a1616d73b432c"/></dir><dir name="Javascript"><file name="elefunds.jquery.js" hash="030a39ba6432f3423c2fcd0266ccca94"/><file name="elefunds.jquery.min.js" hash="b89c6146e0cf89f73fbccf15612b4972"/><file name="elefundsTT.jquery.js" hash="86e5170e6eea44cbdc5d44383e0404c5"/></dir><file name="ShopConfiguration.php" hash="20f99a48526699e2d4f0d19269c29bf3"/><file name="View.phtml" hash="42e6d618bf8cb87ae038446db348104a"/></dir></dir><dir name="Test"><dir name="Unit"><dir name="Configuration"><file name="BaseConfigurationTest.php" hash="ec3513a6a8972be3efdb48318ecd10db"/><file name="DefaultConfigurationTest.php" hash="790159073ffb9f6e25c3ea5df0e0c49b"/></dir><dir name="Exception"><file name="ElefundsExceptionTest.php" hash="79339ebcce32e95aee348b6658c5ed88"/></dir><file name="FacadeTest.php" hash="c06016cbc6fc5aa58d104a47adef13c2"/><dir name="Model"><file name="DonationTest.php" hash="577f18fca07fb2361853daf32247be0c"/><file name="FactoryTest.php" hash="2dbb74d7bf67bbe1cea3f8b1e1b45c8d"/><file name="ReceiverTest.php" hash="a2f0667292bc3525bc571912aa2caad0"/></dir><dir name="View"><file name="BaseViewTest.php" hash="2d5f873cf48fbe7af1e77ce6055c1d8a"/></dir></dir></dir><dir name="View"><file name="BaseView.php" hash="20bfbf8d484c9d3c1874fdf4a6493f0e"/><file name="ViewInterface.php" hash="596f19ed7ca7853062d96a4d1bca67e3"/></dir></dir></dir></target><target name="mageskin"><dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="lfnds_donation"><dir name="additional"><file name="elefunds_magento_additional.css" hash="73e4f3ae0bb9f6a1588ab9d97fb52333"/><file name="elefunds_magento_onestep_additional.css" hash="69076b25d2a3ac358487d5461ddf0b38"/></dir><file name="elefunds_dark_blue.min.css" hash="c30bca596ddb732c81fc3941d3ed0f52"/><file name="elefunds_dark_green.min.css" hash="47deea1b8f397eb279b71ba82e89e7e8"/><file name="elefunds_dark_grey.min.css" hash="1f202144f1d68547e07b0bee053ed8cd"/><file name="elefunds_dark_orange.min.css" hash="4660e08faadc310f23ba068020023473"/><file name="elefunds_dark_purple.min.css" hash="4f759f90f164dcc1d447d56a34d376cd"/><file name="elefunds_light_blue.min.css" hash="e39509ea7f014055528616a986b3ddbe"/><file name="elefunds_light_green.min.css" hash="b85854be499f48744f7d4d7bb451fb0a"/><file name="elefunds_light_grey.min.css" hash="f244fdce75ad270d56feeeffd2b5130d"/><file name="elefunds_light_orange.min.css" hash="e264e5d60e73bda315f5de53ce794783"/><file name="elefunds_light_purple.min.css" hash="719e20b305282e2750607ba90fd57687"/></dir></dir><dir name="js"><dir name="lfnds_donation"><dir name="additional"><file name="elefunds_magento_onepage_additional.js" hash="c2d9635a9acab5a6a6508cfcb8ef8aab"/><file name="elefunds_magento_onestep_additional.js" hash="105b284f2e8c686ef1b02b3ff810f731"/></dir><file name="elefunds.jquery.js" hash="030a39ba6432f3423c2fcd0266ccca94"/><file name="elefunds.jquery.min.js" hash="b89c6146e0cf89f73fbccf15612b4972"/><file name="elefundsTT.jquery.js" hash="86e5170e6eea44cbdc5d44383e0404c5"/><file name="jQueryNoConflict.js" hash="e2060c4e5e5955c824723b13a212d3ec"/><file name="jquery-1.9.1.min.js" hash="397754ba49e9e0cf4e7c190da78dda05"/></dir></dir><dir name="images"><dir name="lfnds_donation"><file name="elefunds_item_main.png" hash="b89c61fbdc9c669034a92e9f40ce601b"/><file name="elefunds_item_small.png" hash="f55ceccecc0e76a8d019d8206905db88"/><file name="elefunds_item_thumbnail.png" hash="84bf08fff98b2f8a3f2a1616d73b432c"/></dir></dir></dir></dir></dir></dir></target></contents>
52
  <compatible/>
53
- <dependencies><required><php><min>5.3.3</min><max>5.5.0</max></php></required></dependencies>
54
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>lfnds_donation</name>
4
+ <version>2.0.0</version>
5
  <stability>stable</stability>
6
+ <license uri="http://opensource.org/licenses/BSD-3-Clause">BSD3 License</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>elefunds erm&#xF6;glicht Kunden den zu zahlenden Betrag aufzurunden und an gemeinn&#xFC;tzige Organisationen zu spenden.</summary>
44
  Tel. +49 (0)30 48 49 24 38&lt;/p&gt;&#xD;
45
  &#xD;
46
  &lt;p&gt;&lt;i&gt;Wir bitten zu entschuldigen, dass im Interesse unserer Charitypartner Online Shops, die &#xFC;berwiegend Alkoholika und Zigaretten/Zigarren anbieten, den elefunds Service nicht nutzen k&#xF6;nnen. Grunds&#xE4;tzlich ausgeschlossen sind Online Shops, die Pornographie und Waffen jeglicher Art vertreiben.&lt;/i&gt;&lt;/p&gt;</description>
47
+ <notes>Updated frontend and donation synchronization.</notes>
48
+ <authors><author><name>elefunds GmbH</name><user>elefunds</user><email>contact@elefunds.de</email></author></authors>
49
+ <date>2013-08-26</date>
50
+ <time>17:29:51</time>
51
+ <contents><target name="magecommunity"><dir name="Lfnds"><dir name="Donation"><dir name="Block"><dir name="Checkout"><file name="Banner.php" hash="ec96352418440a327be827aebe854893"/><file name="Socialmedia.php" hash="c4269e62ba5ca4126c258daf140722e9"/></dir><dir name="Sales"><dir name="Order"><file name="Email.php" hash="a936d53d5600c57df107812adb759d06"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="86959ff2b5325729b2ed726b4bb87064"/></dir><dir name="Manager"><file name="SyncManager.php" hash="0bcb35fce5826f7e9e98980eb198a2ad"/></dir><dir name="Model"><file name="Donation.php" hash="10b283d2b0f4519995368bfe7b671e80"/><dir name="Mysql4"><dir name="Donation"><file name="Collection.php" hash="8187802aca89ac243d256e9d7cb6dfe3"/></dir><file name="Donation.php" hash="004cad3e2fad4bf73f9b4b4c0afe1d12"/></dir><file name="Observer.php" hash="603d7de48ed2bea631fee13d42736a25"/><dir name="System"><dir name="Config"><dir name="Source"><file name="Payment.php" hash="2bf3a981e5b0a2dd92eaadc02fd0bdbd"/><file name="Position.php" hash="ec434ec88b85ca4b664026bfa066bc74"/><file name="Theme.php" hash="e60963a4e83c8bb22418b85b0ce75c15"/></dir></dir></dir></dir><dir name="controllers"><file name="IndexController.php" hash="d56f46626aefb34798273181b4c7b706"/></dir><dir name="etc"><file name="config.xml" hash="fbfdb70cd78603c1b0767c011076217b"/><file name="system.xml" hash="ce6d3b262e6fca147789add4fed2c798"/></dir><dir name="sql"><dir name="lfnds_donation_setup"><file name="mysql4-install-1.0.0.php" hash="b99e1b6eb5cdc968ce554adec55f3f52"/><file name="mysql4-upgrade-1.0.0-2.0.0.php" hash="c9e975b0893069774abe62a483cf469f"/></dir></dir><file name=".DS_Store" hash="efcd0160043ac26968d62a1385b69937"/></dir><file name=".DS_Store" hash="53181e19618d16ad46a0d31b3f56bed6"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="lfnds_donation.xml" hash="01c4b64f88dcbd101a0096d71b768a63"/></dir><dir name="template"><dir name="lfnds"><dir name="donation"><dir name="checkout"><dir name="onepage"><dir name="review"><file name="donation_banner.phtml" hash="f49ea418bd8bcc82460185cfde8e8972"/><file name="donation_banner_after.phtml" hash="268d60a4008d1c03c66e305129d310dd"/><file name="donation_banner_before.phtml" hash="512fa950c5501dddb77155683ccf37ef"/></dir><file name="socialmedia.phtml" hash="c9355613283b80a8a2c796061112ba16"/><file name=".DS_Store" hash="ae24cfb6fde92c3e4e5b89eb209301cd"/></dir><file name=".DS_Store" hash="3a0b8c30af181f66c3bee373319ea31f"/></dir><dir name="mail"><file name="description.phtml" hash="feabe5cc691b088d6ade3e04d6b120fc"/></dir><dir name="page"><dir name="html"><file name="head.phtml" hash="ce407ff5715c837d02b1aba7975bf512"/></dir><file name=".DS_Store" hash="3f422b0981f978a17bd04d438a056701"/></dir><file name=".DS_Store" hash="a92f289efc7986f0665a5f2c19fae622"/></dir><file name=".DS_Store" hash="c2cf68cb4ef3607575bf37277332e734"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Lfnds_Donation.xml" hash="49ee8216f94bda0701b6a5c7b1fb99c3"/></dir></target><target name="magelib"><dir name="Lfnds"><dir name="Communication"><file name="CurlRequest.php" hash="4197dc61c190f39b1e15e13499a061cf"/><file name="README.md" hash="958fa2fa569bf2d81c3ef22c6747df4b"/><file name="RestInterface.php" hash="136df4096ad7ddd6479ac44b2b63dd21"/><dir name="certificate"><file name="GandiProSSLCA.pem" hash="215597d5040603701d032e1fa299746e"/></dir></dir><dir name="Configuration"><file name="BaseConfiguration.php" hash="7ed2819947a43288ac134bd6a5dde475"/><file name="ConfigurationInterface.php" hash="041f24c9b550ea826d67fa3b7faa5621"/><file name="DefaultConfiguration.php" hash="75b27a602d0d4dc3474c6479de4b74ec"/></dir><dir name="Exception"><file name="ElefundsCommunicationException.php" hash="7d7f0704ccf51398a204ee3674b2ed52"/><file name="ElefundsException.php" hash="6f044404a7e71970cdf74d2313c2dbaa"/></dir><file name="Facade.php" hash="44c947ceeef8da1c9778990df523f8e8"/><file name="FacadeInterface.php" hash="679e233343678d33dd42de1d1fb48e0a"/><dir name="Model"><file name="Donation.php" hash="2beb5870859820ea53b15d1bdcaff3a4"/><file name="DonationInterface.php" hash="bce698cef830b1b4934eb59af65658b0"/><file name="Factory.php" hash="9e46114d76efb538987741a4c058bf6a"/><file name="Receiver.php" hash="66361cf8cf36a5fe9ea19abc824da8aa"/><file name="ReceiverInterface.php" hash="955f7c842382659747d96ccfc93ad05a"/></dir><file name="README.md" hash="f479705edf62b3697aab2d074798aada"/><dir name="Template"><dir name="Shop"><file name="Checkout.phtml" hash="dfc27603f20fe0a2805b8de3c95074b2"/><file name="CheckoutConfiguration.php" hash="dd41754a8b93fc3c6ba79eff60914d8a"/><file name="CheckoutSuccess.phtml" hash="2070bc3698d875b592ce0535298a3659"/><file name="CheckoutSuccessConfiguration.php" hash="e7a5ed4e973b4460bcd2551027f52b9e"/><dir name="Helper"><file name="RequestHelper.php" hash="fe0a096411742193dc901b3b294b0fe0"/></dir><dir name="Hooks"><file name="ShopHooks.php" hash="1383c98c8cbfbbf7ac5944b027452d7f"/></dir><file name="ShopConfiguration.php" hash="15bfd37ee3784bbdeb6498cbf1ffcafb"/></dir></dir><dir name="Test"><dir name="Unit"><dir name="Communication"><file name="CurlRequestTest.php" hash="27fe2f4271ebc4d6a1a311eaaf1bcfcb"/><file name="curlMock.php" hash="53cfa976103703dc8da079506911a5a1"/></dir><dir name="Configuration"><file name="BaseConfigurationTest.php" hash="97d3c44fc6075299479ec9daa40b234a"/><file name="DefaultConfigurationTest.php" hash="920b2c5138e5c2f85c7591b82060e560"/></dir><dir name="Exception"><file name="ElefundsExceptionTest.php" hash="25236c7fd931d869bdba6c4740b9f058"/></dir><file name="FacadeTest.php" hash="4a6a7d91001661cb885e4a96437c33b6"/><dir name="Model"><file name="DonationTest.php" hash="5c6b7b73aebdfa078e59621ea1a92b5c"/><file name="FactoryTest.php" hash="7bba1724cee694fc98ba1f90f09e7626"/><file name="ReceiverTest.php" hash="61944336945fc2beccf799b3a4576b3c"/></dir><dir name="Template"><dir name="Shop"><file name="CheckoutConfigurationTest.php" hash="b255008fe8b8d881f908efda3ba086ef"/><file name="CheckoutSuccessConfigurationTest.php" hash="bccb7e37d1a8f52fcea80fbf0429081a"/><dir name="Helper"><file name="RequestHelperTest.php" hash="3a394d19172e70240832b81ce199dae9"/></dir><file name="ShopConfigurationTest.php" hash="a0eb430a08f4a58a9bd69e7d1e12daef"/></dir></dir><dir name="View"><file name="BaseViewTest.php" hash="dc11b174d3b07c978951928000fbd7a1"/></dir></dir></dir><dir name="View"><file name="BaseView.php" hash="9b4e42b2007b44dab1cc3086501bce6c"/><file name="ViewInterface.php" hash="3ad99f539e5bb1055c6dea4a29158758"/></dir></dir></target><target name="magelocale"><dir name="de_DE"><file name="Lfnds_Donation.csv" hash="765c988016941a0ccabdfad3220993a9"/></dir><dir name="en_US"><file name="Lfnds_Donation.csv" hash="c67d1b76ebed45a4bf4279a1f4e0d97f"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="images"><dir name="lfnds_donation"><file name="elefunds_item_main.png" hash="b89c61fbdc9c669034a92e9f40ce601b"/><file name="elefunds_item_small.png" hash="f55ceccecc0e76a8d019d8206905db88"/><file name="elefunds_item_thumbnail.png" hash="84bf08fff98b2f8a3f2a1616d73b432c"/></dir></dir></dir></dir></dir></target></contents>
52
  <compatible/>
53
+ <dependencies><required><php><min>5.3.3</min><max>5.5.1</max></php></required></dependencies>
54
  </package>
skin/frontend/base/default/css/lfnds_donation/additional/elefunds_magento_additional.css DELETED
@@ -1,9 +0,0 @@
1
- /*
2
- * Fix for Onepage-Checkout
3
- * Adds Border to Elefunds-Module to fit in default-styling of onepage-checkout
4
- */
5
- #elefunds {
6
- border-style: solid;
7
- border-width: 0 1px;
8
- border-color: #D9DDE3;
9
- }
 
 
 
 
 
 
 
 
 
skin/frontend/base/default/css/lfnds_donation/additional/elefunds_magento_onestep_additional.css DELETED
@@ -1,454 +0,0 @@
1
- /*
2
- * ++ One Step Checkout Success (Social-Media-Share) Specific Styling ++
3
- */
4
- #elefunds_share {
5
- width: 450px;
6
- padding: 20px 20px 10px;
7
- background: #f4f4f4;
8
- border: 4px solid #ccc;
9
- border-radius: 8px;
10
- text-align: center;
11
- }
12
- #elefunds_share > a {
13
- text-decoration: none;
14
- }
15
- #elefunds_share h3 {
16
- font-weight: bold;
17
- color: #222;
18
- margin: 0;
19
- }
20
- #elefunds_share p {
21
- font-size: 14px;
22
- color: #666;
23
- margin: 20px 0 10px;
24
- padding: 10px 10px 20px;
25
- }
26
- #elefunds_share span {
27
- font-style: normal;
28
- font-size: 11px;
29
- line-height: 21px;
30
- margin-top: 6px;
31
- vertical-align: top;
32
- display: block;
33
- }
34
-
35
-
36
- /*
37
- * ++ One Step Checkout Specific Styling ++
38
- */
39
-
40
- /*
41
- * Hide elefunds-module first until JavaScript replaced it.
42
- */
43
- #onestepcheckout-form .elefunds {
44
- display: none;
45
- }
46
- #onestepcheckout-form .elefunds.replaced {
47
- display: block;
48
- }
49
-
50
-
51
- /*
52
- * Hide sum in elefunds-container
53
- * elefunds-donation is always shown in order-review
54
- */
55
- #elefunds_round_sum_container strong {
56
- display: none;
57
- }
58
-
59
- /*
60
- * ++ One Step Checkout - Row in Order-review which shows the elefunds-donation ++
61
- */
62
- .elefunds_donation_row {
63
- display: none;
64
- }
65
- .elefunds_donation_row.active {
66
- display: table-row;
67
- }
68
- .elefunds_donation_row .title {
69
- font-style: italic;
70
- }
71
-
72
- /*
73
- * Force sizes to auto
74
- * Not able to prevent !important here because of inline-width-styles
75
- */
76
- #onestepcheckout-form .elefunds #elefunds_top,
77
- #onestepcheckout-form .elefunds #elefunds_bottom,
78
- #onestepcheckout-form .elefunds #elefunds_round_sum_container {
79
- width: auto !important;
80
- }
81
-
82
-
83
- #onestepcheckout-form .elefunds {
84
- border: 1px solid rgb(196, 196, 196);
85
- -webkit-border-radius: 1px;
86
- -moz-border-radius: 1px;
87
- border-radius: 1px;
88
- margin-top: 30px;
89
- }
90
- #onestepcheckout-form #elefunds_logo {
91
- padding: 7px;
92
- }
93
- #onestepcheckout-form #elefunds_arrow {
94
- background: url(https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/arrow_bg.png) repeat-x;
95
- color: #444;
96
- margin: 0 0 10px 0px;
97
- position: relative;
98
- }
99
- #onestepcheckout-form #elefunds_arrow #elefunds_checkbox {
100
- cursor: pointer;
101
- left: 21px;
102
- margin-top: 3px;
103
- margin-right: 3px;
104
- position: absolute;
105
- top: 15px;
106
- visibility: hidden;
107
- }
108
- /*
109
- * IE8 Fix: TODO - Solution with conditional comments
110
- */
111
- #onestepcheckout-form #elefunds_arrow #elefunds_checkbox {
112
- visibility: visible\0/;
113
- }
114
- #onestepcheckout-form #elefunds_arrow #elefunds_checkbox:checked + label {
115
- background: url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/orange/arrow_on.png') no-repeat;
116
- }
117
- #onestepcheckout-form #elefunds_arrow label {
118
- background: url(https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/orange/arrow_off.png) no-repeat;
119
- cursor: pointer;
120
- color: #DDD;
121
- display: block;
122
- font-family: 'Lucida Grande';
123
- font-size: 11px;
124
- font-weight: bold !important;
125
- height: 43px;
126
- padding: 6px 0 0 60px;
127
- }
128
-
129
- #onestepcheckout-form #elefunds_top {
130
- background: url(https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/top_bar.png) repeat-x #efefef;
131
- border-bottom: 1px solid rgb(219, 219, 219);
132
- }
133
-
134
- #onestepcheckout-form #elefunds_top > div {
135
- margin-bottom: 10px;
136
- }
137
- #onestepcheckout-form #elefunds_top > div:before,
138
- #onestepcheckout-form #elefunds_top > div:after {
139
- content:"";
140
- display:table;
141
- }
142
- #onestepcheckout-form #elefunds_top > div:after {
143
- clear:both;
144
- }
145
- #onestepcheckout-form #elefunds_top > div {
146
- zoom:1; /* For IE 6/7 (trigger hasLayout) */
147
- }
148
-
149
-
150
- #onestepcheckout-form #elefunds_plus_minus {
151
- float: left;
152
- margin-right: 10px;
153
- margin-top: 3px;
154
- margin-left: 15px;
155
- }
156
- #onestepcheckout-form #elefunds_plus_minus a:link,
157
- #onestepcheckout-form #elefunds_plus_minus a:visited {
158
- text-decoration: none;
159
- }
160
- #onestepcheckout-form #elefunds_decrease img {
161
- visibility: hidden;
162
- }
163
- #onestepcheckout-form #elefunds_decrease {
164
- background: #efefef; /* Old browsers */
165
- background: -moz-linear-gradient(top, #efefef 0%, #aaaaaa 100%); /* FF3.6+ */
166
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#efefef), color-stop(100%,#aaaaaa)); /* Chrome,Safari4+ */
167
- background: -webkit-linear-gradient(top, #efefef 0%,#aaaaaa 100%); /* Chrome10+,Safari5.1+ */
168
- background: -o-linear-gradient(top, #efefef 0%,#aaaaaa 100%); /* Opera 11.10+ */
169
- background: -ms-linear-gradient(top, #efefef 0%,#aaaaaa 100%); /* IE10+ */
170
- background: linear-gradient(to bottom, #efefef 0%,#aaaaaa 100%); /* W3C */
171
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#efefef', endColorstr='#aaaaaa',GradientType=0 ); /* IE6-9 */
172
-
173
- border: 1px solid #999;
174
- -webkit-border-radius: 10px;
175
- -moz-border-radius: 10px;
176
- border-radius: 10px;
177
-
178
- -webkit-box-shadow: 0 0 5px rgb(207, 207, 207);
179
- -moz-box-shadow: 0 0 5px rgb(207, 207, 207);
180
- box-shadow: 0 0 5px rgb(207, 207, 207);
181
-
182
- display: inline-block;
183
- height: 19px;
184
- position: relative;
185
- width: 19px;
186
- }
187
- #onestepcheckout-form #elefunds_decrease:before {
188
- content: "-";
189
- color: rgb(255, 255, 255);
190
- font-size: 18px;
191
- font-weight: bold;
192
- left: 6px;
193
- line-height: 18px;
194
- position: absolute;
195
- text-shadow: 0px 0px 2px #aaa;
196
- top: -1px;
197
- }
198
- #onestepcheckout-form #elefunds_increase img {
199
- visibility: hidden;
200
- }
201
- #onestepcheckout-form #elefunds_increase {
202
- background: #fcaa6c; /* Old browsers */
203
- background: -moz-linear-gradient(top, #fcaa6c 0%, #f7842c 100%); /* FF3.6+ */
204
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fcaa6c), color-stop(100%,#f7842c)); /* Chrome,Safari4+ */
205
- background: -webkit-linear-gradient(top, #fcaa6c 0%,#f7842c 100%); /* Chrome10+,Safari5.1+ */
206
- background: -o-linear-gradient(top, #fcaa6c 0%,#f7842c 100%); /* Opera 11.10+ */
207
- background: -ms-linear-gradient(top, #fcaa6c 0%,#f7842c 100%); /* IE10+ */
208
- background: linear-gradient(to bottom, #fcaa6c 0%,#f7842c 100%); /* W3C */
209
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fcaa6c', endColorstr='#f7842c',GradientType=0 ); /* IE6-9 */
210
-
211
- border: 1px solid rgb(207, 102, 21);
212
- -webkit-border-radius: 10px;
213
- -moz-border-radius: 10px;
214
- border-radius: 10px;
215
-
216
- -webkit-box-shadow: 0 0 5px rgb(207, 207, 207);
217
- -moz-box-shadow: 0 0 5px rgb(207, 207, 207);
218
- box-shadow: 0 0 5px rgb(207, 207, 207);
219
-
220
- display: inline-block;
221
- height: 19px;
222
- position: relative;
223
- width: 19px;
224
- }
225
- #onestepcheckout-form #elefunds_increase:before {
226
- content: "+";
227
- color: rgb(255, 255, 255);
228
- font-size: 18px;
229
- font-weight: bold;
230
- left: 4px;
231
- line-height: 18px;
232
- position: absolute;
233
- text-shadow: 0px 0px 2px #aaa;
234
- top: 1px;
235
- }
236
-
237
- #onestepcheckout-form #elefunds_input_container {
238
- float: left;
239
- margin-left: 5px;
240
- }
241
- #onestepcheckout-form #elefunds_input_container #elefunds_currency {
242
- background: url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/currency_bg.png') repeat-x;
243
- border: 1px solid #7f807f;
244
- -wekbit-border-radius: 3px 0 0 3px;
245
- -moz-border-radius: 3px 0 0 3px;
246
- border-radius: 3px 0 0 3px;
247
- float: left;
248
- height: 18px;
249
- padding: 4px 8px;
250
- text-shadow: 0 1px 0 #c6cfd8;
251
-
252
- }
253
- #onestepcheckout-form #elefunds_input_container #elefunds_input {
254
- background: #f3f3f3; /* Old browsers */
255
- background: -moz-linear-gradient(top, #f3f3f3 0%, #ffffff 100%); /* FF3.6+ */
256
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f3f3f3), color-stop(100%,#ffffff)); /* Chrome,Safari4+ */
257
- background: -webkit-linear-gradient(top, #f3f3f3 0%,#ffffff 100%); /* Chrome10+,Safari5.1+ */
258
- background: -o-linear-gradient(top, #f3f3f3 0%,#ffffff 100%); /* Opera 11.10+ */
259
- background: -ms-linear-gradient(top, #f3f3f3 0%,#ffffff 100%); /* IE10+ */
260
- background: linear-gradient(to bottom, #f3f3f3 0%,#ffffff 100%); /* W3C */
261
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f3f3f3', endColorstr='#ffffff',GradientType=0 ); /* IE6-9 */
262
-
263
- border: 1px solid #777;
264
-
265
- -webkit-box-shadow: inset 0 0 7px rgb(175, 175, 175);
266
- -moz-box-shadow: inset 0 0 7px rgb(175, 175, 175);
267
- box-shadow: inset 0 0 7px rgb(175, 175, 175);
268
-
269
- -webkit-border-radius: 0 2px 2px 0;
270
- -moz-border-radius: 0 2px 2px 0;
271
- border-radius: 0 2px 2px 0;
272
-
273
- font-size: 14px;
274
- float: left;
275
- height: 22px;
276
- margin-left: -4px;
277
- padding: 2px 4px;
278
- width: 111px;
279
- }
280
-
281
- #onestepcheckout-form #elefunds_bottom {
282
- margin: 0;
283
- }
284
- #onestepcheckout-form #elefunds_bottom .elefunds_receiver {
285
- background: url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receiver_off_bg.png') repeat-x;
286
- border: 1px solid rgb(179, 179, 179);
287
- border-left: none;
288
- border-right: none;
289
-
290
- -webkit-box-shadow: inset 0 -3px 2px -1px rgb(218, 218, 218);
291
- -moz-box-shadow: inset 0 -3px 2px -1px rgb(218, 218, 218);
292
- box-shadow: inset 0 -3px 2px -1px rgb(218, 218, 218);
293
-
294
- cursor: pointer;
295
- height: 41px;
296
- margin: 0;
297
- margin-top: -1px;
298
- padding: 7px;
299
- position: relative;
300
- }
301
- #onestepcheckout-form #elefunds_bottom .elefunds_receiver.elefunds_receiver_selected {
302
- -webkit-box-shadow: none;
303
- -moz-box-shadow: none;
304
- box-shadow: none;
305
- }
306
- #onestepcheckout-form #elefunds_bottom .elefunds_receiver.elefunds_receiver_selected label {
307
- background: url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/checkbox_on.png') 2px 11px no-repeat;
308
- }
309
- #onestepcheckout-form #elefunds_bottom .elefunds_receiver input[type="checkbox"] {
310
- left: 14px;
311
- position: absolute;
312
- top: 20px;
313
- visibility: hidden;
314
- }
315
- /*
316
- * IE8 Fix - TODO: Solution with conditional comments
317
- */
318
- #onestepcheckout-form #elefunds_bottom .elefunds_receiver input[type="checkbox"] {
319
- visibility: visible\0/;
320
- }
321
- #onestepcheckout-form #elefunds_bottom .elefunds_receiver label {
322
- background: url(https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/checkbox_off.png) no-repeat 2px 11px;
323
- cursor: pointer;
324
- display: inline-block;
325
- height: 32px;
326
- padding: 0;
327
- width: 200px;
328
- }
329
- #onestepcheckout-form #elefunds_bottom .elefunds_receiver label img {
330
- position: absolute;
331
- left: 35px;
332
- opacity: 0.7;
333
- top: 8px;
334
- }
335
- #onestepcheckout-form #elefunds_bottom .elefunds_receiver.elefunds_receiver_selected label img {
336
- opacity: 1.0;
337
- }
338
-
339
- #onestepcheckout-form #elefunds_receipt {
340
- margin: 18px 0 0 14px;
341
- overflow: hidden;
342
- }
343
- #onestepcheckout-form #elefunds_receipt input[type="checkbox"] {
344
- float: left;
345
- margin-right: 5px;
346
- }
347
- #onestepcheckout-form #elefunds_receipt label {
348
- float: left;
349
- line-height: 14px;
350
- }
351
- #onestepcheckout-form .elefunds #elefunds_round_sum_container {
352
- margin: 20px 15px;
353
- }
354
-
355
-
356
-
357
- /* +++ Tooltips +++ */
358
- /* TOOLTIPS */
359
-
360
- #tiptip_content {
361
- font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
362
- background: #222;
363
- background: rgba(0, 0, 0, 0.7);
364
- padding: 3px;
365
- overflow: hidden;
366
- width: 260px;
367
- -moz-border-radius: 6px;
368
- -webkit-border-radius: 6px;
369
- border-radius: 6px;
370
- -wekbit-box-shadow: 0 3px 7px 0.3;
371
- -moz-box-shadow: 3px 7px 0.3;
372
- box-shadow: 3px 7px 0.3;;
373
- }
374
-
375
- #tiptip_title {
376
- background-color: #f5f5f5;
377
- padding: 10px 15px 8px;
378
- color: #222;
379
- font-size: 18px;
380
- line-height: 1;
381
- text-align: center;
382
- font-weight: bold;
383
- -moz-border-radius: 3px 3px 0 0;
384
- -webkit-border-radius: 3px 3px 0 0;
385
- border-radius: 3px 3px 0 0;
386
-
387
- border-bottom: 1px solid #eee;
388
- margin: 0;
389
- }
390
-
391
- #tiptip_inner {
392
- font-size: 12px;
393
- color: #222;
394
- background-color: #fff;
395
- padding: 14px;
396
-
397
- -moz-border-radius: 0 0 3px 3px;
398
- -webkit-border-radius: 0 0 3px 3px;
399
- border-radius: 0 0 3px 3px;
400
-
401
- -webkit-background-clip: padding-box;
402
- -moz-background-clip: padding-box;
403
- background-clip: padding-box;
404
- }
405
-
406
- #tiptip_holder {
407
- display: none;
408
- position: absolute;
409
- top: 0;
410
- left: 0;
411
- z-index: 99999;
412
- }
413
-
414
- #tiptip_holder.tip_top {
415
- margin-bottom: 5px;
416
- }
417
-
418
- #tiptip_holder.tip_left {
419
- margin-right: 5px;
420
- }
421
-
422
- #tiptip_holder.tip_right {
423
- margin-left: 5px;
424
- }
425
-
426
- #tiptip_holder.tip_bottom {
427
- margin-top: 5px;
428
- }
429
-
430
- #tiptip_arrow, #tiptip_arrow_inner {
431
- position: absolute;
432
- border-color: transparent;
433
- border-style: solid;
434
- border-width: 6px;
435
- height: 0;
436
- width: 0;
437
- }
438
- #tiptip_arrow {
439
- border-right-color: rgb(85, 85, 85);
440
- }
441
-
442
- #tiptip_holder.tip_top #tiptip_arrow_inner {
443
- margin-top: -7px;
444
- margin-left: -6px;
445
- border-top-color: rgb(25,25,25);
446
- border-top-color: rgba(25,25,25,0.92);
447
- }
448
-
449
- #tiptip_holder.tip_left #tiptip_arrow_inner {
450
- margin-top: -6px;
451
- margin-left: -7px;
452
- border-left-color: rgb(25,25,25);
453
- border-left-color: rgba(25,25,25,0.92);
454
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
skin/frontend/base/default/css/lfnds_donation/elefunds_dark_blue.min.css DELETED
@@ -1 +0,0 @@
1
- #elefunds_top{position:relative;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/top_bar.png') repeat-x;height:49px;border-left:1px solid #3a414a;border-right:1px solid #3a414a;line-height:1.4;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#elefunds_top>div{float:right;margin-right:10px}#elefunds_logo{position:absolute;top:8px;left:10px}#elefunds_arrow{position:relative;display:inline-block;float:left;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/arrow_bg.png') repeat-x;height:49px;padding:0}#elefunds_checkbox{position:absolute;top:18px;left:19px;width:18px;line-height:normal;cursor:pointer;opacity:0}#elefunds_checkbox+label{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;font-weight:normal;color:#c6cfd8;padding:9px 10px 9px 60px;height:31px;margin:0;max-width:180px;float:left;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/blue/arrow_off.png') no-repeat}#elefunds_checkbox:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/blue/arrow_on.png') no-repeat}#elefunds_arrow_end{width:14px;height:49px;display:inline-block;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/arrow_end.png') no-repeat}#elefunds_plus_minus{float:left;padding:13px 10px 0 30px}#elefunds_plus_minus img{margin:0 1px}#elefunds_input_container{float:left;padding-top:11px}#elefunds_currency{display:inline-block;width:auto;height:18px;padding:4px 8px;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;font-weight:normal;line-height:18px;text-align:center;color:#c6cfd8;text-shadow:0 1px 0 #2c3238;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/currency_bg.png') repeat-x;border:1px solid #2f3439;border-radius:3px 0 0 3px;margin-right:-1px;float:left}#elefunds_input{display:inline-block;width:48px;height:18px;padding:4px 2px 4px 0;margin:0;vertical-align:middle;text-align:center;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;color:#c6cfd8;text-shadow:0 1px 0 #2c3238;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/input_bg.png') repeat-x;border:1px solid #2f3439;float:left;outline:0}.elefunds_input_active{color:#fff!important}#elefunds_bottom{height:62px;border-width:0 1px 1px;border-style:solid;border-color:#cfd0d4 #b9bec4;line-height:1.4;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.elefunds_receiver{margin:0;text-align:center;display:inline-block;border-left:1px solid #a3a6ac;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receiver_off_bg.png') repeat-x;float:left;position:relative}.elefunds_receiver>label>img{vertical-align:middle;-webkit-filter:grayscale(1) opacity(0.7);-ms-filter:"alpha(opacity=50)";filter:alpha(opacity=50)}.elefunds_receiver>input{cursor:pointer;opacity:0;font-size:100%;margin:0;vertical-align:baseline;width:22px;position:absolute;top:25px;left:13px}.elefunds_receiver>input+label{height:42px;width:165px;margin:0;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/checkbox_off.png') 10px 24px no-repeat;display:inline-block;border-left:1px solid #f6f6f6;border-left:1px solid rgba(255,255,255,0.6)}.elefunds_receiver>input:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/checkbox_on.png') 10px 24px no-repeat}#elefunds_bottom>input:first-child+div{border-left:0!important}.elefunds_receiver_selected{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receiver_on_bg.png') repeat-x}.elefunds_receiver_selected>label>img{filter:none;-webkit-filter:none;-ms-filter:none}#elefunds_below_container{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:16px;margin:0;padding:15px 0 10px;text-align:right}#elefunds_below_container label{font-weight:normal}#elefunds_round_sum_container{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/elefunds_highlight.png') right top no-repeat}#elefunds_round_sum_container strong{font-weight:bold;line-height:1.5em}#elefunds_round_sum_container strong:last-child{margin-right:8px}#elefunds_round_sum{display:inline-block;width:65px;color:#222}#elefunds_receipt{position:relative;float:left;font-size:12px;color:#333;margin:5px 0 0 15px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#elefunds_receipt_checkbox{position:absolute;top:1px;cursor:pointer;opacity:0;font-size:100%;margin:0;vertical-align:baseline;width:16px}#elefunds_receipt_checkbox+label{margin:0;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receipt_off.png') no-repeat;display:inline-block;padding-left:20px}#elefunds_receipt>input:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receipt_on.png') no-repeat}.elefunds_hidden{visibility:hidden}#elefunds_share{width:450px;padding:20px 20px 10px;background:#f4f4f4;border:4px solid #ccc;border-radius:8px;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;text-align:center}#elefunds_share>a{text-decoration:none}#elefunds_share h3{font-weight:bold;color:#222;margin:0}#elefunds_share p{font-size:14px;color:#666;margin:20px 0 10px;padding:10px 10px 20px}#elefunds_share span{font-style:normal;font-size:11px;line-height:21px;margin-top:6px;vertical-align:top;display:block}#tiptip_content{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;background:#222;background:rgba(0,0,0,0.7);padding:3px;overflow:hidden;width:260px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0,0,0,0.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,0.3);box-shadow:0 3px 7px rgba(0,0,0,0.3)}#tiptip_title{background-color:#f5f5f5;padding:10px 15px 8px;color:#222;font-size:18px;line-height:1;text-align:center;font-weight:bold;-webkit-border-top-left-radius:3px;-webkit-border-top-right-radius:3px;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-moz-border-radius-topleft:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:0;border-bottom-left-radius:0;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box;border-bottom:1px solid #eee;margin:0}#tiptip_inner{font-size:12px;color:#222;background-color:#fff;padding:14px;-webkit-border-top-left-radius:0;-webkit-border-top-right-radius:0;-webkit-border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;-moz-border-radius-topleft:0;-moz-border-radius-topright:0;-moz-border-radius-bottomright:3px;-moz-border-radius-bottomleft:3px;border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px;-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box}#tiptip_holder{display:none;position:absolute;top:0;left:0;z-index:99999}#tiptip_holder.tip_top{margin-bottom:5px}#tiptip_holder.tip_left{margin-right:5px}#tiptip_holder.tip_right{margin-left:5px}#tiptip_holder.tip_bottom{margin-top:5px}#tiptip_arrow,#tiptip_arrow_inner{position:absolute;border-color:transparent;border-style:solid;border-width:6px;height:0;width:0}#tiptip_holder.tip_top #tiptip_arrow_inner{margin-top:-7px;margin-left:-6px;border-top-color:#191919;border-top-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_right #tiptip_arrow_inner{margin-top:-6px;margin-left:-5px;border-right-color:#191919;border-right-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_bottom #tiptip_arrow_inner{margin-top:-5px;margin-left:-6px;border-bottom-color:#191919;border-bottom-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_left #tiptip_arrow_inner{margin-top:-6px;margin-left:-7px;border-left-color:#191919;border-left-color:rgba(25,25,25,0.92)}
 
skin/frontend/base/default/css/lfnds_donation/elefunds_dark_green.min.css DELETED
@@ -1 +0,0 @@
1
- #elefunds_top{position:relative;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/top_bar.png') repeat-x;height:49px;border-left:1px solid #3a414a;border-right:1px solid #3a414a;line-height:1.4;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#elefunds_top>div{float:right;margin-right:10px}#elefunds_logo{position:absolute;top:8px;left:10px}#elefunds_arrow{position:relative;display:inline-block;float:left;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/arrow_bg.png') repeat-x;height:49px;padding:0}#elefunds_checkbox{position:absolute;top:18px;left:19px;width:18px;line-height:normal;cursor:pointer;opacity:0}#elefunds_checkbox+label{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;font-weight:normal;color:#c6cfd8;padding:9px 10px 9px 60px;height:31px;margin:0;max-width:180px;float:left;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/green/arrow_off.png') no-repeat}#elefunds_checkbox:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/green/arrow_on.png') no-repeat}#elefunds_arrow_end{width:14px;height:49px;display:inline-block;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/arrow_end.png') no-repeat}#elefunds_plus_minus{float:left;padding:13px 10px 0 30px}#elefunds_plus_minus img{margin:0 1px}#elefunds_input_container{float:left;padding-top:11px}#elefunds_currency{display:inline-block;width:auto;height:18px;padding:4px 8px;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;font-weight:normal;line-height:18px;text-align:center;color:#c6cfd8;text-shadow:0 1px 0 #2c3238;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/currency_bg.png') repeat-x;border:1px solid #2f3439;border-radius:3px 0 0 3px;margin-right:-1px;float:left}#elefunds_input{display:inline-block;width:48px;height:18px;padding:4px 2px 4px 0;margin:0;vertical-align:middle;text-align:center;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;color:#c6cfd8;text-shadow:0 1px 0 #2c3238;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/input_bg.png') repeat-x;border:1px solid #2f3439;float:left;outline:0}.elefunds_input_active{color:#fff!important}#elefunds_bottom{height:62px;border-width:0 1px 1px;border-style:solid;border-color:#cfd0d4 #b9bec4;line-height:1.4;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.elefunds_receiver{margin:0;text-align:center;display:inline-block;border-left:1px solid #a3a6ac;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receiver_off_bg.png') repeat-x;float:left;position:relative}.elefunds_receiver>label>img{vertical-align:middle;-webkit-filter:grayscale(1) opacity(0.7);-ms-filter:"alpha(opacity=50)";filter:alpha(opacity=50)}.elefunds_receiver>input{cursor:pointer;opacity:0;font-size:100%;margin:0;vertical-align:baseline;width:22px;position:absolute;top:25px;left:13px}.elefunds_receiver>input+label{height:42px;width:165px;margin:0;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/checkbox_off.png') 10px 24px no-repeat;display:inline-block;border-left:1px solid #f6f6f6;border-left:1px solid rgba(255,255,255,0.6)}.elefunds_receiver>input:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/checkbox_on.png') 10px 24px no-repeat}#elefunds_bottom>input:first-child+div{border-left:0!important}.elefunds_receiver_selected{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receiver_on_bg.png') repeat-x}.elefunds_receiver_selected>label>img{filter:none;-webkit-filter:none;-ms-filter:none}#elefunds_below_container{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:16px;margin:0;padding:15px 0 10px;text-align:right}#elefunds_below_container label{font-weight:normal}#elefunds_round_sum_container{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/elefunds_highlight.png') right top no-repeat}#elefunds_round_sum_container strong{font-weight:bold;line-height:1.5em}#elefunds_round_sum_container strong:last-child{margin-right:8px}#elefunds_round_sum{display:inline-block;width:65px;color:#222}#elefunds_receipt{position:relative;float:left;font-size:12px;color:#333;margin:5px 0 0 15px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#elefunds_receipt_checkbox{position:absolute;top:1px;cursor:pointer;opacity:0;font-size:100%;margin:0;vertical-align:baseline;width:16px}#elefunds_receipt_checkbox+label{margin:0;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receipt_off.png') no-repeat;display:inline-block;padding-left:20px}#elefunds_receipt>input:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receipt_on.png') no-repeat}.elefunds_hidden{visibility:hidden}#elefunds_share{width:450px;padding:20px 20px 10px;background:#f4f4f4;border:4px solid #ccc;border-radius:8px;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;text-align:center}#elefunds_share>a{text-decoration:none}#elefunds_share h3{font-weight:bold;color:#222;margin:0}#elefunds_share p{font-size:14px;color:#666;margin:20px 0 10px;padding:10px 10px 20px}#elefunds_share span{font-style:normal;font-size:11px;line-height:21px;margin-top:6px;vertical-align:top;display:block}#tiptip_content{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;background:#222;background:rgba(0,0,0,0.7);padding:3px;overflow:hidden;width:260px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0,0,0,0.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,0.3);box-shadow:0 3px 7px rgba(0,0,0,0.3)}#tiptip_title{background-color:#f5f5f5;padding:10px 15px 8px;color:#222;font-size:18px;line-height:1;text-align:center;font-weight:bold;-webkit-border-top-left-radius:3px;-webkit-border-top-right-radius:3px;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-moz-border-radius-topleft:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:0;border-bottom-left-radius:0;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box;border-bottom:1px solid #eee;margin:0}#tiptip_inner{font-size:12px;color:#222;background-color:#fff;padding:14px;-webkit-border-top-left-radius:0;-webkit-border-top-right-radius:0;-webkit-border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;-moz-border-radius-topleft:0;-moz-border-radius-topright:0;-moz-border-radius-bottomright:3px;-moz-border-radius-bottomleft:3px;border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px;-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box}#tiptip_holder{display:none;position:absolute;top:0;left:0;z-index:99999}#tiptip_holder.tip_top{margin-bottom:5px}#tiptip_holder.tip_left{margin-right:5px}#tiptip_holder.tip_right{margin-left:5px}#tiptip_holder.tip_bottom{margin-top:5px}#tiptip_arrow,#tiptip_arrow_inner{position:absolute;border-color:transparent;border-style:solid;border-width:6px;height:0;width:0}#tiptip_holder.tip_top #tiptip_arrow_inner{margin-top:-7px;margin-left:-6px;border-top-color:#191919;border-top-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_right #tiptip_arrow_inner{margin-top:-6px;margin-left:-5px;border-right-color:#191919;border-right-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_bottom #tiptip_arrow_inner{margin-top:-5px;margin-left:-6px;border-bottom-color:#191919;border-bottom-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_left #tiptip_arrow_inner{margin-top:-6px;margin-left:-7px;border-left-color:#191919;border-left-color:rgba(25,25,25,0.92)}
 
skin/frontend/base/default/css/lfnds_donation/elefunds_dark_grey.min.css DELETED
@@ -1 +0,0 @@
1
- #elefunds_top{position:relative;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/top_bar.png') repeat-x;height:49px;border-left:1px solid #3a414a;border-right:1px solid #3a414a;line-height:1.4;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#elefunds_top>div{float:right;margin-right:10px}#elefunds_logo{position:absolute;top:8px;left:10px}#elefunds_arrow{position:relative;display:inline-block;float:left;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/arrow_bg.png') repeat-x;height:49px;padding:0}#elefunds_checkbox{position:absolute;top:18px;left:19px;width:18px;line-height:normal;cursor:pointer;opacity:0}#elefunds_checkbox+label{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;font-weight:normal;color:#c6cfd8;padding:9px 10px 9px 60px;height:31px;margin:0;max-width:180px;float:left;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/grey/arrow_off.png') no-repeat}#elefunds_checkbox:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/grey/arrow_on.png') no-repeat}#elefunds_arrow_end{width:14px;height:49px;display:inline-block;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/arrow_end.png') no-repeat}#elefunds_plus_minus{float:left;padding:13px 10px 0 30px}#elefunds_plus_minus img{margin:0 1px}#elefunds_input_container{float:left;padding-top:11px}#elefunds_currency{display:inline-block;width:auto;height:18px;padding:4px 8px;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;font-weight:normal;line-height:18px;text-align:center;color:#c6cfd8;text-shadow:0 1px 0 #2c3238;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/currency_bg.png') repeat-x;border:1px solid #2f3439;border-radius:3px 0 0 3px;margin-right:-1px;float:left}#elefunds_input{display:inline-block;width:48px;height:18px;padding:4px 2px 4px 0;margin:0;vertical-align:middle;text-align:center;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;color:#c6cfd8;text-shadow:0 1px 0 #2c3238;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/input_bg.png') repeat-x;border:1px solid #2f3439;float:left;outline:0}.elefunds_input_active{color:#fff!important}#elefunds_bottom{height:62px;border-width:0 1px 1px;border-style:solid;border-color:#cfd0d4 #b9bec4;line-height:1.4;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.elefunds_receiver{margin:0;text-align:center;display:inline-block;border-left:1px solid #a3a6ac;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receiver_off_bg.png') repeat-x;float:left;position:relative}.elefunds_receiver>label>img{vertical-align:middle;-webkit-filter:grayscale(1) opacity(0.7);-ms-filter:"alpha(opacity=50)";filter:alpha(opacity=50)}.elefunds_receiver>input{cursor:pointer;opacity:0;font-size:100%;margin:0;vertical-align:baseline;width:22px;position:absolute;top:25px;left:13px}.elefunds_receiver>input+label{height:42px;width:165px;margin:0;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/checkbox_off.png') 10px 24px no-repeat;display:inline-block;border-left:1px solid #f6f6f6;border-left:1px solid rgba(255,255,255,0.6)}.elefunds_receiver>input:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/checkbox_on.png') 10px 24px no-repeat}#elefunds_bottom>input:first-child+div{border-left:0!important}.elefunds_receiver_selected{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receiver_on_bg.png') repeat-x}.elefunds_receiver_selected>label>img{filter:none;-webkit-filter:none;-ms-filter:none}#elefunds_below_container{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:16px;margin:0;padding:15px 0 10px;text-align:right}#elefunds_below_container label{font-weight:normal}#elefunds_round_sum_container{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/elefunds_highlight.png') right top no-repeat}#elefunds_round_sum_container strong{font-weight:bold;line-height:1.5em}#elefunds_round_sum_container strong:last-child{margin-right:8px}#elefunds_round_sum{display:inline-block;width:65px;color:#222}#elefunds_receipt{position:relative;float:left;font-size:12px;color:#333;margin:5px 0 0 15px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#elefunds_receipt_checkbox{position:absolute;top:1px;cursor:pointer;opacity:0;font-size:100%;margin:0;vertical-align:baseline;width:16px}#elefunds_receipt_checkbox+label{margin:0;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receipt_off.png') no-repeat;display:inline-block;padding-left:20px}#elefunds_receipt>input:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receipt_on.png') no-repeat}.elefunds_hidden{visibility:hidden}#elefunds_share{width:450px;padding:20px 20px 10px;background:#f4f4f4;border:4px solid #ccc;border-radius:8px;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;text-align:center}#elefunds_share>a{text-decoration:none}#elefunds_share h3{font-weight:bold;color:#222;margin:0}#elefunds_share p{font-size:14px;color:#666;margin:20px 0 10px;padding:10px 10px 20px}#elefunds_share span{font-style:normal;font-size:11px;line-height:21px;margin-top:6px;vertical-align:top;display:block}#tiptip_content{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;background:#222;background:rgba(0,0,0,0.7);padding:3px;overflow:hidden;width:260px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0,0,0,0.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,0.3);box-shadow:0 3px 7px rgba(0,0,0,0.3)}#tiptip_title{background-color:#f5f5f5;padding:10px 15px 8px;color:#222;font-size:18px;line-height:1;text-align:center;font-weight:bold;-webkit-border-top-left-radius:3px;-webkit-border-top-right-radius:3px;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-moz-border-radius-topleft:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:0;border-bottom-left-radius:0;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box;border-bottom:1px solid #eee;margin:0}#tiptip_inner{font-size:12px;color:#222;background-color:#fff;padding:14px;-webkit-border-top-left-radius:0;-webkit-border-top-right-radius:0;-webkit-border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;-moz-border-radius-topleft:0;-moz-border-radius-topright:0;-moz-border-radius-bottomright:3px;-moz-border-radius-bottomleft:3px;border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px;-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box}#tiptip_holder{display:none;position:absolute;top:0;left:0;z-index:99999}#tiptip_holder.tip_top{margin-bottom:5px}#tiptip_holder.tip_left{margin-right:5px}#tiptip_holder.tip_right{margin-left:5px}#tiptip_holder.tip_bottom{margin-top:5px}#tiptip_arrow,#tiptip_arrow_inner{position:absolute;border-color:transparent;border-style:solid;border-width:6px;height:0;width:0}#tiptip_holder.tip_top #tiptip_arrow_inner{margin-top:-7px;margin-left:-6px;border-top-color:#191919;border-top-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_right #tiptip_arrow_inner{margin-top:-6px;margin-left:-5px;border-right-color:#191919;border-right-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_bottom #tiptip_arrow_inner{margin-top:-5px;margin-left:-6px;border-bottom-color:#191919;border-bottom-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_left #tiptip_arrow_inner{margin-top:-6px;margin-left:-7px;border-left-color:#191919;border-left-color:rgba(25,25,25,0.92)}
 
skin/frontend/base/default/css/lfnds_donation/elefunds_dark_orange.min.css DELETED
@@ -1 +0,0 @@
1
- #elefunds_top{position:relative;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/top_bar.png') repeat-x;height:49px;border-left:1px solid #3a414a;border-right:1px solid #3a414a;line-height:1.4;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#elefunds_top>div{float:right;margin-right:10px}#elefunds_logo{position:absolute;top:8px;left:10px}#elefunds_arrow{position:relative;display:inline-block;float:left;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/arrow_bg.png') repeat-x;height:49px;padding:0}#elefunds_checkbox{position:absolute;top:18px;left:19px;width:18px;line-height:normal;cursor:pointer;opacity:0}#elefunds_checkbox+label{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;font-weight:normal;color:#c6cfd8;padding:9px 10px 9px 60px;height:31px;margin:0;max-width:180px;float:left;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/orange/arrow_off.png') no-repeat}#elefunds_checkbox:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/orange/arrow_on.png') no-repeat}#elefunds_arrow_end{width:14px;height:49px;display:inline-block;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/arrow_end.png') no-repeat}#elefunds_plus_minus{float:left;padding:13px 10px 0 30px}#elefunds_plus_minus img{margin:0 1px}#elefunds_input_container{float:left;padding-top:11px}#elefunds_currency{display:inline-block;width:auto;height:18px;padding:4px 8px;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;font-weight:normal;line-height:18px;text-align:center;color:#c6cfd8;text-shadow:0 1px 0 #2c3238;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/currency_bg.png') repeat-x;border:1px solid #2f3439;border-radius:3px 0 0 3px;margin-right:-1px;float:left}#elefunds_input{display:inline-block;width:48px;height:18px;padding:4px 2px 4px 0;margin:0;vertical-align:middle;text-align:center;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;color:#c6cfd8;text-shadow:0 1px 0 #2c3238;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/input_bg.png') repeat-x;border:1px solid #2f3439;float:left;outline:0}.elefunds_input_active{color:#fff!important}#elefunds_bottom{height:62px;border-width:0 1px 1px;border-style:solid;border-color:#cfd0d4 #b9bec4;line-height:1.4;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.elefunds_receiver{margin:0;text-align:center;display:inline-block;border-left:1px solid #a3a6ac;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receiver_off_bg.png') repeat-x;float:left;position:relative}.elefunds_receiver>label>img{vertical-align:middle;-webkit-filter:grayscale(1) opacity(0.7);-ms-filter:"alpha(opacity=50)";filter:alpha(opacity=50)}.elefunds_receiver>input{cursor:pointer;opacity:0;font-size:100%;margin:0;vertical-align:baseline;width:22px;position:absolute;top:25px;left:13px}.elefunds_receiver>input+label{height:42px;width:165px;margin:0;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/checkbox_off.png') 10px 24px no-repeat;display:inline-block;border-left:1px solid #f6f6f6;border-left:1px solid rgba(255,255,255,0.6)}.elefunds_receiver>input:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/checkbox_on.png') 10px 24px no-repeat}#elefunds_bottom>input:first-child+div{border-left:0!important}.elefunds_receiver_selected{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receiver_on_bg.png') repeat-x}.elefunds_receiver_selected>label>img{filter:none;-webkit-filter:none;-ms-filter:none}#elefunds_below_container{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:16px;margin:0;padding:15px 0 10px;text-align:right}#elefunds_below_container label{font-weight:normal}#elefunds_round_sum_container{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/elefunds_highlight.png') right top no-repeat}#elefunds_round_sum_container strong{font-weight:bold;line-height:1.5em}#elefunds_round_sum_container strong:last-child{margin-right:8px}#elefunds_round_sum{display:inline-block;width:65px;color:#222}#elefunds_receipt{position:relative;float:left;font-size:12px;color:#333;margin:5px 0 0 15px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#elefunds_receipt_checkbox{position:absolute;top:1px;cursor:pointer;opacity:0;font-size:100%;margin:0;vertical-align:baseline;width:16px}#elefunds_receipt_checkbox+label{margin:0;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receipt_off.png') no-repeat;display:inline-block;padding-left:20px}#elefunds_receipt>input:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receipt_on.png') no-repeat}.elefunds_hidden{visibility:hidden}#elefunds_share{width:450px;padding:20px 20px 10px;background:#f4f4f4;border:4px solid #ccc;border-radius:8px;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;text-align:center}#elefunds_share>a{text-decoration:none}#elefunds_share h3{font-weight:bold;color:#222;margin:0}#elefunds_share p{font-size:14px;color:#666;margin:20px 0 10px;padding:10px 10px 20px}#elefunds_share span{font-style:normal;font-size:11px;line-height:21px;margin-top:6px;vertical-align:top;display:block}#tiptip_content{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;background:#222;background:rgba(0,0,0,0.7);padding:3px;overflow:hidden;width:260px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0,0,0,0.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,0.3);box-shadow:0 3px 7px rgba(0,0,0,0.3)}#tiptip_title{background-color:#f5f5f5;padding:10px 15px 8px;color:#222;font-size:18px;line-height:1;text-align:center;font-weight:bold;-webkit-border-top-left-radius:3px;-webkit-border-top-right-radius:3px;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-moz-border-radius-topleft:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:0;border-bottom-left-radius:0;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box;border-bottom:1px solid #eee;margin:0}#tiptip_inner{font-size:12px;color:#222;background-color:#fff;padding:14px;-webkit-border-top-left-radius:0;-webkit-border-top-right-radius:0;-webkit-border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;-moz-border-radius-topleft:0;-moz-border-radius-topright:0;-moz-border-radius-bottomright:3px;-moz-border-radius-bottomleft:3px;border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px;-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box}#tiptip_holder{display:none;position:absolute;top:0;left:0;z-index:99999}#tiptip_holder.tip_top{margin-bottom:5px}#tiptip_holder.tip_left{margin-right:5px}#tiptip_holder.tip_right{margin-left:5px}#tiptip_holder.tip_bottom{margin-top:5px}#tiptip_arrow,#tiptip_arrow_inner{position:absolute;border-color:transparent;border-style:solid;border-width:6px;height:0;width:0}#tiptip_holder.tip_top #tiptip_arrow_inner{margin-top:-7px;margin-left:-6px;border-top-color:#191919;border-top-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_right #tiptip_arrow_inner{margin-top:-6px;margin-left:-5px;border-right-color:#191919;border-right-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_bottom #tiptip_arrow_inner{margin-top:-5px;margin-left:-6px;border-bottom-color:#191919;border-bottom-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_left #tiptip_arrow_inner{margin-top:-6px;margin-left:-7px;border-left-color:#191919;border-left-color:rgba(25,25,25,0.92)}
 
skin/frontend/base/default/css/lfnds_donation/elefunds_dark_purple.min.css DELETED
@@ -1 +0,0 @@
1
- #elefunds_top{position:relative;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/top_bar.png') repeat-x;height:49px;border-left:1px solid #3a414a;border-right:1px solid #3a414a;line-height:1.4;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#elefunds_top>div{float:right;margin-right:10px}#elefunds_logo{position:absolute;top:8px;left:10px}#elefunds_arrow{position:relative;display:inline-block;float:left;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/arrow_bg.png') repeat-x;height:49px;padding:0}#elefunds_checkbox{position:absolute;top:18px;left:19px;width:18px;line-height:normal;cursor:pointer;opacity:0}#elefunds_checkbox+label{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;font-weight:normal;color:#c6cfd8;padding:9px 10px 9px 60px;height:31px;margin:0;max-width:180px;float:left;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/purple/arrow_off.png') no-repeat}#elefunds_checkbox:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/purple/arrow_on.png') no-repeat}#elefunds_arrow_end{width:14px;height:49px;display:inline-block;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/arrow_end.png') no-repeat}#elefunds_plus_minus{float:left;padding:13px 10px 0 30px}#elefunds_plus_minus img{margin:0 1px}#elefunds_input_container{float:left;padding-top:11px}#elefunds_currency{display:inline-block;width:auto;height:18px;padding:4px 8px;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;font-weight:normal;line-height:18px;text-align:center;color:#c6cfd8;text-shadow:0 1px 0 #2c3238;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/currency_bg.png') repeat-x;border:1px solid #2f3439;border-radius:3px 0 0 3px;margin-right:-1px;float:left}#elefunds_input{display:inline-block;width:48px;height:18px;padding:4px 2px 4px 0;margin:0;vertical-align:middle;text-align:center;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;color:#c6cfd8;text-shadow:0 1px 0 #2c3238;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/dark/input_bg.png') repeat-x;border:1px solid #2f3439;float:left;outline:0}.elefunds_input_active{color:#fff!important}#elefunds_bottom{height:62px;border-width:0 1px 1px;border-style:solid;border-color:#cfd0d4 #b9bec4;line-height:1.4;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.elefunds_receiver{margin:0;text-align:center;display:inline-block;border-left:1px solid #a3a6ac;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receiver_off_bg.png') repeat-x;float:left;position:relative}.elefunds_receiver>label>img{vertical-align:middle;-webkit-filter:grayscale(1) opacity(0.7);-ms-filter:"alpha(opacity=50)";filter:alpha(opacity=50)}.elefunds_receiver>input{cursor:pointer;opacity:0;font-size:100%;margin:0;vertical-align:baseline;width:22px;position:absolute;top:25px;left:13px}.elefunds_receiver>input+label{height:42px;width:165px;margin:0;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/checkbox_off.png') 10px 24px no-repeat;display:inline-block;border-left:1px solid #f6f6f6;border-left:1px solid rgba(255,255,255,0.6)}.elefunds_receiver>input:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/checkbox_on.png') 10px 24px no-repeat}#elefunds_bottom>input:first-child+div{border-left:0!important}.elefunds_receiver_selected{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receiver_on_bg.png') repeat-x}.elefunds_receiver_selected>label>img{filter:none;-webkit-filter:none;-ms-filter:none}#elefunds_below_container{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:16px;margin:0;padding:15px 0 10px;text-align:right}#elefunds_below_container label{font-weight:normal}#elefunds_round_sum_container{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/elefunds_highlight.png') right top no-repeat}#elefunds_round_sum_container strong{font-weight:bold;line-height:1.5em}#elefunds_round_sum_container strong:last-child{margin-right:8px}#elefunds_round_sum{display:inline-block;width:65px;color:#222}#elefunds_receipt{position:relative;float:left;font-size:12px;color:#333;margin:5px 0 0 15px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#elefunds_receipt_checkbox{position:absolute;top:1px;cursor:pointer;opacity:0;font-size:100%;margin:0;vertical-align:baseline;width:16px}#elefunds_receipt_checkbox+label{margin:0;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receipt_off.png') no-repeat;display:inline-block;padding-left:20px}#elefunds_receipt>input:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receipt_on.png') no-repeat}.elefunds_hidden{visibility:hidden}#elefunds_share{width:450px;padding:20px 20px 10px;background:#f4f4f4;border:4px solid #ccc;border-radius:8px;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;text-align:center}#elefunds_share>a{text-decoration:none}#elefunds_share h3{font-weight:bold;color:#222;margin:0}#elefunds_share p{font-size:14px;color:#666;margin:20px 0 10px;padding:10px 10px 20px}#elefunds_share span{font-style:normal;font-size:11px;line-height:21px;margin-top:6px;vertical-align:top;display:block}#tiptip_content{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;background:#222;background:rgba(0,0,0,0.7);padding:3px;overflow:hidden;width:260px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0,0,0,0.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,0.3);box-shadow:0 3px 7px rgba(0,0,0,0.3)}#tiptip_title{background-color:#f5f5f5;padding:10px 15px 8px;color:#222;font-size:18px;line-height:1;text-align:center;font-weight:bold;-webkit-border-top-left-radius:3px;-webkit-border-top-right-radius:3px;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-moz-border-radius-topleft:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:0;border-bottom-left-radius:0;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box;border-bottom:1px solid #eee;margin:0}#tiptip_inner{font-size:12px;color:#222;background-color:#fff;padding:14px;-webkit-border-top-left-radius:0;-webkit-border-top-right-radius:0;-webkit-border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;-moz-border-radius-topleft:0;-moz-border-radius-topright:0;-moz-border-radius-bottomright:3px;-moz-border-radius-bottomleft:3px;border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px;-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box}#tiptip_holder{display:none;position:absolute;top:0;left:0;z-index:99999}#tiptip_holder.tip_top{margin-bottom:5px}#tiptip_holder.tip_left{margin-right:5px}#tiptip_holder.tip_right{margin-left:5px}#tiptip_holder.tip_bottom{margin-top:5px}#tiptip_arrow,#tiptip_arrow_inner{position:absolute;border-color:transparent;border-style:solid;border-width:6px;height:0;width:0}#tiptip_holder.tip_top #tiptip_arrow_inner{margin-top:-7px;margin-left:-6px;border-top-color:#191919;border-top-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_right #tiptip_arrow_inner{margin-top:-6px;margin-left:-5px;border-right-color:#191919;border-right-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_bottom #tiptip_arrow_inner{margin-top:-5px;margin-left:-6px;border-bottom-color:#191919;border-bottom-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_left #tiptip_arrow_inner{margin-top:-6px;margin-left:-7px;border-left-color:#191919;border-left-color:rgba(25,25,25,0.92)}
 
skin/frontend/base/default/css/lfnds_donation/elefunds_light_blue.min.css DELETED
@@ -1 +0,0 @@
1
- #elefunds_top{position:relative;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/top_bar.png') repeat-x;height:49px;border-left:1px solid #8c8f91;border-right:1px solid #8c8f91;line-height:1.4;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#elefunds_top>div{float:right;margin-right:10px}#elefunds_logo{position:absolute;top:8px;left:10px}#elefunds_arrow{position:relative;display:inline-block;float:left;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/arrow_bg.png') repeat-x;height:49px;padding:0}#elefunds_checkbox{position:absolute;top:18px;left:19px;width:18px;line-height:normal;cursor:pointer;opacity:0}#elefunds_checkbox+label{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;font-weight:normal;color:#d0d9d2;padding:9px 10px 9px 60px;height:31px;margin:0;max-width:180px;float:left;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/blue/arrow_off.png') no-repeat}#elefunds_checkbox:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/blue/arrow_on.png') no-repeat}#elefunds_arrow_end{width:14px;height:49px;display:inline-block;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/arrow_end.png') no-repeat}#elefunds_plus_minus{float:left;padding:13px 10px 0 30px}#elefunds_plus_minus img{margin:0 1px}#elefunds_input_container{float:left;padding-top:11px}#elefunds_currency{display:inline-block;width:auto;height:18px;padding:4px 8px;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;font-weight:normal;line-height:18px;text-align:center;color:#2c3238;text-shadow:0 1px 0 #c6cfd8;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/currency_bg.png') repeat-x;border:1px solid #7f807f;border-radius:3px 0 0 3px;margin-right:-1px;float:left}#elefunds_input{display:inline-block;width:48px;height:18px;padding:4px 2px 4px 0;margin:0;vertical-align:middle;text-align:center;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;color:#7f807f;text-shadow:0 1px 0 #c6cfd8;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/input_bg.png') repeat-x;border:1px solid #7f807f;float:left;outline:0}.elefunds_input_active{color:#000!important}#elefunds_bottom{height:62px;border-width:0 1px 1px;border-style:solid;border-color:#cfd0d4 #b9bec4;line-height:1.4;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.elefunds_receiver{margin:0;text-align:center;display:inline-block;border-left:1px solid #a3a6ac;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receiver_off_bg.png') repeat-x;float:left;position:relative}.elefunds_receiver>label>img{vertical-align:middle;-webkit-filter:grayscale(1) opacity(0.7);-ms-filter:"alpha(opacity=50)";filter:alpha(opacity=50)}.elefunds_receiver>input{cursor:pointer;opacity:0;font-size:100%;margin:0;vertical-align:baseline;width:22px;position:absolute;top:25px;left:13px}.elefunds_receiver>input+label{height:42px;width:165px;margin:0;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/checkbox_off.png') 10px 24px no-repeat;display:inline-block;border-left:1px solid #f6f6f6;border-left:1px solid rgba(255,255,255,0.6)}.elefunds_receiver>input:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/checkbox_on.png') 10px 24px no-repeat}#elefunds_bottom>input:first-child+div{border-left:0!important}.elefunds_receiver_selected{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receiver_on_bg.png') repeat-x}.elefunds_receiver_selected>label>img{filter:none;-webkit-filter:none;-ms-filter:none}#elefunds_below_container{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:16px;margin:0;padding:15px 0 10px;text-align:right}#elefunds_below_container label{font-weight:normal}#elefunds_round_sum_container{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/elefunds_highlight.png') right top no-repeat}#elefunds_round_sum_container strong{font-weight:bold;line-height:1.5em}#elefunds_round_sum_container strong:last-child{margin-right:8px}#elefunds_round_sum{display:inline-block;width:65px;color:#222}#elefunds_receipt{position:relative;float:left;font-size:12px;color:#333;margin:5px 0 0 15px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#elefunds_receipt_checkbox{position:absolute;top:1px;cursor:pointer;opacity:0;font-size:100%;margin:0;vertical-align:baseline;width:16px}#elefunds_receipt_checkbox+label{margin:0;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receipt_off.png') no-repeat;display:inline-block;padding-left:20px}#elefunds_receipt>input:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receipt_on.png') no-repeat}.elefunds_hidden{visibility:hidden}#elefunds_share{width:450px;padding:20px 20px 10px;background:#f4f4f4;border:4px solid #ccc;border-radius:8px;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;text-align:center}#elefunds_share>a{text-decoration:none}#elefunds_share h3{font-weight:bold;color:#222;margin:0}#elefunds_share p{font-size:14px;color:#666;margin:20px 0 10px;padding:10px 10px 20px}#elefunds_share span{font-style:normal;font-size:11px;line-height:21px;margin-top:6px;vertical-align:top;display:block}#tiptip_content{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;background:#222;background:rgba(0,0,0,0.7);padding:3px;overflow:hidden;width:260px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0,0,0,0.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,0.3);box-shadow:0 3px 7px rgba(0,0,0,0.3)}#tiptip_title{background-color:#f5f5f5;padding:10px 15px 8px;color:#222;font-size:18px;line-height:1;text-align:center;font-weight:bold;-webkit-border-top-left-radius:3px;-webkit-border-top-right-radius:3px;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-moz-border-radius-topleft:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:0;border-bottom-left-radius:0;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box;border-bottom:1px solid #eee;margin:0}#tiptip_inner{font-size:12px;color:#222;background-color:#fff;padding:14px;-webkit-border-top-left-radius:0;-webkit-border-top-right-radius:0;-webkit-border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;-moz-border-radius-topleft:0;-moz-border-radius-topright:0;-moz-border-radius-bottomright:3px;-moz-border-radius-bottomleft:3px;border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px;-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box}#tiptip_holder{display:none;position:absolute;top:0;left:0;z-index:99999}#tiptip_holder.tip_top{margin-bottom:5px}#tiptip_holder.tip_left{margin-right:5px}#tiptip_holder.tip_right{margin-left:5px}#tiptip_holder.tip_bottom{margin-top:5px}#tiptip_arrow,#tiptip_arrow_inner{position:absolute;border-color:transparent;border-style:solid;border-width:6px;height:0;width:0}#tiptip_holder.tip_top #tiptip_arrow_inner{margin-top:-7px;margin-left:-6px;border-top-color:#191919;border-top-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_right #tiptip_arrow_inner{margin-top:-6px;margin-left:-5px;border-right-color:#191919;border-right-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_bottom #tiptip_arrow_inner{margin-top:-5px;margin-left:-6px;border-bottom-color:#191919;border-bottom-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_left #tiptip_arrow_inner{margin-top:-6px;margin-left:-7px;border-left-color:#191919;border-left-color:rgba(25,25,25,0.92)}
 
skin/frontend/base/default/css/lfnds_donation/elefunds_light_green.min.css DELETED
@@ -1 +0,0 @@
1
- #elefunds_top{position:relative;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/top_bar.png') repeat-x;height:49px;border-left:1px solid #8c8f91;border-right:1px solid #8c8f91;line-height:1.4;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#elefunds_top>div{float:right;margin-right:10px}#elefunds_logo{position:absolute;top:8px;left:10px}#elefunds_arrow{position:relative;display:inline-block;float:left;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/arrow_bg.png') repeat-x;height:49px;padding:0}#elefunds_checkbox{position:absolute;top:18px;left:19px;width:18px;line-height:normal;cursor:pointer;opacity:0}#elefunds_checkbox+label{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;font-weight:normal;color:#d0d9d2;padding:9px 10px 9px 60px;height:31px;margin:0;max-width:180px;float:left;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/green/arrow_off.png') no-repeat}#elefunds_checkbox:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/green/arrow_on.png') no-repeat}#elefunds_arrow_end{width:14px;height:49px;display:inline-block;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/arrow_end.png') no-repeat}#elefunds_plus_minus{float:left;padding:13px 10px 0 30px}#elefunds_plus_minus img{margin:0 1px}#elefunds_input_container{float:left;padding-top:11px}#elefunds_currency{display:inline-block;width:auto;height:18px;padding:4px 8px;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;font-weight:normal;line-height:18px;text-align:center;color:#2c3238;text-shadow:0 1px 0 #c6cfd8;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/currency_bg.png') repeat-x;border:1px solid #7f807f;border-radius:3px 0 0 3px;margin-right:-1px;float:left}#elefunds_input{display:inline-block;width:48px;height:18px;padding:4px 2px 4px 0;margin:0;vertical-align:middle;text-align:center;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;color:#7f807f;text-shadow:0 1px 0 #c6cfd8;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/input_bg.png') repeat-x;border:1px solid #7f807f;float:left;outline:0}.elefunds_input_active{color:#000!important}#elefunds_bottom{height:62px;border-width:0 1px 1px;border-style:solid;border-color:#cfd0d4 #b9bec4;line-height:1.4;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.elefunds_receiver{margin:0;text-align:center;display:inline-block;border-left:1px solid #a3a6ac;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receiver_off_bg.png') repeat-x;float:left;position:relative}.elefunds_receiver>label>img{vertical-align:middle;-webkit-filter:grayscale(1) opacity(0.7);-ms-filter:"alpha(opacity=50)";filter:alpha(opacity=50)}.elefunds_receiver>input{cursor:pointer;opacity:0;font-size:100%;margin:0;vertical-align:baseline;width:22px;position:absolute;top:25px;left:13px}.elefunds_receiver>input+label{height:42px;width:165px;margin:0;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/checkbox_off.png') 10px 24px no-repeat;display:inline-block;border-left:1px solid #f6f6f6;border-left:1px solid rgba(255,255,255,0.6)}.elefunds_receiver>input:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/checkbox_on.png') 10px 24px no-repeat}#elefunds_bottom>input:first-child+div{border-left:0!important}.elefunds_receiver_selected{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receiver_on_bg.png') repeat-x}.elefunds_receiver_selected>label>img{filter:none;-webkit-filter:none;-ms-filter:none}#elefunds_below_container{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:16px;margin:0;padding:15px 0 10px;text-align:right}#elefunds_below_container label{font-weight:normal}#elefunds_round_sum_container{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/elefunds_highlight.png') right top no-repeat}#elefunds_round_sum_container strong{font-weight:bold;line-height:1.5em}#elefunds_round_sum_container strong:last-child{margin-right:8px}#elefunds_round_sum{display:inline-block;width:65px;color:#222}#elefunds_receipt{position:relative;float:left;font-size:12px;color:#333;margin:5px 0 0 15px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#elefunds_receipt_checkbox{position:absolute;top:1px;cursor:pointer;opacity:0;font-size:100%;margin:0;vertical-align:baseline;width:16px}#elefunds_receipt_checkbox+label{margin:0;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receipt_off.png') no-repeat;display:inline-block;padding-left:20px}#elefunds_receipt>input:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receipt_on.png') no-repeat}.elefunds_hidden{visibility:hidden}#elefunds_share{width:450px;padding:20px 20px 10px;background:#f4f4f4;border:4px solid #ccc;border-radius:8px;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;text-align:center}#elefunds_share>a{text-decoration:none}#elefunds_share h3{font-weight:bold;color:#222;margin:0}#elefunds_share p{font-size:14px;color:#666;margin:20px 0 10px;padding:10px 10px 20px}#elefunds_share span{font-style:normal;font-size:11px;line-height:21px;margin-top:6px;vertical-align:top;display:block}#tiptip_content{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;background:#222;background:rgba(0,0,0,0.7);padding:3px;overflow:hidden;width:260px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0,0,0,0.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,0.3);box-shadow:0 3px 7px rgba(0,0,0,0.3)}#tiptip_title{background-color:#f5f5f5;padding:10px 15px 8px;color:#222;font-size:18px;line-height:1;text-align:center;font-weight:bold;-webkit-border-top-left-radius:3px;-webkit-border-top-right-radius:3px;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-moz-border-radius-topleft:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:0;border-bottom-left-radius:0;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box;border-bottom:1px solid #eee;margin:0}#tiptip_inner{font-size:12px;color:#222;background-color:#fff;padding:14px;-webkit-border-top-left-radius:0;-webkit-border-top-right-radius:0;-webkit-border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;-moz-border-radius-topleft:0;-moz-border-radius-topright:0;-moz-border-radius-bottomright:3px;-moz-border-radius-bottomleft:3px;border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px;-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box}#tiptip_holder{display:none;position:absolute;top:0;left:0;z-index:99999}#tiptip_holder.tip_top{margin-bottom:5px}#tiptip_holder.tip_left{margin-right:5px}#tiptip_holder.tip_right{margin-left:5px}#tiptip_holder.tip_bottom{margin-top:5px}#tiptip_arrow,#tiptip_arrow_inner{position:absolute;border-color:transparent;border-style:solid;border-width:6px;height:0;width:0}#tiptip_holder.tip_top #tiptip_arrow_inner{margin-top:-7px;margin-left:-6px;border-top-color:#191919;border-top-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_right #tiptip_arrow_inner{margin-top:-6px;margin-left:-5px;border-right-color:#191919;border-right-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_bottom #tiptip_arrow_inner{margin-top:-5px;margin-left:-6px;border-bottom-color:#191919;border-bottom-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_left #tiptip_arrow_inner{margin-top:-6px;margin-left:-7px;border-left-color:#191919;border-left-color:rgba(25,25,25,0.92)}
 
skin/frontend/base/default/css/lfnds_donation/elefunds_light_grey.min.css DELETED
@@ -1 +0,0 @@
1
- #elefunds_top{position:relative;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/top_bar.png') repeat-x;height:49px;border-left:1px solid #8c8f91;border-right:1px solid #8c8f91;line-height:1.4;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#elefunds_top>div{float:right;margin-right:10px}#elefunds_logo{position:absolute;top:8px;left:10px}#elefunds_arrow{position:relative;display:inline-block;float:left;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/arrow_bg.png') repeat-x;height:49px;padding:0}#elefunds_checkbox{position:absolute;top:18px;left:19px;width:18px;line-height:normal;cursor:pointer;opacity:0}#elefunds_checkbox+label{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;font-weight:normal;color:#d0d9d2;padding:9px 10px 9px 60px;height:31px;margin:0;max-width:180px;float:left;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/grey/arrow_off.png') no-repeat}#elefunds_checkbox:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/grey/arrow_on.png') no-repeat}#elefunds_arrow_end{width:14px;height:49px;display:inline-block;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/arrow_end.png') no-repeat}#elefunds_plus_minus{float:left;padding:13px 10px 0 30px}#elefunds_plus_minus img{margin:0 1px}#elefunds_input_container{float:left;padding-top:11px}#elefunds_currency{display:inline-block;width:auto;height:18px;padding:4px 8px;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;font-weight:normal;line-height:18px;text-align:center;color:#2c3238;text-shadow:0 1px 0 #c6cfd8;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/currency_bg.png') repeat-x;border:1px solid #7f807f;border-radius:3px 0 0 3px;margin-right:-1px;float:left}#elefunds_input{display:inline-block;width:48px;height:18px;padding:4px 2px 4px 0;margin:0;vertical-align:middle;text-align:center;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;color:#7f807f;text-shadow:0 1px 0 #c6cfd8;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/input_bg.png') repeat-x;border:1px solid #7f807f;float:left;outline:0}.elefunds_input_active{color:#000!important}#elefunds_bottom{height:62px;border-width:0 1px 1px;border-style:solid;border-color:#cfd0d4 #b9bec4;line-height:1.4;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.elefunds_receiver{margin:0;text-align:center;display:inline-block;border-left:1px solid #a3a6ac;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receiver_off_bg.png') repeat-x;float:left;position:relative}.elefunds_receiver>label>img{vertical-align:middle;-webkit-filter:grayscale(1) opacity(0.7);-ms-filter:"alpha(opacity=50)";filter:alpha(opacity=50)}.elefunds_receiver>input{cursor:pointer;opacity:0;font-size:100%;margin:0;vertical-align:baseline;width:22px;position:absolute;top:25px;left:13px}.elefunds_receiver>input+label{height:42px;width:165px;margin:0;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/checkbox_off.png') 10px 24px no-repeat;display:inline-block;border-left:1px solid #f6f6f6;border-left:1px solid rgba(255,255,255,0.6)}.elefunds_receiver>input:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/checkbox_on.png') 10px 24px no-repeat}#elefunds_bottom>input:first-child+div{border-left:0!important}.elefunds_receiver_selected{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receiver_on_bg.png') repeat-x}.elefunds_receiver_selected>label>img{filter:none;-webkit-filter:none;-ms-filter:none}#elefunds_below_container{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:16px;margin:0;padding:15px 0 10px;text-align:right}#elefunds_below_container label{font-weight:normal}#elefunds_round_sum_container{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/elefunds_highlight.png') right top no-repeat}#elefunds_round_sum_container strong{font-weight:bold;line-height:1.5em}#elefunds_round_sum_container strong:last-child{margin-right:8px}#elefunds_round_sum{display:inline-block;width:65px;color:#222}#elefunds_receipt{position:relative;float:left;font-size:12px;color:#333;margin:5px 0 0 15px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#elefunds_receipt_checkbox{position:absolute;top:1px;cursor:pointer;opacity:0;font-size:100%;margin:0;vertical-align:baseline;width:16px}#elefunds_receipt_checkbox+label{margin:0;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receipt_off.png') no-repeat;display:inline-block;padding-left:20px}#elefunds_receipt>input:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receipt_on.png') no-repeat}.elefunds_hidden{visibility:hidden}#elefunds_share{width:450px;padding:20px 20px 10px;background:#f4f4f4;border:4px solid #ccc;border-radius:8px;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;text-align:center}#elefunds_share>a{text-decoration:none}#elefunds_share h3{font-weight:bold;color:#222;margin:0}#elefunds_share p{font-size:14px;color:#666;margin:20px 0 10px;padding:10px 10px 20px}#elefunds_share span{font-style:normal;font-size:11px;line-height:21px;margin-top:6px;vertical-align:top;display:block}#tiptip_content{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;background:#222;background:rgba(0,0,0,0.7);padding:3px;overflow:hidden;width:260px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0,0,0,0.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,0.3);box-shadow:0 3px 7px rgba(0,0,0,0.3)}#tiptip_title{background-color:#f5f5f5;padding:10px 15px 8px;color:#222;font-size:18px;line-height:1;text-align:center;font-weight:bold;-webkit-border-top-left-radius:3px;-webkit-border-top-right-radius:3px;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-moz-border-radius-topleft:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:0;border-bottom-left-radius:0;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box;border-bottom:1px solid #eee;margin:0}#tiptip_inner{font-size:12px;color:#222;background-color:#fff;padding:14px;-webkit-border-top-left-radius:0;-webkit-border-top-right-radius:0;-webkit-border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;-moz-border-radius-topleft:0;-moz-border-radius-topright:0;-moz-border-radius-bottomright:3px;-moz-border-radius-bottomleft:3px;border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px;-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box}#tiptip_holder{display:none;position:absolute;top:0;left:0;z-index:99999}#tiptip_holder.tip_top{margin-bottom:5px}#tiptip_holder.tip_left{margin-right:5px}#tiptip_holder.tip_right{margin-left:5px}#tiptip_holder.tip_bottom{margin-top:5px}#tiptip_arrow,#tiptip_arrow_inner{position:absolute;border-color:transparent;border-style:solid;border-width:6px;height:0;width:0}#tiptip_holder.tip_top #tiptip_arrow_inner{margin-top:-7px;margin-left:-6px;border-top-color:#191919;border-top-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_right #tiptip_arrow_inner{margin-top:-6px;margin-left:-5px;border-right-color:#191919;border-right-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_bottom #tiptip_arrow_inner{margin-top:-5px;margin-left:-6px;border-bottom-color:#191919;border-bottom-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_left #tiptip_arrow_inner{margin-top:-6px;margin-left:-7px;border-left-color:#191919;border-left-color:rgba(25,25,25,0.92)}
 
skin/frontend/base/default/css/lfnds_donation/elefunds_light_orange.min.css DELETED
@@ -1 +0,0 @@
1
- #elefunds_top{position:relative;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/top_bar.png') repeat-x;height:49px;border-left:1px solid #8c8f91;border-right:1px solid #8c8f91;line-height:1.4;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#elefunds_top>div{float:right;margin-right:10px}#elefunds_logo{position:absolute;top:8px;left:10px}#elefunds_arrow{position:relative;display:inline-block;float:left;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/arrow_bg.png') repeat-x;height:49px;padding:0}#elefunds_checkbox{position:absolute;top:18px;left:19px;width:18px;line-height:normal;cursor:pointer;opacity:0}#elefunds_checkbox+label{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;font-weight:normal;color:#d0d9d2;padding:9px 10px 9px 60px;height:31px;margin:0;max-width:180px;float:left;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/orange/arrow_off.png') no-repeat}#elefunds_checkbox:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/orange/arrow_on.png') no-repeat}#elefunds_arrow_end{width:14px;height:49px;display:inline-block;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/arrow_end.png') no-repeat}#elefunds_plus_minus{float:left;padding:13px 10px 0 30px}#elefunds_plus_minus img{margin:0 1px}#elefunds_input_container{float:left;padding-top:11px}#elefunds_currency{display:inline-block;width:auto;height:18px;padding:4px 8px;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;font-weight:normal;line-height:18px;text-align:center;color:#2c3238;text-shadow:0 1px 0 #c6cfd8;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/currency_bg.png') repeat-x;border:1px solid #7f807f;border-radius:3px 0 0 3px;margin-right:-1px;float:left}#elefunds_input{display:inline-block;width:48px;height:18px;padding:4px 2px 4px 0;margin:0;vertical-align:middle;text-align:center;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;color:#7f807f;text-shadow:0 1px 0 #c6cfd8;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/input_bg.png') repeat-x;border:1px solid #7f807f;float:left;outline:0}.elefunds_input_active{color:#000!important}#elefunds_bottom{height:62px;border-width:0 1px 1px;border-style:solid;border-color:#cfd0d4 #b9bec4;line-height:1.4;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.elefunds_receiver{margin:0;text-align:center;display:inline-block;border-left:1px solid #a3a6ac;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receiver_off_bg.png') repeat-x;float:left;position:relative}.elefunds_receiver>label>img{vertical-align:middle;-webkit-filter:grayscale(1) opacity(0.7);-ms-filter:"alpha(opacity=50)";filter:alpha(opacity=50)}.elefunds_receiver>input{cursor:pointer;opacity:0;font-size:100%;margin:0;vertical-align:baseline;width:22px;position:absolute;top:25px;left:13px}.elefunds_receiver>input+label{height:42px;width:165px;margin:0;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/checkbox_off.png') 10px 24px no-repeat;display:inline-block;border-left:1px solid #f6f6f6;border-left:1px solid rgba(255,255,255,0.6)}.elefunds_receiver>input:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/checkbox_on.png') 10px 24px no-repeat}#elefunds_bottom>input:first-child+div{border-left:0!important}.elefunds_receiver_selected{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receiver_on_bg.png') repeat-x}.elefunds_receiver_selected>label>img{filter:none;-webkit-filter:none;-ms-filter:none}#elefunds_below_container{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:16px;margin:0;padding:15px 0 10px;text-align:right}#elefunds_below_container label{font-weight:normal}#elefunds_round_sum_container{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/elefunds_highlight.png') right top no-repeat}#elefunds_round_sum_container strong{font-weight:bold;line-height:1.5em}#elefunds_round_sum_container strong:last-child{margin-right:8px}#elefunds_round_sum{display:inline-block;width:65px;color:#222}#elefunds_receipt{position:relative;float:left;font-size:12px;color:#333;margin:5px 0 0 15px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#elefunds_receipt_checkbox{position:absolute;top:1px;cursor:pointer;opacity:0;font-size:100%;margin:0;vertical-align:baseline;width:16px}#elefunds_receipt_checkbox+label{margin:0;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receipt_off.png') no-repeat;display:inline-block;padding-left:20px}#elefunds_receipt>input:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receipt_on.png') no-repeat}.elefunds_hidden{visibility:hidden}#elefunds_share{width:450px;padding:20px 20px 10px;background:#f4f4f4;border:4px solid #ccc;border-radius:8px;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;text-align:center}#elefunds_share>a{text-decoration:none}#elefunds_share h3{font-weight:bold;color:#222;margin:0}#elefunds_share p{font-size:14px;color:#666;margin:20px 0 10px;padding:10px 10px 20px}#elefunds_share span{font-style:normal;font-size:11px;line-height:21px;margin-top:6px;vertical-align:top;display:block}#tiptip_content{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;background:#222;background:rgba(0,0,0,0.7);padding:3px;overflow:hidden;width:260px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0,0,0,0.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,0.3);box-shadow:0 3px 7px rgba(0,0,0,0.3)}#tiptip_title{background-color:#f5f5f5;padding:10px 15px 8px;color:#222;font-size:18px;line-height:1;text-align:center;font-weight:bold;-webkit-border-top-left-radius:3px;-webkit-border-top-right-radius:3px;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-moz-border-radius-topleft:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:0;border-bottom-left-radius:0;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box;border-bottom:1px solid #eee;margin:0}#tiptip_inner{font-size:12px;color:#222;background-color:#fff;padding:14px;-webkit-border-top-left-radius:0;-webkit-border-top-right-radius:0;-webkit-border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;-moz-border-radius-topleft:0;-moz-border-radius-topright:0;-moz-border-radius-bottomright:3px;-moz-border-radius-bottomleft:3px;border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px;-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box}#tiptip_holder{display:none;position:absolute;top:0;left:0;z-index:99999}#tiptip_holder.tip_top{margin-bottom:5px}#tiptip_holder.tip_left{margin-right:5px}#tiptip_holder.tip_right{margin-left:5px}#tiptip_holder.tip_bottom{margin-top:5px}#tiptip_arrow,#tiptip_arrow_inner{position:absolute;border-color:transparent;border-style:solid;border-width:6px;height:0;width:0}#tiptip_holder.tip_top #tiptip_arrow_inner{margin-top:-7px;margin-left:-6px;border-top-color:#191919;border-top-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_right #tiptip_arrow_inner{margin-top:-6px;margin-left:-5px;border-right-color:#191919;border-right-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_bottom #tiptip_arrow_inner{margin-top:-5px;margin-left:-6px;border-bottom-color:#191919;border-bottom-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_left #tiptip_arrow_inner{margin-top:-6px;margin-left:-7px;border-left-color:#191919;border-left-color:rgba(25,25,25,0.92)}
 
skin/frontend/base/default/css/lfnds_donation/elefunds_light_purple.min.css DELETED
@@ -1 +0,0 @@
1
- #elefunds_top{position:relative;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/top_bar.png') repeat-x;height:49px;border-left:1px solid #8c8f91;border-right:1px solid #8c8f91;line-height:1.4;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#elefunds_top>div{float:right;margin-right:10px}#elefunds_logo{position:absolute;top:8px;left:10px}#elefunds_arrow{position:relative;display:inline-block;float:left;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/arrow_bg.png') repeat-x;height:49px;padding:0}#elefunds_checkbox{position:absolute;top:18px;left:19px;width:18px;line-height:normal;cursor:pointer;opacity:0}#elefunds_checkbox+label{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;font-weight:normal;color:#d0d9d2;padding:9px 10px 9px 60px;height:31px;margin:0;max-width:180px;float:left;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/purple/arrow_off.png') no-repeat}#elefunds_checkbox:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/purple/arrow_on.png') no-repeat}#elefunds_arrow_end{width:14px;height:49px;display:inline-block;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/arrow_end.png') no-repeat}#elefunds_plus_minus{float:left;padding:13px 10px 0 30px}#elefunds_plus_minus img{margin:0 1px}#elefunds_input_container{float:left;padding-top:11px}#elefunds_currency{display:inline-block;width:auto;height:18px;padding:4px 8px;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;font-weight:normal;line-height:18px;text-align:center;color:#2c3238;text-shadow:0 1px 0 #c6cfd8;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/currency_bg.png') repeat-x;border:1px solid #7f807f;border-radius:3px 0 0 3px;margin-right:-1px;float:left}#elefunds_input{display:inline-block;width:48px;height:18px;padding:4px 2px 4px 0;margin:0;vertical-align:middle;text-align:center;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:12px;color:#7f807f;text-shadow:0 1px 0 #c6cfd8;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/light/input_bg.png') repeat-x;border:1px solid #7f807f;float:left;outline:0}.elefunds_input_active{color:#000!important}#elefunds_bottom{height:62px;border-width:0 1px 1px;border-style:solid;border-color:#cfd0d4 #b9bec4;line-height:1.4;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.elefunds_receiver{margin:0;text-align:center;display:inline-block;border-left:1px solid #a3a6ac;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receiver_off_bg.png') repeat-x;float:left;position:relative}.elefunds_receiver>label>img{vertical-align:middle;-webkit-filter:grayscale(1) opacity(0.7);-ms-filter:"alpha(opacity=50)";filter:alpha(opacity=50)}.elefunds_receiver>input{cursor:pointer;opacity:0;font-size:100%;margin:0;vertical-align:baseline;width:22px;position:absolute;top:25px;left:13px}.elefunds_receiver>input+label{height:42px;width:165px;margin:0;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/checkbox_off.png') 10px 24px no-repeat;display:inline-block;border-left:1px solid #f6f6f6;border-left:1px solid rgba(255,255,255,0.6)}.elefunds_receiver>input:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/checkbox_on.png') 10px 24px no-repeat}#elefunds_bottom>input:first-child+div{border-left:0!important}.elefunds_receiver_selected{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receiver_on_bg.png') repeat-x}.elefunds_receiver_selected>label>img{filter:none;-webkit-filter:none;-ms-filter:none}#elefunds_below_container{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:16px;margin:0;padding:15px 0 10px;text-align:right}#elefunds_below_container label{font-weight:normal}#elefunds_round_sum_container{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/elefunds_highlight.png') right top no-repeat}#elefunds_round_sum_container strong{font-weight:bold;line-height:1.5em}#elefunds_round_sum_container strong:last-child{margin-right:8px}#elefunds_round_sum{display:inline-block;width:65px;color:#222}#elefunds_receipt{position:relative;float:left;font-size:12px;color:#333;margin:5px 0 0 15px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#elefunds_receipt_checkbox{position:absolute;top:1px;cursor:pointer;opacity:0;font-size:100%;margin:0;vertical-align:baseline;width:16px}#elefunds_receipt_checkbox+label{margin:0;cursor:pointer;background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receipt_off.png') no-repeat;display:inline-block;padding-left:20px}#elefunds_receipt>input:checked+label{background:url('https://0ce8ff584bf613ee6639-c1fc539e0df6af03ccc14b5020ab4161.ssl.cf1.rackcdn.com/receipt_on.png') no-repeat}.elefunds_hidden{visibility:hidden}#elefunds_share{width:450px;padding:20px 20px 10px;background:#f4f4f4;border:4px solid #ccc;border-radius:8px;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;text-align:center}#elefunds_share>a{text-decoration:none}#elefunds_share h3{font-weight:bold;color:#222;margin:0}#elefunds_share p{font-size:14px;color:#666;margin:20px 0 10px;padding:10px 10px 20px}#elefunds_share span{font-style:normal;font-size:11px;line-height:21px;margin-top:6px;vertical-align:top;display:block}#tiptip_content{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;background:#222;background:rgba(0,0,0,0.7);padding:3px;overflow:hidden;width:260px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0,0,0,0.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,0.3);box-shadow:0 3px 7px rgba(0,0,0,0.3)}#tiptip_title{background-color:#f5f5f5;padding:10px 15px 8px;color:#222;font-size:18px;line-height:1;text-align:center;font-weight:bold;-webkit-border-top-left-radius:3px;-webkit-border-top-right-radius:3px;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-moz-border-radius-topleft:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:0;border-bottom-left-radius:0;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box;border-bottom:1px solid #eee;margin:0}#tiptip_inner{font-size:12px;color:#222;background-color:#fff;padding:14px;-webkit-border-top-left-radius:0;-webkit-border-top-right-radius:0;-webkit-border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;-moz-border-radius-topleft:0;-moz-border-radius-topright:0;-moz-border-radius-bottomright:3px;-moz-border-radius-bottomleft:3px;border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px;-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box}#tiptip_holder{display:none;position:absolute;top:0;left:0;z-index:99999}#tiptip_holder.tip_top{margin-bottom:5px}#tiptip_holder.tip_left{margin-right:5px}#tiptip_holder.tip_right{margin-left:5px}#tiptip_holder.tip_bottom{margin-top:5px}#tiptip_arrow,#tiptip_arrow_inner{position:absolute;border-color:transparent;border-style:solid;border-width:6px;height:0;width:0}#tiptip_holder.tip_top #tiptip_arrow_inner{margin-top:-7px;margin-left:-6px;border-top-color:#191919;border-top-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_right #tiptip_arrow_inner{margin-top:-6px;margin-left:-5px;border-right-color:#191919;border-right-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_bottom #tiptip_arrow_inner{margin-top:-5px;margin-left:-6px;border-bottom-color:#191919;border-bottom-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_left #tiptip_arrow_inner{margin-top:-6px;margin-left:-7px;border-left-color:#191919;border-left-color:rgba(25,25,25,0.92)}
 
skin/frontend/base/default/js/lfnds_donation/additional/elefunds_magento_onepage_additional.js DELETED
@@ -1,147 +0,0 @@
1
- /*
2
- * When Module is placed on bottom (above Checkout-Button)
3
- */
4
- var lfndsModule = function () {
5
- // if #checkout-review-table-wrapper + #elefunds-form
6
- this.$elefunds = jQuery('#elefunds');
7
- this.$elefundsBelow = jQuery('#elefunds_below_container');
8
-
9
- this.currency = '€';
10
-
11
- this.addEvents();
12
- };
13
- lfndsModule.prototype.addEvents = function () {
14
- var me = this;
15
-
16
- jQuery(document).on('elefunds_enabled', function (event) {
17
- if (jQuery('#checkout-review-table-wrapper + #elefunds-form').length) {
18
-
19
- jQuery('#elefunds_below_container').slideDown(function () {
20
- jQuery('#elefunds_below_container').removeClass('elefunds_hidden');
21
- jQuery('#elefunds_round_sum_container').removeClass('elefunds_hidden');
22
- });
23
-
24
- }
25
- });
26
-
27
- jQuery(document).on('elefunds_disabled', function (event) {
28
- if (jQuery('#checkout-review-table-wrapper + #elefunds-form').length) {
29
-
30
- jQuery('#elefunds_below_container').slideUp(function () {
31
- jQuery('#elefunds_below_container').addClass('elefunds_hidden');
32
- jQuery('#elefunds_round_sum_container').addClass('elefunds_hidden');
33
- });
34
-
35
- }
36
- });
37
- };
38
-
39
-
40
- /*
41
- * When Module is placed on top (above article-review)
42
- */
43
- var lfndsModuleTop = function () {
44
- this.isDonationRowCreated = false;
45
- this.isOldPriceSaved = false;
46
- this.isModuleActive = false;
47
- this.currency = '€';
48
- this.addEvents();
49
- };
50
- lfndsModuleTop.prototype.addEvents = function () {
51
- var me = this;
52
-
53
- jQuery(document).on('elefunds_enabled', function (event) {
54
- if (!jQuery('#checkout-review-table-wrapper + #elefunds-form').length) {
55
-
56
- me.isModuleActive = true;
57
-
58
- if (!me.isOldPriceSaved) {
59
- me.oldPrice = jQuery('#checkout-review-table tfoot tr.last .price').html();
60
- me.isOldPriceSaved = true;
61
- }
62
-
63
- jQuery('#checkout-review-table tfoot tr.last .price').html(jQuery('#elefunds_round_sum').html() + ' ' + me.currency);
64
-
65
- jQuery('#elefunds_below_container').slideDown(function () {
66
- jQuery('#elefunds_below_container').removeClass('elefunds_hidden');
67
- });
68
-
69
- if (!jQuery('#donationRow').length) {
70
- me.createDonationRow();
71
- } else {
72
- me.showDonationRow();
73
- }
74
-
75
-
76
- /*
77
- * Events can only be registered when Module is already shown,
78
- * so register events when activating module for the first time.
79
- */
80
- jQuery('#elefunds_input').on('change', function () {
81
- if (me.isModuleActive) {
82
- jQuery('#checkout-review-table tfoot tr.last .price').html(jQuery('#elefunds_round_sum').html() + ' ' + me.currency);
83
- }
84
- me.updateDonationRow();
85
- });
86
- jQuery('#elefunds_plus_minus').on('click', function () {
87
- jQuery('#elefunds_input').trigger('change');
88
- });
89
- jQuery('#elefunds_input').on('keypress', function () {
90
- jQuery('#elefunds_input').trigger('change');
91
- });
92
-
93
- }
94
- });
95
-
96
- jQuery(document).on('elefunds_disabled', function (event) {
97
- if (!jQuery('#checkout-review-table-wrapper + #elefunds-form').length) {
98
-
99
- me.isModuleActive = false;
100
-
101
- jQuery('#elefunds_below_container').slideUp(function () {
102
- jQuery('#checkout-review-table tfoot tr.last .price').html(me.oldPrice);
103
- jQuery('#elefunds_below_container').addClass('elefunds_hidden');
104
- jQuery('#elefunds_round_sum_container').addClass('elefunds_hidden');
105
- });
106
-
107
- me.hideDonationRow();
108
- }
109
- });
110
- };
111
- lfndsModuleTop.prototype.createDonationRow = function () {
112
- var donationValue = parseFloat(jQuery('#elefunds_donation_cent').val() / 100);
113
-
114
- jQuery('' +
115
- '<tr id="donationRow">' +
116
- '<td class="a-right" colspan="3">' +
117
- 'elefunds Donation' +
118
- '</td>' +
119
- '<td class="a-right">' +
120
- '<span class="price">' +
121
- donationValue.toFixed(2) + ' ' + this.currency +
122
- '</span>' +
123
- '</td>' +
124
- '</tr>' +
125
- '').insertBefore('#checkout-review-table tfoot tr.last');
126
-
127
- this.isDonationRowCreated = true;
128
- };
129
- lfndsModuleTop.prototype.showDonationRow = function () {
130
- jQuery('#donationRow').show();
131
- };
132
- lfndsModuleTop.prototype.hideDonationRow = function () {
133
- jQuery('#donationRow').hide();
134
- };
135
- lfndsModuleTop.prototype.updateDonationRow = function () {
136
- var donationValue = parseFloat(jQuery('#elefunds_donation_cent').val() / 100);
137
-
138
- jQuery('#donationRow .price').html('' +
139
- donationValue.toFixed(2) + ' ' + this.currency +
140
- '');
141
- };
142
-
143
-
144
- jQuery(document).ready(function () {
145
- var lfnds = new lfndsModuleTop();
146
- var lfndsBottom = new lfndsModule();
147
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
skin/frontend/base/default/js/lfnds_donation/additional/elefunds_magento_onestep_additional.js DELETED
@@ -1,171 +0,0 @@
1
- var lfndsOneStep = {};
2
-
3
- /*
4
- * ++ One Step Checkout Specific JavaScript ++
5
- */
6
-
7
- var ElefundsOneStepCheckoutIntegration = function () {
8
- /*
9
- * Cache important DOM-Nodes as member-variables
10
- */
11
- this.$oneStepMiddleColumn = jQuery('.onestepcheckout-column-middle');
12
- this.$elefundsModule = jQuery('#elefunds-form');
13
-
14
- this.init();
15
- this.addEvents();
16
- };
17
- ElefundsOneStepCheckoutIntegration.prototype.init = function () {
18
- this.changePosition();
19
- };
20
- ElefundsOneStepCheckoutIntegration.prototype.addEvents = function () {
21
-
22
- };
23
- ElefundsOneStepCheckoutIntegration.prototype.changePosition = function () {
24
- this.$oneStepMiddleColumn.append('<div class="elefunds"></div>');
25
- jQuery('.elefunds').append(this.$elefundsModule);
26
- this.$elefundsModule.parent().fadeIn();
27
- };
28
-
29
-
30
- /*
31
- * ++ Change Sum in One-Step-Checkout ++
32
- */
33
- var ElefundsOneStepCheckoutIntegrationChangeSum = function () {
34
- this.$roundedSumNode = jQuery('#elefunds_round_sum');
35
- this.$currencyNode = jQuery('#elefunds_round_sum + strong');
36
-
37
- this.$totalAmountNode = jQuery('.onestepcheckout-totals .grand-total .price');
38
-
39
- this.roundedSum = this.$roundedSumNode.html();
40
-
41
- if (this.$roundedSumNode.length && this.$totalAmountNode.length) {
42
- this.oldSum = this.$totalAmountNode.html();
43
- this.isModuleEnabled = false;
44
- this.addDonationRow();
45
- this.addEvents();
46
- }
47
- };
48
-
49
- ElefundsOneStepCheckoutIntegrationChangeSum.prototype.addEvents = function () {
50
- var that = this;
51
-
52
- jQuery(document).on('elefunds_enabled', function () {
53
- that.isModuleEnabled = true;
54
- that.activateDonationRow();
55
-
56
- that.changeSumValue();
57
- });
58
- jQuery('#elefunds').on('click', function () {
59
- if (that.isModuleEnabled) {
60
- that.changeSumValue();
61
- }
62
- });
63
- jQuery('#elefunds_input').on('change', function () {
64
- if (that.isModuleEnabled) {
65
- that.changeSumValue();
66
- }
67
- });
68
- jQuery(document).on('elefunds_disabled', function () {
69
- that.deactivateDonationRow();
70
- that.isModuleEnabled = false;
71
- jQuery('.onestepcheckout-totals .grand-total .price').html(that.oldSum);
72
- });
73
- };
74
- ElefundsOneStepCheckoutIntegrationChangeSum.prototype.changeSumValue = function () {
75
- if (this.isModuleEnabled) {
76
- var oldSumReg = this.oldSum.replace(/[^0-9]/gi, '');
77
- var oldSumValue = parseFloat(oldSumReg / 100);
78
- var donationValue = parseFloat(jQuery('#elefunds_donation_cent').val() / 100);
79
- console.log(donationValue);
80
-
81
- this.roundedSum = oldSumValue + donationValue;
82
-
83
- this.$roundedSumNode.html(this.roundedSum.toFixed(2));
84
-
85
- var currency = this.$currencyNode.html();
86
- jQuery('.onestepcheckout-totals .grand-total .price').html(this.roundedSum.toFixed(2) + ' ' + currency);
87
- this.updateDonationRow();
88
- }
89
- };
90
- ElefundsOneStepCheckoutIntegrationChangeSum.prototype.updateSums = function () {
91
- this.oldSum = jQuery('.onestepcheckout-totals .grand-total .price').html();
92
-
93
- if (!jQuery('.elefunds_donation_row').length) {
94
- this.addDonationRow();
95
- }
96
- if (this.isModuleEnabled) {
97
- this.activateDonationRow();
98
- }
99
-
100
- /*
101
- * New total has to change too
102
- * As there is the curreny-symbol inside the amount-value we have to remove it
103
- * (and everything else what is not a number)
104
- */
105
- var oldSumReg = this.oldSum.replace(/[^0-9]/gi, '');
106
- var oldSumValue = parseFloat(oldSumReg / 100);
107
- var donationValue = parseFloat(jQuery('#elefunds_donation_cent').val() / 100);
108
-
109
- this.roundedSum = oldSumValue + donationValue;
110
-
111
- this.$roundedSumNode.html(this.roundedSum.toFixed(2));
112
- };
113
-
114
- /*
115
- * Adds a new row in order review to show elefunds donation
116
- * Supply methods for update, activate and remove the row
117
- */
118
- ElefundsOneStepCheckoutIntegrationChangeSum.prototype.addDonationRow = function () {
119
- jQuery('' +
120
- '<tr class="elefunds_donation_row">' +
121
- '<td class="title">elefunds Donation</td>' +
122
- '<td class="value">' +
123
- '<span class="price">' + jQuery('#elefunds_input').val() + '</span>' +
124
- '</td>' +
125
- '</tr>' +
126
- '').insertBefore('.grand-total');
127
- };
128
- ElefundsOneStepCheckoutIntegrationChangeSum.prototype.updateDonationRow = function () {
129
- var currency = this.$currencyNode.html();
130
- var donationValue = parseFloat(jQuery('#elefunds_donation_cent').val() / 100);
131
- jQuery('.elefunds_donation_row .price').html(donationValue.toFixed(2) + ' ' + currency);
132
- };
133
- ElefundsOneStepCheckoutIntegrationChangeSum.prototype.activateDonationRow = function () {
134
- jQuery('.elefunds_donation_row').addClass('active');
135
- };
136
- ElefundsOneStepCheckoutIntegrationChangeSum.prototype.deactivateDonationRow = function () {
137
- jQuery('.elefunds_donation_row').removeClass('active');
138
- };
139
-
140
-
141
- jQuery(document).ready(function () {
142
- lfndsOneStep.instance = new ElefundsOneStepCheckoutIntegration();
143
- lfndsOneStep.lfnds_changeSum = new ElefundsOneStepCheckoutIntegrationChangeSum();
144
- });
145
-
146
-
147
-
148
- /*
149
- * Patches the Ajax.Request of Prototype to change sum always after ajax-requests (in callback)
150
- */
151
-
152
- OriginalAjaxRequest = Ajax.Request;
153
- AjaxRequestProxy = Class.create(OriginalAjaxRequest, {
154
-
155
- initialize: function($super, url, options) {
156
- originalCallback = options['onSuccess'];
157
-
158
- callbackProxy = function(transport) {
159
- originalCallback(transport);
160
- lfndsOneStep.lfnds_changeSum.updateSums();
161
- lfndsOneStep.lfnds_changeSum.changeSumValue();
162
- };
163
-
164
- options['onSuccess'] = callbackProxy;
165
-
166
- $super(url, options);
167
-
168
- }
169
- });
170
- AjaxRequestProxy.Events = Ajax.Request.Events;
171
- Ajax.Request = AjaxRequestProxy;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
skin/frontend/base/default/js/lfnds_donation/elefunds.jquery.js DELETED
@@ -1,227 +0,0 @@
1
- var elefunds = (function(parent, $) {
2
-
3
- var roundSumContainer, roundSum, currency, decimal, decimalAlt, total, toolTipPosition;
4
- var enabled = false;
5
-
6
- function init(options) {
7
- roundSumContainer = options.roundSumContainer;
8
- roundSum = options.roundSum;
9
- currency = options.currency;
10
- decimal = options.decimal;
11
- decimalAlt = options.deciamlAlt;
12
- total = options.total;
13
- toolTipPosition = options.toolTipPosition;
14
-
15
- $('#elefunds').data('elefunds-roundSum', convertToFloat(total + parseInt($('#elefunds_donation_cent').val(), 10)));
16
- $('#elefunds').data('elefunds-donation', {donationCent: parseInt($('#elefunds_donation_cent').val(), 10), donationFloat: convertToFloat(parseInt($('#elefunds_donation_cent').val(), 10))});
17
-
18
- function enable() {
19
- $('#elefunds_checkbox').prop('checked', true);
20
- $("#elefunds_input").addClass('elefunds_input_active');
21
- roundSumContainer.slideDown();
22
-
23
- $('#elefunds').trigger('elefunds_enabled');
24
- enabled = true;
25
- }
26
-
27
- function disable() {
28
- $('#elefunds_checkbox').prop('checked', false);
29
- $('#elefunds_input').removeClass('elefunds_input_active');
30
- roundSumContainer.slideUp();
31
-
32
- $('#elefunds').trigger('elefunds_disabled');
33
- enabled = false;
34
- }
35
-
36
- // Change button backgrounds when (un)selected
37
- $('.elefunds_receiver > input').on('change', function() {
38
- //If all are unchecked
39
- if($('#elefunds_bottom').find('input[type="checkbox"]:checked').length == 0) {
40
- disable();
41
- } else if(!enabled) {
42
- enable();
43
- }
44
-
45
- $(this).parent().toggleClass('elefunds_receiver_selected');
46
- });
47
-
48
- // When the plugin is (de)activated
49
- $('#elefunds_checkbox').on('change', function() {
50
- if($('#elefunds_checkbox').prop('checked') && $('#elefunds_bottom').find('input[type="checkbox"]:checked').length == 0) {
51
- $('#elefunds_bottom').find('input[type="checkbox"]').prop('checked', true);
52
- $('#elefunds_bottom').find('input[type="checkbox"]').parent().toggleClass('elefunds_receiver_selected');
53
- }
54
-
55
- if(!$('#elefunds_checkbox:checked').length) {
56
- roundSumContainer.slideUp();
57
- $('#elefunds').trigger('elefunds_disabled');
58
- enabled = false;
59
-
60
- } else {
61
- if ($('#elefunds_checkbox:checked').length) {
62
- roundSumContainer.slideDown();
63
-
64
- //Store data
65
- var centValue = parseInt($('#elefunds_donation_cent').val(), 10);
66
- $('#elefunds').data('elefunds-donation', {donationCent: centValue, donationFloat: convertToFloat(centValue)});
67
-
68
- $('#elefunds').trigger('elefunds_enabled');
69
- enabled = true;
70
- }
71
- }
72
-
73
- $('#elefunds_input').toggleClass('elefunds_input_active');
74
- });
75
-
76
- $('#elefunds_input').keyup(function(e){
77
- if(e.which == 13) e.preventDefault();
78
- });
79
-
80
- // Enable tooltips
81
- $('.tiptip').tipTip({
82
- defaultPosition: toolTipPosition || 'top',
83
- edgeOffset: -12,
84
- delay: 200
85
- });
86
- } //END INIT
87
-
88
- //Check if elefunds has already been created in the view
89
- (function() {
90
- if(parent.hasOwnProperty('options')) {
91
- init(parent.options);
92
- }
93
- })();
94
-
95
- function convertToCent(floatValue) {
96
- var centValue;
97
- var centArray;
98
-
99
- if(floatValue.indexOf(decimal) !== -1) {
100
- centArray = floatValue.split(decimal,2);
101
- } else if(floatValue.indexOf(decimalAlt) !== -1) {
102
- centArray = floatValue.split(decimalAlt,2);
103
- } else {
104
- centArray = [floatValue, 0];
105
- }
106
-
107
- if(centArray[1].length > 2) {
108
- centArray[1] = centArray[1].substr(0,2);
109
- }
110
-
111
- while(centArray[1].length < 2) {
112
- centArray[1] += '0';
113
- }
114
-
115
- if(centArray[0].length < 1) {
116
- centArray[0] = 0;
117
- }
118
-
119
- centValue = parseInt(centArray[0], 10)*100 + parseInt(centArray[1], 10);
120
-
121
- // Check for valid value
122
- if(isNaN(centValue) || centValue < 0) {
123
- centValue = 0;
124
- }
125
-
126
- return centValue;
127
- }
128
-
129
- // Convert cent value to float currency equivalent
130
- function convertToFloat(centValue) {
131
- var floatValue;
132
-
133
- if(centValue < 10) {
134
- floatValue = '0' + decimal + '0' + centValue;
135
- } else if(centValue < 100) {
136
- floatValue = '0' + decimal + centValue;
137
- } else {
138
- centValue = centValue.toString();
139
- floatValue = centValue.slice(0, -2) + decimal + centValue.slice(-2);
140
- }
141
-
142
- return floatValue;
143
- }
144
-
145
- // Update the donation input field
146
- function updateDonation(centValue) {
147
- var floatValue = convertToFloat(centValue);
148
- $('#elefunds_input').val(floatValue);
149
-
150
- render(centValue);
151
-
152
- if(enabled) {
153
- $('#elefunds').trigger('elefunds_donationChange');
154
- }
155
- }
156
-
157
- function render(centValue) {
158
- // Update the hidden donation input field
159
- // containing the value of the donation in cents
160
- $('#elefunds_donation_cent').val(centValue);
161
-
162
- // Store data
163
- $('#elefunds').data('elefunds-roundSum', convertToFloat(total + centValue));
164
- $('#elefunds').data('elefunds-donation', {donationCent: centValue, donationFloat: convertToFloat(centValue)});
165
-
166
- //Update round sum
167
- if(roundSum) {
168
- roundSum.html(convertToFloat(total + centValue));
169
- }
170
- }
171
-
172
- return {
173
-
174
- init: function(options) {
175
- init(options);
176
- },
177
-
178
- // Decrease the donation sum by 1.00
179
- decreaseDonation: function() {
180
- var centValue = parseInt($('#elefunds_donation_cent').val(), 10);
181
-
182
- if(centValue > 100) {
183
- centValue = centValue - 100;
184
- updateDonation(centValue);
185
- }
186
-
187
- return centValue;
188
- },
189
-
190
- // Increase the donation sum by 1.00
191
- increaseDonation: function() {
192
- var centValue = parseInt($('#elefunds_donation_cent').val(), 10);
193
-
194
- centValue = parseInt(centValue, 10) + 100;
195
-
196
- updateDonation(centValue);
197
- return centValue;
198
- },
199
-
200
- // Update the hidden field with the current donation value
201
- donationChange: function(floatValue) {
202
- var centValue = convertToCent(floatValue);
203
- render(centValue);
204
-
205
- var timeHandler = $('#elefunds').data('elefunds-timer');
206
- var now = (new Date()).getTime();
207
- var delay = 800;
208
-
209
- if (typeof(timeHandler) !== 'undefined' && timeHandler !== null) {
210
- if(now - timeHandler.time < delay) {
211
- clearTimeout(timeHandler.timer);
212
- }
213
- }
214
-
215
- if(enabled) {
216
- var timer = setTimeout(function() {
217
- $('#elefunds').trigger('elefunds_donationChange');
218
- }, delay);
219
-
220
- $('#elefunds').data('elefunds-timer', {timer: timer, time: (new Date()).getTime()});
221
- }
222
-
223
- return centValue;
224
- }
225
-
226
- };
227
- }(elefunds || {}, jQuery));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
skin/frontend/base/default/js/lfnds_donation/elefunds.jquery.min.js DELETED
@@ -1 +0,0 @@
1
- (function(e){e.fn.tipTip=function(t){var n={activation:"hover",keepAlive:!1,maxWidth:"auto",edgeOffset:2,defaultPosition:"top",delay:50,fadeIn:50,fadeOut:100,attribute:"title",attribute2:"desc",content:"",enter:function(){},exit:function(){}},r=e.extend(n,t),i,s,o,u;if(e("#tiptip_holder").length<=0){i=e('<div id="tiptip_holder" style="max-width:'+r.maxWidth+';"></div>');s=e('<div id="tiptip_content"></div>');o=e('<div id="tiptip_inner"></div>');u=e('<div id="tiptip_arrow"></div>');e("body").append(i.html(s).prepend(u.html('<div id="tiptip_arrow_inner"></div>')))}else{i=e("#tiptip_holder");s=e("#tiptip_content");o=e("#tiptip_inner");u=e("#tiptip_arrow")}return this.each(function(){var t=e(this),n,a,f;if(t.attr(r.attribute)){n=t.attr(r.attribute);a=t.attr(r.attribute2)}else{n=r.title;a=r.content}if(n!==""){if(!r.content){t.removeAttr(r.attribute);t.removeAttr(r.attribute2)}f=!1;if(r.activation==="hover"){t.hover(function(){l()},function(){r.keepAlive||c()});r.keepAlive&&i.hover(function(){},function(){c()})}else if(r.activation==="focus")t.focus(function(){l()}).blur(function(){c()});else if(r.activation==="click"){t.click(function(){l();return!1}).hover(function(){},function(){r.keepAlive||c()});r.keepAlive&&i.hover(function(){},function(){c()})}function l(){r.enter.call(this);s.html('<h3 id="tiptip_title">'+n+"</h3>");o.html(a);s.append(o);i.hide().removeAttr("class").css("margin","0");u.removeAttr("style");var l=parseInt(t.offset().top);t.attr("id")==="elefunds_logo"&&(l-=8);var c=parseInt(t.offset().left),h=parseInt(t.width()),p=parseInt(t.height()),d=i.width(),v=i.height(),m=Math.round((h-d)/2),g=Math.round((p-v)/2),y=Math.round(c+m),b=Math.round(l+p+r.edgeOffset),w="",E="",S=Math.round(d-12)/2;r.defaultPosition==="bottom"?w="_bottom":r.defaultPosition==="top"?w="_top":r.defaultPosition==="left"?w="_left":r.defaultPosition==="right"&&(w="_right");var x=m+c<parseInt(e(window).scrollLeft()),T=d+c>parseInt(e(window).width());if(x&&m<0||w=="_right"&&!T||w=="_left"&&c<d+r.edgeOffset+5){w="_right";E=Math.round(v-13)/2;S=-12;y=Math.round(c+h+r.edgeOffset);b=Math.round(l+g)}else if(T&&m<0||w=="_left"&&!x){w="_left";E=Math.round(v-13)/2;S=Math.round(d);y=Math.round(c-(d+r.edgeOffset+5));b=Math.round(l+g)}var N=l+p+r.edgeOffset+v+8>parseInt(e(window).height()+e(window).scrollTop()),C=l+p-(r.edgeOffset+v+8)<0;if(N||w=="_bottom"&&N||w=="_top"&&!C){w=="_top"||w=="_bottom"?w="_top":w+="_top";E=v;b=Math.round(l-(v+5+r.edgeOffset))}else if(C|(w=="_top"&&C)||w=="_bottom"&&!N){w=="_top"||w=="_bottom"?w="_bottom":w+="_bottom";E=-12;b=Math.round(l+p+r.edgeOffset)}u.css({"margin-left":S+"px","margin-top":E+"px"});i.css({"margin-left":y+"px","margin-top":b+"px"}).attr("class","tip"+w);f&&clearTimeout(f);f=setTimeout(function(){i.stop(!0,!0).fadeIn(r.fadeIn)},r.delay)}function c(){r.exit.call(this);f&&clearTimeout(f);i.fadeOut(r.fadeOut)}}})}})(window.jQuery);var elefunds=function(e,t){function l(e){function l(){t("#elefunds_checkbox").prop("checked",!0);t("#elefunds_input").addClass("elefunds_input_active");n.slideDown();t("#elefunds").trigger("elefunds_enabled");f=!0}function c(){t("#elefunds_checkbox").prop("checked",!1);t("#elefunds_input").removeClass("elefunds_input_active");n.slideUp();t("#elefunds").trigger("elefunds_disabled");f=!1}n=e.roundSumContainer;r=e.roundSum;i=e.currency;s=e.decimal;o=e.deciamlAlt;u=e.total;a=e.toolTipPosition;t("#elefunds").data("elefunds-roundSum",h(u+parseInt(t("#elefunds_donation_cent").val(),10)));t("#elefunds").data("elefunds-donation",{donationCent:parseInt(t("#elefunds_donation_cent").val(),10),donationFloat:h(parseInt(t("#elefunds_donation_cent").val(),10))});t(".elefunds_receiver > input").on("change",function(){t("#elefunds_bottom").find('input[type="checkbox"]:checked').length==0?c():f||l();t(this).parent().toggleClass("elefunds_receiver_selected")});t("#elefunds_checkbox").on("change",function(){if(t("#elefunds_checkbox").prop("checked")&&t("#elefunds_bottom").find('input[type="checkbox"]:checked').length==0){t("#elefunds_bottom").find('input[type="checkbox"]').prop("checked",!0);t("#elefunds_bottom").find('input[type="checkbox"]').parent().toggleClass("elefunds_receiver_selected")}if(!t("#elefunds_checkbox:checked").length){n.slideUp();t("#elefunds").trigger("elefunds_disabled");f=!1}else if(t("#elefunds_checkbox:checked").length){n.slideDown();var e=parseInt(t("#elefunds_donation_cent").val(),10);t("#elefunds").data("elefunds-donation",{donationCent:e,donationFloat:h(e)});t("#elefunds").trigger("elefunds_enabled");f=!0}t("#elefunds_input").toggleClass("elefunds_input_active")});t("#elefunds_input").keyup(function(e){e.which==13&&e.preventDefault()});t(".tiptip").tipTip({defaultPosition:a||"top",edgeOffset:-12,delay:200})}function c(e){var t,n;e.indexOf(s)!==-1?n=e.split(s,2):e.indexOf(o)!==-1?n=e.split(o,2):n=[e,0];n[1].length>2&&(n[1]=n[1].substr(0,2));while(n[1].length<2)n[1]+="0";n[0].length<1&&(n[0]=0);t=parseInt(n[0],10)*100+parseInt(n[1],10);if(isNaN(t)||t<0)t=0;return t}function h(e){var t;if(e<10)t="0"+s+"0"+e;else if(e<100)t="0"+s+e;else{e=e.toString();t=e.slice(0,-2)+s+e.slice(-2)}return t}function p(e){var n=h(e);t("#elefunds_input").val(n);d(e);f&&t("#elefunds").trigger("elefunds_donationChange")}function d(e){t("#elefunds_donation_cent").val(e);t("#elefunds").data("elefunds-roundSum",h(u+e));t("#elefunds").data("elefunds-donation",{donationCent:e,donationFloat:h(e)});r&&r.html(h(u+e))}var n,r,i,s,o,u,a,f=!1;(function(){e.hasOwnProperty("options")&&l(e.options)})();return{init:function(e){l(e)},decreaseDonation:function(){var e=parseInt(t("#elefunds_donation_cent").val(),10);if(e>100){e-=100;p(e)}return e},increaseDonation:function(){var e=parseInt(t("#elefunds_donation_cent").val(),10);e=parseInt(e,10)+100;p(e);return e},donationChange:function(e){var n=c(e);d(n);var r=t("#elefunds").data("elefunds-timer"),i=(new Date).getTime(),s=800;typeof r!="undefined"&&r!==null&&i-r.time<s&&clearTimeout(r.timer);if(f){var o=setTimeout(function(){t("#elefunds").trigger("elefunds_donationChange")},s);t("#elefunds").data("elefunds-timer",{timer:o,time:(new Date).getTime()})}return n}}}(elefunds||{},jQuery);
 
skin/frontend/base/default/js/lfnds_donation/elefundsTT.jquery.js DELETED
@@ -1,211 +0,0 @@
1
- /*
2
- * TipTip
3
- * Copyright 2010 Drew Wilson
4
- * www.drewwilson.com
5
- * code.drewwilson.com/entry/tiptip-jquery-plugin
6
- *
7
- * Version 1.3 - Updated: Mar. 23, 2010
8
- *
9
- * This Plug-In will create a custom tooltip to replace the default
10
- * browser tooltip. It is extremely lightweight and very smart in
11
- * that it detects the edges of the browser window and will make sure
12
- * the tooltip stays within the current window size. As a result the
13
- * tooltip will adjust itself to be displayed above, below, to the left
14
- * or to the right depending on what is necessary to stay within the
15
- * browser window. It is completely customizable as well via CSS.
16
- *
17
- * This TipTip jQuery plug-in is dual licensed under the MIT and GPL licenses:
18
- * http://www.opensource.org/licenses/mit-license.php
19
- * http://www.gnu.org/licenses/gpl.html
20
- */
21
-
22
- (function ($) {
23
- $.fn.tipTip = function (options) {
24
- var defaults = {
25
- activation: "hover",
26
- keepAlive: false,
27
- maxWidth: "auto",
28
- edgeOffset: 2,
29
- defaultPosition: "top",
30
- delay: 50,
31
- fadeIn: 50,
32
- fadeOut: 100,
33
- attribute: "title",
34
- attribute2: "desc",
35
- content: '',
36
- enter: function () {},
37
- exit: function () {}
38
- },
39
- opts = $.extend(defaults, options),
40
- tiptip_holder,
41
- tiptip_content,
42
- tiptip_inner,
43
- tiptip_arrow;
44
-
45
- // Setup tip tip elements and render them to the DOM
46
- if ($("#tiptip_holder").length <= 0) {
47
- tiptip_holder = $('<div id="tiptip_holder" style="max-width:' + opts.maxWidth + ';"></div>');
48
- tiptip_content = $('<div id="tiptip_content"></div>');
49
- tiptip_inner = $('<div id="tiptip_inner"></div>');
50
- tiptip_arrow = $('<div id="tiptip_arrow"></div>');
51
- $("body").append(tiptip_holder.html(tiptip_content).prepend(tiptip_arrow.html('<div id="tiptip_arrow_inner"></div>')));
52
- } else {
53
- tiptip_holder = $('#tiptip_holder');
54
- tiptip_content = $('#tiptip_content');
55
- tiptip_inner = $('#tiptip_inner');
56
- tiptip_arrow = $("#tiptip_arrow");
57
- }
58
-
59
- return this.each(function () {
60
- var org_elem = $(this),
61
- org_title,
62
- org_desc,
63
- timeout;
64
-
65
- if (org_elem.attr(opts.attribute)) {
66
- org_title = org_elem.attr(opts.attribute);
67
- org_desc = org_elem.attr(opts.attribute2);
68
- } else {
69
- org_title = opts.title;
70
- org_desc = opts.content;
71
- }
72
-
73
- if (org_title !== "") {
74
- if (!opts.content) {
75
- org_elem.removeAttr(opts.attribute);
76
- org_elem.removeAttr(opts.attribute2);
77
- }
78
- timeout = false;
79
-
80
- if (opts.activation === "hover") {
81
- org_elem.hover(function () {
82
- active_tiptip();
83
- }, function () {
84
- if (!opts.keepAlive) {
85
- deactive_tiptip();
86
- }
87
- });
88
- if (opts.keepAlive) {
89
- tiptip_holder.hover(function () {}, function () {
90
- deactive_tiptip();
91
- });
92
- }
93
- } else if (opts.activation === "focus") {
94
- org_elem.focus(function () {
95
- active_tiptip();
96
- }).blur(function () {
97
- deactive_tiptip();
98
- });
99
- } else if (opts.activation === "click") {
100
- org_elem.click(function () {
101
- active_tiptip();
102
- return false;
103
- }).hover(function () {}, function () {
104
- if (!opts.keepAlive) {
105
- deactive_tiptip();
106
- }
107
- });
108
- if (opts.keepAlive) {
109
- tiptip_holder.hover(function () {}, function () {
110
- deactive_tiptip();
111
- });
112
- }
113
- }
114
-
115
- function active_tiptip() {
116
- opts.enter.call(this);
117
-
118
- tiptip_content.html('<h3 id="tiptip_title">' + org_title + '</h3>');
119
- tiptip_inner.html(org_desc);
120
- tiptip_content.append(tiptip_inner);
121
- tiptip_holder.hide().removeAttr("class").css("margin", "0");
122
- tiptip_arrow.removeAttr("style");
123
-
124
- var top = parseInt(org_elem.offset().top);
125
- if (org_elem.attr('id') === 'elefunds_logo') {
126
- top -= 8;
127
- }
128
-
129
- var left = parseInt(org_elem.offset().left),
130
- org_width = parseInt(org_elem.width()),
131
- org_height = parseInt(org_elem.height()),
132
- tip_w = tiptip_holder.width(),
133
- tip_h = tiptip_holder.height(),
134
- w_compare = Math.round((org_width - tip_w) / 2),
135
- h_compare = Math.round((org_height - tip_h) / 2),
136
- marg_left = Math.round(left + w_compare),
137
- marg_top = Math.round(top + org_height + opts.edgeOffset),
138
- t_class = "",
139
- arrow_top = "",
140
- arrow_left = Math.round(tip_w - 12) / 2;
141
-
142
- if (opts.defaultPosition === "bottom") {
143
- t_class = "_bottom";
144
- } else if (opts.defaultPosition === "top") {
145
- t_class = "_top";
146
- } else if (opts.defaultPosition === "left") {
147
- t_class = "_left";
148
- } else if (opts.defaultPosition === "right") {
149
- t_class = "_right";
150
- }
151
-
152
- var right_compare = (w_compare + left) < parseInt($(window).scrollLeft());
153
- var left_compare = (tip_w + left) > parseInt($(window).width());
154
-
155
- if((right_compare && w_compare < 0) || (t_class == "_right" && !left_compare) || (t_class == "_left" && left < (tip_w + opts.edgeOffset + 5))){
156
- t_class = "_right";
157
- arrow_top = Math.round(tip_h - 13) / 2;
158
- arrow_left = -12;
159
- marg_left = Math.round(left + org_width + opts.edgeOffset);
160
- marg_top = Math.round(top + h_compare);
161
- } else if((left_compare && w_compare < 0) || (t_class == "_left" && !right_compare)){
162
- t_class = "_left";
163
- arrow_top = Math.round(tip_h - 13) / 2;
164
- arrow_left = Math.round(tip_w);
165
- marg_left = Math.round(left - (tip_w + opts.edgeOffset + 5));
166
- marg_top = Math.round(top + h_compare);
167
- }
168
-
169
- var top_compare = (top + org_height + opts.edgeOffset + tip_h + 8) > parseInt($(window).height() + $(window).scrollTop()),
170
- bottom_compare = ((top + org_height) - (opts.edgeOffset + tip_h + 8)) < 0;
171
-
172
- if(top_compare || (t_class == "_bottom" && top_compare) || (t_class == "_top" && !bottom_compare)){
173
- if(t_class == "_top" || t_class == "_bottom"){
174
- t_class = "_top";
175
- } else {
176
- t_class = t_class+"_top";
177
- }
178
- arrow_top = tip_h;
179
- marg_top = Math.round(top - (tip_h + 5 + opts.edgeOffset));
180
- } else if(bottom_compare | (t_class == "_top" && bottom_compare) || (t_class == "_bottom" && !top_compare)){
181
- if(t_class == "_top" || t_class == "_bottom"){
182
- t_class = "_bottom";
183
- } else {
184
- t_class = t_class+"_bottom";
185
- }
186
- arrow_top = -12;
187
- marg_top = Math.round(top + org_height + opts.edgeOffset);
188
- }
189
-
190
- tiptip_arrow.css({"margin-left": arrow_left + "px", "margin-top": arrow_top + "px"});
191
- tiptip_holder.css({"margin-left": marg_left + "px", "margin-top": marg_top + "px"}).attr("class", "tip" + t_class);
192
-
193
- if (timeout) {
194
- clearTimeout(timeout);
195
- }
196
- timeout = setTimeout(function () {
197
- tiptip_holder.stop(true, true).fadeIn(opts.fadeIn);
198
- }, opts.delay);
199
- }
200
-
201
- function deactive_tiptip() {
202
- opts.exit.call(this);
203
- if (timeout) {
204
- clearTimeout(timeout);
205
- }
206
- tiptip_holder.fadeOut(opts.fadeOut);
207
- }
208
- }
209
- });
210
- };
211
- })(window.jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
skin/frontend/base/default/js/lfnds_donation/jQueryNoConflict.js DELETED
@@ -1 +0,0 @@
1
- jQuery.noConflict();
 
skin/frontend/base/default/js/lfnds_donation/jquery-1.9.1.min.js DELETED
@@ -1,5 +0,0 @@
1
- /*! jQuery v1.9.1 | (c) 2005, 2012 jQuery Foundation, Inc. | jquery.org/license
2
- //@ sourceMappingURL=jquery.min.map
3
- */(function(e,t){var n,r,i=typeof t,o=e.document,a=e.location,s=e.jQuery,u=e.$,l={},c=[],p="1.9.1",f=c.concat,d=c.push,h=c.slice,g=c.indexOf,m=l.toString,y=l.hasOwnProperty,v=p.trim,b=function(e,t){return new b.fn.init(e,t,r)},x=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,w=/\S+/g,T=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,k=/^[\],:{}\s]*$/,E=/(?:^|:|,)(?:\s*\[)+/g,S=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,A=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,j=/^-ms-/,D=/-([\da-z])/gi,L=function(e,t){return t.toUpperCase()},H=function(e){(o.addEventListener||"load"===e.type||"complete"===o.readyState)&&(q(),b.ready())},q=function(){o.addEventListener?(o.removeEventListener("DOMContentLoaded",H,!1),e.removeEventListener("load",H,!1)):(o.detachEvent("onreadystatechange",H),e.detachEvent("onload",H))};b.fn=b.prototype={jquery:p,constructor:b,init:function(e,n,r){var i,a;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof b?n[0]:n,b.merge(this,b.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:o,!0)),C.test(i[1])&&b.isPlainObject(n))for(i in n)b.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(a=o.getElementById(i[2]),a&&a.parentNode){if(a.id!==i[2])return r.find(e);this.length=1,this[0]=a}return this.context=o,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):b.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),b.makeArray(e,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return h.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=b.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return b.each(this,e,t)},ready:function(e){return b.ready.promise().done(e),this},slice:function(){return this.pushStack(h.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(b.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:d,sort:[].sort,splice:[].splice},b.fn.init.prototype=b.fn,b.extend=b.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},u=2),"object"==typeof s||b.isFunction(s)||(s={}),l===u&&(s=this,--u);l>u;u++)if(null!=(o=arguments[u]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(b.isPlainObject(r)||(n=b.isArray(r)))?(n?(n=!1,a=e&&b.isArray(e)?e:[]):a=e&&b.isPlainObject(e)?e:{},s[i]=b.extend(c,a,r)):r!==t&&(s[i]=r));return s},b.extend({noConflict:function(t){return e.$===b&&(e.$=u),t&&e.jQuery===b&&(e.jQuery=s),b},isReady:!1,readyWait:1,holdReady:function(e){e?b.readyWait++:b.ready(!0)},ready:function(e){if(e===!0?!--b.readyWait:!b.isReady){if(!o.body)return setTimeout(b.ready);b.isReady=!0,e!==!0&&--b.readyWait>0||(n.resolveWith(o,[b]),b.fn.trigger&&b(o).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===b.type(e)},isArray:Array.isArray||function(e){return"array"===b.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[m.call(e)]||"object":typeof e},isPlainObject:function(e){if(!e||"object"!==b.type(e)||e.nodeType||b.isWindow(e))return!1;try{if(e.constructor&&!y.call(e,"constructor")&&!y.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||y.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||o;var r=C.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=b.buildFragment([e],t,i),i&&b(i).remove(),b.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=b.trim(n),n&&k.test(n.replace(S,"@").replace(A,"]").replace(E,"")))?Function("return "+n)():(b.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||b.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&b.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(j,"ms-").replace(D,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:v&&!v.call("\ufeff\u00a0")?function(e){return null==e?"":v.call(e)}:function(e){return null==e?"":(e+"").replace(T,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?b.merge(n,"string"==typeof e?[e]:e):d.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(g)return g.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return f.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),b.isFunction(e)?(r=h.call(arguments,2),i=function(){return e.apply(n||this,r.concat(h.call(arguments)))},i.guid=e.guid=e.guid||b.guid++,i):t},access:function(e,n,r,i,o,a,s){var u=0,l=e.length,c=null==r;if("object"===b.type(r)){o=!0;for(u in r)b.access(e,n,u,r[u],!0,a,s)}else if(i!==t&&(o=!0,b.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(b(e),n)})),n))for(;l>u;u++)n(e[u],r,s?i:i.call(e[u],u,n(e[u],r)));return o?e:c?n.call(e):l?n(e[0],r):a},now:function(){return(new Date).getTime()}}),b.ready.promise=function(t){if(!n)if(n=b.Deferred(),"complete"===o.readyState)setTimeout(b.ready);else if(o.addEventListener)o.addEventListener("DOMContentLoaded",H,!1),e.addEventListener("load",H,!1);else{o.attachEvent("onreadystatechange",H),e.attachEvent("onload",H);var r=!1;try{r=null==e.frameElement&&o.documentElement}catch(i){}r&&r.doScroll&&function a(){if(!b.isReady){try{r.doScroll("left")}catch(e){return setTimeout(a,50)}q(),b.ready()}}()}return n.promise(t)},b.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=b.type(e);return b.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=b(o);var _={};function F(e){var t=_[e]={};return b.each(e.match(w)||[],function(e,n){t[n]=!0}),t}b.Callbacks=function(e){e="string"==typeof e?_[e]||F(e):b.extend({},e);var n,r,i,o,a,s,u=[],l=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=u.length,n=!0;u&&o>a;a++)if(u[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,u&&(l?l.length&&c(l.shift()):r?u=[]:p.disable())},p={add:function(){if(u){var t=u.length;(function i(t){b.each(t,function(t,n){var r=b.type(n);"function"===r?e.unique&&p.has(n)||u.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=u.length:r&&(s=t,c(r))}return this},remove:function(){return u&&b.each(arguments,function(e,t){var r;while((r=b.inArray(t,u,r))>-1)u.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?b.inArray(e,u)>-1:!(!u||!u.length)},empty:function(){return u=[],this},disable:function(){return u=l=r=t,this},disabled:function(){return!u},lock:function(){return l=t,r||p.disable(),this},locked:function(){return!l},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],!u||i&&!l||(n?l.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},b.extend({Deferred:function(e){var t=[["resolve","done",b.Callbacks("once memory"),"resolved"],["reject","fail",b.Callbacks("once memory"),"rejected"],["notify","progress",b.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return b.Deferred(function(n){b.each(t,function(t,o){var a=o[0],s=b.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&b.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?b.extend(e,r):r}},i={};return r.pipe=r.then,b.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=h.call(arguments),r=n.length,i=1!==r||e&&b.isFunction(e.promise)?r:0,o=1===i?e:b.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?h.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,u,l;if(r>1)for(s=Array(r),u=Array(r),l=Array(r);r>t;t++)n[t]&&b.isFunction(n[t].promise)?n[t].promise().done(a(t,l,n)).fail(o.reject).progress(a(t,u,s)):--i;return i||o.resolveWith(l,n),o.promise()}}),b.support=function(){var t,n,r,a,s,u,l,c,p,f,d=o.createElement("div");if(d.setAttribute("className","t"),d.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=d.getElementsByTagName("*"),r=d.getElementsByTagName("a")[0],!n||!r||!n.length)return{};s=o.createElement("select"),l=s.appendChild(o.createElement("option")),a=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={getSetAttribute:"t"!==d.className,leadingWhitespace:3===d.firstChild.nodeType,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:"/a"===r.getAttribute("href"),opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:!!a.value,optSelected:l.selected,enctype:!!o.createElement("form").enctype,html5Clone:"<:nav></:nav>"!==o.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===o.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},a.checked=!0,t.noCloneChecked=a.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!l.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}a=o.createElement("input"),a.setAttribute("value",""),t.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),t.radioValue="t"===a.value,a.setAttribute("checked","t"),a.setAttribute("name","t"),u=o.createDocumentFragment(),u.appendChild(a),t.appendChecked=a.checked,t.checkClone=u.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;return d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip,b(function(){var n,r,a,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",u=o.getElementsByTagName("body")[0];u&&(n=o.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",u.appendChild(n).appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",a=d.getElementsByTagName("td"),a[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===a[0].offsetHeight,a[0].style.display="",a[1].style.display="none",t.reliableHiddenOffsets=p&&0===a[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=4===d.offsetWidth,t.doesNotIncludeMarginInBodyOffset=1!==u.offsetTop,e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(o.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="<div></div>",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(u.style.zoom=1)),u.removeChild(n),n=d=a=r=null)}),n=s=u=l=r=a=null,t}();var O=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,B=/([A-Z])/g;function P(e,n,r,i){if(b.acceptData(e)){var o,a,s=b.expando,u="string"==typeof n,l=e.nodeType,p=l?b.cache:e,f=l?e[s]:e[s]&&s;if(f&&p[f]&&(i||p[f].data)||!u||r!==t)return f||(l?e[s]=f=c.pop()||b.guid++:f=s),p[f]||(p[f]={},l||(p[f].toJSON=b.noop)),("object"==typeof n||"function"==typeof n)&&(i?p[f]=b.extend(p[f],n):p[f].data=b.extend(p[f].data,n)),o=p[f],i||(o.data||(o.data={}),o=o.data),r!==t&&(o[b.camelCase(n)]=r),u?(a=o[n],null==a&&(a=o[b.camelCase(n)])):a=o,a}}function R(e,t,n){if(b.acceptData(e)){var r,i,o,a=e.nodeType,s=a?b.cache:e,u=a?e[b.expando]:b.expando;if(s[u]){if(t&&(o=n?s[u]:s[u].data)){b.isArray(t)?t=t.concat(b.map(t,b.camelCase)):t in o?t=[t]:(t=b.camelCase(t),t=t in o?[t]:t.split(" "));for(r=0,i=t.length;i>r;r++)delete o[t[r]];if(!(n?$:b.isEmptyObject)(o))return}(n||(delete s[u].data,$(s[u])))&&(a?b.cleanData([e],!0):b.support.deleteExpando||s!=s.window?delete s[u]:s[u]=null)}}}b.extend({cache:{},expando:"jQuery"+(p+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?b.cache[e[b.expando]]:e[b.expando],!!e&&!$(e)},data:function(e,t,n){return P(e,t,n)},removeData:function(e,t){return R(e,t)},_data:function(e,t,n){return P(e,t,n,!0)},_removeData:function(e,t){return R(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&b.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),b.fn.extend({data:function(e,n){var r,i,o=this[0],a=0,s=null;if(e===t){if(this.length&&(s=b.data(o),1===o.nodeType&&!b._data(o,"parsedAttrs"))){for(r=o.attributes;r.length>a;a++)i=r[a].name,i.indexOf("data-")||(i=b.camelCase(i.slice(5)),W(o,i,s[i]));b._data(o,"parsedAttrs",!0)}return s}return"object"==typeof e?this.each(function(){b.data(this,e)}):b.access(this,function(n){return n===t?o?W(o,e,b.data(o,e)):null:(this.each(function(){b.data(this,e,n)}),t)},null,n,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){b.removeData(this,e)})}});function W(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(B,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:O.test(r)?b.parseJSON(r):r}catch(o){}b.data(e,n,r)}else r=t}return r}function $(e){var t;for(t in e)if(("data"!==t||!b.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}b.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=b._data(e,n),r&&(!i||b.isArray(r)?i=b._data(e,n,b.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=b.queue(e,t),r=n.length,i=n.shift(),o=b._queueHooks(e,t),a=function(){b.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),o.cur=i,i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return b._data(e,n)||b._data(e,n,{empty:b.Callbacks("once memory").add(function(){b._removeData(e,t+"queue"),b._removeData(e,n)})})}}),b.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?b.queue(this[0],e):n===t?this:this.each(function(){var t=b.queue(this,e,n);b._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&b.dequeue(this,e)})},dequeue:function(e){return this.each(function(){b.dequeue(this,e)})},delay:function(e,t){return e=b.fx?b.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=b.Deferred(),a=this,s=this.length,u=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=b._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(u));return u(),o.promise(n)}});var I,z,X=/[\t\r\n]/g,U=/\r/g,V=/^(?:input|select|textarea|button|object)$/i,Y=/^(?:a|area)$/i,J=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,G=/^(?:checked|selected)$/i,Q=b.support.getSetAttribute,K=b.support.input;b.fn.extend({attr:function(e,t){return b.access(this,b.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){b.removeAttr(this,e)})},prop:function(e,t){return b.access(this,b.prop,e,t,arguments.length>1)},removeProp:function(e){return e=b.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,u="string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).addClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=b.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,u=0===arguments.length||"string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).removeClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?b.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e,r="boolean"==typeof t;return b.isFunction(e)?this.each(function(n){b(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var o,a=0,s=b(this),u=t,l=e.match(w)||[];while(o=l[a++])u=r?u:!s.hasClass(o),s[u?"addClass":"removeClass"](o)}else(n===i||"boolean"===n)&&(this.className&&b._data(this,"__className__",this.className),this.className=this.className||e===!1?"":b._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(X," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=b.isFunction(e),this.each(function(n){var o,a=b(this);1===this.nodeType&&(o=i?e.call(this,n,a.val()):e,null==o?o="":"number"==typeof o?o+="":b.isArray(o)&&(o=b.map(o,function(e){return null==e?"":e+""})),r=b.valHooks[this.type]||b.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=b.valHooks[o.type]||b.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(U,""):null==n?"":n)}}}),b.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,u=0>i?s:o?i:0;for(;s>u;u++)if(n=r[u],!(!n.selected&&u!==i||(b.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&b.nodeName(n.parentNode,"optgroup"))){if(t=b(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n=b.makeArray(t);return b(e).find("option").each(function(){this.selected=b.inArray(b(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attr:function(e,n,r){var o,a,s,u=e.nodeType;if(e&&3!==u&&8!==u&&2!==u)return typeof e.getAttribute===i?b.prop(e,n,r):(a=1!==u||!b.isXMLDoc(e),a&&(n=n.toLowerCase(),o=b.attrHooks[n]||(J.test(n)?z:I)),r===t?o&&a&&"get"in o&&null!==(s=o.get(e,n))?s:(typeof e.getAttribute!==i&&(s=e.getAttribute(n)),null==s?t:s):null!==r?o&&a&&"set"in o&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r):(b.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(w);if(o&&1===e.nodeType)while(n=o[i++])r=b.propFix[n]||n,J.test(n)?!Q&&G.test(n)?e[b.camelCase("default-"+n)]=e[r]=!1:e[r]=!1:b.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!b.support.radioValue&&"radio"===t&&b.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!b.isXMLDoc(e),a&&(n=b.propFix[n]||n,o=b.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):V.test(e.nodeName)||Y.test(e.nodeName)&&e.href?0:t}}}}),z={get:function(e,n){var r=b.prop(e,n),i="boolean"==typeof r&&e.getAttribute(n),o="boolean"==typeof r?K&&Q?null!=i:G.test(n)?e[b.camelCase("default-"+n)]:!!i:e.getAttributeNode(n);return o&&o.value!==!1?n.toLowerCase():t},set:function(e,t,n){return t===!1?b.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&b.propFix[n]||n,n):e[b.camelCase("default-"+n)]=e[n]=!0,n}},K&&Q||(b.attrHooks.value={get:function(e,n){var r=e.getAttributeNode(n);return b.nodeName(e,"input")?e.defaultValue:r&&r.specified?r.value:t},set:function(e,n,r){return b.nodeName(e,"input")?(e.defaultValue=n,t):I&&I.set(e,n,r)}}),Q||(I=b.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&("id"===n||"name"===n||"coords"===n?""!==r.value:r.specified)?r.value:t},set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},b.attrHooks.contenteditable={get:I.get,set:function(e,t,n){I.set(e,""===t?!1:t,n)}},b.each(["width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}})})),b.support.hrefNormalized||(b.each(["href","src","width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return null==r?t:r}})}),b.each(["href","src"],function(e,t){b.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}})),b.support.style||(b.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),b.support.optSelected||(b.propHooks.selected=b.extend(b.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),b.support.enctype||(b.propFix.enctype="encoding"),b.support.checkOn||b.each(["radio","checkbox"],function(){b.valHooks[this]={get:function(e){return null===e.getAttribute("value")?"on":e.value}}}),b.each(["radio","checkbox"],function(){b.valHooks[this]=b.extend(b.valHooks[this],{set:function(e,n){return b.isArray(n)?e.checked=b.inArray(b(e).val(),n)>=0:t}})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}b.event={global:{},add:function(e,n,r,o,a){var s,u,l,c,p,f,d,h,g,m,y,v=b._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=b.guid++),(u=v.events)||(u=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof b===i||e&&b.event.triggered===e.type?t:b.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(w)||[""],l=n.length;while(l--)s=rt.exec(n[l])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),p=b.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=b.event.special[g]||{},d=b.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&b.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=u[g])||(h=u[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),b.event.global[g]=!0;e=null}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,p,f,d,h,g,m=b.hasData(e)&&b._data(e);if(m&&(c=m.events)){t=(t||"").match(w)||[""],l=t.length;while(l--)if(s=rt.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=b.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),u=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));u&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||b.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)b.event.remove(e,d+t[l],n,r,!0);b.isEmptyObject(c)&&(delete m.handle,b._removeData(e,"events"))}},trigger:function(n,r,i,a){var s,u,l,c,p,f,d,h=[i||o],g=y.call(n,"type")?n.type:n,m=y.call(n,"namespace")?n.namespace.split("."):[];if(l=f=i=i||o,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+b.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),u=0>g.indexOf(":")&&"on"+g,n=n[b.expando]?n:new b.Event(g,"object"==typeof n&&n),n.isTrigger=!0,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:b.makeArray(r,[n]),p=b.event.special[g]||{},a||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!a&&!p.noBubble&&!b.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(l=l.parentNode);l;l=l.parentNode)h.push(l),f=l;f===(i.ownerDocument||o)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((l=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(b._data(l,"events")||{})[n.type]&&b._data(l,"handle"),s&&s.apply(l,r),s=u&&l[u],s&&b.acceptData(l)&&s.apply&&s.apply(l,r)===!1&&n.preventDefault();if(n.type=g,!(a||n.isDefaultPrevented()||p._default&&p._default.apply(i.ownerDocument,r)!==!1||"click"===g&&b.nodeName(i,"a")||!b.acceptData(i)||!u||!i[g]||b.isWindow(i))){f=i[u],f&&(i[u]=null),b.event.triggered=g;try{i[g]()}catch(v){}b.event.triggered=t,f&&(i[u]=f)}return n.result}},dispatch:function(e){e=b.event.fix(e);var n,r,i,o,a,s=[],u=h.call(arguments),l=(b._data(this,"events")||{})[e.type]||[],c=b.event.special[e.type]||{};if(u[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=b.event.handlers.call(this,e,l),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((b.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,u),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],u=n.delegateCount,l=e.target;if(u&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==e.type)){for(o=[],a=0;u>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?b(r,this).index(l)>=0:b.find(r,this,null,[l]).length),o[r]&&o.push(i);o.length&&s.push({elem:l,handlers:o})}return n.length>u&&s.push({elem:this,handlers:n.slice(u)}),s},fix:function(e){if(e[b.expando])return e;var t,n,r,i=e.type,a=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new b.Event(a),t=r.length;while(t--)n=r[t],e[n]=a[n];return e.target||(e.target=a.srcElement||o),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,a):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,a,s=n.button,u=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||o,a=i.documentElement,r=i.body,e.pageX=n.clientX+(a&&a.scrollLeft||r&&r.scrollLeft||0)-(a&&a.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(a&&a.scrollTop||r&&r.scrollTop||0)-(a&&a.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&u&&(e.relatedTarget=u===e.target?n.toElement:u),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},click:{trigger:function(){return b.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t}},focus:{trigger:function(){if(this!==o.activeElement&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===o.activeElement&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=b.extend(new b.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?b.event.trigger(i,null,t):b.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},b.removeEvent=o.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},b.Event=function(e,n){return this instanceof b.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&b.extend(this,n),this.timeStamp=e&&e.timeStamp||b.now(),this[b.expando]=!0,t):new b.Event(e,n)},b.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},b.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){b.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;
4
- return(!i||i!==r&&!b.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),b.support.submitBubbles||(b.event.special.submit={setup:function(){return b.nodeName(this,"form")?!1:(b.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=b.nodeName(n,"input")||b.nodeName(n,"button")?n.form:t;r&&!b._data(r,"submitBubbles")&&(b.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),b._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&b.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return b.nodeName(this,"form")?!1:(b.event.remove(this,"._submit"),t)}}),b.support.changeBubbles||(b.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(b.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),b.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),b.event.simulate("change",this,e,!0)})),!1):(b.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!b._data(t,"changeBubbles")&&(b.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||b.event.simulate("change",this.parentNode,e,!0)}),b._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return b.event.remove(this,"._change"),!Z.test(this.nodeName)}}),b.support.focusinBubbles||b.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){b.event.simulate(t,e.target,b.event.fix(e),!0)};b.event.special[t]={setup:function(){0===n++&&o.addEventListener(e,r,!0)},teardown:function(){0===--n&&o.removeEventListener(e,r,!0)}}}),b.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return b().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=b.guid++)),this.each(function(){b.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,b(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){b.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){b.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?b.event.trigger(e,n,r,!0):t}}),function(e,t){var n,r,i,o,a,s,u,l,c,p,f,d,h,g,m,y,v,x="sizzle"+-new Date,w=e.document,T={},N=0,C=0,k=it(),E=it(),S=it(),A=typeof t,j=1<<31,D=[],L=D.pop,H=D.push,q=D.slice,M=D.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},_="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=F.replace("w","w#"),B="([*^$|!~]?=)",P="\\["+_+"*("+F+")"+_+"*(?:"+B+_+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+O+")|)|)"+_+"*\\]",R=":("+F+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+P.replace(3,8)+")*)|.*)\\)|)",W=RegExp("^"+_+"+|((?:^|[^\\\\])(?:\\\\.)*)"+_+"+$","g"),$=RegExp("^"+_+"*,"+_+"*"),I=RegExp("^"+_+"*([\\x20\\t\\r\\n\\f>+~])"+_+"*"),z=RegExp(R),X=RegExp("^"+O+"$"),U={ID:RegExp("^#("+F+")"),CLASS:RegExp("^\\.("+F+")"),NAME:RegExp("^\\[name=['\"]?("+F+")['\"]?\\]"),TAG:RegExp("^("+F.replace("w","w*")+")"),ATTR:RegExp("^"+P),PSEUDO:RegExp("^"+R),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+_+"*(even|odd|(([+-]|)(\\d*)n|)"+_+"*(?:([+-]|)"+_+"*(\\d+)|))"+_+"*\\)|)","i"),needsContext:RegExp("^"+_+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+_+"*((?:-\\d)?\\d*)"+_+"*\\)|)(?=[^-]|$)","i")},V=/[\x20\t\r\n\f]*[+~]/,Y=/^[^{]+\{\s*\[native code/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,G=/^(?:input|select|textarea|button)$/i,Q=/^h\d$/i,K=/'|\\/g,Z=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,et=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,tt=function(e,t){var n="0x"+t-65536;return n!==n?t:0>n?String.fromCharCode(n+65536):String.fromCharCode(55296|n>>10,56320|1023&n)};try{q.call(w.documentElement.childNodes,0)[0].nodeType}catch(nt){q=function(e){var t,n=[];while(t=this[e++])n.push(t);return n}}function rt(e){return Y.test(e+"")}function it(){var e,t=[];return e=function(n,r){return t.push(n+=" ")>i.cacheLength&&delete e[t.shift()],e[n]=r}}function ot(e){return e[x]=!0,e}function at(e){var t=p.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}}function st(e,t,n,r){var i,o,a,s,u,l,f,g,m,v;if((t?t.ownerDocument||t:w)!==p&&c(t),t=t||p,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(!d&&!r){if(i=J.exec(e))if(a=i[1]){if(9===s){if(o=t.getElementById(a),!o||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&y(t,o)&&o.id===a)return n.push(o),n}else{if(i[2])return H.apply(n,q.call(t.getElementsByTagName(e),0)),n;if((a=i[3])&&T.getByClassName&&t.getElementsByClassName)return H.apply(n,q.call(t.getElementsByClassName(a),0)),n}if(T.qsa&&!h.test(e)){if(f=!0,g=x,m=t,v=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){l=ft(e),(f=t.getAttribute("id"))?g=f.replace(K,"\\$&"):t.setAttribute("id",g),g="[id='"+g+"'] ",u=l.length;while(u--)l[u]=g+dt(l[u]);m=V.test(e)&&t.parentNode||t,v=l.join(",")}if(v)try{return H.apply(n,q.call(m.querySelectorAll(v),0)),n}catch(b){}finally{f||t.removeAttribute("id")}}}return wt(e.replace(W,"$1"),t,n,r)}a=st.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},c=st.setDocument=function(e){var n=e?e.ownerDocument||e:w;return n!==p&&9===n.nodeType&&n.documentElement?(p=n,f=n.documentElement,d=a(n),T.tagNameNoComments=at(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),T.attributes=at(function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return"boolean"!==t&&"string"!==t}),T.getByClassName=at(function(e){return e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",e.getElementsByClassName&&e.getElementsByClassName("e").length?(e.lastChild.className="e",2===e.getElementsByClassName("e").length):!1}),T.getByName=at(function(e){e.id=x+0,e.innerHTML="<a name='"+x+"'></a><div name='"+x+"'></div>",f.insertBefore(e,f.firstChild);var t=n.getElementsByName&&n.getElementsByName(x).length===2+n.getElementsByName(x+0).length;return T.getIdNotName=!n.getElementById(x),f.removeChild(e),t}),i.attrHandle=at(function(e){return e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!==A&&"#"===e.firstChild.getAttribute("href")})?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},T.getIdNotName?(i.find.ID=function(e,t){if(typeof t.getElementById!==A&&!d){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){return e.getAttribute("id")===t}}):(i.find.ID=function(e,n){if(typeof n.getElementById!==A&&!d){var r=n.getElementById(e);return r?r.id===e||typeof r.getAttributeNode!==A&&r.getAttributeNode("id").value===e?[r]:t:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){var n=typeof e.getAttributeNode!==A&&e.getAttributeNode("id");return n&&n.value===t}}),i.find.TAG=T.tagNameNoComments?function(e,n){return typeof n.getElementsByTagName!==A?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},i.find.NAME=T.getByName&&function(e,n){return typeof n.getElementsByName!==A?n.getElementsByName(name):t},i.find.CLASS=T.getByClassName&&function(e,n){return typeof n.getElementsByClassName===A||d?t:n.getElementsByClassName(e)},g=[],h=[":focus"],(T.qsa=rt(n.querySelectorAll))&&(at(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||h.push("\\["+_+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||h.push(":checked")}),at(function(e){e.innerHTML="<input type='hidden' i=''/>",e.querySelectorAll("[i^='']").length&&h.push("[*^$]="+_+"*(?:\"\"|'')"),e.querySelectorAll(":enabled").length||h.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),h.push(",.*:")})),(T.matchesSelector=rt(m=f.matchesSelector||f.mozMatchesSelector||f.webkitMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&at(function(e){T.disconnectedMatch=m.call(e,"div"),m.call(e,"[s!='']:x"),g.push("!=",R)}),h=RegExp(h.join("|")),g=RegExp(g.join("|")),y=rt(f.contains)||f.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},v=f.compareDocumentPosition?function(e,t){var r;return e===t?(u=!0,0):(r=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t))?1&r||e.parentNode&&11===e.parentNode.nodeType?e===n||y(w,e)?-1:t===n||y(w,t)?1:0:4&r?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return u=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:0;if(o===a)return ut(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?ut(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},u=!1,[0,0].sort(v),T.detectDuplicates=u,p):p},st.matches=function(e,t){return st(e,null,null,t)},st.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&c(e),t=t.replace(Z,"='$1']"),!(!T.matchesSelector||d||g&&g.test(t)||h.test(t)))try{var n=m.call(e,t);if(n||T.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(r){}return st(t,p,null,[e]).length>0},st.contains=function(e,t){return(e.ownerDocument||e)!==p&&c(e),y(e,t)},st.attr=function(e,t){var n;return(e.ownerDocument||e)!==p&&c(e),d||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):d||T.attributes?e.getAttribute(t):((n=e.getAttributeNode(t))||e.getAttribute(t))&&e[t]===!0?t:n&&n.specified?n.value:null},st.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},st.uniqueSort=function(e){var t,n=[],r=1,i=0;if(u=!T.detectDuplicates,e.sort(v),u){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));while(i--)e.splice(n[i],1)}return e};function ut(e,t){var n=t&&e,r=n&&(~t.sourceIndex||j)-(~e.sourceIndex||j);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function lt(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function ct(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function pt(e){return ot(function(t){return t=+t,ot(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}o=st.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=o(t);return n},i=st.selectors={cacheLength:50,createPseudo:ot,match:U,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(et,tt),e[3]=(e[4]||e[5]||"").replace(et,tt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||st.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&st.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return U.CHILD.test(e[0])?null:(e[4]?e[2]=e[4]:n&&z.test(n)&&(t=ft(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){return"*"===e?function(){return!0}:(e=e.replace(et,tt).toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[e+" "];return t||(t=RegExp("(^|"+_+")"+e+"("+_+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==A&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=st.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!u&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[x]||(m[x]={}),l=c[e]||[],d=l[0]===N&&l[1],f=l[0]===N&&l[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[N,d,f];break}}else if(v&&(l=(t[x]||(t[x]={}))[e])&&l[0]===N)f=l[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[x]||(p[x]={}))[e]=[N,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||st.error("unsupported pseudo: "+e);return r[x]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?ot(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=M.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:ot(function(e){var t=[],n=[],r=s(e.replace(W,"$1"));return r[x]?ot(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:ot(function(e){return function(t){return st(e,t).length>0}}),contains:ot(function(e){return function(t){return(t.textContent||t.innerText||o(t)).indexOf(e)>-1}}),lang:ot(function(e){return X.test(e||"")||st.error("unsupported lang: "+e),e=e.replace(et,tt).toLowerCase(),function(t){var n;do if(n=d?t.getAttribute("xml:lang")||t.getAttribute("lang"):t.lang)return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!i.pseudos.empty(e)},header:function(e){return Q.test(e.nodeName)},input:function(e){return G.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:pt(function(){return[0]}),last:pt(function(e,t){return[t-1]}),eq:pt(function(e,t,n){return[0>n?n+t:n]}),even:pt(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:pt(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:pt(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:pt(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}};for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[n]=lt(n);for(n in{submit:!0,reset:!0})i.pseudos[n]=ct(n);function ft(e,t){var n,r,o,a,s,u,l,c=E[e+" "];if(c)return t?0:c.slice(0);s=e,u=[],l=i.preFilter;while(s){(!n||(r=$.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),u.push(o=[])),n=!1,(r=I.exec(s))&&(n=r.shift(),o.push({value:n,type:r[0].replace(W," ")}),s=s.slice(n.length));for(a in i.filter)!(r=U[a].exec(s))||l[a]&&!(r=l[a](r))||(n=r.shift(),o.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?st.error(e):E(e,u).slice(0)}function dt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function ht(e,t,n){var i=t.dir,o=n&&"parentNode"===i,a=C++;return t.first?function(t,n,r){while(t=t[i])if(1===t.nodeType||o)return e(t,n,r)}:function(t,n,s){var u,l,c,p=N+" "+a;if(s){while(t=t[i])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[i])if(1===t.nodeType||o)if(c=t[x]||(t[x]={}),(l=c[i])&&l[0]===p){if((u=l[1])===!0||u===r)return u===!0}else if(l=c[i]=[p],l[1]=e(t,n,s)||r,l[1]===!0)return!0}}function gt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function mt(e,t,n,r,i){var o,a=[],s=0,u=e.length,l=null!=t;for(;u>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),l&&t.push(s));return a}function yt(e,t,n,r,i,o){return r&&!r[x]&&(r=yt(r)),i&&!i[x]&&(i=yt(i,o)),ot(function(o,a,s,u){var l,c,p,f=[],d=[],h=a.length,g=o||xt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:mt(g,f,e,s,u),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,u),r){l=mt(y,d),r(l,[],s,u),c=l.length;while(c--)(p=l[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){l=[],c=y.length;while(c--)(p=y[c])&&l.push(m[c]=p);i(null,y=[],l,u)}c=y.length;while(c--)(p=y[c])&&(l=i?M.call(o,p):f[c])>-1&&(o[l]=!(a[l]=p))}}else y=mt(y===a?y.splice(h,y.length):y),i?i(null,a,y,u):H.apply(a,y)})}function vt(e){var t,n,r,o=e.length,a=i.relative[e[0].type],s=a||i.relative[" "],u=a?1:0,c=ht(function(e){return e===t},s,!0),p=ht(function(e){return M.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;o>u;u++)if(n=i.relative[e[u].type])f=[ht(gt(f),n)];else{if(n=i.filter[e[u].type].apply(null,e[u].matches),n[x]){for(r=++u;o>r;r++)if(i.relative[e[r].type])break;return yt(u>1&&gt(f),u>1&&dt(e.slice(0,u-1)).replace(W,"$1"),n,r>u&&vt(e.slice(u,r)),o>r&&vt(e=e.slice(r)),o>r&&dt(e))}f.push(n)}return gt(f)}function bt(e,t){var n=0,o=t.length>0,a=e.length>0,s=function(s,u,c,f,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,T=l,C=s||a&&i.find.TAG("*",d&&u.parentNode||u),k=N+=null==T?1:Math.random()||.1;for(w&&(l=u!==p&&u,r=n);null!=(h=C[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,u,c)){f.push(h);break}w&&(N=k,r=++n)}o&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,o&&b!==v){g=0;while(m=t[g++])m(x,y,u,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=L.call(f));y=mt(y)}H.apply(f,y),w&&!s&&y.length>0&&v+t.length>1&&st.uniqueSort(f)}return w&&(N=k,l=T),x};return o?ot(s):s}s=st.compile=function(e,t){var n,r=[],i=[],o=S[e+" "];if(!o){t||(t=ft(e)),n=t.length;while(n--)o=vt(t[n]),o[x]?r.push(o):i.push(o);o=S(e,bt(i,r))}return o};function xt(e,t,n){var r=0,i=t.length;for(;i>r;r++)st(e,t[r],n);return n}function wt(e,t,n,r){var o,a,u,l,c,p=ft(e);if(!r&&1===p.length){if(a=p[0]=p[0].slice(0),a.length>2&&"ID"===(u=a[0]).type&&9===t.nodeType&&!d&&i.relative[a[1].type]){if(t=i.find.ID(u.matches[0].replace(et,tt),t)[0],!t)return n;e=e.slice(a.shift().value.length)}o=U.needsContext.test(e)?0:a.length;while(o--){if(u=a[o],i.relative[l=u.type])break;if((c=i.find[l])&&(r=c(u.matches[0].replace(et,tt),V.test(a[0].type)&&t.parentNode||t))){if(a.splice(o,1),e=r.length&&dt(a),!e)return H.apply(n,q.call(r,0)),n;break}}}return s(e,p)(r,t,d,n,V.test(e)),n}i.pseudos.nth=i.pseudos.eq;function Tt(){}i.filters=Tt.prototype=i.pseudos,i.setFilters=new Tt,c(),st.attr=b.attr,b.find=st,b.expr=st.selectors,b.expr[":"]=b.expr.pseudos,b.unique=st.uniqueSort,b.text=st.getText,b.isXMLDoc=st.isXML,b.contains=st.contains}(e);var at=/Until$/,st=/^(?:parents|prev(?:Until|All))/,ut=/^.[^:#\[\.,]*$/,lt=b.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};b.fn.extend({find:function(e){var t,n,r,i=this.length;if("string"!=typeof e)return r=this,this.pushStack(b(e).filter(function(){for(t=0;i>t;t++)if(b.contains(r[t],this))return!0}));for(n=[],t=0;i>t;t++)b.find(e,this[t],n);return n=this.pushStack(i>1?b.unique(n):n),n.selector=(this.selector?this.selector+" ":"")+e,n},has:function(e){var t,n=b(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(b.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e,!1))},filter:function(e){return this.pushStack(ft(this,e,!0))},is:function(e){return!!e&&("string"==typeof e?lt.test(e)?b(e,this.context).index(this[0])>=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,o=[],a=lt.test(e)||"string"!=typeof e?b(e,t||this.context):0;for(;i>r;r++){n=this[r];while(n&&n.ownerDocument&&n!==t&&11!==n.nodeType){if(a?a.index(n)>-1:b.find.matchesSelector(n,e)){o.push(n);break}n=n.parentNode}}return this.pushStack(o.length>1?b.unique(o):o)},index:function(e){return e?"string"==typeof e?b.inArray(this[0],b(e)):b.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?b(e,t):b.makeArray(e&&e.nodeType?[e]:e),r=b.merge(this.get(),n);return this.pushStack(b.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),b.fn.andSelf=b.fn.addBack;function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}b.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(e,t,n){return b.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(e,t,n){return b.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return b.dir(e,"previousSibling",n)},siblings:function(e){return b.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.merge([],e.childNodes)}},function(e,t){b.fn[e]=function(n,r){var i=b.map(this,t,n);return at.test(e)||(r=n),r&&"string"==typeof r&&(i=b.filter(r,i)),i=this.length>1&&!ct[e]?b.unique(i):i,this.length>1&&st.test(e)&&(i=i.reverse()),this.pushStack(i)}}),b.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),1===t.length?b.find.matchesSelector(t[0],e)?[t[0]]:[]:b.find.matches(e,t)},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!b(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(t=t||0,b.isFunction(t))return b.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return b.grep(e,function(e){return e===t===n});if("string"==typeof t){var r=b.grep(e,function(e){return 1===e.nodeType});if(ut.test(t))return b.filter(t,r,!n);t=b.filter(t,r)}return b.grep(e,function(e){return b.inArray(e,t)>=0===n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/<tbody/i,wt=/<|&#?\w+;/,Tt=/<(?:script|style|link)/i,Nt=/^(?:checkbox|radio)$/i,Ct=/checked\s*(?:[^=]|=\s*.checked.)/i,kt=/^$|\/(?:java|ecma)script/i,Et=/^true\/(.*)/,St=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,At={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:b.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},jt=dt(o),Dt=jt.appendChild(o.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,b.fn.extend({text:function(e){return b.access(this,function(e){return e===t?b.text(this):this.empty().append((this[0]&&this[0].ownerDocument||o).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(b.isFunction(e))return this.each(function(t){b(this).wrapAll(e.call(this,t))});if(this[0]){var t=b(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return b.isFunction(e)?this.each(function(t){b(this).wrapInner(e.call(this,t))}):this.each(function(){var t=b(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=b.isFunction(e);return this.each(function(n){b(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){b.nodeName(this,"body")||b(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.insertBefore(e,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=0;for(;null!=(n=this[r]);r++)(!e||b.filter(e,[n]).length>0)&&(t||1!==n.nodeType||b.cleanData(Ot(n)),n.parentNode&&(t&&b.contains(n.ownerDocument,n)&&Mt(Ot(n,"script")),n.parentNode.removeChild(n)));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&b.cleanData(Ot(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&b.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return b.clone(this,e,t)})},html:function(e){return b.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!b.support.htmlSerialize&&mt.test(e)||!b.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(b.cleanData(Ot(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){var t=b.isFunction(e);return t||"string"==typeof e||(e=b(e).not(this).detach()),this.domManip([e],!0,function(e){var t=this.nextSibling,n=this.parentNode;n&&(b(this).remove(),n.insertBefore(e,t))})},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=f.apply([],e);var i,o,a,s,u,l,c=0,p=this.length,d=this,h=p-1,g=e[0],m=b.isFunction(g);if(m||!(1>=p||"string"!=typeof g||b.support.checkClone)&&Ct.test(g))return this.each(function(i){var o=d.eq(i);m&&(e[0]=g.call(this,i,n?o.html():t)),o.domManip(e,n,r)});if(p&&(l=b.buildFragment(e,this[0].ownerDocument,!1,this),i=l.firstChild,1===l.childNodes.length&&(l=i),i)){for(n=n&&b.nodeName(i,"tr"),s=b.map(Ot(l,"script"),Ht),a=s.length;p>c;c++)o=l,c!==h&&(o=b.clone(o,!0,!0),a&&b.merge(s,Ot(o,"script"))),r.call(n&&b.nodeName(this[c],"table")?Lt(this[c],"tbody"):this[c],o,c);if(a)for(u=s[s.length-1].ownerDocument,b.map(s,qt),c=0;a>c;c++)o=s[c],kt.test(o.type||"")&&!b._data(o,"globalEval")&&b.contains(u,o)&&(o.src?b.ajax({url:o.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):b.globalEval((o.text||o.textContent||o.innerHTML||"").replace(St,"")));l=i=null}return this}});function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function Ht(e){var t=e.getAttributeNode("type");return e.type=(t&&t.specified)+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function Mt(e,t){var n,r=0;for(;null!=(n=e[r]);r++)b._data(n,"globalEval",!t||b._data(t[r],"globalEval"))}function _t(e,t){if(1===t.nodeType&&b.hasData(e)){var n,r,i,o=b._data(e),a=b._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)b.event.add(t,n,s[n][r])}a.data&&(a.data=b.extend({},a.data))}}function Ft(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!b.support.noCloneEvent&&t[b.expando]){i=b._data(t);for(r in i.events)b.removeEvent(t,r,i.handle);t.removeAttribute(b.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),b.support.html5Clone&&e.innerHTML&&!b.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Nt.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}b.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){b.fn[e]=function(e){var n,r=0,i=[],o=b(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),b(o[r])[t](n),d.apply(i,n.get());return this.pushStack(i)}});function Ot(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||b.nodeName(o,n)?s.push(o):b.merge(s,Ot(o,n));return n===t||n&&b.nodeName(e,n)?b.merge([e],s):s}function Bt(e){Nt.test(e.type)&&(e.defaultChecked=e.checked)}b.extend({clone:function(e,t,n){var r,i,o,a,s,u=b.contains(e.ownerDocument,e);if(b.support.html5Clone||b.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(b.support.noCloneEvent&&b.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||b.isXMLDoc(e)))for(r=Ot(o),s=Ot(e),a=0;null!=(i=s[a]);++a)r[a]&&Ft(i,r[a]);if(t)if(n)for(s=s||Ot(e),r=r||Ot(o),a=0;null!=(i=s[a]);a++)_t(i,r[a]);else _t(e,o);return r=Ot(o,"script"),r.length>0&&Mt(r,!u&&Ot(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,u,l,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===b.type(o))b.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),u=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[u]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1></$2>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!b.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!b.support.tbody){o="table"!==u||xt.test(o)?"<table>"!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)b.nodeName(l=o.childNodes[i],"tbody")&&!l.childNodes.length&&o.removeChild(l)
5
- }b.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),b.support.appendChecked||b.grep(Ot(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===b.inArray(o,r))&&(a=b.contains(o.ownerDocument,o),s=Ot(f.appendChild(o),"script"),a&&Mt(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,u=b.expando,l=b.cache,p=b.support.deleteExpando,f=b.event.special;for(;null!=(n=e[s]);s++)if((t||b.acceptData(n))&&(o=n[u],a=o&&l[o])){if(a.events)for(r in a.events)f[r]?b.event.remove(n,r):b.removeEvent(n,r,a.handle);l[o]&&(delete l[o],p?delete n[u]:typeof n.removeAttribute!==i?n.removeAttribute(u):n[u]=null,c.push(o))}}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+x+")(.*)$","i"),Yt=RegExp("^("+x+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+x+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===b.css(e,"display")||!b.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=b._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=b._data(r,"olddisplay",un(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&b._data(r,"olddisplay",i?n:b.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}b.fn.extend({css:function(e,n){return b.access(this,function(e,n,r){var i,o,a={},s=0;if(b.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=b.css(e,n[s],!1,o);return a}return r!==t?b.style(e,n,r):b.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){var t="boolean"==typeof e;return this.each(function(){(t?e:nn(this))?b(this).show():b(this).hide()})}}),b.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":b.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,u=b.camelCase(n),l=e.style;if(n=b.cssProps[u]||(b.cssProps[u]=tn(l,u)),s=b.cssHooks[n]||b.cssHooks[u],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:l[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(b.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||b.cssNumber[u]||(r+="px"),b.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(l[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{l[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,u=b.camelCase(n);return n=b.cssProps[u]||(b.cssProps[u]=tn(e.style,u)),s=b.cssHooks[n]||b.cssHooks[u],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||b.isNumeric(o)?o||0:a):a},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),u=s?s.getPropertyValue(n)||s[n]:t,l=e.style;return s&&(""!==u||b.contains(e.ownerDocument,e)||(u=b.style(e,n)),Yt.test(u)&&Ut.test(n)&&(i=l.width,o=l.minWidth,a=l.maxWidth,l.minWidth=l.maxWidth=l.width=u,u=s.width,l.width=i,l.minWidth=o,l.maxWidth=a)),u}):o.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),u=s?s[n]:t,l=e.style;return null==u&&l&&l[n]&&(u=l[n]),Yt.test(u)&&!zt.test(n)&&(i=l.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),l.left="fontSize"===n?"1em":u,u=l.pixelLeft+"px",l.left=i,a&&(o.left=a)),""===u?"auto":u});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=b.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=b.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=b.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=b.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=b.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=b.support.boxSizing&&"border-box"===b.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(b.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function un(e){var t=o,n=Gt[e];return n||(n=ln(e,t),"none"!==n&&n||(Pt=(Pt||b("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(Pt[0].contentWindow||Pt[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=ln(e,t),Pt.detach()),Gt[e]=n),n}function ln(e,t){var n=b(t.createElement(e)).appendTo(t.body),r=b.css(n[0],"display");return n.remove(),r}b.each(["height","width"],function(e,n){b.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&Xt.test(b.css(e,"display"))?b.swap(e,Qt,function(){return sn(e,n,i)}):sn(e,n,i):t},set:function(e,t,r){var i=r&&Rt(e);return on(e,t,r?an(e,n,r,b.support.boxSizing&&"border-box"===b.css(e,"boxSizing",!1,i),i):0)}}}),b.support.opacity||(b.cssHooks.opacity={get:function(e,t){return It.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=b.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===b.trim(o.replace($t,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=$t.test(o)?o.replace($t,i):o+" "+i)}}),b(function(){b.support.reliableMarginRight||(b.cssHooks.marginRight={get:function(e,n){return n?b.swap(e,{display:"inline-block"},Wt,[e,"marginRight"]):t}}),!b.support.pixelPosition&&b.fn.position&&b.each(["top","left"],function(e,n){b.cssHooks[n]={get:function(e,r){return r?(r=Wt(e,n),Yt.test(r)?b(e).position()[n]+"px":r):t}}})}),b.expr&&b.expr.filters&&(b.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||!b.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||b.css(e,"display"))},b.expr.filters.visible=function(e){return!b.expr.filters.hidden(e)}),b.each({margin:"",padding:"",border:"Width"},function(e,t){b.cssHooks[e+t]={expand:function(n){var r=0,i={},o="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+Zt[r]+t]=o[r]||o[r-2]||o[0];return i}},Ut.test(e)||(b.cssHooks[e+t].set=on)});var cn=/%20/g,pn=/\[\]$/,fn=/\r?\n/g,dn=/^(?:submit|button|image|reset|file)$/i,hn=/^(?:input|select|textarea|keygen)/i;b.fn.extend({serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=b.prop(this,"elements");return e?b.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!b(this).is(":disabled")&&hn.test(this.nodeName)&&!dn.test(e)&&(this.checked||!Nt.test(e))}).map(function(e,t){var n=b(this).val();return null==n?null:b.isArray(n)?b.map(n,function(e){return{name:t.name,value:e.replace(fn,"\r\n")}}):{name:t.name,value:n.replace(fn,"\r\n")}}).get()}}),b.param=function(e,n){var r,i=[],o=function(e,t){t=b.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=b.ajaxSettings&&b.ajaxSettings.traditional),b.isArray(e)||e.jquery&&!b.isPlainObject(e))b.each(e,function(){o(this.name,this.value)});else for(r in e)gn(r,e[r],n,o);return i.join("&").replace(cn,"+")};function gn(e,t,n,r){var i;if(b.isArray(t))b.each(t,function(t,i){n||pn.test(e)?r(e,i):gn(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==b.type(t))r(e,t);else for(i in t)gn(e+"["+i+"]",t[i],n,r)}b.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){b.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),b.fn.hover=function(e,t){return this.mouseenter(e).mouseleave(t||e)};var mn,yn,vn=b.now(),bn=/\?/,xn=/#.*$/,wn=/([?&])_=[^&]*/,Tn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Nn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Cn=/^(?:GET|HEAD)$/,kn=/^\/\//,En=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Sn=b.fn.load,An={},jn={},Dn="*/".concat("*");try{yn=a.href}catch(Ln){yn=o.createElement("a"),yn.href="",yn=yn.href}mn=En.exec(yn.toLowerCase())||[];function Hn(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(w)||[];if(b.isFunction(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function qn(e,n,r,i){var o={},a=e===jn;function s(u){var l;return o[u]=!0,b.each(e[u]||[],function(e,u){var c=u(n,r,i);return"string"!=typeof c||a||o[c]?a?!(l=c):t:(n.dataTypes.unshift(c),s(c),!1)}),l}return s(n.dataTypes[0])||!o["*"]&&s("*")}function Mn(e,n){var r,i,o=b.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((o[i]?e:r||(r={}))[i]=n[i]);return r&&b.extend(!0,e,r),e}b.fn.load=function(e,n,r){if("string"!=typeof e&&Sn)return Sn.apply(this,arguments);var i,o,a,s=this,u=e.indexOf(" ");return u>=0&&(i=e.slice(u,e.length),e=e.slice(0,u)),b.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(a="POST"),s.length>0&&b.ajax({url:e,type:a,dataType:"html",data:n}).done(function(e){o=arguments,s.html(i?b("<div>").append(b.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},b.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){b.fn[t]=function(e){return this.on(t,e)}}),b.each(["get","post"],function(e,n){b[n]=function(e,r,i,o){return b.isFunction(r)&&(o=o||i,i=r,r=t),b.ajax({url:e,type:n,dataType:o,data:r,success:i})}}),b.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yn,type:"GET",isLocal:Nn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":b.parseJSON,"text xml":b.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Mn(Mn(e,b.ajaxSettings),t):Mn(b.ajaxSettings,e)},ajaxPrefilter:Hn(An),ajaxTransport:Hn(jn),ajax:function(e,n){"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,o,a,s,u,l,c,p=b.ajaxSetup({},n),f=p.context||p,d=p.context&&(f.nodeType||f.jquery)?b(f):b.event,h=b.Deferred(),g=b.Callbacks("once memory"),m=p.statusCode||{},y={},v={},x=0,T="canceled",N={readyState:0,getResponseHeader:function(e){var t;if(2===x){if(!c){c={};while(t=Tn.exec(a))c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===x?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return x||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return x||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>x)for(t in e)m[t]=[m[t],e[t]];else N.always(e[N.status]);return this},abort:function(e){var t=e||T;return l&&l.abort(t),k(0,t),this}};if(h.promise(N).complete=g.add,N.success=N.done,N.error=N.fail,p.url=((e||p.url||yn)+"").replace(xn,"").replace(kn,mn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=b.trim(p.dataType||"*").toLowerCase().match(w)||[""],null==p.crossDomain&&(r=En.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?80:443))==(mn[3]||("http:"===mn[1]?80:443)))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=b.param(p.data,p.traditional)),qn(An,p,n,N),2===x)return N;u=p.global,u&&0===b.active++&&b.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Cn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(bn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=wn.test(o)?o.replace(wn,"$1_="+vn++):o+(bn.test(o)?"&":"?")+"_="+vn++)),p.ifModified&&(b.lastModified[o]&&N.setRequestHeader("If-Modified-Since",b.lastModified[o]),b.etag[o]&&N.setRequestHeader("If-None-Match",b.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&N.setRequestHeader("Content-Type",p.contentType),N.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Dn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)N.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(f,N,p)===!1||2===x))return N.abort();T="abort";for(i in{success:1,error:1,complete:1})N[i](p[i]);if(l=qn(jn,p,n,N)){N.readyState=1,u&&d.trigger("ajaxSend",[N,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){N.abort("timeout")},p.timeout));try{x=1,l.send(y,k)}catch(C){if(!(2>x))throw C;k(-1,C)}}else k(-1,"No Transport");function k(e,n,r,i){var c,y,v,w,T,C=n;2!==x&&(x=2,s&&clearTimeout(s),l=t,a=i||"",N.readyState=e>0?4:0,r&&(w=_n(p,N,r)),e>=200&&300>e||304===e?(p.ifModified&&(T=N.getResponseHeader("Last-Modified"),T&&(b.lastModified[o]=T),T=N.getResponseHeader("etag"),T&&(b.etag[o]=T)),204===e?(c=!0,C="nocontent"):304===e?(c=!0,C="notmodified"):(c=Fn(p,w),C=c.state,y=c.data,v=c.error,c=!v)):(v=C,(e||!C)&&(C="error",0>e&&(e=0))),N.status=e,N.statusText=(n||C)+"",c?h.resolveWith(f,[y,C,N]):h.rejectWith(f,[N,C,v]),N.statusCode(m),m=t,u&&d.trigger(c?"ajaxSuccess":"ajaxError",[N,p,c?y:v]),g.fireWith(f,[N,C]),u&&(d.trigger("ajaxComplete",[N,p]),--b.active||b.event.trigger("ajaxStop")))}return N},getScript:function(e,n){return b.get(e,t,n,"script")},getJSON:function(e,t,n){return b.get(e,t,n,"json")}});function _n(e,n,r){var i,o,a,s,u=e.contents,l=e.dataTypes,c=e.responseFields;for(s in c)s in r&&(n[c[s]]=r[s]);while("*"===l[0])l.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in u)if(u[s]&&u[s].test(o)){l.unshift(s);break}if(l[0]in r)a=l[0];else{for(s in r){if(!l[0]||e.converters[s+" "+l[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==l[0]&&l.unshift(a),r[a]):t}function Fn(e,t){var n,r,i,o,a={},s=0,u=e.dataTypes.slice(),l=u[0];if(e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u[1])for(i in e.converters)a[i.toLowerCase()]=e.converters[i];for(;r=u[++s];)if("*"!==r){if("*"!==l&&l!==r){if(i=a[l+" "+r]||a["* "+r],!i)for(n in a)if(o=n.split(" "),o[1]===r&&(i=a[l+" "+o[0]]||a["* "+o[0]])){i===!0?i=a[n]:a[n]!==!0&&(r=o[0],u.splice(s--,0,r));break}if(i!==!0)if(i&&e["throws"])t=i(t);else try{t=i(t)}catch(c){return{state:"parsererror",error:i?c:"No conversion from "+l+" to "+r}}}l=r}return{state:"success",data:t}}b.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return b.globalEval(e),e}}}),b.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),b.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=o.head||b("head")[0]||o.documentElement;return{send:function(t,i){n=o.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var On=[],Bn=/(=)\?(?=&|$)|\?\?/;b.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=On.pop()||b.expando+"_"+vn++;return this[e]=!0,e}}),b.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,u=n.jsonp!==!1&&(Bn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");return u||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=b.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,u?n[u]=n[u].replace(Bn,"$1"+o):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||b.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,On.push(o)),s&&b.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Pn,Rn,Wn=0,$n=e.ActiveXObject&&function(){var e;for(e in Pn)Pn[e](t,!0)};function In(){try{return new e.XMLHttpRequest}catch(t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}b.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&In()||zn()}:In,Rn=b.ajaxSettings.xhr(),b.support.cors=!!Rn&&"withCredentials"in Rn,Rn=b.support.ajax=!!Rn,Rn&&b.ajaxTransport(function(n){if(!n.crossDomain||b.support.cors){var r;return{send:function(i,o){var a,s,u=n.xhr();if(n.username?u.open(n.type,n.url,n.async,n.username,n.password):u.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)u[s]=n.xhrFields[s];n.mimeType&&u.overrideMimeType&&u.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)u.setRequestHeader(s,i[s])}catch(l){}u.send(n.hasContent&&n.data||null),r=function(e,i){var s,l,c,p;try{if(r&&(i||4===u.readyState))if(r=t,a&&(u.onreadystatechange=b.noop,$n&&delete Pn[a]),i)4!==u.readyState&&u.abort();else{p={},s=u.status,l=u.getAllResponseHeaders(),"string"==typeof u.responseText&&(p.text=u.responseText);try{c=u.statusText}catch(f){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(d){i||o(-1,d)}p&&o(s,c,p,l)},n.async?4===u.readyState?setTimeout(r):(a=++Wn,$n&&(Pn||(Pn={},b(e).unload($n)),Pn[a]=r),u.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Un,Vn=/^(?:toggle|show|hide)$/,Yn=RegExp("^(?:([+-])=|)("+x+")([a-z%]*)$","i"),Jn=/queueHooks$/,Gn=[nr],Qn={"*":[function(e,t){var n,r,i=this.createTween(e,t),o=Yn.exec(t),a=i.cur(),s=+a||0,u=1,l=20;if(o){if(n=+o[2],r=o[3]||(b.cssNumber[e]?"":"px"),"px"!==r&&s){s=b.css(i.elem,e,!0)||n||1;do u=u||".5",s/=u,b.style(i.elem,e,s+r);while(u!==(u=i.cur()/a)&&1!==u&&--l)}i.unit=r,i.start=s,i.end=o[1]?s+(o[1]+1)*n:n}return i}]};function Kn(){return setTimeout(function(){Xn=t}),Xn=b.now()}function Zn(e,t){b.each(t,function(t,n){var r=(Qn[t]||[]).concat(Qn["*"]),i=0,o=r.length;for(;o>i;i++)if(r[i].call(e,t,n))return})}function er(e,t,n){var r,i,o=0,a=Gn.length,s=b.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;var t=Xn||Kn(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,o=1-r,a=0,u=l.tweens.length;for(;u>a;a++)l.tweens[a].run(o);return s.notifyWith(e,[l,o,n]),1>o&&u?n:(s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:b.extend({},t),opts:b.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Kn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=b.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)l.tweens[n].run(1);return t?s.resolveWith(e,[l,t]):s.rejectWith(e,[l,t]),this}}),c=l.props;for(tr(c,l.opts.specialEasing);a>o;o++)if(r=Gn[o].call(l,e,c,l.opts))return r;return Zn(l,c),b.isFunction(l.opts.start)&&l.opts.start.call(e,l),b.fx.timer(b.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function tr(e,t){var n,r,i,o,a;for(i in e)if(r=b.camelCase(i),o=t[r],n=e[i],b.isArray(n)&&(o=n[1],n=e[i]=n[0]),i!==r&&(e[r]=n,delete e[i]),a=b.cssHooks[r],a&&"expand"in a){n=a.expand(n),delete e[r];for(i in n)i in e||(e[i]=n[i],t[i]=o)}else t[r]=o}b.Animation=b.extend(er,{tweener:function(e,t){b.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Qn[n]=Qn[n]||[],Qn[n].unshift(t)},prefilter:function(e,t){t?Gn.unshift(e):Gn.push(e)}});function nr(e,t,n){var r,i,o,a,s,u,l,c,p,f=this,d=e.style,h={},g=[],m=e.nodeType&&nn(e);n.queue||(c=b._queueHooks(e,"fx"),null==c.unqueued&&(c.unqueued=0,p=c.empty.fire,c.empty.fire=function(){c.unqueued||p()}),c.unqueued++,f.always(function(){f.always(function(){c.unqueued--,b.queue(e,"fx").length||c.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[d.overflow,d.overflowX,d.overflowY],"inline"===b.css(e,"display")&&"none"===b.css(e,"float")&&(b.support.inlineBlockNeedsLayout&&"inline"!==un(e.nodeName)?d.zoom=1:d.display="inline-block")),n.overflow&&(d.overflow="hidden",b.support.shrinkWrapBlocks||f.always(function(){d.overflow=n.overflow[0],d.overflowX=n.overflow[1],d.overflowY=n.overflow[2]}));for(i in t)if(a=t[i],Vn.exec(a)){if(delete t[i],u=u||"toggle"===a,a===(m?"hide":"show"))continue;g.push(i)}if(o=g.length){s=b._data(e,"fxshow")||b._data(e,"fxshow",{}),"hidden"in s&&(m=s.hidden),u&&(s.hidden=!m),m?b(e).show():f.done(function(){b(e).hide()}),f.done(function(){var t;b._removeData(e,"fxshow");for(t in h)b.style(e,t,h[t])});for(i=0;o>i;i++)r=g[i],l=f.createTween(r,m?s[r]:0),h[r]=s[r]||b.style(e,r),r in s||(s[r]=l.start,m&&(l.end=l.start,l.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}b.Tween=rr,rr.prototype={constructor:rr,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(b.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?b.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=b.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){b.fx.step[e.prop]?b.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[b.cssProps[e.prop]]||b.cssHooks[e.prop])?b.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},b.each(["toggle","show","hide"],function(e,t){var n=b.fn[t];b.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),b.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=b.isEmptyObject(e),o=b.speed(t,n,r),a=function(){var t=er(this,b.extend({},e),o);a.finish=function(){t.stop(!0)},(i||b._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=b.timers,a=b._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Jn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&b.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=b._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=b.timers,a=r?r.length:0;for(n.finish=!0,b.queue(this,e,[]),i&&i.cur&&i.cur.finish&&i.cur.finish.call(this),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function ir(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}b.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){b.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),b.speed=function(e,t,n){var r=e&&"object"==typeof e?b.extend({},e):{complete:n||!n&&t||b.isFunction(e)&&e,duration:e,easing:n&&t||t&&!b.isFunction(t)&&t};return r.duration=b.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in b.fx.speeds?b.fx.speeds[r.duration]:b.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){b.isFunction(r.old)&&r.old.call(this),r.queue&&b.dequeue(this,r.queue)},r},b.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},b.timers=[],b.fx=rr.prototype.init,b.fx.tick=function(){var e,n=b.timers,r=0;for(Xn=b.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||b.fx.stop(),Xn=t},b.fx.timer=function(e){e()&&b.timers.push(e)&&b.fx.start()},b.fx.interval=13,b.fx.start=function(){Un||(Un=setInterval(b.fx.tick,b.fx.interval))},b.fx.stop=function(){clearInterval(Un),Un=null},b.fx.speeds={slow:600,fast:200,_default:400},b.fx.step={},b.expr&&b.expr.filters&&(b.expr.filters.animated=function(e){return b.grep(b.timers,function(t){return e===t.elem}).length}),b.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){b.offset.setOffset(this,e,t)});var n,r,o={top:0,left:0},a=this[0],s=a&&a.ownerDocument;if(s)return n=s.documentElement,b.contains(n,a)?(typeof a.getBoundingClientRect!==i&&(o=a.getBoundingClientRect()),r=or(s),{top:o.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:o.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):o},b.offset={setOffset:function(e,t,n){var r=b.css(e,"position");"static"===r&&(e.style.position="relative");var i=b(e),o=i.offset(),a=b.css(e,"top"),s=b.css(e,"left"),u=("absolute"===r||"fixed"===r)&&b.inArray("auto",[a,s])>-1,l={},c={},p,f;u?(c=i.position(),p=c.top,f=c.left):(p=parseFloat(a)||0,f=parseFloat(s)||0),b.isFunction(t)&&(t=t.call(e,n,o)),null!=t.top&&(l.top=t.top-o.top+p),null!=t.left&&(l.left=t.left-o.left+f),"using"in t?t.using.call(e,l):i.css(l)}},b.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===b.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),b.nodeName(e[0],"html")||(n=e.offset()),n.top+=b.css(e[0],"borderTopWidth",!0),n.left+=b.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-b.css(r,"marginTop",!0),left:t.left-n.left-b.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||o.documentElement;while(e&&!b.nodeName(e,"html")&&"static"===b.css(e,"position"))e=e.offsetParent;return e||o.documentElement})}}),b.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);b.fn[e]=function(i){return b.access(this,function(e,i,o){var a=or(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?b(a).scrollLeft():o,r?o:b(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}});function or(e){return b.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}b.each({Height:"height",Width:"width"},function(e,n){b.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){b.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return b.access(this,function(n,r,i){var o;return b.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?b.css(n,r,s):b.style(n,r,i,s)},n,a?i:t,a,null)}})}),e.jQuery=e.$=b,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return b})})(window);