Bumble_Filter - Version 1.2.0

Version Notes

This version has been tested and works with Magento Community Edition 1.9

Download this release

Release Info

Developer Ferdinando Lanzillo
Extension Bumble_Filter
Version 1.2.0
Comparing to
See all releases


Version 1.2.0

Files changed (211) hide show
  1. app/code/community/Bumble/Filter/.DS_Store +0 -0
  2. app/code/community/Bumble/Filter/Block/.DS_Store +0 -0
  3. app/code/community/Bumble/Filter/Block/Adminhtml/.DS_Store +0 -0
  4. app/code/community/Bumble/Filter/Block/Adminhtml/Filter.php +96 -0
  5. app/code/community/Bumble/Filter/Block/Adminhtml/Filter/.DS_Store +0 -0
  6. app/code/community/Bumble/Filter/Block/Adminhtml/Filter/Edit.php +80 -0
  7. app/code/community/Bumble/Filter/Block/Adminhtml/Filter/Edit/.DS_Store +0 -0
  8. app/code/community/Bumble/Filter/Block/Adminhtml/Filter/Edit/Form.php +26 -0
  9. app/code/community/Bumble/Filter/Block/Adminhtml/Filter/Edit/Tab/Form.php +499 -0
  10. app/code/community/Bumble/Filter/Block/Adminhtml/Filter/Edit/Tab/Meta.php +51 -0
  11. app/code/community/Bumble/Filter/Block/Adminhtml/Filter/Edit/Tab/Param.php +67 -0
  12. app/code/community/Bumble/Filter/Block/Adminhtml/Filter/Edit/Tabs.php +42 -0
  13. app/code/community/Bumble/Filter/Block/Adminhtml/Filter/Grid.php +150 -0
  14. app/code/community/Bumble/Filter/Block/Adminhtml/Group.php +103 -0
  15. app/code/community/Bumble/Filter/Block/Adminhtml/Group/Edit.php +78 -0
  16. app/code/community/Bumble/Filter/Block/Adminhtml/Group/Edit/Form.php +27 -0
  17. app/code/community/Bumble/Filter/Block/Adminhtml/Group/Edit/Tab/Form1.php +211 -0
  18. app/code/community/Bumble/Filter/Block/Adminhtml/Group/Edit/Tab/Form10.php +190 -0
  19. app/code/community/Bumble/Filter/Block/Adminhtml/Group/Edit/Tab/Form11.php +195 -0
  20. app/code/community/Bumble/Filter/Block/Adminhtml/Group/Edit/Tab/Form12.php +189 -0
  21. app/code/community/Bumble/Filter/Block/Adminhtml/Group/Edit/Tab/Form13.php +189 -0
  22. app/code/community/Bumble/Filter/Block/Adminhtml/Group/Edit/Tab/Form14.php +189 -0
  23. app/code/community/Bumble/Filter/Block/Adminhtml/Group/Edit/Tab/Form15.php +189 -0
  24. app/code/community/Bumble/Filter/Block/Adminhtml/Group/Edit/Tab/Form16.php +189 -0
  25. app/code/community/Bumble/Filter/Block/Adminhtml/Group/Edit/Tab/Form17.php +189 -0
  26. app/code/community/Bumble/Filter/Block/Adminhtml/Group/Edit/Tab/Form18.php +189 -0
  27. app/code/community/Bumble/Filter/Block/Adminhtml/Group/Edit/Tab/Form19.php +193 -0
  28. app/code/community/Bumble/Filter/Block/Adminhtml/Group/Edit/Tab/Form2.php +196 -0
  29. app/code/community/Bumble/Filter/Block/Adminhtml/Group/Edit/Tab/Form20.php +190 -0
  30. app/code/community/Bumble/Filter/Block/Adminhtml/Group/Edit/Tab/Form21.php +174 -0
  31. app/code/community/Bumble/Filter/Block/Adminhtml/Group/Edit/Tab/Form3.php +188 -0
  32. app/code/community/Bumble/Filter/Block/Adminhtml/Group/Edit/Tab/Form4.php +190 -0
  33. app/code/community/Bumble/Filter/Block/Adminhtml/Group/Edit/Tab/Form5.php +188 -0
  34. app/code/community/Bumble/Filter/Block/Adminhtml/Group/Edit/Tab/Form6.php +189 -0
  35. app/code/community/Bumble/Filter/Block/Adminhtml/Group/Edit/Tab/Form7.php +189 -0
  36. app/code/community/Bumble/Filter/Block/Adminhtml/Group/Edit/Tab/Form8.php +189 -0
  37. app/code/community/Bumble/Filter/Block/Adminhtml/Group/Edit/Tab/Form9.php +189 -0
  38. app/code/community/Bumble/Filter/Block/Adminhtml/Group/Edit/Tabs.php +544 -0
  39. app/code/community/Bumble/Filter/Block/Adminhtml/Group/Grid.php +96 -0
  40. app/code/community/Bumble/Filter/Block/Adminhtml/Renderer/Group.php +18 -0
  41. app/code/community/Bumble/Filter/Block/Adminhtml/Renderer/Image.php +20 -0
  42. app/code/community/Bumble/Filter/Block/Brandnav.php +85 -0
  43. app/code/community/Bumble/Filter/Block/Carousel.php +11 -0
  44. app/code/community/Bumble/Filter/Block/Catalog/Layer/Sale.php +166 -0
  45. app/code/community/Bumble/Filter/Block/Cmenu.php +508 -0
  46. app/code/community/Bumble/Filter/Block/Config/Adminhtml/Form/Field/Country.php +20 -0
  47. app/code/community/Bumble/Filter/Block/Config/GridShip.php +22 -0
  48. app/code/community/Bumble/Filter/Block/Config/ShippingCosts.php +39 -0
  49. app/code/community/Bumble/Filter/Block/Filter/Evidenzia.php +75 -0
  50. app/code/community/Bumble/Filter/Block/Filter/List.php +208 -0
  51. app/code/community/Bumble/Filter/Block/Filter/Productlist.php +258 -0
  52. app/code/community/Bumble/Filter/Block/Filter/Test.php +24 -0
  53. app/code/community/Bumble/Filter/Block/Filter/Toolbar.php +82 -0
  54. app/code/community/Bumble/Filter/Block/Groupmenu.php +58 -0
  55. app/code/community/Bumble/Filter/Block/Layer/Filter/Abstract.php +156 -0
  56. app/code/community/Bumble/Filter/Block/Layer/Filter/Attribute.php +47 -0
  57. app/code/community/Bumble/Filter/Block/Layer/Filter/Category.php +41 -0
  58. app/code/community/Bumble/Filter/Block/Layer/Filter/Decimal.php +57 -0
  59. app/code/community/Bumble/Filter/Block/Layer/Filter/Price.php +57 -0
  60. app/code/community/Bumble/Filter/Block/Layer/State.php +90 -0
  61. app/code/community/Bumble/Filter/Block/Layer/View.php +255 -0
  62. app/code/community/Bumble/Filter/Block/Left.php +10 -0
  63. app/code/community/Bumble/Filter/Block/List.php +140 -0
  64. app/code/community/Bumble/Filter/Block/Ourtab.php +402 -0
  65. app/code/community/Bumble/Filter/Block/Prova.php +82 -0
  66. app/code/community/Bumble/Filter/Block/Scroll.php +180 -0
  67. app/code/community/Bumble/Filter/Block/System/.DS_Store +0 -0
  68. app/code/community/Bumble/Filter/Block/System/Config/.DS_Store +0 -0
  69. app/code/community/Bumble/Filter/Block/System/Config/Form/.DS_Store +0 -0
  70. app/code/community/Bumble/Filter/Block/System/Config/Form/Field/Dev.php +20 -0
  71. app/code/community/Bumble/Filter/Block/System/Config/Form/Field/DevNames.php +22 -0
  72. app/code/community/Bumble/Filter/Block/System/Config/Form/Field/Devnames2.php +18 -0
  73. app/code/community/Bumble/Filter/Block/System/Config/Form/Field/Heading.php +43 -0
  74. app/code/community/Bumble/Filter/Block/System/Config/Form/Field/Headtitle.php +14 -0
  75. app/code/community/Bumble/Filter/Block/System/Config/Form/Field/Helpcode.php +17 -0
  76. app/code/community/Bumble/Filter/Block/System/Config/Form/Field/Information.php +19 -0
  77. app/code/community/Bumble/Filter/Block/System/Config/Form/Field/Notification.php +22 -0
  78. app/code/community/Bumble/Filter/Block/System/Config/Form/Field/Responsive1024.php +15 -0
  79. app/code/community/Bumble/Filter/Block/System/Config/Form/Field/Responsive480.php +15 -0
  80. app/code/community/Bumble/Filter/Block/System/Config/Form/Field/Responsive600.php +15 -0
  81. app/code/community/Bumble/Filter/Block/System/Config/Form/Field/Spacer.php +13 -0
  82. app/code/community/Bumble/Filter/Block/Widget/Carousel.php +173 -0
  83. app/code/community/Bumble/Filter/Block/Widget/List.php +79 -0
  84. app/code/community/Bumble/Filter/Block/Widget/Scroll.php +48 -0
  85. app/code/community/Bumble/Filter/Block/Widget/Wysiwyg.php +17 -0
  86. app/code/community/Bumble/Filter/Helper/.DS_Store +0 -0
  87. app/code/community/Bumble/Filter/Helper/Data.php +220 -0
  88. app/code/community/Bumble/Filter/Helper/Media.php +51 -0
  89. app/code/community/Bumble/Filter/Helper/Recaptcha.php +59 -0
  90. app/code/community/Bumble/Filter/Helper/Uploadhandler.php +114 -0
  91. app/code/community/Bumble/Filter/Helper/uploadedfile.php +60 -0
  92. app/code/community/Bumble/Filter/Media/Uploader.php +4 -0
  93. app/code/community/Bumble/Filter/Model/.DS_Store +0 -0
  94. app/code/community/Bumble/Filter/Model/Button.php +20 -0
  95. app/code/community/Bumble/Filter/Model/Catalog/Layer.php +17 -0
  96. app/code/community/Bumble/Filter/Model/Config.php +21 -0
  97. app/code/community/Bumble/Filter/Model/Filter.php +39 -0
  98. app/code/community/Bumble/Filter/Model/Filtergrid.php +24 -0
  99. app/code/community/Bumble/Filter/Model/Filtergridtwo.php +25 -0
  100. app/code/community/Bumble/Filter/Model/Group.php +34 -0
  101. app/code/community/Bumble/Filter/Model/Mysql4/.DS_Store +0 -0
  102. app/code/community/Bumble/Filter/Model/Mysql4/Filter.php +127 -0
  103. app/code/community/Bumble/Filter/Model/Mysql4/Filter/Collection.php +82 -0
  104. app/code/community/Bumble/Filter/Model/Mysql4/Group.php +55 -0
  105. app/code/community/Bumble/Filter/Model/Mysql4/Group/Collection.php +18 -0
  106. app/code/community/Bumble/Filter/Model/Observer.php +173 -0
  107. app/code/community/Bumble/Filter/Model/Opt.php +14 -0
  108. app/code/community/Bumble/Filter/Model/Options.php +44 -0
  109. app/code/community/Bumble/Filter/Model/Options2.php +18 -0
  110. app/code/community/Bumble/Filter/Model/Resource/.DS_Store +0 -0
  111. app/code/community/Bumble/Filter/Model/Resource/Mysql4/Setup.php +43 -0
  112. app/code/community/Bumble/Filter/Model/Source/Page.php +31 -0
  113. app/code/community/Bumble/Filter/Model/Source/Template.php +84 -0
  114. app/code/community/Bumble/Filter/Model/Source/Type.php +40 -0
  115. app/code/community/Bumble/Filter/Model/System/.DS_Store +0 -0
  116. app/code/community/Bumble/Filter/Model/System/Config/.DS_Store +0 -0
  117. app/code/community/Bumble/Filter/Model/System/Config/Backend/.DS_Store +0 -0
  118. app/code/community/Bumble/Filter/Model/System/Config/Backend/Filter/Cache.php +28 -0
  119. app/code/community/Bumble/Filter/Model/System/Config/Backend/Filter/CheckInputCategory.php +18 -0
  120. app/code/community/Bumble/Filter/Model/System/Config/Backend/Filter/CheckQty.php +13 -0
  121. app/code/community/Bumble/Filter/Model/System/Config/Backend/Filter/Checkvalue.php +14 -0
  122. app/code/community/Bumble/Filter/Model/System/Config/Source/Imagetypes.php +14 -0
  123. app/code/community/Bumble/Filter/Model/System/Config/Source/ListBrand.php +18 -0
  124. app/code/community/Bumble/Filter/Model/System/Config/Source/ListCms.php +14 -0
  125. app/code/community/Bumble/Filter/Model/System/Config/Source/ListComment.php +25 -0
  126. app/code/community/Bumble/Filter/Model/System/Config/Source/ListEvents.php +13 -0
  127. app/code/community/Bumble/Filter/Model/System/Config/Source/ListGroup.php +14 -0
  128. app/code/community/Bumble/Filter/Model/System/Config/Source/ListImagegroup.php +25 -0
  129. app/code/community/Bumble/Filter/Model/System/Config/Source/ListLayouts.php +12 -0
  130. app/code/community/Bumble/Filter/Model/System/Config/Source/ListManufacturers.php +28 -0
  131. app/code/community/Bumble/Filter/Model/System/Config/Source/ListMenu.php +20 -0
  132. app/code/community/Bumble/Filter/Model/System/Config/Source/ListMenuStyles.php +14 -0
  133. app/code/community/Bumble/Filter/Model/System/Config/Source/ListOption.php +12 -0
  134. app/code/community/Bumble/Filter/Model/System/Config/Source/ListPosition.php +20 -0
  135. app/code/community/Bumble/Filter/Model/System/Config/Source/ListSourceType.php +13 -0
  136. app/code/community/Bumble/Filter/Model/System/Config/Source/ListTheme.php +41 -0
  137. app/code/community/Bumble/Filter/Model/System/Config/Source/Listcolumns.php +48 -0
  138. app/code/community/Bumble/Filter/controllers/Adminhtml/FilterController.php +274 -0
  139. app/code/community/Bumble/Filter/controllers/Adminhtml/FiltergroupController.php +639 -0
  140. app/code/community/Bumble/Filter/controllers/FilterController.php +101 -0
  141. app/code/community/Bumble/Filter/controllers/FiltergroupController.php +101 -0
  142. app/code/community/Bumble/Filter/etc/adminhtml.xml +100 -0
  143. app/code/community/Bumble/Filter/etc/config.xml +201 -0
  144. app/code/community/Bumble/Filter/etc/system.xml +500 -0
  145. app/code/community/Bumble/Filter/etc/widget.xml +381 -0
  146. app/code/community/Bumble/Filter/sql/.DS_Store +0 -0
  147. app/code/community/Bumble/Filter/sql/bumble_filter_setup/mysql4-install-1.1.0.php +44 -0
  148. app/code/community/Bumble/Filter/sql/bumble_filter_setup/mysql4-upgrade-1.1.0-1.2.0.php +25 -0
  149. app/design/adminhtml/default/default/template/bumble_filter/filter.phtml +15 -0
  150. app/design/adminhtml/default/default/template/bumble_filter/grid.phtml +18 -0
  151. app/design/adminhtml/default/default/template/bumble_filter/group.phtml +18 -0
  152. app/design/frontend/base/default/layout/bumble_filter.xml +94 -0
  153. app/design/frontend/base/default/template/bumble/filter/.DS_Store +0 -0
  154. app/design/frontend/base/default/template/bumble/filter/block/brandnav.phtml +29 -0
  155. app/design/frontend/base/default/template/bumble/filter/block/carousel.phtml +250 -0
  156. app/design/frontend/base/default/template/bumble/filter/block/icon.phtml +10 -0
  157. app/design/frontend/base/default/template/bumble/filter/block/scroll.phtml +99 -0
  158. app/design/frontend/base/default/template/bumble/filter/brand.phtml +60 -0
  159. app/design/frontend/base/default/template/bumble/filter/brandprod.phtml +3 -0
  160. app/design/frontend/base/default/template/bumble/filter/carousel.phtml +170 -0
  161. app/design/frontend/base/default/template/bumble/filter/cmenu.phtml +61 -0
  162. app/design/frontend/base/default/template/bumble/filter/default.phtml +228 -0
  163. app/design/frontend/base/default/template/bumble/filter/filter.phtml +60 -0
  164. app/design/frontend/base/default/template/bumble/filter/grid.phtml +30 -0
  165. app/design/frontend/base/default/template/bumble/filter/groupmenu.phtml +62 -0
  166. app/design/frontend/base/default/template/bumble/filter/left.phtml +177 -0
  167. app/design/frontend/base/default/template/bumble/filter/list.phtml +31 -0
  168. app/design/frontend/base/default/template/bumble/filter/toolbar.phtml +77 -0
  169. app/design/frontend/base/default/template/page/custom.phtml +380 -0
  170. app/etc/modules/Bumble_Filter.xml +9 -0
  171. app/locale/it_IT/Bumble_Filter.csv +89 -0
  172. bumble_trasf.php +54 -0
  173. js/bumble_filter/form/scr.js +13 -0
  174. js/bumble_filter/form/script.js +13 -0
  175. js/bumble_filter/form/style.css +13 -0
  176. js/bumble_filter/jscolor/arrow.gif +0 -0
  177. js/bumble_filter/jscolor/cross.gif +0 -0
  178. js/bumble_filter/jscolor/hs.png +0 -0
  179. js/bumble_filter/jscolor/hv.png +0 -0
  180. js/bumble_filter/jscolor/jscolor.js +840 -0
  181. js/bumble_filter/jssor.slider.min.js +2 -0
  182. js/bumble_filter/slick.js +2892 -0
  183. js/bumble_filter/slick.min.js +18 -0
  184. package.xml +26 -0
  185. skin/adminhtml/default/default/images/bumble/bumble.png +0 -0
  186. skin/frontend/base/default/bumble_filter/fonts/slick.eot +0 -0
  187. skin/frontend/base/default/bumble_filter/fonts/slick.svg +14 -0
  188. skin/frontend/base/default/bumble_filter/fonts/slick.ttf +0 -0
  189. skin/frontend/base/default/bumble_filter/fonts/slick.woff +0 -0
  190. skin/frontend/base/default/bumble_filter/images/a03.png +0 -0
  191. skin/frontend/base/default/bumble_filter/images/after_shadow.png +0 -0
  192. skin/frontend/base/default/bumble_filter/images/arrow-carousel.png +0 -0
  193. skin/frontend/base/default/bumble_filter/images/arrow_carousel.png +0 -0
  194. skin/frontend/base/default/bumble_filter/images/b03.png +0 -0
  195. skin/frontend/base/default/bumble_filter/images/button-next.png +0 -0
  196. skin/frontend/base/default/bumble_filter/images/button-previous.png +0 -0
  197. skin/frontend/base/default/bumble_filter/images/freccia.png +0 -0
  198. skin/frontend/base/default/bumble_filter/images/loading.gif +0 -0
  199. skin/frontend/base/default/bumble_filter/images/menu_bg_li1.gif +0 -0
  200. skin/frontend/base/default/bumble_filter/images/menu_bg_li1.png +0 -0
  201. skin/frontend/base/default/bumble_filter/images/menu_bg_li2.gif +0 -0
  202. skin/frontend/base/default/bumble_filter/images/menu_bg_li2.png +0 -0
  203. skin/frontend/base/default/bumble_filter/images/menu_down.gif +0 -0
  204. skin/frontend/base/default/bumble_filter/images/menu_down.png +0 -0
  205. skin/frontend/base/default/bumble_filter/images/menu_up.gif +0 -0
  206. skin/frontend/base/default/bumble_filter/images/menu_up.png +0 -0
  207. skin/frontend/base/default/bumble_filter/images/next-prev.png +0 -0
  208. skin/frontend/base/default/bumble_filter/slick-theme.css +204 -0
  209. skin/frontend/base/default/bumble_filter/slick.css +117 -0
  210. skin/frontend/base/default/bumble_filter/style.css +81 -0
  211. skin/frontend/base/default/bumble_filter/widgetcarousel.css +76 -0
app/code/community/Bumble/Filter/.DS_Store ADDED
Binary file
app/code/community/Bumble/Filter/Block/.DS_Store ADDED
Binary file
app/code/community/Bumble/Filter/Block/Adminhtml/.DS_Store ADDED
Binary file
app/code/community/Bumble/Filter/Block/Adminhtml/Filter.php ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ -----------------------------------------------------------------------------*/
10
+ class Bumble_Filter_Block_Adminhtml_Filter extends Mage_Adminhtml_Block_Widget_Grid_Container {
11
+
12
+ public function __construct() {
13
+
14
+
15
+ $this->_controller = 'adminhtml_filter';
16
+ $this->_blockGroup = 'bumble_filter';
17
+ $this->_headerText = Mage::helper('bumble_filter')->__('Filters Manager');
18
+
19
+ parent::__construct();
20
+
21
+ $this->setTemplate('bumble_filter/filter.phtml');
22
+
23
+ $helper = Mage::helper('bumble_filter/data');
24
+ }
25
+ public function listAssign(){
26
+ $module = 0;
27
+ // $items = $this->getListProducts();
28
+ $menus = array();
29
+ $menus["grouptabs"] = array("link"=>$this->getUrl('*/filter/index'),"title"=>$this->__("Group Filter"));
30
+ $menus["tabs"] = array("link"=>$this->getUrl('*/*/index'),"title"=>$this->__("Filter"));
31
+
32
+ $this->assign( "menus", $menus);
33
+ $this->assign( "menu_active", "group");
34
+ $this->assign( "module", $module++);
35
+ }
36
+
37
+ public function getEffectConfig( $key ){
38
+ return $this->getConfig( $key, "effect_setting" );
39
+ }
40
+ /**
41
+ * get value of the extension's configuration
42
+ *
43
+ * @return string
44
+ */
45
+ function getConfig( $key, $panel='bumble_filter' ){
46
+ if(isset($this->_config[$key])) {
47
+ return $this->_config[$key];
48
+ } else {
49
+ return Mage::getStoreConfig("bumble_filter/$panel/$key");
50
+ }
51
+ }
52
+
53
+ protected function _prepareLayout() {
54
+
55
+ $this->setChild('add_new_button',
56
+ $this->getLayout()->createBlock('adminhtml/widget_button')
57
+ ->setData(array(
58
+ 'label' => Mage::helper('bumble_filter')->__('Add Record'),
59
+ 'onclick' => "setLocation('".$this->getUrl('*/*/add')."')",
60
+ 'class' => 'add'
61
+ ))
62
+ );
63
+
64
+
65
+ /**
66
+ * Display store switcher if system has more one store
67
+ */
68
+ //if (!Mage::app()->isSingleStoreMode()) {
69
+ // $this->setChild('store_switcher',
70
+ // $this->getLayout()->createBlock('adminhtml/store_switcher')
71
+ // ->setUseConfirm(false)
72
+ // ->setSwitchUrl($this->getUrl('*/*/*', array('store'=>null)))
73
+ // );
74
+ // }
75
+ $this->setChild('grid', $this->getLayout()->createBlock('bumble_filter/adminhtml_filter_grid', 'filter.grid'));
76
+ return parent::_prepareLayout();
77
+ }
78
+
79
+ public function getAddNewButtonHtml() {
80
+ return $this->getChildHtml('add_new_button');
81
+ }
82
+
83
+ public function getMassRewriteCatButtonHtml(){
84
+ return $this->getChildHtml('mass_rewrite_button');
85
+ }
86
+ public function getMassResizeButtonHtml(){
87
+ return $this->getChildHtml('mass_resize_button');
88
+ }
89
+ public function getGridHtml() {
90
+ return $this->getChildHtml('grid');
91
+ }
92
+
93
+ //public function getStoreSwitcherHtml() {
94
+ // return $this->getChildHtml('store_switcher');
95
+ //}
96
+ }
app/code/community/Bumble/Filter/Block/Adminhtml/Filter/.DS_Store ADDED
Binary file
app/code/community/Bumble/Filter/Block/Adminhtml/Filter/Edit.php ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ ----------------------------------------------------------------------------*/
10
+
11
+ class Bumble_Filter_Block_Adminhtml_Filter_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
12
+ {
13
+ public function __construct()
14
+ {
15
+ parent::__construct();
16
+ $id = $this->getRequest()->getParam('id');
17
+ $collection = Mage::getModel('bumble_filter/filter')->load($id);
18
+ $this->_objectId = 'id';
19
+ $this->_blockGroup = 'bumble_filter';
20
+ $this->_controller = 'adminhtml_filter';
21
+
22
+
23
+ //$this->_updateButton('delete', 'label', Mage::helper('bumble_filter')->__('Delete Record'));
24
+ $this->_removeButton('delete');
25
+ if($collection->getFilterId() != null){
26
+ //$this->_removeButton('save');
27
+ $this->_updateButton('save', 'label', Mage::helper('bumble_filter')->__('Save Changes And Go in Configuration Group'));
28
+ $this->_addButton('saveandrecord', array(
29
+ 'label' => Mage::helper('adminhtml')->__('Save Changes'),
30
+ 'onclick' => 'saveAndBackToManageGroups()',
31
+ 'class' => 'save',
32
+ ), -100);
33
+ $this->_formScripts[] = "
34
+ function saveAndBackToManageGroups(){
35
+ editForm.submit($('edit_form').action+'backto/*');
36
+ }
37
+ ";
38
+ }else{
39
+ $this->_updateButton('save', 'label', Mage::helper('bumble_filter')->__('Save And Go in Configuration Group'));
40
+ }
41
+
42
+ $this->_addButton('saveandcontinue', array(
43
+ 'label' => Mage::helper('adminhtml')->__('Save And Continue Edit'),
44
+ 'onclick' => 'saveAndContinueEdit()',
45
+ 'class' => 'save',
46
+ ), -100);
47
+
48
+ $this->_formScripts[] = "
49
+ function saveAndContinueEdit(){
50
+ editForm.submit($('edit_form').action+'back/edit/');
51
+ }
52
+ ";
53
+
54
+ }
55
+ protected function _prepareLayout() {
56
+ /**
57
+ * Display store switcher if system has more one store
58
+ */
59
+ if (!Mage::app()->isSingleStoreMode()) {
60
+ $this->setChild('store_switcher',
61
+ $this->getLayout()->createBlock('adminhtml/store_switcher')
62
+ ->setUseConfirm(false)
63
+ ->setSwitchUrl($this->getUrl('*/*/*/id/'.Mage::registry('filter_data')->getData('filter_id'), array('store'=>null)))
64
+ );
65
+ }
66
+
67
+ return parent::_prepareLayout();
68
+ }
69
+ public function getStoreSwitcherHtml() {
70
+ return $this->getChildHtml('store_switcher');
71
+ }
72
+ public function getHeaderText()
73
+ {
74
+ if( Mage::registry('filter_data')->getId() ) {
75
+ return Mage::helper('bumble_filter')->__("Edit Record '%s'", $this->htmlEscape(Mage::registry('filter_data')->getTitle()));
76
+ }else {
77
+ return Mage::helper('bumble_filter')->__("Add New Group");
78
+ }
79
+ }
80
+ }
app/code/community/Bumble/Filter/Block/Adminhtml/Filter/Edit/.DS_Store ADDED
Binary file
app/code/community/Bumble/Filter/Block/Adminhtml/Filter/Edit/Form.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ -----------------------------------------------------------------------------*/
10
+ class Bumble_Filter_Block_Adminhtml_filter_Edit_Form extends Mage_Adminhtml_Block_Widget_Form {
11
+
12
+ protected function _prepareForm() {
13
+ $form = new Varien_Data_Form(
14
+ array(
15
+ 'id' => 'edit_form',
16
+ 'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
17
+ 'method' => 'post',
18
+ 'enctype' => 'multipart/form-data'
19
+ )
20
+ );
21
+
22
+ $form->setUseContainer(true);
23
+ $this->setForm($form);
24
+ return parent::_prepareForm();
25
+ }
26
+ }
app/code/community/Bumble/Filter/Block/Adminhtml/Filter/Edit/Tab/Form.php ADDED
@@ -0,0 +1,499 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /***********************Bumble Filter**************************************/
3
+
4
+
5
+ class Bumble_Filter_Block_Adminhtml_Filter_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form
6
+ {
7
+ protected function _prepareForm()
8
+ {
9
+
10
+ $urlpa= $_SERVER['HTTP_HOST'];
11
+ $_model = Mage::registry('filter_data');
12
+ $form = new Varien_Data_Form();
13
+ $this->setForm($form);
14
+
15
+ $config = Mage::getSingleton('cms/wysiwyg_config')->getConfig(
16
+ array(
17
+ 'add_widgets' => false,
18
+ 'add_variables' => false,
19
+ 'add_images' => true,
20
+ 'encode_directibumble' => false,
21
+ 'directibumble_url' => Mage::getSingleton('adminhtml/url')->getUrl('*/cms_wysiwyg/directive'),
22
+ 'files_browser_window_url' => Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/cms_wysiwyg_images/index'),
23
+ 'files_browser_window_width' => (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_width'),
24
+ 'files_browser_window_height'=> (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_height')
25
+ )
26
+ );
27
+
28
+ $fieldset = $form->addFieldset('filter_form', array('legend'=>Mage::helper('bumble_filter')->__('General Information')));
29
+
30
+
31
+ ?>
32
+
33
+ <script>
34
+
35
+
36
+ function getComune(attri){
37
+
38
+ if(document.getElementById("extraatt").value == "") document.getElementById("subatt").style.display = "none";
39
+ else document.getElementById("subatt").style.display = "block";
40
+ if(document.getElementById("extraatt").value == "" && document.getElementById("usemanufacturer").value == "0" ) document.getElementById("category").style.display = "none";
41
+ else document.getElementById("category").style.display = "block";
42
+
43
+
44
+
45
+
46
+ var http = new XMLHttpRequest();
47
+ var url = "http://<?php echo $urlpa; ?>/bumble_trasf.php";
48
+ var params = "p="+ attri;
49
+
50
+ http.open("GET", url+"?"+params, true);
51
+ http.onreadystatechange = function()
52
+ {
53
+
54
+ if(http.readyState === 4 && http.status === 200)
55
+ {
56
+ var response = http.responseText;
57
+ var json = JSON.parse(response);
58
+
59
+
60
+ var x = document.getElementById("subatt");
61
+ while(x.hasChildNodes())
62
+ {
63
+ x.removeChild(x.firstChild);
64
+ }
65
+ for(var i=0; i<json.length;i+=1)
66
+ {
67
+ for(var j=0; j<json[i].length;j+=1)
68
+ {
69
+
70
+ var node = document.createElement("option");
71
+ node.setAttribute("value",json[i][j].value);
72
+ var textnode = document.createTextNode(json[i][j].label);
73
+ node.appendChild(textnode);
74
+ document.getElementById("subatt").appendChild(node);
75
+
76
+ }
77
+
78
+ }
79
+
80
+ }
81
+ };
82
+ http.send(null);
83
+ }
84
+
85
+ function getManu(attri){
86
+
87
+ if(document.getElementById("usemanufacturer").value == "0") document.getElementById("manufacturer").style.display = "none";
88
+ else document.getElementById("manufacturer").style.display = "block";
89
+ if(document.getElementById("usemanufacturer").value == "0" && document.getElementById("extraatt").value == "") document.getElementById("category").style.display = "none";
90
+ else document.getElementById("category").style.display = "block";
91
+ }
92
+
93
+ </script>
94
+
95
+
96
+ <?php
97
+ $url = $_SERVER["REQUEST_URI"];
98
+ $par='add';
99
+
100
+ if(strpos($url,$par)==false){//mi trovo in edit
101
+ $id=$this->getRequest()->getParam('id');
102
+ $value=Mage::getModel('bumble_filter/filter')->load($id);
103
+ $val=$value->getUsemanufacturer();
104
+ $val2=$value->getExtraatt();
105
+ $val3=$value->getSubatt();
106
+
107
+ $fieldset->addField('title', 'text', array(
108
+ 'label' => Mage::helper('bumble_filter')->__('Title'),
109
+ 'class' => 'required-entry',
110
+ 'required' => true,
111
+ 'name' => 'title',
112
+ ));
113
+
114
+ $fieldset->addField('identifier', 'text', array(
115
+ 'label' => Mage::helper('bumble_filter')->__('Identifier'),
116
+ 'name' => 'identifier',
117
+ 'id' => 'identifier',
118
+ //'value' => $_model->getLabel()
119
+ ));
120
+
121
+ $fieldset->addField('usemanufacturer' ,'select',array(
122
+ 'name' => 'usemanufacturer',
123
+ 'label' => $this->__('Manufacturer'),
124
+ 'values' => array(
125
+ array('value' => '0','label' => 'NO'),
126
+ array('value' => '1','label' => $this->__('YES'))
127
+ ),
128
+ 'onchange' => "javascript:getManu(this.value)",
129
+ ));
130
+ if($val=='1'){
131
+
132
+ $fieldset->addField('manufacturer' ,'select',array(
133
+ 'name' => 'manufacturer',
134
+ 'values' => $this->getAttributeoption(),
135
+ 'style' => 'display:block;'
136
+ ));
137
+ }
138
+ else{
139
+ $fieldset->addField('manufacturer' ,'select',array(
140
+ 'name' => 'manufacturer',
141
+ 'values' => $this->getAttributeoption(),
142
+ 'style' => 'display:none;'
143
+ ));
144
+ }
145
+
146
+
147
+ $fieldset->addField('extraatt' ,'select',array(
148
+ 'name' => 'extraatt',
149
+ 'id' => 'extraatt',
150
+ 'label' => Mage::helper('bumble_filter')->__('Exta Attribute'),
151
+ 'values' => $this->getAttributextra(),
152
+ 'onchange' => "javascript:getComune(this.value)",
153
+ ));
154
+
155
+
156
+ if($val2!=''){
157
+ if($val3=='')
158
+ {
159
+ $vettore=array();
160
+ $vettore[]=array('value'=>'','label'=> $this->__('Select Extra Attribute'));
161
+ $subatt=$this->getAttri();
162
+ foreach($subatt as $s){
163
+ $vettore[]=array('value'=>$s['value'],'label'=>$s['label']);
164
+ }
165
+ $fieldset->addField('subatt' ,'select',array(
166
+ 'name' => 'subatt',
167
+ 'class' => 'subextra',
168
+ 'values' => $vettore,
169
+ 'style' => 'display:block;',
170
+ ));
171
+ }
172
+ else{
173
+ $fieldset->addField('subatt' ,'select',array(
174
+ 'name' => 'subatt',
175
+ 'class' => 'subextra',
176
+ 'values' => $this->getAttri(),
177
+ 'style' => 'display:block;',
178
+ ));
179
+ }
180
+ }
181
+ else{
182
+ $fieldset->addField('subatt' ,'select',array(
183
+ 'name' => 'subatt',
184
+ 'class' => 'subextra',
185
+ 'values' => '',
186
+ 'style' => 'display:none;',
187
+ ));
188
+ }
189
+
190
+
191
+
192
+ if($val=='1'|| $val2!=null){
193
+ $fieldset->addField('category' ,'select',array(
194
+ 'name' => 'category',
195
+ 'values' => $this->getCat(),
196
+ 'style' => 'display:block;',
197
+ ));
198
+ }
199
+
200
+ }
201
+
202
+ else{ //mi trovo in add
203
+
204
+ $fieldset->addField('title', 'text', array(
205
+ 'label' => Mage::helper('bumble_filter')->__('Title'),
206
+ 'class' => 'required-entry',
207
+ 'required' => true,
208
+ 'name' => 'title',
209
+ ));
210
+
211
+ $fieldset->addField('identifier', 'text', array(
212
+ 'label' => Mage::helper('bumble_filter')->__('Identifier'),
213
+ 'name' => 'identifier',
214
+ 'id' => 'identifier',
215
+ //'value' => $_model->getLabel()
216
+ ));
217
+
218
+ $fieldset->addField('usemanufacturer' ,'select',array(
219
+ 'name' => 'usemanufacturer',
220
+ 'label' => $this->__('Manufacturer'),
221
+ 'values' => array(
222
+ array('value' => '0','label' => 'NO'),
223
+ array('value' => '1','label' => $this->__('YES'))
224
+ ),
225
+ 'onchange' => "javascript:getManu(this.value)",
226
+ ));
227
+
228
+
229
+ $fieldset->addField('manufacturer' ,'select',array(
230
+ 'name' => 'manufacturer',
231
+ 'values' => $this->getAttributeoption(),
232
+ 'style' => 'display:none;'
233
+ ));
234
+
235
+
236
+ $fieldset->addField('extraatt' ,'select',array(
237
+ 'name' => 'extraatt',
238
+ 'id' => 'extraatt',
239
+ 'label' => Mage::helper('bumble_filter')->__('Exta Attribute'),
240
+ 'values' => $this->getAttributextra(),
241
+ 'onchange' => "javascript:getComune(this.value)",
242
+ ));
243
+
244
+
245
+ $fieldset->addField('subatt' ,'select',array(
246
+ 'name' => 'subatt',
247
+ 'class' => 'subextra',
248
+ 'values' => '',
249
+ 'style' => 'display:none;',
250
+
251
+ ));
252
+
253
+ $fieldset->addField('category' ,'select',array(
254
+ 'name' => 'category',
255
+ 'values' => $this->getCat(),
256
+ 'style' => 'display:none;',
257
+ ));
258
+
259
+ }
260
+
261
+
262
+
263
+
264
+ $config->setData(Mage::helper('bumble_filter')->recursiveReplace(
265
+ '/bumble_filter/',
266
+ '/'.(string)Mage::app()->getConfig()->getNode('admin/routers/adminhtml/args/frontName').'/',
267
+ $config->getData()
268
+ )
269
+ );
270
+
271
+ $fieldset->addField('is_active', 'select', array(
272
+ 'label' => Mage::helper('bumble_filter')->__('Is Active'),
273
+ 'name' => 'is_active',
274
+ 'values' => Mage::getSingleton('adminhtml/system_config_source_yesno')->toOptionArray(),
275
+ //'value' => $_model->getIsActive()
276
+ ));
277
+
278
+ if (!Mage::app()->isSingleStoreMode()) {
279
+ $fieldset->addField('store_id', 'multiselect', array(
280
+ 'name' => 'stores[]',
281
+ 'label' => Mage::helper('bumble_filter')->__('Store View'),
282
+ 'title' => Mage::helper('bumble_filter')->__('Store View'),
283
+ 'required' => true,
284
+ 'values' => Mage::getSingleton('adminhtml/system_store')
285
+ ->getStoreValuesForForm(false, true),
286
+ ));
287
+ }
288
+ else {
289
+ $fieldset->addField('store_id', 'hidden', array(
290
+ 'name' => 'stores[]',
291
+ 'value' => Mage::app()->getStore(true)->getId()
292
+ ));
293
+ }
294
+
295
+
296
+ if ( Mage::getSingleton('adminhtml/session')->getFilterData() )
297
+ {
298
+ $form->setValues(Mage::getSingleton('adminhtml/session')->getFilterData());
299
+ Mage::getSingleton('adminhtml/session')->getFilterData(null);
300
+ } elseif ( Mage::registry('filter_data') ) {
301
+ $form->setValues(Mage::registry('filter_data')->getData());
302
+ }
303
+
304
+
305
+ return parent::_prepareForm();
306
+ }
307
+
308
+ public function getProductList()
309
+ {
310
+ $products = Mage::getModel('catalog/product')->getCollection();
311
+
312
+ return $products;
313
+ }
314
+
315
+ public function getManFilter(){
316
+
317
+ $br= array();
318
+ $filterselected = Mage::getModel('bumble_filter/filter')->getCollection();
319
+
320
+ foreach ($filterselected as $filter) {
321
+
322
+ $br[] = $filter->getManufacturer();
323
+ }
324
+ return $br;
325
+ }
326
+
327
+ public function getAttri(){
328
+
329
+ $url = $_SERVER["REQUEST_URI"];
330
+ $par='add';
331
+ $id=$this->getRequest()->getParam('id');
332
+ $value=Mage::getModel('bumble_filter/filter')->load($id);
333
+ $val=$value->getUsemanufacturer();
334
+ $val2=$value->getExtraatt();
335
+ $val3=$value->getSubatt();
336
+ $subatt=array();
337
+ $product = Mage::getModel('catalog/product');
338
+ $attributes = Mage::getResourceModel('eav/entity_attribute_collection')
339
+ ->setEntityTypeFilter($product->getResource()->getTypeId())
340
+ ->addFieldToFilter('attribute_code', $val2); //can be changed to any attribute
341
+ $attribute = $attributes->getFirstItem()->setEntity($product->getResource());
342
+ $options = $attribute->getSource()->getAllOptions(false);
343
+ foreach($options as $option){
344
+ $collection=$product->getCollection();
345
+ $collection->addFieldToFilter(array(
346
+ array('attribute'=>$val2,'eq'=>$option['value']),
347
+
348
+ ));
349
+ if($option['value']==$val3&&$option['value']!=''){
350
+ $subatt[]=array('value'=>$option['value'],'label'=>$option['label']);
351
+ }
352
+ }
353
+ foreach($options as $option){
354
+ $collection=$product->getCollection();
355
+ $collection->addFieldToFilter(array(
356
+ array('attribute'=>$val2,'eq'=>$option['value']),
357
+
358
+ ));
359
+ if((count($collection->getData()) >0) && $option['value']!=$val3) {
360
+ $subatt[]=array('value'=>$option['value'],'label'=>$option['label']);
361
+ }
362
+ }
363
+ return $subatt;
364
+
365
+ }
366
+
367
+
368
+ public function getAttributeoption() {
369
+ $option = array();
370
+ $option[] = array( 'value' => "all",
371
+ 'label' => $this->__('All'));
372
+ $br=$this->getManFilter();
373
+ $product = Mage::getModel('catalog/product');
374
+ $attributes = Mage::getResourceModel('eav/entity_attribute_collection')
375
+ ->setEntityTypeFilter($product->getResource()->getTypeId())
376
+ ->addFieldToFilter('attribute_code', 'manufacturer'); //can be changed to any attribute
377
+ $attribute = $attributes->getFirstItem()->setEntity($product->getResource());
378
+ $manufacturers = $attribute->getSource()->getAllOptions(false);
379
+ if(count($br)==0)
380
+ {
381
+ foreach($manufacturers as $man){
382
+ $collection=$product = Mage::getModel('catalog/product')->getCollection();
383
+ $collection->addFieldToFilter(array(
384
+ array('attribute'=>'manufacturer','eq'=>$man['value']),
385
+
386
+ ));
387
+ if((count($collection->getData()) >0)){
388
+ $option[]= array('value' => $man['value'], 'label'=> $man['label']);
389
+ }
390
+ }
391
+ }
392
+ else{
393
+ $url = $_SERVER["REQUEST_URI"];
394
+ $par='add';
395
+ if(strpos($url,$par)==false){//mi trovo in edit
396
+ foreach($manufacturers as $man){
397
+ $collection=$product = Mage::getModel('catalog/product')->getCollection();
398
+ $collection->addFieldToFilter(array(
399
+ array('attribute'=>'manufacturer','eq'=>$man['value']),
400
+
401
+ ));
402
+ if((count($collection->getData()) >0)){
403
+ $option[]= array('value' => $man['value'], 'label'=> $man['label']);
404
+ }
405
+ }
406
+ }
407
+ else{//mi trovo in add
408
+
409
+ foreach($manufacturers as $man){
410
+ $collection=$product = Mage::getModel('catalog/product')->getCollection();
411
+ $collection->addFieldToFilter(array(
412
+ array('attribute'=>'manufacturer','eq'=>$man['value']),
413
+
414
+ ));
415
+ if((count($collection->getData()) >0)&& !in_array($man['value'],$br)) {
416
+ $option[]= array('value' => $man['value'], 'label'=> $man['label']);
417
+ }
418
+ }
419
+
420
+
421
+ }
422
+
423
+ }
424
+
425
+ return $option;
426
+
427
+
428
+ }
429
+
430
+
431
+
432
+ public function getAttributextra() {
433
+
434
+ $option = array();
435
+ $option[] = array( 'value' => "",
436
+ 'label' => $this->__('Select Extra Attribute'));
437
+ $attributes = Mage::getResourceModel('catalog/product_attribute_collection')
438
+ ->getItems();
439
+
440
+ foreach ($attributes as $attribute){
441
+ if ($attribute->getIsUserDefined()&&$attribute->getAttributeCode()!="manufacturer"&&$attribute->getAttributeCode()!="evidenzia"&&$attribute->usesSource())//&&$attribute->getValue()!='No'))
442
+ {
443
+ $collection = Mage::getModel('catalog/product')->getCollection()
444
+ ->addAttributeToSelect($attribute->getAttributeCode())
445
+ ->addAttributeToFilter(
446
+ array
447
+ (
448
+ array
449
+ (
450
+ 'attribute' => $attribute->getAttributeCode(),
451
+ 'notnull' => true
452
+ ),
453
+ array
454
+ (
455
+ 'attribute' => $attribute->getAttributeCode(),
456
+ 'nin' => array('N/A', '', ' ')
457
+ )
458
+ )
459
+ );
460
+ if((count($collection->getData()) >0))
461
+ {
462
+ $keys = ucwords($attribute->getAttributecode());
463
+ $key = $attribute->getAttributecode();
464
+
465
+ $option[] = array( 'value' => $key,
466
+ 'label' => $keys );
467
+ }
468
+ }
469
+
470
+ }
471
+
472
+ return $option;
473
+
474
+ }
475
+
476
+
477
+
478
+
479
+
480
+ public function getCat(){
481
+
482
+ $option = array();
483
+ $option[] = array( 'value' => "",
484
+ 'label' => $this->__('Select Category'));
485
+ $categories = Mage::getModel('catalog/category')
486
+ ->getCollection()
487
+ ->addIsActiveFilter();
488
+ foreach($categories as $cat){
489
+ $c=Mage::getModel('catalog/category')->load($cat->getId());
490
+ if($c->getLevel()!=1 && $c->getProductCount()>0){
491
+ $option[] = array( 'value' => $c->getId(),
492
+ 'label' => $c->getName() );
493
+ }
494
+ }
495
+ return $option;
496
+
497
+ }
498
+
499
+ }
app/code/community/Bumble/Filter/Block/Adminhtml/Filter/Edit/Tab/Meta.php ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ ---------------------------------------------------------------------------*/
10
+ class Bumble_Filter_Block_Adminhtml_Filter_Edit_Tab_Meta extends Mage_Adminhtml_Block_Widget_Form
11
+ {
12
+ protected function _prepareForm()
13
+ {
14
+ $_model = Mage::registry('filter_data');
15
+ $form = new Varien_Data_Form();
16
+ $this->setForm($form);
17
+
18
+ $fieldset = $form->addFieldset('category_meta', array('legend'=>Mage::helper('bumble_filter')->__('Meta Information')));
19
+
20
+
21
+ $fieldset->addField('meta_keywords', 'editor', array(
22
+ 'label' => Mage::helper('bumble_filter')->__('Meta Keywords'),
23
+ 'class' => '',
24
+ 'required' => false,
25
+ 'name' => 'meta_keywords',
26
+ 'style' => 'width:600px;height:100px;',
27
+ 'wysiwyg' => false
28
+ ));
29
+ $fieldset->addField('meta_description', 'editor', array(
30
+ 'label' => Mage::helper('bumble_filter')->__('Meta Description'),
31
+ 'class' => '',
32
+ 'required' => false,
33
+ 'name' => 'meta_description',
34
+ 'style' => 'width:600px;height:100px;',
35
+ 'wysiwyg' => false
36
+ ));
37
+
38
+
39
+ if ( Mage::getSingleton('adminhtml/session')->getFilterData() )
40
+ {
41
+ $form->setValues(Mage::getSingleton('adminhtml/session')->getFilterData());
42
+ Mage::getSingleton('adminhtml/session')->getFilterData(null);
43
+ } elseif ( Mage::registry('filter_data') ) {
44
+ $form->setValues(Mage::registry('filter_data')->getData());
45
+ }
46
+
47
+ return parent::_prepareForm();
48
+ }
49
+
50
+
51
+ }
app/code/community/Bumble/Filter/Block/Adminhtml/Filter/Edit/Tab/Param.php ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ --------------------------------------------------------------------------*/
10
+
11
+ class Bumble_Filter_Block_Adminhtml_Category_Edit_Tab_Param extends Mage_Adminhtml_Block_Widget_Form
12
+ {
13
+ protected function _prepareForm()
14
+ {
15
+ $_model = Mage::registry('category_data');
16
+ $form = new Varien_Data_Form();
17
+ $this->setForm($form);
18
+
19
+ $fieldset = $form->addFieldset('category_params', array('legend'=>Mage::helper('bumble_filter')->__('Parameter')));
20
+
21
+ $fieldset->addField('template', 'select', array(
22
+ 'label' => Mage::helper('bumble_filter')->__('Template'),
23
+ 'name' => 'param[template]',
24
+ 'values' => array( 0=> $this->__("No"), 1=> $this->__("Yes") )
25
+ ));
26
+
27
+ $fieldset->addField('show_childrent', 'select', array(
28
+ 'label' => Mage::helper('bumble_filter')->__('Show Childrent'),
29
+ 'name' => 'param[show_childrent]',
30
+ 'values' => array( 0=> $this->__("No"), 1=> $this->__("Yes") )
31
+ ));
32
+
33
+ $fieldset->addField('primary_cols', 'text', array(
34
+ 'label' => Mage::helper('bumble_filter')->__('Show Childrent'),
35
+ 'name' => 'param[primary_cols]',
36
+ 'default' => '2'
37
+ ));
38
+
39
+
40
+ if ( Mage::getSingleton('adminhtml/session')->getCategoryData() )
41
+ {
42
+ $form->setValues(Mage::getSingleton('adminhtml/session')->getCategoryData());
43
+ Mage::getSingleton('adminhtml/session')->getCategoryData(null);
44
+ } elseif ( Mage::registry('category_data') ) {
45
+ $form->setValues(Mage::registry('category_data')->getData());
46
+ }
47
+
48
+ return parent::_prepareForm();
49
+ }
50
+
51
+ public function getParentToOptionArray() {
52
+ $catCollection = Mage::getModel('bumble_filter/category')
53
+ ->getCollection();
54
+ $id = Mage::registry('category_data')->getId();
55
+ if($id) {
56
+ $catCollection->addFieldToFilter('category_id', array('neq' => $id));
57
+ }
58
+ $option = array();
59
+ $option[] = array( 'value' => 0,
60
+ 'label' => 'Top Level');
61
+ foreach($catCollection as $cat) {
62
+ $option[] = array( 'value' => $cat->getId(),
63
+ 'label' => $cat->getTitle() );
64
+ }
65
+ return $option;
66
+ }
67
+ }
app/code/community/Bumble/Filter/Block/Adminhtml/Filter/Edit/Tabs.php ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ --------------------------------------------------------------------------*/
10
+ class Bumble_Filter_Block_Adminhtml_Filter_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
11
+ {
12
+
13
+ public function __construct()
14
+ {
15
+ parent::__construct();
16
+ $this->setId('filter_form');
17
+ $this->setDestElementId('edit_form');
18
+ $this->setTitle(Mage::helper('bumble_filter')->__('Group Information'));
19
+ }
20
+
21
+ protected function _beforeToHtml()
22
+ {
23
+ $this->addTab('form_section', array(
24
+ 'label' => Mage::helper('bumble_filter')->__('General Information'),
25
+ 'title' => Mage::helper('bumble_filter')->__('General Information'),
26
+ 'content' => $this->getLayout()->createBlock('bumble_filter/adminhtml_filter_edit_tab_form')->toHtml(),
27
+ ));
28
+ $this->addTab('form_section_seo', array(
29
+ 'label' => Mage::helper('bumble_filter')->__('SEO'),
30
+ 'title' => Mage::helper('bumble_filter')->__('SEO'),
31
+ 'content' => $this->getLayout()->createBlock('bumble_filter/adminhtml_filter_edit_tab_meta')->toHtml(),
32
+ ));
33
+ /*
34
+ $this->addTab('form_section_params', array(
35
+ 'label' => Mage::helper('bumble_filter')->__('Parameters'),
36
+ 'title' => Mage::helper('bumble_filter')->__('Parameters'),
37
+ 'content' => $this->getLayout()->createBlock('bumble_filter/adminhtml_filter_edit_tab_param')->toHtml(),
38
+ ));
39
+ */
40
+ return parent::_beforeToHtml();
41
+ }
42
+ }
app/code/community/Bumble/Filter/Block/Adminhtml/Filter/Grid.php ADDED
@@ -0,0 +1,150 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ ---------------------------------------------------------------------------*/
10
+ class Bumble_Filter_Block_Adminhtml_Filter_Grid extends Mage_Adminhtml_Block_Widget_Grid
11
+ {
12
+ public function __construct() {
13
+
14
+ parent::__construct();
15
+
16
+
17
+ $this->setId('filter');
18
+ $this->setDefaultSort('date_from');
19
+ $this->setDefaultDir('DESC');
20
+ $this->setSaveParametersInSession(true);
21
+
22
+ }
23
+
24
+ // protected function _getStore() {
25
+ // $storeId = (int) $this->getRequest()->getParam('store', 0);
26
+ // return Mage::app()->getStore($storeId);
27
+ // }
28
+
29
+ protected function _prepareCollection() {
30
+ $collection = Mage::getModel('bumble_filter/filter')->getCollection();
31
+ //$store = $this->_getStore();
32
+ //if ($store->getId()) {
33
+ // $collection->addStoreFilter($store);
34
+ // }
35
+
36
+ $this->setCollection($collection);
37
+ return parent::_prepareCollection();
38
+ }
39
+
40
+
41
+ protected function _prepareColumns() {
42
+
43
+ $this->addColumn('filter_id', array(
44
+ 'header' => Mage::helper('bumble_filter')->__('ID'),
45
+ 'align' =>'center',
46
+ 'width' => '50px',
47
+ 'index' => 'filter_id',
48
+ ));
49
+
50
+ if (!Mage::app()->isSingleStoreMode()) {
51
+ $this->addColumn('store_id',
52
+ array (
53
+ 'header' => Mage::helper('cms')->__('Store view'),
54
+ 'index' => 'store_id',
55
+ 'type' => 'store',
56
+ 'store_all' => true,
57
+ 'store_view' => true,
58
+ 'sortable' => false,
59
+ 'filter_condition_callback' => array (
60
+ $this,
61
+ '_filterStoreCondition' ) ));
62
+ }
63
+
64
+ $this->addColumn('title', array(
65
+ 'header' => Mage::helper('bumble_filter')->__('Title'),
66
+ 'align' =>'left',
67
+ 'index' => 'title',
68
+ ));
69
+ $this->addColumn('identifier', array(
70
+ 'header' => Mage::helper('bumble_filter')->__('Identifier'),
71
+ 'align' =>'left',
72
+ 'index' => 'identifier',
73
+ ));
74
+
75
+
76
+
77
+ $this->addColumn('is_active', array(
78
+ 'header' => Mage::helper('bumble_filter')->__('Status'),
79
+ 'align' => 'left',
80
+ 'width' => '80px',
81
+ 'index' => 'is_active',
82
+ 'type' => 'options',
83
+ 'options' => array(
84
+ 1 => Mage::helper('bumble_filter')->__('Enabled'),
85
+ 0 => Mage::helper('bumble_filter')->__('Disabled'),
86
+ ),
87
+ ));
88
+
89
+ return parent::_prepareColumns();
90
+ }
91
+ /**
92
+ * Helper function to do after load modifications
93
+ *
94
+ */
95
+ protected function _afterLoadCollection()
96
+ {
97
+ $this->getCollection()->walk('afterLoad');
98
+ parent::_afterLoadCollection();
99
+ }
100
+ /**
101
+ * Helper function to add store filter condition
102
+ *
103
+ * @param Mage_Core_Model_Mysql4_Collection_Abstract $collection Data collection
104
+ * @param Mage_Adminhtml_Block_Widget_Grid_Column $column Column information to be filtered
105
+ */
106
+ protected function _filterStoreCondition($collection, $column)
107
+ {
108
+ if (!$value = $column->getFilter()->getValue()) {
109
+ return;
110
+ }
111
+
112
+ $this->getCollection()->addStoreFilter($value);
113
+ }
114
+
115
+ protected function _prepareMassaction() {
116
+ $this->setMassactionIdField('filter_id');
117
+ $this->getMassactionBlock()->setFormFieldName('filter');
118
+
119
+ $this->getMassactionBlock()->addItem('delete', array(
120
+ 'label' => Mage::helper('bumble_filter')->__('Delete'),
121
+ 'url' => $this->getUrl('*/*/massDelete'),
122
+ 'confirm' => Mage::helper('bumble_filter')->__('Are you sure?')
123
+ ));
124
+
125
+ $statuses = array(
126
+ 1 => Mage::helper('bumble_filter')->__('Enabled'),
127
+ 2 => Mage::helper('bumble_filter')->__('Disabled')
128
+ );
129
+ array_unshift($statuses, array('label'=>'', 'value'=>''));
130
+ $this->getMassactionBlock()->addItem('status', array(
131
+ 'label'=> Mage::helper('bumble_filter')->__('Change status'),
132
+ 'url' => $this->getUrl('*/*/massStatus', array('_current'=>true)),
133
+ 'additional' => array(
134
+ 'visibility' => array(
135
+ 'name' => 'status',
136
+ 'type' => 'select',
137
+ 'class' => 'required-entry',
138
+ 'label' => Mage::helper('bumble_filter')->__('Status'),
139
+ 'values' => $statuses
140
+ )
141
+ )
142
+ ));
143
+ return $this;
144
+ }
145
+
146
+ public function getRowUrl($row) {
147
+ return $this->getUrl('*/*/edit', array('id' => $row->getId()));
148
+ }
149
+
150
+ }
app/code/community/Bumble/Filter/Block/Adminhtml/Group.php ADDED
@@ -0,0 +1,103 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ ---------------------------------------------------------------------------*/
10
+ class Bumble_Filter_Block_Adminhtml_Group extends Mage_Adminhtml_Block_Widget_Form_Container {
11
+
12
+ public function __construct() {
13
+
14
+ $this->_controller = 'adminhtml_group';
15
+ $this->_blockGroup = 'bumble_filter';
16
+ $this->_headerText = Mage::helper('bumble_filter')->__('Filter Manager');
17
+
18
+ parent::__construct();
19
+ $this->setTemplate('bumble_filter/group.phtml');
20
+ $helper = Mage::helper('bumble_filter/data');
21
+ /*End init meida files*/
22
+ $mediaHelper = Mage::helper('bumble_filter/media');
23
+ }
24
+
25
+ public function listAssign(){
26
+ $module = 0;
27
+ // $items = $this->getListProducts();
28
+ $menus = array();
29
+ $menus["grouptabs"] = array("link"=>$this->getUrl('*/group/index'),"title"=>$this->__("Group Filter"));
30
+ $menus["tabs"] = array("link"=>$this->getUrl('*/*/index'),"title"=>$this->__("Filter"));
31
+
32
+ $this->assign( "menus", $menus);
33
+ $this->assign( "menu_active", "group");
34
+ $this->assign( "module", $module++);
35
+ }
36
+
37
+ public function getEffectConfig( $key ){
38
+ return $this->getConfig( $key, "effect_setting" );
39
+ }
40
+ /**
41
+ * get value of the extension's configuration
42
+ *
43
+ * @return string
44
+ */
45
+ function getConfig( $key, $panel='bumble_filter' ){
46
+ if(isset($this->_config[$key])) {
47
+ return $this->_config[$key];
48
+ } else {
49
+ return Mage::getStoreConfig("bumble_filter/$panel/$key");
50
+ }
51
+ }
52
+
53
+ protected function _prepareLayout() {
54
+
55
+ $this->setChild('add_new_button',
56
+ $this->getLayout()->createBlock('adminhtml/widget_button')
57
+ ->setData(array(
58
+ 'label' => Mage::helper('bumble_filter')->__('Add Record'),
59
+ 'onclick' => "setLocation('".$this->getUrl('*/*/add')."')",
60
+ 'class' => 'add'
61
+ ))
62
+ );
63
+ $this->setChild('mass_rewrite_button',
64
+ $this->getLayout()->createBlock('adminhtml/widget_button')
65
+ ->setData(array(
66
+ 'label' => Mage::helper('bumble_filter')->__('Mass Generate Rewrite URLs'),
67
+ 'onclick' => "setLocation('".$this->getUrl('*/*/massRewrite')."')",
68
+ 'class' => 'mass'
69
+ ))
70
+ );
71
+ $this->setChild('mass_resize_button',
72
+ $this->getLayout()->createBlock('adminhtml/widget_button')
73
+ ->setData(array(
74
+ 'label' => Mage::helper('bumble_filter')->__('Mass Resize Logo'),
75
+ 'onclick' => "setLocation('".$this->getUrl('*/*/massResize')."')",
76
+ 'class' => 'mass'
77
+ ))
78
+ );
79
+ $this->setChild('grid', $this->getLayout()->createBlock('bumble_filter/adminhtml_group_grid', 'group.grid'));
80
+ return parent::_prepareLayout();
81
+ }
82
+
83
+
84
+ public function getMassRewriteCatButtonHtml(){
85
+ return $this->getChildHtml('mass_rewrite_button');
86
+ }
87
+ public function getMassResizeButtonHtml(){
88
+ return $this->getChildHtml('mass_resize_button');
89
+ }
90
+ public function getAddNewButtonHtml() {
91
+ return $this->getChildHtml('add_new_button');
92
+ }
93
+ public function getGridHtml() {
94
+ return $this->getChildHtml('grid');
95
+ }
96
+ //public function getStoreSwitcherHtml() {
97
+ // return $this->getChildHtml('store_switcher');
98
+ //}
99
+ }
100
+
101
+
102
+
103
+
app/code/community/Bumble/Filter/Block/Adminhtml/Group/Edit.php ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ ---------------------------------------------------------------------------*/
10
+ class Bumble_Filter_Block_Adminhtml_Group_Edit extends Mage_Adminhtml_Block_Widget_Form_Container {
11
+
12
+ public function __construct() {
13
+ $url = $_SERVER["REQUEST_URI"];
14
+ $route =strtok($_SERVER["REQUEST_URI"],'?');
15
+ parent::__construct();
16
+
17
+ $this->_objectId = 'id';
18
+ $this->_blockGroup = 'bumble_filter';
19
+ $this->_controller = 'adminhtml_group';
20
+
21
+ $this->_updateButton('save', 'label', Mage::helper('bumble_filter')->__('Save Group'));
22
+ //$this->_updateButton('delete', 'label', Mage::helper('bumble_filter')->__('Delete Record'));
23
+ $this->_removeButton('delete');
24
+
25
+ $this->_addButton('saveandcontinue', array(
26
+ 'label' => Mage::helper('adminhtml')->__('Save And Continue Edit'),
27
+ 'onclick' => 'saveAndContinueEdit()',
28
+ 'class' => 'save',
29
+ ), -100);
30
+
31
+
32
+ $this->_formScripts[] = "
33
+ function saveAndContinueEdit(){
34
+ editForm.submit($('edit_form').action+'back/*');
35
+ }
36
+
37
+ ";
38
+ $this->_formScripts[] = "
39
+ function PrevSave(){
40
+ editForm.submit($('edit_form').action+'Prev/*');
41
+ }
42
+
43
+ ";
44
+ $this->_formScripts[] = "
45
+ function NextSave(){
46
+ editForm.submit($('edit_form').action+'Next/*');
47
+ }
48
+
49
+ ";
50
+
51
+
52
+
53
+
54
+ }
55
+
56
+ protected function _prepareLayout() {
57
+ /**
58
+ * Display store switcher if system has more one store
59
+ */
60
+ if (!Mage::app()->isSingleStoreMode()) {
61
+ $this->setChild('store_switcher',
62
+ $this->getLayout()->createBlock('adminhtml/store_switcher')
63
+ ->setUseConfirm(false)
64
+ ->setSwitchUrl($this->getUrl('*/*/*/id/'.Mage::registry('group_data')->get('group_id'), array('store'=>null)))
65
+ );
66
+ }
67
+
68
+ return parent::_prepareLayout();
69
+ }
70
+ public function getStoreSwitcherHtml() {
71
+ return $this->getChildHtml('store_switcher');
72
+ }
73
+ public function getHeaderText()
74
+ {
75
+ return Mage::helper('bumble_filter')->__("Configuration Group");
76
+
77
+ }
78
+ }
app/code/community/Bumble/Filter/Block/Adminhtml/Group/Edit/Form.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ ---------------------------------------------------------------------------*/
10
+ class Bumble_Filter_Block_Adminhtml_Group_Edit_Form extends Mage_Adminhtml_Block_Widget_Form {
11
+
12
+ protected function _prepareForm() {
13
+ $form = new Varien_Data_Form(
14
+ array(
15
+ 'id' => 'edit_form',
16
+ 'action' => $this->getUrl('*/*/savegroup', array('id' => $this->getRequest()->getParam('id'))),
17
+ 'method' => 'post',
18
+ 'enctype' => 'multipart/form-data',
19
+ 'name' => 'nav'
20
+ )
21
+ );
22
+
23
+ $form->setUseContainer(true);
24
+ $this->setForm($form);
25
+ return parent::_prepareForm();
26
+ }
27
+ }
app/code/community/Bumble/Filter/Block/Adminhtml/Group/Edit/Tab/Form1.php ADDED
@@ -0,0 +1,211 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ ---------------------------------------------------------------------------*/
10
+
11
+ class Bumble_Filter_Block_Adminhtml_Group_Edit_Tab_Form1 extends Mage_Adminhtml_Block_Widget_Form
12
+ {
13
+
14
+ public function getNum()
15
+ {
16
+ $ob = $this->getRequest()->getParam('id');
17
+
18
+ $br = Mage::getModel('bumble_filter/filter')->load($ob);
19
+ $filtertype= $br->getManufacturer();
20
+ $use= $br->getUsemanufacturer();
21
+
22
+ $resource = Mage::getSingleton('core/resource');
23
+ $readConnection = $resource->getConnection('core_read');
24
+
25
+ $query = "SELECT `group_id` FROM bumble_filter_group WHERE `filter_id`= '$ob'";
26
+
27
+
28
+ $braresults = $readConnection->fetchAll($query);
29
+ $bra_id = $braresults[0]['group_id'];
30
+
31
+ $gro = Mage::getModel('bumble_filter/group')->load($bra_id);
32
+
33
+
34
+ if($use == 1)
35
+ {
36
+ if($filtertype == 'all')
37
+ {
38
+ $num = array();
39
+ $attribute = Mage::getModel('eav/config')->getAttribute('catalog_product', 'manufacturer');
40
+
41
+ foreach ( $attribute->getSource()->getAllOptions(true, true) as $option)
42
+ {
43
+ if($option['label'] != "")
44
+ {
45
+ $num[]= $option['label'];
46
+ }
47
+ }
48
+
49
+ }
50
+ else
51
+ {
52
+
53
+
54
+ $attr = Mage::getModel('catalog/resource_eav_attribute')->load(81);
55
+
56
+ $label = $attr->getSource()->getOptionText($filtertype);
57
+ $label = str_replace("'", "", $label);
58
+ $num=array();
59
+
60
+ $num[] = $label;// 2 array
61
+ }
62
+ }else{
63
+ $ob = $this->getRequest()->getParam('id');
64
+
65
+ $br = Mage::getModel('bumble_filter/filter')->load($ob);
66
+
67
+ $num = $br->getTitle();
68
+ }
69
+
70
+ return $num;
71
+ }
72
+
73
+ public function ciao()
74
+ {
75
+
76
+ $page = $this->getRequest()->getParam('page') ;
77
+
78
+
79
+ return $page;
80
+ }
81
+
82
+ protected function _prepareForm()
83
+ {
84
+ $page= $this->ciao();
85
+
86
+ if($page == null){
87
+ $page=1;
88
+ }else{
89
+ $page=$page;
90
+ }
91
+ $num = $this->getNum();
92
+ #var_dump($page);
93
+ $tabs= $this->getRequest()->getParam('id');
94
+
95
+ $resource = Mage::getSingleton('core/resource');
96
+ $readConnection = $resource->getConnection('core_read');
97
+
98
+ $query = "SELECT `group_id` FROM bumble_filter_group WHERE `filter_id`= '$tabs' AND `page`= '$page'";
99
+
100
+ $results = $readConnection->fetchAll($query);
101
+
102
+ /* get the results */
103
+
104
+ if($page > 1)
105
+ {
106
+ $resPage= (20 * $page)-20;
107
+ }
108
+ else{
109
+ $resPage = 0;
110
+ }
111
+
112
+ $var = 0+$resPage;
113
+
114
+ /* get the results */
115
+ $group_id = $results[0]['group_id'];
116
+
117
+
118
+
119
+
120
+
121
+
122
+ $url = $_SERVER["REQUEST_URI"];
123
+ $_model = Mage::registry('group_data');
124
+ $form = new Varien_Data_Form();
125
+ $this->setForm($form);
126
+
127
+ $config = Mage::getSingleton('cms/wysiwyg_config')->getConfig(
128
+ array(
129
+ 'add_widgets' => false,
130
+ 'add_variables' => false,
131
+ 'add_images' => true,
132
+ 'encode_directibumble' => false,
133
+ 'directibumble_url' => Mage::getSingleton('adminhtml/url')->getUrl('*/cms_wysiwyg/directive'),
134
+ 'files_browser_window_url' => Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/cms_wysiwyg_images/index'),
135
+ 'files_browser_window_width' => (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_width'),
136
+ 'files_browser_window_height'=> (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_height')
137
+ )
138
+ );
139
+
140
+ $fieldset = $form->addFieldset('group_form', array('legend'=>Mage::helper('bumble_filter')->__('General Information ')));
141
+
142
+
143
+ $fieldset->addField('title','text',array(
144
+ 'label'=> Mage::helper('bumble_filter')->__('Title'),
145
+ 'name'=> 'title1',
146
+ 'placeholder' => $num[$var],
147
+ 'after_element_html' => '<br /><small>'.$this->__('By Default the title will be the same of Label') .'</small>',
148
+
149
+ ));
150
+
151
+ $fieldset->addField('file','image', array(
152
+ 'label'=>Mage::helper('bumble_filter')->__('Image'),
153
+ 'name'=> 'file1',
154
+ ));
155
+
156
+ $config->setData(Mage::helper('bumble_filter')->recursiveReplace(
157
+ '/bumble_filter/',
158
+ '/'.(string)Mage::app()->getConfig()->getNode('admin/routers/adminhtml/args/frontName').'/',
159
+ $config->getData()
160
+ )
161
+ );
162
+ $fieldset->addField('identifier', 'text', array(
163
+ 'label' => Mage::helper('bumble_filter')->__('Identifier'),
164
+ 'name' => 'identifier1',
165
+ 'id' => 'identifier',
166
+ //'value' => $_model->getLabel()
167
+ ));
168
+
169
+ $fieldset->addField('description', 'editor', array(
170
+ 'label' => Mage::helper('bumble_filter')->__('Description'),
171
+ 'name' => 'description1',
172
+ 'style' => 'width:600px;height:300px;',
173
+ 'wysiwyg' => true,
174
+ 'config' => $config
175
+ ));
176
+
177
+ $fieldset->addField('status', 'select', array(
178
+ 'label' => Mage::helper('bumble_filter')->__('Is Active'),
179
+ 'name' => 'status1',
180
+ 'values' => Mage::getSingleton('adminhtml/system_config_source_yesno')->toOptionArray(),
181
+ //'value' => $_model->getStatus(),
182
+ ));
183
+ $fieldset->addField('page', 'select', array(
184
+ 'name' => 'page',
185
+ 'values' => array(array('value' => $page,'label' => $page)),
186
+ 'style' => 'display:none;',
187
+
188
+ ));
189
+
190
+
191
+
192
+
193
+
194
+
195
+
196
+ if ( Mage::getSingleton('adminhtml/session')->getGroupData() )
197
+ {
198
+ $form->setValues(Mage::getSingleton('adminhtml/session')->getGroupData());
199
+ Mage::getSingleton('adminhtml/session')->getFilterData(null);
200
+ } elseif ( Mage::registry('group_data') ) {
201
+
202
+ $newReg = Mage::getModel('bumble_filter/group')->load($group_id);
203
+
204
+
205
+ $form->setValues($newReg->getData());
206
+ }
207
+
208
+ return parent::_prepareForm();
209
+ }
210
+
211
+ }
app/code/community/Bumble/Filter/Block/Adminhtml/Group/Edit/Tab/Form10.php ADDED
@@ -0,0 +1,190 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ ------------------------------------------------------------------------*/
10
+
11
+ class Bumble_Filter_Block_Adminhtml_Group_Edit_Tab_Form10 extends Mage_Adminhtml_Block_Widget_Form
12
+ {
13
+ public function getNum()
14
+ {
15
+ $ob = $this->getRequest()->getParam('id');
16
+
17
+ $br = Mage::getModel('bumble_filter/filter')->load($ob);
18
+ $filtertype= $br->getManufacturer();
19
+ $use= $br->getUsemanufacturer();
20
+
21
+ $resource = Mage::getSingleton('core/resource');
22
+ $readConnection = $resource->getConnection('core_read');
23
+
24
+ $query = "SELECT `group_id` FROM bumble_filter_group WHERE `filter_id`= '$ob'";
25
+
26
+
27
+ $braresults = $readConnection->fetchAll($query);
28
+ $bra_id = $braresults[0]['group_id'];
29
+
30
+ $gro = Mage::getModel('bumble_filter/group')->load($bra_id);
31
+
32
+
33
+ if($use == 1)
34
+ {
35
+ if($filtertype == 'all')
36
+ {
37
+ $num = array();
38
+ $attribute = Mage::getModel('eav/config')->getAttribute('catalog_product', 'manufacturer');
39
+
40
+ foreach ( $attribute->getSource()->getAllOptions(true, true) as $option)
41
+ {
42
+ if($option['label'] != "")
43
+ {
44
+ $num[]= $option['label'];
45
+ }
46
+ }
47
+
48
+ }
49
+ else
50
+ {
51
+
52
+
53
+ $attr = Mage::getModel('catalog/resource_eav_attribute')->load(81);
54
+
55
+ $label = $attr->getSource()->getOptionText($filtertype);
56
+ $label = str_replace("'", "", $label);
57
+ $num=array();
58
+
59
+ $num[] = $label;// 2 array
60
+ }
61
+ }else{
62
+ $ob = $this->getRequest()->getParam('id');
63
+
64
+ $br = Mage::getModel('bumble_filter/filter')->load($ob);
65
+
66
+ $num = $br->getTitle();
67
+ }
68
+
69
+ return $num;
70
+ }
71
+
72
+
73
+ public function ciao()
74
+ {
75
+
76
+ $page = $this->getRequest()->getParam('page') ;
77
+
78
+
79
+ return $page;
80
+ }
81
+
82
+ protected function _prepareForm()
83
+ {
84
+
85
+ $page= $this->ciao();
86
+
87
+ if($page == null){
88
+ $page=1;
89
+ }else{
90
+ $page=$page;
91
+ }
92
+ $num = $this->getNum();
93
+ $tabs= $this->getRequest()->getParam('id');
94
+
95
+ $resource = Mage::getSingleton('core/resource');
96
+ $readConnection = $resource->getConnection('core_read');
97
+
98
+ $query = "SELECT `group_id` FROM bumble_filter_group WHERE `filter_id`= '$tabs' AND `page`= '$page'";
99
+
100
+ $results = $readConnection->fetchAll($query);
101
+
102
+
103
+ if($page)
104
+ {
105
+ $resPage= (20 * $page)-20;
106
+ }
107
+
108
+ $var = 9+$resPage;
109
+ /* get the results */
110
+ $group_id = $results[9]['group_id'];
111
+
112
+
113
+
114
+ $_model = Mage::registry('group_data');
115
+ $form = new Varien_Data_Form();
116
+ $this->setForm($form);
117
+
118
+ $config = Mage::getSingleton('cms/wysiwyg_config')->getConfig(
119
+ array(
120
+ 'add_widgets' => false,
121
+ 'add_variables' => false,
122
+ 'add_images' => true,
123
+ 'encode_directibumble' => false,
124
+ 'directibumble_url' => Mage::getSingleton('adminhtml/url')->getUrl('*/cms_wysiwyg/directive'),
125
+ 'files_browser_window_url' => Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/cms_wysiwyg_images/index'),
126
+ 'files_browser_window_width' => (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_width'),
127
+ 'files_browser_window_height'=> (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_height')
128
+ )
129
+ );
130
+
131
+ $fieldset = $form->addFieldset('group_form', array('legend'=>Mage::helper('bumble_filter')->__('General Information ')));
132
+
133
+
134
+ $fieldset->addField('title','text',array(
135
+ 'label'=> Mage::helper('bumble_filter')->__('Title'),
136
+ 'name'=> 'title10',
137
+ 'placeholder' => $num[$var],
138
+ 'after_element_html' => '<br /><small>'.$this->__('By Default the title will be the same of Label') .'</small>',
139
+ ));
140
+
141
+ $fieldset->addField('file','image', array(
142
+ 'label'=>Mage::helper('bumble_filter')->__('Image'),
143
+ 'name'=> 'file10',
144
+ ));
145
+
146
+ $config->setData(Mage::helper('bumble_filter')->recursiveReplace(
147
+ '/bumble_filter/',
148
+ '/'.(string)Mage::app()->getConfig()->getNode('admin/routers/adminhtml/args/frontName').'/',
149
+ $config->getData()
150
+ )
151
+ );
152
+ $fieldset->addField('identifier', 'text', array(
153
+ 'label' => Mage::helper('bumble_filter')->__('Identifier'),
154
+ 'name' => 'identifier10',
155
+ 'id' => 'identifier',
156
+ //'value' => $_model->getLabel()
157
+ ));
158
+
159
+ $fieldset->addField('description', 'editor', array(
160
+ 'label' => Mage::helper('bumble_filter')->__('Description'),
161
+ 'name' => 'description10',
162
+ 'style' => 'width:600px;height:300px;',
163
+ 'wysiwyg' => true,
164
+ 'config' => $config
165
+ ));
166
+
167
+ $fieldset->addField('status', 'select', array(
168
+ 'label' => Mage::helper('bumble_filter')->__('Is Active'),
169
+ 'name' => 'status10',
170
+ 'values' => Mage::getSingleton('adminhtml/system_config_source_yesno')->toOptionArray(),
171
+ //'value' => $_model->getStatus(),
172
+ ));
173
+
174
+
175
+ if ( Mage::getSingleton('adminhtml/session')->getGroupData() )
176
+ {
177
+ $form->setValues(Mage::getSingleton('adminhtml/session')->getGroupData());
178
+ Mage::getSingleton('adminhtml/session')->getFilterData(null);
179
+ } elseif ( Mage::registry('group_data') ) {
180
+
181
+ $newReg = Mage::getModel('bumble_filter/group')->load($group_id);
182
+
183
+
184
+ $form->setValues($newReg->getData());
185
+ }
186
+
187
+ return parent::_prepareForm();
188
+ }
189
+
190
+ }
app/code/community/Bumble/Filter/Block/Adminhtml/Group/Edit/Tab/Form11.php ADDED
@@ -0,0 +1,195 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ ------------------------------------------------------------------------*/
10
+
11
+ class Bumble_Filter_Block_Adminhtml_Group_Edit_Tab_Form11 extends Mage_Adminhtml_Block_Widget_Form
12
+ {
13
+ public function getNum()
14
+ {
15
+ $ob = $this->getRequest()->getParam('id');
16
+
17
+ $br = Mage::getModel('bumble_filter/filter')->load($ob);
18
+ $filtertype= $br->getManufacturer();
19
+ $use= $br->getUsemanufacturer();
20
+
21
+ $resource = Mage::getSingleton('core/resource');
22
+ $readConnection = $resource->getConnection('core_read');
23
+
24
+ $query = "SELECT `group_id` FROM bumble_filter_group WHERE `filter_id`= '$ob'";
25
+
26
+
27
+ $braresults = $readConnection->fetchAll($query);
28
+ $bra_id = $braresults[0]['group_id'];
29
+
30
+ $gro = Mage::getModel('bumble_filter/group')->load($bra_id);
31
+
32
+
33
+ if($use == 1)
34
+ {
35
+ if($filtertype == 'all')
36
+ {
37
+ $num = array();
38
+ $attribute = Mage::getModel('eav/config')->getAttribute('catalog_product', 'manufacturer');
39
+
40
+ foreach ( $attribute->getSource()->getAllOptions(true, true) as $option)
41
+ {
42
+ if($option['label'] != "")
43
+ {
44
+ $num[]= $option['label'];
45
+ }
46
+ }
47
+
48
+ }
49
+ else
50
+ {
51
+
52
+
53
+ $attr = Mage::getModel('catalog/resource_eav_attribute')->load(81);
54
+
55
+ $label = $attr->getSource()->getOptionText($filtertype);
56
+ $label = str_replace("'", "", $label);
57
+ $num=array();
58
+
59
+ $num[] = $label;// 2 array
60
+ }
61
+ }else{
62
+ $ob = $this->getRequest()->getParam('id');
63
+
64
+ $br = Mage::getModel('bumble_filter/filter')->load($ob);
65
+
66
+ $num = $br->getTitle();
67
+ }
68
+
69
+ return $num;
70
+ }
71
+
72
+
73
+ public function ciao()
74
+ {
75
+ if($_GET['page'] != null)
76
+ {
77
+ $page = $_GET['page'] ;
78
+ }
79
+ if($this->getRequest()->getParam('page') != null && $_GET['page'] == null)
80
+ {
81
+ $page = $this->getRequest()->getParam('page') ;
82
+ }
83
+
84
+ return $page;
85
+ }
86
+
87
+ protected function _prepareForm()
88
+ {
89
+ $page= $this->ciao();
90
+
91
+ if($page == null){
92
+ $page=1;
93
+ }else{
94
+ $page=$page;
95
+ }
96
+ $num = $this->getNum();
97
+ $tabs= $this->getRequest()->getParam('id');
98
+
99
+ $resource = Mage::getSingleton('core/resource');
100
+ $readConnection = $resource->getConnection('core_read');
101
+
102
+ $query = "SELECT `group_id` FROM bumble_filter_group WHERE `filter_id`= '$tabs' AND `page`= '$page'";
103
+
104
+ $results = $readConnection->fetchAll($query);
105
+
106
+
107
+ if($page)
108
+ {
109
+ $resPage= (20 * $page)-20;
110
+ }
111
+
112
+ $var = 10+$resPage;
113
+ /* get the results */
114
+ $group_id = $results[10]['group_id'];
115
+
116
+
117
+
118
+ $_model = Mage::registry('group_data');
119
+ $form = new Varien_Data_Form();
120
+ $this->setForm($form);
121
+
122
+ $config = Mage::getSingleton('cms/wysiwyg_config')->getConfig(
123
+ array(
124
+ 'add_widgets' => false,
125
+ 'add_variables' => false,
126
+ 'add_images' => true,
127
+ 'encode_directibumble' => false,
128
+ 'directibumble_url' => Mage::getSingleton('adminhtml/url')->getUrl('*/cms_wysiwyg/directive'),
129
+ 'files_browser_window_url' => Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/cms_wysiwyg_images/index'),
130
+ 'files_browser_window_width' => (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_width'),
131
+ 'files_browser_window_height'=> (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_height')
132
+ )
133
+ );
134
+
135
+ $fieldset = $form->addFieldset('group_form', array('legend'=>Mage::helper('bumble_filter')->__('General Information ')));
136
+
137
+
138
+ $fieldset->addField('title','text',array(
139
+ 'label'=> Mage::helper('bumble_filter')->__('Title'),
140
+ 'name'=> 'title11',
141
+ 'placeholder' => $num[$var],
142
+ 'after_element_html' => '<br /><small>'.$this->__('By Default the title will be the same of Label') .'</small>',
143
+ ));
144
+
145
+ $fieldset->addField('file','image', array(
146
+ 'label'=>Mage::helper('bumble_filter')->__('Image'),
147
+ 'name'=> 'file11',
148
+ ));
149
+
150
+ $config->setData(Mage::helper('bumble_filter')->recursiveReplace(
151
+ '/bumble_filter/',
152
+ '/'.(string)Mage::app()->getConfig()->getNode('admin/routers/adminhtml/args/frontName').'/',
153
+ $config->getData()
154
+ )
155
+ );
156
+ $fieldset->addField('identifier', 'text', array(
157
+ 'label' => Mage::helper('bumble_filter')->__('Identifier'),
158
+
159
+ 'name' => 'identifier11',
160
+ 'id' => 'identifier',
161
+ //'value' => $_model->getLabel()
162
+ ));
163
+
164
+ $fieldset->addField('description', 'editor', array(
165
+ 'label' => Mage::helper('bumble_filter')->__('Description'),
166
+ 'name' => 'description11',
167
+ 'style' => 'width:600px;height:300px;',
168
+ 'wysiwyg' => true,
169
+ 'config' => $config
170
+ ));
171
+
172
+ $fieldset->addField('status', 'select', array(
173
+ 'label' => Mage::helper('bumble_filter')->__('Is Active'),
174
+ 'name' => 'status11',
175
+ 'values' => Mage::getSingleton('adminhtml/system_config_source_yesno')->toOptionArray(),
176
+ //'value' => $_model->getStatus(),
177
+ ));
178
+
179
+
180
+ if ( Mage::getSingleton('adminhtml/session')->getGroupData() )
181
+ {
182
+ $form->setValues(Mage::getSingleton('adminhtml/session')->getGroupData());
183
+ Mage::getSingleton('adminhtml/session')->getFilterData(null);
184
+ } elseif ( Mage::registry('group_data') ) {
185
+
186
+ $newReg = Mage::getModel('bumble_filter/group')->load($group_id);
187
+
188
+
189
+ $form->setValues($newReg->getData());
190
+ }
191
+
192
+ return parent::_prepareForm();
193
+ }
194
+
195
+ }
app/code/community/Bumble/Filter/Block/Adminhtml/Group/Edit/Tab/Form12.php ADDED
@@ -0,0 +1,189 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ ------------------------------------------------------------------------*/
10
+
11
+ class Bumble_Filter_Block_Adminhtml_Group_Edit_Tab_Form12 extends Mage_Adminhtml_Block_Widget_Form
12
+ {
13
+ public function getNum()
14
+ {
15
+ $ob = $this->getRequest()->getParam('id');
16
+
17
+ $br = Mage::getModel('bumble_filter/filter')->load($ob);
18
+ $filtertype= $br->getManufacturer();
19
+ $use= $br->getUsemanufacturer();
20
+
21
+ $resource = Mage::getSingleton('core/resource');
22
+ $readConnection = $resource->getConnection('core_read');
23
+
24
+ $query = "SELECT `group_id` FROM bumble_filter_group WHERE `filter_id`= '$ob'";
25
+
26
+
27
+ $braresults = $readConnection->fetchAll($query);
28
+ $bra_id = $braresults[0]['group_id'];
29
+
30
+ $gro = Mage::getModel('bumble_filter/group')->load($bra_id);
31
+
32
+
33
+ if($use == 1)
34
+ {
35
+ if($filtertype == 'all')
36
+ {
37
+ $num = array();
38
+ $attribute = Mage::getModel('eav/config')->getAttribute('catalog_product', 'manufacturer');
39
+
40
+ foreach ( $attribute->getSource()->getAllOptions(true, true) as $option)
41
+ {
42
+ if($option['label'] != "")
43
+ {
44
+ $num[]= $option['label'];
45
+ }
46
+ }
47
+
48
+ }
49
+ else
50
+ {
51
+
52
+
53
+ $attr = Mage::getModel('catalog/resource_eav_attribute')->load(81);
54
+
55
+ $label = $attr->getSource()->getOptionText($filtertype);
56
+ $label = str_replace("'", "", $label);
57
+ $num=array();
58
+
59
+ $num[] = $label;// 2 array
60
+ }
61
+ }else{
62
+ $ob = $this->getRequest()->getParam('id');
63
+
64
+ $br = Mage::getModel('bumble_filter/filter')->load($ob);
65
+
66
+ $num = $br->getTitle();
67
+ }
68
+
69
+ return $num;
70
+ }
71
+
72
+
73
+ public function ciao()
74
+ {
75
+
76
+ $page = $this->getRequest()->getParam('page') ;
77
+
78
+
79
+ return $page;
80
+ }
81
+
82
+ protected function _prepareForm()
83
+ {
84
+ $num = $this->getNum();
85
+ $page= $this->ciao();
86
+
87
+ if($page == null){
88
+ $page=1;
89
+ }else{
90
+ $page=$page;
91
+ }
92
+ $tabs= $this->getRequest()->getParam('id');
93
+
94
+ $resource = Mage::getSingleton('core/resource');
95
+ $readConnection = $resource->getConnection('core_read');
96
+
97
+ $query = "SELECT `group_id` FROM bumble_filter_group WHERE `filter_id`= '$tabs' AND `page`= '$page'";
98
+
99
+ $results = $readConnection->fetchAll($query);
100
+
101
+
102
+ if($page)
103
+ {
104
+ $resPage= (20 * $page)-20;
105
+ }
106
+
107
+ $var = 11+$resPage;
108
+ /* get the results */
109
+ $group_id = $results[11]['group_id'];
110
+
111
+
112
+
113
+ $_model = Mage::registry('group_data');
114
+ $form = new Varien_Data_Form();
115
+ $this->setForm($form);
116
+
117
+ $config = Mage::getSingleton('cms/wysiwyg_config')->getConfig(
118
+ array(
119
+ 'add_widgets' => false,
120
+ 'add_variables' => false,
121
+ 'add_images' => true,
122
+ 'encode_directibumble' => false,
123
+ 'directibumble_url' => Mage::getSingleton('adminhtml/url')->getUrl('*/cms_wysiwyg/directive'),
124
+ 'files_browser_window_url' => Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/cms_wysiwyg_images/index'),
125
+ 'files_browser_window_width' => (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_width'),
126
+ 'files_browser_window_height'=> (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_height')
127
+ )
128
+ );
129
+
130
+ $fieldset = $form->addFieldset('group_form', array('legend'=>Mage::helper('bumble_filter')->__('General Information ')));
131
+
132
+
133
+ $fieldset->addField('title','text',array(
134
+ 'label'=> Mage::helper('bumble_filter')->__('Title'),
135
+ 'name'=> 'title12',
136
+ 'placeholder' => $num[$var],
137
+ 'after_element_html' => '<br /><small>'.$this->__('By Default the title will be the same of Label') .'</small>',
138
+ ));
139
+
140
+ $fieldset->addField('file','image', array(
141
+ 'label'=>Mage::helper('bumble_filter')->__('Image'),
142
+ 'name'=> 'file12',
143
+ ));
144
+
145
+ $config->setData(Mage::helper('bumble_filter')->recursiveReplace(
146
+ '/bumble_filter/',
147
+ '/'.(string)Mage::app()->getConfig()->getNode('admin/routers/adminhtml/args/frontName').'/',
148
+ $config->getData()
149
+ )
150
+ );
151
+ $fieldset->addField('identifier', 'text', array(
152
+ 'label' => Mage::helper('bumble_filter')->__('Identifier'),
153
+ 'name' => 'identifier12',
154
+ 'id' => 'identifier',
155
+ //'value' => $_model->getLabel()
156
+ ));
157
+
158
+ $fieldset->addField('description', 'editor', array(
159
+ 'label' => Mage::helper('bumble_filter')->__('Description'),
160
+ 'name' => 'description12',
161
+ 'style' => 'width:600px;height:300px;',
162
+ 'wysiwyg' => true,
163
+ 'config' => $config
164
+ ));
165
+
166
+ $fieldset->addField('status', 'select', array(
167
+ 'label' => Mage::helper('bumble_filter')->__('Is Active'),
168
+ 'name' => 'status12',
169
+ 'values' => Mage::getSingleton('adminhtml/system_config_source_yesno')->toOptionArray(),
170
+ //'value' => $_model->getStatus(),
171
+ ));
172
+
173
+
174
+ if ( Mage::getSingleton('adminhtml/session')->getGroupData() )
175
+ {
176
+ $form->setValues(Mage::getSingleton('adminhtml/session')->getGroupData());
177
+ Mage::getSingleton('adminhtml/session')->getFilterData(null);
178
+ } elseif ( Mage::registry('group_data') ) {
179
+
180
+ $newReg = Mage::getModel('bumble_filter/group')->load($group_id);
181
+
182
+
183
+ $form->setValues($newReg->getData());
184
+ }
185
+
186
+ return parent::_prepareForm();
187
+ }
188
+
189
+ }
app/code/community/Bumble/Filter/Block/Adminhtml/Group/Edit/Tab/Form13.php ADDED
@@ -0,0 +1,189 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ ------------------------------------------------------------------------*/
10
+
11
+ class Bumble_Filter_Block_Adminhtml_Group_Edit_Tab_Form13 extends Mage_Adminhtml_Block_Widget_Form
12
+ {
13
+ public function getNum()
14
+ {
15
+ $ob = $this->getRequest()->getParam('id');
16
+
17
+ $br = Mage::getModel('bumble_filter/filter')->load($ob);
18
+ $filtertype= $br->getManufacturer();
19
+ $use= $br->getUsemanufacturer();
20
+
21
+ $resource = Mage::getSingleton('core/resource');
22
+ $readConnection = $resource->getConnection('core_read');
23
+
24
+ $query = "SELECT `group_id` FROM bumble_filter_group WHERE `filter_id`= '$ob'";
25
+
26
+
27
+ $braresults = $readConnection->fetchAll($query);
28
+ $bra_id = $braresults[0]['group_id'];
29
+
30
+ $gro = Mage::getModel('bumble_filter/group')->load($bra_id);
31
+
32
+
33
+ if($use == 1)
34
+ {
35
+ if($filtertype == 'all')
36
+ {
37
+ $num = array();
38
+ $attribute = Mage::getModel('eav/config')->getAttribute('catalog_product', 'manufacturer');
39
+
40
+ foreach ( $attribute->getSource()->getAllOptions(true, true) as $option)
41
+ {
42
+ if($option['label'] != "")
43
+ {
44
+ $num[]= $option['label'];
45
+ }
46
+ }
47
+
48
+ }
49
+ else
50
+ {
51
+
52
+
53
+ $attr = Mage::getModel('catalog/resource_eav_attribute')->load(81);
54
+
55
+ $label = $attr->getSource()->getOptionText($filtertype);
56
+ $label = str_replace("'", "", $label);
57
+ $num=array();
58
+
59
+ $num[] = $label;// 2 array
60
+ }
61
+ }else{
62
+ $ob = $this->getRequest()->getParam('id');
63
+
64
+ $br = Mage::getModel('bumble_filter/filter')->load($ob);
65
+
66
+ $num = $br->getTitle();
67
+ }
68
+
69
+ return $num;
70
+ }
71
+
72
+
73
+ public function ciao()
74
+ {
75
+
76
+ $page = $this->getRequest()->getParam('page') ;
77
+
78
+
79
+ return $page;
80
+ }
81
+
82
+ protected function _prepareForm()
83
+ {
84
+ $num = $this->getNum();
85
+ $page= $this->ciao();
86
+
87
+ if($page == null){
88
+ $page=1;
89
+ }else{
90
+ $page=$page;
91
+ }
92
+ $tabs= $this->getRequest()->getParam('id');
93
+
94
+ $resource = Mage::getSingleton('core/resource');
95
+ $readConnection = $resource->getConnection('core_read');
96
+
97
+ $query = "SELECT `group_id` FROM bumble_filter_group WHERE `filter_id`= '$tabs' AND `page`= '$page'";
98
+
99
+ $results = $readConnection->fetchAll($query);
100
+
101
+
102
+ if($page)
103
+ {
104
+ $resPage= (20 * $page)-20;
105
+ }
106
+
107
+ $var = 12+$resPage;
108
+ /* get the results */
109
+ $group_id = $results[12]['group_id'];
110
+
111
+
112
+
113
+ $_model = Mage::registry('group_data');
114
+ $form = new Varien_Data_Form();
115
+ $this->setForm($form);
116
+
117
+ $config = Mage::getSingleton('cms/wysiwyg_config')->getConfig(
118
+ array(
119
+ 'add_widgets' => false,
120
+ 'add_variables' => false,
121
+ 'add_images' => true,
122
+ 'encode_directibumble' => false,
123
+ 'directibumble_url' => Mage::getSingleton('adminhtml/url')->getUrl('*/cms_wysiwyg/directive'),
124
+ 'files_browser_window_url' => Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/cms_wysiwyg_images/index'),
125
+ 'files_browser_window_width' => (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_width'),
126
+ 'files_browser_window_height'=> (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_height')
127
+ )
128
+ );
129
+
130
+ $fieldset = $form->addFieldset('group_form', array('legend'=>Mage::helper('bumble_filter')->__('General Information ')));
131
+
132
+
133
+ $fieldset->addField('title','text',array(
134
+ 'label'=> Mage::helper('bumble_filter')->__('Title'),
135
+ 'name'=> 'title13',
136
+ 'placeholder' => $num[$var],
137
+ 'after_element_html' => '<br /><small>'.$this->__('By Default the title will be the same of Label') .'</small>',
138
+ ));
139
+
140
+ $fieldset->addField('file','image', array(
141
+ 'label'=>Mage::helper('bumble_filter')->__('Image'),
142
+ 'name'=> 'file13',
143
+ ));
144
+
145
+ $config->setData(Mage::helper('bumble_filter')->recursiveReplace(
146
+ '/bumble_filter/',
147
+ '/'.(string)Mage::app()->getConfig()->getNode('admin/routers/adminhtml/args/frontName').'/',
148
+ $config->getData()
149
+ )
150
+ );
151
+ $fieldset->addField('identifier', 'text', array(
152
+ 'label' => Mage::helper('bumble_filter')->__('Identifier'),
153
+ 'name' => 'identifier13',
154
+ 'id' => 'identifier',
155
+ //'value' => $_model->getLabel()
156
+ ));
157
+
158
+ $fieldset->addField('description', 'editor', array(
159
+ 'label' => Mage::helper('bumble_filter')->__('Description'),
160
+ 'name' => 'description13',
161
+ 'style' => 'width:600px;height:300px;',
162
+ 'wysiwyg' => true,
163
+ 'config' => $config
164
+ ));
165
+
166
+ $fieldset->addField('status', 'select', array(
167
+ 'label' => Mage::helper('bumble_filter')->__('Is Active'),
168
+ 'name' => 'status13',
169
+ 'values' => Mage::getSingleton('adminhtml/system_config_source_yesno')->toOptionArray(),
170
+ //'value' => $_model->getStatus(),
171
+ ));
172
+
173
+
174
+ if ( Mage::getSingleton('adminhtml/session')->getGroupData() )
175
+ {
176
+ $form->setValues(Mage::getSingleton('adminhtml/session')->getGroupData());
177
+ Mage::getSingleton('adminhtml/session')->getFilterData(null);
178
+ } elseif ( Mage::registry('group_data') ) {
179
+
180
+ $newReg = Mage::getModel('bumble_filter/group')->load($group_id);
181
+
182
+
183
+ $form->setValues($newReg->getData());
184
+ }
185
+
186
+ return parent::_prepareForm();
187
+ }
188
+
189
+ }
app/code/community/Bumble/Filter/Block/Adminhtml/Group/Edit/Tab/Form14.php ADDED
@@ -0,0 +1,189 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ ------------------------------------------------------------------------*/
10
+
11
+ class Bumble_Filter_Block_Adminhtml_Group_Edit_Tab_Form14 extends Mage_Adminhtml_Block_Widget_Form
12
+ {
13
+ public function getNum()
14
+ {
15
+ $ob = $this->getRequest()->getParam('id');
16
+
17
+ $br = Mage::getModel('bumble_filter/filter')->load($ob);
18
+ $filtertype= $br->getManufacturer();
19
+ $use= $br->getUsemanufacturer();
20
+
21
+ $resource = Mage::getSingleton('core/resource');
22
+ $readConnection = $resource->getConnection('core_read');
23
+
24
+ $query = "SELECT `group_id` FROM bumble_filter_group WHERE `filter_id`= '$ob'";
25
+
26
+
27
+ $braresults = $readConnection->fetchAll($query);
28
+ $bra_id = $braresults[0]['group_id'];
29
+
30
+ $gro = Mage::getModel('bumble_filter/group')->load($bra_id);
31
+
32
+
33
+ if($use == 1)
34
+ {
35
+ if($filtertype == 'all')
36
+ {
37
+ $num = array();
38
+ $attribute = Mage::getModel('eav/config')->getAttribute('catalog_product', 'manufacturer');
39
+
40
+ foreach ( $attribute->getSource()->getAllOptions(true, true) as $option)
41
+ {
42
+ if($option['label'] != "")
43
+ {
44
+ $num[]= $option['label'];
45
+ }
46
+ }
47
+
48
+ }
49
+ else
50
+ {
51
+
52
+
53
+ $attr = Mage::getModel('catalog/resource_eav_attribute')->load(81);
54
+
55
+ $label = $attr->getSource()->getOptionText($filtertype);
56
+ $label = str_replace("'", "", $label);
57
+ $num=array();
58
+
59
+ $num[] = $label;// 2 array
60
+ }
61
+ }else{
62
+ $ob = $this->getRequest()->getParam('id');
63
+
64
+ $br = Mage::getModel('bumble_filter/filter')->load($ob);
65
+
66
+ $num = $br->getTitle();
67
+ }
68
+
69
+ return $num;
70
+ }
71
+
72
+
73
+ public function ciao()
74
+ {
75
+
76
+ $page = $this->getRequest()->getParam('page') ;
77
+
78
+
79
+ return $page;
80
+ }
81
+
82
+ protected function _prepareForm()
83
+ {
84
+ $num = $this->getNum();
85
+ $page= $this->ciao();
86
+
87
+ if($page == null){
88
+ $page=1;
89
+ }else{
90
+ $page=$page;
91
+ }
92
+ $tabs= $this->getRequest()->getParam('id');
93
+
94
+ $resource = Mage::getSingleton('core/resource');
95
+ $readConnection = $resource->getConnection('core_read');
96
+
97
+ $query = "SELECT `group_id` FROM bumble_filter_group WHERE `filter_id`= '$tabs' AND `page`= '$page'";
98
+
99
+ $results = $readConnection->fetchAll($query);
100
+
101
+
102
+ if($page)
103
+ {
104
+ $resPage= (20 * $page)-20;
105
+ }
106
+
107
+ $var = 13+$resPage;
108
+ /* get the results */
109
+ $group_id = $results[13]['group_id'];
110
+
111
+
112
+
113
+ $_model = Mage::registry('group_data');
114
+ $form = new Varien_Data_Form();
115
+ $this->setForm($form);
116
+
117
+ $config = Mage::getSingleton('cms/wysiwyg_config')->getConfig(
118
+ array(
119
+ 'add_widgets' => false,
120
+ 'add_variables' => false,
121
+ 'add_images' => true,
122
+ 'encode_directibumble' => false,
123
+ 'directibumble_url' => Mage::getSingleton('adminhtml/url')->getUrl('*/cms_wysiwyg/directive'),
124
+ 'files_browser_window_url' => Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/cms_wysiwyg_images/index'),
125
+ 'files_browser_window_width' => (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_width'),
126
+ 'files_browser_window_height'=> (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_height')
127
+ )
128
+ );
129
+
130
+ $fieldset = $form->addFieldset('group_form', array('legend'=>Mage::helper('bumble_filter')->__('General Information ')));
131
+
132
+
133
+ $fieldset->addField('title','text',array(
134
+ 'label'=> Mage::helper('bumble_filter')->__('Title'),
135
+ 'name'=> 'title14',
136
+ 'placeholder' => $num[$var],
137
+ 'after_element_html' => '<br /><small>'.$this->__('By Default the title will be the same of Label') .'</small>',
138
+ ));
139
+
140
+ $fieldset->addField('file','image', array(
141
+ 'label'=>Mage::helper('bumble_filter')->__('Image'),
142
+ 'name'=> 'file14',
143
+ ));
144
+
145
+ $config->setData(Mage::helper('bumble_filter')->recursiveReplace(
146
+ '/bumble_filter/',
147
+ '/'.(string)Mage::app()->getConfig()->getNode('admin/routers/adminhtml/args/frontName').'/',
148
+ $config->getData()
149
+ )
150
+ );
151
+ $fieldset->addField('identifier', 'text', array(
152
+ 'label' => Mage::helper('bumble_filter')->__('Identifier'),
153
+ 'name' => 'identifier14',
154
+ 'id' => 'identifier',
155
+ //'value' => $_model->getLabel()
156
+ ));
157
+
158
+ $fieldset->addField('description', 'editor', array(
159
+ 'label' => Mage::helper('bumble_filter')->__('Description'),
160
+ 'name' => 'description14',
161
+ 'style' => 'width:600px;height:300px;',
162
+ 'wysiwyg' => true,
163
+ 'config' => $config
164
+ ));
165
+
166
+ $fieldset->addField('status', 'select', array(
167
+ 'label' => Mage::helper('bumble_filter')->__('Is Active'),
168
+ 'name' => 'status14',
169
+ 'values' => Mage::getSingleton('adminhtml/system_config_source_yesno')->toOptionArray(),
170
+ //'value' => $_model->getStatus(),
171
+ ));
172
+
173
+
174
+ if ( Mage::getSingleton('adminhtml/session')->getGroupData() )
175
+ {
176
+ $form->setValues(Mage::getSingleton('adminhtml/session')->getGroupData());
177
+ Mage::getSingleton('adminhtml/session')->getFilterData(null);
178
+ } elseif ( Mage::registry('group_data') ) {
179
+
180
+ $newReg = Mage::getModel('bumble_filter/group')->load($group_id);
181
+
182
+
183
+ $form->setValues($newReg->getData());
184
+ }
185
+
186
+ return parent::_prepareForm();
187
+ }
188
+
189
+ }
app/code/community/Bumble/Filter/Block/Adminhtml/Group/Edit/Tab/Form15.php ADDED
@@ -0,0 +1,189 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ ------------------------------------------------------------------------*/
10
+
11
+ class Bumble_Filter_Block_Adminhtml_Group_Edit_Tab_Form15 extends Mage_Adminhtml_Block_Widget_Form
12
+ {
13
+ public function getNum()
14
+ {
15
+ $ob = $this->getRequest()->getParam('id');
16
+
17
+ $br = Mage::getModel('bumble_filter/filter')->load($ob);
18
+ $filtertype= $br->getManufacturer();
19
+ $use= $br->getUsemanufacturer();
20
+
21
+ $resource = Mage::getSingleton('core/resource');
22
+ $readConnection = $resource->getConnection('core_read');
23
+
24
+ $query = "SELECT `group_id` FROM bumble_filter_group WHERE `filter_id`= '$ob'";
25
+
26
+
27
+ $braresults = $readConnection->fetchAll($query);
28
+ $bra_id = $braresults[0]['group_id'];
29
+
30
+ $gro = Mage::getModel('bumble_filter/group')->load($bra_id);
31
+
32
+
33
+ if($use == 1)
34
+ {
35
+ if($filtertype == 'all')
36
+ {
37
+ $num = array();
38
+ $attribute = Mage::getModel('eav/config')->getAttribute('catalog_product', 'manufacturer');
39
+
40
+ foreach ( $attribute->getSource()->getAllOptions(true, true) as $option)
41
+ {
42
+ if($option['label'] != "")
43
+ {
44
+ $num[]= $option['label'];
45
+ }
46
+ }
47
+
48
+ }
49
+ else
50
+ {
51
+
52
+
53
+ $attr = Mage::getModel('catalog/resource_eav_attribute')->load(81);
54
+
55
+ $label = $attr->getSource()->getOptionText($filtertype);
56
+ $label = str_replace("'", "", $label);
57
+ $num=array();
58
+
59
+ $num[] = $label;// 2 array
60
+ }
61
+ }else{
62
+ $ob = $this->getRequest()->getParam('id');
63
+
64
+ $br = Mage::getModel('bumble_filter/filter')->load($ob);
65
+
66
+ $num = $br->getTitle();
67
+ }
68
+
69
+ return $num;
70
+ }
71
+
72
+
73
+ public function ciao()
74
+ {
75
+
76
+ $page = $this->getRequest()->getParam('page') ;
77
+
78
+
79
+ return $page;
80
+ }
81
+
82
+ protected function _prepareForm()
83
+ {
84
+ $num = $this->getNum();
85
+ $page= $this->ciao();
86
+
87
+ if($page == null){
88
+ $page=1;
89
+ }else{
90
+ $page=$page;
91
+ }
92
+ $tabs= $this->getRequest()->getParam('id');
93
+ #$page=$_GET['page'];
94
+ $resource = Mage::getSingleton('core/resource');
95
+ $readConnection = $resource->getConnection('core_read');
96
+
97
+ $query = "SELECT `group_id` FROM bumble_filter_group WHERE `filter_id`= '$tabs' AND `page`= '$page'";
98
+
99
+ $results = $readConnection->fetchAll($query);
100
+
101
+
102
+ if($page)
103
+ {
104
+ $resPage= (20 * $page)-20;
105
+ }
106
+
107
+ $var = 14+$resPage;
108
+ /* get the results */
109
+ $group_id = $results[14]['group_id'];
110
+
111
+
112
+
113
+ $_model = Mage::registry('group_data');
114
+ $form = new Varien_Data_Form();
115
+ $this->setForm($form);
116
+
117
+ $config = Mage::getSingleton('cms/wysiwyg_config')->getConfig(
118
+ array(
119
+ 'add_widgets' => false,
120
+ 'add_variables' => false,
121
+ 'add_images' => true,
122
+ 'encode_directibumble' => false,
123
+ 'directibumble_url' => Mage::getSingleton('adminhtml/url')->getUrl('*/cms_wysiwyg/directive'),
124
+ 'files_browser_window_url' => Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/cms_wysiwyg_images/index'),
125
+ 'files_browser_window_width' => (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_width'),
126
+ 'files_browser_window_height'=> (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_height')
127
+ )
128
+ );
129
+
130
+ $fieldset = $form->addFieldset('group_form', array('legend'=>Mage::helper('bumble_filter')->__('General Information ')));
131
+
132
+
133
+ $fieldset->addField('title','text',array(
134
+ 'label'=> Mage::helper('bumble_filter')->__('Title'),
135
+ 'name'=> 'title15',
136
+ 'placeholder' => $num[$var],
137
+ 'after_element_html' => '<br /><small>'.$this->__('By Default the title will be the same of Label') .'</small>',
138
+ ));
139
+
140
+ $fieldset->addField('file','image', array(
141
+ 'label'=>Mage::helper('bumble_filter')->__('Image'),
142
+ 'name'=> 'file15',
143
+ ));
144
+
145
+ $config->setData(Mage::helper('bumble_filter')->recursiveReplace(
146
+ '/bumble_filter/',
147
+ '/'.(string)Mage::app()->getConfig()->getNode('admin/routers/adminhtml/args/frontName').'/',
148
+ $config->getData()
149
+ )
150
+ );
151
+ $fieldset->addField('identifier', 'text', array(
152
+ 'label' => Mage::helper('bumble_filter')->__('Identifier'),
153
+ 'name' => 'identifier15',
154
+ 'id' => 'identifier',
155
+ //'value' => $_model->getLabel()
156
+ ));
157
+
158
+ $fieldset->addField('description', 'editor', array(
159
+ 'label' => Mage::helper('bumble_filter')->__('Description'),
160
+ 'name' => 'description15',
161
+ 'style' => 'width:600px;height:300px;',
162
+ 'wysiwyg' => true,
163
+ 'config' => $config
164
+ ));
165
+
166
+ $fieldset->addField('status', 'select', array(
167
+ 'label' => Mage::helper('bumble_filter')->__('Is Active'),
168
+ 'name' => 'status15',
169
+ 'values' => Mage::getSingleton('adminhtml/system_config_source_yesno')->toOptionArray(),
170
+ //'value' => $_model->getStatus(),
171
+ ));
172
+
173
+
174
+ if ( Mage::getSingleton('adminhtml/session')->getGroupData() )
175
+ {
176
+ $form->setValues(Mage::getSingleton('adminhtml/session')->getGroupData());
177
+ Mage::getSingleton('adminhtml/session')->getFilterData(null);
178
+ } elseif ( Mage::registry('group_data') ) {
179
+
180
+ $newReg = Mage::getModel('bumble_filter/group')->load($group_id);
181
+
182
+
183
+ $form->setValues($newReg->getData());
184
+ }
185
+
186
+ return parent::_prepareForm();
187
+ }
188
+
189
+ }
app/code/community/Bumble/Filter/Block/Adminhtml/Group/Edit/Tab/Form16.php ADDED
@@ -0,0 +1,189 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ ------------------------------------------------------------------------*/
10
+
11
+ class Bumble_Filter_Block_Adminhtml_Group_Edit_Tab_Form16 extends Mage_Adminhtml_Block_Widget_Form
12
+ {
13
+ public function getNum()
14
+ {
15
+ $ob = $this->getRequest()->getParam('id');
16
+
17
+ $br = Mage::getModel('bumble_filter/filter')->load($ob);
18
+ $filtertype= $br->getManufacturer();
19
+ $use= $br->getUsemanufacturer();
20
+
21
+ $resource = Mage::getSingleton('core/resource');
22
+ $readConnection = $resource->getConnection('core_read');
23
+
24
+ $query = "SELECT `group_id` FROM bumble_filter_group WHERE `filter_id`= '$ob'";
25
+
26
+
27
+ $braresults = $readConnection->fetchAll($query);
28
+ $bra_id = $braresults[0]['group_id'];
29
+
30
+ $gro = Mage::getModel('bumble_filter/group')->load($bra_id);
31
+
32
+
33
+ if($use == 1)
34
+ {
35
+ if($filtertype == 'all')
36
+ {
37
+ $num = array();
38
+ $attribute = Mage::getModel('eav/config')->getAttribute('catalog_product', 'manufacturer');
39
+
40
+ foreach ( $attribute->getSource()->getAllOptions(true, true) as $option)
41
+ {
42
+ if($option['label'] != "")
43
+ {
44
+ $num[]= $option['label'];
45
+ }
46
+ }
47
+
48
+ }
49
+ else
50
+ {
51
+
52
+
53
+ $attr = Mage::getModel('catalog/resource_eav_attribute')->load(81);
54
+
55
+ $label = $attr->getSource()->getOptionText($filtertype);
56
+ $label = str_replace("'", "", $label);
57
+ $num=array();
58
+
59
+ $num[] = $label;// 2 array
60
+ }
61
+ }else{
62
+ $ob = $this->getRequest()->getParam('id');
63
+
64
+ $br = Mage::getModel('bumble_filter/filter')->load($ob);
65
+
66
+ $num = $br->getTitle();
67
+ }
68
+
69
+ return $num;
70
+ }
71
+
72
+
73
+ public function ciao()
74
+ {
75
+
76
+ $page = $this->getRequest()->getParam('page') ;
77
+
78
+
79
+ return $page;
80
+ }
81
+
82
+ protected function _prepareForm()
83
+ {
84
+ $num = $this->getNum();
85
+ $page= $this->ciao();
86
+
87
+ if($page == null){
88
+ $page=1;
89
+ }else{
90
+ $page=$page;
91
+ }
92
+ $tabs= $this->getRequest()->getParam('id');
93
+ #$page=$_GET['page'];
94
+ $resource = Mage::getSingleton('core/resource');
95
+ $readConnection = $resource->getConnection('core_read');
96
+
97
+ $query = "SELECT `group_id` FROM bumble_filter_group WHERE `filter_id`= '$tabs' AND `page`= '$page'";
98
+
99
+ $results = $readConnection->fetchAll($query);
100
+
101
+
102
+ if($page)
103
+ {
104
+ $resPage= (20 * $page)-20;
105
+ }
106
+ $var = 15+$resPage;
107
+
108
+ /* get the results */
109
+ $group_id = $results[15]['group_id'];
110
+
111
+
112
+
113
+ $_model = Mage::registry('group_data');
114
+ $form = new Varien_Data_Form();
115
+ $this->setForm($form);
116
+
117
+ $config = Mage::getSingleton('cms/wysiwyg_config')->getConfig(
118
+ array(
119
+ 'add_widgets' => false,
120
+ 'add_variables' => false,
121
+ 'add_images' => true,
122
+ 'encode_directibumble' => false,
123
+ 'directibumble_url' => Mage::getSingleton('adminhtml/url')->getUrl('*/cms_wysiwyg/directive'),
124
+ 'files_browser_window_url' => Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/cms_wysiwyg_images/index'),
125
+ 'files_browser_window_width' => (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_width'),
126
+ 'files_browser_window_height'=> (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_height')
127
+ )
128
+ );
129
+
130
+ $fieldset = $form->addFieldset('group_form', array('legend'=>Mage::helper('bumble_filter')->__('General Information ')));
131
+
132
+
133
+ $fieldset->addField('title','text',array(
134
+ 'label'=> Mage::helper('bumble_filter')->__('Title'),
135
+ 'name'=> 'title16',
136
+ 'placeholder' => $num[$var],
137
+ 'after_element_html' => '<br /><small>'.$this->__('By Default the title will be the same of Label') .'</small>',
138
+ ));
139
+
140
+ $fieldset->addField('file','image', array(
141
+ 'label'=>Mage::helper('bumble_filter')->__('Image'),
142
+ 'name'=> 'file16',
143
+ ));
144
+
145
+ $config->setData(Mage::helper('bumble_filter')->recursiveReplace(
146
+ '/bumble_filter/',
147
+ '/'.(string)Mage::app()->getConfig()->getNode('admin/routers/adminhtml/args/frontName').'/',
148
+ $config->getData()
149
+ )
150
+ );
151
+ $fieldset->addField('identifier', 'text', array(
152
+ 'label' => Mage::helper('bumble_filter')->__('Identifier'),
153
+ 'name' => 'identifier16',
154
+ 'id' => 'identifier',
155
+ //'value' => $_model->getLabel()
156
+ ));
157
+
158
+ $fieldset->addField('description', 'editor', array(
159
+ 'label' => Mage::helper('bumble_filter')->__('Description'),
160
+ 'name' => 'description16',
161
+ 'style' => 'width:600px;height:300px;',
162
+ 'wysiwyg' => true,
163
+ 'config' => $config
164
+ ));
165
+
166
+ $fieldset->addField('status', 'select', array(
167
+ 'label' => Mage::helper('bumble_filter')->__('Is Active'),
168
+ 'name' => 'status16',
169
+ 'values' => Mage::getSingleton('adminhtml/system_config_source_yesno')->toOptionArray(),
170
+ //'value' => $_model->getStatus(),
171
+ ));
172
+
173
+
174
+ if ( Mage::getSingleton('adminhtml/session')->getGroupData() )
175
+ {
176
+ $form->setValues(Mage::getSingleton('adminhtml/session')->getGroupData());
177
+ Mage::getSingleton('adminhtml/session')->getFilterData(null);
178
+ } elseif ( Mage::registry('group_data') ) {
179
+
180
+ $newReg = Mage::getModel('bumble_filter/group')->load($group_id);
181
+
182
+
183
+ $form->setValues($newReg->getData());
184
+ }
185
+
186
+ return parent::_prepareForm();
187
+ }
188
+
189
+ }
app/code/community/Bumble/Filter/Block/Adminhtml/Group/Edit/Tab/Form17.php ADDED
@@ -0,0 +1,189 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ ------------------------------------------------------------------------*/
10
+
11
+ class Bumble_Filter_Block_Adminhtml_Group_Edit_Tab_Form17 extends Mage_Adminhtml_Block_Widget_Form
12
+ {
13
+ public function getNum()
14
+ {
15
+ $ob = $this->getRequest()->getParam('id');
16
+
17
+ $br = Mage::getModel('bumble_filter/filter')->load($ob);
18
+ $filtertype= $br->getManufacturer();
19
+ $use= $br->getUsemanufacturer();
20
+
21
+ $resource = Mage::getSingleton('core/resource');
22
+ $readConnection = $resource->getConnection('core_read');
23
+
24
+ $query = "SELECT `group_id` FROM bumble_filter_group WHERE `filter_id`= '$ob'";
25
+
26
+
27
+ $braresults = $readConnection->fetchAll($query);
28
+ $bra_id = $braresults[0]['group_id'];
29
+
30
+ $gro = Mage::getModel('bumble_filter/group')->load($bra_id);
31
+
32
+
33
+ if($use == 1)
34
+ {
35
+ if($filtertype == 'all')
36
+ {
37
+ $num = array();
38
+ $attribute = Mage::getModel('eav/config')->getAttribute('catalog_product', 'manufacturer');
39
+
40
+ foreach ( $attribute->getSource()->getAllOptions(true, true) as $option)
41
+ {
42
+ if($option['label'] != "")
43
+ {
44
+ $num[]= $option['label'];
45
+ }
46
+ }
47
+
48
+ }
49
+ else
50
+ {
51
+
52
+
53
+ $attr = Mage::getModel('catalog/resource_eav_attribute')->load(81);
54
+
55
+ $label = $attr->getSource()->getOptionText($filtertype);
56
+ $label = str_replace("'", "", $label);
57
+ $num=array();
58
+
59
+ $num[] = $label;// 2 array
60
+ }
61
+ }else{
62
+ $ob = $this->getRequest()->getParam('id');
63
+
64
+ $br = Mage::getModel('bumble_filter/filter')->load($ob);
65
+
66
+ $num = $br->getTitle();
67
+ }
68
+
69
+ return $num;
70
+ }
71
+
72
+
73
+ public function ciao()
74
+ {
75
+
76
+ $page = $this->getRequest()->getParam('page') ;
77
+
78
+
79
+ return $page;
80
+ }
81
+
82
+ protected function _prepareForm()
83
+ {
84
+ $num = $this->getNum();
85
+ $page= $this->ciao();
86
+
87
+ if($page == null){
88
+ $page=1;
89
+ }else{
90
+ $page=$page;
91
+ }
92
+ $tabs= $this->getRequest()->getParam('id');
93
+ #$page=$_GET['page'];
94
+ $resource = Mage::getSingleton('core/resource');
95
+ $readConnection = $resource->getConnection('core_read');
96
+
97
+ $query = "SELECT `group_id` FROM bumble_filter_group WHERE `filter_id`= '$tabs' AND `page`= '$page'";
98
+
99
+ $results = $readConnection->fetchAll($query);
100
+
101
+
102
+ if($page)
103
+ {
104
+ $resPage= (20 * $page)-20;
105
+ }
106
+ $var = 16+$resPage;
107
+
108
+ /* get the results */
109
+ $group_id = $results[16]['group_id'];
110
+
111
+
112
+
113
+ $_model = Mage::registry('group_data');
114
+ $form = new Varien_Data_Form();
115
+ $this->setForm($form);
116
+
117
+ $config = Mage::getSingleton('cms/wysiwyg_config')->getConfig(
118
+ array(
119
+ 'add_widgets' => false,
120
+ 'add_variables' => false,
121
+ 'add_images' => true,
122
+ 'encode_directibumble' => false,
123
+ 'directibumble_url' => Mage::getSingleton('adminhtml/url')->getUrl('*/cms_wysiwyg/directive'),
124
+ 'files_browser_window_url' => Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/cms_wysiwyg_images/index'),
125
+ 'files_browser_window_width' => (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_width'),
126
+ 'files_browser_window_height'=> (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_height')
127
+ )
128
+ );
129
+
130
+ $fieldset = $form->addFieldset('group_form', array('legend'=>Mage::helper('bumble_filter')->__('General Information ')));
131
+
132
+
133
+ $fieldset->addField('title','text',array(
134
+ 'label'=> Mage::helper('bumble_filter')->__('Title'),
135
+ 'name'=> 'title17',
136
+ 'placeholder' => $num[$var],
137
+ 'after_element_html' => '<br /><small>'.$this->__('By Default the title will be the same of Label') .'</small>',
138
+ ));
139
+
140
+ $fieldset->addField('file','image', array(
141
+ 'label'=>Mage::helper('bumble_filter')->__('Image'),
142
+ 'name'=> 'file17',
143
+ ));
144
+
145
+ $config->setData(Mage::helper('bumble_filter')->recursiveReplace(
146
+ '/bumble_filter/',
147
+ '/'.(string)Mage::app()->getConfig()->getNode('admin/routers/adminhtml/args/frontName').'/',
148
+ $config->getData()
149
+ )
150
+ );
151
+ $fieldset->addField('identifier', 'text', array(
152
+ 'label' => Mage::helper('bumble_filter')->__('Identifier'),
153
+ 'name' => 'identifier17',
154
+ 'id' => 'identifier',
155
+ //'value' => $_model->getLabel()
156
+ ));
157
+
158
+ $fieldset->addField('description', 'editor', array(
159
+ 'label' => Mage::helper('bumble_filter')->__('Description'),
160
+ 'name' => 'description17',
161
+ 'style' => 'width:600px;height:300px;',
162
+ 'wysiwyg' => true,
163
+ 'config' => $config
164
+ ));
165
+
166
+ $fieldset->addField('status', 'select', array(
167
+ 'label' => Mage::helper('bumble_filter')->__('Is Active'),
168
+ 'name' => 'status17',
169
+ 'values' => Mage::getSingleton('adminhtml/system_config_source_yesno')->toOptionArray(),
170
+ //'value' => $_model->getStatus(),
171
+ ));
172
+
173
+
174
+ if ( Mage::getSingleton('adminhtml/session')->getGroupData() )
175
+ {
176
+ $form->setValues(Mage::getSingleton('adminhtml/session')->getGroupData());
177
+ Mage::getSingleton('adminhtml/session')->getFilterData(null);
178
+ } elseif ( Mage::registry('group_data') ) {
179
+
180
+ $newReg = Mage::getModel('bumble_filter/group')->load($group_id);
181
+
182
+
183
+ $form->setValues($newReg->getData());
184
+ }
185
+
186
+ return parent::_prepareForm();
187
+ }
188
+
189
+ }
app/code/community/Bumble/Filter/Block/Adminhtml/Group/Edit/Tab/Form18.php ADDED
@@ -0,0 +1,189 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ ------------------------------------------------------------------------*/
10
+
11
+ class Bumble_Filter_Block_Adminhtml_Group_Edit_Tab_Form18 extends Mage_Adminhtml_Block_Widget_Form
12
+ {
13
+ public function getNum()
14
+ {
15
+ $ob = $this->getRequest()->getParam('id');
16
+
17
+ $br = Mage::getModel('bumble_filter/filter')->load($ob);
18
+ $filtertype= $br->getManufacturer();
19
+ $use= $br->getUsemanufacturer();
20
+
21
+ $resource = Mage::getSingleton('core/resource');
22
+ $readConnection = $resource->getConnection('core_read');
23
+
24
+ $query = "SELECT `group_id` FROM bumble_filter_group WHERE `filter_id`= '$ob'";
25
+
26
+
27
+ $braresults = $readConnection->fetchAll($query);
28
+ $bra_id = $braresults[0]['group_id'];
29
+
30
+ $gro = Mage::getModel('bumble_filter/group')->load($bra_id);
31
+
32
+
33
+ if($use == 1)
34
+ {
35
+ if($filtertype == 'all')
36
+ {
37
+ $num = array();
38
+ $attribute = Mage::getModel('eav/config')->getAttribute('catalog_product', 'manufacturer');
39
+
40
+ foreach ( $attribute->getSource()->getAllOptions(true, true) as $option)
41
+ {
42
+ if($option['label'] != "")
43
+ {
44
+ $num[]= $option['label'];
45
+ }
46
+ }
47
+
48
+ }
49
+ else
50
+ {
51
+
52
+
53
+ $attr = Mage::getModel('catalog/resource_eav_attribute')->load(81);
54
+
55
+ $label = $attr->getSource()->getOptionText($filtertype);
56
+ $label = str_replace("'", "", $label);
57
+ $num=array();
58
+
59
+ $num[] = $label;// 2 array
60
+ }
61
+ }else{
62
+ $ob = $this->getRequest()->getParam('id');
63
+
64
+ $br = Mage::getModel('bumble_filter/filter')->load($ob);
65
+
66
+ $num = $br->getTitle();
67
+ }
68
+
69
+ return $num;
70
+ }
71
+
72
+
73
+ public function ciao()
74
+ {
75
+
76
+ $page = $this->getRequest()->getParam('page') ;
77
+
78
+
79
+ return $page;
80
+ }
81
+
82
+ protected function _prepareForm()
83
+ {
84
+ $num = $this->getNum();
85
+ $page= $this->ciao();
86
+
87
+ if($page == null){
88
+ $page=1;
89
+ }else{
90
+ $page=$page;
91
+ }
92
+ $tabs= $this->getRequest()->getParam('id');
93
+ #$page=$_GET['page'];
94
+ $resource = Mage::getSingleton('core/resource');
95
+ $readConnection = $resource->getConnection('core_read');
96
+
97
+ $query = "SELECT `group_id` FROM bumble_filter_group WHERE `filter_id`= '$tabs' AND `page`= '$page'";
98
+
99
+ $results = $readConnection->fetchAll($query);
100
+
101
+
102
+ if($page)
103
+ {
104
+ $resPage= (20 * $page)-20;
105
+ }
106
+ $var = 17+$resPage;
107
+
108
+ /* get the results */
109
+ $group_id = $results[17]['group_id'];
110
+
111
+
112
+
113
+ $_model = Mage::registry('group_data');
114
+ $form = new Varien_Data_Form();
115
+ $this->setForm($form);
116
+
117
+ $config = Mage::getSingleton('cms/wysiwyg_config')->getConfig(
118
+ array(
119
+ 'add_widgets' => false,
120
+ 'add_variables' => false,
121
+ 'add_images' => true,
122
+ 'encode_directibumble' => false,
123
+ 'directibumble_url' => Mage::getSingleton('adminhtml/url')->getUrl('*/cms_wysiwyg/directive'),
124
+ 'files_browser_window_url' => Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/cms_wysiwyg_images/index'),
125
+ 'files_browser_window_width' => (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_width'),
126
+ 'files_browser_window_height'=> (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_height')
127
+ )
128
+ );
129
+
130
+ $fieldset = $form->addFieldset('group_form', array('legend'=>Mage::helper('bumble_filter')->__('General Information ')));
131
+
132
+
133
+ $fieldset->addField('title','text',array(
134
+ 'label'=> Mage::helper('bumble_filter')->__('Title'),
135
+ 'name'=> 'title18',
136
+ 'placeholder' => $num[$var],
137
+ 'after_element_html' => '<br /><small>'.$this->__('By Default the title will be the same of Label') .'</small>',
138
+ ));
139
+
140
+ $fieldset->addField('file','image', array(
141
+ 'label'=>Mage::helper('bumble_filter')->__('Image'),
142
+ 'name'=> 'file18',
143
+ ));
144
+
145
+ $config->setData(Mage::helper('bumble_filter')->recursiveReplace(
146
+ '/bumble_filter/',
147
+ '/'.(string)Mage::app()->getConfig()->getNode('admin/routers/adminhtml/args/frontName').'/',
148
+ $config->getData()
149
+ )
150
+ );
151
+ $fieldset->addField('identifier', 'text', array(
152
+ 'label' => Mage::helper('bumble_filter')->__('Identifier'),
153
+ 'name' => 'identifier18',
154
+ 'id' => 'identifier',
155
+ //'value' => $_model->getLabel()
156
+ ));
157
+
158
+ $fieldset->addField('description', 'editor', array(
159
+ 'label' => Mage::helper('bumble_filter')->__('Description'),
160
+ 'name' => 'description18',
161
+ 'style' => 'width:600px;height:300px;',
162
+ 'wysiwyg' => true,
163
+ 'config' => $config
164
+ ));
165
+
166
+ $fieldset->addField('status', 'select', array(
167
+ 'label' => Mage::helper('bumble_filter')->__('Is Active'),
168
+ 'name' => 'status18',
169
+ 'values' => Mage::getSingleton('adminhtml/system_config_source_yesno')->toOptionArray(),
170
+ //'value' => $_model->getStatus(),
171
+ ));
172
+
173
+
174
+ if ( Mage::getSingleton('adminhtml/session')->getGroupData() )
175
+ {
176
+ $form->setValues(Mage::getSingleton('adminhtml/session')->getGroupData());
177
+ Mage::getSingleton('adminhtml/session')->getFilterData(null);
178
+ } elseif ( Mage::registry('group_data') ) {
179
+
180
+ $newReg = Mage::getModel('bumble_filter/group')->load($group_id);
181
+
182
+
183
+ $form->setValues($newReg->getData());
184
+ }
185
+
186
+ return parent::_prepareForm();
187
+ }
188
+
189
+ }
app/code/community/Bumble/Filter/Block/Adminhtml/Group/Edit/Tab/Form19.php ADDED
@@ -0,0 +1,193 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ ------------------------------------------------------------------------*/
10
+
11
+ class Bumble_Filter_Block_Adminhtml_Group_Edit_Tab_Form19 extends Mage_Adminhtml_Block_Widget_Form
12
+ {
13
+ public function getNum()
14
+ {
15
+ $ob = $this->getRequest()->getParam('id');
16
+
17
+ $br = Mage::getModel('bumble_filter/filter')->load($ob);
18
+ $filtertype= $br->getManufacturer();
19
+ $use= $br->getUsemanufacturer();
20
+
21
+ $resource = Mage::getSingleton('core/resource');
22
+ $readConnection = $resource->getConnection('core_read');
23
+
24
+ $query = "SELECT `group_id` FROM bumble_filter_group WHERE `filter_id`= '$ob'";
25
+
26
+
27
+ $braresults = $readConnection->fetchAll($query);
28
+ $bra_id = $braresults[0]['group_id'];
29
+
30
+ $gro = Mage::getModel('bumble_filter/group')->load($bra_id);
31
+
32
+
33
+ if($use == 1)
34
+ {
35
+ if($filtertype == 'all')
36
+ {
37
+ $num = array();
38
+ $attribute = Mage::getModel('eav/config')->getAttribute('catalog_product', 'manufacturer');
39
+
40
+ foreach ( $attribute->getSource()->getAllOptions(true, true) as $option)
41
+ {
42
+ if($option['label'] != "")
43
+ {
44
+ $num[]= $option['label'];
45
+ }
46
+ }
47
+
48
+ }
49
+ else
50
+ {
51
+
52
+
53
+ $attr = Mage::getModel('catalog/resource_eav_attribute')->load(81);
54
+
55
+ $label = $attr->getSource()->getOptionText($filtertype);
56
+ $label = str_replace("'", "", $label);
57
+ $num=array();
58
+
59
+ $num[] = $label;// 2 array
60
+ }
61
+ }else{
62
+ $ob = $this->getRequest()->getParam('id');
63
+
64
+ $br = Mage::getModel('bumble_filter/filter')->load($ob);
65
+
66
+ $num = $br->getTitle();
67
+ }
68
+
69
+ return $num;
70
+ }
71
+
72
+
73
+ public function ciao()
74
+ {
75
+
76
+ $page = $this->getRequest()->getParam('page') ;
77
+
78
+
79
+ return $page;
80
+ }
81
+
82
+ protected function _prepareForm()
83
+ {
84
+ $num = $this->getNum();
85
+ $page= $this->ciao();
86
+
87
+ if($page == null){
88
+ $page=1;
89
+ }else{
90
+ $page=$page;
91
+ }
92
+ $tabs= $this->getRequest()->getParam('id');
93
+ # $page=$_GET['page'];
94
+ $resource = Mage::getSingleton('core/resource');
95
+ $readConnection = $resource->getConnection('core_read');
96
+
97
+ $query = "SELECT `group_id` FROM bumble_filter_group WHERE `filter_id`= '$tabs' AND `page`= '$page'";
98
+
99
+ $results = $readConnection->fetchAll($query);
100
+
101
+
102
+ if($page > 1)
103
+ {
104
+ $resPage= (20 * $page)-20;
105
+ }
106
+ else{
107
+ $resPage = 0;
108
+ }
109
+ $var = 18+$resPage;
110
+
111
+
112
+ /* get the results */
113
+ $group_id = $results[18]['group_id'];
114
+
115
+
116
+
117
+ $_model = Mage::registry('group_data');
118
+ $form = new Varien_Data_Form();
119
+ $this->setForm($form);
120
+
121
+ $config = Mage::getSingleton('cms/wysiwyg_config')->getConfig(
122
+ array(
123
+ 'add_widgets' => false,
124
+ 'add_variables' => false,
125
+ 'add_images' => true,
126
+ 'encode_directibumble' => false,
127
+ 'directibumble_url' => Mage::getSingleton('adminhtml/url')->getUrl('*/cms_wysiwyg/directive'),
128
+ 'files_browser_window_url' => Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/cms_wysiwyg_images/index'),
129
+ 'files_browser_window_width' => (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_width'),
130
+ 'files_browser_window_height'=> (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_height')
131
+ )
132
+ );
133
+
134
+ $fieldset = $form->addFieldset('group_form', array('legend'=>Mage::helper('bumble_filter')->__('General Information ')));
135
+
136
+
137
+ $fieldset->addField('title','text',array(
138
+ 'label'=> Mage::helper('bumble_filter')->__('Title'),
139
+ 'name'=> 'title19',
140
+ 'placeholder' => $num[$var],
141
+ 'after_element_html' => '<br /><small>'.$this->__('By Default the title will be the same of Label') .'</small>',
142
+ ));
143
+
144
+ $fieldset->addField('file','image', array(
145
+ 'label'=>Mage::helper('bumble_filter')->__('Image'),
146
+ 'name'=> 'file19',
147
+ ));
148
+
149
+ $config->setData(Mage::helper('bumble_filter')->recursiveReplace(
150
+ '/bumble_filter/',
151
+ '/'.(string)Mage::app()->getConfig()->getNode('admin/routers/adminhtml/args/frontName').'/',
152
+ $config->getData()
153
+ )
154
+ );
155
+ $fieldset->addField('identifier', 'text', array(
156
+ 'label' => Mage::helper('bumble_filter')->__('Identifier'),
157
+ 'name' => 'identifier19',
158
+ 'id' => 'identifier',
159
+ //'value' => $_model->getLabel()
160
+ ));
161
+
162
+ $fieldset->addField('description', 'editor', array(
163
+ 'label' => Mage::helper('bumble_filter')->__('Description'),
164
+ 'name' => 'description19',
165
+ 'style' => 'width:600px;height:300px;',
166
+ 'wysiwyg' => true,
167
+ 'config' => $config
168
+ ));
169
+
170
+ $fieldset->addField('status', 'select', array(
171
+ 'label' => Mage::helper('bumble_filter')->__('Is Active'),
172
+ 'name' => 'status19',
173
+ 'values' => Mage::getSingleton('adminhtml/system_config_source_yesno')->toOptionArray(),
174
+ //'value' => $_model->getStatus(),
175
+ ));
176
+
177
+
178
+ if ( Mage::getSingleton('adminhtml/session')->getGroupData() )
179
+ {
180
+ $form->setValues(Mage::getSingleton('adminhtml/session')->getGroupData());
181
+ Mage::getSingleton('adminhtml/session')->getFilterData(null);
182
+ } elseif ( Mage::registry('group_data') ) {
183
+
184
+ $newReg = Mage::getModel('bumble_filter/group')->load($group_id);
185
+
186
+
187
+ $form->setValues($newReg->getData());
188
+ }
189
+
190
+ return parent::_prepareForm();
191
+ }
192
+
193
+ }
app/code/community/Bumble/Filter/Block/Adminhtml/Group/Edit/Tab/Form2.php ADDED
@@ -0,0 +1,196 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ ---------------------------------------------------------------------------*/
10
+
11
+ class Bumble_Filter_Block_Adminhtml_Group_Edit_Tab_Form2 extends Mage_Adminhtml_Block_Widget_Form
12
+ {
13
+ public function getNum()
14
+ {
15
+ $ob = $this->getRequest()->getParam('id');
16
+
17
+ $br = Mage::getModel('bumble_filter/filter')->load($ob);
18
+ $filtertype= $br->getManufacturer();
19
+ $use= $br->getUsemanufacturer();
20
+
21
+ $resource = Mage::getSingleton('core/resource');
22
+ $readConnection = $resource->getConnection('core_read');
23
+
24
+ $query = "SELECT `group_id` FROM bumble_filter_group WHERE `filter_id`= '$ob'";
25
+
26
+
27
+ $braresults = $readConnection->fetchAll($query);
28
+ $bra_id = $braresults[0]['group_id'];
29
+
30
+ $gro = Mage::getModel('bumble_filter/group')->load($bra_id);
31
+
32
+
33
+ if($use == 1)
34
+ {
35
+ if($filtertype == 'all')
36
+ {
37
+ $num = array();
38
+ $attribute = Mage::getModel('eav/config')->getAttribute('catalog_product', 'manufacturer');
39
+
40
+ foreach ( $attribute->getSource()->getAllOptions(true, true) as $option)
41
+ {
42
+ if($option['label'] != "")
43
+ {
44
+ $num[]= $option['label'];
45
+ }
46
+ }
47
+
48
+ }
49
+ else
50
+ {
51
+
52
+
53
+ $attr = Mage::getModel('catalog/resource_eav_attribute')->load(81);
54
+
55
+ $label = $attr->getSource()->getOptionText($filtertype);
56
+ $label = str_replace("'", "", $label);
57
+ $num=array();
58
+
59
+ $num[] = $label;// 2 array
60
+ }
61
+ }else{
62
+ $ob = $this->getRequest()->getParam('id');
63
+
64
+ $br = Mage::getModel('bumble_filter/filter')->load($ob);
65
+
66
+ $num = $br->getTitle();
67
+ }
68
+
69
+ return $num;
70
+ }
71
+
72
+
73
+ public function ciao()
74
+ {
75
+ if($_GET['page'] != null)
76
+ {
77
+ $page = $_GET['page'] ;
78
+ }
79
+ if($this->getRequest()->getParam('page') != null && $_GET['page'] == null)
80
+ {
81
+ $page = $this->getRequest()->getParam('page') ;
82
+ }
83
+
84
+ return $page;
85
+ }
86
+
87
+ protected function _prepareForm()
88
+ {
89
+ $page= $this->ciao();
90
+
91
+ if($page == null){
92
+ $page=1;
93
+ }else{
94
+ $page=$page;
95
+ }
96
+
97
+ $num = $this->getNum();
98
+ $tabs= $this->getRequest()->getParam('id');
99
+
100
+ $resource = Mage::getSingleton('core/resource');
101
+ $readConnection = $resource->getConnection('core_read');
102
+
103
+ $query = "SELECT `group_id` FROM bumble_filter_group WHERE `filter_id`= '$tabs' AND `page`= '$page'";
104
+
105
+ $results = $readConnection->fetchAll($query);
106
+
107
+
108
+ if($page)
109
+ {
110
+ $resPage= (20 * $page)-20;
111
+ }
112
+ $var = 1+$resPage;
113
+
114
+ /* get the results */
115
+ $group_id = $results[1]['group_id'];
116
+
117
+
118
+ $_model = Mage::registry('group_data');
119
+ $form = new Varien_Data_Form();
120
+ $this->setForm($form);
121
+
122
+ $config = Mage::getSingleton('cms/wysiwyg_config')->getConfig(
123
+ array(
124
+ 'add_widgets' => false,
125
+ 'add_variables' => false,
126
+ 'add_images' => true,
127
+ 'encode_directibumble' => false,
128
+ 'directibumble_url' => Mage::getSingleton('adminhtml/url')->getUrl('*/cms_wysiwyg/directive'),
129
+ 'files_browser_window_url' => Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/cms_wysiwyg_images/index'),
130
+ 'files_browser_window_width' => (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_width'),
131
+ 'files_browser_window_height'=> (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_height')
132
+ )
133
+ );
134
+
135
+ $fieldset = $form->addFieldset('group_form', array('legend'=>Mage::helper('bumble_filter')->__('General Information ')));
136
+
137
+
138
+ $fieldset->addField('title','text',array(
139
+ 'label'=> Mage::helper('bumble_filter')->__('Title'),
140
+ 'name'=> 'title2',
141
+ 'placeholder' => $num[$var],
142
+ 'after_element_html' => '<br /><small>'.$this->__('By Default the title will be the same of Label') .'</small>',
143
+ ));
144
+
145
+ $fieldset->addField('file','image', array(
146
+ 'label'=>Mage::helper('bumble_filter')->__('Image'),
147
+ 'name'=> 'file2',
148
+ ));
149
+
150
+ $config->setData(Mage::helper('bumble_filter')->recursiveReplace(
151
+ '/bumble_filter/',
152
+ '/'.(string)Mage::app()->getConfig()->getNode('admin/routers/adminhtml/args/frontName').'/',
153
+ $config->getData()
154
+ )
155
+ );
156
+ $fieldset->addField('identifier', 'text', array(
157
+ 'label' => Mage::helper('bumble_filter')->__('Identifier'),
158
+ 'name' => 'identifier2',
159
+ 'id' => 'identifier',
160
+ //'value' => $_model->getLabel()
161
+ ));
162
+
163
+ $fieldset->addField('description', 'editor', array(
164
+ 'label' => Mage::helper('bumble_filter')->__('Description'),
165
+ 'name' => 'description2',
166
+ 'style' => 'width:600px;height:300px;',
167
+ 'wysiwyg' => true,
168
+ 'config' => $config
169
+ ));
170
+
171
+ $fieldset->addField('status', 'select', array(
172
+ 'label' => Mage::helper('bumble_filter')->__('Is Active'),
173
+ 'name' => 'status2',
174
+ 'values' => Mage::getSingleton('adminhtml/system_config_source_yesno')->toOptionArray(),
175
+ //'value' => $_model->getStatus(),
176
+ ));
177
+
178
+
179
+
180
+ if ( Mage::getSingleton('adminhtml/session')->getGroupData() )
181
+ {
182
+ $form->setValues(Mage::getSingleton('adminhtml/session')->getGroupData());
183
+ Mage::getSingleton('adminhtml/session')->getFilterData(null);
184
+ } elseif ( Mage::registry('group_data') ) {
185
+
186
+ $newReg = Mage::getModel('bumble_filter/group')->load($group_id);
187
+
188
+
189
+ $form->setValues($newReg->getData());
190
+ }
191
+
192
+
193
+ return parent::_prepareForm();
194
+ }
195
+
196
+ }
app/code/community/Bumble/Filter/Block/Adminhtml/Group/Edit/Tab/Form20.php ADDED
@@ -0,0 +1,190 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ ------------------------------------------------------------------------*/
10
+
11
+ class Bumble_Filter_Block_Adminhtml_Group_Edit_Tab_Form20 extends Mage_Adminhtml_Block_Widget_Form
12
+ {
13
+ public function getNum()
14
+ {
15
+ $ob = $this->getRequest()->getParam('id');
16
+
17
+ $br = Mage::getModel('bumble_filter/filter')->load($ob);
18
+ $filtertype= $br->getManufacturer();
19
+ $use= $br->getUsemanufacturer();
20
+
21
+ $resource = Mage::getSingleton('core/resource');
22
+ $readConnection = $resource->getConnection('core_read');
23
+
24
+ $query = "SELECT `group_id` FROM bumble_filter_group WHERE `filter_id`= '$ob'";
25
+
26
+
27
+ $braresults = $readConnection->fetchAll($query);
28
+ $bra_id = $braresults[0]['group_id'];
29
+
30
+ $gro = Mage::getModel('bumble_filter/group')->load($bra_id);
31
+
32
+
33
+ if($use == 1)
34
+ {
35
+ if($filtertype == 'all')
36
+ {
37
+ $num = array();
38
+ $attribute = Mage::getModel('eav/config')->getAttribute('catalog_product', 'manufacturer');
39
+
40
+ foreach ( $attribute->getSource()->getAllOptions(true, true) as $option)
41
+ {
42
+ if($option['label'] != "")
43
+ {
44
+ $num[]= $option['label'];
45
+ }
46
+ }
47
+
48
+ }
49
+ else
50
+ {
51
+
52
+
53
+ $attr = Mage::getModel('catalog/resource_eav_attribute')->load(81);
54
+
55
+ $label = $attr->getSource()->getOptionText($filtertype);
56
+ $label = str_replace("'", "", $label);
57
+ $num=array();
58
+
59
+ $num[] = $label;// 2 array
60
+ }
61
+ }else{
62
+ $ob = $this->getRequest()->getParam('id');
63
+
64
+ $br = Mage::getModel('bumble_filter/filter')->load($ob);
65
+
66
+ $num = $br->getTitle();
67
+ }
68
+
69
+ return $num;
70
+ }
71
+
72
+
73
+ public function ciao()
74
+ {
75
+
76
+ $page = $this->getRequest()->getParam('page') ;
77
+
78
+
79
+ return $page;
80
+ }
81
+
82
+ protected function _prepareForm()
83
+ {
84
+ $num = $this->getNum();
85
+ $page= $this->ciao();
86
+
87
+ if($page == null){
88
+ $page=1;
89
+ }else{
90
+ $page=$page;
91
+ }
92
+ $tabs= $this->getRequest()->getParam('id');
93
+ #$page=$_GET['page'];
94
+ $resource = Mage::getSingleton('core/resource');
95
+ $readConnection = $resource->getConnection('core_read');
96
+
97
+ $query = "SELECT `group_id` FROM bumble_filter_group WHERE `filter_id`= '$tabs' AND `page`= '$page'";
98
+
99
+ $results = $readConnection->fetchAll($query);
100
+
101
+
102
+ if($page)
103
+ {
104
+ $resPage= (20 * $page)-20;
105
+ }
106
+
107
+ $var = 19+$resPage;
108
+
109
+ /* get the results */
110
+ $group_id = $results[19]['group_id'];
111
+
112
+
113
+
114
+ $_model = Mage::registry('group_data');
115
+ $form = new Varien_Data_Form();
116
+ $this->setForm($form);
117
+
118
+ $config = Mage::getSingleton('cms/wysiwyg_config')->getConfig(
119
+ array(
120
+ 'add_widgets' => false,
121
+ 'add_variables' => false,
122
+ 'add_images' => true,
123
+ 'encode_directibumble' => false,
124
+ 'directibumble_url' => Mage::getSingleton('adminhtml/url')->getUrl('*/cms_wysiwyg/directive'),
125
+ 'files_browser_window_url' => Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/cms_wysiwyg_images/index'),
126
+ 'files_browser_window_width' => (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_width'),
127
+ 'files_browser_window_height'=> (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_height')
128
+ )
129
+ );
130
+
131
+ $fieldset = $form->addFieldset('group_form', array('legend'=>Mage::helper('bumble_filter')->__('General Information ')));
132
+
133
+
134
+ $fieldset->addField('title','text',array(
135
+ 'label'=> Mage::helper('bumble_filter')->__('Title'),
136
+ 'name'=> 'title20',
137
+ 'placeholder' => $num[$var],
138
+ 'after_element_html' => '<br /><small>'.$this->__('By Default the title will be the same of Label') .'</small>',
139
+ ));
140
+
141
+ $fieldset->addField('file','image', array(
142
+ 'label'=>Mage::helper('bumble_filter')->__('Image'),
143
+ 'name'=> 'file20',
144
+ ));
145
+
146
+ $config->setData(Mage::helper('bumble_filter')->recursiveReplace(
147
+ '/bumble_filter/',
148
+ '/'.(string)Mage::app()->getConfig()->getNode('admin/routers/adminhtml/args/frontName').'/',
149
+ $config->getData()
150
+ )
151
+ );
152
+ $fieldset->addField('identifier', 'text', array(
153
+ 'label' => Mage::helper('bumble_filter')->__('Identifier'),
154
+ 'name' => 'identifier20',
155
+ 'id' => 'identifier',
156
+ //'value' => $_model->getLabel()
157
+ ));
158
+
159
+ $fieldset->addField('description', 'editor', array(
160
+ 'label' => Mage::helper('bumble_filter')->__('Description'),
161
+ 'name' => 'description20',
162
+ 'style' => 'width:600px;height:300px;',
163
+ 'wysiwyg' => true,
164
+ 'config' => $config
165
+ ));
166
+
167
+ $fieldset->addField('status', 'select', array(
168
+ 'label' => Mage::helper('bumble_filter')->__('Is Active'),
169
+ 'name' => 'status20',
170
+ 'values' => Mage::getSingleton('adminhtml/system_config_source_yesno')->toOptionArray(),
171
+ //'value' => $_model->getStatus(),
172
+ ));
173
+
174
+
175
+ if ( Mage::getSingleton('adminhtml/session')->getGroupData() )
176
+ {
177
+ $form->setValues(Mage::getSingleton('adminhtml/session')->getGroupData());
178
+ Mage::getSingleton('adminhtml/session')->getFilterData(null);
179
+ } elseif ( Mage::registry('group_data') ) {
180
+
181
+ $newReg = Mage::getModel('bumble_filter/group')->load($group_id);
182
+
183
+
184
+ $form->setValues($newReg->getData());
185
+ }
186
+
187
+ return parent::_prepareForm();
188
+ }
189
+
190
+ }
app/code/community/Bumble/Filter/Block/Adminhtml/Group/Edit/Tab/Form21.php ADDED
@@ -0,0 +1,174 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ ---------------------------------------------------------------------------*/
10
+
11
+ class Bumble_Filter_Block_Adminhtml_Group_Edit_Tab_Form21 extends Mage_Adminhtml_Block_Widget_Form
12
+ {
13
+ public function getNum()
14
+ {
15
+ $ob = $this->getRequest()->getParam('id');
16
+
17
+ $br = Mage::getModel('bumble_filter/filter')->load($ob);
18
+ $filtertype= $br->getManufacturer();
19
+ $use= $br->getUsemanufacturer();
20
+
21
+ $resource = Mage::getSingleton('core/resource');
22
+ $readConnection = $resource->getConnection('core_read');
23
+
24
+ $query = "SELECT `group_id` FROM bumble_filter_group WHERE `filter_id`= '$ob'";
25
+
26
+
27
+ $braresults = $readConnection->fetchAll($query);
28
+ $bra_id = $braresults[0]['group_id'];
29
+
30
+ $gro = Mage::getModel('bumble_filter/group')->load($bra_id);
31
+
32
+
33
+ if($use == 1)
34
+ {
35
+ if($filtertype == 'all')
36
+ {
37
+ $num = array();
38
+ $attribute = Mage::getModel('eav/config')->getAttribute('catalog_product', 'manufacturer');
39
+
40
+ foreach ( $attribute->getSource()->getAllOptions(true, true) as $option)
41
+ {
42
+ if($option['label'] != "")
43
+ {
44
+ $num[]= $option['label'];
45
+ }
46
+ }
47
+
48
+ }
49
+ else
50
+ {
51
+
52
+
53
+ $attr = Mage::getModel('catalog/resource_eav_attribute')->load(81);
54
+
55
+ $label = $attr->getSource()->getOptionText($filtertype);
56
+ $label = str_replace("'", "", $label);
57
+ $num=array();
58
+
59
+ $num[] = $label;// 2 array
60
+ }
61
+ }else{
62
+ $ob = $this->getRequest()->getParam('id');
63
+
64
+ $br = Mage::getModel('bumble_filter/filter')->load($ob);
65
+
66
+ $num = $br->getTitle();
67
+ }
68
+
69
+ return $num;
70
+ }
71
+
72
+
73
+ protected function _prepareForm()
74
+ {
75
+ $num = $this->getNum();
76
+ $tabs= $this->getRequest()->getParam('id');
77
+
78
+ $resource = Mage::getSingleton('core/resource');
79
+ $readConnection = $resource->getConnection('core_read');
80
+
81
+ $query = "SELECT `group_id` FROM bumble_filter_group WHERE `filter_id`= '$tabs'";
82
+
83
+ $results = $readConnection->fetchAll($query);
84
+
85
+ $page=$_GET['page'];
86
+ if($page)
87
+ {
88
+ $resPage= (20 * $page)-20;
89
+ }
90
+ $var = 1+$resPage;
91
+
92
+ /* get the results */
93
+ $group_id = $results[$var]['group_id'];
94
+
95
+
96
+ $_model = Mage::registry('group_data');
97
+ $form = new Varien_Data_Form();
98
+ $this->setForm($form);
99
+
100
+ $config = Mage::getSingleton('cms/wysiwyg_config')->getConfig(
101
+ array(
102
+ 'add_widgets' => false,
103
+ 'add_variables' => false,
104
+ 'add_images' => true,
105
+ 'encode_directibumble' => false,
106
+ 'directibumble_url' => Mage::getSingleton('adminhtml/url')->getUrl('*/cms_wysiwyg/directive'),
107
+ 'files_browser_window_url' => Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/cms_wysiwyg_images/index'),
108
+ 'files_browser_window_width' => (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_width'),
109
+ 'files_browser_window_height'=> (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_height')
110
+ )
111
+ );
112
+
113
+ $fieldset = $form->addFieldset('group_form', array('legend'=>Mage::helper('bumble_filter')->__('General Information ')));
114
+
115
+
116
+ $fieldset->addField('title','text',array(
117
+ 'label'=> Mage::helper('bumble_filter')->__('Title'),
118
+ 'name'=> 'title21',
119
+ 'placeholder' => $num[$var],
120
+ 'after_element_html' => '<br /><small>'.$this->__('By Default the title will be the same of Label') .'</small>',
121
+ ));
122
+
123
+ $fieldset->addField('file','image', array(
124
+ 'label'=>Mage::helper('bumble_filter')->__('Image'),
125
+ 'name'=> 'file21',
126
+ ));
127
+
128
+ $config->setData(Mage::helper('bumble_filter')->recursiveReplace(
129
+ '/bumble_filter/',
130
+ '/'.(string)Mage::app()->getConfig()->getNode('admin/routers/adminhtml/args/frontName').'/',
131
+ $config->getData()
132
+ )
133
+ );
134
+ $fieldset->addField('identifier', 'text', array(
135
+ 'label' => Mage::helper('bumble_filter')->__('Identifier'),
136
+ 'name' => 'identifier21',
137
+ 'id' => 'identifier',
138
+ //'value' => $_model->getLabel()
139
+ ));
140
+
141
+ $fieldset->addField('description', 'editor', array(
142
+ 'label' => Mage::helper('bumble_filter')->__('Description'),
143
+ 'name' => 'description21',
144
+ 'style' => 'width:600px;height:300px;',
145
+ 'wysiwyg' => true,
146
+ 'config' => $config
147
+ ));
148
+
149
+ $fieldset->addField('status', 'select', array(
150
+ 'label' => Mage::helper('bumble_filter')->__('Is Active'),
151
+ 'name' => 'status21',
152
+ 'values' => Mage::getSingleton('adminhtml/system_config_source_yesno')->toOptionArray(),
153
+ //'value' => $_model->getStatus(),
154
+ ));
155
+
156
+
157
+
158
+ if ( Mage::getSingleton('adminhtml/session')->getGroupData() )
159
+ {
160
+ $form->setValues(Mage::getSingleton('adminhtml/session')->getGroupData());
161
+ Mage::getSingleton('adminhtml/session')->getFilterData(null);
162
+ } elseif ( Mage::registry('group_data') ) {
163
+
164
+ $newReg = Mage::getModel('bumble_filter/group')->load($group_id);
165
+
166
+
167
+ $form->setValues($newReg->getData());
168
+ }
169
+
170
+
171
+ return parent::_prepareForm();
172
+ }
173
+
174
+ }
app/code/community/Bumble/Filter/Block/Adminhtml/Group/Edit/Tab/Form3.php ADDED
@@ -0,0 +1,188 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ ------------------------------------------------------------------------*/
10
+
11
+ class Bumble_Filter_Block_Adminhtml_Group_Edit_Tab_Form3 extends Mage_Adminhtml_Block_Widget_Form
12
+ {
13
+ public function getNum()
14
+ {
15
+ $ob = $this->getRequest()->getParam('id');
16
+
17
+ $br = Mage::getModel('bumble_filter/filter')->load($ob);
18
+ $filtertype= $br->getManufacturer();
19
+ $use= $br->getUsemanufacturer();
20
+
21
+ $resource = Mage::getSingleton('core/resource');
22
+ $readConnection = $resource->getConnection('core_read');
23
+
24
+ $query = "SELECT `group_id` FROM bumble_filter_group WHERE `filter_id`= '$ob'";
25
+
26
+
27
+ $braresults = $readConnection->fetchAll($query);
28
+ $bra_id = $braresults[0]['group_id'];
29
+
30
+ $gro = Mage::getModel('bumble_filter/group')->load($bra_id);
31
+
32
+
33
+ if($use == 1)
34
+ {
35
+ if($filtertype == 'all')
36
+ {
37
+ $num = array();
38
+ $attribute = Mage::getModel('eav/config')->getAttribute('catalog_product', 'manufacturer');
39
+
40
+ foreach ( $attribute->getSource()->getAllOptions(true, true) as $option)
41
+ {
42
+ if($option['label'] != "")
43
+ {
44
+ $num[]= $option['label'];
45
+ }
46
+ }
47
+
48
+ }
49
+ else
50
+ {
51
+
52
+
53
+ $attr = Mage::getModel('catalog/resource_eav_attribute')->load(81);
54
+
55
+ $label = $attr->getSource()->getOptionText($filtertype);
56
+ $label = str_replace("'", "", $label);
57
+ $num=array();
58
+
59
+ $num[] = $label;// 2 array
60
+ }
61
+ }else{
62
+ $ob = $this->getRequest()->getParam('id');
63
+
64
+ $br = Mage::getModel('bumble_filter/filter')->load($ob);
65
+
66
+ $num = $br->getTitle();
67
+ }
68
+
69
+ return $num;
70
+ }
71
+
72
+
73
+ public function ciao()
74
+ {
75
+
76
+ $page = $this->getRequest()->getParam('page') ;
77
+
78
+
79
+ return $page;
80
+ }
81
+
82
+ protected function _prepareForm()
83
+ {
84
+ $num = $this->getNum();
85
+ $page= $this->ciao();
86
+
87
+ if($page == null){
88
+ $page=1;
89
+ }else{
90
+ $page=$page;
91
+ }
92
+ $tabs= $this->getRequest()->getParam('id');
93
+ #$page=$_GET['page'];
94
+ $resource = Mage::getSingleton('core/resource');
95
+ $readConnection = $resource->getConnection('core_read');
96
+
97
+ $query = "SELECT `group_id` FROM bumble_filter_group WHERE `filter_id`= '$tabs' AND `page`= '$page'";
98
+
99
+ $results = $readConnection->fetchAll($query);
100
+
101
+
102
+ if($page)
103
+ {
104
+ $resPage= (20 * $page)-20;
105
+ }
106
+
107
+ $var = 2+$resPage;
108
+
109
+ /* get the results */
110
+ $group_id = $results[2]['group_id'];
111
+
112
+ $_model = Mage::registry('group_data');
113
+ $form = new Varien_Data_Form();
114
+ $this->setForm($form);
115
+
116
+ $config = Mage::getSingleton('cms/wysiwyg_config')->getConfig(
117
+ array(
118
+ 'add_widgets' => false,
119
+ 'add_variables' => false,
120
+ 'add_images' => true,
121
+ 'encode_directibumble' => false,
122
+ 'directibumble_url' => Mage::getSingleton('adminhtml/url')->getUrl('*/cms_wysiwyg/directive'),
123
+ 'files_browser_window_url' => Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/cms_wysiwyg_images/index'),
124
+ 'files_browser_window_width' => (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_width'),
125
+ 'files_browser_window_height'=> (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_height')
126
+ )
127
+ );
128
+
129
+ $fieldset = $form->addFieldset('group_form', array('legend'=>Mage::helper('bumble_filter')->__('General Information ')));
130
+
131
+
132
+ $fieldset->addField('title','text',array(
133
+ 'label'=> Mage::helper('bumble_filter')->__('Title'),
134
+ 'name'=> 'title3',
135
+ 'placeholder' => $num[$var],
136
+ 'after_element_html' => '<br /><small>'.$this->__('By Default the title will be the same of Label') .'</small>',
137
+ ));
138
+
139
+ $fieldset->addField('file','image', array(
140
+ 'label'=>Mage::helper('bumble_filter')->__('Image'),
141
+ 'name'=> 'file3',
142
+ ));
143
+
144
+ $config->setData(Mage::helper('bumble_filter')->recursiveReplace(
145
+ '/bumble_filter/',
146
+ '/'.(string)Mage::app()->getConfig()->getNode('admin/routers/adminhtml/args/frontName').'/',
147
+ $config->getData()
148
+ )
149
+ );
150
+ $fieldset->addField('identifier', 'text', array(
151
+ 'label' => Mage::helper('bumble_filter')->__('Identifier'),
152
+ 'name' => 'identifier3',
153
+ 'id' => 'identifier',
154
+ //'value' => $_model->getLabel()
155
+ ));
156
+
157
+ $fieldset->addField('description', 'editor', array(
158
+ 'label' => Mage::helper('bumble_filter')->__('Description'),
159
+ 'name' => 'description3',
160
+ 'style' => 'width:600px;height:300px;',
161
+ 'wysiwyg' => true,
162
+ 'config' => $config
163
+ ));
164
+
165
+ $fieldset->addField('status', 'select', array(
166
+ 'label' => Mage::helper('bumble_filter')->__('Is Active'),
167
+ 'name' => 'status3',
168
+ 'values' => Mage::getSingleton('adminhtml/system_config_source_yesno')->toOptionArray(),
169
+ //'value' => $_model->getStatus(),
170
+ ));
171
+
172
+
173
+ if ( Mage::getSingleton('adminhtml/session')->getGroupData() )
174
+ {
175
+ $form->setValues(Mage::getSingleton('adminhtml/session')->getGroupData());
176
+ Mage::getSingleton('adminhtml/session')->getFilterData(null);
177
+ } elseif ( Mage::registry('group_data') ) {
178
+
179
+ $newReg = Mage::getModel('bumble_filter/group')->load($group_id);
180
+
181
+
182
+ $form->setValues($newReg->getData());
183
+ }
184
+
185
+ return parent::_prepareForm();
186
+ }
187
+
188
+ }
app/code/community/Bumble/Filter/Block/Adminhtml/Group/Edit/Tab/Form4.php ADDED
@@ -0,0 +1,190 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ ------------------------------------------------------------------------*/
10
+
11
+ class Bumble_Filter_Block_Adminhtml_Group_Edit_Tab_Form4 extends Mage_Adminhtml_Block_Widget_Form
12
+ {
13
+ public function getNum()
14
+ {
15
+ $ob = $this->getRequest()->getParam('id');
16
+
17
+ $br = Mage::getModel('bumble_filter/filter')->load($ob);
18
+ $filtertype= $br->getManufacturer();
19
+ $use= $br->getUsemanufacturer();
20
+
21
+ $resource = Mage::getSingleton('core/resource');
22
+ $readConnection = $resource->getConnection('core_read');
23
+
24
+ $query = "SELECT `group_id` FROM bumble_filter_group WHERE `filter_id`= '$ob'";
25
+
26
+
27
+ $braresults = $readConnection->fetchAll($query);
28
+ $bra_id = $braresults[0]['group_id'];
29
+
30
+ $gro = Mage::getModel('bumble_filter/group')->load($bra_id);
31
+
32
+
33
+ if($use == 1)
34
+ {
35
+ if($filtertype == 'all')
36
+ {
37
+ $num = array();
38
+ $attribute = Mage::getModel('eav/config')->getAttribute('catalog_product', 'manufacturer');
39
+
40
+ foreach ( $attribute->getSource()->getAllOptions(true, true) as $option)
41
+ {
42
+ if($option['label'] != "")
43
+ {
44
+ $num[]= $option['label'];
45
+ }
46
+ }
47
+
48
+ }
49
+ else
50
+ {
51
+
52
+
53
+ $attr = Mage::getModel('catalog/resource_eav_attribute')->load(81);
54
+
55
+ $label = $attr->getSource()->getOptionText($filtertype);
56
+ $label = str_replace("'", "", $label);
57
+ $num=array();
58
+
59
+ $num[] = $label;// 2 array
60
+ }
61
+ }else{
62
+ $ob = $this->getRequest()->getParam('id');
63
+
64
+ $br = Mage::getModel('bumble_filter/filter')->load($ob);
65
+
66
+ $num = $br->getTitle();
67
+ }
68
+
69
+ return $num;
70
+ }
71
+
72
+
73
+ public function ciao()
74
+ {
75
+
76
+ $page = $this->getRequest()->getParam('page') ;
77
+
78
+
79
+ return $page;
80
+ }
81
+
82
+ protected function _prepareForm()
83
+ {
84
+ $num = $this->getNum();
85
+ $page= $this->ciao();
86
+
87
+ if($page == null){
88
+ $page=1;
89
+ }else{
90
+ $page=$page;
91
+ }
92
+ $tabs= $this->getRequest()->getParam('id');
93
+ #$page=$_GET['page'];
94
+ $resource = Mage::getSingleton('core/resource');
95
+ $readConnection = $resource->getConnection('core_read');
96
+
97
+ $query = "SELECT `group_id` FROM bumble_filter_group WHERE `filter_id`= '$tabs' AND `page`= '$page'";
98
+
99
+ $results = $readConnection->fetchAll($query);
100
+
101
+
102
+ if($page)
103
+ {
104
+ $resPage= (20 * $page)-20;
105
+ }
106
+
107
+ $var = 3+$resPage;
108
+
109
+ /* get the results */
110
+ $group_id = $results[3]['group_id'];
111
+
112
+
113
+
114
+ $_model = Mage::registry('group_data');
115
+ $form = new Varien_Data_Form();
116
+ $this->setForm($form);
117
+
118
+ $config = Mage::getSingleton('cms/wysiwyg_config')->getConfig(
119
+ array(
120
+ 'add_widgets' => false,
121
+ 'add_variables' => false,
122
+ 'add_images' => true,
123
+ 'encode_directibumble' => false,
124
+ 'directibumble_url' => Mage::getSingleton('adminhtml/url')->getUrl('*/cms_wysiwyg/directive'),
125
+ 'files_browser_window_url' => Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/cms_wysiwyg_images/index'),
126
+ 'files_browser_window_width' => (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_width'),
127
+ 'files_browser_window_height'=> (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_height')
128
+ )
129
+ );
130
+
131
+ $fieldset = $form->addFieldset('group_form', array('legend'=>Mage::helper('bumble_filter')->__('General Information ')));
132
+
133
+
134
+ $fieldset->addField('title','text',array(
135
+ 'label'=> Mage::helper('bumble_filter')->__('Title'),
136
+ 'name'=> 'title4',
137
+ 'placeholder' => $num[$var],
138
+ 'after_element_html' => '<br /><small>'.$this->__('By Default the title will be the same of Label') .'</small>',
139
+ ));
140
+
141
+ $fieldset->addField('file','image', array(
142
+ 'label'=>Mage::helper('bumble_filter')->__('Image'),
143
+ 'name'=> 'file4',
144
+ ));
145
+
146
+ $config->setData(Mage::helper('bumble_filter')->recursiveReplace(
147
+ '/bumble_filter/',
148
+ '/'.(string)Mage::app()->getConfig()->getNode('admin/routers/adminhtml/args/frontName').'/',
149
+ $config->getData()
150
+ )
151
+ );
152
+ $fieldset->addField('identifier', 'text', array(
153
+ 'label' => Mage::helper('bumble_filter')->__('Identifier'),
154
+ 'name' => 'identifier4',
155
+ 'id' => 'identifier',
156
+ //'value' => $_model->getLabel()
157
+ ));
158
+
159
+ $fieldset->addField('description', 'editor', array(
160
+ 'label' => Mage::helper('bumble_filter')->__('Description'),
161
+ 'name' => 'description4',
162
+ 'style' => 'width:600px;height:300px;',
163
+ 'wysiwyg' => true,
164
+ 'config' => $config
165
+ ));
166
+
167
+ $fieldset->addField('status', 'select', array(
168
+ 'label' => Mage::helper('bumble_filter')->__('Is Active'),
169
+ 'name' => 'status4',
170
+ 'values' => Mage::getSingleton('adminhtml/system_config_source_yesno')->toOptionArray(),
171
+ //'value' => $_model->getStatus(),
172
+ ));
173
+
174
+
175
+ if ( Mage::getSingleton('adminhtml/session')->getGroupData() )
176
+ {
177
+ $form->setValues(Mage::getSingleton('adminhtml/session')->getGroupData());
178
+ Mage::getSingleton('adminhtml/session')->getFilterData(null);
179
+ } elseif ( Mage::registry('group_data') ) {
180
+
181
+ $newReg = Mage::getModel('bumble_filter/group')->load($group_id);
182
+
183
+
184
+ $form->setValues($newReg->getData());
185
+ }
186
+
187
+ return parent::_prepareForm();
188
+ }
189
+
190
+ }
app/code/community/Bumble/Filter/Block/Adminhtml/Group/Edit/Tab/Form5.php ADDED
@@ -0,0 +1,188 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ ------------------------------------------------------------------------*/
10
+
11
+ class Bumble_Filter_Block_Adminhtml_Group_Edit_Tab_Form5 extends Mage_Adminhtml_Block_Widget_Form
12
+ {
13
+ public function getNum()
14
+ {
15
+ $ob = $this->getRequest()->getParam('id');
16
+
17
+ $br = Mage::getModel('bumble_filter/filter')->load($ob);
18
+ $filtertype= $br->getManufacturer();
19
+ $use= $br->getUsemanufacturer();
20
+
21
+ $resource = Mage::getSingleton('core/resource');
22
+ $readConnection = $resource->getConnection('core_read');
23
+
24
+ $query = "SELECT `group_id` FROM bumble_filter_group WHERE `filter_id`= '$ob'";
25
+
26
+
27
+ $braresults = $readConnection->fetchAll($query);
28
+ $bra_id = $braresults[0]['group_id'];
29
+
30
+ $gro = Mage::getModel('bumble_filter/group')->load($bra_id);
31
+
32
+
33
+ if($use == 1)
34
+ {
35
+ if($filtertype == 'all')
36
+ {
37
+ $num = array();
38
+ $attribute = Mage::getModel('eav/config')->getAttribute('catalog_product', 'manufacturer');
39
+
40
+ foreach ( $attribute->getSource()->getAllOptions(true, true) as $option)
41
+ {
42
+ if($option['label'] != "")
43
+ {
44
+ $num[]= $option['label'];
45
+ }
46
+ }
47
+
48
+ }
49
+ else
50
+ {
51
+
52
+
53
+ $attr = Mage::getModel('catalog/resource_eav_attribute')->load(81);
54
+
55
+ $label = $attr->getSource()->getOptionText($filtertype);
56
+ $label = str_replace("'", "", $label);
57
+ $num=array();
58
+
59
+ $num[] = $label;// 2 array
60
+ }
61
+ }else{
62
+ $ob = $this->getRequest()->getParam('id');
63
+
64
+ $br = Mage::getModel('bumble_filter/filter')->load($ob);
65
+
66
+ $num = $br->getTitle();
67
+ }
68
+
69
+ return $num;
70
+ }
71
+
72
+
73
+ public function ciao()
74
+ {
75
+
76
+ $page = $this->getRequest()->getParam('page') ;
77
+
78
+
79
+ return $page;
80
+ }
81
+
82
+ protected function _prepareForm()
83
+ {
84
+ $num = $this->getNum();
85
+ $page= $this->ciao();
86
+
87
+ if($page == null){
88
+ $page=1;
89
+ }else{
90
+ $page=$page;
91
+ }
92
+ $tabs= $this->getRequest()->getParam('id');
93
+ #$page=$_GET['page'];
94
+ $resource = Mage::getSingleton('core/resource');
95
+ $readConnection = $resource->getConnection('core_read');
96
+
97
+ $query = "SELECT `group_id` FROM bumble_filter_group WHERE `filter_id`= '$tabs' AND `page`= '$page'";
98
+
99
+ $results = $readConnection->fetchAll($query);
100
+
101
+
102
+ if($page)
103
+ {
104
+ $resPage= (20 * $page)-20;
105
+ }
106
+ $var = 4+$resPage;
107
+ /* get the results */
108
+ $group_id = $results[4]['group_id'];
109
+
110
+
111
+
112
+ $_model = Mage::registry('group_data');
113
+ $form = new Varien_Data_Form();
114
+ $this->setForm($form);
115
+
116
+ $config = Mage::getSingleton('cms/wysiwyg_config')->getConfig(
117
+ array(
118
+ 'add_widgets' => false,
119
+ 'add_variables' => false,
120
+ 'add_images' => true,
121
+ 'encode_directibumble' => false,
122
+ 'directibumble_url' => Mage::getSingleton('adminhtml/url')->getUrl('*/cms_wysiwyg/directive'),
123
+ 'files_browser_window_url' => Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/cms_wysiwyg_images/index'),
124
+ 'files_browser_window_width' => (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_width'),
125
+ 'files_browser_window_height'=> (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_height')
126
+ )
127
+ );
128
+
129
+ $fieldset = $form->addFieldset('group_form', array('legend'=>Mage::helper('bumble_filter')->__('General Information ')));
130
+
131
+
132
+ $fieldset->addField('title','text',array(
133
+ 'label'=> Mage::helper('bumble_filter')->__('Title'),
134
+ 'name'=> 'title5',
135
+ 'placeholder' => $num[$var],
136
+ 'after_element_html' => '<br /><small>'.$this->__('By Default the title will be the same of Label') .'</small>',
137
+ ));
138
+
139
+ $fieldset->addField('file','image', array(
140
+ 'label'=>Mage::helper('bumble_filter')->__('Image'),
141
+ 'name'=> 'file5',
142
+ ));
143
+
144
+ $config->setData(Mage::helper('bumble_filter')->recursiveReplace(
145
+ '/bumble_filter/',
146
+ '/'.(string)Mage::app()->getConfig()->getNode('admin/routers/adminhtml/args/frontName').'/',
147
+ $config->getData()
148
+ )
149
+ );
150
+ $fieldset->addField('identifier', 'text', array(
151
+ 'label' => Mage::helper('bumble_filter')->__('Identifier'),
152
+ 'name' => 'identifier5',
153
+ 'id' => 'identifier',
154
+ //'value' => $_model->getLabel()
155
+ ));
156
+
157
+ $fieldset->addField('description', 'editor', array(
158
+ 'label' => Mage::helper('bumble_filter')->__('Description'),
159
+ 'name' => 'description5',
160
+ 'style' => 'width:600px;height:300px;',
161
+ 'wysiwyg' => true,
162
+ 'config' => $config
163
+ ));
164
+
165
+ $fieldset->addField('status', 'select', array(
166
+ 'label' => Mage::helper('bumble_filter')->__('Is Active'),
167
+ 'name' => 'status5',
168
+ 'values' => Mage::getSingleton('adminhtml/system_config_source_yesno')->toOptionArray(),
169
+ //'value' => $_model->getStatus(),
170
+ ));
171
+
172
+
173
+ if ( Mage::getSingleton('adminhtml/session')->getGroupData() )
174
+ {
175
+ $form->setValues(Mage::getSingleton('adminhtml/session')->getGroupData());
176
+ Mage::getSingleton('adminhtml/session')->getFilterData(null);
177
+ } elseif ( Mage::registry('group_data') ) {
178
+
179
+ $newReg = Mage::getModel('bumble_filter/group')->load($group_id);
180
+
181
+
182
+ $form->setValues($newReg->getData());
183
+ }
184
+
185
+ return parent::_prepareForm();
186
+ }
187
+
188
+ }
app/code/community/Bumble/Filter/Block/Adminhtml/Group/Edit/Tab/Form6.php ADDED
@@ -0,0 +1,189 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ ------------------------------------------------------------------------*/
10
+
11
+ class Bumble_Filter_Block_Adminhtml_Group_Edit_Tab_Form6 extends Mage_Adminhtml_Block_Widget_Form
12
+ {
13
+ public function getNum()
14
+ {
15
+ $ob = $this->getRequest()->getParam('id');
16
+
17
+ $br = Mage::getModel('bumble_filter/filter')->load($ob);
18
+ $filtertype= $br->getManufacturer();
19
+ $use= $br->getUsemanufacturer();
20
+
21
+ $resource = Mage::getSingleton('core/resource');
22
+ $readConnection = $resource->getConnection('core_read');
23
+
24
+ $query = "SELECT `group_id` FROM bumble_filter_group WHERE `filter_id`= '$ob'";
25
+
26
+
27
+ $braresults = $readConnection->fetchAll($query);
28
+ $bra_id = $braresults[0]['group_id'];
29
+
30
+ $gro = Mage::getModel('bumble_filter/group')->load($bra_id);
31
+
32
+
33
+ if($use == 1)
34
+ {
35
+ if($filtertype == 'all')
36
+ {
37
+ $num = array();
38
+ $attribute = Mage::getModel('eav/config')->getAttribute('catalog_product', 'manufacturer');
39
+
40
+ foreach ( $attribute->getSource()->getAllOptions(true, true) as $option)
41
+ {
42
+ if($option['label'] != "")
43
+ {
44
+ $num[]= $option['label'];
45
+ }
46
+ }
47
+
48
+ }
49
+ else
50
+ {
51
+
52
+
53
+ $attr = Mage::getModel('catalog/resource_eav_attribute')->load(81);
54
+
55
+ $label = $attr->getSource()->getOptionText($filtertype);
56
+ $label = str_replace("'", "", $label);
57
+ $num=array();
58
+
59
+ $num[] = $label;// 2 array
60
+ }
61
+ }else{
62
+ $ob = $this->getRequest()->getParam('id');
63
+
64
+ $br = Mage::getModel('bumble_filter/filter')->load($ob);
65
+
66
+ $num = $br->getTitle();
67
+ }
68
+
69
+ return $num;
70
+ }
71
+
72
+
73
+ public function ciao()
74
+ {
75
+
76
+ $page = $this->getRequest()->getParam('page') ;
77
+
78
+
79
+ return $page;
80
+ }
81
+
82
+ protected function _prepareForm()
83
+ {
84
+ $num = $this->getNum();
85
+ $page= $this->ciao();
86
+
87
+ if($page == null){
88
+ $page=1;
89
+ }else{
90
+ $page=$page;
91
+ }
92
+ $tabs= $this->getRequest()->getParam('id');
93
+ #$page=$_GET['page'];
94
+ $resource = Mage::getSingleton('core/resource');
95
+ $readConnection = $resource->getConnection('core_read');
96
+
97
+ $query = "SELECT `group_id` FROM bumble_filter_group WHERE `filter_id`= '$tabs' AND `page`= '$page'";
98
+
99
+ $results = $readConnection->fetchAll($query);
100
+
101
+
102
+ if($page)
103
+ {
104
+ $resPage= (20 * $page)-20;
105
+ }
106
+
107
+ $var = 5+$resPage;
108
+ /* get the results */
109
+ $group_id = $results[5]['group_id'];
110
+
111
+
112
+
113
+ $_model = Mage::registry('group_data');
114
+ $form = new Varien_Data_Form();
115
+ $this->setForm($form);
116
+
117
+ $config = Mage::getSingleton('cms/wysiwyg_config')->getConfig(
118
+ array(
119
+ 'add_widgets' => false,
120
+ 'add_variables' => false,
121
+ 'add_images' => true,
122
+ 'encode_directibumble' => false,
123
+ 'directibumble_url' => Mage::getSingleton('adminhtml/url')->getUrl('*/cms_wysiwyg/directive'),
124
+ 'files_browser_window_url' => Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/cms_wysiwyg_images/index'),
125
+ 'files_browser_window_width' => (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_width'),
126
+ 'files_browser_window_height'=> (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_height')
127
+ )
128
+ );
129
+
130
+ $fieldset = $form->addFieldset('group_form', array('legend'=>Mage::helper('bumble_filter')->__('General Information ')));
131
+
132
+
133
+ $fieldset->addField('title','text',array(
134
+ 'label'=> Mage::helper('bumble_filter')->__('Title'),
135
+ 'name'=> 'title6',
136
+ 'placeholder' => $num[$var],
137
+ 'after_element_html' => '<br /><small>'.$this->__('By Default the title will be the same of Label') .'</small>',
138
+ ));
139
+
140
+ $fieldset->addField('file','image', array(
141
+ 'label'=>Mage::helper('bumble_filter')->__('Image'),
142
+ 'name'=> 'file6',
143
+ ));
144
+
145
+ $config->setData(Mage::helper('bumble_filter')->recursiveReplace(
146
+ '/bumble_filter/',
147
+ '/'.(string)Mage::app()->getConfig()->getNode('admin/routers/adminhtml/args/frontName').'/',
148
+ $config->getData()
149
+ )
150
+ );
151
+ $fieldset->addField('identifier', 'text', array(
152
+ 'label' => Mage::helper('bumble_filter')->__('Identifier'),
153
+ 'name' => 'identifier6',
154
+ 'id' => 'identifier',
155
+ //'value' => $_model->getLabel()
156
+ ));
157
+
158
+ $fieldset->addField('description', 'editor', array(
159
+ 'label' => Mage::helper('bumble_filter')->__('Description'),
160
+ 'name' => 'description6',
161
+ 'style' => 'width:600px;height:300px;',
162
+ 'wysiwyg' => true,
163
+ 'config' => $config
164
+ ));
165
+
166
+ $fieldset->addField('status', 'select', array(
167
+ 'label' => Mage::helper('bumble_filter')->__('Is Active'),
168
+ 'name' => 'status6',
169
+ 'values' => Mage::getSingleton('adminhtml/system_config_source_yesno')->toOptionArray(),
170
+ //'value' => $_model->getStatus(),
171
+ ));
172
+
173
+
174
+ if ( Mage::getSingleton('adminhtml/session')->getGroupData() )
175
+ {
176
+ $form->setValues(Mage::getSingleton('adminhtml/session')->getGroupData());
177
+ Mage::getSingleton('adminhtml/session')->getFilterData(null);
178
+ } elseif ( Mage::registry('group_data') ) {
179
+
180
+ $newReg = Mage::getModel('bumble_filter/group')->load($group_id);
181
+
182
+
183
+ $form->setValues($newReg->getData());
184
+ }
185
+
186
+ return parent::_prepareForm();
187
+ }
188
+
189
+ }
app/code/community/Bumble/Filter/Block/Adminhtml/Group/Edit/Tab/Form7.php ADDED
@@ -0,0 +1,189 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ ------------------------------------------------------------------------*/
10
+
11
+ class Bumble_Filter_Block_Adminhtml_Group_Edit_Tab_Form7 extends Mage_Adminhtml_Block_Widget_Form
12
+ {
13
+ public function getNum()
14
+ {
15
+ $ob = $this->getRequest()->getParam('id');
16
+
17
+ $br = Mage::getModel('bumble_filter/filter')->load($ob);
18
+ $filtertype= $br->getManufacturer();
19
+ $use= $br->getUsemanufacturer();
20
+
21
+ $resource = Mage::getSingleton('core/resource');
22
+ $readConnection = $resource->getConnection('core_read');
23
+
24
+ $query = "SELECT `group_id` FROM bumble_filter_group WHERE `filter_id`= '$ob'";
25
+
26
+
27
+ $braresults = $readConnection->fetchAll($query);
28
+ $bra_id = $braresults[0]['group_id'];
29
+
30
+ $gro = Mage::getModel('bumble_filter/group')->load($bra_id);
31
+
32
+
33
+ if($use == 1)
34
+ {
35
+ if($filtertype == 'all')
36
+ {
37
+ $num = array();
38
+ $attribute = Mage::getModel('eav/config')->getAttribute('catalog_product', 'manufacturer');
39
+
40
+ foreach ( $attribute->getSource()->getAllOptions(true, true) as $option)
41
+ {
42
+ if($option['label'] != "")
43
+ {
44
+ $num[]= $option['label'];
45
+ }
46
+ }
47
+
48
+ }
49
+ else
50
+ {
51
+
52
+
53
+ $attr = Mage::getModel('catalog/resource_eav_attribute')->load(81);
54
+
55
+ $label = $attr->getSource()->getOptionText($filtertype);
56
+ $label = str_replace("'", "", $label);
57
+ $num=array();
58
+
59
+ $num[] = $label;// 2 array
60
+ }
61
+ }else{
62
+ $ob = $this->getRequest()->getParam('id');
63
+
64
+ $br = Mage::getModel('bumble_filter/filter')->load($ob);
65
+
66
+ $num = $br->getTitle();
67
+ }
68
+
69
+ return $num;
70
+ }
71
+
72
+
73
+ public function ciao()
74
+ {
75
+
76
+ $page = $this->getRequest()->getParam('page') ;
77
+
78
+
79
+ return $page;
80
+ }
81
+
82
+ protected function _prepareForm()
83
+ {
84
+ $num = $this->getNum();
85
+ $page= $this->ciao();
86
+
87
+ if($page == null){
88
+ $page=1;
89
+ }else{
90
+ $page=$page;
91
+ }
92
+ $tabs= $this->getRequest()->getParam('id');
93
+ #$page=$_GET['page'];
94
+ $resource = Mage::getSingleton('core/resource');
95
+ $readConnection = $resource->getConnection('core_read');
96
+
97
+ $query = "SELECT `group_id` FROM bumble_filter_group WHERE `filter_id`= '$tabs' AND `page`= '$page'";
98
+
99
+ $results = $readConnection->fetchAll($query);
100
+
101
+
102
+ if($page)
103
+ {
104
+ $resPage= (20 * $page)-20;
105
+ }
106
+
107
+ $var = 6+$resPage;
108
+ /* get the results */
109
+ $group_id = $results[6]['group_id'];
110
+
111
+
112
+
113
+ $_model = Mage::registry('group_data');
114
+ $form = new Varien_Data_Form();
115
+ $this->setForm($form);
116
+
117
+ $config = Mage::getSingleton('cms/wysiwyg_config')->getConfig(
118
+ array(
119
+ 'add_widgets' => false,
120
+ 'add_variables' => false,
121
+ 'add_images' => true,
122
+ 'encode_directibumble' => false,
123
+ 'directibumble_url' => Mage::getSingleton('adminhtml/url')->getUrl('*/cms_wysiwyg/directive'),
124
+ 'files_browser_window_url' => Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/cms_wysiwyg_images/index'),
125
+ 'files_browser_window_width' => (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_width'),
126
+ 'files_browser_window_height'=> (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_height')
127
+ )
128
+ );
129
+
130
+ $fieldset = $form->addFieldset('group_form', array('legend'=>Mage::helper('bumble_filter')->__('General Information ')));
131
+
132
+
133
+ $fieldset->addField('title','text',array(
134
+ 'label'=> Mage::helper('bumble_filter')->__('Title'),
135
+ 'name'=> 'title7',
136
+ 'placeholder' => $num[$var],
137
+ 'after_element_html' => '<br /><small>'.$this->__('By Default the title will be the same of Label') .'</small>',
138
+ ));
139
+
140
+ $fieldset->addField('file','image', array(
141
+ 'label'=>Mage::helper('bumble_filter')->__('Image'),
142
+ 'name'=> 'file7',
143
+ ));
144
+
145
+ $config->setData(Mage::helper('bumble_filter')->recursiveReplace(
146
+ '/bumble_filter/',
147
+ '/'.(string)Mage::app()->getConfig()->getNode('admin/routers/adminhtml/args/frontName').'/',
148
+ $config->getData()
149
+ )
150
+ );
151
+ $fieldset->addField('identifier', 'text', array(
152
+ 'label' => Mage::helper('bumble_filter')->__('Identifier'),
153
+ 'name' => 'identifier7',
154
+ 'id' => 'identifier',
155
+ //'value' => $_model->getLabel()
156
+ ));
157
+
158
+ $fieldset->addField('description', 'editor', array(
159
+ 'label' => Mage::helper('bumble_filter')->__('Description'),
160
+ 'name' => 'description7',
161
+ 'style' => 'width:600px;height:300px;',
162
+ 'wysiwyg' => true,
163
+ 'config' => $config
164
+ ));
165
+
166
+ $fieldset->addField('status', 'select', array(
167
+ 'label' => Mage::helper('bumble_filter')->__('Is Active'),
168
+ 'name' => 'status7',
169
+ 'values' => Mage::getSingleton('adminhtml/system_config_source_yesno')->toOptionArray(),
170
+ //'value' => $_model->getStatus(),
171
+ ));
172
+
173
+
174
+ if ( Mage::getSingleton('adminhtml/session')->getGroupData() )
175
+ {
176
+ $form->setValues(Mage::getSingleton('adminhtml/session')->getGroupData());
177
+ Mage::getSingleton('adminhtml/session')->getFilterData(null);
178
+ } elseif ( Mage::registry('group_data') ) {
179
+
180
+ $newReg = Mage::getModel('bumble_filter/group')->load($group_id);
181
+
182
+
183
+ $form->setValues($newReg->getData());
184
+ }
185
+
186
+ return parent::_prepareForm();
187
+ }
188
+
189
+ }
app/code/community/Bumble/Filter/Block/Adminhtml/Group/Edit/Tab/Form8.php ADDED
@@ -0,0 +1,189 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ ------------------------------------------------------------------------*/
10
+
11
+ class Bumble_Filter_Block_Adminhtml_Group_Edit_Tab_Form8 extends Mage_Adminhtml_Block_Widget_Form
12
+ {
13
+ public function getNum()
14
+ {
15
+ $ob = $this->getRequest()->getParam('id');
16
+
17
+ $br = Mage::getModel('bumble_filter/filter')->load($ob);
18
+ $filtertype= $br->getManufacturer();
19
+ $use= $br->getUsemanufacturer();
20
+
21
+ $resource = Mage::getSingleton('core/resource');
22
+ $readConnection = $resource->getConnection('core_read');
23
+
24
+ $query = "SELECT `group_id` FROM bumble_filter_group WHERE `filter_id`= '$ob'";
25
+
26
+
27
+ $braresults = $readConnection->fetchAll($query);
28
+ $bra_id = $braresults[0]['group_id'];
29
+
30
+ $gro = Mage::getModel('bumble_filter/group')->load($bra_id);
31
+
32
+
33
+ if($use == 1)
34
+ {
35
+ if($filtertype == 'all')
36
+ {
37
+ $num = array();
38
+ $attribute = Mage::getModel('eav/config')->getAttribute('catalog_product', 'manufacturer');
39
+
40
+ foreach ( $attribute->getSource()->getAllOptions(true, true) as $option)
41
+ {
42
+ if($option['label'] != "")
43
+ {
44
+ $num[]= $option['label'];
45
+ }
46
+ }
47
+
48
+ }
49
+ else
50
+ {
51
+
52
+
53
+ $attr = Mage::getModel('catalog/resource_eav_attribute')->load(81);
54
+
55
+ $label = $attr->getSource()->getOptionText($filtertype);
56
+ $label = str_replace("'", "", $label);
57
+ $num=array();
58
+
59
+ $num[] = $label;// 2 array
60
+ }
61
+ }else{
62
+ $ob = $this->getRequest()->getParam('id');
63
+
64
+ $br = Mage::getModel('bumble_filter/filter')->load($ob);
65
+
66
+ $num = $br->getTitle();
67
+ }
68
+
69
+ return $num;
70
+ }
71
+
72
+
73
+ public function ciao()
74
+ {
75
+
76
+ $page = $this->getRequest()->getParam('page') ;
77
+
78
+
79
+ return $page;
80
+ }
81
+
82
+ protected function _prepareForm()
83
+ {
84
+ $num = $this->getNum();
85
+ $page= $this->ciao();
86
+
87
+ if($page == null){
88
+ $page=1;
89
+ }else{
90
+ $page=$page;
91
+ }
92
+ $tabs= $this->getRequest()->getParam('id');
93
+ # $page=$_GET['page'];
94
+ $resource = Mage::getSingleton('core/resource');
95
+ $readConnection = $resource->getConnection('core_read');
96
+
97
+ $query = "SELECT `group_id` FROM bumble_filter_group WHERE `filter_id`= '$tabs' AND `page`= '$page'";
98
+
99
+ $results = $readConnection->fetchAll($query);
100
+
101
+
102
+ if($page)
103
+ {
104
+ $resPage= (20 * $page)-20;
105
+ }
106
+ $var = 7+$resPage;
107
+
108
+ /* get the results */
109
+ $group_id = $results[7]['group_id'];
110
+
111
+
112
+
113
+ $_model = Mage::registry('group_data');
114
+ $form = new Varien_Data_Form();
115
+ $this->setForm($form);
116
+
117
+ $config = Mage::getSingleton('cms/wysiwyg_config')->getConfig(
118
+ array(
119
+ 'add_widgets' => false,
120
+ 'add_variables' => false,
121
+ 'add_images' => true,
122
+ 'encode_directibumble' => false,
123
+ 'directibumble_url' => Mage::getSingleton('adminhtml/url')->getUrl('*/cms_wysiwyg/directive'),
124
+ 'files_browser_window_url' => Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/cms_wysiwyg_images/index'),
125
+ 'files_browser_window_width' => (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_width'),
126
+ 'files_browser_window_height'=> (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_height')
127
+ )
128
+ );
129
+
130
+ $fieldset = $form->addFieldset('group_form', array('legend'=>Mage::helper('bumble_filter')->__('General Information ')));
131
+
132
+
133
+ $fieldset->addField('title','text',array(
134
+ 'label'=> Mage::helper('bumble_filter')->__('Title'),
135
+ 'name'=> 'title8',
136
+ 'placeholder' => $num[$var],
137
+ 'after_element_html' => '<br /><small>'.$this->__('By Default the title will be the same of Label') .'</small>',
138
+ ));
139
+
140
+ $fieldset->addField('file','image', array(
141
+ 'label'=>Mage::helper('bumble_filter')->__('Image'),
142
+ 'name'=> 'file8',
143
+ ));
144
+
145
+ $config->setData(Mage::helper('bumble_filter')->recursiveReplace(
146
+ '/bumble_filter/',
147
+ '/'.(string)Mage::app()->getConfig()->getNode('admin/routers/adminhtml/args/frontName').'/',
148
+ $config->getData()
149
+ )
150
+ );
151
+ $fieldset->addField('identifier', 'text', array(
152
+ 'label' => Mage::helper('bumble_filter')->__('Identifier'),
153
+ 'name' => 'identifier8',
154
+ 'id' => 'identifier',
155
+ //'value' => $_model->getLabel()
156
+ ));
157
+
158
+ $fieldset->addField('description', 'editor', array(
159
+ 'label' => Mage::helper('bumble_filter')->__('Description'),
160
+ 'name' => 'description8',
161
+ 'style' => 'width:600px;height:300px;',
162
+ 'wysiwyg' => true,
163
+ 'config' => $config
164
+ ));
165
+
166
+ $fieldset->addField('status', 'select', array(
167
+ 'label' => Mage::helper('bumble_filter')->__('Is Active'),
168
+ 'name' => 'status8',
169
+ 'values' => Mage::getSingleton('adminhtml/system_config_source_yesno')->toOptionArray(),
170
+ //'value' => $_model->getStatus(),
171
+ ));
172
+
173
+
174
+ if ( Mage::getSingleton('adminhtml/session')->getGroupData() )
175
+ {
176
+ $form->setValues(Mage::getSingleton('adminhtml/session')->getGroupData());
177
+ Mage::getSingleton('adminhtml/session')->getFilterData(null);
178
+ } elseif ( Mage::registry('group_data') ) {
179
+
180
+ $newReg = Mage::getModel('bumble_filter/group')->load($group_id);
181
+
182
+
183
+ $form->setValues($newReg->getData());
184
+ }
185
+
186
+ return parent::_prepareForm();
187
+ }
188
+
189
+ }
app/code/community/Bumble/Filter/Block/Adminhtml/Group/Edit/Tab/Form9.php ADDED
@@ -0,0 +1,189 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ ------------------------------------------------------------------------*/
10
+
11
+ class Bumble_Filter_Block_Adminhtml_Group_Edit_Tab_Form9 extends Mage_Adminhtml_Block_Widget_Form
12
+ {
13
+ public function getNum()
14
+ {
15
+ $ob = $this->getRequest()->getParam('id');
16
+
17
+ $br = Mage::getModel('bumble_filter/filter')->load($ob);
18
+ $filtertype= $br->getManufacturer();
19
+ $use= $br->getUsemanufacturer();
20
+
21
+ $resource = Mage::getSingleton('core/resource');
22
+ $readConnection = $resource->getConnection('core_read');
23
+
24
+ $query = "SELECT `group_id` FROM bumble_filter_group WHERE `filter_id`= '$ob'";
25
+
26
+
27
+ $braresults = $readConnection->fetchAll($query);
28
+ $bra_id = $braresults[0]['group_id'];
29
+
30
+ $gro = Mage::getModel('bumble_filter/group')->load($bra_id);
31
+
32
+
33
+ if($use == 1)
34
+ {
35
+ if($filtertype == 'all')
36
+ {
37
+ $num = array();
38
+ $attribute = Mage::getModel('eav/config')->getAttribute('catalog_product', 'manufacturer');
39
+
40
+ foreach ( $attribute->getSource()->getAllOptions(true, true) as $option)
41
+ {
42
+ if($option['label'] != "")
43
+ {
44
+ $num[]= $option['label'];
45
+ }
46
+ }
47
+
48
+ }
49
+ else
50
+ {
51
+
52
+
53
+ $attr = Mage::getModel('catalog/resource_eav_attribute')->load(81);
54
+
55
+ $label = $attr->getSource()->getOptionText($filtertype);
56
+ $label = str_replace("'", "", $label);
57
+ $num=array();
58
+
59
+ $num[] = $label;// 2 array
60
+ }
61
+ }else{
62
+ $ob = $this->getRequest()->getParam('id');
63
+
64
+ $br = Mage::getModel('bumble_filter/filter')->load($ob);
65
+
66
+ $num = $br->getTitle();
67
+ }
68
+
69
+ return $num;
70
+ }
71
+
72
+
73
+ public function ciao()
74
+ {
75
+
76
+ $page = $this->getRequest()->getParam('page') ;
77
+
78
+
79
+ return $page;
80
+ }
81
+
82
+ protected function _prepareForm()
83
+ {
84
+ $num = $this->getNum();
85
+ $page= $this->ciao();
86
+
87
+ if($page == null){
88
+ $page=1;
89
+ }else{
90
+ $page=$page;
91
+ }
92
+ $tabs= $this->getRequest()->getParam('id');
93
+ #$page=$_GET['page'];
94
+ $resource = Mage::getSingleton('core/resource');
95
+ $readConnection = $resource->getConnection('core_read');
96
+
97
+ $query = "SELECT `group_id` FROM bumble_filter_group WHERE `filter_id`= '$tabs' AND `page`= '$page'";
98
+
99
+ $results = $readConnection->fetchAll($query);
100
+
101
+
102
+ if($page)
103
+ {
104
+ $resPage= (20 * $page)-20;
105
+ }
106
+ $var = 8+$resPage;
107
+
108
+ /* get the results */
109
+ $group_id = $results[8]['group_id'];
110
+
111
+
112
+
113
+ $_model = Mage::registry('group_data');
114
+ $form = new Varien_Data_Form();
115
+ $this->setForm($form);
116
+
117
+ $config = Mage::getSingleton('cms/wysiwyg_config')->getConfig(
118
+ array(
119
+ 'add_widgets' => false,
120
+ 'add_variables' => false,
121
+ 'add_images' => true,
122
+ 'encode_directibumble' => false,
123
+ 'directibumble_url' => Mage::getSingleton('adminhtml/url')->getUrl('*/cms_wysiwyg/directive'),
124
+ 'files_browser_window_url' => Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/cms_wysiwyg_images/index'),
125
+ 'files_browser_window_width' => (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_width'),
126
+ 'files_browser_window_height'=> (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_height')
127
+ )
128
+ );
129
+
130
+ $fieldset = $form->addFieldset('group_form', array('legend'=>Mage::helper('bumble_filter')->__('General Information ')));
131
+
132
+
133
+ $fieldset->addField('title','text',array(
134
+ 'label'=> Mage::helper('bumble_filter')->__('Title'),
135
+ 'name'=> 'title9',
136
+ 'placeholder' => $num[$var],
137
+ 'after_element_html' => '<br /><small>'.$this->__('By Default the title will be the same of Label') .'</small>',
138
+ ));
139
+
140
+ $fieldset->addField('file','image', array(
141
+ 'label'=>Mage::helper('bumble_filter')->__('Image'),
142
+ 'name'=> 'file9',
143
+ ));
144
+
145
+ $config->setData(Mage::helper('bumble_filter')->recursiveReplace(
146
+ '/bumble_filter/',
147
+ '/'.(string)Mage::app()->getConfig()->getNode('admin/routers/adminhtml/args/frontName').'/',
148
+ $config->getData()
149
+ )
150
+ );
151
+ $fieldset->addField('identifier', 'text', array(
152
+ 'label' => Mage::helper('bumble_filter')->__('Identifier'),
153
+ 'name' => 'identifier9',
154
+ 'id' => 'identifier',
155
+ //'value' => $_model->getLabel()
156
+ ));
157
+
158
+ $fieldset->addField('description', 'editor', array(
159
+ 'label' => Mage::helper('bumble_filter')->__('Description'),
160
+ 'name' => 'description9',
161
+ 'style' => 'width:600px;height:300px;',
162
+ 'wysiwyg' => true,
163
+ 'config' => $config
164
+ ));
165
+
166
+ $fieldset->addField('status', 'select', array(
167
+ 'label' => Mage::helper('bumble_filter')->__('Is Active'),
168
+ 'name' => 'status9',
169
+ 'values' => Mage::getSingleton('adminhtml/system_config_source_yesno')->toOptionArray(),
170
+ //'value' => $_model->getStatus(),
171
+ ));
172
+
173
+
174
+ if ( Mage::getSingleton('adminhtml/session')->getGroupData() )
175
+ {
176
+ $form->setValues(Mage::getSingleton('adminhtml/session')->getGroupData());
177
+ Mage::getSingleton('adminhtml/session')->getFilterData(null);
178
+ } elseif ( Mage::registry('group_data') ) {
179
+
180
+ $newReg = Mage::getModel('bumble_filter/group')->load($group_id);
181
+
182
+
183
+ $form->setValues($newReg->getData());
184
+ }
185
+
186
+ return parent::_prepareForm();
187
+ }
188
+
189
+ }
app/code/community/Bumble/Filter/Block/Adminhtml/Group/Edit/Tabs.php ADDED
@@ -0,0 +1,544 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ ----------------------------------------------------------------------------*/
10
+ class Bumble_Filter_Block_Adminhtml_Group_Edit_Tabs extends Bumble_Filter_Block_Ourtab
11
+ {
12
+
13
+ public function __construct()
14
+ {
15
+ $url = $_SERVER["REQUEST_URI"];
16
+ $route =strtok($_SERVER["REQUEST_URI"],'?');
17
+ parent::__construct();
18
+ $this->setId('group_form');
19
+ $this->setDestElementId('edit_form');
20
+ $this->setTitle(Mage::helper('bumble_filter')->__($this->__('Page').' <a onclick= "PrevSave()"><button><</button></a> '.$this->select().' <a onclick= "NextSave()"><button>></button></a>'. $this->__(' of ').$this->maxPage().'<br />'.$this->__('Total ').$this->numItem().$this->__(' Items')));
21
+
22
+ }
23
+
24
+ public function getNum()
25
+ {
26
+ $ob = $this->getRequest()->getParam('id');
27
+
28
+ $br = Mage::getModel('bumble_filter/filter')->load($ob);
29
+ $filtertype= $br->getManufacturer();
30
+ $use= $br->getUsemanufacturer();
31
+
32
+ $resource = Mage::getSingleton('core/resource');
33
+ $readConnection = $resource->getConnection('core_read');
34
+
35
+ $query = "SELECT `group_id` FROM bumble_filter_group WHERE `filter_id`= '$ob'";
36
+
37
+
38
+ $braresults = $readConnection->fetchAll($query);
39
+ $bra_id = $braresults[0]['group_id'];
40
+
41
+ $gro = Mage::getModel('bumble_filter/group')->load($bra_id);
42
+
43
+
44
+ if($use == 1)
45
+ {
46
+ if($filtertype == 'all')
47
+ {
48
+ $num = array();
49
+ $attribute = Mage::getModel('eav/config')->getAttribute('catalog_product', 'manufacturer');
50
+
51
+ foreach ( $attribute->getSource()->getAllOptions(true, true) as $option)
52
+ {
53
+ if($option['label'] != "")
54
+ {
55
+ $n = str_replace("'", "", $option['label']);
56
+ $num[]= $n;
57
+
58
+ }
59
+ }
60
+
61
+ }
62
+ else
63
+ {
64
+
65
+ $attr = Mage::getModel('catalog/resource_eav_attribute')->load(81);
66
+
67
+ $label = $attr->getSource()->getOptionText($filtertype);
68
+ $label = str_replace("'", "", $label);
69
+ $num=array();
70
+
71
+ $num[] = $label;// 2 array
72
+ }
73
+ }else{
74
+ $ob = $this->getRequest()->getParam('id');
75
+
76
+ $br = Mage::getModel('bumble_filter/filter')->load($ob);
77
+
78
+ $num =str_replace("'", "", $br->getTitle());
79
+ }
80
+
81
+ return $num;
82
+ }
83
+
84
+
85
+ public function ciao()
86
+ {
87
+ if($_GET['page'] != null)
88
+ {
89
+ $page = $_GET['page'] ;
90
+ }
91
+ if($this->getRequest()->getParam('page') != null && $_GET['page'] == null)
92
+ {
93
+ $page = $this->getRequest()->getParam('page') ;
94
+ }
95
+
96
+ return $page;
97
+ }
98
+
99
+ public function next()
100
+ {
101
+ $page= $this->ciao();
102
+
103
+ if( $page == 1 || $page == null)
104
+ {
105
+ $page = 1;
106
+ }else
107
+ {
108
+ $page = $page;
109
+ }
110
+ if(count($this->getNum()) > 1 && $page < $this->maxPage() )
111
+ {
112
+ $next = $page+1;
113
+ }else{
114
+ $next = $page;
115
+ }
116
+ return $next;
117
+ }
118
+
119
+ public function prev()
120
+ {
121
+ $page= $this->ciao();
122
+
123
+ if( $page == 1 || $page == null)
124
+ {
125
+ $page = 1;
126
+ }else
127
+ {
128
+ $page = $page;
129
+ }
130
+ if(count($this->getNum()) > 1 && $page > 1 )
131
+ {
132
+ $prev = $page-1;
133
+ }else{
134
+ $prev = $page;
135
+ }
136
+
137
+
138
+ return $prev;
139
+ }
140
+
141
+ protected function _beforeToHtml()
142
+ {
143
+ $num = $this->getNum();
144
+
145
+ $url = $_SERVER["REQUEST_URI"];
146
+ $route =strtok($_SERVER["REQUEST_URI"],'?');
147
+ $pageshow= 20;
148
+
149
+ $ob = $this->getRequest()->getParam('id');
150
+
151
+ $br = Mage::getModel('bumble_filter/filter')->load($ob);
152
+ $filtertype= $br->getManufacturer();
153
+ $use= $br->getUsemanufacturer();
154
+
155
+ $resource = Mage::getSingleton('core/resource');
156
+ $readConnection = $resource->getConnection('core_read');
157
+
158
+ $query = "SELECT `group_id` FROM bumble_filter_group WHERE `filter_id`= '$ob'";
159
+
160
+
161
+ $braresults = $readConnection->fetchAll($query);
162
+ $bra_id = $braresults[0]['group_id'];
163
+
164
+ $gro = Mage::getModel('bumble_filter/group')->load($bra_id);
165
+
166
+
167
+ if($use == 1 && $bra_id == null)
168
+ {
169
+
170
+ //Condizione pagine
171
+ if($this->ciao())
172
+ {
173
+ #var_dump($this->getNum());
174
+ if($this->ciao() > 2)//page +2
175
+ {
176
+
177
+ $numPage = $this->ciao();
178
+ $pageprev = $numPage - 1;
179
+ $pagenext = $numPage + 1;
180
+
181
+ $pageshowextra= ($pageshow * $numPage) - $pageshow ;
182
+
183
+ $num3 = array_slice($num, $pageshowextra);
184
+
185
+ $j= 1;
186
+ $incr= 1;
187
+ foreach ($num3 as $key) {
188
+ if($j <= $pageshow){
189
+ if($key != ""){
190
+ $this->addTab($key.'_section', array(
191
+ 'label' => Mage::helper('bumble_filter')->__($key),
192
+ 'title' => Mage::helper('bumble_filter')->__($key),
193
+ 'content' => $this->getLayout()->createBlock('bumble_filter/adminhtml_group_edit_tab_form'.$incr)->toHtml(),
194
+
195
+ ));
196
+ $j++;
197
+ }}
198
+ $incr++;
199
+ }
200
+
201
+ }
202
+ elseif($this->ciao() == 2) //page 2
203
+ {
204
+
205
+ $num2 = array_slice($num, $pageshow);
206
+
207
+ $j= 1;
208
+ $incr= 1;
209
+ foreach ($num2 as $key)
210
+ {
211
+ if($j <= $pageshow)
212
+ {
213
+ if($key != ""){
214
+ $this->addTab($key.'_section', array(
215
+ 'label' => Mage::helper('bumble_filter')->__($key),
216
+ 'title' => Mage::helper('bumble_filter')->__($key),
217
+ 'content' => $this->getLayout()->createBlock('bumble_filter/adminhtml_group_edit_tab_form'.$incr)->toHtml(),
218
+
219
+ ));
220
+ $j++;
221
+ }}
222
+ $incr++;
223
+ }
224
+
225
+
226
+ }
227
+ }
228
+
229
+ //Prima pagina
230
+ if($this->ciao() == 1 || $this->ciao() == null)
231
+
232
+ {
233
+
234
+ $lunghezzaArrayn= count($num);
235
+ if ($lunghezzaArrayn <= 19 )
236
+ { $incr= 1; foreach ($num as $key) {
237
+ if($key != ""){
238
+ $this->addTab($key.'_section', array(
239
+ 'label' => Mage::helper('bumble_filter')->__($key),
240
+ 'title' => Mage::helper('bumble_filter')->__($key),
241
+ 'content' => $this->getLayout()->createBlock('bumble_filter/adminhtml_group_edit_tab_form'.$incr)->toHtml(),
242
+
243
+ ));
244
+
245
+ $incr++;
246
+
247
+ } } }
248
+ else
249
+ {
250
+
251
+ $j= 1;
252
+ $incr= 1;
253
+ foreach ($num as $key) {
254
+
255
+ if($j <= $pageshow){
256
+ if($key != ""){
257
+ $this->addTab($key.'_section', array(
258
+ 'label' => Mage::helper('bumble_filter')->__($key),
259
+ 'title' => Mage::helper('bumble_filter')->__($key),
260
+ 'content' => $this->getLayout()->createBlock('bumble_filter/adminhtml_group_edit_tab_form'.$incr)->toHtml(),
261
+
262
+ ));
263
+ $j++;
264
+
265
+ }}
266
+ $incr++;
267
+ }
268
+
269
+ }
270
+
271
+ }
272
+
273
+ }//primo if is null
274
+
275
+
276
+ //if is not null
277
+ if($use == 1 && $bra_id != null && $filtertype == 'all')
278
+ {
279
+ $num=$this->getNum();
280
+
281
+ $ob = $this->getRequest()->getParam('id');
282
+
283
+
284
+ $gro = Mage::getModel('bumble_filter/group')->getCollection();
285
+ $tab= array();
286
+ foreach ($gro as $key) {
287
+ $g = Mage::getModel('bumble_filter/group')->load($key->getGroupId());
288
+ if($g->getFilterId() == $ob)
289
+ {
290
+ $replace= $g->getTabs();
291
+ $titleTabs = str_replace("'", "", $replace);
292
+ $tab[] = $titleTabs;
293
+ }
294
+ }
295
+
296
+ //array finale
297
+ $count1= count($num);
298
+ $count2= count($tab);
299
+ if($count1 != $count2)
300
+ {
301
+
302
+
303
+ foreach ($num as $key ) {
304
+
305
+ if(!in_array($key, $tab))
306
+ {
307
+ $tab[] = $key;
308
+ }
309
+
310
+ }
311
+
312
+ }
313
+
314
+ //Condizione pagine
315
+ if($this->ciao())
316
+ {
317
+
318
+ if($this->ciao() > 2)//page +2
319
+ {
320
+ $numPage = $this->ciao();
321
+ #var_dump($num[140]);
322
+ $pageprev = $numPage - 1;
323
+ $pagenext = $numPage + 1;
324
+ $resPage= (20 * $numPage)-20;
325
+ $maxresPage = $resPage + 20;
326
+ $var = $resPage;
327
+ $tab3 = array();
328
+ while($var < $maxresPage){
329
+ $tab3[] = $num[$var];
330
+
331
+ $var++;
332
+ }
333
+ #$numPage = $this->ciao();
334
+ #$pageprev = $numPage - 1;
335
+ #$pagenext = $numPage + 1;
336
+
337
+ $pageshowextra= ($pageshow * $numPage) - $pageshow ;
338
+
339
+ #$tab3 = array_slice($tab, $pageshowextra);
340
+
341
+ $j= 1;
342
+ $incr= 1;
343
+ foreach ($tab3 as $key) {
344
+ if($j <= $pageshow){
345
+ if($key != ""){
346
+ $this->addTab($key.'_section', array(
347
+ 'label' => Mage::helper('bumble_filter')->__($key),
348
+ 'title' => Mage::helper('bumble_filter')->__($key),
349
+ 'content' => $this->getLayout()->createBlock('bumble_filter/adminhtml_group_edit_tab_form'.$incr)->toHtml(),
350
+
351
+ ));
352
+ $j++;
353
+ }}
354
+ $incr++;
355
+ }
356
+
357
+ }
358
+ elseif($this->ciao() == 2) //page 2
359
+ {
360
+ $numPage = $this->ciao();
361
+ #var_dump($num[140]);
362
+ $pageprev = $numPage - 1;
363
+ $pagenext = $numPage + 1;
364
+ $resPage= (20 * $numPage)-20;
365
+ $maxresPage = $resPage + 20;
366
+ $var = $resPage;
367
+ $tab2 = array();
368
+ while($var < $maxresPage){
369
+ $tab2[] = $num[$var];
370
+
371
+ $var++;
372
+ }
373
+ #$tab2 = array_slice($tab, $pageshow);
374
+
375
+ $j= 1;
376
+ $incr= 1;
377
+ foreach ($tab2 as $key)
378
+ {
379
+ if($j <= $pageshow)
380
+ {
381
+ if($key != ""){
382
+ $this->addTab($key.'_section', array(
383
+ 'label' => Mage::helper('bumble_filter')->__($key),
384
+ 'title' => Mage::helper('bumble_filter')->__($key),
385
+ 'content' => $this->getLayout()->createBlock('bumble_filter/adminhtml_group_edit_tab_form'.$incr)->toHtml(),
386
+
387
+ ));
388
+ $j++;
389
+ }}
390
+ $incr++;
391
+ }
392
+
393
+ }
394
+ }
395
+
396
+ //Prima pagina
397
+ if($this->ciao() == 1 || $this->ciao() == null)
398
+
399
+ { $numPage = $this->ciao();
400
+ #var_dump($num[140]);
401
+ $pageprev = $numPage - 1;
402
+ $pagenext = $numPage + 1;
403
+ $resPage= (20 * $numPage)-20;
404
+ $maxresPage = $resPage + 20;
405
+ $var = $resPage;
406
+ $tab = array();
407
+ while($var < $maxresPage){
408
+ $tab[] = $num[$var];
409
+
410
+ $var++;
411
+ }
412
+
413
+ $lunghezzaArrayn= count($tab);
414
+ if ($lunghezzaArrayn <= 19 )
415
+ { $incr= 1; foreach ($tab as $key) {
416
+ if($key != ""){
417
+ $this->addTab($key.'_section', array(
418
+ 'label' => Mage::helper('bumble_filter')->__($key),
419
+ 'title' => Mage::helper('bumble_filter')->__($key),
420
+ 'content' => $this->getLayout()->createBlock('bumble_filter/adminhtml_group_edit_tab_form'.$incr)->toHtml(),
421
+
422
+ ));
423
+
424
+ $incr++;
425
+
426
+ } } }
427
+ else
428
+ {
429
+
430
+ $j= 1;
431
+ $incr= 1;
432
+ foreach ($tab as $key) {
433
+
434
+ if($j <= $pageshow){
435
+ if($key != ""){
436
+ $this->addTab($key.'_section', array(
437
+ 'label' => Mage::helper('bumble_filter')->__($key),
438
+ 'title' => Mage::helper('bumble_filter')->__($key),
439
+ 'content' => $this->getLayout()->createBlock('bumble_filter/adminhtml_group_edit_tab_form'.$incr)->toHtml(),
440
+
441
+ ));
442
+ $j++;
443
+
444
+ }}
445
+ $incr++;
446
+ }
447
+
448
+ }
449
+
450
+ }
451
+
452
+ }
453
+
454
+ if($use == 1 && $bra_id != null && $filtertype != 'all')
455
+ {
456
+ $ob = $this->getRequest()->getParam('id');
457
+
458
+ $br = Mage::getModel('bumble_filter/filter')->load($ob);
459
+
460
+ $title = $br->getManufacturer();
461
+
462
+ $attr = Mage::getModel('catalog/resource_eav_attribute')->load(81);
463
+
464
+ $label = $attr->getSource()->getOptionText($title);
465
+ $label = str_replace("'", "", $label);
466
+ // 2 array
467
+
468
+ $this->addTab($label.'_section', array(
469
+ 'label' => Mage::helper('bumble_filter')->__($label),
470
+ 'title' => Mage::helper('bumble_filter')->__($label),
471
+ 'content' => $this->getLayout()->createBlock('bumble_filter/adminhtml_group_edit_tab_form1')->toHtml(),
472
+
473
+ ));
474
+ }
475
+ if($use == 0)
476
+ {
477
+
478
+ $ob = $this->getRequest()->getParam('id');
479
+
480
+ $br = Mage::getModel('bumble_filter/filter')->load($ob);
481
+
482
+ $title = $br->getTitle();
483
+
484
+ $this->addTab($title.'_section', array(
485
+ 'label' => Mage::helper('bumble_filter')->__('Group: %s', $title),
486
+ 'title' => Mage::helper('bumble_filter')->__('Group: %s', $title),
487
+ 'content' => $this->getLayout()->createBlock('bumble_filter/adminhtml_group_edit_tab_form1')->toHtml(),
488
+
489
+ ));
490
+ }
491
+
492
+ return parent::_beforeToHtml();
493
+
494
+ }
495
+ public function select()
496
+ {
497
+ $num = $num = $this->getNum();
498
+ $sele= count($num);
499
+ $num_split= $sele/20;
500
+ $num_split = round($num_split)+1;
501
+ #location.href=\''.$route.'?page=\' + this.options[this.selectedIndex].value
502
+ $select = '<select name="SelectURL" onchange="editForm.submit($(\'edit_form\').action+\'SelectURL/*/page/\'+ this.options[this.selectedIndex].value);">';
503
+ $check = 1;
504
+ while($check <= $num_split)
505
+ {
506
+ if($this->ciao() == $check){
507
+ $selected = "selected=\"selected\"";
508
+ }else{
509
+ $selected = "";
510
+ }
511
+ $select .= '<option value="'.$check.'" '.$selected.'>'.$check.'</option>';
512
+
513
+ $check++;
514
+ }
515
+ $select .= '</select>';
516
+
517
+ return $select;
518
+ }
519
+ public function numItem()
520
+ {
521
+ $num = $num = $this->getNum();
522
+ $sele= count($num);
523
+
524
+
525
+ return $sele;
526
+ }
527
+ public function maxPage()
528
+ {
529
+ $num = $this->getNum();
530
+ $sele= count($num);
531
+ $num_split= $sele/20;
532
+ if(is_float($num_split)){
533
+ $split = explode('.', $num_split);
534
+ #var_dump($split[1]);
535
+ if($split[1] <= 5 || $split[1] <= 50){
536
+ $num_split = round($num_split)+1;
537
+ } else
538
+ {
539
+ $num_split = round($num_split);
540
+ }
541
+ }
542
+ return $num_split;
543
+ }
544
+ }
app/code/community/Bumble/Filter/Block/Adminhtml/Group/Grid.php ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Bumble_Filter_Block_Adminhtml_Group_Grid extends Mage_Adminhtml_Block_Widget_Grid
4
+ {
5
+ public function __construct() {
6
+
7
+ parent::__construct();
8
+
9
+ $this->setId('postGrid');
10
+ $this->setDefaultSort('date_from');
11
+ $this->setDefaultDir('DESC');
12
+ $this->setSaveParametersInSession(true);
13
+
14
+ }
15
+
16
+ // protected function _getStore() {
17
+ // $storeId = (int) $this->getRequest()->getParam('store', 0);
18
+ // return Mage::app()->getStore($storeId);
19
+ // }
20
+
21
+ protected function _prepareCollection() {
22
+ $collection = Mage::getModel('bumble_filter/filter')->getCollection();
23
+ //$store = $this->_getStore();
24
+ //if ($store->getId()) {
25
+ // $collection->addStoreFilter($store);
26
+ // }
27
+
28
+ $this->setCollection($collection);
29
+ return parent::_prepareCollection();
30
+ }
31
+
32
+ protected function _prepareColumns() {
33
+ $this->addColumn('filter_id', array(
34
+ 'header' => Mage::helper('bumble_filter')->__('ID'),
35
+ 'align' =>'center',
36
+ 'width' => '50px',
37
+ 'index' => 'filter_id',
38
+ ));
39
+
40
+ $this->addColumn('title', array(
41
+ 'header' => Mage::helper('bumble_filter')->__('Group Name'),
42
+ 'align' =>'center',
43
+ 'index' => 'title',
44
+ ));
45
+
46
+ $this->addColumn('status', array(
47
+ 'header' => Mage::helper('bumble_filter')->__('Status'),
48
+ 'align' => 'center',
49
+ 'width' => '80px',
50
+ 'index' => 'status',
51
+ 'type' => 'options',
52
+ 'options' => array(
53
+ 1 => Mage::helper('bumble_filter')->__('Enabled'),
54
+ 0 => Mage::helper('bumble_filter')->__('Disabled'),
55
+ //3 => Mage::helper('bumble_filter')->__('Hidden'),
56
+ ),
57
+ ));
58
+
59
+
60
+
61
+ return parent::_prepareColumns();
62
+ }
63
+
64
+ /**
65
+ * Helper function to do after load modifications
66
+ *
67
+ */
68
+ protected function _afterLoadCollection()
69
+ {
70
+ $this->getCollection()->walk('afterLoad');
71
+ parent::_afterLoadCollection();
72
+ }
73
+
74
+ /**
75
+ * Helper function to add store filter condition
76
+ *
77
+ * @param Mage_Core_Model_Mysql4_Collection_Abstract $collection Data collection
78
+ * @param Mage_Adminhtml_Block_Widget_Grid_Column $column Column information to be filtered
79
+ */
80
+ protected function _filterStoreCondition($collection, $column)
81
+ {
82
+ if (!$value = $column->getFilter()->getValue()) {
83
+ return;
84
+ }
85
+
86
+ $this->getCollection()->addStoreFilter($value);
87
+ }
88
+
89
+
90
+ public function getRowUrl($row) {
91
+
92
+
93
+ return $this->getUrl('*/*/edit/', array('id' => $row->getId(), 'page'=>1 ));
94
+ }
95
+
96
+ }
app/code/community/Bumble/Filter/Block/Adminhtml/Renderer/Group.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Bumble_Filter_Block_Adminhtml_Renderer_Group extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
3
+ {
4
+ public function render(Varien_Object $row)
5
+ {
6
+ return $this->_getValue($row);
7
+ }
8
+ protected function _getValue(Varien_Object $row)
9
+ {
10
+ $val = $row->getData($this->getColumn()->getIndex());
11
+ $val = str_replace("no_selection", "", $val);
12
+ if(empty($val)) {
13
+ return "";
14
+ }
15
+ $catCollection = Mage::getModel('bumble_filter/group')->load($val);
16
+ return $catCollection->getName();
17
+ }
18
+ }
app/code/community/Bumble/Filter/Block/Adminhtml/Renderer/Image.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Bumble_Filter_Block_Adminhtml_Renderer_Image extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
3
+ {
4
+ public function render(Varien_Object $row)
5
+ {
6
+ return $this->_getValue($row);
7
+ }
8
+ protected function _getValue(Varien_Object $row)
9
+ {
10
+
11
+ $val = $row->getData($this->getColumn()->getIndex());
12
+ $val = str_replace("no_selection", "", $val);
13
+ if(empty($val)) {
14
+ return "";
15
+ }
16
+ $url = Mage::getBaseUrl('media') . $val;
17
+ $out = "<img src=". $url ." width='100px' />";
18
+ return $out;
19
+ }
20
+ }
app/code/community/Bumble/Filter/Block/Brandnav.php ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ # BumbleTheme Filter Module
4
+ # ------------------------------------------------------------------------
5
+ # author: BumbleTheme.Com
6
+ # copyright: Copyright (C) 2012 http://www.bumbletheme.com. All Rights Reserved.
7
+ # @license: http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
8
+ # Websites: http://www.bumbletheme.com
9
+ # Technical Support: http://www.bumbletheme.com/
10
+ -------------------------------------------------------------------------*/
11
+ class Bumble_Filter_Block_Filternav extends Bumble_Filter_Block_List
12
+ {
13
+
14
+ var $_show = true;
15
+ protected $_config = array();
16
+ /**
17
+ * Contructor
18
+ */
19
+ public function __construct($attributes = array()){
20
+
21
+ parent::__construct( $attributes );
22
+ }
23
+
24
+ /**
25
+ * overrde the value of the extension's configuration
26
+ *
27
+ * @return string
28
+ */
29
+ function setConfig($key, $value) {
30
+ $this->_config[$key] = $value;
31
+ return $this;
32
+ }
33
+
34
+ public function getGeneralConfig( $val, $default = "" ){
35
+ return Mage::getStoreConfig( "bumble_filter/general_setting/".$val );
36
+ }
37
+
38
+ public function getModuleConfig( $val, $default = "" ){
39
+ $return = "";
40
+ $value = $this->getData($val);
41
+ //Check if has widget config data
42
+ if($this->hasData($val) && $value !== null) {
43
+
44
+ if($value == "true") {
45
+ return 1;
46
+ } elseif($value == "false") {
47
+ return 0;
48
+ }
49
+ return $value;
50
+
51
+ } else {
52
+
53
+ if(isset($this->_config[$val])){
54
+ $return = $this->_config[$val];
55
+ }else{
56
+ $return = Mage::getStoreConfig("bumble_filter/module_setting/".$val );
57
+ }
58
+ if($return == "" && !$default) {
59
+ $return = $default;
60
+ }
61
+
62
+ }
63
+
64
+ return $return;
65
+ }
66
+
67
+ public function _toHtml(){
68
+ $this->_show = $this->getGeneralConfig("show");
69
+ $enable_scroll = $this->getModuleConfig("enable_filternavmodule");
70
+
71
+ if(!$this->_show || !$enable_scroll) return;
72
+
73
+ $this->setTemplate( "bumble/filter/block/filternav.phtml" );
74
+
75
+ $collection = Mage::getModel( "bumble_filter/filter" )->getCollection();
76
+ $limit = $this->getModuleConfig("filternav_limit");
77
+ if($limit != "" || (int)$limit >0) {
78
+ $collection->setPageSize($limit)->setCurPage(1);
79
+ }
80
+ $this->assign( "filters", $collection );
81
+ return parent::_toHtml();
82
+ }
83
+
84
+ }
85
+ ?>
app/code/community/Bumble/Filter/Block/Carousel.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Bumble_Filter_Block_Carousel extends Mage_Core_Block_Template
4
+ {
5
+ public function __construct()
6
+ {
7
+ parent::__construct();
8
+ $this->setTemplate('bumble/filter/carousel.phtml');
9
+
10
+ }
11
+ }
app/code/community/Bumble/Filter/Block/Catalog/Layer/Sale.php ADDED
@@ -0,0 +1,166 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magento.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magento.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2006-2016 X.commerce, Inc. and affiliates (http://www.magento.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Category View block
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Catalog
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ class Bumble_Filter_Block_Category_Sale extends Mage_Core_Block_Template
35
+ {
36
+ protected function _prepareLayout()
37
+ {
38
+ parent::_prepareLayout();
39
+
40
+ $this->getLayout()->createBlock('catalog/breadcrumbs');
41
+
42
+ if ($headBlock = $this->getLayout()->getBlock('head')) {
43
+ $category = $this->getCurrentCategory();
44
+ if ($title = $category->getMetaTitle()) {
45
+ $headBlock->setTitle($title);
46
+ }
47
+ if ($description = $category->getMetaDescription()) {
48
+ $headBlock->setDescription($description);
49
+ }
50
+ if ($keywords = $category->getMetaKeywords()) {
51
+ $headBlock->setKeywords($keywords);
52
+ }
53
+ if ($this->helper('catalog/category')->canUseCanonicalTag()) {
54
+ $headBlock->addLinkRel('canonical', $category->getUrl());
55
+ }
56
+ /*
57
+ want to show rss feed in the url
58
+ */
59
+ if ($this->IsRssCatalogEnable() && $this->IsTopCategory()) {
60
+ $title = $this->helper('rss')->__('%s RSS Feed',$this->getCurrentCategory()->getName());
61
+ $headBlock->addItem('rss', $this->getRssLink(), 'title="'.$title.'"');
62
+ }
63
+ }
64
+
65
+ return $this;
66
+ }
67
+
68
+ public function IsRssCatalogEnable()
69
+ {
70
+ return Mage::getStoreConfig('rss/catalog/category');
71
+ }
72
+
73
+ public function IsTopCategory()
74
+ {
75
+ return $this->getCurrentCategory()->getLevel()==2;
76
+ }
77
+
78
+ public function getRssLink()
79
+ {
80
+ return Mage::getUrl('rss/catalog/category',
81
+ array(
82
+ 'cid' => $this->getCurrentCategory()->getId(),
83
+ 'store_id' => Mage::app()->getStore()->getId()
84
+ )
85
+ );
86
+ }
87
+
88
+ public function getProductListHtml()
89
+ {
90
+ return $this->getChildHtml('product_list');
91
+ }
92
+
93
+ /**
94
+ * Retrieve current category model object
95
+ *
96
+ * @return Mage_Catalog_Model_Category
97
+ */
98
+ public function getCurrentCategory()
99
+ {
100
+ if (!$this->hasData('current_category')) {
101
+ $this->setData('current_category', Mage::registry('current_category'));
102
+ }
103
+ return $this->getData('current_category');
104
+ }
105
+
106
+ public function getCmsBlockHtml()
107
+ {
108
+ if (!$this->getData('cms_block_html')) {
109
+ $html = $this->getLayout()->createBlock('cms/block')
110
+ ->setBlockId($this->getCurrentCategory()->getLandingPage())
111
+ ->toHtml();
112
+ $this->setData('cms_block_html', $html);
113
+ }
114
+ return $this->getData('cms_block_html');
115
+ }
116
+
117
+ /**
118
+ * Check if category display mode is "Products Only"
119
+ * @return bool
120
+ */
121
+ public function isProductMode()
122
+ {
123
+ return $this->getCurrentCategory()->getDisplayMode()==Mage_Catalog_Model_Category::DM_PRODUCT;
124
+ }
125
+
126
+ /**
127
+ * Check if category display mode is "Static Block and Products"
128
+ * @return bool
129
+ */
130
+ public function isMixedMode()
131
+ {
132
+ return $this->getCurrentCategory()->getDisplayMode()==Mage_Catalog_Model_Category::DM_MIXED;
133
+ }
134
+
135
+ /**
136
+ * Check if category display mode is "Static Block Only"
137
+ * For anchor category with applied filter Static Block Only mode not allowed
138
+ *
139
+ * @return bool
140
+ */
141
+ public function isContentMode()
142
+ {
143
+ $category = $this->getCurrentCategory();
144
+ $res = false;
145
+ if ($category->getDisplayMode()==Mage_Catalog_Model_Category::DM_PAGE) {
146
+ $res = true;
147
+ if ($category->getIsAnchor()) {
148
+ $state = Mage::getSingleton('catalog/layer')->getState();
149
+ if ($state && $state->getFilters()) {
150
+ $res = false;
151
+ }
152
+ }
153
+ }
154
+ return $res;
155
+ }
156
+
157
+ /**
158
+ * Retrieve block cache tags based on category
159
+ *
160
+ * @return array
161
+ */
162
+ public function getCacheTags()
163
+ {
164
+ return array_merge(parent::getCacheTags(), $this->getCurrentCategory()->getCacheIdTags());
165
+ }
166
+ }
app/code/community/Bumble/Filter/Block/Cmenu.php ADDED
@@ -0,0 +1,508 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Bumble_Filter_Block_Cmenu extends Bumble_Filter_Block_List {
4
+
5
+ protected $_config = '';
6
+ protected $_listDesc = array();
7
+ protected $_show = 0;
8
+ protected $_theme = "";
9
+
10
+ /**
11
+ * Contructor
12
+ */
13
+ public function __construct($attributes = array()) {
14
+ $helper = Mage::helper('bumble_filter/data');
15
+ $this->_config = $helper->get($attributes);
16
+ // echo $this->setTemplate("bumble/filter/cmemu.phtml");
17
+
18
+ if( !$this->getGeneralConfig('show') ){ return ; }
19
+ if( !$this->getConfig('enable_categoryfilter') ){ return ; }
20
+ //die("sssssss");
21
+ $my_template = $this->getTemplate();
22
+
23
+ if(empty($my_template)) {
24
+ $my_template = 'bumble/filter/cmenu.phtml';
25
+ }
26
+ $filter_id = Mage::registry('filter_id');
27
+ $this->assign('config', $this->_config);
28
+ //echo $my_template;
29
+ $this->setTemplate( $my_template );
30
+ //die;
31
+ /* End init meida files */
32
+ parent::__construct();
33
+ }
34
+ /**
35
+ * Get Current Category
36
+ * @return Mage_Catalog_Model_Category
37
+ */
38
+ public function getCurrentCategory()
39
+ {
40
+ if (Mage::getSingleton('catalog/layer')) {
41
+ return Mage::getSingleton('catalog/layer')->getCurrentCategory();
42
+ }
43
+ return false;
44
+ }
45
+ /**
46
+ * Get catagories of current store
47
+ *
48
+ * @return Varien_Data_Tree_Node_Collection
49
+ */
50
+ public function getStoreCategories()
51
+ {
52
+ $helper = Mage::helper('catalog/category');
53
+ return $helper->getStoreCategories();
54
+ }
55
+ /**
56
+ * Retrieve child categories of current category
57
+ * @return Varien_Data_Tree_Node_Collection
58
+ */
59
+ public function getCurrentChildCategories()
60
+ {
61
+ $layer = Mage::getSingleton('catalog/layer');
62
+ $category = $layer->getCurrentCategory();
63
+ /* @var $category Mage_Catalog_Model_Category */
64
+ $categories = $category->getChildrenCategories();
65
+ $productCollection = Mage::getResourceModel('catalog/product_collection');
66
+ $layer->prepareProductCollection($productCollection);
67
+ $productCollection->addCountToCategories($categories);
68
+ return $categories;
69
+ }
70
+ /**
71
+ * Checkin activity of category
72
+ * @param Varien_Object $category
73
+ * @return bool
74
+ */
75
+ public function isCategoryActive($category)
76
+ {
77
+ if ($this->getCurrentCategory()) {
78
+ return in_array($category->getId(), $this->getCurrentCategory()->getPathIds());
79
+ }
80
+ return false;
81
+ }
82
+ protected function _getCategoryInstance()
83
+ {
84
+ if (is_null($this->_categoryInstance)) {
85
+ $this->_categoryInstance = Mage::getModel('catalog/category');
86
+ }
87
+ return $this->_categoryInstance;
88
+ }
89
+
90
+ public function getProductbyFilter($cate_id,$filter_id = ''){
91
+ //$category = Mage::getModel('catalog/category')->load($cate_id);
92
+ $products = Mage::getModel('catalog/product')->getCollection()
93
+ ->joinField('category_id', 'catalog/category_product', 'category_id', 'product_id = entity_id', null, 'left')
94
+ ->addAttributeToSelect('*')
95
+ ->addAttributeToFilter('category_id',$cate_id)
96
+ ->addFieldToFilter(array(
97
+ array('attribute'=>'bumblefilter','eq'=>(int) $filter_id),
98
+ ));
99
+ return $products->count();
100
+ }
101
+
102
+ /**
103
+ * Get url for category data
104
+ *
105
+ * @param Mage_Catalog_Model_Category $category
106
+ * @return string
107
+ */
108
+ public function getCategoryUrl($category)
109
+ {
110
+ if ($category instanceof Mage_Catalog_Model_Category) {
111
+ $url = $category->getUrl();
112
+ } else {
113
+ $url = $this->_getCategoryInstance()
114
+ ->setData($category->getData())
115
+ ->getUrl();
116
+ }
117
+
118
+ return $url;
119
+ }
120
+
121
+ /**
122
+ * Enter description here...
123
+ *
124
+ * @param Mage_Catalog_Model_Category $category
125
+ * @param int $level
126
+ * @param boolean $last
127
+ * @return string
128
+ */
129
+ public function drawItem($category, $level=0, $last=false)
130
+ {
131
+
132
+ $filter_id = Mage::registry('filter_id');
133
+ $html = '';
134
+ if (!$category->getIsActive()) {
135
+ return $html;
136
+ }
137
+ if (Mage::helper('catalog/category_flat')->isEnabled()) {
138
+ $children = $category->getChildrenNodes();
139
+ $childrenCount = count($children);
140
+ } else {
141
+ $children = $category->getChildren();
142
+ $childrenCount = $children->count();
143
+ }
144
+ $hasChildren = $children && $childrenCount;
145
+ $numberproduct = $this->getProductbyFilter($category->getId(),$filter_id);
146
+ if($numberproduct){
147
+ $html.= '<li';
148
+ if ($hasChildren) {
149
+ $html.= ' onmouseover="Element.addClassName(this, \'over\') " onmouseout="Element.removeClassName(this, \'over\') "';
150
+ }
151
+
152
+ $html.= ' class="level'.$level;
153
+ $html.= ' nav-'.str_replace('/', '-', Mage::helper('catalog/category')->getCategoryUrlPath($category->getRequestPath()));
154
+ if ($this->isCategoryActive($category)) {
155
+ $html.= ' active';
156
+ }
157
+ if ($last) {
158
+ $html .= ' last';
159
+ }
160
+ if ($hasChildren) {
161
+ $cnt = 0;
162
+ foreach ($children as $child) {
163
+ if ($child->getIsActive()) {
164
+ $cnt++;
165
+ }
166
+ }
167
+ if ($cnt > 0) {
168
+ $html .= ' parent';
169
+ }
170
+ }
171
+ $html.= '">'."\n";
172
+
173
+ if($level==0)
174
+ {
175
+ $html.= '<a href="'.$this->getLink($filter_id).'?cate_id='.$category->getId().'"><span>'.$this->htmlEscape($category->getName()).'('.$numberproduct.') </span></a><span class="head"><a href="#" style="float:right;"></a></span>'."\n";
176
+ }
177
+ else
178
+ {
179
+ $html.= '<a href="'.$this->getLink($filter_id).'?cate_id='.$category->getId().'"><span>'.$this->htmlEscape($category->getName()).'('.$numberproduct.') </span></a>'."\n";
180
+ }
181
+ if ($hasChildren){
182
+
183
+ $j = 0;
184
+ $htmlChildren = '';
185
+ foreach ($children as $child) {
186
+ if ($child->getIsActive()) {
187
+ $htmlChildren.= $this->drawItem($child, $level+1, ++$j >= $cnt);
188
+ }
189
+ }
190
+
191
+ if (!empty($htmlChildren)) {
192
+ $html.= '<ul class="level' . $level . '">'."\n"
193
+ .$htmlChildren
194
+ .'</ul>';
195
+ }
196
+
197
+ }
198
+ $html.= '</li>'."\n";
199
+ }
200
+ return $html;
201
+ }
202
+ public function getLink($filter_id){
203
+ return Mage::getBaseUrl().Mage::getModel('core/url_rewrite')->loadByIdPath('bumblefilter/filter/'.$filter_id)->getRequestPath();
204
+ }
205
+ /**
206
+ * Enter description here...
207
+ *
208
+ * @return string
209
+ */
210
+ public function getCurrentCategoryPath()
211
+ {
212
+ if ($this->getCurrentCategory()) {
213
+ return explode(',', $this->getCurrentCategory()->getPathInStore());
214
+ }
215
+ return array();
216
+ }
217
+
218
+ /**
219
+ * Enter description here...
220
+ *
221
+ * @param Mage_Catalog_Model_Category $category
222
+ * @return string
223
+ */
224
+ public function drawOpenCategoryItem($category) {
225
+ $html = '';
226
+ if (!$category->getIsActive()) {
227
+ return $html;
228
+ }
229
+
230
+ $html.= '<li';
231
+
232
+ if ($this->isCategoryActive($category)) {
233
+ $html.= ' class="active"';
234
+ }
235
+
236
+ $html.= '>'."\n";
237
+ $html.= '<a href="'.$this->getCategoryUrl($category).'"><span>'.$this->htmlEscape($category->getName()).'</span></a>'."\n";
238
+
239
+ if (in_array($category->getId(), $this->getCurrentCategoryPath())){
240
+ $children = $category->getChildren();
241
+ $hasChildren = $children && $children->count();
242
+
243
+ if ($hasChildren) {
244
+ $htmlChildren = '';
245
+ foreach ($children as $child) {
246
+ $htmlChildren.= $this->drawOpenCategoryItem($child);
247
+ }
248
+
249
+ if (!empty($htmlChildren)) {
250
+ $html.= '<ul>'."\n"
251
+ .$htmlChildren
252
+ .'</ul>';
253
+ }
254
+ }
255
+ }
256
+ $html.= '</li>'."\n";
257
+ return $html;
258
+ }
259
+
260
+ // render item category
261
+ protected function _renderCategoryMenuItemHtml($category, $level = 0, $isLast = false, $isFirst = false,
262
+ $isOutermost = false, $outermostItemClass = '', $childrenWrapClass = '', $noEventAttributes = false)
263
+ {
264
+ if (!$category->getIsActive()) {
265
+ return '';
266
+ }
267
+ $html = array();
268
+
269
+ // get all children
270
+ if (Mage::helper('catalog/category_flat')->isEnabled()) {
271
+ $children = (array)$category->getChildrenNodes();
272
+ $childrenCount = count($children);
273
+ } else {
274
+ $children = $category->getChildren();
275
+ $childrenCount = $children->count();
276
+ }
277
+ $hasChildren = ($children && $childrenCount);
278
+
279
+ // select active children
280
+ $activeChildren = array();
281
+ foreach ($children as $child) {
282
+ if ($child->getIsActive()) {
283
+ $activeChildren[] = $child;
284
+ }
285
+ }
286
+ $activeChildrenCount = count($activeChildren);
287
+ $hasActiveChildren = ($activeChildrenCount > 0);
288
+
289
+ // prepare list item html classes
290
+ $classes = array();
291
+ $classes[] = 'level' . $level;
292
+ $classes[] = 'nav-' . $this->_getItemPosition($level);
293
+ $linkClass = '';
294
+ if ($isOutermost && $outermostItemClass) {
295
+ $classes[] = $outermostItemClass;
296
+ $linkClass = ' class="'.$outermostItemClass.'"';
297
+ }
298
+ if ($this->isCategoryActive($category)) {
299
+ $classes[] = 'active';
300
+ }
301
+ if ($isFirst) {
302
+ $classes[] = 'first';
303
+ }
304
+ if ($isLast) {
305
+ $classes[] = 'last';
306
+ }
307
+ if ($hasActiveChildren) {
308
+ $classes[] = 'parent';
309
+ }
310
+
311
+ // prepare list item attributes
312
+ $attributes = array();
313
+ if (count($classes) > 0) {
314
+ $attributes['class'] = implode(' ', $classes);
315
+ }
316
+ if ($hasActiveChildren && !$noEventAttributes) {
317
+ $attributes['onmouseover'] = 'Element.addClassName(this, \'over\') ';
318
+ $attributes['onmouseout'] = 'Element.removeClassName(this, \'over\') ';
319
+ }
320
+
321
+ // assemble list item with attributes
322
+ $htmlLi = '<li';
323
+ foreach ($attributes as $attrName => $attrValue) {
324
+ $htmlLi .= ' ' . $attrName . '="' . str_replace('"', '\"', $attrValue) . '"';
325
+ }
326
+ $htmlLi .= '>';
327
+ $html[] = $htmlLi;
328
+
329
+ $html[] = '<a href="'.$this->getCategoryUrl($category).'"'.$linkClass.'>';
330
+ $html[] = '<span>' . $this->escapeHtml($category->getName()) . '</span>';
331
+ $html[] = '</a>';
332
+
333
+ // render children
334
+
335
+ $htmlChildren = '';
336
+ $j = 0;
337
+ foreach ($activeChildren as $child) {
338
+ $htmlChildren .= $this->_renderCategoryMenuItemHtml(
339
+ $child,
340
+ ($level + 1),
341
+ ($j == $activeChildrenCount - 1),
342
+ ($j == 0),
343
+ false,
344
+ $outermostItemClass,
345
+ $childrenWrapClass,
346
+ $noEventAttributes
347
+ );
348
+ $j++;
349
+ }
350
+ if (!empty($htmlChildren)) {
351
+ if ($childrenWrapClass) {
352
+ $html[] = '<div class="' . $childrenWrapClass . '">';
353
+ }
354
+ $html[] = '<ul class="level' . $level . '">';
355
+ $html[] = $htmlChildren;
356
+ $html[] = '</ul>';
357
+ if ($childrenWrapClass) {
358
+ $html[] = '</div>';
359
+ }
360
+ }
361
+
362
+ $html[] = '</li>';
363
+
364
+ $html = implode("\n", $html);
365
+ return $html;
366
+ }
367
+ public function mtdrawItem($category, $level = 0, $last = false)
368
+ {
369
+ return $this->_renderCategoryMenuItemHtml($category, $level, $last);
370
+ }
371
+
372
+ protected function _getItemPosition($level)
373
+ {
374
+ $itemLevelPositions = $this->_itemLevelPositions;
375
+ if ($level == 0) {
376
+ $zeroLevelPosition = isset($this->_itemLevelPositions[$level]) ? $this->_itemLevelPositions[$level] + 1 : 1;
377
+ $itemLevelPositions = array();
378
+ //$this->_itemLevelPositions = array();
379
+ //$this->_itemLevelPositions[$level] = $zeroLevelPosition;
380
+ $itemLevelPositions[$level] = $zeroLevelPosition;
381
+ } elseif (isset($this->_itemLevelPositions[$level])) {
382
+ $itemLevelPositions[$level]++;
383
+ //$this->_itemLevelPositions[$level]++;
384
+ } else {
385
+ $itemLevelPositions[$level] = 1;
386
+ //$this->_itemLevelPositions[$level] = 1;
387
+ }
388
+
389
+ $position = array();
390
+ for($i = 0; $i <= $level; $i++) {
391
+ if (isset($this->_itemLevelPositions[$i])) {
392
+ $position[] = $this->_itemLevelPositions[$i];
393
+ }
394
+ }
395
+ return implode('-', $position);
396
+ }
397
+
398
+ public function getCheckoutUrl()
399
+ {
400
+ return $this->helper('checkout/url')->getCheckoutUrl();
401
+ }
402
+
403
+ public function getCheckCartUrl()
404
+ {
405
+ return Mage::getUrl('checkout/cart');
406
+ }
407
+
408
+
409
+
410
+
411
+ /**
412
+ * get value of the extension's configuration
413
+ *
414
+ * @return string
415
+ */
416
+ /* function getConfig($key, $default = "") {
417
+ return (!isset($this->_config[$key]) || (isset($this->_config[$key]) && empty($this->_config[$key]))) ? $default : $this->_config[$key];
418
+ }*/
419
+
420
+ /**
421
+ * overrde the value of the extension's configuration
422
+ *
423
+ * @return string
424
+ */
425
+ function setConfig($key, $value) {
426
+ $this->_config[$key] = $value;
427
+ return $this;
428
+ }
429
+
430
+ /**
431
+ *
432
+ */
433
+ function parseParams($params) {
434
+ $params = html_entity_decode($params, ENT_QUOTES);
435
+ $regex = "/\s*([^=\s]+)\s*=\s*('([^']*)'|\"([^\"]*)\"|([^\s]*))/";
436
+ preg_match_all($regex, $params, $matches);
437
+ $paramarray = null;
438
+ if (count($matches)) {
439
+ $paramarray = array();
440
+ for ($i = 0; $i < count($matches[1]); $i++) {
441
+ $key = $matches[1][$i];
442
+ $val = $matches[3][$i] ? $matches[3][$i] : ($matches[4][$i] ? $matches[4][$i] : $matches[5][$i]);
443
+ $paramarray[$key] = $val;
444
+ }
445
+ }
446
+ return $paramarray;
447
+ }
448
+
449
+ function isStaticBlock() {
450
+ $name = isset($this->_config["name"]) ? $this->_config["name"] : "";
451
+ if (!empty($name)) {
452
+ $regex1 = '/static_(\s*)/';
453
+ if (preg_match_all($regex1, $name, $matches)) {
454
+ return true;
455
+ }
456
+ }
457
+ return false;
458
+ }
459
+
460
+ function set($params) {
461
+ $params = preg_split("/\n/", $params);
462
+ foreach ($params as $param) {
463
+ $param = trim($param);
464
+ if (!$param)
465
+ continue;
466
+ $param = split("=", $param, 2);
467
+ if (count($param) == 2 && strlen(trim($param[1])) > 0)
468
+ $this->_config[trim($param[0])] = trim($param[1]);
469
+ }
470
+ $theme = $this->getConfig("theme");
471
+ if ($theme != $this->_theme) {
472
+ $mediaHelper = Mage::helper('bumble_filter/media');
473
+ $mediaHelper->addMediaFile("skin_css", "bumble_filter/" . $theme . "/style.css");
474
+ }
475
+ }
476
+
477
+ /**
478
+ * render thumbnail image
479
+ */
480
+ public function buildThumbnail($imageArray, $twidth, $theight) {
481
+ $thumbnailMode = $this->_config['thumbnailMode'];
482
+ if ($thumbnailMode != 'none') {
483
+ $imageProcessor = Mage::helper('bumble_filter/bumbleimage');
484
+ $imageProcessor->setStoredFolder();
485
+ if (is_array($imageArray)) {
486
+ foreach ($imageArray as $image) {
487
+ $thumbs[] = $imageProcessor->resize($image, $twidth, $theight);
488
+ }
489
+ } else {
490
+ $thumbs = $imageProcessor->resize($imageArray, $twidth, $theight);
491
+ }
492
+ return $thumbs;
493
+ }
494
+
495
+ return $imageArray;
496
+ }
497
+
498
+ public function substring($producttext, $length = 100, $replacer = '...', $isStriped = true) {
499
+ $producttext = strip_tags($producttext);
500
+ if (strlen($producttext) <= $length) {
501
+ return $producttext;
502
+ }
503
+ $producttext = substr($producttext, 0, $length);
504
+ $posSpace = strrpos($producttext, ' ');
505
+ return substr($producttext, 0, $posSpace) . $replacer;
506
+ }
507
+
508
+ }
app/code/community/Bumble/Filter/Block/Config/Adminhtml/Form/Field/Country.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Bumble_Filter_Block_Config_Adminhtml_Form_Field_Country
3
+ extends Mage_Core_Block_Html_Select
4
+ {
5
+ public function _toHtml()
6
+ {
7
+ $option = Mage::getSingleton('bumble_filter/options')
8
+ ->toOptionArray();
9
+ foreach ($option as $options) {
10
+ $this->addOption($options['value'], $options['label']);
11
+ }
12
+
13
+ return parent::_toHtml();
14
+ }
15
+
16
+ public function setInputName($value)
17
+ {
18
+ return $this->setName($value);
19
+ }
20
+ }
app/code/community/Bumble/Filter/Block/Config/GridShip.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Bumble_Filter_Block_Config_GridShip extends Mage_Adminhtml_Block_System_Config_Form_Field
4
+ {
5
+ protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
6
+ {
7
+ $time = intval($element->getValue());
8
+ $time = !empty($time)?$time:time();
9
+ $url = Mage::getBaseUrl('js');
10
+ $jspath = $url.'bumble_filter/form/script.js';
11
+ $csspath = $url.'bumble_filter/form/style.css';
12
+ $output = '<link rel="stylesheet" type="text/css" href="'.$csspath.'" />';
13
+
14
+ //$output .= '<script type="text/javascript" src="' . $url .'bumble_filter/jquery.js"></script>';
15
+ $output .= '<script type="text/javascript" src="'.$jspath.'"></script>';
16
+ $format = Mage::app()->getLocale()->getDateTimeFormat(Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM);
17
+ $timeUpdate = Mage::app()->getLocale()->date()->toString($format);
18
+
19
+ return $timeUpdate. $output;
20
+ }
21
+ }
22
+ ?>
app/code/community/Bumble/Filter/Block/Config/ShippingCosts.php ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Bumble_Filter_Block_Config_ShippingCosts
3
+ extends Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract
4
+ {
5
+ public function _prepareToRender()
6
+ {
7
+ $this->addColumn('from_price', array(
8
+ 'label' => Mage::helper('bumble_filter')->__('Gruppo'),
9
+ 'renderer' => $this->_getRenderer(),
10
+ 'style' => 'width:200px',
11
+
12
+ ));
13
+
14
+
15
+ $this->_addAfter = false;
16
+ $this->_addButtonLabel = Mage::helper('bumble_filter')->__('Add');
17
+ }
18
+
19
+ protected function _getRenderer()
20
+ {
21
+ if (!$this->_itemRenderer) {
22
+ $this->_itemRenderer = $this->getLayout()->createBlock(
23
+ 'bumble_filter/config_adminhtml_form_field_country', '',
24
+ array('is_render_to_js_template' => true)
25
+ );
26
+ }
27
+ return $this->_itemRenderer;
28
+ }
29
+
30
+ protected function _prepareArrayRow(Varien_Object $row)
31
+ {
32
+ $row->setData(
33
+ 'option_extra_attr_' . $this->_getRenderer()
34
+ ->calcOptionHash($row->getData('from_price')),
35
+ 'selected="selected"'
36
+ );
37
+ }
38
+
39
+ }
app/code/community/Bumble/Filter/Block/Filter/Evidenzia.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ ----------------------------------------------------------------------------*/
10
+
11
+ class Bumble_Filter_Block_Filter_Evidenzia extends Mage_Catalog_Block_Product_List {
12
+
13
+ var $_show = true;
14
+ /**
15
+ * Contructor
16
+ */
17
+ public function __construct($attributes = array())
18
+ {
19
+ $this->_show = $this->getGeneralConfig("show");
20
+
21
+ if(!$this->_show) return;
22
+ parent::__construct( $attributes );
23
+ }
24
+
25
+ public function getGeneralConfig( $val ){
26
+ return Mage::getStoreConfig( "bumble_filter/general_setting/".$val );
27
+ }
28
+
29
+ public function getConfig( $val ){
30
+ return Mage::getStoreConfig( "bumble_filter/module_setting/".$val );
31
+ }
32
+
33
+
34
+ protected function _getProductCollection() {
35
+ $filter = Mage::registry('current_filter');
36
+
37
+
38
+ $evidenzia = $filter->getEvidenzia();
39
+
40
+
41
+
42
+ if (is_null($this->_productCollection) && $evidenzia=='1') {
43
+
44
+
45
+ $collection = Mage::getModel('catalog/product')->getCollection()
46
+ ->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes())
47
+ ->addAttributeToFilter('evidenzia',
48
+ array('eq'=>'Yes')
49
+ )
50
+ ->addStoreFilter(Mage::app()->getStore()->getId())
51
+
52
+ ->addUrlRewrite();
53
+
54
+
55
+ $this->_productCollection = $collection;
56
+
57
+
58
+ Mage::getSingleton('catalog/product_status')->addSaleableFilterToCollection($this->_productCollection);
59
+ Mage::getSingleton('catalog/product_visibility')->addVisibleInSiteFilterToCollection($this->_productCollection);
60
+
61
+ }
62
+
63
+ return $this->_productCollection;
64
+ }
65
+
66
+ public function getLoadedProductCollection() {
67
+ return $this->_getProductCollection();
68
+ }
69
+
70
+ }
71
+
72
+ ?>
73
+
74
+
75
+
app/code/community/Bumble/Filter/Block/Filter/List.php ADDED
@@ -0,0 +1,208 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ ---------------------------------------------------------------------------*/
10
+
11
+ class Bumble_Filter_Block_Filter_List extends Mage_Catalog_Block_Product_List {
12
+
13
+ var $_show = true;
14
+ /**
15
+ * Contructor
16
+ */
17
+ public function __construct($attributes = array())
18
+ {
19
+
20
+
21
+ parent::__construct( $attributes );
22
+
23
+ $config_template = $this->getGeneralConfig("listing_layout");
24
+
25
+ $my_template = "";
26
+ if(isset($attributes['template']) && $attributes['template']) {
27
+
28
+ $my_template = $attributes['template'];
29
+
30
+ } elseif($this->hasData("template")) {
31
+ $my_template = $this->getData("template");
32
+
33
+ }else {
34
+ $my_template = "bumble/filter/default.phtml";
35
+ }
36
+
37
+ $this->setTemplate($my_template);
38
+
39
+ }
40
+
41
+ public function getGeneralConfig( $val ){
42
+ return Mage::getStoreConfig( "bumble_filter/general_setting/".$val );
43
+ }
44
+
45
+ public function getConfig( $val ){
46
+ return Mage::getStoreConfig( "bumble_filter/module_setting/".$val );
47
+ }
48
+ protected function _getTitleCurrentGroup()
49
+ {
50
+ $url= $_SERVER['HTTP_HOST'];
51
+ $url2 = $_SERVER["REQUEST_URI"];
52
+ $route= str_replace($url, '', $url2);
53
+ $route = str_replace('en/', '', $route);
54
+ $route= str_replace('/', '', $route);
55
+ $all = Mage::getModel('bumble_filter/filter')->getCollection();
56
+ foreach ($all as $key) {
57
+ if($route == $key->getIdentifier()){
58
+ $title = $this->__($key->getTitle());
59
+ }
60
+ }
61
+ return $title;
62
+ }
63
+
64
+ protected function _prepareLayout()
65
+ {
66
+ // $id = $this->getRequest()->getParam('id');
67
+
68
+
69
+ $title = $this->_getTitleCurrentGroup();
70
+ $module = $this->getRequest()->getModuleName();
71
+ $filter_group = $this->getRequest()->getParam('category');
72
+ $route = $this->getGeneralConfig("route");
73
+ if (!$route) {
74
+ $route = $module;
75
+ }
76
+
77
+
78
+ $breadcrumbs = $this->getLayout()->getBlock('breadcrumbs');
79
+
80
+
81
+ $breadcrumbs->addCrumb( 'bumble_filter', array( 'label' => $title,
82
+ 'title' => $title,
83
+ ));
84
+ //set title by list all filter
85
+ $this->setTitleFilter($title);
86
+ //set by group
87
+ if (isset($filter_group)) {
88
+ //set tile by group
89
+ $this->setTitleFilter($this->getGroup($filter_group)['name']);
90
+ $breadcrumbs->addCrumb( 'bumble_group', array( 'label' => $this->getGroup($filter_group)['name'],
91
+ 'title' => Mage::helper('bumble_filter')->__($this->getGroup($filter_group)['name']),
92
+ 'link' => Mage::getBaseUrl().$route.'/'.$this->getGroup($filter_group)['identifier'].'.html') );
93
+
94
+ $this->getLayout()->getBlock('head')->setTitle($title."-".$this->getGroup($filter_group)['name']);
95
+ }else{
96
+ $this->getLayout()->getBlock('head')->setTitle($title);
97
+ }
98
+
99
+ $this->getCountingPost();
100
+
101
+ return parent::_prepareLayout();
102
+ }
103
+ public function _toHtml(){
104
+ $grid_col_ls = $this->getGeneralConfig("grid_col_ls");
105
+ $grid_col_ls = $grid_col_ls?(int)$grid_col_ls:3;
106
+ $grid_col_ms = $this->getGeneralConfig("grid_col_ms");
107
+ $grid_col_ms = $grid_col_ms?(int)$grid_col_ms:3;
108
+ $grid_col_ss = $this->getGeneralConfig("grid_col_ss");
109
+ $grid_col_ss = $grid_col_ss?(int)$grid_col_ss:2;
110
+ $grid_col_mss = $this->getGeneralConfig("grid_col_mss");
111
+ $grid_col_mss = $grid_col_mss?(int)$grid_col_mss:1;
112
+
113
+ $this->assign("grid_col_ls", $grid_col_ls);
114
+ $this->assign("grid_col_ms", $grid_col_ms);
115
+ $this->assign("grid_col_ss", $grid_col_ss);
116
+ $this->assign("grid_col_mss", $grid_col_mss);
117
+ return parent::_toHtml();
118
+ }
119
+ public function getLayoutMode() {
120
+ return $this->getGeneralConfig("listing_layout");
121
+ }
122
+ public function getFilters(){
123
+ $page = $this->getRequest()->getParam('page') ? $this->getRequest()->getParam('page') : 1;
124
+ $page = (($page - 1) > 0)?($page-1):0;
125
+ $limit = (int)$this->getGeneralConfig("list_limit");
126
+ $keyword = $this->getRequest()->getParam( "search_query" );
127
+ $keyword = trim($keyword);
128
+ $filter_group_url = $this->getRequest()->getParam('category');
129
+ $filter_group = 0;
130
+ if (isset($filter_group_url)) {
131
+ $filter_group = $filter_group_url;
132
+ }else{
133
+
134
+ $url= $_SERVER['HTTP_HOST'];
135
+ $url2 = $_SERVER["REQUEST_URI"];
136
+ $route= str_replace($url, '', $url2);
137
+ $route = str_replace('en/', '', $route);
138
+ $route= str_replace('/', '', $route);
139
+
140
+ $resource = Mage::getSingleton('core/resource');
141
+ $readConnection = $resource->getConnection('core_read');
142
+
143
+ $query = "SELECT `filter_id` FROM bumble_filter_filter WHERE `identifier`= '$route'";
144
+
145
+ $results = $readConnection->fetchAll($query);
146
+ $results = $results[0]['filter_id'];
147
+
148
+
149
+ $filter_group = $results;
150
+ }
151
+ $grouparr = explode(",", $filter_group);
152
+
153
+ $collection = Mage::getModel('bumble_filter/group')->getCollection();
154
+ if($filter_group) {
155
+ $collection->addFieldToFilter("filter_id", array("in" => $grouparr ));
156
+ }
157
+
158
+
159
+ if($keyword && strlen($keyword) >= 3) {
160
+ $collection->addKeywordFilter($keyword);
161
+ }
162
+
163
+ $collection->getSelect()->limit($limit, $page*$limit);
164
+
165
+ return $collection;
166
+
167
+ }
168
+
169
+ public function getCountingPost(){
170
+ $limit = (int)$this->getGeneralConfig("list_limit");
171
+ $keyword = $this->getRequest()->getParam( "search_query" );
172
+ $keyword = trim($keyword);
173
+
174
+ $filter_group_url = $this->getRequest()->getParam('category');
175
+
176
+ if (isset($filter_group_url)) {
177
+ $filter_group = $filter_group_url;
178
+ }else{
179
+ $filter_group = $this->getConfig('filter_group');
180
+ }
181
+
182
+ $collection = Mage::getModel('bumble_filter/filter')->getCollection();
183
+ $grouparr = explode(",", $filter_group);
184
+ if($filter_group) {
185
+ $collection->addFieldToFilter("group_filter_id", array("in" => $grouparr ));
186
+ }
187
+
188
+ if($keyword && strlen($keyword) >= 3) {
189
+ $collection->addKeywordFilter($keyword);
190
+ }
191
+
192
+
193
+ Mage::register( 'paginateTotal', count($collection) );
194
+ Mage::register( "paginateLimitPerPage", $limit );
195
+ }
196
+
197
+
198
+ public function getFilter() {
199
+ return Mage::registry('current_group');
200
+ }
201
+ public function getGroup($id_group) {
202
+ $collection = Mage::getModel('bumble_filter/group')->load($id_group);
203
+ $data = array('name' => $collection->getName(), 'identifier' => $collection->getIdentifier());
204
+ return $data;
205
+ }
206
+
207
+ }
208
+ ?>
app/code/community/Bumble/Filter/Block/Filter/Productlist.php ADDED
@@ -0,0 +1,258 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ --------------------------------------------------------------------------*/
10
+
11
+ class Bumble_Filter_Block_Filter_Productlist extends Mage_Catalog_Block_Product_List {
12
+
13
+ var $_show = true;
14
+ /**
15
+ * Contructor
16
+ */
17
+ public function __construct($attributes = array())
18
+ {
19
+ $this->_show = $this->getGeneralConfig("show");
20
+
21
+ if(!$this->_show) return;
22
+ parent::__construct( $attributes );
23
+ }
24
+
25
+ public function getGeneralConfig( $val ){
26
+ return Mage::getStoreConfig( "bumble_filter/general_setting/".$val );
27
+ }
28
+
29
+ public function getConfig( $val ){
30
+ return Mage::getStoreConfig( "bumble_filter/module_setting/".$val );
31
+ }
32
+
33
+ protected function _prepareLayout()
34
+ {
35
+ # Mage::setIsDeveloperMode(true);
36
+ $breadcrumbs = $this->getLayout()->getBlock('breadcrumbs');
37
+ if ($breadcrumbs) {
38
+ $title = $this->getFilter()->getTitle();
39
+ $group= $this->getFilter()->getFilterId();
40
+ $filterGroup = Mage::getModel('bumble_filter/filter')->load($group);
41
+ $TitleGroup= $filterGroup->getTitle();
42
+ $identifierGroup= $filterGroup->getIdentifier();
43
+
44
+ $breadcrumbs->addCrumb('home', array( 'label' => $this->__('Home'), 'title' => $this->__('Go to Home Page'), 'link' => Mage::getBaseUrl() ))->addCrumb('filters', array(
45
+ 'label' => $this->__($TitleGroup),
46
+ 'title' => $this->__($TitleGroup),
47
+ 'link' => Mage::getUrl( $identifierGroup )
48
+ ))
49
+ ->addCrumb('item', array(
50
+ 'label' => $title,
51
+ 'title' => $title,
52
+ ));
53
+ }
54
+ if ($this->getFilter()->getPagetitle()) {
55
+ $title = $this->getFilter()->getPagetitle();
56
+ } else {
57
+ $title = $this->__("Filter - %s", $this->getFilter()->getTitle());
58
+ }
59
+ $this->getLayout()->getBlock('head')->setTitle($title);
60
+
61
+ if ($this->getFilter()->getMetaKeywords()) {
62
+ $keywords = $this->getFilter()->getMetaKeywords();
63
+ $this->getLayout()->getBlock('head')->setKeywords($keywords);
64
+ }
65
+
66
+ if ($this->getFilter()->getMetaDescription()) {
67
+ $description = $this->getFilter()->getMetaDescription();
68
+ $this->getLayout()->getBlock('head')->setDescription($description);
69
+ }
70
+ return parent::_prepareLayout();
71
+ }
72
+
73
+
74
+ public function getHeaderText()
75
+ {
76
+ if( $this->getFilter()->getTitle() ) {
77
+ return Mage::helper('filters')->__("Filter - '%s'", $this->htmlEscape($this->getFilter()->getTitle()));
78
+ } else {
79
+ return false;
80
+ }
81
+ }
82
+ public function getFilter() {
83
+ return Mage::registry('current_group');
84
+
85
+ }
86
+
87
+ public function getAllManu()
88
+ {
89
+ $product = Mage::getModel('catalog/product');
90
+ $attributes = Mage::getResourceModel('eav/entity_attribute_collection')
91
+ ->setEntityTypeFilter($product->getResource()->getTypeId())
92
+ ->addFieldToFilter('attribute_code', 'manufacturer'); //can be changed to any attribute
93
+ $attribute = $attributes->getFirstItem()->setEntity($product->getResource());
94
+ $manufacturers = $attribute->getSource()->getAllOptions(false);
95
+
96
+ return $manufacturers;
97
+ }
98
+
99
+
100
+
101
+ protected function _getProductCollection() {
102
+ #echo ini_set('max_execution_time', 600);
103
+ $filter = Mage::registry('current_group');
104
+ $filter_id= $filter->getFilterId();
105
+ $getLabel= $filter->getTabs();
106
+
107
+ $group_filter= Mage::getModel('bumble_filter/filter')->load($filter_id);
108
+ $bra= $group_filter->getManufacturer();
109
+ $use = $group_filter->getUsemanufacturer();
110
+ if($bra != 'all')
111
+ {
112
+ $filtertype= $group_filter->getManufacturer();
113
+ }
114
+ else
115
+ {
116
+
117
+ foreach ($this->getAllManu() as $manufacturer){
118
+ if($getLabel == $manufacturer['label'])
119
+ {
120
+ $filtertype= $manufacturer['value'] ;
121
+ }
122
+ }
123
+
124
+
125
+ }
126
+ $pricelt= $_GET['pricelt'];
127
+ $pricegt= $_GET['pricegt'];
128
+ $filtercat = $group_filter->getCategory();
129
+
130
+ $extraatt = $group_filter->getExtraatt();
131
+
132
+ if($group_filter->getSubatt() != null){
133
+ $subatt= $group_filter->getSubatt();
134
+ }else{
135
+
136
+ $product = Mage::getModel('catalog/product');
137
+ $attributes = Mage::getResourceModel('eav/entity_attribute_collection')
138
+ ->setEntityTypeFilter($product->getResource()->getTypeId())
139
+ ->addFieldToFilter('attribute_code', $extraatt); //can be changed to any attribute
140
+ $attribute = $attributes->getFirstItem()->setEntity($product->getResource());
141
+ $manufacturers = $attribute->getSource()->getAllOptions(false);
142
+ $subatt= array();
143
+ foreach ($manufacturers as $manufacturer){
144
+
145
+ $subatt[]= $manufacturer['value'] ;
146
+
147
+ }
148
+
149
+ }
150
+ //var_dump($subatt);
151
+
152
+
153
+ if($_GET['category'] != "" || $filtercat != "")
154
+ {
155
+ if($_GET['category'] != "")
156
+ {
157
+ $cat = $_GET['category'];
158
+ }else{
159
+ $cat = $filtercat;
160
+ }
161
+
162
+
163
+
164
+
165
+ if (is_null($this->_productCollection)) {
166
+ $_category = Mage::getModel('catalog/category')->load($cat);
167
+ //var_dump($cat);
168
+ $collection = Mage::getModel('catalog/product')->getCollection()
169
+ ->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes())
170
+ ->addCategoryFilter($_category)
171
+ ->addStoreFilter(Mage::app()->getStore()->getId())
172
+ ->addUrlRewrite();
173
+
174
+ if($extraatt != null)
175
+ {
176
+ $collection->addAttributeToFilter($extraatt, array('in'=>array($subatt)));
177
+ }
178
+
179
+ if($pricelt != null && $pricegt == null )
180
+ {
181
+ $collection->addAttributeToFilter('price', array('lt' => $pricelt));
182
+ }
183
+ if($pricegt != null && $pricelt == null)
184
+ {
185
+ $collection->addAttributeToFilter('price', array('gt' => $pricegt));
186
+ }
187
+ if($pricegt != null && $pricelt != null)
188
+ {
189
+ $collection->addAttributeToFilter('price', array('gt' => $pricegt));
190
+ $collection->addAttributeToFilter('price', array('lt' => $pricelt));
191
+ }
192
+
193
+
194
+ if($bra != "" && $use == 1)
195
+ {
196
+ $collection->addFieldToFilter(array(
197
+ array('attribute'=>'manufacturer','eq'=>$filtertype),
198
+
199
+ ));
200
+ }
201
+
202
+ $this->_productCollection = $collection;
203
+ Mage::getSingleton('catalog/product_status')->addSaleableFilterToCollection($this->_productCollection);
204
+ Mage::getSingleton('catalog/product_visibility')->addVisibleInSiteFilterToCollection($this->_productCollection);
205
+ }
206
+ }else{
207
+ if (is_null($this->_productCollection)) {
208
+
209
+ $collection = Mage::getModel('catalog/product')->getCollection()
210
+ ->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes())
211
+ ->addStoreFilter(Mage::app()->getStore()->getId())
212
+ ->addUrlRewrite();
213
+ if($extraatt != null)
214
+ {
215
+ $collection->addAttributeToFilter($extraatt, array('in'=>array($subatt)));
216
+ }
217
+ if($pricelt != null && $pricegt == null )
218
+ {
219
+ $collection->addAttributeToFilter('price', array('lt' => $pricelt));
220
+ }
221
+ if($pricegt != null && $pricelt == null)
222
+ {
223
+ $collection->addAttributeToFilter('price', array('gt' => $pricegt));
224
+ }
225
+ if($pricegt != null && $pricelt != null)
226
+ {
227
+ $collection->addAttributeToFilter('price', array('gt' => $pricegt));
228
+ $collection->addAttributeToFilter('price', array('lt' => $pricelt));
229
+ }
230
+
231
+ if($bra != "" && $use == 1)
232
+ {
233
+ $collection->addFieldToFilter(array(
234
+ array('attribute'=>'manufacturer','eq'=>$filtertype),
235
+
236
+ ));
237
+ }
238
+
239
+ $this->_productCollection = $collection;
240
+ Mage::getSingleton('catalog/product_status')->addSaleableFilterToCollection($this->_productCollection);
241
+ Mage::getSingleton('catalog/product_visibility')->addVisibleInSiteFilterToCollection($this->_productCollection);
242
+ }
243
+ }
244
+
245
+
246
+
247
+
248
+ return $this->_productCollection;
249
+ }
250
+
251
+ public function getLoadedProductCollection() {
252
+
253
+ return $this->_getProductCollection();
254
+ }
255
+
256
+
257
+ }
258
+ ?>
app/code/community/Bumble/Filter/Block/Filter/Test.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ ----------------------------------------------------------------------------*/
10
+
11
+ class Bumble_Filter_Block_Filter_Test extends Mage_Catalog_Block_Product_List {
12
+
13
+ var $_show = true;
14
+ /**
15
+ * Contructor
16
+ */
17
+ public function __construct($attributes = array())
18
+ {
19
+ die("sssssssssss");
20
+ parent::__construct( $attributes );
21
+ }
22
+
23
+ }
24
+ ?>
app/code/community/Bumble/Filter/Block/Filter/Toolbar.php ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Bumbletheme
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Bumbletheme EULA that is bundled with
8
+ * this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://www.bumbletheme.com/LICENSE-1.0.html
11
+ *
12
+ * DISCLAIMER
13
+ *
14
+ * Do not edit or add to this file if you wish to upgrade the extension
15
+ * to newer versions in the future. If you wish to customize the extension
16
+ * for your needs please refer to http://www.bumbletheme.com/ for more information
17
+ *
18
+ * @category Bumble
19
+ * @package Bumble_Blog
20
+ * @copyright Copyright (c) 2014 Bumbletheme (http://www.bumbletheme.com/)
21
+ * @license http://www.bumbletheme.com/LICENSE-1.0.html
22
+ */
23
+
24
+ /**
25
+ * Bumble Blog Extension
26
+ *
27
+ * @category Bumble
28
+ * @package Bumble_Filter
29
+ * @author Bumbletheme Dev Team <bumbletheme@gmail.com>
30
+ */
31
+ class Bumble_Filter_Block_Filter_Toolbar extends Mage_Core_Block_Template
32
+ {
33
+
34
+ public function __construct($attributes = array())
35
+ {
36
+ parent::__construct( $attributes );
37
+ if(!Mage::getStoreConfig('bumble_filter/general_setting/show')) {
38
+ return;
39
+ }
40
+ }
41
+
42
+ protected function _prepareLayout() {
43
+
44
+ }
45
+ public function getTotal() {
46
+ return Mage::registry('paginateTotal');
47
+ }
48
+
49
+ public function getPages() {
50
+ return ceil(($this->getTotal())/(int)$this->getLimitPerPage() );
51
+ }
52
+
53
+ public function getLimitPerPage(){
54
+ return Mage::registry('paginateLimitPerPage');
55
+ }
56
+
57
+ public function getCurrentLink() {
58
+ $module = $this->getRequest()->getModuleName();
59
+ $controller = $this->getRequest()->getControllerName();
60
+ $module = strtolower($module);
61
+ if($module == "bumble_filter" || $module == "bumblefilter"){
62
+ if($controller == "filter" || $controller == "index") {
63
+ $filter_group_url = $this->getRequest()->getParam('category');
64
+ //echo $filter_group_url;
65
+ if (isset($filter_group_url)) {
66
+ $filter_group = $filter_group_url;
67
+ }else{
68
+ $filter_group = $this->getRoute();
69
+ }
70
+ if( (int)$filter_group ) {
71
+ return Mage::getModel('bumble_filter/group')->load((int)$filter_group)->getCategoryLink();
72
+ } else {
73
+ $route = $this->getRoute();
74
+ return Mage::getBaseUrl().$route;
75
+ }
76
+
77
+
78
+ }
79
+ }
80
+ return;
81
+ }
82
+ }
app/code/community/Bumble/Filter/Block/Groupmenu.php ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ ------------------------------------------------------------------------------*/
10
+
11
+ class Bumble_Filter_Block_Groupmenu extends Bumble_Filter_Block_List {
12
+
13
+ var $_show = true;
14
+ /**
15
+ * Contructor
16
+ */
17
+ public function __construct($attributes = array())
18
+ {
19
+
20
+ $this->_show = $this->getGeneralConfig("show");
21
+ if(!$this->_show) return;
22
+
23
+ parent::__construct( $attributes );
24
+ $my_template = "bumble/filter/groupmenu.phtml";
25
+ $this->setTemplate($my_template);
26
+
27
+ }
28
+
29
+ public function _toHtml(){
30
+ // if(!$this->getConfig("enable_groupmodule")) {
31
+ // return ;
32
+ // }
33
+ $collection = $this->getCategoryFilter();
34
+ // Assign html
35
+ $this->setCategoryFilters($collection);
36
+ return parent::_toHtml();
37
+ }
38
+ public function getCategoryFilter(){
39
+ $filter = Mage::getStoreConfig( 'bumble_filter/module_setting/filter_group' );
40
+ $filter = explode(',', $filter);
41
+ //var_dump($filter);
42
+ //$limit = (int)$this->getGeneralConfig("limit_group",8);
43
+ $collection = Mage::getModel('bumble_filter/filter')->getCollection();
44
+ //->addFieldToFilter("is_active", array("eq" => 1))
45
+ //->setPageSize($limit)
46
+ if($filter[0] != 0)
47
+ {
48
+
49
+ $collection->addFieldToFilter("filter_id", array("in" => array($filter)));
50
+
51
+ }
52
+
53
+ $collection->setOrder("filter_id","DESC");
54
+
55
+ return $collection;
56
+ }
57
+
58
+ }
app/code/community/Bumble/Filter/Block/Layer/Filter/Abstract.php ADDED
@@ -0,0 +1,156 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magento.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magento.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2006-2016 X.commerce, Inc. and affiliates (http://www.magento.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Catalog layer filter abstract
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Catalog
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ abstract class Bumble_Filter_Block_Layer_Filter_Abstract extends Mage_Core_Block_Template
35
+ {
36
+ /**
37
+ * Catalog Layer Filter Attribute model
38
+ *
39
+ * @var Mage_Catalog_Model_Layer_Filter_Attribute
40
+ */
41
+ protected $_filter;
42
+
43
+ /**
44
+ * Filter Model Name
45
+ *
46
+ * @var string
47
+ */
48
+ protected $_filterModelName;
49
+
50
+ /**
51
+ * Whether to display product count for layer navigation items
52
+ * @var bool
53
+ */
54
+ protected $_displayProductCount = null;
55
+
56
+ /**
57
+ * Initialize filter template
58
+ *
59
+ */
60
+ public function __construct()
61
+ {
62
+ parent::__construct();
63
+ $this->setTemplate('catalog/layer/filter.phtml');
64
+ }
65
+
66
+ /**
67
+ * Initialize filter model object
68
+ *
69
+ * @return Mage_Catalog_Block_Layer_Filter_Abstract
70
+ */
71
+ public function init()
72
+ {
73
+ $this->_initFilter();
74
+ return $this;
75
+ }
76
+
77
+ /**
78
+ * Init filter model object
79
+ *
80
+ * @return Mage_Catalog_Block_Layer_Filter_Abstract
81
+ */
82
+ protected function _initFilter()
83
+ {
84
+ if (!$this->_filterModelName) {
85
+ Mage::throwException(Mage::helper('catalog')->__('Filter model name must be declared.'));
86
+ }
87
+ $this->_filter = Mage::getModel($this->_filterModelName)
88
+ ->setLayer($this->getLayer());
89
+ $this->_prepareFilter();
90
+
91
+ $this->_filter->apply($this->getRequest(), $this);
92
+ return $this;
93
+ }
94
+
95
+ /**
96
+ * Prepare filter process
97
+ *
98
+ * @return Mage_Catalog_Block_Layer_Filter_Abstract
99
+ */
100
+ protected function _prepareFilter()
101
+ {
102
+ return $this;
103
+ }
104
+
105
+ /**
106
+ * Retrieve name of the filter block
107
+ *
108
+ * @return string
109
+ */
110
+ public function getName()
111
+ {
112
+ return $this->_filter->getName();
113
+ }
114
+
115
+ /**
116
+ * Retrieve filter items
117
+ *
118
+ * @return array
119
+ */
120
+ public function getItems()
121
+ {
122
+ return $this->_filter->getItems();
123
+ }
124
+
125
+ /**
126
+ * Retrieve filter items count
127
+ *
128
+ * @return int
129
+ */
130
+ public function getItemsCount()
131
+ {
132
+ return $this->_filter->getItemsCount();
133
+ }
134
+
135
+ /**
136
+ * Getter for $_displayProductCount
137
+ * @return bool
138
+ */
139
+ public function shouldDisplayProductCount()
140
+ {
141
+ if ($this->_displayProductCount === null) {
142
+ $this->_displayProductCount = Mage::helper('catalog')->shouldDisplayProductCountOnLayer();
143
+ }
144
+ return $this->_displayProductCount;
145
+ }
146
+
147
+ /**
148
+ * Retrieve block html
149
+ *
150
+ * @return string
151
+ */
152
+ public function getHtml()
153
+ {
154
+ return parent::_toHtml();
155
+ }
156
+ }
app/code/community/Bumble/Filter/Block/Layer/Filter/Attribute.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magento.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magento.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2006-2016 X.commerce, Inc. and affiliates (http://www.magento.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Catalog attribute layer filter
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Catalog
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ class Bumble_Filter_Block_Layer_Filter_Attribute extends Mage_Catalog_Block_Layer_Filter_Abstract
35
+ {
36
+ public function __construct()
37
+ {
38
+ parent::__construct();
39
+ $this->_filterModelName = 'catalog/layer_filter_attribute';
40
+ }
41
+
42
+ protected function _prepareFilter()
43
+ {
44
+ $this->_filter->setAttributeModel($this->getAttributeModel());
45
+ return $this;
46
+ }
47
+ }
app/code/community/Bumble/Filter/Block/Layer/Filter/Category.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magento.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magento.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2006-2016 X.commerce, Inc. and affiliates (http://www.magento.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Catalog layer category filter
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Catalog
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ class Bumble_Filter_Block_Layer_Filter_Category extends Mage_Catalog_Block_Layer_Filter_Abstract
35
+ {
36
+ public function __construct()
37
+ {
38
+ parent::__construct();
39
+ $this->_filterModelName = 'catalog/layer_filter_category';
40
+ }
41
+ }
app/code/community/Bumble/Filter/Block/Layer/Filter/Decimal.php ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magento.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magento.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2006-2016 X.commerce, Inc. and affiliates (http://www.magento.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+
28
+ /**
29
+ * Catalog Layer Decimal Attribute Filter Block
30
+ *
31
+ * @category Mage
32
+ * @package Mage_Catalog
33
+ * @author Magento Core Team <core@magentocommerce.com>
34
+ */
35
+ class Bumble_Filter_Block_Layer_Filter_Decimal extends Mage_Catalog_Block_Layer_Filter_Abstract
36
+ {
37
+ /**
38
+ * Initialize Decimal Filter Model
39
+ *
40
+ */
41
+ public function __construct()
42
+ {
43
+ parent::__construct();
44
+ $this->_filterModelName = 'catalog/layer_filter_decimal';
45
+ }
46
+
47
+ /**
48
+ * Prepare filter process
49
+ *
50
+ * @return Mage_Catalog_Block_Layer_Filter_Decimal
51
+ */
52
+ protected function _prepareFilter()
53
+ {
54
+ $this->_filter->setAttributeModel($this->getAttributeModel());
55
+ return $this;
56
+ }
57
+ }
app/code/community/Bumble/Filter/Block/Layer/Filter/Price.php ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magento.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magento.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2006-2016 X.commerce, Inc. and affiliates (http://www.magento.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Catalog layer price filter
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Catalog
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ class Bumble_Filter_Block_Layer_Filter_Price extends Mage_Catalog_Block_Layer_Filter_Abstract
35
+ {
36
+ /**
37
+ * Initialize Price filter module
38
+ *
39
+ */
40
+ public function __construct()
41
+ {
42
+ parent::__construct();
43
+
44
+ $this->_filterModelName = 'catalog/layer_filter_price';
45
+ }
46
+
47
+ /**
48
+ * Prepare filter process
49
+ *
50
+ * @return Mage_Catalog_Block_Layer_Filter_Price
51
+ */
52
+ protected function _prepareFilter()
53
+ {
54
+ $this->_filter->setAttributeModel($this->getAttributeModel());
55
+ return $this;
56
+ }
57
+ }
app/code/community/Bumble/Filter/Block/Layer/State.php ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magento.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magento.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2006-2016 X.commerce, Inc. and affiliates (http://www.magento.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Layered navigation state
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Catalog
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ class Bumble_Filter_Block_Layer_State extends Mage_Core_Block_Template
35
+ {
36
+ /**
37
+ * Initialize Layer State template
38
+ *
39
+ */
40
+ public function __construct()
41
+ {
42
+ parent::__construct();
43
+ $this->setTemplate('catalog/layer/state.phtml');
44
+ }
45
+
46
+ /**
47
+ * Retrieve active filters
48
+ *
49
+ * @return array
50
+ */
51
+ public function getActiveFilters()
52
+ {
53
+ $filters = $this->getLayer()->getState()->getFilters();
54
+ if (!is_array($filters)) {
55
+ $filters = array();
56
+ }
57
+ return $filters;
58
+ }
59
+
60
+ /**
61
+ * Retrieve Clear Filters URL
62
+ *
63
+ * @return string
64
+ */
65
+ public function getClearUrl()
66
+ {
67
+ $filterState = array();
68
+ foreach ($this->getActiveFilters() as $item) {
69
+ $filterState[$item->getFilter()->getRequestVar()] = $item->getFilter()->getCleanValue();
70
+ }
71
+ $params['_current'] = true;
72
+ $params['_use_rewrite'] = true;
73
+ $params['_query'] = $filterState;
74
+ $params['_escape'] = true;
75
+ return Mage::getUrl('*/*/*', $params);
76
+ }
77
+
78
+ /**
79
+ * Retrieve Layer object
80
+ *
81
+ * @return Mage_Catalog_Model_Layer
82
+ */
83
+ public function getLayer()
84
+ {
85
+ if (!$this->hasData('layer')) {
86
+ $this->setLayer(Mage::getSingleton('catalog/layer'));
87
+ }
88
+ return $this->_getData('layer');
89
+ }
90
+ }
app/code/community/Bumble/Filter/Block/Layer/View.php ADDED
@@ -0,0 +1,255 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magento.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magento.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2006-2016 X.commerce, Inc. and affiliates (http://www.magento.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Catalog layered navigation view block
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Catalog
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ class Bumble_Filter_Block_Layer_View extends Mage_Core_Block_Template
35
+ {
36
+ /**
37
+ * State block name
38
+ *
39
+ * @var string
40
+ */
41
+ protected $_stateBlockName;
42
+
43
+ /**
44
+ * Category Block Name
45
+ *
46
+ * @var string
47
+ */
48
+ protected $_categoryBlockName;
49
+
50
+ /**
51
+ * Attribute Filter Block Name
52
+ *
53
+ * @var string
54
+ */
55
+ protected $_attributeFilterBlockName;
56
+
57
+ /**
58
+ * Price Filter Block Name
59
+ *
60
+ * @var string
61
+ */
62
+ protected $_priceFilterBlockName;
63
+
64
+ /**
65
+ * Decimal Filter Block Name
66
+ *
67
+ * @var string
68
+ */
69
+ protected $_decimalFilterBlockName;
70
+
71
+ /**
72
+ * Internal constructor
73
+ */
74
+ protected function _construct()
75
+ {
76
+ parent::_construct();
77
+
78
+ $this->_initBlocks();
79
+ }
80
+
81
+ /**
82
+ * Initialize blocks names
83
+ */
84
+ protected function _initBlocks()
85
+ {
86
+ $this->_stateBlockName = 'bumble_filter/layer_state';
87
+ $this->_categoryBlockName = 'bumble_filter/layer_filter_category';
88
+ $this->_attributeFilterBlockName = 'bumble_filter/layer_filter_attribute';
89
+ $this->_priceFilterBlockName = 'bumble_filter/layer_filter_price';
90
+ $this->_decimalFilterBlockName = 'bumble_filter/layer_filter_decimal';
91
+ }
92
+
93
+ /**
94
+ * Get attribute filter block name
95
+ *
96
+ * @deprecated after 1.4.1.0
97
+ *
98
+ * @return string
99
+ */
100
+ protected function _getAttributeFilterBlockName()
101
+ {
102
+ return 'bumble_filter/layer_filter_attribute';
103
+ }
104
+
105
+ /**
106
+ * Prepare child blocks
107
+ *
108
+ * @return Mage_Catalog_Block_Layer_View
109
+ */
110
+ protected function _prepareLayout()
111
+ {
112
+ $stateBlock = $this->getLayout()->createBlock($this->_stateBlockName)
113
+ ->setLayer($this->getLayer());
114
+
115
+ $categoryBlock = $this->getLayout()->createBlock($this->_categoryBlockName)
116
+ ->setLayer($this->getLayer())
117
+ ->init();
118
+
119
+ $this->setChild('layer_state', $stateBlock);
120
+ $this->setChild('category_filter', $categoryBlock);
121
+
122
+ $filterableAttributes = $this->_getFilterableAttributes();
123
+ foreach ($filterableAttributes as $attribute) {
124
+ if ($attribute->getAttributeCode() == 'price') {
125
+ $filterBlockName = $this->_priceFilterBlockName;
126
+ } elseif ($attribute->getBackendType() == 'decimal') {
127
+ $filterBlockName = $this->_decimalFilterBlockName;
128
+ } else {
129
+ $filterBlockName = $this->_attributeFilterBlockName;
130
+ }
131
+
132
+ $this->setChild($attribute->getAttributeCode() . '_filter',
133
+ $this->getLayout()->createBlock($filterBlockName)
134
+ ->setLayer($this->getLayer())
135
+ ->setAttributeModel($attribute)
136
+ ->init());
137
+ }
138
+
139
+ $this->getLayer()->apply();
140
+
141
+ return parent::_prepareLayout();
142
+ }
143
+
144
+ /**
145
+ * Get layer object
146
+ *
147
+ * @return Mage_Catalog_Model_Layer
148
+ */
149
+ public function getLayer()
150
+ {
151
+ return Mage::getSingleton('catalog/layer');
152
+ }
153
+
154
+ /**
155
+ * Get all fiterable attributes of current category
156
+ *
157
+ * @return array
158
+ */
159
+ protected function _getFilterableAttributes()
160
+ {
161
+ $attributes = $this->getData('_filterable_attributes');
162
+ if (is_null($attributes)) {
163
+ $attributes = $this->getLayer()->getFilterableAttributes();
164
+ $this->setData('_filterable_attributes', $attributes);
165
+ }
166
+
167
+ return $attributes;
168
+ }
169
+
170
+ /**
171
+ * Get layered navigation state html
172
+ *
173
+ * @return string
174
+ */
175
+ public function getStateHtml()
176
+ {
177
+ return $this->getChildHtml('layer_state');
178
+ }
179
+
180
+ /**
181
+ * Get all layer filters
182
+ *
183
+ * @return array
184
+ */
185
+ public function getFilters()
186
+ {
187
+ $filters = array();
188
+ if ($categoryFilter = $this->_getCategoryFilter()) {
189
+ $filters[] = $categoryFilter;
190
+ }
191
+
192
+ $filterableAttributes = $this->_getFilterableAttributes();
193
+ foreach ($filterableAttributes as $attribute) {
194
+ $filters[] = $this->getChild($attribute->getAttributeCode() . '_filter');
195
+ }
196
+
197
+ return $filters;
198
+ }
199
+
200
+ /**
201
+ * Get category filter block
202
+ *
203
+ * @return Mage_Catalog_Block_Layer_Filter_Category
204
+ */
205
+ protected function _getCategoryFilter()
206
+ {
207
+ return $this->getChild('category_filter');
208
+ }
209
+
210
+ /**
211
+ * Check availability display layer options
212
+ *
213
+ * @return bool
214
+ */
215
+ public function canShowOptions()
216
+ {
217
+ foreach ($this->getFilters() as $filter) {
218
+ if ($filter->getItemsCount()) {
219
+ return true;
220
+ }
221
+ }
222
+
223
+ return false;
224
+ }
225
+
226
+ /**
227
+ * Check availability display layer block
228
+ *
229
+ * @return bool
230
+ */
231
+ public function canShowBlock()
232
+ {
233
+ return $this->canShowOptions() || count($this->getLayer()->getState()->getFilters());
234
+ }
235
+
236
+ /**
237
+ * Retrieve Price Filter block
238
+ *
239
+ * @return Mage_Catalog_Block_Layer_Filter_Price
240
+ */
241
+ protected function _getPriceFilter()
242
+ {
243
+ return $this->getChild('_price_filter');
244
+ }
245
+
246
+ /**
247
+ * Get url for 'Clear All' link
248
+ *
249
+ * @return string
250
+ */
251
+ public function getClearUrl()
252
+ {
253
+ return $this->getChild('layer_state')->getClearUrl();
254
+ }
255
+ }
app/code/community/Bumble/Filter/Block/Left.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Bumble_Filter_Block_Left extends Mage_Catalog_Block_Product_List
4
+ {
5
+ public function __construct()
6
+ {
7
+ parent::__construct();
8
+ $this->setTemplate('bumble/filter/left.phtml');
9
+ }
10
+ }
app/code/community/Bumble/Filter/Block/List.php ADDED
@@ -0,0 +1,140 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ ---------------------------------------------------------------------------*/
10
+ class Bumble_Filter_Block_List extends Mage_Core_Block_Template
11
+ {
12
+ /**
13
+ * @var string $_config
14
+ *
15
+ * @access protected
16
+ */
17
+ protected $_config = array();
18
+
19
+ /**
20
+ * @var string $_config
21
+ *
22
+ * @access protected
23
+ */
24
+ protected $_listDesc = array();
25
+
26
+ /**
27
+ * @var string $_config
28
+ *
29
+ * @access protected
30
+ */
31
+ protected $_show = 0;
32
+ protected $_theme = "";
33
+
34
+ /**
35
+ * Contructor
36
+ */
37
+ public function __construct($attributes = array())
38
+ {
39
+ $this->convertAttributesToConfig($attributes);
40
+ parent::__construct();
41
+
42
+ $cms_block_id = $this->getConfig('cmsblock');
43
+ $cms = "";
44
+ if($cms_block_id){
45
+ $cms = Mage::getSingleton('core/layout')->createBlock('cms/block')->setBlockId($cms_block_id)->toHtml();
46
+ }
47
+ $this->assign( "cms", $cms );
48
+
49
+ /*Cache Block*/
50
+ $enable_cache = $this->getConfig("enable_cache", 1 );
51
+ if(!$enable_cache) {
52
+ $cache_lifetime = null;
53
+ } else {
54
+ $cache_lifetime = $this->getConfig("cache_lifetime", 86400 );
55
+ $cache_lifetime = (int)$cache_lifetime>0?$cache_lifetime: 86400;
56
+ }
57
+
58
+ $this->addData(array('cache_lifetime' => $cache_lifetime));
59
+
60
+ $this->addCacheTag(array(
61
+ Mage_Core_Model_Store::CACHE_TAG,
62
+ Mage_Cms_Model_Block::CACHE_TAG,
63
+ Bumble_Filter_Model_Filter::CACHE_BLOCK_LIST_TAG
64
+ ));
65
+ }
66
+ /**
67
+ * Get Key pieces for caching block content
68
+ *
69
+ * @return array
70
+ */
71
+ public function getCacheKeyInfo()
72
+ {
73
+ return array(
74
+ 'ARMAH_BRAND_BLOCK_LIST',
75
+ $this->getNameInLayout(),
76
+ Mage::app()->getStore()->getId(),
77
+ Mage::getDesign()->getPackageName(),
78
+ Mage::getDesign()->getTheme('template'),
79
+ Mage::getSingleton('customer/session')->getCustomerGroupId(),
80
+ 'template' => $this->getTemplate(),
81
+ );
82
+ }
83
+
84
+ public function convertAttributesToConfig($attributes = array()) {
85
+ if($attributes) {
86
+ foreach($attributes as $key=>$val) {
87
+ $this->setConfig($key, $val);
88
+ }
89
+ }
90
+ }
91
+
92
+ /**
93
+ * overrde the value of the extension's configuration
94
+ *
95
+ * @return string
96
+ */
97
+ function setConfig($key, $value) {
98
+ $this->_config[$key] = $value;
99
+ return $this;
100
+ }
101
+ public function getConfig( $val, $default = "", $group = "module_setting" ){
102
+ $return = "";
103
+ $value = $this->getData($val);
104
+ //Check if has widget config data
105
+ if($this->hasData($val) && $value !== null) {
106
+
107
+ if($value == "true") {
108
+ return 1;
109
+ } elseif($value == "false") {
110
+ return 0;
111
+ }
112
+ return $value;
113
+ } else {
114
+
115
+ if(isset($this->_config[$val])){
116
+ $return = $this->_config[$val];
117
+ if($return == "true") {
118
+ $return = 1;
119
+ } elseif($return == "false") {
120
+ $return = 0;
121
+ }
122
+
123
+ }else{
124
+ $return = Mage::getStoreConfig("bumble_filter/{$group}/".$val );
125
+ }
126
+ if($return == "" && $default) {
127
+ $return = $default;
128
+ }
129
+
130
+ }
131
+
132
+ return $return;
133
+ }
134
+
135
+ public function getGeneralConfig( $val, $default = "" ){
136
+ return Mage::getStoreConfig( "bumble_filter/general_setting/".$val );
137
+ }
138
+
139
+
140
+ }
app/code/community/Bumble/Filter/Block/Ourtab.php ADDED
@@ -0,0 +1,402 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magento.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magento.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2006-2016 X.commerce, Inc. and affiliates (http://www.magento.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Tabs block
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ class Bumble_Filter_Block_Ourtab extends Mage_Adminhtml_Block_Widget
35
+ {
36
+ /**
37
+ * tabs structure
38
+ *
39
+ * @var array
40
+ */
41
+ protected $_tabs = array();
42
+
43
+ /**
44
+ * Active tab key
45
+ *
46
+ * @var string
47
+ */
48
+ protected $_activeTab = null;
49
+
50
+ /**
51
+ * Destination HTML element id
52
+ *
53
+ * @var string
54
+ */
55
+ protected $_destElementId = 'content';
56
+
57
+ protected function _construct()
58
+ {
59
+ $this->setTemplate('widget/tabs.phtml');
60
+ }
61
+
62
+ /**
63
+ * retrieve destination html element id
64
+ *
65
+ * @return string
66
+ */
67
+ public function getDestElementId()
68
+ {
69
+ return $this->_destElementId;
70
+ }
71
+
72
+ public function setDestElementId($elementId)
73
+ {
74
+ $this->_destElementId = $elementId;
75
+ return $this;
76
+ }
77
+
78
+ /**
79
+ * Add new tab after another
80
+ *
81
+ * @param string $tabId new tab Id
82
+ * @param array|Varien_Object $tab
83
+ * @param string $afterTabId
84
+ * @return Mage_Adminhtml_Block_Widget_Tabs
85
+ */
86
+ public function addTabAfter($tabId, $tab, $afterTabId)
87
+ {
88
+ $this->addTab($tabId, $tab);
89
+ $this->_tabs[$tabId]->setAfter($afterTabId);
90
+ }
91
+
92
+ /**
93
+ * Add new tab
94
+ *
95
+ * @param string $tabId
96
+ * @param array|Varien_Object $tab
97
+ * @return Mage_Adminhtml_Block_Widget_Tabs
98
+ */
99
+ public function addTab($tabId, $tab)
100
+ {
101
+ if (is_array($tab)) {
102
+ $this->_tabs[$tabId] = new Varien_Object($tab);
103
+ }
104
+ elseif ($tab instanceof Varien_Object) {
105
+ $this->_tabs[$tabId] = $tab;
106
+ if (!$this->_tabs[$tabId]->hasTabId()) {
107
+ $this->_tabs[$tabId]->setTabId($tabId);
108
+ }
109
+ }
110
+ elseif (is_string($tab)) {
111
+ if (strpos($tab, '/')) {
112
+ $this->_tabs[$tabId] = $this->getLayout()->createBlock($tab);
113
+ }
114
+ elseif ($this->getChild($tab)) {
115
+ $this->_tabs[$tabId] = $this->getChild($tab);
116
+ }
117
+ else {
118
+ $this->_tabs[$tabId] = null;
119
+ }
120
+
121
+ if (!($this->_tabs[$tabId] instanceof Mage_Adminhtml_Block_Widget_Tab_Interface)) {
122
+ throw new Exception(Mage::helper('adminhtml')->__('Wrong tab configuration.'));
123
+ }
124
+ }
125
+ else {
126
+ throw new Exception(Mage::helper('adminhtml')->__('Wrong tab configuration.'));
127
+ }
128
+
129
+ if (is_null($this->_tabs[$tabId]->getUrl())) {
130
+ $this->_tabs[$tabId]->setUrl('#?tab=');
131
+ }
132
+
133
+ if (!$this->_tabs[$tabId]->getTitle()) {
134
+ $this->_tabs[$tabId]->setTitle($this->_tabs[$tabId]->getLabel());
135
+ }
136
+
137
+ $this->_tabs[$tabId]->setId($tabId);
138
+ $this->_tabs[$tabId]->setTabId($tabId);
139
+
140
+ if (is_null($this->_activeTab)) $this->_activeTab = $tabId;
141
+ if (true === $this->_tabs[$tabId]->getActive()) $this->setActiveTab($tabId);
142
+
143
+ return $this;
144
+ }
145
+
146
+ public function getActiveTabId()
147
+ {
148
+ return $this->getTabId($this->_tabs[$this->_activeTab]);
149
+ }
150
+
151
+ /**
152
+ * Set Active Tab
153
+ * Tab has to be not hidden and can show
154
+ *
155
+ * @param string $tabId
156
+ * @return Mage_Adminhtml_Block_Widget_Tabs
157
+ */
158
+ public function setActiveTab($tabId)
159
+ {
160
+ if (isset($this->_tabs[$tabId]) && $this->canShowTab($this->_tabs[$tabId])
161
+ && !$this->getTabIsHidden($this->_tabs[$tabId])) {
162
+ $this->_activeTab = $tabId;
163
+ if (!(is_null($this->_activeTab)) && ($tabId !== $this->_activeTab)) {
164
+ foreach ($this->_tabs as $id => $tab) {
165
+ $tab->setActive($id === $tabId);
166
+ }
167
+ }
168
+ }
169
+ return $this;
170
+ }
171
+
172
+ /**
173
+ * Set Active Tab
174
+ *
175
+ * @param string $tabId
176
+ * @return Mage_Adminhtml_Block_Widget_Tabs
177
+ */
178
+ protected function _setActiveTab($tabId)
179
+ {
180
+ foreach ($this->_tabs as $id => $tab) {
181
+ if ($this->getTabId($tab) == $tabId) {
182
+ $this->_activeTab = $id;
183
+ $tab->setActive(true);
184
+ return $this;
185
+ }
186
+ }
187
+ return $this;
188
+ }
189
+
190
+ protected function _beforeToHtml()
191
+ {
192
+ if ($activeTab = $this->getRequest()->getParam('active_tab')) {
193
+ $this->setActiveTab($activeTab);
194
+ } elseif ($activeTabId = Mage::getSingleton('admin/session')->getActiveTabId()) {
195
+ $this->_setActiveTab($activeTabId);
196
+ }
197
+
198
+ $_new = array();
199
+ foreach( $this->_tabs as $key => $tab ) {
200
+ foreach( $this->_tabs as $k => $t ) {
201
+ if( $t->getAfter() == $key ) {
202
+ $_new[$key] = $tab;
203
+ $_new[$k] = $t;
204
+ } else {
205
+ if( !$tab->getAfter() || !in_array($tab->getAfter(), array_keys($this->_tabs)) ) {
206
+ $_new[$key] = $tab;
207
+ }
208
+ }
209
+ }
210
+ }
211
+
212
+ $this->_tabs = $_new;
213
+ unset($_new);
214
+
215
+ $this->assign('tabs', $this->_tabs);
216
+ return parent::_beforeToHtml();
217
+ }
218
+
219
+ public function getJsObjectName()
220
+ {
221
+ return $this->getId() . 'JsTabs';
222
+ }
223
+
224
+ public function getTabsIds()
225
+ {
226
+ if (empty($this->_tabs))
227
+ return array();
228
+ return array_keys($this->_tabs);
229
+ }
230
+
231
+ public function getTabId($tab, $withPrefix = true)
232
+ {
233
+ if ($tab instanceof Mage_Adminhtml_Block_Widget_Tab_Interface) {
234
+ return ($withPrefix ? $this->getId().'_' : '').$tab->getTabId();
235
+ }
236
+ return ($withPrefix ? $this->getId().'_' : '').$tab->getId();
237
+ }
238
+
239
+ public function canShowTab($tab)
240
+ {
241
+ if ($tab instanceof Mage_Adminhtml_Block_Widget_Tab_Interface) {
242
+ return $tab->canShowTab();
243
+ }
244
+ return true;
245
+ }
246
+
247
+ public function getTabIsHidden($tab)
248
+ {
249
+ if ($tab instanceof Mage_Adminhtml_Block_Widget_Tab_Interface) {
250
+ return $tab->isHidden();
251
+ }
252
+ return $tab->getIsHidden();
253
+ }
254
+
255
+ public function getTabUrl($tab)
256
+ {
257
+ if ($tab instanceof Mage_Adminhtml_Block_Widget_Tab_Interface) {
258
+ if (method_exists($tab, 'getTabUrl')) {
259
+
260
+ $ur = $tab->getTabUrl().'#';
261
+ return $ur;
262
+ }
263
+ return $ur;
264
+ }
265
+ if (!is_null($tab->getUrl())) {
266
+ $ur = $tab->getTabUrl().'#';
267
+
268
+ }
269
+ return $ur;
270
+ }
271
+
272
+ public function getTabTitle($tab)
273
+ {
274
+ if ($tab instanceof Mage_Adminhtml_Block_Widget_Tab_Interface) {
275
+ return $tab->getTabTitle();
276
+ }
277
+ return $tab->getTitle();
278
+ }
279
+
280
+ public function getTabClass($tab)
281
+ {
282
+ if ($tab instanceof Mage_Adminhtml_Block_Widget_Tab_Interface) {
283
+ if (method_exists($tab, 'getTabClass')) {
284
+ return $tab->getTabClass();
285
+ }
286
+ return '';
287
+ }
288
+ return $tab->getClass();
289
+ }
290
+
291
+
292
+ public function getTabLabel($tab)
293
+ {
294
+ if ($tab instanceof Mage_Adminhtml_Block_Widget_Tab_Interface) {
295
+ return $tab->getTabLabel();
296
+ }
297
+ return $tab->getLabel();
298
+ }
299
+
300
+ public function getTabContent($tab)
301
+ {
302
+ if ($tab instanceof Mage_Adminhtml_Block_Widget_Tab_Interface) {
303
+ if ($tab->getSkipGenerateContent()) {
304
+ return '';
305
+ }
306
+ return $tab->toHtml();
307
+ }
308
+ return $tab->getContent();
309
+ }
310
+
311
+ /**
312
+ * Mark tabs as dependant of each other
313
+ * Arbitrary number of tabs can be specified, but at least two
314
+ *
315
+ * @param string $tabOneId
316
+ * @param string $tabTwoId
317
+ * @param string $tabNId...
318
+ */
319
+ public function bindShadowTabs($tabOneId, $tabTwoId)
320
+ {
321
+ $tabs = array();
322
+ $args = func_get_args();
323
+ if ((!empty($args)) && (count($args) > 1)) {
324
+ foreach ($args as $tabId) {
325
+ if (isset($this->_tabs[$tabId])) {
326
+ $tabs[$tabId] = $tabId;
327
+ }
328
+ }
329
+ $blockId = $this->getId();
330
+ foreach ($tabs as $tabId) {
331
+ foreach ($tabs as $tabToId) {
332
+ if ($tabId !== $tabToId) {
333
+ if (!$this->_tabs[$tabToId]->getData('shadow_tabs')) {
334
+ $this->_tabs[$tabToId]->setData('shadow_tabs', array());
335
+ }
336
+ $this->_tabs[$tabToId]->setData('shadow_tabs', array_merge(
337
+ $this->_tabs[$tabToId]->getData('shadow_tabs'),
338
+ array($blockId . '_' . $tabId)
339
+ ));
340
+ }
341
+ }
342
+ }
343
+ }
344
+ }
345
+
346
+ /**
347
+ * Obtain shadow tabs information
348
+ *
349
+ * @param bool $asJson
350
+ * @return array|string
351
+ */
352
+ public function getAllShadowTabs($asJson = true)
353
+ {
354
+ $result = array();
355
+ if (!empty($this->_tabs)) {
356
+ $blockId = $this->getId();
357
+ foreach (array_keys($this->_tabs) as $tabId) {
358
+ if ($this->_tabs[$tabId]->getData('shadow_tabs')) {
359
+ $result[$blockId . '_' . $tabId] = $this->_tabs[$tabId]->getData('shadow_tabs');
360
+ }
361
+ }
362
+ }
363
+ if ($asJson) {
364
+ return Mage::helper('core')->jsonEncode($result);
365
+ }
366
+ return $result;
367
+ }
368
+
369
+ /**
370
+ * Set tab property by tab's identifier
371
+ *
372
+ * @param string $tab
373
+ * @param string $key
374
+ * @param mixed $value
375
+ * @return Mage_Adminhtml_Block_Widget_Tabs
376
+ */
377
+ public function setTabData($tab, $key, $value)
378
+ {
379
+ if (isset($this->_tabs[$tab]) && $this->_tabs[$tab] instanceof Varien_Object) {
380
+ if ($key == 'url') {
381
+ $value = $this->getUrl($value, array('_current' => true, '_use_rewrite' => true));
382
+ }
383
+ $this->_tabs[$tab]->setData($key, $value);
384
+ }
385
+
386
+ return $this;
387
+ }
388
+
389
+ /**
390
+ * Removes tab with passed id from tabs block
391
+ *
392
+ * @param string $tabId
393
+ * @return Mage_Adminhtml_Block_Widget_Tabs
394
+ */
395
+ public function removeTab($tabId)
396
+ {
397
+ if (isset($this->_tabs[$tabId])) {
398
+ unset($this->_tabs[$tabId]);
399
+ }
400
+ return $this;
401
+ }
402
+ }
app/code/community/Bumble/Filter/Block/Prova.php ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Bumble_Filter_Block_Prova extends Mage_Core_Block_Abstract implements Mage_Widget_Block_Interface
3
+ {
4
+
5
+
6
+ protected function _toHtml()
7
+ {
8
+
9
+ $url= $_SERVER['HTTP_HOST'];
10
+
11
+ $title= $this->getData("title");
12
+ $speed= (int)$this->getData("speed") ;
13
+ if($speed != "")
14
+ {
15
+ $speeds= $speed;
16
+ }else{
17
+ $speeds= 3000;
18
+ }
19
+
20
+ $html = " <script>
21
+ $(document).ready(function() {
22
+ $('.owl-carousel').owlCarousel({
23
+ rtl:false,
24
+ loop: true,
25
+ margin: 10,
26
+
27
+ autoplay:true,
28
+ autoplayTimeout:". $speeds.",
29
+ autoplayHoverPause:true,
30
+ responsiveClass: true,
31
+ responsive: {
32
+ 0: {
33
+ items: 1,
34
+ nav: true
35
+ },
36
+ 600: {
37
+ items: 3,
38
+ nav: false
39
+ },
40
+ 1000: {
41
+ items: 5,
42
+ nav: true,
43
+
44
+ margin: 20
45
+ }
46
+ }
47
+ })
48
+ })
49
+ </script>";
50
+
51
+ if($title != "")
52
+ {
53
+ $html .= '<div class="carousel-title" ><h2 style="text-align: center;">'. $title.'</h2></div>';
54
+ $html .= '<div class="space" style="border-bottom: 1px solid #E5E4E4;"></div>';
55
+
56
+
57
+ }
58
+
59
+ $html .=' <div class="owl-carousel">';
60
+
61
+ $filter = Mage::getModel('bumble_filter/filter')->getCollection();
62
+
63
+ foreach ($filter as $filters)
64
+ {
65
+ $res = $filters->getFile();
66
+ $title= $filters->getTitle();
67
+ $id= $filters->getId();
68
+
69
+
70
+ $html .= '
71
+ <div class="item">
72
+ <a class="dir" href="http://'. $url.'/tryb/filter/index?p='.$id.'"><img data-u="image" src="http://'.$url.'/media/'. $res.'" /></a>
73
+ </div>
74
+ ';
75
+ }
76
+
77
+ $html .= '</div>';
78
+
79
+ return $html;
80
+ }
81
+ }
82
+
app/code/community/Bumble/Filter/Block/Scroll.php ADDED
@@ -0,0 +1,180 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ ---------------------------------------------------------------------------*/
10
+ class Bumble_Filter_Block_Scroll extends Bumble_Filter_Block_List
11
+ {
12
+ protected $_config = array();
13
+ var $_show = true;
14
+ var $_filter_group = null;
15
+
16
+ /**
17
+ * Contructor
18
+ */
19
+ public function __construct($attributes = array())
20
+ {
21
+
22
+ parent::__construct($attributes);
23
+
24
+ /*End Cache Block*/
25
+
26
+ $template = "";
27
+ $namelayout = "scroll";
28
+ if($this->getCarouselConfig("enable_owl_carousel")){
29
+ $namelayout = "carousel";
30
+ }
31
+
32
+
33
+ if($this->hasData("template") && $this->getData("template")) {
34
+ $template = $this->getData("template");
35
+ } elseif(isset($attributes['template']) && $attributes['template']) {
36
+ $template = $attributes['template'];
37
+ } else{
38
+ $template = "bumble/filter/block/".$namelayout.".phtml";
39
+ }
40
+
41
+ $this->setTemplate($template);
42
+
43
+ /*Cache Block*/
44
+ $enable_cache = $this->getConfig("enable_cache", 1 );
45
+ if(!$enable_cache) {
46
+ $cache_lifetime = null;
47
+ } else {
48
+ $cache_lifetime = $this->getConfig("cache_lifetime", 86400 );
49
+ $cache_lifetime = (int)$cache_lifetime>0?$cache_lifetime: 86400;
50
+ }
51
+
52
+ $this->addData(array('cache_lifetime' => $cache_lifetime));
53
+
54
+ $this->addCacheTag(array(
55
+ Mage_Core_Model_Store::CACHE_TAG,
56
+ Mage_Cms_Model_Block::CACHE_TAG,
57
+ Bumble_Filter_Model_Filter::CACHE_BLOCK_SCROLL_TAG
58
+ ));
59
+
60
+
61
+ }
62
+ /**
63
+ * Get Key pieces for caching block content
64
+ *
65
+ * @return array
66
+ */
67
+ public function getCacheKeyInfo()
68
+ {
69
+ return array(
70
+ 'ARMAH_BRAND_BLOCK_SCROLL',
71
+ $this->getNameInLayout(),
72
+ Mage::app()->getStore()->getId(),
73
+ Mage::getDesign()->getPackageName(),
74
+ Mage::getDesign()->getTheme('template'),
75
+ Mage::getSingleton('customer/session')->getCustomerGroupId(),
76
+ 'template' => $this->getTemplate(),
77
+ );
78
+ }
79
+ /**
80
+ * overrde the value of the extension's configuration
81
+ *
82
+ * @return string
83
+ */
84
+ function setConfig($key, $value) {
85
+ $this->_config[$key] = $value;
86
+ return $this;
87
+ }
88
+
89
+ public function getGeneralConfig( $val, $default = "" ){
90
+
91
+ return Mage::getStoreConfig( "bumble_filter/general_setting/".$val );
92
+ }
93
+ public function getCarouselConfig( $key, $default = null ){
94
+ return $this->getConfig( $key,$default,"carousel_setting" );
95
+ }
96
+
97
+ public function getModuleConfig( $val, $default = "" ){
98
+ $return = "";
99
+ $value = $this->getData($val);
100
+ //Check if has widget config data
101
+ if($this->hasData($val) && $value !== null) {
102
+
103
+ if($value == "true") {
104
+ return 1;
105
+ } elseif($value == "false") {
106
+ return 0;
107
+ }
108
+ return $value;
109
+
110
+ } else {
111
+
112
+ if(isset($this->_config[$val])){
113
+ $return = $this->_config[$val];
114
+ }else{
115
+ $return = Mage::getStoreConfig("bumble_filter/module_setting/".$val );
116
+ }
117
+ if($return == "" && $default) {
118
+ $return = $default;
119
+ }
120
+
121
+ }
122
+
123
+ return $return;
124
+ }
125
+
126
+ protected function _toHtml(){
127
+ $this->_show = $this->getGeneralConfig("show");
128
+ $enable_scroll = $this->getConfig("enable_scrollmodule");
129
+ $limit = (int)$this->getConfig('itemvisiable');
130
+
131
+
132
+ if(!$this->_show || !$enable_scroll) return;
133
+ $collection = Mage::getModel( 'bumble_filter/group' )
134
+ ->getCollection();
135
+
136
+
137
+
138
+ $collection->addFieldToFilter('is_active', 1)
139
+ ->setOrder( 'position', 'ASC' );
140
+
141
+ if($limit){
142
+ $collection ->setPageSize($limit);
143
+ }
144
+
145
+
146
+ $extension = ".html";
147
+ foreach( $collection as $model ){
148
+ if(!$model->getLink()){
149
+
150
+ $id=$model->getFilterId();
151
+ $filterGroup = Mage::getModel('bumble_filter/filter')->load($id);
152
+ $resroute = $filterGroup->getIdentifier();
153
+ Mage::getModel('core/url_rewrite')->loadByIdPath('bumblefilter/filter/'.$id())
154
+ ->setIdPath('bumblefilter/filter/'.$id())
155
+ ->setRequestPath($resroute .'/'.$model->getIdentifier().$extension )
156
+ ->setTargetPath('bumblefilter/filter/view/id/'.$id())
157
+ ->save();
158
+ }
159
+ }
160
+
161
+ $this->assign('filters', $collection );
162
+ $this->assign('resroute',$resroute);
163
+ return parent::_toHtml();
164
+
165
+ }
166
+
167
+ public function getMoreViewLink() {
168
+ if($this->_filter_group) {
169
+ return $this->_filter_group->getCategoryLink();
170
+ }else{
171
+ $resroute = Mage::getStoreConfig('bumble_filter/general_setting/route');
172
+ if ($resroute == "") {
173
+ $resroute = "bumblefilter";
174
+ }
175
+ return Mage::getBaseUrl().$resroute;
176
+ }
177
+ return;
178
+ }
179
+
180
+ }
app/code/community/Bumble/Filter/Block/System/.DS_Store ADDED
Binary file
app/code/community/Bumble/Filter/Block/System/Config/.DS_Store ADDED
Binary file
app/code/community/Bumble/Filter/Block/System/Config/Form/.DS_Store ADDED
Binary file
app/code/community/Bumble/Filter/Block/System/Config/Form/Field/Dev.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Bumble_Filter_Block_System_Config_Form_Field_Dev extends Mage_Adminhtml_Block_Abstract implements Varien_Data_Form_Element_Renderer_Interface
4
+ {
5
+ public function render(Varien_Data_Form_Element_Abstract $element)
6
+ {
7
+ $useContainerId = $element->getData('use_container_id');
8
+ return sprintf('<tr class="system-fieldset-sub-head" id="row_%s"><td colspan="5" class="bumble-description">
9
+ <h3>'.$this->__("Developers :").'</h3>
10
+
11
+ <h4 style="float:left;">'.$this->__( "Lanzillo Ferdinando" ) .'</h4>
12
+ <h4 style="float:right;"><a href="mailto:flanzillo05@gmail.com">'.$this->__( "E-mail : flanzillo05@gmail.com" ) .'</a></h4>
13
+
14
+
15
+ </td></tr>
16
+ ', $element->getHtmlId(), $element->getHtmlId(), $element->getLabel()
17
+ );
18
+ }
19
+ }
20
+ ?>
app/code/community/Bumble/Filter/Block/System/Config/Form/Field/DevNames.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Bumble_Filter_Block_System_Config_Form_Field_Devnames extends Mage_Adminhtml_Block_Abstract implements Varien_Data_Form_Element_Renderer_Interface
4
+ {
5
+ public function render(Varien_Data_Form_Element_Abstract $element)
6
+ {
7
+ $useContainerId = $element->getData('use_container_id');
8
+ return sprintf('<tr class="system-fieldset-sub-head" id="row_%s"><td colspan="5" class="bumble-description">
9
+ <h3>'.$this->__("Developers :").'</h3>
10
+ <div>
11
+ <h4>'.$this->__( "Lanzillo Ferdinando" ) .'</h4>
12
+ </td>
13
+ <td colspan="5" class="bumble-description">
14
+ <h4><a href="mailto:flanzillo05@gmail.com">'.$this->__( "E-mail : flanzillo05@gmail.com" ) .'</a></h4>
15
+ </div>
16
+
17
+ </td></tr>
18
+ ', $element->getHtmlId(), $element->getHtmlId(), $element->getLabel()
19
+ );
20
+ }
21
+ }
22
+ ?>
app/code/community/Bumble/Filter/Block/System/Config/Form/Field/Devnames2.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Bumble_Filter_Block_System_Config_Form_Field_Devnames2 extends Mage_Adminhtml_Block_Abstract implements Varien_Data_Form_Element_Renderer_Interface
4
+ {
5
+ public function render(Varien_Data_Form_Element_Abstract $element)
6
+ {
7
+ $useContainerId = $element->getData('use_container_id');
8
+ return sprintf('<tr class="system-fieldset-sub-head" id="row_%s"><td colspan="5" class="bumble-description">
9
+
10
+ <h4 style="float:left;">'.$this->__( "Sabatino Francesco" ) .'</h4>
11
+ <h4 style="float:right;"><a href="mailto:francesco-sabatino@hotmail.it">'.$this->__( "E-mail : francesco-sabatino@hotmail.it" ) .'</a></h4>
12
+
13
+ </td></tr>
14
+ ', $element->getHtmlId(), $element->getHtmlId(), $element->getLabel()
15
+ );
16
+ }
17
+ }
18
+ ?>
app/code/community/Bumble/Filter/Block/System/Config/Form/Field/Heading.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+
28
+ /**
29
+ * Renderer for lable in fieldset
30
+ *
31
+ * @author LandOfCoder <landofcoder@gmail.com>
32
+ */
33
+ class Bumble_Filter_Block_System_Config_Form_Field_Heading extends Mage_Adminhtml_Block_Abstract implements Varien_Data_Form_Element_Renderer_Interface
34
+ {
35
+ public function render(Varien_Data_Form_Element_Abstract $element)
36
+ {
37
+ $useContainerId = $element->getData('use_container_id');
38
+ return sprintf('<tr class="system-fieldset-sub-head-tabs" id="row_%s"><td colspan="5"><h4 id="%s">%s</h4></td></tr>',
39
+ $element->getHtmlId(), $element->getHtmlId(), $element->getLabel()
40
+ );
41
+ }
42
+ }
43
+ ?>
app/code/community/Bumble/Filter/Block/System/Config/Form/Field/Headtitle.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Bumble_Filter_Block_System_Config_Form_Field_Headtitle extends Mage_Adminhtml_Block_Abstract implements Varien_Data_Form_Element_Renderer_Interface
4
+ {
5
+ public function render(Varien_Data_Form_Element_Abstract $element)
6
+ {
7
+ $useContainerId = $element->getData('use_container_id');
8
+ return sprintf('<tr class="system-fieldset-sub-head" id="row_%s"><td colspan="5" class="bumble-description">
9
+ <h3> Bumble Filter Module </h3>
10
+ </td></tr>', $element->getHtmlId(), $element->getHtmlId(), $element->getLabel()
11
+ );
12
+ }
13
+ }
14
+ ?>
app/code/community/Bumble/Filter/Block/System/Config/Form/Field/Helpcode.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Bumble_Filter_Block_System_Config_Form_Field_Helpcode extends Mage_Adminhtml_Block_Abstract implements Varien_Data_Form_Element_Renderer_Interface
4
+ {
5
+ public function render(Varien_Data_Form_Element_Abstract $element)
6
+ {
7
+ $useContainerId = $element->getData('use_container_id');
8
+ return sprintf('<tr class="system-fieldset-sub-head" id="row_%s"><td colspan="5" class="bumble-description">
9
+ <h3> Bumble Filter </h3>
10
+ <p>'.$this->__( "If you need to insert Carousel like a block, you can paste the follow code in CMS page :" ) .'</p>
11
+
12
+ <code><strong>{{block type="core/template" name="bumble.carousel" template="bumble/filter/block/carousel.phtml"}}</strong></code>
13
+ </td></tr>', $element->getHtmlId(), $element->getHtmlId(), $element->getLabel()
14
+ );
15
+ }
16
+ }
17
+ ?>
app/code/community/Bumble/Filter/Block/System/Config/Form/Field/Information.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Bumble_Filter_Block_System_Config_Form_Field_Information extends Mage_Adminhtml_Block_Abstract implements Varien_Data_Form_Element_Renderer_Interface
4
+ {
5
+ public function render(Varien_Data_Form_Element_Abstract $element)
6
+ {
7
+ $useContainerId = $element->getData('use_container_id');
8
+ return sprintf('<tr class="system-fieldset-sub-head" id="row_%s"><td colspan="5" class="bumble-description">
9
+ <br />
10
+
11
+ <br />
12
+ <h3>'.$this->__("Developed:").'</h3>
13
+ <div style="font-size:11px">'.$this->__( "Copyright &copy; 2016:" ) .' <i style="font-size:13px"><b>'.$this->__( "BumbleBit S.r.l." ) .'</b></i></div>
14
+ <div style="font-size:11px">'.$this->__( "For more Info on ours module o for a support have a look on" ) .' <i><a href="http://'.$this->__("www.armah.it/armah-extension-en/").'" target="_blank">www.armah.it/armah-extension/</a></i></div>
15
+ </td></tr>', $element->getHtmlId(), $element->getHtmlId(), $element->getLabel()
16
+ );
17
+ }
18
+ }
19
+ ?>
app/code/community/Bumble/Filter/Block/System/Config/Form/Field/Notification.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Bumble_Filter_Block_System_Config_Form_Field_Notification extends Mage_Adminhtml_Block_System_Config_Form_Field
4
+ {
5
+ protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
6
+ {
7
+ $time = intval($element->getValue());
8
+ $time = !empty($time)?$time:time();
9
+ $url = Mage::getBaseUrl('js');
10
+ $jspath = $url.'bumble_filter/form/script.js';
11
+ $csspath = $url.'bumble_filter/form/style.css';
12
+ $output = '<link rel="stylesheet" type="text/css" href="'.$csspath.'" />';
13
+
14
+ //$output .= '<script type="text/javascript" src="' . $url .'bumble_filter/jquery.js"></script>';
15
+ $output .= '<script type="text/javascript" src="'.$jspath.'"></script>';
16
+ $format = Mage::app()->getLocale()->getDateTimeFormat(Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM);
17
+ $timeUpdate = Mage::app()->getLocale()->date()->toString($format);
18
+
19
+ return $timeUpdate. $output;
20
+ }
21
+ }
22
+ ?>
app/code/community/Bumble/Filter/Block/System/Config/Form/Field/Responsive1024.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Bumble_Filter_Block_System_Config_Form_Field_Responsive1024 extends Mage_Adminhtml_Block_Abstract implements Varien_Data_Form_Element_Renderer_Interface
4
+ {
5
+ public function render(Varien_Data_Form_Element_Abstract $element)
6
+ {
7
+ $useContainerId = $element->getData('use_container_id');
8
+ return sprintf('<tr class="system-fieldset-sub-head" id="row_%s"><td colspan="5" class="bumble-description">
9
+
10
+ <h3 style="font-size:1.1em;border-bottom:1px solid grey;"><strong>Responsive 1024</strong></h3>
11
+ </td></tr>', $element->getHtmlId(), $element->getHtmlId(), $element->getLabel()
12
+ );
13
+ }
14
+ }
15
+ ?>
app/code/community/Bumble/Filter/Block/System/Config/Form/Field/Responsive480.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Bumble_Filter_Block_System_Config_Form_Field_Responsive480 extends Mage_Adminhtml_Block_Abstract implements Varien_Data_Form_Element_Renderer_Interface
4
+ {
5
+ public function render(Varien_Data_Form_Element_Abstract $element)
6
+ {
7
+ $useContainerId = $element->getData('use_container_id');
8
+ return sprintf('<tr class="system-fieldset-sub-head" id="row_%s"><td colspan="5" class="bumble-description">
9
+
10
+ <h3 style="font-size:1.1em;border-bottom:1px solid grey;"><strong>Responsive 480</strong></h3>
11
+ </td></tr>', $element->getHtmlId(), $element->getHtmlId(), $element->getLabel()
12
+ );
13
+ }
14
+ }
15
+ ?>
app/code/community/Bumble/Filter/Block/System/Config/Form/Field/Responsive600.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Bumble_Filter_Block_System_Config_Form_Field_Responsive600 extends Mage_Adminhtml_Block_Abstract implements Varien_Data_Form_Element_Renderer_Interface
4
+ {
5
+ public function render(Varien_Data_Form_Element_Abstract $element)
6
+ {
7
+ $useContainerId = $element->getData('use_container_id');
8
+ return sprintf('<tr class="system-fieldset-sub-head" id="row_%s"><td colspan="5" class="bumble-description">
9
+
10
+ <h3 style="font-size:1.1em;border-bottom:1px solid grey;"><strong>Responsive 600</strong></h3>
11
+ </td></tr>', $element->getHtmlId(), $element->getHtmlId(), $element->getLabel()
12
+ );
13
+ }
14
+ }
15
+ ?>
app/code/community/Bumble/Filter/Block/System/Config/Form/Field/Spacer.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Bumble_Filter_Block_System_Config_Form_Field_Spacer extends Mage_Adminhtml_Block_Abstract implements Varien_Data_Form_Element_Renderer_Interface
4
+ {
5
+ public function render(Varien_Data_Form_Element_Abstract $element)
6
+ {
7
+ $useContainerId = $element->getData('use_container_id');
8
+ return sprintf('<tr class="system-fieldset-sub-head" id="row_%s"><td colspan="5"><h4 id="%s">%s</h4></td></tr>',
9
+ $element->getHtmlId(), $element->getHtmlId(), $element->getLabel()
10
+ );
11
+ }
12
+ }
13
+ ?>
app/code/community/Bumble/Filter/Block/Widget/Carousel.php ADDED
@@ -0,0 +1,173 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Bumble_Filter_Block_Widget_Carousel extends Mage_Core_Block_Abstract implements Mage_Widget_Block_Interface
4
+ {
5
+ protected function _toHtml()
6
+ {
7
+
8
+ $url= $_SERVER['HTTP_HOST'];
9
+ $imgload = 'http://'.$url.'/skin/frontend/base/default/bumble_filter/images/loading.gif';
10
+
11
+ //RECUPERO DATI
12
+ //slide_by
13
+ //interval
14
+ //autoplay
15
+ //showarrow
16
+ //slide_col
17
+ //show_dots
18
+ $filter_group = $this->getData('filter_group');
19
+ $use_owl_carousel = $this->getData('use_owl_carousel');
20
+
21
+ $slide_by = $this->getData('slide_by');
22
+ $autoplay = $this->getData('autoplay');
23
+ $interval = $this->getData('interval');
24
+ $slide_col = $this->getData('slide_col');
25
+ $show_dots = $this->getData('show_dots');
26
+ $showarrow = $this->getData('showarrow');
27
+
28
+ //Responsive 1024
29
+ $slide_by_resp_1024 = $this->getData('slide_by_resp_1024');
30
+ $autoplay_resp_1024 = $this->getData('autoplay_resp_1024');
31
+ $interval_resp_1024 = $this->getData('interval_resp_1024');
32
+ $slide_col_resp_1024 = $this->getData('slide_col_resp_1024');
33
+ $show_dots_resp_1024 = $this->getData('show_dots_resp_1024');
34
+ $showarrow_resp_1024 = $this->getData('showarrow_resp_1024');
35
+
36
+ //Responsive 600
37
+ $slide_by_resp_600 = $this->getData('slide_by_resp_600');
38
+ $autoplay_resp_600 = $this->getData('autoplay_resp_600');
39
+ $interval_resp_600 = $this->getData('interval_resp_600');
40
+ $slide_col_resp_600 = $this->getData('slide_col_resp_600');
41
+ $show_dots_resp_600 = $this->getData('show_dots_resp_600');
42
+ $showarrow_resp_600 = $this->getData('showarrow_resp_600');
43
+
44
+ //Responsive 480
45
+ $slide_by_resp_480 = $this->getData('slide_by_resp_480');
46
+ $autoplay_resp_480 = $this->getData('autoplay_resp_480');
47
+ $interval_resp_480 = $this->getData('interval_resp_480');
48
+ $slide_col_resp_480 = $this->getData('slide_col_resp_480');
49
+ $show_dots_resp_480 = $this->getData('show_dots_resp_480');
50
+ $showarrow_resp_480 = $this->getData('showarrow_resp_480');
51
+
52
+
53
+ $html =
54
+ '<script>
55
+
56
+ jQuery(document).ready(function(){
57
+ jQuery(".bumble_carousel").slick({
58
+ infinite: true,
59
+ slidesToShow: '.$slide_col .',
60
+ slidesToScroll: '.$slide_by .',
61
+ autoplay: '.$autoplay .',
62
+ autoplaySpeed: '.$interval .',
63
+ dots: '.$show_dots .',
64
+ centerMode: true,
65
+ centerPadding:"10px",
66
+ arrows: '.$showarrow .',
67
+
68
+ responsive: [
69
+ {
70
+ breakpoint: 1024,
71
+ settings: {
72
+ infinite: true,
73
+ slidesToShow: '.$slide_col_resp_1024 .',
74
+ slidesToScroll: '.$slide_by_resp_1024 .',
75
+ autoplay: '.$autoplay_resp_1024 .',
76
+ autoplaySpeed: '.$interval_resp_1024 .',
77
+ dots: '.$show_dots_resp_1024 .',
78
+ centerMode: true,
79
+ centerPadding:"10px",
80
+ arrows: '.$showarrow_resp_1024 .',
81
+ }
82
+ },
83
+ {
84
+ breakpoint: 600,
85
+ settings: {
86
+ infinite: true,
87
+ slidesToShow: '.$slide_col_resp_600 .',
88
+ slidesToScroll: '.$slide_by_resp_600 .',
89
+ autoplay: '.$autoplay_resp_600 .',
90
+ autoplaySpeed: '.$interval_resp_600 .',
91
+ dots: '.$show_dots_resp_600.',
92
+ centerMode: true,
93
+ centerPadding:"10px",
94
+ arrows: '.$showarrow_resp_600 .',
95
+ }
96
+ },
97
+ {
98
+ breakpoint: 480,
99
+ settings: {
100
+ infinite: true,
101
+ slidesToShow: '.$slide_col_resp_480 .',
102
+ slidesToScroll: '.$slide_by_resp_480 .',
103
+ autoplay: '.$autoplay_resp_480 .',
104
+ autoplaySpeed: '.$interval_resp_480 .',
105
+ dots: '.$show_dots_resp_480 .',
106
+ centerMode: true,
107
+ centerPadding:"10px",
108
+ arrows: '.$showarrow_resp_480 .',
109
+ }
110
+ }
111
+
112
+ ]
113
+ });
114
+ });
115
+
116
+ </script>';
117
+
118
+ $html .= '<div class="bumble_carousel"> ';
119
+
120
+ $filter = Mage::getModel('bumble_filter/group')->getCollection();
121
+ if($filter_group == 0 || $filter_group == ""){
122
+ foreach ($filter as $filters)
123
+ {
124
+ $res = $filters->getFile();
125
+ $title= $filters->getTitle();
126
+ $filterId= $filters->getFilterId();
127
+ $show= $filters->getStatus();
128
+ $groupIdentifier= Mage::getModel('bumble_filter/filter')->load($filterId)->getIdentifier();
129
+ $identi= $filters->getIdentifier();
130
+ $extension = '.html';
131
+ if($show == 1)
132
+ {
133
+ $html .='<div>
134
+ <a href="http://'.$url.'/'.$groupIdentifier.'/'.$identi.$extension.'"><img data-u="image" class="logo-carousel" src="media/'.$res.'" alt="'.$filters->getTitle().'" />
135
+ </a>
136
+ </div>';
137
+ }
138
+
139
+ }
140
+ }
141
+ else
142
+ {
143
+ foreach ($filter as $filters)
144
+ {
145
+ $res = $filters->getFile();
146
+ $title= $filters->getTitle();
147
+ $filterId= $filters->getFilterId();
148
+ $show= $filters->getStatus();
149
+ if($filter_group == $filterId){
150
+ $groupIdentifier= Mage::getModel('bumble_filter/filter')->load($filterId)->getIdentifier();
151
+ $identi= $filters->getIdentifier();
152
+ $extension = '.html';
153
+
154
+ if($show == 1)
155
+ {
156
+ $html .='<div>
157
+ <a href="http://'.$url.'/'.$groupIdentifier.'/'.$identi.$extension.'"><img data-u="image" class="logo-carousel" src="media/'.$res.'" alt="'.$filters->getTitle().'" />
158
+ </a>
159
+ </div>';
160
+ }
161
+ }
162
+
163
+ }
164
+ }
165
+
166
+ $html .='</div>';
167
+
168
+
169
+ return $html;
170
+ }
171
+ }
172
+
173
+
app/code/community/Bumble/Filter/Block/Widget/List.php ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Bumble_Filter_Block_Widget_List extends Bumble_Filter_Block_Filternav implements Mage_Widget_Block_Interface
3
+ {
4
+ /**
5
+ * Contructor
6
+ */
7
+ public function __construct($attributes = array())
8
+ {
9
+ parent::__construct($attributes);
10
+
11
+ /*Cache Block*/
12
+ $enable_cache = $this->getConfig("enable_cache", 1 );
13
+ if(!$enable_cache) {
14
+ $cache_lifetime = null;
15
+ } else {
16
+ $cache_lifetime = $this->getConfig("cache_lifetime", 86400 );
17
+ $cache_lifetime = (int)$cache_lifetime>0?$cache_lifetime: 86400;
18
+ }
19
+
20
+ $this->addData(array('cache_lifetime' => $cache_lifetime));
21
+
22
+ $this->addCacheTag(array(
23
+ Mage_Core_Model_Store::CACHE_TAG,
24
+ Mage_Cms_Model_Block::CACHE_TAG,
25
+ Bumble_Filter_Model_Filter::CACHE_WIDGET_LIST_TAG
26
+ ));
27
+
28
+ }
29
+
30
+ /**
31
+ * Get Key pieces for caching block content
32
+ *
33
+ * @return array
34
+ */
35
+ public function getCacheKeyInfo()
36
+ {
37
+ return array(
38
+ 'ARMAH_BRAND_WIDGET_LIST',
39
+ $this->getNameInLayout(),
40
+ Mage::app()->getStore()->getId(),
41
+ Mage::getDesign()->getPackageName(),
42
+ Mage::getDesign()->getTheme('template'),
43
+ Mage::getSingleton('customer/session')->getCustomerGroupId(),
44
+ 'template' => $this->getTemplate(),
45
+ );
46
+ }
47
+
48
+ public function _toHtml() {
49
+ $pretext = $this->getConfig("pretext");
50
+ $pretext = base64_decode($pretext);
51
+ $filter_group = $this->getConfig('filter_group');
52
+ $show = $this->getConfig("show");
53
+ $limit = (int)$this->getConfig('itemvisiable');
54
+
55
+ if(!$show ) return;
56
+ $collection = Mage::getModel( 'bumble_filter/filter' )->getCollection();
57
+ $collection->addFieldToFilter("group_filter_id", array("eq" => $filter_group))
58
+ ->addFieldToFilter('is_active', 1)
59
+ ->setOrder( 'position', 'ASC' );
60
+
61
+ if($limit){
62
+ $collection ->setPageSize($limit);
63
+ }
64
+ $resroute = Mage::getStoreConfig('bumble_filter/general_setting/route');
65
+ $extension = ".html";
66
+ foreach( $collection as $model ){
67
+ if(!$model->getLink()){
68
+ Mage::getModel('core/url_rewrite')->loadByIdPath('bumblefilter/filter/'.$model->getId())
69
+ ->setIdPath('bumblefilter/filter/'.$model->getId())
70
+ ->setRequestPath($resroute .'/'.$model->getIdentifier().$extension )
71
+ ->setTargetPath('bumblefilter/filter/view/id/'.$model->getId())
72
+ ->save();
73
+ }
74
+ }
75
+ $this->setData("pretext", $pretext);
76
+ $this->assign('resroute',$resroute);
77
+ return parent::_toHtml();
78
+ }
79
+ }
app/code/community/Bumble/Filter/Block/Widget/Scroll.php ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Bumble_Filter_Block_Widget_Scroll extends Bumble_Filter_Block_Scroll implements Mage_Widget_Block_Interface
3
+ {
4
+ /**
5
+ * Contructor
6
+ */
7
+ public function __construct($attributes = array())
8
+ {
9
+ parent::__construct($attributes);
10
+ /*Cache Block*/
11
+ $enable_cache = $this->getConfig("enable_cache", 1 );
12
+ if(!$enable_cache) {
13
+ $cache_lifetime = null;
14
+ } else {
15
+ $cache_lifetime = $this->getConfig("cache_lifetime", 86400 );
16
+ $cache_lifetime = (int)$cache_lifetime>0?$cache_lifetime: 86400;
17
+ }
18
+
19
+ $this->addData(array('cache_lifetime' => $cache_lifetime));
20
+
21
+ $this->addCacheTag(array(
22
+ Mage_Core_Model_Store::CACHE_TAG,
23
+ Mage_Cms_Model_Block::CACHE_TAG,
24
+ Bumble_Filter_Model_Filter::CACHE_WIDGET_SCROLL_TAG
25
+ ));
26
+ }
27
+
28
+ /**
29
+ * Get Key pieces for caching block content
30
+ *
31
+ * @return array
32
+ */
33
+ public function getCacheKeyInfo()
34
+ {
35
+ return array(
36
+ 'ARMAH_BRAND_WIDGET_SCROLL',
37
+ $this->getNameInLayout(),
38
+ Mage::app()->getStore()->getId(),
39
+ Mage::getDesign()->getPackageName(),
40
+ Mage::getDesign()->getTheme('template'),
41
+ Mage::getSingleton('customer/session')->getCustomerGroupId(),
42
+ 'template' => $this->getTemplate(),
43
+ );
44
+ }
45
+ protected function _toHtml(){
46
+ return parent::_toHtml();
47
+ }
48
+ }
app/code/community/Bumble/Filter/Block/Widget/Wysiwyg.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Bumble_Filter_Block_Widget_Wysiwyg extends Mage_Adminhtml_Block_Widget_Form_Renderer_Fieldset_Element
3
+ {
4
+ public function render(Varien_Data_Form_Element_Abstract $element)
5
+ {
6
+ $editor = new Varien_Data_Form_Element_Editor($element->getData());
7
+
8
+ // Prevent foreach error
9
+ $editor->getConfig()->setPlugins(array());
10
+
11
+ $editor->setId($element->getId());
12
+ $editor->setForm($element->getForm());
13
+ $editor->setValue(base64_decode($editor->getValue()));
14
+
15
+ return parent::render($editor);
16
+ }
17
+ }
app/code/community/Bumble/Filter/Helper/.DS_Store ADDED
Binary file
app/code/community/Bumble/Filter/Helper/Data.php ADDED
@@ -0,0 +1,220 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ --------------------------------------------------------------------------*/
10
+ class Bumble_Filter_Helper_Data extends Mage_Core_Helper_Abstract {
11
+
12
+ public function checkAvaiable( $controller_name = ""){
13
+ $arr_controller = array( "Mage_Cms",
14
+ "Mage_Catalog",
15
+ "Mage_Tag",
16
+ "Mage_Checkout",
17
+ "Mage_Customer",
18
+ "Mage_Wishlist",
19
+ "Mage_CatalogSearch",
20
+ "Bumble_Filter" );
21
+ if( !empty($controller_name)){
22
+ if( in_array( $controller_name, $arr_controller ) ){
23
+ return true;
24
+ }
25
+ }
26
+ return false;
27
+ }
28
+
29
+ public function getFilterPerPage(){
30
+ return 6;
31
+
32
+ }
33
+ public function checkMenuItem( $menu_name = "", $menuAssignment)
34
+ {
35
+ if(!empty( $menu_name) ){
36
+ $menus = isset( $menuAssignment ) ? $menuAssignment : "all";
37
+ $menus = explode(",", $menus);
38
+ if( in_array("all", $menus) || in_array( $menu_name, $menus) ){
39
+ return true;
40
+ }
41
+ }
42
+ return false;
43
+ }
44
+ public function getListMenu(){
45
+ $arrayParams = array(
46
+ 'all'=>Mage::helper('adminhtml')->__("All"),
47
+ 'Mage_Cms_index'=>Mage::helper('adminhtml')->__("Mage Cms Index"),
48
+ 'Mage_Cms_page'=>Mage::helper('adminhtml')->__("Mage Cms Page"),
49
+ 'Mage_Catalog_category'=>Mage::helper('adminhtml')->__("Mage Catalog Category"),
50
+ 'Mage_Catalog_product'=>Mage::helper('adminhtml')->__("Mage Catalog Product"),
51
+ 'Mage_Customer_account'=>Mage::helper('adminhtml')->__("Mage Customer Account"),
52
+ 'Mage_Wishlist_index'=>Mage::helper('adminhtml')->__("Mage Wishlist Index"),
53
+ 'Mage_Customer_address'=>Mage::helper('adminhtml')->__("Mage Customer Address"),
54
+ 'Mage_Checkout_cart'=>Mage::helper('adminhtml')->__("Mage Checkout Cart"),
55
+ 'Mage_Checkout_onepage'=>Mage::helper('adminhtml')->__("Mage Checkout"),
56
+ 'Mage_CatalogSearch_result'=>Mage::helper('adminhtml')->__("Mage Catalog Search"),
57
+ 'Mage_Tag_product'=>Mage::helper('adminhtml')->__("Mage Tag Product")
58
+ );
59
+ return $arrayParams;
60
+ }
61
+ function get( $attributes = NULL)
62
+ {
63
+ $data = array();
64
+ $arrayParams = array('show',
65
+ 'enable_jquery',
66
+ 'name',
67
+ 'title',
68
+ 'mage_folder',
69
+ 'theme',
70
+ 'moduleHeight',
71
+ 'moduleWidth',
72
+ 'thumbnailMode',
73
+ 'thumbWidth',
74
+ 'thumbHeight',
75
+ 'blockPosition',
76
+ 'customBlockPosition',
77
+ 'blockDisplay',
78
+ 'menuAssignment',
79
+ 'source',
80
+ 'image_folder',
81
+ 'catsid',
82
+ 'sourceProductsMode',
83
+ 'quanlity',
84
+
85
+ 'imagecategory',
86
+
87
+ 'titleMaxchar',
88
+ 'descMaxchar',
89
+ 'slide_width',
90
+ 'slide_height',
91
+ 'auto_play',
92
+ 'scroll_items',
93
+ 'limit_cols',
94
+ 'show_button',
95
+ 'show_pager',
96
+ 'show_title',
97
+ 'show_desc',
98
+ 'show_price',
99
+ 'show_pricewithout',
100
+ 'show_date',
101
+ 'show_addcart',
102
+ 'duration',
103
+
104
+ );
105
+
106
+
107
+ foreach ($arrayParams as $var)
108
+ {
109
+ $tags = array('bumble_filter', 'effect_setting', 'file_source_setting','image_source_setting', 'main_filter');
110
+ foreach($tags as $tag){
111
+ if(Mage::getStoreConfig("bumble_filter/$tag/$var")!=""){
112
+ $data[$var] = Mage::getStoreConfig("bumble_filter/$tag/$var");
113
+ }
114
+ }
115
+ if(isset($attributes[$var]))
116
+ {
117
+ $data[$var] = $attributes[$var];
118
+ }
119
+ }
120
+
121
+ return $data;
122
+ }
123
+ public function getImageUrl($url = null) {
124
+ return Mage::getSingleton('bumble_filter/config')->getBaseMediaUrl() . $url;
125
+ }
126
+
127
+
128
+ public function resize( $image, $width, $height ){
129
+
130
+
131
+ $image= str_replace("/",DS, $image);
132
+ $_imageUrl = Mage::getBaseDir('media').DS.$image;
133
+ $imageResized = Mage::getBaseDir('media').DS."resized".DS."{$width}x{$height}".DS.$image;
134
+
135
+ if (!file_exists($imageResized)&&file_exists($_imageUrl)) {
136
+ $imageObj = new Varien_Image($_imageUrl);
137
+ $imageObj->quality(100);
138
+ $imageObj->constrainOnly(true);
139
+ $imageObj->keepAspectRatio(true);
140
+ $imageObj->keepFrame(false);
141
+ $imageObj->keepTransparency(true);
142
+ $imageObj->resize( $width, $height);
143
+ $imageObj->save($imageResized);
144
+
145
+ }
146
+ return Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'resized/'."{$width}x{$height}/".str_replace(DS,"/",$image);
147
+ }
148
+
149
+ /**
150
+ * Encode the mixed $valueToEncode into the JSON format
151
+ *
152
+ * @param mixed $valueToEncode
153
+ * @param boolean $cycleCheck Optional; whether or not to check for object recursion; off by default
154
+ * @param array $options Additional options used during encoding
155
+ * @return string
156
+ */
157
+ public function jsonEncode($valueToEncode, $cycleCheck = false, $options = array())
158
+ {
159
+ $json = Zend_Json::encode($valueToEncode, $cycleCheck, $options);
160
+ /* @var $inline Mage_Core_Model_Translate_Inline */
161
+ $inline = Mage::getSingleton('core/translate_inline');
162
+ if ($inline->isAllowed()) {
163
+ $inline->setIsJson(true);
164
+ $inline->processResponseBody($json);
165
+ $inline->setIsJson(false);
166
+ }
167
+
168
+ return $json;
169
+ }
170
+
171
+ /*
172
+ * Recursively searches and replaces all occurrences of search in subject values replaced with the given replace value
173
+ * @param string $search The value being searched for
174
+ * @param string $replace The replacement value
175
+ * @param array $subject Subject for being searched and replaced on
176
+ * @return array Array with processed values
177
+ */
178
+ public function recursiveReplace($search, $replace, $subject)
179
+ {
180
+ if(!is_array($subject))
181
+ return $subject;
182
+
183
+ foreach($subject as $key => $value)
184
+ if(is_string($value))
185
+ $subject[$key] = str_replace($search, $replace, $value);
186
+ elseif(is_array($value))
187
+ $subject[$key] = self::recursiveReplace($search, $replace, $value);
188
+
189
+ return $subject;
190
+ }
191
+
192
+ public function getCategoriesList( $default=true ){
193
+ $output = array();
194
+ if( $default ){
195
+ $output[0] = $this->__("Select A Category");
196
+ }
197
+
198
+ $collection = Mage::getModel('bumble_filter/category')->getCollection();
199
+
200
+ if( $collection ){
201
+ foreach( $collection as $category ){
202
+ $output[$category->getId()]=$category->getTitle();
203
+ }
204
+ }
205
+ return $output;
206
+ }
207
+
208
+ public function getTagUrl($tag){
209
+ return Mage::getBaseUrl().Mage::getStoreConfig('bumble_filter/general_setting/route')."/tag/".$tag.".html";
210
+ }
211
+
212
+ public function getPostURL( $id ){
213
+ return Mage::getBaseUrl().Mage::getModel('core/url_rewrite')->loadByIdPath('bumblefilter/post/'.$id)->getRequestPath();
214
+ }
215
+
216
+ public function getFilterById( $id ){
217
+ return Mage::getModel("bumble_filter/filter")->load( $id ) ;
218
+ }
219
+ }
220
+ ?>
app/code/community/Bumble/Filter/Helper/Media.php ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Bumble_Filter_Helper_Media extends Mage_Core_Helper_Abstract {
3
+ /**
4
+ *
5
+ * Add media file ( js, css ) ...
6
+ * @param $type string media type (js, skin_css)
7
+ * @param $source string source path
8
+ * @param $before boolean true/false
9
+ * @param $params mix
10
+ * @param $if string
11
+ * @param $cond string
12
+ */
13
+ function addMediaFile($type = "", $source = "", $before = false, $params=null, $if="", $cond="" ){
14
+ $_head = Mage::getSingleton('core/layout')->getBlock( 'head');
15
+ if(is_object($_head) && !empty($source)){
16
+ $items = $_head->getData('items');
17
+ $tmpItems = array();
18
+ $search = $type."/".$source;
19
+ if(is_array($items)){
20
+ $key_array = array_keys($items);
21
+ foreach ($key_array as &$_key) {
22
+ if ($search == $_key) {
23
+ $tmpItems[$_key] = $items[$_key];
24
+ unset($items[$_key]);
25
+ }
26
+ }
27
+ }
28
+ if ($type=='skin_css' && empty($params)) {
29
+ $params = 'media="all"';
30
+ }
31
+ if (empty($tmpItems)) {
32
+ $tmpItems[$type.'/'.$source] = array(
33
+ 'type' => $type,
34
+ 'name' => $source,
35
+ 'params' => $params,
36
+ 'if' => $if,
37
+ 'cond' => $cond,
38
+ );
39
+ }
40
+ if($before){
41
+ $items = array_merge($tmpItems, $items);
42
+ }
43
+ else{
44
+ $items = array_merge($items, $tmpItems);
45
+ }
46
+ $_head->setData('items', $items);
47
+ }
48
+
49
+ return $this;
50
+ }
51
+ }
app/code/community/Bumble/Filter/Helper/Recaptcha.php ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Bumble_Filter_Helper_Recaptcha extends Mage_Core_Helper_Abstract {
3
+
4
+ /**
5
+ * @var string $privateKey
6
+ *
7
+ * @access protected
8
+ */
9
+ protected $privateKey = '';
10
+
11
+ /**
12
+ * @var string $publicKey
13
+ *
14
+ * @access protected
15
+ */
16
+ protected $publicKey = '';
17
+
18
+ /**
19
+ *
20
+ */
21
+ public function setKeys( $privateKey, $publicKey ){
22
+
23
+ $this->privateKey = ( $privateKey );
24
+ $this->publicKey =( $publicKey );
25
+
26
+ return $this;
27
+ }
28
+
29
+ /**
30
+ *
31
+ */
32
+ public function setTheme( $theme="" ){
33
+ $this->theme = $theme;
34
+ return $this;
35
+ }
36
+
37
+ /**
38
+ *
39
+ */
40
+ public function getReCapcha() {
41
+ $reCaptcha = '';
42
+ if( $this->publicKey && $this->privateKey ) {
43
+ $reCaptcha = new Zend_Service_ReCaptcha( $this->publicKey, $this->privateKey );
44
+ if( $this->theme ) {
45
+ $reCaptcha->setOptions(array('theme' => $this->theme) );
46
+ }
47
+ }
48
+ return $reCaptcha;
49
+ }
50
+
51
+ /**
52
+ *
53
+ */
54
+ public function isValid( $challengeField, $responseField ) {
55
+ $response = $this->getReCapcha()->verify( $challengeField, $responseField );
56
+ return $response->isValid();
57
+ }
58
+ }
59
+ ?>
app/code/community/Bumble/Filter/Helper/Uploadhandler.php ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ require("uploadedfile.php");
4
+ class Bumble_Filter_Helper_UploadHandler extends Mage_Core_Helper_Abstract
5
+ {
6
+ private $allowedExtensions = array();
7
+ private $sizeLimit = 10485760;
8
+ private $file;
9
+ private $uploadName;
10
+
11
+ public function preProcess(array $allowedExtensions = array(), $sizeLimit = 10485760){
12
+
13
+ $allowedExtensions = array_map("strtolower", $allowedExtensions);
14
+
15
+ $this->allowedExtensions = $allowedExtensions;
16
+ $this->sizeLimit = $sizeLimit;
17
+
18
+ $this->checkServerSettings();
19
+
20
+ if (isset($_GET['qqfile'])) {
21
+ $this->file = new qqUploadedFileXhr();
22
+ } elseif (isset($_FILES['qqfile'])) {
23
+ $this->file = new qqUploadedFileForm();
24
+ } else {
25
+ $this->file = false;
26
+ }
27
+
28
+ return $this;
29
+ }
30
+
31
+ public function getUploadName(){
32
+ if( isset( $this->uploadName ) )
33
+ return $this->uploadName;
34
+ }
35
+
36
+ public function getName(){
37
+ if ($this->file)
38
+ return $this->file->getName();
39
+ }
40
+
41
+ private function checkServerSettings(){
42
+ $postSize = $this->toBytes(ini_get('post_max_size'));
43
+ $uploadSize = $this->toBytes(ini_get('upload_max_filesize'));
44
+
45
+ if ($postSize < $this->sizeLimit || $uploadSize < $this->sizeLimit){
46
+ $size = max(1, $this->sizeLimit / 1024 / 1024) . 'M';
47
+ die("{'error':'increase post_max_size and upload_max_filesize to $size'}");
48
+ }
49
+ }
50
+
51
+ private function toBytes($str){
52
+ $val = trim($str);
53
+ $last = strtolower($str[strlen($str)-1]);
54
+ switch($last) {
55
+ case 'g': $val *= 1024;
56
+ case 'm': $val *= 1024;
57
+ case 'k': $val *= 1024;
58
+ }
59
+ return $val;
60
+ }
61
+
62
+ /**
63
+ * Returns array('success'=>true) or array('error'=>'error message')
64
+ */
65
+ function handleUpload($uploadDirectory, $replaceOldFile = FALSE){
66
+
67
+ if (!is_writable($uploadDirectory)){
68
+ return array('error' => "Server error. Upload directory isn't writable.");
69
+ }
70
+
71
+ if (!$this->file){
72
+ return array('error' => 'No files were uploaded.');
73
+ }
74
+
75
+ $size = $this->file->getSize();
76
+
77
+ if ($size == 0) {
78
+ return array('error' => 'File is empty');
79
+ }
80
+
81
+ if ($size > $this->sizeLimit) {
82
+ return array('error' => 'File is too large');
83
+ }
84
+
85
+ $pathinfo = pathinfo($this->file->getName());
86
+ $filename = $pathinfo['filename'];
87
+ //$filename = md5(uniqid());
88
+ $ext = @$pathinfo['extension']; // hide notices if extension is empty
89
+
90
+ if($this->allowedExtensions && !in_array(strtolower($ext), $this->allowedExtensions)){
91
+ $these = implode(', ', $this->allowedExtensions);
92
+ return array('error' => 'File has an invalid extension, it should be one of '. $these . '.');
93
+ }
94
+
95
+ $ext = ($ext == '') ? $ext : '.' . $ext;
96
+
97
+ if(!$replaceOldFile){
98
+ /// don't overwrite previous files that were uploaded
99
+ while (file_exists($uploadDirectory . $filename . $ext)) {
100
+ $filename .= rand(10, 99);
101
+ }
102
+ }
103
+
104
+ $this->uploadName = $filename . $ext;
105
+
106
+ if ($this->file->save($uploadDirectory . $filename . $ext)){
107
+ return array('success'=>true);
108
+ } else {
109
+ return array('error'=> 'Could not save uploaded file.' .
110
+ 'The upload was cancelled, or server error encountered');
111
+ }
112
+
113
+ }
114
+ }
app/code/community/Bumble/Filter/Helper/uploadedfile.php ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Handle file uploads via XMLHttpRequest
5
+ */
6
+ class qqUploadedFileXhr {
7
+ /**
8
+ * Save the file to the specified path
9
+ * @return boolean TRUE on success
10
+ */
11
+ function save($path) {
12
+ $input = fopen("php://input", "r");
13
+ $temp = tmpfile();
14
+ $realSize = stream_copy_to_stream($input, $temp);
15
+ fclose($input);
16
+
17
+ if ($realSize != $this->getSize()){
18
+ return false;
19
+ }
20
+
21
+ $target = fopen($path, �w�);
22
+ fseek($temp, 0, SEEK_SET);
23
+ stream_copy_to_stream($temp, $target);
24
+ fclose($target);
25
+
26
+ return true;
27
+ }
28
+ function getName() {
29
+ return $_GET['qqfile'];
30
+ }
31
+ function getSize() {
32
+ if (isset($_SERVER["CONTENT_LENGTH"])){
33
+ return (int)$_SERVER["CONTENT_LENGTH"];
34
+ } else {
35
+ throw new Exception("Getting content length is not supported.");
36
+ }
37
+ }
38
+ }
39
+
40
+ /**
41
+ * Handle file uploads via regular form post (uses the $_FILES array)
42
+ */
43
+ class qqUploadedFileForm {
44
+ /**
45
+ * Save the file to the specified path
46
+ * @return boolean TRUE on success
47
+ */
48
+ function save($path) {
49
+ if(!move_uploaded_file($_FILES['qqfile']['tmp_name'], $path)){
50
+ return false;
51
+ }
52
+ return true;
53
+ }
54
+ function getName() {
55
+ return $_FILES['qqfile']['name'];
56
+ }
57
+ function getSize() {
58
+ return $_FILES['qqfile']['size'];
59
+ }
60
+ }
app/code/community/Bumble/Filter/Media/Uploader.php ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ <?php
2
+ class Bumble_Filter_Media_Uploader extends Varien_File_Uploader
3
+ {
4
+ }
app/code/community/Bumble/Filter/Model/.DS_Store ADDED
Binary file
app/code/community/Bumble/Filter/Model/Button.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Bumble_Filter_Model_Button extends Mage_Adminhtml_Block_System_Config_Form_Field
3
+ {
4
+
5
+ protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
6
+ {
7
+ $this->setElement($element);
8
+ $url = '' //
9
+
10
+ $html = $this->getLayout()->createBlock('adminhtml/widget_button')
11
+ ->setType('button')
12
+ ->setClass('scalable')
13
+ ->setLabel('Delete')
14
+ ->setOnClick("setLocation('$url')")
15
+ ->toHtml();
16
+
17
+ return $html;
18
+ }
19
+ }
20
+ ?>
app/code/community/Bumble/Filter/Model/Catalog/Layer.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Bumble_Filter_Model_Catalog_Layer extends Mage_Catalog_Model_Layer
4
+ {
5
+
6
+ public function prepareProductCollection($collection)
7
+ {
8
+ parent::prepareProductCollection($collection);
9
+
10
+ $collection
11
+ ->getSelect()
12
+ ->where('price_index.final_price < price_index.price');
13
+
14
+ return $this;
15
+ }
16
+
17
+ }
app/code/community/Bumble/Filter/Model/Config.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /***********************Bumble Filter**************************************/
3
+ class Bumble_Filter_Model_Config extends Mage_Catalog_Model_Product_Media_Config {
4
+
5
+ public function getBaseMediaPath() {
6
+ return Mage::getBaseDir('media') .DS. 'filter';
7
+ }
8
+
9
+ public function getBaseMediaUrl() {
10
+ return Mage::getBaseUrl('media') . 'filter';
11
+ }
12
+
13
+ public function getBaseTmpMediaPath() {
14
+ return Mage::getBaseDir('media') .DS. 'tmp' .DS. 'filter';
15
+ }
16
+
17
+ public function getBaseTmpMediaUrl() {
18
+ return Mage::getBaseUrl('media') . 'tmp/filter';
19
+ }
20
+
21
+ }
app/code/community/Bumble/Filter/Model/Filter.php ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ ---------------------------------------------------------------------------*/
10
+
11
+ class Bumble_Filter_Model_Filter extends Mage_Core_Model_Abstract
12
+ {
13
+ const CACHE_BLOCK_SCROLL_TAG = "bumble_filter_scroll";
14
+ const CACHE_BLOCK_LIST_TAG = "bumble_filter_scroll";
15
+ const CACHE_WIDGET_SCROLL_TAG = "bumble_filter_widget_scroll";
16
+ const CACHE_WIDGET_LIST_TAG = "bumble_filter_widget_scroll";
17
+
18
+ protected function _construct() {
19
+ $this->_init('bumble_filter/filter');
20
+ }
21
+
22
+ public function getLink(){
23
+ return Mage::getBaseUrl().Mage::getModel('core/url_rewrite')->loadByIdPath('bumblefilter/filter/'.$this->getId())->getRequestPath();
24
+ }
25
+
26
+ public function getImageUrl($type='l') {
27
+ $tmp = explode("/", $this->getFile());
28
+ $imageName = $type."-".$tmp[count($tmp)-1];
29
+ return Mage::getBaseUrl( Mage_Core_Model_Store::URL_TYPE_MEDIA)."resized/".$imageName;
30
+ }
31
+
32
+ public function getIconUrl( ) {
33
+ return Mage::getBaseUrl( Mage_Core_Model_Store::URL_TYPE_MEDIA)."/".$this->getIcon();
34
+ }
35
+
36
+ public function getFileUrl(){
37
+ return Mage::getBaseUrl( Mage_Core_Model_Store::URL_TYPE_MEDIA)."/".$this->getFile();
38
+ }
39
+ }
app/code/community/Bumble/Filter/Model/Filtergrid.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Bumble_Filter_Model_Filtergrid
4
+ {
5
+ //$store = Mage::getStoreConfig('bumble_filter/section_one/module_head_one');
6
+
7
+
8
+ public function toOptionArray() {
9
+
10
+
11
+ $catCollection = Mage::getModel('bumble_filter/group')
12
+ ->getCollection();
13
+
14
+ $option = array();
15
+ $option[] = array( 'value' => "",
16
+ 'label' => 'Select Group Filter');
17
+ foreach($catCollection as $cat) {
18
+ $option[] = array( 'value' => $cat->getId(),
19
+ 'label' => $cat->getName() );
20
+ }
21
+ return $option;
22
+ }
23
+
24
+ }
app/code/community/Bumble/Filter/Model/Filtergridtwo.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Bumble_Filter_Model_Filtergridtwo
4
+ {
5
+ //$store = Mage::getStoreConfig('bumble_filter/section_one/module_head_one');
6
+
7
+
8
+ public function toOptionArray() {
9
+
10
+
11
+
12
+ $catCollection = Mage::getModel('bumble_filter/group')
13
+ ->getCollection();
14
+
15
+ $option = array();
16
+ $option[] = array( 'value' => "",
17
+ 'label' => 'Select Group Filter');
18
+ foreach($catCollection as $cat) {
19
+ $option[] = array( 'value' => $cat->getId(),
20
+ 'label' => $cat->getName() );
21
+ }
22
+ return $option;
23
+
24
+ }
25
+ }
app/code/community/Bumble/Filter/Model/Group.php ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Bumble_Filter_Model_Group extends Mage_Core_Model_Abstract
4
+ {
5
+ protected function _construct()
6
+ {
7
+ $this->_init('bumble_filter/group');
8
+
9
+ }
10
+ public function getCategoryLink(){
11
+ return Mage::getBaseUrl().Mage::getModel('core/url_rewrite')->loadByIdPath('bumblefilter/filter/index/category/'.$this->getId())->getRequestPath();
12
+ }
13
+
14
+ public function deletes($group_id)
15
+ {
16
+ $res = true;
17
+ $images = $this->image;
18
+ foreach ($images as $image)
19
+ {
20
+ if (preg_match('/sample/', $image) === 0)
21
+ if ($image && file_exists(dirname(__FILE__).'/images/'.$image))
22
+ $res &= @unlink(dirname(__FILE__).'/images/'.$image);
23
+ }
24
+ $model = $this->setId($group_id);
25
+ try{
26
+ $model->delete();
27
+ //Mage::getSingleton('core/session')->addSuccess( 'Deleted profile successfully!' );
28
+ //echo 'Inserted abc',$group_id;
29
+ }catch(exception $e){
30
+ //Mage::getSingleton( 'core/session') ->addError( $e->getMessage() );
31
+ }
32
+ return $res;
33
+ }
34
+ }
app/code/community/Bumble/Filter/Model/Mysql4/.DS_Store ADDED
Binary file
app/code/community/Bumble/Filter/Model/Mysql4/Filter.php ADDED
@@ -0,0 +1,127 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ ------------------------------------------------------------------------*/
10
+ class Bumble_Filter_Model_Mysql4_Filter extends Mage_Core_Model_Mysql4_Abstract {
11
+
12
+ /**
13
+ * Initialize resource model
14
+ */
15
+ protected function _construct() {
16
+
17
+ $this->_init('bumble_filter/filter', 'filter_id');
18
+ }
19
+
20
+ /**
21
+ * Load images
22
+ */
23
+ // public function loadImage(Mage_Core_Model_Abstract $object) {
24
+ // return $this->__loadImage($object);
25
+ // }
26
+
27
+ /**
28
+ * Retrieve select object for load object data
29
+ *
30
+ * @param string $field
31
+ * @param mixed $value
32
+ * @return Zend_Db_Select
33
+ */
34
+ protected function _getLoadSelect($field, $value, $object) {
35
+ $select = parent::_getLoadSelect($field, $value, $object);
36
+
37
+ return $select;
38
+ }
39
+
40
+
41
+
42
+ /**
43
+ * Call-back function
44
+ */
45
+ protected function _beforeDelete(Mage_Core_Model_Abstract $object) {
46
+ // Cleanup stats on filter delete
47
+ $adapter = $this->_getReadAdapter();
48
+ // 1. Delete filter/store
49
+ //$adapter->delete($this->getTable('bumble_filter/filter_store'), 'filter_id='.$object->getId());
50
+ // 2. Delete filter/post_cat
51
+
52
+ return parent::_beforeDelete($object);
53
+ }
54
+ /**
55
+ * Assign page to store views
56
+ *
57
+ * @param Mage_Core_Model_Abstract $object
58
+ */
59
+ protected function _afterSave(Mage_Core_Model_Abstract $object)
60
+ {
61
+ $condition = $this->_getWriteAdapter()->quoteInto('filter_id = ?', $object->getId());
62
+ // process faq item to store relation
63
+ $this->_getWriteAdapter()->delete($this->getTable('bumble_filter/filter_store'), $condition);
64
+ $stores = (array) $object->getData('stores');
65
+
66
+ if($stores){
67
+ foreach ((array) $object->getData('stores') as $store) {
68
+ $storeArray = array ();
69
+ $storeArray['filter_id'] = $object->getId();
70
+ $storeArray['store_id'] = $store;
71
+ $this->_getWriteAdapter()->insert(
72
+ $this->getTable('bumble_filter/filter_store'), $storeArray
73
+ );
74
+ }
75
+ }else{
76
+ $storeArray = array ();
77
+ $storeArray['filter_id'] = $object->getId();
78
+ $storeArray['store_id'] = $object->getStoreId();
79
+ $this->_getWriteAdapter()->insert(
80
+ $this->getTable('bumble_filter/filter_store'), $storeArray
81
+ );
82
+ }
83
+
84
+
85
+ return parent::_afterSave($object);
86
+ }
87
+
88
+ /**
89
+ * Do store and category processing after loading
90
+ *
91
+ * @param Mage_Core_Model_Abstract $object Current faq item
92
+ */
93
+ protected function _afterLoad(Mage_Core_Model_Abstract $object)
94
+ {
95
+ // process faq item to store relation
96
+ $select = $this->_getReadAdapter()->select()->from(
97
+ $this->getTable('bumble_filter/filter_store')
98
+ )->where('filter_id = ?', $object->getId());
99
+
100
+ if ($data = $this->_getReadAdapter()->fetchAll($select)) {
101
+ $storesArray = array ();
102
+ foreach ($data as $row) {
103
+ $storesArray[] = $row['store_id'];
104
+ }
105
+ $object->setData('store_id', $storesArray);
106
+ }
107
+
108
+ return parent::_afterLoad($object);
109
+ }
110
+
111
+ public function lookupStoreIds($theme_id = 0){
112
+ $select = $this->_getReadAdapter()->select()->from(
113
+ $this->getTable('bumble_filter/filter_store')
114
+ )->where('filter_id = ?', (int)$theme_id);
115
+
116
+ $storesArray = array ();
117
+
118
+ if ($data = $this->_getReadAdapter()->fetchAll($select)) {
119
+
120
+ foreach ($data as $row) {
121
+ $storesArray[] = $row['store_id'];
122
+ }
123
+ }
124
+ return $storesArray;
125
+ }
126
+
127
+ }
app/code/community/Bumble/Filter/Model/Mysql4/Filter/Collection.php ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ --------------------------------------------------------------------------*/
10
+ class Bumble_Filter_Model_Mysql4_Filter_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
11
+ protected $_previewFlag = false;
12
+ /**
13
+ * Constructor method
14
+ */
15
+ protected function _construct() {
16
+ parent::_construct();
17
+ $this->_init('bumble_filter/filter');
18
+ }
19
+
20
+ /**
21
+ * Add Filter by store
22
+ *
23
+ * @param int|Mage_Core_Model_Store $store
24
+ * @return Bumble_Slider_Model_Mysql4_Filter_Collection
25
+ */
26
+ public function addStoreFilter($store) {
27
+ if (!Mage::app()->isSingleStoreMode()) {
28
+ if ($store instanceof Mage_Core_Model_Store) {
29
+ $store = array($store->getId());
30
+ }
31
+
32
+ $this->getSelect()->join(
33
+ array('store_table' => $this->getTable('bumble_filter/filter_store')),
34
+ 'main_table.filter_id = store_table.filter_id',
35
+ array()
36
+ )
37
+ ->where('store_table.store_id in (?)', array(0, $store))
38
+ ->group('main_table.filter_id');
39
+ return $this;
40
+ }
41
+ return $this;
42
+ }
43
+
44
+ /**
45
+ * Add Filter by status
46
+ *
47
+ * @param int $status
48
+ * @return Bumble_Slider_Model_Mysql4_Filter_Collection
49
+ */
50
+ public function addEnableFilter($status = 1) {
51
+ $this->getSelect()->where('main_table.is_active = ?', $status);
52
+ return $this;
53
+ }
54
+
55
+ public function addChildrentFilter( $parentId = 1) {
56
+ $this->getSelect()->where( 'main_table.parent_id = ?', $parentId );
57
+ return $this;
58
+ }
59
+ /**
60
+ * After load processing - adds store information to the datasets
61
+ *
62
+ */
63
+ protected function _beforeLoad()
64
+ {
65
+ $store_id = Mage::app()->getStore()->getId();
66
+ if($store_id){
67
+ $this->addStoreFilter($store_id);
68
+ }
69
+
70
+ parent::_beforeLoad();
71
+ return $this;
72
+ }
73
+ /**
74
+ * After load processing - adds store information to the datasets
75
+ *
76
+ */
77
+ protected function _afterLoad()
78
+ {
79
+ parent::_afterLoad();
80
+ return $this;
81
+ }
82
+ }
app/code/community/Bumble/Filter/Model/Mysql4/Group.php ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /******************************************************
3
+ * @package Bumble map module for Magento 1.4.x.x and Magento 1.7.x.x
4
+ * @version 1.0.0.1
5
+ * @author http://landofcoder.com
6
+ * @copyright Copyright (C) December 2010 LandOfCoder.com <@emai:landofcoder@gmail.com>.All rights reserved.
7
+ * @license GNU General Public License version 2
8
+ *******************************************************/
9
+ ?>
10
+ <?php
11
+ class Bumble_Filter_Model_Mysql4_Group extends Mage_Core_Model_Mysql4_Abstract
12
+ {
13
+ public function _construct()
14
+ {
15
+ // Note that the group_id refers to the key field in your database table.
16
+ $this->_init('bumble_filter/group', 'group_id');
17
+ }
18
+
19
+
20
+
21
+ /**
22
+ * Assign page to store views
23
+ *
24
+ * @param Mage_Core_Model_Abstract $object
25
+ */
26
+ protected function _afterSave(Mage_Core_Model_Abstract $object)
27
+ {
28
+ /*$condition = $this->_getWriteAdapter()->quoteInto('group_id = ?', $object->getId());
29
+ // process faq item to store relation
30
+ $this->_getWriteAdapter()->delete($this->getTable('bumble_filter/filter_store'), $condition);
31
+ $stores = (array) $object->getData('stores');
32
+
33
+ if($stores){
34
+ foreach ((array) $object->getData('stores') as $store) {
35
+ $storeArray = array ();
36
+ $storeArray['group_id'] = $object->getId();
37
+ $storeArray['store_id'] = $store;
38
+ $this->_getWriteAdapter()->insert(
39
+ $this->getTable('bumble_filter/filter_store'), $storeArray
40
+ );
41
+ }
42
+ }else{
43
+ $storeArray = array ();
44
+ $storeArray['group_id'] = $object->getId();
45
+ $storeArray['store_id'] = $object->getStoreId();
46
+ $this->_getWriteAdapter()->insert(
47
+ $this->getTable('bumble_filter/filter_store'), $storeArray
48
+ );
49
+ }
50
+
51
+ */
52
+ return parent::_afterSave($object);
53
+ }
54
+
55
+ }// End Class
app/code/community/Bumble/Filter/Model/Mysql4/Group/Collection.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /******************************************************
3
+ * @package Bumble Megamenu module for Magento 1.4.x.x and Magento 1.7.x.x
4
+ * @version 1.0.0.1
5
+ * @author http://landofcoder.com
6
+ * @copyright Copyright (C) December 2010 LandOfCoder.com <@emai:landofcoder@gmail.com>.All rights reserved.
7
+ * @license GNU General Public License version 2
8
+ *******************************************************/
9
+
10
+ class Bumble_Filter_Model_Mysql4_Group_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
11
+ {
12
+ public function _construct()
13
+ {
14
+ parent::_construct();
15
+ $this->_init('bumble_filter/group');
16
+ }
17
+
18
+ }
app/code/community/Bumble/Filter/Model/Observer.php ADDED
@@ -0,0 +1,173 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /***********************Bumble Filter**************************************/
3
+ class Bumble_Filter_Model_Observer extends Varien_Object
4
+ {
5
+
6
+ /**
7
+ *
8
+ */
9
+ public function getRoute()
10
+ {
11
+ $url= $_SERVER['HTTP_HOST'];
12
+ $url2 = $_SERVER["REQUEST_URI"];
13
+ $route= str_replace($url, '', $url2);
14
+ $route= str_replace('/', '', $route);
15
+
16
+ $collection = Mage::getModel('bumble_filter/filter')->getCollection();
17
+
18
+
19
+
20
+ foreach( $collection as $model ){
21
+ $m= $model->getFilterId();
22
+ $groCollection = Mage::getModel('bumble_filter/filter')->load($m);
23
+ $idenFilter= $groCollection->getIdentifier();
24
+ if ($idenFilter == $route)
25
+ {
26
+ $rou = $idenFilter;
27
+ return $rou;
28
+ }
29
+ }
30
+
31
+
32
+
33
+ }
34
+
35
+ public function initControllerRouters( $observer ){
36
+
37
+ $request = $observer->getEvent()->getFront()->getRequest();
38
+
39
+ $identifier = trim($request->getPathInfo(), '/');
40
+
41
+
42
+ $condition = new Varien_Object(array(
43
+ 'identifier' => $identifier,
44
+ 'continue' => true
45
+ ));
46
+ Mage::dispatchEvent('filter_controller_router_match_before', array(
47
+ 'router' => $this,
48
+ 'condition' => $condition
49
+ ));
50
+ $identifier = $condition->getIdentifier();
51
+
52
+
53
+ if ($condition->getRedirectUrl()) {
54
+ Mage::app()->getFrontController()->getResponse()
55
+ ->setRedirect($condition->getRedirectUrl())
56
+ ->sendResponse();
57
+ $request->setDispatched(true);
58
+ return true;
59
+ }
60
+
61
+
62
+ if (!$condition->getContinue())
63
+ return false;
64
+
65
+
66
+ if($identifier) {
67
+
68
+ if( preg_match("#^".$this->getRoute()."(\.html)?$#",$identifier, $match) ) {
69
+ $request->setModuleName('bumblefilter')
70
+ ->setControllerName('filter')
71
+ ->setActionName('index');
72
+ $request->setAlias(
73
+ Mage_Core_Model_Url_Rewrite::REWRITE_REQUEST_PATH_ALIAS,
74
+ $identifier
75
+ );
76
+ return true;
77
+
78
+ }
79
+ return true;
80
+ }
81
+
82
+ return false;
83
+ }
84
+
85
+ /**
86
+ *
87
+ */
88
+ public function beforeRender( Varien_Event_Observer $observer ){
89
+ // $controller_name = Mage::app()->getRequest()->getControllerModule();
90
+ // $menu_name = $controller_name."_".Mage::app()->getRequest()->getControllerName();
91
+ $helper = Mage::helper('bumble_filter/data');
92
+
93
+
94
+ // if($helper->checkAvaiable( $controller_name )){
95
+ $config = $helper->get();
96
+ return $this->_loadMedia( $config );
97
+ /**LATEST BLOG */
98
+ // $this->filterScrollModule( $menu_name , $helper );
99
+ /** CATEGORY BLOG */
100
+ // $this->filterNavModule( $menu_name , $helper );
101
+ // }
102
+ }
103
+
104
+ public function getGeneralConfig( $val, $default = "" ){
105
+ return Mage::getStoreConfig( "bumble_filter/general_setting/".$val );
106
+ }
107
+
108
+ public function getModuleConfig( $val ){
109
+ return Mage::getStoreConfig( "bumble_filter/module_setting/".$val );
110
+ }
111
+
112
+ public function filterScrollModule( $menu_name, $helper ){
113
+ if( !$this->getModuleConfig("enable_scrollmodule") ){
114
+ return ;
115
+ }
116
+
117
+ if($helper->checkMenuItem( $menu_name, $this->getModuleConfig("scroll_menuassignment") )){
118
+
119
+ $layout = Mage::getSingleton('core/layout');
120
+ $title = $this->getModuleConfig("scroll_title");
121
+ $position = $this->getModuleConfig("scroll_position");
122
+ if( !$position ){ $position = "right"; }
123
+
124
+ $cposition = $this->getModuleConfig("scroll_customposition");
125
+ if( $cposition ){ $position = $cposition; }
126
+
127
+ $display = $this->getModuleConfig("scroll_display");
128
+ if( $display=="after" ){ $display = true; }else { $display=false; }
129
+
130
+ $block = $layout->createBlock( 'bumble_filter/scroll' );
131
+
132
+ if($myblock = $layout->getBlock( $position )){
133
+ $myblock->insert($block, $title , $display);
134
+ }
135
+
136
+ }
137
+ }
138
+
139
+
140
+
141
+ public function filterNavModule( $menu_name, $helper ){
142
+ if( !$this->getModuleConfig("enable_filternavmodule")){
143
+ return ;
144
+ }
145
+
146
+ if($helper->checkMenuItem( $menu_name, $this->getModuleConfig("filternav_menuassignment") )){
147
+
148
+ $layout = Mage::getSingleton('core/layout');
149
+ $title = $this->getModuleConfig("filternav_title");
150
+ $position = $this->getModuleConfig("filternav_position");
151
+ if( !$position ){ $position = "right"; }
152
+
153
+ $cposition = $this->getModuleConfig("filternav_customposition");
154
+ if( $cposition ){ $position = $cposition; }
155
+
156
+ $display = $this->getModuleConfig("filternav_display");
157
+ if( $display=="after" ){ $display = true; }else { $display=false; }
158
+
159
+ $block = $layout->createBlock( 'bumble_filter/filternav' );
160
+
161
+ if($myblock = $layout->getBlock( $position )){
162
+ $myblock->insert($block, $title , $display);
163
+ }
164
+
165
+ }
166
+ }
167
+
168
+ function _loadMedia( $config = array()){
169
+ /*
170
+ $mediaHelper = Mage::helper('bumble_filter/media');
171
+ $mediaHelper->addMediaFile("skin_css", "bumble_filter/style.css" );*/
172
+ }
173
+ }
app/code/community/Bumble/Filter/Model/Opt.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Bumble_Filter_Model_Opt
3
+ {
4
+
5
+ public function toOptionArray()
6
+ {
7
+ return array(
8
+ array('value'=>1, 'label'=>'One'),
9
+ array('value'=>2, 'label'=>'Two'),
10
+ array('value'=>3, 'label'=>'Three'),
11
+ array('value'=>4, 'label'=>'Four')
12
+ );
13
+ }
14
+ }
app/code/community/Bumble/Filter/Model/Options.php ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Bumble_Filter_Model_Options
3
+ {
4
+
5
+ public function toOptionArray()
6
+ {
7
+ $products = Mage::getModel('catalog/product')
8
+ ->getCollection();
9
+ $option = array();
10
+
11
+ $option[] = array( 'value' => "",
12
+ 'label' => 'Select Extra Attribute');
13
+ $j=0;
14
+ $value=array();
15
+ foreach($products as $product)
16
+ {
17
+ $prod= Mage::getSingleton('catalog/product')->load($product->getId());
18
+ $attributes = $prod->getAttributes();
19
+
20
+ foreach ($attributes as $attribute)
21
+ {
22
+ if ($attribute->getIsVisible() && $attribute->getAttributeCode() != "manufacturer" && $attribute->getFrontend()->getValue($prod)!="No" )
23
+ {
24
+ $value[$j]= $attribute->getAttributeCode();
25
+ $j++;
26
+ }
27
+ }
28
+ }
29
+
30
+ $option[] = array( 'value' => 'price',
31
+ 'label' => 'Price' );
32
+ $result=array_unique($value);
33
+ $filtro=array_filter($result);
34
+
35
+ foreach ($filtro as $key)
36
+ {
37
+ $keys = ucwords($key);
38
+
39
+ $option[] = array( 'value' => $key,
40
+ 'label' => $keys );
41
+ }
42
+ return $option;
43
+ }
44
+ }
app/code/community/Bumble/Filter/Model/Options2.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Bumble_Filter_Model_Options
3
+ {
4
+ /**
5
+ * Provide available options as a value/label array
6
+ *
7
+ * @return array
8
+ */
9
+ public function toOptionArray()
10
+ {
11
+ return array(
12
+ array('value'=>1, 'label'=>'One'),
13
+ array('value'=>2, 'label'=>'Two'),
14
+ array('value'=>3, 'label'=>'Three'),
15
+ array('value'=>4, 'label'=>'Four')
16
+ );
17
+ }
18
+ }
app/code/community/Bumble/Filter/Model/Resource/.DS_Store ADDED
Binary file
app/code/community/Bumble/Filter/Model/Resource/Mysql4/Setup.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Bumble_Filter_Model_Resource_Mysql4_Setup extends Mage_Eav_Model_Entity_Setup {
4
+
5
+ public function getDefaultEntities() { die( "ha cong tien" );
6
+ return array(
7
+ 'catalog_product' => array(
8
+ 'entity_model' => 'catalog/product',
9
+ 'attribute_model' => 'catalog/resource_eav_attribute',
10
+ 'table' => 'catalog/product',
11
+ 'additional_attribute_table' => 'catalog/eav_attribute',
12
+ 'entity_attribute_collection' => 'catalog/product_attribute_collection',
13
+ 'attributes' => array(
14
+ 'bumblefilter' => array(
15
+ 'group' => 'General',
16
+ 'label' => 'Product Filter',
17
+ 'type' => 'int',
18
+ 'input' => 'select',
19
+ 'default' => '0',
20
+ 'class' => '',
21
+ 'backend' => 'filters/product_attribute_backend_unit',
22
+ 'frontend' => '',
23
+ 'source' => 'filters/product_attribute_source_unit',
24
+ 'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
25
+ 'visible' => true,
26
+ 'required' => false,
27
+ 'user_defined' => true,
28
+ 'searchable' => true,
29
+ 'filterable' => 1,
30
+ 'is_filterable' => 1,
31
+ 'is_filterable_in_search' => 1,
32
+ 'comparable' => true,
33
+ 'visible_on_front' => false,
34
+ 'visible_in_advanced_search' => true,
35
+ 'unique' => false
36
+ )
37
+ )
38
+ ),
39
+ );
40
+ }
41
+
42
+ }
43
+ ?>
app/code/community/Bumble/Filter/Model/Source/Page.php ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ ----------------------------------------------------------------------------*/
10
+ class Bumble_Filter_Model_Config_Source_Page
11
+ {
12
+ /**
13
+ * Options getter
14
+ *
15
+ * @return array
16
+ */
17
+ public function toOptionArray()
18
+ {
19
+ $_collection = Mage::getSingleton('cms/page')->getCollection()
20
+ ->addFieldToFilter('is_active', 1);
21
+
22
+ $_result = array();
23
+ foreach ($_collection as $item) {
24
+ $data = array(
25
+ 'value' => $item->getData('page_id'),
26
+ 'label' => $item->getData('title'));
27
+ $_result[] = $data;
28
+ }
29
+ return $_result;
30
+ }
31
+ }
app/code/community/Bumble/Filter/Model/Source/Template.php ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ --------------------------------------------------------------------------*/
10
+ class Bumble_Filter_Model_Config_Source_Template
11
+ {
12
+ const _DEFAULT = 'default';
13
+ //const CONTENT_BOTTOM = 'CONTENT_BOTTOM';
14
+ /**
15
+ * Design packages list getter
16
+ * @return array
17
+ */
18
+ public function getPackageList()
19
+ {
20
+ $directory = Mage::getBaseDir('design') . DS . 'frontend';
21
+ return $this->_listDirectories($directory);
22
+ }
23
+
24
+ /**
25
+ * Design package (optional) themes list getter
26
+ * @param string $package
27
+ * @return string
28
+ */
29
+ public function getThemeList($package = null)
30
+ {
31
+ $result = array();
32
+
33
+ if (is_null($package)){
34
+ foreach ($this->getPackageList() as $package){
35
+ $result[$package] = $this->getThemeList($package);
36
+ }
37
+ } else {
38
+ $directory = Mage::getBaseDir('design') . DS . 'frontend' . DS . $package;
39
+ $result = $this->_listDirectories($directory);
40
+ }
41
+
42
+ return $result;
43
+ }
44
+
45
+ private function _listDirectories($path, $fullPath = false)
46
+ {
47
+ $result = array();
48
+ $dir = opendir($path);
49
+ if ($dir) {
50
+ while ($entry = readdir($dir)) {
51
+ if (substr($entry, 0, 1) == '.' || !is_dir($path . DS . $entry)){
52
+ continue;
53
+ }
54
+ if ($fullPath) {
55
+ $entry = $path . DS . $entry;
56
+ }
57
+ $result[] = $entry;
58
+ }
59
+ unset($entry);
60
+ closedir($dir);
61
+ }
62
+
63
+ return $result;
64
+ }
65
+ /**
66
+ * Options getter
67
+ *
68
+ * @return array
69
+ */
70
+ public function toOptionArray()
71
+ {
72
+ //$directory = Mage::getBaseDir('design') . DS . 'frontend' . DS . $package;
73
+ $directory = Mage::getBaseDir('design') . DS . 'frontend' . DS . 'default' . DS . 'default' . DS . 'template'. DS . 'bumble_filter'. DS . 'content';
74
+ $directories = $this->_listDirectories($directory);
75
+ $templates = array(
76
+ array('value' => self::_DEFAULT, 'label'=>Mage::helper('adminhtml')->__('default'))
77
+ );
78
+ foreach($directories as $key => $template){
79
+ $templates[] = array('value' => $template, 'label'=>$template);
80
+ }
81
+
82
+ return $templates;
83
+ }
84
+ }
app/code/community/Bumble/Filter/Model/Source/Type.php ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ ---------------------------------------------------------------------------*/
10
+ class Bumble_Filter_Model_Config_Source_Type
11
+ {
12
+ const IMAGE = 'image';
13
+ const PRODUCT = 'product';
14
+
15
+ /**
16
+ * Options getter
17
+ *
18
+ * @return array
19
+ */
20
+ public function toOptionArray()
21
+ {
22
+ return array(
23
+ array('value' => self::IMAGE, 'label'=>Mage::helper('adminhtml')->__('Image')),
24
+ array('value' => self::PRODUCT, 'label'=>Mage::helper('adminhtml')->__('Product'))
25
+ );
26
+ }
27
+
28
+ /**
29
+ * Options getter
30
+ *
31
+ * @return array
32
+ */
33
+ public function toGridOptionArray()
34
+ {
35
+ return array(
36
+ self::IMAGE => Mage::helper('adminhtml')->__('Image'),
37
+ self::PRODUCT => Mage::helper('adminhtml')->__('Product')
38
+ );
39
+ }
40
+ }
app/code/community/Bumble/Filter/Model/System/.DS_Store ADDED
Binary file
app/code/community/Bumble/Filter/Model/System/Config/.DS_Store ADDED
Binary file
app/code/community/Bumble/Filter/Model/System/Config/Backend/.DS_Store ADDED
Binary file
app/code/community/Bumble/Filter/Model/System/Config/Backend/Filter/Cache.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Bumble_Filter_Model_System_Config_Backend_Filter_Cache extends Mage_Core_Model_Config_Data {
3
+ protected function _afterSave() {
4
+ Mage::app()->cleanCache( array(
5
+ Mage_Core_Model_Store::CACHE_TAG,
6
+ Mage_Cms_Model_Block::CACHE_TAG,
7
+ Bumble_Filter_Model_Filter::CACHE_BLOCK_SCROLL_TAG
8
+ ) );
9
+
10
+ Mage::app()->cleanCache( array(
11
+ Mage_Core_Model_Store::CACHE_TAG,
12
+ Mage_Cms_Model_Block::CACHE_TAG,
13
+ Bumble_Filter_Model_Filter::CACHE_BLOCK_LIST_TAG
14
+ ) );
15
+
16
+ Mage::app()->cleanCache( array(
17
+ Mage_Core_Model_Store::CACHE_TAG,
18
+ Mage_Cms_Model_Block::CACHE_TAG,
19
+ Bumble_Filter_Model_Filter::CACHE_WIDGET_SCROLL_TAG
20
+ ) );
21
+
22
+ Mage::app()->cleanCache( array(
23
+ Mage_Core_Model_Store::CACHE_TAG,
24
+ Mage_Cms_Model_Block::CACHE_TAG,
25
+ Bumble_Filter_Model_Filter::CACHE_WIDGET_LIST_TAG
26
+ ) );
27
+ }
28
+ }
app/code/community/Bumble/Filter/Model/System/Config/Backend/Filter/CheckInputCategory.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Bumble_Filter_Model_System_Config_Backend_Filter_checkInputCategory extends Mage_Core_Model_Config_Data
4
+ {
5
+ protected function _beforeSave(){
6
+ $value = trim($this->getValue());
7
+
8
+ if ($value && !eregi('^([1-9]+)+([,]?([0-9]+))*$', $value)) {
9
+
10
+ throw new Exception(Mage::helper('bumble_filter')->__('Categories ID: Format is incorrect.'));
11
+ }
12
+
13
+ return $value;
14
+
15
+ }
16
+
17
+
18
+ }
app/code/community/Bumble/Filter/Model/System/Config/Backend/Filter/CheckQty.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Bumble_Filter_Model_System_Config_Backend_Filter_checkQty extends Mage_Core_Model_Config_Data
3
+ {
4
+
5
+ protected function _beforeSave(){
6
+ $value = $this->getValue();
7
+ if ((!is_numeric($value) && !empty($value)) || $value < 0) {
8
+ throw new Exception(Mage::helper('bumble_filter')->__('Qty of products must be numeric.'));
9
+ }
10
+ return $this;
11
+ }
12
+
13
+ }
app/code/community/Bumble/Filter/Model/System/Config/Backend/Filter/Checkvalue.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Bumble_Filter_Model_System_Config_Backend_Filter_Checkvalue extends Mage_Core_Model_Config_Data
4
+ {
5
+
6
+ protected function _beforeSave(){
7
+ $value=$this->getValue();
8
+ if ((!is_numeric($value) && !empty($value)) || $value < 0) {
9
+ throw new Exception(Mage::helper('bumble_filter')->__($this->getField_config()->label . ': Value must be numeric.'));
10
+ }
11
+ return $this;
12
+ }
13
+
14
+ }
app/code/community/Bumble/Filter/Model/System/Config/Source/Imagetypes.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Bumble_Filter_Model_System_Config_Source_Imagetypes
4
+ {
5
+ public function toOptionArray()
6
+ {
7
+ return array(
8
+ array('value'=>'l', 'label'=>Mage::helper('bumble_filter')->__('Large')." (".Mage::getStoreConfig('bumble_filter/general_setting/large_imagesize') .")" ),
9
+ array('value'=>'m', 'label'=>Mage::helper('bumble_filter')->__('Medium')." (".Mage::getStoreConfig('bumble_filter/general_setting/medium_imagesize') .")"),
10
+ array('value'=>'s', 'label'=>Mage::helper('bumble_filter')->__('Small')." (".Mage::getStoreConfig('bumble_filter/general_setting/small_imagesize') .")"),
11
+
12
+ );
13
+ }
14
+ }
app/code/community/Bumble/Filter/Model/System/Config/Source/ListBrand.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Bumble_Filter_Model_System_Config_Source_ListFilter extends Mage_Eav_Model_Entity_Attribute_Source_Abstract
4
+ {
5
+ public function getAllOptions()
6
+ {
7
+
8
+ if (!$this->_options) {
9
+ $this->_options = array( array("value"=>"0", "label"=>"--- None ---") );
10
+ $collection = Mage::getModel( "bumble_filter/filter" )->getCollection();
11
+
12
+ foreach( $collection as $filter ){
13
+ $this->_options[] = array("value"=>$filter->getId(), "label"=>$filter->getTitle() );
14
+ }
15
+ }
16
+ return $this->_options;
17
+ }
18
+ }
app/code/community/Bumble/Filter/Model/System/Config/Source/ListCms.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Bumble_Filter_Model_System_Config_Source_ListCms
3
+ {
4
+ public function toOptionArray()
5
+ {
6
+ $collection = Mage::getModel('cms/block')->getCollection();
7
+ $output = array();
8
+ $output[] = array('value'=>0, 'label'=> Mage::helper('bumble_filter')->__("Use Pretext") );
9
+ foreach( $collection as $cms ){
10
+ $output[] = array('value'=>$cms->getId(), 'label'=>$cms->getTitle() );
11
+ }
12
+ return $output ;
13
+ }
14
+ }
app/code/community/Bumble/Filter/Model/System/Config/Source/ListComment.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ -------------------------------------------------------------------------------*/
10
+
11
+ class Bumble_Filter_Model_System_Config_Source_ListComment
12
+ {
13
+
14
+ public function toOptionArray()
15
+ {
16
+
17
+
18
+ $output = array();
19
+ $output[] = array("value"=>"" , "label" => Mage::helper('adminhtml')->__("Default Engine"));
20
+ $output[] = array("value"=>"disqus" , "label" => Mage::helper('adminhtml')->__("Disqus"));
21
+ $output[] = array("value"=>"facebook" , "label" => Mage::helper('adminhtml')->__("Facebook"));
22
+
23
+ return $output ;
24
+ }
25
+ }
app/code/community/Bumble/Filter/Model/System/Config/Source/ListEvents.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Bumble_Filter_Model_System_Config_Source_ListEvents {
4
+
5
+ public function toOptionArray()
6
+ {
7
+ return array(
8
+ array('value'=>'mouseover', 'label'=>Mage::helper('adminhtml')->__('Mouse Over')),
9
+ array('value'=>'click', 'label'=>Mage::helper('adminhtml')->__('Click'))
10
+ );
11
+ }
12
+
13
+ }
app/code/community/Bumble/Filter/Model/System/Config/Source/ListGroup.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Bumble_Filter_Model_System_Config_Source_ListGroup
4
+ {
5
+
6
+ public function toOptionArray() {
7
+ $Collection = Mage::getModel('bumble_filter/filter')->getCollection();
8
+ $arr = array(array("value" => "0", "label" => Mage::helper("bumble_filter")->__("-- All Groups --")));
9
+ foreach($Collection as $cat) {
10
+ $arr[] = array("value" => $cat->getFilterId(), "label" =>$cat->getTitle());
11
+ }
12
+ return $arr;
13
+ }
14
+ }
app/code/community/Bumble/Filter/Model/System/Config/Source/ListImagegroup.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ class Bumble_Filter_Model_System_Config_Source_ListImagegroup
5
+ {
6
+ public function toOptionArray()
7
+ {
8
+
9
+ $_model = Mage::getModel('bumble_filter/banner');
10
+
11
+
12
+ $collection = $_model->getCollection();
13
+
14
+ $groups = array();
15
+ $last = '';
16
+ foreach($collection as $item){
17
+ if( $last != $item->getLabel() ){
18
+ $option = array('value'=>$item->getLabel(), 'label'=>$item->getLabel());
19
+ $groups[$last] = $option;
20
+ $last = $item->getLabel();
21
+ }
22
+ }
23
+ return $groups;
24
+ }
25
+ }
app/code/community/Bumble/Filter/Model/System/Config/Source/ListLayouts.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Bumble_Filter_Model_System_Config_Source_ListLayouts
4
+ {
5
+ public function toOptionArray()
6
+ {
7
+ return array(
8
+ array('value' => "list", 'label'=>Mage::helper('adminhtml')->__('List')),
9
+ array('value' => "grid", 'label'=>Mage::helper('adminhtml')->__('Grid'))
10
+ );
11
+ }
12
+ }
app/code/community/Bumble/Filter/Model/System/Config/Source/ListManufacturers.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Bumble_Filter_Model_System_Config_Source_ListManufacturers {
3
+
4
+ public function toOptionArray() {
5
+ $manufacturers = $this->getAllManu();
6
+ $arr = array();
7
+ if ($manufacturers) {
8
+ foreach ($manufacturers as $manu) {
9
+ $tmp = array();
10
+ $tmp["value"] = $manu['value'];
11
+ $tmp["label"] = $manu['label'];
12
+ $arr[] = $tmp;
13
+ }
14
+ }
15
+ return $arr;
16
+ }
17
+
18
+ public function getAllManu()
19
+ {
20
+ $product = Mage::getModel('catalog/product');
21
+ $attributes = Mage::getResourceModel('eav/entity_attribute_collection')
22
+ ->setEntityTypeFilter($product->getResource()->getTypeId())
23
+ ->addFieldToFilter('attribute_code', 'computer_manufacturers');
24
+ $attribute = $attributes->getFirstItem()->setEntity($product->getResource());
25
+ $manufacturers = $attribute->getSource()->getAllOptions(false);
26
+ return $manufacturers;
27
+ }
28
+ }
app/code/community/Bumble/Filter/Model/System/Config/Source/ListMenu.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Bumble_Filter_Model_System_Config_Source_ListMenu
4
+ {
5
+ public function toOptionArray()
6
+ {
7
+ $helper = Mage::helper('bumble_filter/data');
8
+ $params = $helper->getListMenu();
9
+ $option = array();
10
+ if(!empty($params)){
11
+ foreach($params as $key=>$label){
12
+ $tmp = array();
13
+ $tmp["value"] = $key;
14
+ $tmp["label"] = $label;
15
+ $option[] = $tmp;
16
+ }
17
+ }
18
+ return $option;
19
+ }
20
+ }
app/code/community/Bumble/Filter/Model/System/Config/Source/ListMenuStyles.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Bumble_Filter_Model_System_Config_Source_ListMenuStyles {
4
+
5
+ public function toOptionArray()
6
+ {
7
+ return array(
8
+ array('value'=>'Accordion', 'label'=>Mage::helper('adminhtml')->__('Accordion')),
9
+ array('value'=>'Dropdown', 'label'=>Mage::helper('adminhtml')->__('Dropdown')),
10
+ array('value'=>'Tree', 'label'=>Mage::helper('adminhtml')->__('Tree')),
11
+ );
12
+ }
13
+
14
+ }
app/code/community/Bumble/Filter/Model/System/Config/Source/ListOption.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Bumble_Filter_Model_System_Config_Source_ListOption
3
+ {
4
+
5
+ public function toOptionArray()
6
+ {
7
+ return array(
8
+ array('value' => "before", 'label'=>Mage::helper('adminhtml')->__('Before')),
9
+ array('value' => "after", 'label'=>Mage::helper('adminhtml')->__('After'))
10
+ );
11
+ }
12
+ }
app/code/community/Bumble/Filter/Model/System/Config/Source/ListPosition.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Bumble_Filter_Model_System_Config_Source_ListPosition
4
+ {
5
+ public function toOptionArray()
6
+ {
7
+ return array(
8
+ array('value' => "root", 'label'=>Mage::helper('adminhtml')->__('Root')),
9
+ array('value' => "content", 'label'=>Mage::helper('adminhtml')->__('Content')),
10
+ array('value' => "left", 'label'=>Mage::helper('adminhtml')->__('Left')),
11
+ array('value' => "right", 'label'=>Mage::helper('adminhtml')->__('Right')),
12
+ array('value' => "top.menu", 'label'=>Mage::helper('adminhtml')->__('Top Menu')),
13
+ array('value' => "product.info", 'label'=>Mage::helper('adminhtml')->__('Product Info')),
14
+ array('value' => "top.links", 'label'=>Mage::helper('adminhtml')->__('Top Links')),
15
+ array('value' => "my.account.wrapper", 'label'=>Mage::helper('adminhtml')->__('My Account Wrapper')),
16
+ array('value' => "footer", 'label'=>Mage::helper('adminhtml')->__('Footer')),
17
+ array('value' => "footer_links", 'label'=>Mage::helper('adminhtml')->__('Footer Links'))
18
+ );
19
+ }
20
+ }
app/code/community/Bumble/Filter/Model/System/Config/Source/ListSourceType.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Bumble_Filter_Model_System_Config_Source_ListSourceType
4
+ {
5
+ public function toOptionArray()
6
+ {
7
+ return array(
8
+ array('value'=>'latest', 'label'=>Mage::helper('bumble_filter')->__('Latest Filters') ),
9
+ array('value'=>'hit', 'label'=>Mage::helper('bumble_filter')->__('Most Read') ),
10
+
11
+ );
12
+ }
13
+ }
app/code/community/Bumble/Filter/Model/System/Config/Source/ListTheme.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Bumble_Filter_Model_System_Config_Source_ListTheme
3
+ {
4
+ private function _listDirectories($path, $fullPath = false)
5
+ {
6
+ $result = array();
7
+ $dir = opendir($path);
8
+ if ($dir) {
9
+ while ($entry = readdir($dir)) {
10
+ if (substr($entry, 0, 1) == '.' || !is_dir($path . DS . $entry)){
11
+ continue;
12
+ }
13
+ if ($fullPath) {
14
+ $entry = $path . DS . $entry;
15
+ }
16
+ $result[] = $entry;
17
+ }
18
+ unset($entry);
19
+ closedir($dir);
20
+ }
21
+
22
+ return $result;
23
+ }
24
+ /**
25
+ * Options getter
26
+ *
27
+ * @return array
28
+ */
29
+ public function toOptionArray()
30
+ {
31
+ //$directory = Mage::getBaseDir('design') . DS . 'frontend' . DS . $package;
32
+ $directory = Mage::getBaseDir('skin') . DS . 'frontend' . DS . 'default' . DS . 'default' . DS . 'bumble_filter';
33
+ $directories = $this->_listDirectories($directory);
34
+ $templates = array();
35
+ foreach($directories as $key => $template){
36
+ $templates[] = array('value' => $template, 'label'=>$template);
37
+ }
38
+
39
+ return $templates;
40
+ }
41
+ }
app/code/community/Bumble/Filter/Model/System/Config/Source/Listcolumns.php ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Bumbletheme
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Bumbletheme EULA that is bundled with
8
+ * this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://www.bumbletheme.com/LICENSE-1.0.html
11
+ *
12
+ * DISCLAIMER
13
+ *
14
+ * Do not edit or add to this file if you wish to upgrade the extension
15
+ * to newer versions in the future. If you wish to customize the extension
16
+ * for your needs please refer to http://www.bumbletheme.com/ for more information
17
+ *
18
+ * @category Bumble
19
+ * @package Bumble_Blog
20
+ * @copyright Copyright (c) 2014 Bumbletheme (http://www.bumbletheme.com/)
21
+ * @license http://www.bumbletheme.com/LICENSE-1.0.html
22
+ */
23
+
24
+ /**
25
+ * Bumble Blog Extension
26
+ *
27
+ * @category Bumble
28
+ * @package Bumble_Blog
29
+ * @author Bumbletheme Dev Team <bumbletheme@gmail.com>
30
+ */
31
+ class Bumble_Filter_Model_System_Config_Source_Listcolumns
32
+ {
33
+
34
+ public function toOptionArray()
35
+ {
36
+
37
+ $output = array();
38
+ $output[] = array("value"=>"" , "label" => Mage::helper('adminhtml')->__("Auto"));
39
+ $output[] = array("value"=>"1" , "label" => 1);
40
+ $output[] = array("value"=>"2" , "label" => 2);
41
+ $output[] = array("value"=>"3" , "label" => 3);
42
+ $output[] = array("value"=>"4" , "label" => 4);
43
+ $output[] = array("value"=>"5" , "label" => 5);
44
+ $output[] = array("value"=>"6" , "label" => 6);
45
+
46
+ return $output ;
47
+ }
48
+ }
app/code/community/Bumble/Filter/controllers/Adminhtml/FilterController.php ADDED
@@ -0,0 +1,274 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ ----------------------------------------------------------------------------*/
10
+ class Bumble_Filter_Adminhtml_FilterController extends Mage_Adminhtml_Controller_Action
11
+ {
12
+ protected function _initAction() {
13
+ $this->loadLayout()
14
+ ->_setActiveMenu('bumble_filter/filter');
15
+
16
+ return $this;
17
+ }
18
+
19
+
20
+ /**
21
+ * index action
22
+ */
23
+ public function indexAction() {
24
+
25
+ $this->_title($this->__('Filters Manager'));
26
+ $this->_initAction();
27
+ $this->_addContent($this->getLayout()->createBlock('bumble_filter/adminhtml_filter') );
28
+ $this->renderLayout();
29
+
30
+
31
+ }
32
+
33
+ public function editAction(){
34
+ $this->_title($this->__('Edit Record'));
35
+ $id = $this->getRequest()->getParam('id');
36
+ $_model = Mage::getModel('bumble_filter/filter')->load( $id );
37
+
38
+ Mage::register('filter_data', $_model);
39
+ Mage::register('current_filter', $_model);
40
+
41
+ $this->loadLayout();
42
+ $this->_setActiveMenu('bumble_filter/filter');
43
+ $this->_addBreadcrumb(Mage::helper('adminhtml')->__('Filter Manager'), Mage::helper('adminhtml')->__('Filter Manager'), $this->getUrl('*/*/'));
44
+ $this->_addBreadcrumb(Mage::helper('adminhtml')->__('Add Filter'), Mage::helper('adminhtml')->__('Add Filter'));
45
+
46
+ $this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
47
+
48
+ $this->_addContent($this->getLayout()->createBlock('bumble_filter/adminhtml_filter_edit'))
49
+ ->_addLeft($this->getLayout()->createBlock('bumble_filter/adminhtml_filter_edit_tabs'));
50
+ if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {
51
+
52
+ $this->getLayout()->getBlock('head')
53
+ ->setCanLoadTinyMce(true)
54
+ ->addItem('js','tiny_mce/tiny_mce.js')
55
+ ->addItem('js','mage/adminhtml/wysiwyg/tiny_mce/setup.js')
56
+ ->addJs('mage/adminhtml/browser.js')
57
+ ->addJs('prototype/window.js')
58
+ ->addJs('lib/FABridge.js')
59
+ ->addJs('lib/flex.js')
60
+ ->addJs('mage/adminhtml/flexuploader.js')
61
+ ->addItem('js_css','prototype/windows/themes/default.css')
62
+ ->addCss('lib/prototype/windows/themes/magento.css');
63
+ }
64
+ $this->renderLayout();
65
+ }
66
+
67
+ public function addAction(){
68
+ $this->_forward('edit');
69
+ }
70
+
71
+ public function saveAction() {
72
+ if ($data = $this->getRequest()->getPost()) {
73
+ $model = Mage::getModel('bumble_filter/filter');
74
+ if($data['identifier'] == '' || !isset($data['identifier']))
75
+ $data['identifier'] = str_replace(' ', '-', strtolower($data['title'.$h]));
76
+
77
+ if(isset($_FILES['file']['name']) && $_FILES['file']['name'] != '') {
78
+ try {
79
+ /* Starting upload */
80
+ $uploader = new Varien_File_Uploader('file');
81
+ $uploader->setAllowedExtensions(array('jpg','jpeg','gif','png'));
82
+ $uploader->setAllowRenameFiles(false);
83
+ $uploader->setFilesDispersion(false);
84
+ $path = Mage::getBaseDir('media') . '/bumblefilter/';
85
+ $uploader->save($path, $_FILES['file']['name'] );
86
+
87
+ } catch (Exception $e) {
88
+
89
+ }
90
+ //this way the name is saved in DB
91
+ $data['file'] = 'bumblefilter/' .preg_replace("#\s+#","_", $_FILES['file']['name']);
92
+ $sizes = array( "filter_imagesize" => "l" );
93
+ foreach( $sizes as $key => $size ){
94
+ $c = Mage::getStoreConfig( 'bumble_filter/general_setting/'.$key );
95
+ $tmp = explode( "x", $c );
96
+ if( count($tmp) > 0 && (int)$tmp[0] ){
97
+ Mage::helper('bumble_filter')->resize( $data['file'], (int)$tmp[0], (int)$tmp[1] );
98
+ }
99
+ }
100
+ } elseif((isset($data['file']['delete']) && $data['file']['delete'] == 1)){
101
+ //can also delete file from fs
102
+ unlink(Mage::getBaseDir('media') . DS . $data['file']['value']);
103
+ //set path to null and save to database
104
+ $data['file'] = "";
105
+ } else {
106
+ $data['file'] = isset($data['file']['value'])?$data['file']['value']:"";
107
+ }
108
+
109
+
110
+ if(isset($_FILES['icon']['name']) && $_FILES['icon']['name'] != '') {
111
+ try {
112
+ /* Starting upload */
113
+ $uploader = new Varien_File_Uploader('icon');
114
+ $uploader->setAllowedExtensions(array('jpg','jpeg','gif','png'));
115
+ $uploader->setAllowRenameFiles(false);
116
+ $uploader->setFilesDispersion(false);
117
+ $path = Mage::getBaseDir('media') . '/bumblefilter/icon/';
118
+ $uploader->save($path, $_FILES['icon']['name'] );
119
+
120
+ } catch (Exception $e) {
121
+
122
+ }
123
+ //this way the name is saved in DB
124
+ $data['icon'] = 'bumblefilter/icon/' .preg_replace("#\s+#","_", $_FILES['icon']['name']);
125
+
126
+ } elseif((isset($data['icon']['delete']) && $data['icon']['delete'] == 1)){
127
+ //can also delete file from fs
128
+ unlink(Mage::getBaseDir('media') . DS . $data['icon']['value']);
129
+ //set path to null and save to database
130
+ $data['icon'] = "";
131
+ } else {
132
+ $data['icon'] = isset($data['icon']['value'])?$data['icon']['value']:"";
133
+ }
134
+
135
+ $data['stores'] = $this->getRequest()->getParam('stores');
136
+
137
+
138
+ $model->setData($data)
139
+ ->setId($this->getRequest()->getParam('id'));
140
+ try {
141
+ $model->save();
142
+ $resroute = Mage::getStoreConfig('bumble_filter/general_setting/route');
143
+ $extension = ".html";
144
+ //Save to Url Rewite
145
+ Mage::getModel('core/url_rewrite')->loadByIdPath('bumblefilter/filter/'.$model->getId())
146
+ ->setIdPath('bumblefilter/filter/'.$model->getId())
147
+ ->setRequestPath($resroute .'/'.$model->getIdentifier().$extension )
148
+ ->setTargetPath('bumblefilter/filter/view/id/'.$model->getId())
149
+ ->save();
150
+
151
+
152
+
153
+ // save rewrite url
154
+ if ($this->getRequest()->getParam('back')) {
155
+ Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('bumble_filter')->__('Successfully Save, you can continue to edit'));
156
+ Mage::getSingleton('adminhtml/session')->setFormData(false);
157
+
158
+ $this->_redirect('*/*/edit', array('id' => $model->getId()));
159
+ return;
160
+ }
161
+ if ($this->getRequest()->getParam('backto')) {
162
+ Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('bumble_filter')->__('Your Group has been modify'));
163
+ Mage::getSingleton('adminhtml/session')->setFormData(false);
164
+ $this->_redirect('*/*/', array('id' => $model->getId()));
165
+ return;
166
+ }
167
+ Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('bumble_filter')->__('Next step field up all details, and Save your Record'));
168
+ Mage::getSingleton('adminhtml/session')->setFormData(false);
169
+
170
+ $urlconf= Mage::getModel('bumble_filter/group')->load(9);
171
+ $this->_redirect('*/filtergroup/edit', array('id' => $model->getId()));
172
+ return;
173
+ } catch (Exception $e) {
174
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
175
+ Mage::getSingleton('adminhtml/session')->setFormData($data);
176
+ $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
177
+ return;
178
+ }
179
+ }
180
+
181
+ Mage::getSingleton('adminhtml/session')->addError(Mage::helper('bumble_filter')->__('Unable to find cat to save'));
182
+ $this->_redirect('*/*/');
183
+ }
184
+ public function imageAction() {
185
+ $result = array();
186
+ try {
187
+ $uploader = new Bumble_Filter_Media_Uploader('image');
188
+ $uploader->setAllowedExtensions(array('jpg','jpeg','gif','png'));
189
+ $uploader->setAllowRenameFiles(true);
190
+ $uploader->setFilesDispersion(true);
191
+ $result = $uploader->save(
192
+ Mage::getSingleton('bumble_filter/config')->getBaseMediaPath()
193
+ );
194
+
195
+ $result['url'] = Mage::getSingleton('bumble_filter/config')->getMediaUrl($result['file']);
196
+ $result['cookie'] = array(
197
+ 'name' => session_name(),
198
+ 'value' => $this->_getSession()->getSessionId(),
199
+ 'lifetime' => $this->_getSession()->getCookieLifetime(),
200
+ 'path' => $this->_getSession()->getCookiePath(),
201
+ 'domain' => $this->_getSession()->getCookieDomain()
202
+ );
203
+ } catch (Exception $e) {
204
+ $result = array('error'=>$e->getMessage(), 'errorcode'=>$e->getCode());
205
+ }
206
+
207
+ $this->getResponse()->setBody(Zend_Json::encode($result));
208
+ }
209
+
210
+ public function massStatusAction() {
211
+ $IDList = $this->getRequest()->getParam('filter');
212
+ if(!is_array($IDList)) {
213
+ Mage::getSingleton('adminhtml/session')->addError($this->__('Please select record(s)'));
214
+ } else {
215
+ try {
216
+ foreach ($IDList as $itemId) {
217
+ $_model = Mage::getSingleton('bumble_filter/filter')
218
+ ->setIsMassStatus(true)
219
+ ->load($itemId)
220
+ ->setIsActive($this->getRequest()->getParam('status'))
221
+ ->save();
222
+ }
223
+ $this->_getSession()->addSuccess(
224
+ $this->__('Total of %d record(s) were successfully updated', count($IDList))
225
+ );
226
+ } catch (Exception $e) {
227
+ $this->_getSession()->addError($e->getMessage());
228
+ }
229
+ }
230
+ $this->_redirect('*/*/index');
231
+ }
232
+ public function massDeleteAction() {
233
+
234
+
235
+ $IDList = $this->getRequest()->getParam('filter');
236
+ if(!is_array($IDList)) {
237
+ Mage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__('Please select record(s)'));
238
+ } else {
239
+ $resource = Mage::getSingleton('core/resource');
240
+
241
+ $write = $resource->getConnection('core_write');
242
+
243
+ try {
244
+ foreach ($IDList as $itemId) {
245
+ $_model = Mage::getModel('bumble_filter/filter')
246
+ ->setIsMassDelete(true)->load($itemId);
247
+ $_model->delete();
248
+ $resource = Mage::getSingleton('core/resource');
249
+ $readConnection = $resource->getConnection('core_read');
250
+ $query = "SELECT `group_id` FROM bumble_filter_group WHERE `filter_id`= '$itemId'";
251
+
252
+ $results = $readConnection->fetchAll($query);
253
+
254
+ Mage::getModel('core/url_rewrite')->loadByIdPath('bumblefilter/filter/'.$itemId)->delete();
255
+ $write->query("DELETE FROM bumble_filter_group WHERE `filter_id` = '$itemId'");
256
+
257
+ foreach ($results as $key) {
258
+ Mage::getModel('core/url_rewrite')->loadByIdPath('bumblefilter/filtergroup/'.$key['group_id'])->delete();
259
+ }
260
+
261
+ }
262
+ Mage::getSingleton('adminhtml/session')->addSuccess(
263
+ Mage::helper('adminhtml')->__(
264
+ 'Total of %d record(s) were successfully deleted', count($IDList)
265
+ )
266
+ );
267
+ } catch (Exception $e) {
268
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
269
+ }
270
+ }
271
+ $this->_redirect('*/*/index');
272
+ }
273
+
274
+ }
app/code/community/Bumble/Filter/controllers/Adminhtml/FiltergroupController.php ADDED
@@ -0,0 +1,639 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ ---------------------------------------------------------------------------*/
10
+
11
+ class Bumble_Filter_Adminhtml_FiltergroupController extends Mage_Adminhtml_Controller_Action {
12
+ protected function _initAction() {
13
+ $this->loadLayout()
14
+ ->_setActiveMenu('bumble_filter/group');
15
+
16
+ return $this;
17
+ }
18
+
19
+ public function indexAction() {
20
+ $this->_title($this->__('Filters Manager'));
21
+ $this->_initAction();
22
+ $this->_addContent($this->getLayout()->createBlock('bumble_filter/adminhtml_group') );
23
+ $this->renderLayout();
24
+
25
+ }
26
+
27
+ public function editAction(){
28
+ $this->_title($this->__('Edit Record'));
29
+ $id = $this->getRequest()->getParam('id');
30
+ $id = $id?$id: 0;
31
+
32
+ $tabs= $this->getRequest()->getParam('id');
33
+
34
+ $resource = Mage::getSingleton('core/resource');
35
+ $readConnection = $resource->getConnection('core_read');
36
+
37
+ $query = "SELECT `group_id` FROM bumble_filter_group WHERE `filter_id`= '$tabs'";
38
+
39
+ $results = $readConnection->fetchAll($query);
40
+
41
+ /* get the results */
42
+ $group_id = $results[0]['group_id'];
43
+
44
+
45
+ $_model = Mage::getModel('bumble_filter/group')->load($group_id);
46
+ Mage::register('group_data', $_model);
47
+ $this->loadLayout();
48
+ $this->_setActiveMenu('bumble_filter/group');
49
+ $this->_addBreadcrumb(Mage::helper('adminhtml')->__('Group Manager'), Mage::helper('adminhtml')->__('Group Manager'), $this->getUrl('*/*/'));
50
+ $this->_addBreadcrumb(Mage::helper('adminhtml')->__('Add group'), Mage::helper('adminhtml')->__('Add group'));
51
+ $this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
52
+
53
+ $this->_addContent($this->getLayout()->createBlock('bumble_filter/adminhtml_group_edit'))
54
+ ->_addLeft($this->getLayout()->createBlock('bumble_filter/adminhtml_group_edit_tabs'));
55
+
56
+
57
+ if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {
58
+
59
+ $this->getLayout()->getBlock('head')
60
+ ->setCanLoadTinyMce(true)
61
+ ->addItem('js','tiny_mce/tiny_mce.js')
62
+ ->addItem('js','mage/adminhtml/wysiwyg/tiny_mce/setup.js')
63
+ ->addJs('mage/adminhtml/browser.js')
64
+ ->addJs('prototype/window.js')
65
+ ->addJs('lib/FABridge.js')
66
+ ->addJs('lib/flex.js')
67
+ ->addJs('mage/adminhtml/flexuploader.js')
68
+ ->addItem('js_css','prototype/windows/themes/default.css')
69
+ ->addCss('lib/prototype/windows/themes/magento.css');
70
+ }
71
+ $this->renderLayout();
72
+ }
73
+
74
+ public function addAction(){
75
+ $this->_redirect('*/filter/add');
76
+ }
77
+
78
+ /**
79
+ * function Add New or Save group
80
+ * @param name POST
81
+ * @param status POST
82
+ */
83
+ public function getNum()
84
+ {
85
+ $ob = $this->getRequest()->getParam('id');
86
+
87
+ $br = Mage::getModel('bumble_filter/filter')->load($ob);
88
+ $filtertype= $br->getManufacturer();
89
+ $use= $br->getUsemanufacturer();
90
+
91
+ $resource = Mage::getSingleton('core/resource');
92
+ $readConnection = $resource->getConnection('core_read');
93
+
94
+ $query = "SELECT `group_id` FROM bumble_filter_group WHERE `filter_id`= '$ob'";
95
+
96
+
97
+ $braresults = $readConnection->fetchAll($query);
98
+ $bra_id = $braresults[0]['group_id'];
99
+
100
+ $gro = Mage::getModel('bumble_filter/group')->load($bra_id);
101
+
102
+
103
+ if($use == 1)
104
+ {
105
+ if($filtertype == 'all')
106
+ {
107
+ $num = array();
108
+ $attribute = Mage::getModel('eav/config')->getAttribute('catalog_product', 'manufacturer');
109
+
110
+ foreach ( $attribute->getSource()->getAllOptions(true, true) as $option)
111
+ {
112
+ if($option['label'] != "")
113
+ {
114
+ $num[]= $option['label'];
115
+ }
116
+ }
117
+
118
+ }
119
+ else
120
+ {
121
+
122
+
123
+ $attr = Mage::getModel('catalog/resource_eav_attribute')->load(81);
124
+
125
+ $label = $attr->getSource()->getOptionText($filtertype);
126
+ $label = str_replace("'", "", $label);
127
+ $num=array();
128
+
129
+ $num[] = $label;// 2 array
130
+ }
131
+ }else{
132
+ $ob = $this->getRequest()->getParam('id');
133
+
134
+ $br = Mage::getModel('bumble_filter/filter')->load($ob);
135
+
136
+ $num = $br->getTitle();
137
+ }
138
+
139
+ return $num;
140
+ }
141
+
142
+
143
+
144
+ public function maxPage()
145
+ {
146
+ $num = $this->getNum();
147
+ $sele= count($num);
148
+ $num_split= $sele/20;
149
+ if(is_float($num_split)){
150
+ $split = explode('.', $num_split);
151
+ #var_dump($split[1]);
152
+ if($split[1] <= 5 || $split[1] <= 50){
153
+ $num_split = round($num_split)+1;
154
+ } else
155
+ {
156
+ $num_split = round($num_split);
157
+ }
158
+ }
159
+
160
+ #var_dump($num_split);
161
+
162
+ return $num_split;
163
+ }
164
+
165
+ public function savegroupAction() {
166
+
167
+ $ob = $this->getRequest()->getParam('id');
168
+ //$tabs= $_GET['tabs'];
169
+ $br = Mage::getModel('bumble_filter/filter')->load($ob);
170
+ $filtertype= $br->getManufacturer();
171
+ $usemanu = $br->getUsemanufacturer();
172
+
173
+ $Num= $this->getNum();
174
+ /*if($usemanu == 1 && $filtertype == 'all')
175
+ {
176
+ $products = Mage::getModel('catalog/product')->getCollection();
177
+ $num = array();
178
+ $Num= array();
179
+
180
+ $i = 0;
181
+ $att = array();
182
+
183
+ foreach($products as $product)
184
+ {
185
+ $prod= Mage::getModel('catalog/product')->load($product->getId());
186
+ $at= $prod->getAttributeText('manufacturer');
187
+ if($at != ''){
188
+ $att[$i]= $at;
189
+ $i++;
190
+ }
191
+ }
192
+
193
+ $result = array_unique($att);
194
+
195
+ //$result = array_filter($result);
196
+
197
+
198
+ foreach ($result as $key)
199
+ {
200
+
201
+ $k = str_replace("'", "", $key);
202
+ $num[] = $k;// 1 array
203
+
204
+ $Num[] = $key;
205
+
206
+ }
207
+
208
+
209
+ }
210
+ else
211
+ {
212
+
213
+
214
+ $attr = Mage::getModel('catalog/resource_eav_attribute')->load(81);
215
+
216
+ $label = $attr->getSource()->getOptionText($filtertype);
217
+ $lab = str_replace("'", "", $label);
218
+ $num=array();
219
+ $Num= array();
220
+
221
+ $num[] = $lab;// 2 array
222
+ $j = str_replace("'", "\'.'", $label);
223
+ $Num[] = $label;
224
+ }*/
225
+ $lunghezzaArray= count($Num);
226
+ $title= array();
227
+ $file= array();
228
+ $identifier= array();
229
+ $description= array();
230
+ $tabs= array();
231
+ $status= array();
232
+
233
+
234
+ if ($data = $this->getRequest()->getPost()) {
235
+
236
+ /********* Save Image *********/
237
+ $h= 1;
238
+ foreach ($Num as $ind) {
239
+
240
+ if($h<= $lunghezzaArray && $h <= 20){
241
+
242
+
243
+ if(isset($_FILES['file'.$h]['name']) && $_FILES['file'.$h]['name'] != '')
244
+ {
245
+ try
246
+ {
247
+ /* Starting upload */
248
+ $uploader = new Varien_File_Uploader('file'.$h);
249
+ $uploader->setAllowedExtensions(array('jpg','jpeg','gif','png'));
250
+ $uploader->setAllowRenameFiles(false);
251
+ $uploader->setFilesDispersion(false);
252
+ $path = Mage::getBaseDir('media') . '/bumblefilter/';
253
+ $uploader->save($path, $_FILES['file'.$h]['name'] );
254
+
255
+ }
256
+ catch (Exception $e)
257
+ {
258
+
259
+ }
260
+
261
+ //This way save image in DB
262
+
263
+ $data['file'.$h] = 'bumblefilter/' .preg_replace("#\s+#","_", $_FILES['file'.$h]['name']);
264
+ $file[] = $data['file'.$h];
265
+ $sizes = array( "filter_imagesize" => "l" );
266
+ foreach( $sizes as $key => $size )
267
+ {
268
+ $c = Mage::getStoreConfig( 'bumble_filter/general_setting/'.$key );
269
+ $tmp = explode( "x", $c );
270
+
271
+ if( count($tmp) > 0 && (int)$tmp[0] )
272
+ {
273
+ Mage::helper('bumble_filter')->resize( $data['file'.$h], (int)$tmp[0], (int)$tmp[1] );
274
+ }
275
+ }
276
+ }
277
+
278
+ elseif((isset($data['file'.$h]['delete']) && $data['file'.$h]['delete'] == 1))
279
+ {
280
+ //can also delete file from fs
281
+ unlink(Mage::getBaseDir('media') . DS . $data['file'.$h]['value']);
282
+ //set path to null and save to database
283
+ $data['file'.$h] = "";
284
+ $file[] = $data['file'.$h];
285
+ }
286
+ else
287
+ {
288
+ $data['file'.$h] = isset($data['file'.$h]['value'])?$data['file'.$h]['value']:"";
289
+ $file[] = $data['file'.$h];
290
+ }/********* End Save Image *********/
291
+ }
292
+ $h++;
293
+ }
294
+
295
+
296
+ /********* Get all data *********/
297
+ $filterId = $this->getRequest()->getParam('id');
298
+ $INpage = $data['page'];
299
+ $selectform = $data['SelectURL'];
300
+ var_dump($selectform);
301
+ $page=$data['page'];
302
+
303
+ if($page > 1)
304
+ {
305
+ $resPage= (20 * $page)-20;
306
+ }
307
+
308
+ if($page == 1 || $page == null){
309
+ $resPage = 0;
310
+ }
311
+
312
+
313
+ $h= 1;
314
+ $zero =0;
315
+ foreach ($Num as $ind) {
316
+
317
+ if($h<= $lunghezzaArray && $h <= 20){
318
+ if($zero < 20)
319
+ {
320
+ $var = $zero+$resPage;
321
+ }
322
+ if($data['title'.$h] == "")
323
+ {$rep_tit = $Num[$var];}
324
+ else
325
+ {$rep_tit = $data['title'.$h];}
326
+ $title[] = $rep_tit;
327
+ if(empty($data['identifier'.$h])){
328
+ $t= strtolower($rep_tit);
329
+ $t=str_replace(' ', '-', $t);
330
+ $identifier[]= $t;
331
+ }else{
332
+ $identifier[] = $data['identifier'.$h];
333
+ }
334
+
335
+ $description[] = $data['description'.$h];
336
+ $status[] = $data['status'.$h];
337
+ }
338
+ $h++;$zero++;
339
+ }
340
+ /********* End Get all data *********/
341
+
342
+ /********* Write in DB *********/
343
+
344
+ try {
345
+
346
+
347
+
348
+ $resource = Mage::getSingleton('core/resource');
349
+ $readConnection = $resource->getConnection('core_read');
350
+ //first query
351
+ $query = "SELECT `group_id` FROM bumble_filter_group WHERE `filter_id`= '$filterId' AND `page`= '$page'";
352
+
353
+ $results = $readConnection->fetchAll($query);
354
+ $group= array();
355
+ foreach ($results as $key) {
356
+ $group[]=$key['group_id'];
357
+ }
358
+ //second query
359
+ $braquery = "SELECT `filter_id` FROM bumble_filter_group WHERE `filter_id`= '$filterId' AND `page`= '$page'";
360
+
361
+ $braresults = $readConnection->fetchAll($braquery);
362
+ $bra_id = $braresults[0]['filter_id'];
363
+ //third query
364
+ $titquery = "SELECT `title` FROM bumble_filter_group WHERE `filter_id`= '$filterId'";
365
+
366
+ $titresults = $readConnection->fetchAll($titquery);
367
+ /*
368
+ $newTit= array();
369
+ foreach ($titresults as $key) {
370
+ $newTit[]=$key['title'];
371
+ }
372
+ */
373
+ $tabquery = "SELECT `tabs` FROM bumble_filter_group WHERE `filter_id`= '$filterId'";
374
+
375
+ $tabresults = $readConnection->fetchAll($tabquery);
376
+
377
+
378
+
379
+
380
+
381
+ $resource = Mage::getSingleton('core/resource');
382
+
383
+ $writeConnection = $resource->getConnection('core_write');
384
+ $_titleCount = count($title);
385
+ $_filterIdCount = count($titresults);
386
+ if ($bra_id == '')
387
+ {
388
+ $varQuery= $resPage;
389
+ $varQ= 0;
390
+ foreach ($title as $a ) {
391
+ if($a != "")
392
+ {
393
+ $query = "INSERT INTO bumble_filter_group (`title`,`filter_id`,`file`,`identifier`,`description`,`tabs`,`page`,`status`) VALUES ( \"$a\",\"$filterId\",\"$file[$varQ]\",\"$identifier[$varQ]\",\"$description[$varQ]\",\"$Num[$varQuery]\",\"$INpage\",\"$status[$varQ]\")";
394
+ $writeConnection->query($query);
395
+ $varQuery++; $varQ++;
396
+ }}
397
+
398
+ }
399
+
400
+ if ($bra_id == $filterId)
401
+ {
402
+
403
+ $varQuery= $resPage;
404
+ $varQ= 0;
405
+ foreach ($title as $a ) {
406
+ if($a != "")
407
+ {
408
+ $query = "UPDATE bumble_filter_group SET title=\"$a\",file=\"$file[$varQ]\",identifier=\"$identifier[$varQ]\",description=\"$description[$varQ]\",tabs=\"$Num[$varQuery]\",page=\"$INpage\",status=\"$status[$varQ]\" WHERE group_id=\"$group[$varQ]\"";
409
+ $writeConnection->query($query);
410
+ $varQuery++; $varQ++;
411
+ }
412
+ }
413
+
414
+ }
415
+
416
+
417
+ if ($this->getRequest()->getParam('back')) {
418
+ Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('bumble_filter')->__('Successfully Save, you can continue to edit'));
419
+ Mage::getSingleton('adminhtml/session')->setFormData(false);
420
+
421
+ $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id'), 'page' => $this->getRequest()->getParam('page')));
422
+ return;
423
+ }
424
+ if ($this->getRequest()->getParam('Prev')) {
425
+
426
+ Mage::getSingleton('adminhtml/session')->setFormData(false);
427
+ if($this->getRequest()->getParam('page') == 1)
428
+ {
429
+ $pageres = 1;
430
+ }if($this->getRequest()->getParam('page') != 1)
431
+ {
432
+ $pageres = $this->getRequest()->getParam('page')-1;
433
+ }
434
+ $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id'), 'page' => $pageres ));
435
+ return;
436
+ }
437
+
438
+ if ($this->getRequest()->getParam('Next')) {
439
+
440
+ Mage::getSingleton('adminhtml/session')->setFormData(false);
441
+ if($this->getRequest()->getParam('page') == $this->maxPage())
442
+ {
443
+ $pageres = $this->maxPage() ;
444
+ }else
445
+ {
446
+ $pageres = $this->getRequest()->getParam('page')+1;
447
+ }
448
+ $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id'), 'page' => $pageres ));
449
+ return;
450
+ }
451
+
452
+ if ($this->getRequest()->getParam('SelectURL')) {
453
+
454
+ Mage::getSingleton('adminhtml/session')->setFormData(false);
455
+
456
+ $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id'), 'page' => $this->getRequest()->getParam('page')));
457
+ return;
458
+ }
459
+
460
+ Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('bumble_filter')->__('Group was successfully saved'));
461
+
462
+ /********* End Write in DB *********/
463
+ } catch (Exception $e) {
464
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
465
+ Mage::getSingleton('adminhtml/session')->setFormData($data);
466
+ $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
467
+ return;
468
+ }
469
+ }//End get request data
470
+
471
+ $this->_redirect('*/*/');
472
+
473
+ }//End save Action
474
+ public function imageAction() {
475
+ $result = array();
476
+ try {
477
+ $uploader = new Bumble_Filter_Media_Uploader('image');
478
+ $uploader->setAllowedExtensions(array('jpg','jpeg','gif','png'));
479
+ $uploader->setAllowRenameFiles(true);
480
+ $uploader->setFilesDispersion(true);
481
+ $result = $uploader->save(
482
+ Mage::getSingleton('bumble_filter/config')->getBaseMediaPath()
483
+ );
484
+
485
+ $result['url'] = Mage::getSingleton('bumble_filter/config')->getMediaUrl($result['file']);
486
+ $result['cookie'] = array(
487
+ 'name' => session_name(),
488
+ 'value' => $this->_getSession()->getSessionId(),
489
+ 'lifetime' => $this->_getSession()->getCookieLifetime(),
490
+ 'path' => $this->_getSession()->getCookiePath(),
491
+ 'domain' => $this->_getSession()->getCookieDomain()
492
+ );
493
+ } catch (Exception $e) {
494
+ $result = array('error'=>$e->getMessage(), 'errorcode'=>$e->getCode());
495
+ }
496
+
497
+ $this->getResponse()->setBody(Zend_Json::encode($result));
498
+ }// End Add or Update
499
+
500
+ /**
501
+ * Delete
502
+ */
503
+
504
+
505
+
506
+ public function massRewriteAction(){
507
+ try {
508
+
509
+ /***************** SOLUTION 1 ******************/
510
+ $resource = Mage::getSingleton('core/resource');
511
+ $writeConnection = $resource->getConnection('core_write');
512
+
513
+ $collection = Mage::getModel('bumble_filter/group')->getCollection();
514
+ $coll = Mage::getModel('bumble_filter/filter')->getCollection();
515
+ $extension = ".html";
516
+
517
+ foreach( $collection as $model ){
518
+ $r_Url= Mage::getModel('core/url_rewrite')->loadByIdPath('bumblefilter/filtergroup/'.$model->getId());
519
+ if($r_Url['id_path'])
520
+ {
521
+ $url = explode('/', $r_Url['id_path']);
522
+ $core= $url[2];
523
+ }else{
524
+ $core = null;
525
+ }
526
+
527
+
528
+ $m= $model->getFilterId();
529
+ $groCollection = Mage::getModel('bumble_filter/filter')->load($m);
530
+
531
+ $idenFilter= $groCollection->getIdentifier();
532
+ $store_id = $groCollection['store_id'][0];
533
+ $id_path = 'bumblefilter/filtergroup/'.$model->getId();
534
+ $request_path = $idenFilter .'/'.$model->getIdentifier().$extension;
535
+ $target_path = 'bumblefilter/filtergroup/view/id/'.$model->getId();
536
+ $is_system = 0;
537
+ $options = NULL;
538
+
539
+ if($model->getId() != $core )
540
+ {
541
+ $query = "INSERT INTO core_url_rewrite (`store_id`,`id_path`,`request_path`,`target_path`,`is_system`) VALUES ( \"$store_id\",\"$id_path\",\"$request_path\",\"$target_path\",\"$is_system\")";
542
+
543
+ $writeConnection->query($query);
544
+ }
545
+ else{
546
+ $query = "UPDATE core_url_rewrite SET store_id=\"$store_id\",request_path=\"$request_path\",target_path=\"$target_path\",is_system=\"$is_system\" WHERE id_path=\"$id_path\"";
547
+
548
+ $writeConnection->query($query);
549
+ }
550
+
551
+ }
552
+
553
+ foreach( $coll as $model ){
554
+ $r_Url= Mage::getModel('core/url_rewrite')->loadByIdPath('bumblefilter/filter/'.$model->getId());
555
+ if($r_Url['id_path'])
556
+ {
557
+ $url = explode('/', $r_Url['id_path']);
558
+ $core= $url[2];
559
+ }else{
560
+ $core = null;
561
+ }
562
+
563
+
564
+ $m= $model->getId();
565
+ $groCollection = Mage::getModel('bumble_filter/filter')->load($m);
566
+
567
+ $idenFilter= $groCollection->getIdentifier();
568
+ $store_id = $groCollection['store_id'][0];
569
+ $id_path = 'bumblefilter/filter/'.$model->getId();
570
+ $request_path = $idenFilter .'/';
571
+ $target_path = 'bumblefilter/filter/index/id/'.$model->getId();
572
+ $is_system = 0;
573
+ $options = NULL;
574
+
575
+ if($model->getId() != $core )
576
+ {
577
+ $query = "INSERT INTO core_url_rewrite (`store_id`,`id_path`,`request_path`,`target_path`,`is_system`) VALUES ( \"$store_id\",\"$id_path\",\"$request_path\",\"$target_path\",\"$is_system\")";
578
+
579
+ $writeConnection->query($query);
580
+ }
581
+ else{
582
+ $query = "UPDATE core_url_rewrite SET store_id=\"$store_id\",request_path=\"$request_path\",target_path=\"$target_path\",is_system=\"$is_system\" WHERE id_path=\"$id_path\"";
583
+
584
+ $writeConnection->query($query);
585
+ }
586
+
587
+ }
588
+
589
+ /******************* SOLUTION 1 END***************/
590
+
591
+ /*$collection = Mage::getModel('bumble_filter/group')->getCollection();
592
+ $coll = Mage::getModel('bumble_filter/filter')->getCollection();
593
+ $extension = ".html";
594
+ foreach( $collection as $model ){
595
+ $m= $model->getFilterId();
596
+ $groCollection = Mage::getModel('bumble_filter/filter')->load($m);
597
+
598
+
599
+
600
+ $idenFilter= $groCollection->getIdentifier();
601
+ Mage::getModel('core/url_rewrite')->loadByIdPath('bumblefilter/filtergroup/'.$model->getId())
602
+ ->setIsSystem(false)
603
+ ->setStoreId($groCollection['store_id'][0])
604
+ ->setIdPath('bumblefilter/filtergroup/'.$model->getId())
605
+ ->setRequestPath($idenFilter .'/'.$model->getIdentifier().$extension )
606
+ ->setTargetPath('bumblefilter/filtergroup/view/id/'.$model->getId())
607
+ ->save();
608
+
609
+ }
610
+
611
+ foreach( $coll as $model ){
612
+
613
+
614
+ $groCollection = Mage::getModel('bumble_filter/filter')->load($model->getId());
615
+
616
+ $idenFilter= $groCollection->getIdentifier();
617
+ Mage::getModel('core/url_rewrite')->loadByIdPath('bumblefilter/filter/'.$model->getId())
618
+ ->setIsSystem(false)
619
+ ->setStoreId($groCollection['store_id'][0])
620
+ ->setIdPath('bumblefilter/filter/'.$model->getId())
621
+ ->setRequestPath($idenFilter)
622
+ ->setTargetPath('bumblefilter/filter/index/id/'.$model->getId())
623
+ ->save();
624
+
625
+ }*/
626
+
627
+
628
+
629
+ Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('Rewrite URLs Of All Filter are resized successful'));
630
+ } catch ( Exception $e ) {
631
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
632
+ }
633
+
634
+ $this->_redirect('*/*/');
635
+ }
636
+
637
+
638
+ }// End Class
639
+
app/code/community/Bumble/Filter/controllers/FilterController.php ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ ------------------------------------------------------------------*/
10
+
11
+ class Bumble_Filter_FilterController extends Mage_Core_Controller_Front_Action
12
+ {
13
+ public function indexAction(){
14
+
15
+ $show = $this->getGeneralConfig("show");
16
+ if(!$show) {
17
+ $this->getResponse()->setHeader('HTTP/1.1','404 Not Found');
18
+ $this->getResponse()->setHeader('Status','404 File not found');
19
+ $this->_redirect('404-notfound');
20
+ }
21
+ if($this->getRequest()->getParam('category')){
22
+ Mage::register('category_filter', $this->getRequest()->getParam('category'));
23
+ }
24
+
25
+ Mage::dispatchEvent(
26
+ 'catalog_controller_category_init_before',
27
+ array(
28
+ 'controller_action' => $this
29
+ )
30
+ );
31
+
32
+ $rootCategoryId = (int) Mage::app()->getStore()->getRootCategoryId();
33
+ if (!$rootCategoryId) {
34
+ $this->_forward('noRoute');
35
+ return;
36
+ }
37
+
38
+ $rootCategory = Mage::getModel('catalog/category')
39
+ ->load($rootCategoryId)
40
+
41
+ // TODO: Fetch from config
42
+ ->setName($this->__('Sale'))
43
+ ->setMetaTitle($this->__('Sale'))
44
+ ->setMetaDescription($this->__('Sale'))
45
+ ->setMetaKeywords($this->__('Sale'));
46
+
47
+ Mage::register('current_category', $rootCategory);
48
+
49
+ Mage::getSingleton('catalog/session')
50
+ ->setLastVisitedCategoryId($rootCategory->getId());
51
+
52
+ try {
53
+ Mage::dispatchEvent('catalog_controller_category_init_after',
54
+ array(
55
+ 'category' => $rootCategory,
56
+ 'controller_action' => $this
57
+ )
58
+ );
59
+ } catch (Mage_Core_Exception $e) {
60
+ Mage::logException($e);
61
+ return;
62
+ }
63
+
64
+ // Observer can change category
65
+ if (!$rootCategory->getId()){
66
+ $this->_forward('noRoute');
67
+ return;
68
+ }
69
+
70
+ $this->loadLayout();
71
+
72
+ $this->_initLayoutMessages('catalog/session');
73
+ $this->_initLayoutMessages('checkout/session');
74
+
75
+ $this->renderLayout();
76
+ }
77
+
78
+ public function viewAction(){
79
+ $show = $this->getGeneralConfig("show");
80
+ if(!$show) {
81
+ $this->getResponse()->setHeader('HTTP/1.1','404 Not Found');
82
+ $this->getResponse()->setHeader('Status','404 File not found');
83
+ $this->_redirect('404-notfound');
84
+ }
85
+
86
+
87
+ $id = (int) $this->getRequest()->getParam( 'id', false);
88
+
89
+ $filter = Mage::getModel('bumble_filter/group')->load($id);
90
+ Mage::register('current_group', $filter);
91
+
92
+
93
+ $this->loadLayout();
94
+ $this->renderLayout();
95
+ }
96
+
97
+ public function getGeneralConfig( $val, $default = "" ){
98
+ return Mage::getStoreConfig( "bumble_filter/general_setting/".$val );
99
+ }
100
+ }
101
+ ?>
app/code/community/Bumble/Filter/controllers/FiltergroupController.php ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ ------------------------------------------------------------------*/
10
+
11
+ class Bumble_Filter_FiltergroupController extends Mage_Core_Controller_Front_Action
12
+ {
13
+ public function indexAction(){
14
+
15
+ $show = $this->getGeneralConfig("show");
16
+ if(!$show) {
17
+ $this->getResponse()->setHeader('HTTP/1.1','404 Not Found');
18
+ $this->getResponse()->setHeader('Status','404 File not found');
19
+ $this->_redirect('404-notfound');
20
+ }
21
+ if($this->getRequest()->getParam('category')){
22
+ Mage::register('category_filter', $this->getRequest()->getParam('category'));
23
+ }
24
+
25
+ Mage::dispatchEvent(
26
+ 'catalog_controller_category_init_before',
27
+ array(
28
+ 'controller_action' => $this
29
+ )
30
+ );
31
+
32
+ $rootCategoryId = (int) Mage::app()->getStore()->getRootCategoryId();
33
+ if (!$rootCategoryId) {
34
+ $this->_forward('noRoute');
35
+ return;
36
+ }
37
+
38
+ $rootCategory = Mage::getModel('catalog/category')
39
+ ->load($rootCategoryId)
40
+
41
+ // TODO: Fetch from config
42
+ ->setName($this->__('Sale'))
43
+ ->setMetaTitle($this->__('Sale'))
44
+ ->setMetaDescription($this->__('Sale'))
45
+ ->setMetaKeywords($this->__('Sale'));
46
+
47
+ Mage::register('current_category', $rootCategory);
48
+
49
+ Mage::getSingleton('catalog/session')
50
+ ->setLastVisitedCategoryId($rootCategory->getId());
51
+
52
+ try {
53
+ Mage::dispatchEvent('catalog_controller_category_init_after',
54
+ array(
55
+ 'category' => $rootCategory,
56
+ 'controller_action' => $this
57
+ )
58
+ );
59
+ } catch (Mage_Core_Exception $e) {
60
+ Mage::logException($e);
61
+ return;
62
+ }
63
+
64
+ // Observer can change category
65
+ if (!$rootCategory->getId()){
66
+ $this->_forward('noRoute');
67
+ return;
68
+ }
69
+
70
+ $this->loadLayout();
71
+
72
+ $this->_initLayoutMessages('catalog/session');
73
+ $this->_initLayoutMessages('checkout/session');
74
+
75
+ $this->renderLayout();
76
+ }
77
+
78
+ public function viewAction(){
79
+ $show = $this->getGeneralConfig("show");
80
+ if(!$show) {
81
+ $this->getResponse()->setHeader('HTTP/1.1','404 Not Found');
82
+ $this->getResponse()->setHeader('Status','404 File not found');
83
+ $this->_redirect('404-notfound');
84
+ }
85
+
86
+
87
+ $id = (int) $this->getRequest()->getParam( 'id', false);
88
+
89
+ $filter = Mage::getModel('bumble_filter/group')->load($id);
90
+ Mage::register('current_group', $filter);
91
+
92
+
93
+ $this->loadLayout();
94
+ $this->renderLayout();
95
+ }
96
+
97
+ public function getGeneralConfig( $val, $default = "" ){
98
+ return Mage::getStoreConfig( "bumble_filter/general_setting/".$val );
99
+ }
100
+ }
101
+ ?>
app/code/community/Bumble/Filter/etc/adminhtml.xml ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <menu>
4
+ <bumbleextensions module="bumble_filter">
5
+ <title>Bumble Extension</title>
6
+ <sort_order>50</sort_order>
7
+ <children>
8
+ <filter translate="title" module="bumble_filter">
9
+ <title>Bumble Setting</title>
10
+ <children>
11
+
12
+ <filtergroup translate="title" module="bumble_filter">
13
+ <title>Configuration Groups</title>
14
+ <sort_order>1</sort_order>
15
+ <action>adminhtml/filtergroup/index</action>
16
+ </filtergroup>
17
+ <add module="bumble_filter">
18
+ <title>Add Group</title>
19
+ <sort_order>2</sort_order>
20
+ <action>adminhtml/filter/add</action>
21
+ </add>
22
+ <filters module="bumble_filter">
23
+ <title>Manage Groups</title>
24
+ <sort_order>3</sort_order>
25
+ <action>adminhtml/filter/index</action>
26
+ </filters>
27
+
28
+
29
+ <configuration translate="title" module="bumble_filter">
30
+ <title>Bumble System</title>
31
+ <sort_order>5</sort_order>
32
+ <action>adminhtml/system_config/edit/section/bumble_filter</action>
33
+ </configuration>
34
+ </children>
35
+ </filter>
36
+ </children>
37
+ </bumbleextensions>
38
+ </menu>
39
+ <acl>
40
+ <resources>
41
+ <admin>
42
+ <children>
43
+ <bumbleextensions module="bumble_filter">
44
+ <title>Bumble Extension</title>
45
+ <sort_order>50</sort_order>
46
+ <children>
47
+ <filter translate="title" module="bumble_filter">
48
+ <title>Bumble Setting</title>
49
+ <children>
50
+
51
+ <filtergroup translate="title" module="bumble_filter">
52
+ <title>Configurazione Grouppi</title>
53
+ <sort_order>1</sort_order>
54
+
55
+ </filtergroup>
56
+ <add module="bumble_filter">
57
+ <title>Aggiungi Grouppo</title>
58
+ <sort_order>2</sort_order>
59
+
60
+ </add>
61
+ <filters module="bumble_filter">
62
+ <title>Manage Grouppi</title>
63
+ <sort_order>3</sort_order>
64
+
65
+ </filters>
66
+
67
+ <configuration translate="title" module="bumble_filter">
68
+ <title>Setting</title>
69
+ <sort_order>5</sort_order>
70
+
71
+ </configuration>
72
+ </children>
73
+ </filter>
74
+ </children>
75
+ </bumbleextensions>
76
+ <system>
77
+ <children>
78
+ <config>
79
+ <children>
80
+ <bumble_filter>
81
+ <title>Bumble Filter</title>
82
+ </bumble_filter>
83
+ </children>
84
+ </config>
85
+ </children>
86
+ </system>
87
+ </children>
88
+ </admin>
89
+ </resources>
90
+ </acl>
91
+ <translate>
92
+ <modules>
93
+ <Bumble_Filter>
94
+ <files>
95
+ <default>Bumble_Filter.csv</default>
96
+ </files>
97
+ </Bumble_Filter>
98
+ </modules>
99
+ </translate>
100
+ </config>
app/code/community/Bumble/Filter/etc/config.xml ADDED
@@ -0,0 +1,201 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Bumble_Filter>
5
+ <version>1.2.0</version>
6
+ </Bumble_Filter>
7
+ </modules>
8
+ <frontend>
9
+ <translate>
10
+ <modules>
11
+ <Bumble_Filter>
12
+ <files>
13
+ <default>Bumble_Filter.csv</default>
14
+ </files>
15
+ </Bumble_Filter>
16
+ </modules>
17
+ </translate>
18
+ <routers>
19
+ <filter>
20
+ <use>standard</use>
21
+ <args>
22
+ <module>Bumble_Filter</module>
23
+ <frontName>bumblefilter</frontName>
24
+ </args>
25
+ </filter>
26
+ </routers>
27
+ <layout>
28
+ <updates>
29
+ <filter module="bumble_filter">
30
+ <file>bumble_filter.xml</file>
31
+ </filter>
32
+ </updates>
33
+ </layout>
34
+ <events>
35
+ <controller_action_layout_generate_blocks_after>
36
+ <observers>
37
+ <bumble_filter_observer>
38
+ <type>singleton</type>
39
+ <class>Bumble_Filter_Model_Observer</class>
40
+ <method>beforeRender</method>
41
+ </bumble_filter_observer>
42
+ </observers>
43
+ </controller_action_layout_generate_blocks_after>
44
+
45
+ </events>
46
+ </frontend>
47
+ <global>
48
+ <blocks>
49
+ <bumble_filter>
50
+ <class>Bumble_Filter_Block</class>
51
+ </bumble_filter>
52
+ </blocks>
53
+ <models>
54
+ <bumble_filter>
55
+ <class>Bumble_Filter_Model</class>
56
+ <resourceModel>bumble_filter_mysql4</resourceModel>
57
+ </bumble_filter>
58
+ <bumble_filter_mysql4>
59
+ <class>Bumble_Filter_Model_Mysql4</class>
60
+ <entities>
61
+ <group>
62
+ <table>bumble_filter_group</table>
63
+ </group>
64
+ <group_store>
65
+ <table>bumble_filter_group_store</table>
66
+ </group_store>
67
+ <filter>
68
+ <table>bumble_filter_filter</table>
69
+ </filter>
70
+ <filter_store>
71
+ <table>bumble_filter_filter_store</table>
72
+ </filter_store>
73
+ </entities>
74
+ </bumble_filter_mysql4>
75
+ </models>
76
+ <helpers>
77
+ <bumble_filter>
78
+ <class>Bumble_Filter_Helper</class>
79
+ </bumble_filter>
80
+ </helpers>
81
+ <resources>
82
+ <bumble_filter_setup>
83
+ <setup>
84
+ <module>Bumble_Filter</module>
85
+
86
+ </setup>
87
+ <connection>
88
+ <use>core_setup</use>
89
+ </connection>
90
+ </bumble_filter_setup>
91
+ <bumble_filter_write>
92
+ <connection>
93
+ <use>core_write</use>
94
+ </connection>
95
+ </bumble_filter_write>
96
+ <bumble_filter_read>
97
+ <connection>
98
+ <use>core_read</use>
99
+ </connection>
100
+ </bumble_filter_read>
101
+ </resources>
102
+ <events>
103
+
104
+
105
+ <controller_front_init_routers>
106
+ <observers>
107
+ <bumble_filter_observer>
108
+ <type>singleton</type>
109
+ <class>Bumble_Filter_Model_Observer</class>
110
+ <method>initControllerRouters</method>
111
+ </bumble_filter_observer>
112
+ </observers>
113
+ </controller_front_init_routers>
114
+ </events>
115
+ </global>
116
+ <admin>
117
+ <routers>
118
+ <filter>
119
+ <use>admin</use>
120
+ <args>
121
+ <module>Bumble_Filter</module>
122
+ <frontName>filter</frontName>
123
+ </args>
124
+ </filter>
125
+ <adminhtml>
126
+ <args>
127
+ <modules>
128
+ <Bumble_Filter after="Mage_Adminhtml">Bumble_Filter_Adminhtml</Bumble_Filter>
129
+ </modules>
130
+ </args>
131
+ </adminhtml>
132
+ </routers>
133
+ </admin>
134
+ <adminhtml>
135
+ <translate>
136
+ <modules>
137
+ <Bumble_Filter>
138
+ <files>
139
+ <default>Bumble_Filter.csv</default>
140
+ </files>
141
+ </Bumble_Filter>
142
+ </modules>
143
+ </translate>
144
+ </adminhtml>
145
+
146
+ <default>
147
+ <bumble_filter>
148
+ <general_setting>
149
+ <show>1</show>
150
+ <theme>default</theme>
151
+ <listing_layout>grid</listing_layout>
152
+ <list_limit>10</list_limit>
153
+ <enable_jquery>0</enable_jquery>
154
+ <title>Bumble Filter</title>
155
+ <theme>default</theme>
156
+ <extension>html</extension>
157
+ <filter_imagesize>Auto</filter_imagesize>
158
+ <prod_imagesize>Auto</prod_imagesize>
159
+ <enable_icon>1</enable_icon>
160
+ </general_setting>
161
+ <module_setting>
162
+ <filter_group>0</filter_group>
163
+ <enable_filternavmodule>1</enable_filternavmodule>
164
+
165
+ <filternav_title>Filter Categories</filternav_title>
166
+
167
+
168
+ </module_setting>
169
+ <carousel_setting>
170
+ <enable_owl_carousel>0</enable_owl_carousel>
171
+ <showarrow>1</showarrow>
172
+ <slide_col>3</slide_col>
173
+ <interval>3000</interval>
174
+ <show_dots>1</show_dots>
175
+ <slide_by>1</slide_by>
176
+ <autoplay>1</autoplay>
177
+
178
+ <showarrow_resp_1024>1</showarrow_resp_1024>
179
+ <slide_col_resp_1024>3</slide_col_resp_1024>
180
+ <interval_resp_1024>3000</interval_resp_1024>
181
+ <show_dots_resp_1024>1</show_dots_resp_1024>
182
+ <slide_by_resp_1024>1</slide_by_resp_1024>
183
+ <autoplay_resp_1024>1</autoplay_resp_1024>
184
+
185
+ <showarrow_resp_600>1</showarrow_resp_600>
186
+ <slide_col_resp_600>3</slide_col_resp_600>
187
+ <interval_resp_600>3000</interval_resp_600>
188
+ <show_dots_resp_600>1</show_dots_resp_600>
189
+ <slide_by_resp_600>1</slide_by_resp_600>
190
+ <autoplay_resp_600>1</autoplay_resp_600>
191
+
192
+ <showarrow_resp_480>1</showarrow_resp_480>
193
+ <slide_col_resp_480>1</slide_col_resp_480>
194
+ <interval_resp_480>3000</interval_resp_480>
195
+ <show_dots_resp_480>0</show_dots_resp_480>
196
+ <slide_by_resp_480>1</slide_by_resp_480>
197
+ <autoplay_resp_480>1</autoplay_resp_480>
198
+ </carousel_setting>
199
+ </bumble_filter>
200
+ </default>
201
+ </config>
app/code/community/Bumble/Filter/etc/system.xml ADDED
@@ -0,0 +1,500 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <tabs>
4
+ <bumble translate="label" module="bumble_filter">
5
+ <label><![CDATA[<div style="position: absolute;"><img id="magepal_block" src="" alt="" border="0" /></div>&nbsp;<script>$('magepal_block').src = "/skin/adminhtml/default/default/images/bumble/bumble.png";</script>]]></label>
6
+ <sort_order>211</sort_order>
7
+ </bumble>
8
+ </tabs>
9
+ <sections>
10
+ <bumble_filter>
11
+ <label>Bumble Extension</label>
12
+ <tab>bumble</tab>
13
+ <frontend_type>text</frontend_type>
14
+ <sort_order>10</sort_order>
15
+ <show_in_default>1</show_in_default>
16
+ <show_in_website>1</show_in_website>
17
+ <show_in_store>1</show_in_store>
18
+ <groups>
19
+
20
+
21
+ <general_setting translate="label">
22
+ <label>General Setting</label>
23
+ <frontend_type>text</frontend_type>
24
+ <sort_order>1000</sort_order>
25
+ <show_in_default>1</show_in_default>
26
+ <show_in_website>1</show_in_website>
27
+ <show_in_store>1</show_in_store>
28
+ <fields>
29
+
30
+ <show translate="label" module="core">
31
+ <label>Enabled</label>
32
+ <sort_order>10</sort_order>
33
+ <frontend_type>select</frontend_type>
34
+ <source_model>adminhtml/system_config_source_yesno</source_model>
35
+ <backend_model>bumble_filter/system_config_backend_filter_cache</backend_model>
36
+ <show_in_default>1</show_in_default>
37
+ <show_in_website>1</show_in_website>
38
+ <show_in_store>1</show_in_store>
39
+ </show>
40
+ <listing_layout translate="label">
41
+ <label>Layout Of Groups List Page</label>
42
+ <frontend_type>select</frontend_type>
43
+ <source_model>bumble_filter/system_config_source_listLayouts</source_model>
44
+ <sort_order>25</sort_order>
45
+ <comment>Choose how show the List Page</comment>
46
+ <show_in_default>1</show_in_default>
47
+ <show_in_website>1</show_in_website>
48
+ <show_in_store>1</show_in_store>
49
+ </listing_layout>
50
+ <list_limit translate="label">
51
+ <label>Limit Items On Listing Page</label>
52
+ <frontend_type>text</frontend_type>
53
+ <sort_order>30</sort_order>
54
+ <comment>Limit Items Show On Groups Listing Page</comment>
55
+ <show_in_default>1</show_in_default>
56
+ <show_in_website>1</show_in_website>
57
+ <show_in_store>1</show_in_store>
58
+ </list_limit>
59
+ <spacer_1 translate="label">
60
+ <label>CONFIG FOR GRID LAYOUT</label>
61
+ <frontend_type>label</frontend_type>
62
+ <frontend_model>bumble_filter/system_config_form_field_spacer</frontend_model>
63
+ <sort_order>35</sort_order>
64
+ <show_in_default>1</show_in_default>
65
+ <show_in_website>0</show_in_website>
66
+ <show_in_store>0</show_in_store>
67
+ </spacer_1>
68
+ <grid_col_ls translate="label" module="core">
69
+ <label>Columns in Large Screen</label>
70
+ <comment>Choose Number column will show in grid mode</comment>
71
+ <sort_order>45</sort_order>
72
+ <frontend_type>select</frontend_type>
73
+ <source_model>bumble_filter/system_config_source_listcolumns</source_model>
74
+ <show_in_default>1</show_in_default>
75
+ <show_in_website>1</show_in_website>
76
+ <show_in_store>1</show_in_store>
77
+ </grid_col_ls>
78
+ <grid_col_ms translate="label" module="core">
79
+ <label>Columns In Medium Screen</label>
80
+ <comment>Choose Number column will show in grid mode</comment>
81
+ <sort_order>55</sort_order>
82
+ <frontend_type>select</frontend_type>
83
+ <source_model>bumble_filter/system_config_source_listcolumns</source_model>
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
+ </grid_col_ms>
88
+ <grid_col_ss translate="label" module="core">
89
+ <label>Columns In Small Screen</label>
90
+ <comment>Choose Number column will show in grid mode</comment>
91
+ <sort_order>65</sort_order>
92
+ <frontend_type>select</frontend_type>
93
+ <source_model>bumble_filter/system_config_source_listcolumns</source_model>
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
+ </grid_col_ss>
98
+ <grid_col_mss translate="label" module="core">
99
+ <label>Columns In Mini Small Screen</label>
100
+ <comment>Choose Number column will show in grid mode</comment>
101
+ <sort_order>75</sort_order>
102
+ <frontend_type>select</frontend_type>
103
+ <source_model>bumble_filter/system_config_source_listcolumns</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
+ </grid_col_mss>
108
+ <spacer_2 translate="label">
109
+ <label>Set Width and Height for Images</label>
110
+ <frontend_type>label</frontend_type>
111
+ <frontend_model>bumble_filter/system_config_form_field_spacer</frontend_model>
112
+ <sort_order>85</sort_order>
113
+ <show_in_default>1</show_in_default>
114
+ <show_in_website>0</show_in_website>
115
+ <show_in_store>0</show_in_store>
116
+ </spacer_2>
117
+ <filter_imagesize translate="label">
118
+ <label>Image Size, it is used in Group list</label>
119
+ <frontend_type>text</frontend_type>
120
+ <sort_order>95</sort_order>
121
+ <comment>Formart WidthxHeight, for example: 600x250 o Auto for basic formart</comment>
122
+ <show_in_default>1</show_in_default>
123
+ <show_in_website>1</show_in_website>
124
+ <show_in_store>1</show_in_store>
125
+ </filter_imagesize>
126
+ <prod_imagesize translate="label">
127
+ <label>Image Size, it is used in Product list</label>
128
+ <frontend_type>text</frontend_type>
129
+ <sort_order>97</sort_order>
130
+ <comment>Formart WidthxHeight, for example: 600x250 o Auto for basic formart</comment>
131
+ <show_in_default>1</show_in_default>
132
+ <show_in_website>1</show_in_website>
133
+ <show_in_store>1</show_in_store>
134
+ </prod_imagesize>
135
+ </fields>
136
+ </general_setting>
137
+ <module_setting>
138
+ <label>Modules Setting</label>
139
+ <frontend_type>text</frontend_type>
140
+ <sort_order>2003</sort_order>
141
+ <show_in_default>1</show_in_default>
142
+ <show_in_website>1</show_in_website>
143
+ <show_in_store>1</show_in_store>
144
+ <fields>
145
+
146
+ <filter_group translate="label" module="core">
147
+ <label>Filter by Group</label>
148
+ <sort_order>104</sort_order>
149
+ <frontend_type>multiselect</frontend_type>
150
+ <source_model>bumble_filter/system_config_source_listGroup</source_model>
151
+ <comment>Choose Group/s to show on Navigator</comment>
152
+ <show_in_default>1</show_in_default>
153
+ <show_in_website>1</show_in_website>
154
+ <show_in_store>1</show_in_store>
155
+ </filter_group>
156
+
157
+ <spacer_1000 translate="label">
158
+ <label>Group Navigator Module</label>
159
+ <frontend_type>label</frontend_type>
160
+ <frontend_model>bumble_filter/system_config_form_field_spacer</frontend_model>
161
+ <sort_order>100</sort_order>
162
+ <show_in_default>1</show_in_default>
163
+ <show_in_website>0</show_in_website>
164
+ <show_in_store>0</show_in_store>
165
+ </spacer_1000>
166
+ <enable_filternavmodule translate="label" module="core">
167
+ <label>Enable Navigator Module</label>
168
+ <sort_order>102</sort_order>
169
+ <frontend_type>select</frontend_type>
170
+ <source_model>adminhtml/system_config_source_yesno</source_model>
171
+ <show_in_default>1</show_in_default>
172
+ <show_in_website>1</show_in_website>
173
+ <show_in_store>1</show_in_store>
174
+ </enable_filternavmodule>
175
+ <filternav_title translate="label" module="core">
176
+ <label>Group Navigator Title</label>
177
+ <sort_order>103</sort_order>
178
+ <frontend_type>text</frontend_type>
179
+
180
+ <show_in_default>1</show_in_default>
181
+ <show_in_website>1</show_in_website>
182
+ <show_in_store>1</show_in_store>
183
+ </filternav_title>
184
+
185
+ </fields>
186
+
187
+ </module_setting>
188
+ <carousel_setting>
189
+ <label>Owl Carousel Settings</label>
190
+ <frontend_type>text</frontend_type>
191
+ <sort_order>5555</sort_order>
192
+ <show_in_default>1</show_in_default>
193
+ <show_in_website>1</show_in_website>
194
+ <show_in_store>1</show_in_store>
195
+ <fields>
196
+ <enable_owl_carousel>
197
+ <label>Use OWL Carousel</label>
198
+ <frontend_type>select</frontend_type>
199
+ <source_model>adminhtml/system_config_source_yesno</source_model>
200
+ <sort_order>0</sort_order>
201
+ <show_in_default>1</show_in_default>
202
+ <show_in_website>1</show_in_website>
203
+ <show_in_store>1</show_in_store>
204
+ </enable_owl_carousel>
205
+
206
+ <filter_group>
207
+ <label>Filter by Group</label>
208
+ <frontend_type>select</frontend_type>
209
+ <source_model>bumble_filter/system_config_source_listGroup</source_model>
210
+ <sort_order>2</sort_order>
211
+ <show_in_default>1</show_in_default>
212
+ <show_in_website>1</show_in_website>
213
+ <show_in_store>1</show_in_store>
214
+ </filter_group>
215
+ <slide_col>
216
+ <label>Columns show</label>
217
+ <frontend_type>text</frontend_type>
218
+ <comment>Columns to show on frontend. Default: 3 columns</comment>
219
+ <sort_order>60</sort_order>
220
+ <show_in_default>1</show_in_default>
221
+ <show_in_website>1</show_in_website>
222
+ <show_in_store>1</show_in_store>
223
+ </slide_col>
224
+ <slide_by>
225
+ <label>Slide By</label>
226
+ <frontend_type>text</frontend_type>
227
+ <comment>Number Items will slide on a time. Default: 1</comment>
228
+ <sort_order>62</sort_order>
229
+ <show_in_default>1</show_in_default>
230
+ <show_in_website>1</show_in_website>
231
+ <show_in_store>1</show_in_store>
232
+ </slide_by>
233
+ <showarrow>
234
+ <label>Show Arrow</label>
235
+ <frontend_type>select</frontend_type>
236
+ <source_model>adminhtml/system_config_source_yesno</source_model>
237
+ <sort_order>65</sort_order>
238
+ <show_in_default>1</show_in_default>
239
+ <show_in_website>1</show_in_website>
240
+ <show_in_store>1</show_in_store>
241
+ </showarrow>
242
+
243
+ <autoplay>
244
+ <label>Autoplay</label>
245
+ <frontend_type>select</frontend_type>
246
+ <source_model>adminhtml/system_config_source_yesno</source_model>
247
+ <sort_order>70</sort_order>
248
+ <show_in_default>1</show_in_default>
249
+ <show_in_website>1</show_in_website>
250
+ <show_in_store>1</show_in_store>
251
+ </autoplay>
252
+ <interval>
253
+ <label>Speed</label>
254
+ <comment>Determines the duration of the transition in milliseconds. Default will be 4000 milliseconds</comment>
255
+ <frontend_type>text</frontend_type>
256
+ <sort_order>75</sort_order>
257
+ <show_in_default>1</show_in_default>
258
+ <show_in_website>1</show_in_website>
259
+ <show_in_store>1</show_in_store>
260
+ </interval>
261
+ <show_dots>
262
+ <label>Show Dots indicators</label>
263
+ <frontend_type>select</frontend_type>
264
+ <source_model>adminhtml/system_config_source_yesno</source_model>
265
+ <sort_order>80</sort_order>
266
+ <show_in_default>1</show_in_default>
267
+ <show_in_website>1</show_in_website>
268
+ <show_in_store>1</show_in_store>
269
+ </show_dots>
270
+ <!-- Responsive 1024 -->
271
+ <label_resp_1024>
272
+ <label>Carousel Responsive 1024</label>
273
+ <frontend_type>label</frontend_type>
274
+ <frontend_model>bumble_filter/system_config_form_field_responsive1024</frontend_model>
275
+ <sort_order>82</sort_order>
276
+ <show_in_default>1</show_in_default>
277
+ <show_in_website>1</show_in_website>
278
+ <show_in_store>1</show_in_store>
279
+ </label_resp_1024>
280
+ <slide_col_resp_1024>
281
+ <label>Columns show</label>
282
+ <frontend_type>text</frontend_type>
283
+ <comment>Columns to show on frontend. Default: 3 columns</comment>
284
+ <sort_order>85</sort_order>
285
+ <show_in_default>1</show_in_default>
286
+ <show_in_website>1</show_in_website>
287
+ <show_in_store>1</show_in_store>
288
+ </slide_col_resp_1024>
289
+ <slide_by_resp_1024>
290
+ <label>Slide By</label>
291
+ <frontend_type>text</frontend_type>
292
+ <comment>Number Items will slide on a time. Default: 1</comment>
293
+ <sort_order>90</sort_order>
294
+ <show_in_default>1</show_in_default>
295
+ <show_in_website>1</show_in_website>
296
+ <show_in_store>1</show_in_store>
297
+ </slide_by_resp_1024>
298
+ <showarrow_resp_1024>
299
+ <label>Show Arrow</label>
300
+ <frontend_type>select</frontend_type>
301
+ <source_model>adminhtml/system_config_source_yesno</source_model>
302
+ <sort_order>95</sort_order>
303
+ <show_in_default>1</show_in_default>
304
+ <show_in_website>1</show_in_website>
305
+ <show_in_store>1</show_in_store>
306
+ </showarrow_resp_1024>
307
+
308
+ <autoplay_resp_1024>
309
+ <label>Autoplay</label>
310
+ <frontend_type>select</frontend_type>
311
+ <source_model>adminhtml/system_config_source_yesno</source_model>
312
+ <sort_order>100</sort_order>
313
+ <show_in_default>1</show_in_default>
314
+ <show_in_website>1</show_in_website>
315
+ <show_in_store>1</show_in_store>
316
+ </autoplay_resp_1024>
317
+ <interval_resp_1024>
318
+ <label>Speed</label>
319
+ <comment>Determines the duration of the transition in milliseconds. Default will be 4000 milliseconds</comment>
320
+ <frontend_type>text</frontend_type>
321
+ <sort_order>110</sort_order>
322
+ <show_in_default>1</show_in_default>
323
+ <show_in_website>1</show_in_website>
324
+ <show_in_store>1</show_in_store>
325
+ </interval_resp_1024>
326
+ <show_dots_resp_1024>
327
+ <label>Show Dots indicators</label>
328
+ <frontend_type>select</frontend_type>
329
+ <source_model>adminhtml/system_config_source_yesno</source_model>
330
+ <sort_order>120</sort_order>
331
+ <show_in_default>1</show_in_default>
332
+ <show_in_website>1</show_in_website>
333
+ <show_in_store>1</show_in_store>
334
+ </show_dots_resp_1024>
335
+ <!-- Responsive 600 -->
336
+ <label_resp_600>
337
+ <label>Carousel Responsive 600</label>
338
+ <frontend_type>label</frontend_type>
339
+ <frontend_model>bumble_filter/system_config_form_field_responsive600</frontend_model>
340
+ <sort_order>125</sort_order>
341
+ <show_in_default>1</show_in_default>
342
+ <show_in_website>1</show_in_website>
343
+ <show_in_store>1</show_in_store>
344
+ </label_resp_600>
345
+ <slide_col_resp_600>
346
+ <label>Columns show</label>
347
+ <frontend_type>text</frontend_type>
348
+ <comment>Columns to show on frontend. Default: 3 columns</comment>
349
+ <sort_order>130</sort_order>
350
+ <show_in_default>1</show_in_default>
351
+ <show_in_website>1</show_in_website>
352
+ <show_in_store>1</show_in_store>
353
+ </slide_col_resp_600>
354
+ <slide_by_resp_600>
355
+ <label>Slide By</label>
356
+ <frontend_type>text</frontend_type>
357
+ <comment>Number Items will slide on a time. Default: 1</comment>
358
+ <sort_order>140</sort_order>
359
+ <show_in_default>1</show_in_default>
360
+ <show_in_website>1</show_in_website>
361
+ <show_in_store>1</show_in_store>
362
+ </slide_by_resp_600>
363
+ <showarrow_resp_600>
364
+ <label>Show Arrow</label>
365
+ <frontend_type>select</frontend_type>
366
+ <source_model>adminhtml/system_config_source_yesno</source_model>
367
+ <sort_order>150</sort_order>
368
+ <show_in_default>1</show_in_default>
369
+ <show_in_website>1</show_in_website>
370
+ <show_in_store>1</show_in_store>
371
+ </showarrow_resp_600>
372
+
373
+ <autoplay_resp_600>
374
+ <label>Autoplay</label>
375
+ <frontend_type>select</frontend_type>
376
+ <source_model>adminhtml/system_config_source_yesno</source_model>
377
+ <sort_order>160</sort_order>
378
+ <show_in_default>1</show_in_default>
379
+ <show_in_website>1</show_in_website>
380
+ <show_in_store>1</show_in_store>
381
+ </autoplay_resp_600>
382
+ <interval_resp_600>
383
+ <label>Speed</label>
384
+ <comment>Determines the duration of the transition in milliseconds. Default will be 4000 milliseconds</comment>
385
+ <frontend_type>text</frontend_type>
386
+ <sort_order>170</sort_order>
387
+ <show_in_default>1</show_in_default>
388
+ <show_in_website>1</show_in_website>
389
+ <show_in_store>1</show_in_store>
390
+ </interval_resp_600>
391
+ <show_dots_resp_600>
392
+ <label>Show Dots indicators</label>
393
+ <frontend_type>select</frontend_type>
394
+ <source_model>adminhtml/system_config_source_yesno</source_model>
395
+ <sort_order>180</sort_order>
396
+ <show_in_default>1</show_in_default>
397
+ <show_in_website>1</show_in_website>
398
+ <show_in_store>1</show_in_store>
399
+ </show_dots_resp_600>
400
+ <!-- Responsive 480 -->
401
+ <label_resp_480>
402
+ <label>Carousel Responsive 480</label>
403
+ <frontend_type>label</frontend_type>
404
+ <frontend_model>bumble_filter/system_config_form_field_responsive480</frontend_model>
405
+ <sort_order>185</sort_order>
406
+ <show_in_default>1</show_in_default>
407
+ <show_in_website>1</show_in_website>
408
+ <show_in_store>1</show_in_store>
409
+ </label_resp_480>
410
+ <slide_col_resp_480>
411
+ <label>Columns show</label>
412
+ <frontend_type>text</frontend_type>
413
+ <comment>Columns to show on frontend. Default: 3 columns</comment>
414
+ <sort_order>190</sort_order>
415
+ <show_in_default>1</show_in_default>
416
+ <show_in_website>1</show_in_website>
417
+ <show_in_store>1</show_in_store>
418
+ </slide_col_resp_480>
419
+ <slide_by_resp_480>
420
+ <label>Slide By</label>
421
+ <frontend_type>text</frontend_type>
422
+ <comment>Number Items will slide on a time. Default: 1</comment>
423
+ <sort_order>200</sort_order>
424
+ <show_in_default>1</show_in_default>
425
+ <show_in_website>1</show_in_website>
426
+ <show_in_store>1</show_in_store>
427
+ </slide_by_resp_480>
428
+ <showarrow_resp_480>
429
+ <label>Show Arrow</label>
430
+ <frontend_type>select</frontend_type>
431
+ <source_model>adminhtml/system_config_source_yesno</source_model>
432
+ <sort_order>210</sort_order>
433
+ <show_in_default>1</show_in_default>
434
+ <show_in_website>1</show_in_website>
435
+ <show_in_store>1</show_in_store>
436
+ </showarrow_resp_480>
437
+
438
+ <autoplay_resp_480>
439
+ <label>Autoplay</label>
440
+ <frontend_type>select</frontend_type>
441
+ <source_model>adminhtml/system_config_source_yesno</source_model>
442
+ <sort_order>220</sort_order>
443
+ <show_in_default>1</show_in_default>
444
+ <show_in_website>1</show_in_website>
445
+ <show_in_store>1</show_in_store>
446
+ </autoplay_resp_480>
447
+ <interval_resp_480>
448
+ <label>Speed</label>
449
+ <comment>Determines the duration of the transition in milliseconds. Default will be 4000 milliseconds</comment>
450
+ <frontend_type>text</frontend_type>
451
+ <sort_order>230</sort_order>
452
+ <show_in_default>1</show_in_default>
453
+ <show_in_website>1</show_in_website>
454
+ <show_in_store>1</show_in_store>
455
+ </interval_resp_480>
456
+ <show_dots_resp_480>
457
+ <label>Show Dots indicators</label>
458
+ <frontend_type>select</frontend_type>
459
+ <source_model>adminhtml/system_config_source_yesno</source_model>
460
+ <sort_order>240</sort_order>
461
+ <show_in_default>1</show_in_default>
462
+ <show_in_website>1</show_in_website>
463
+ <show_in_store>1</show_in_store>
464
+ </show_dots_resp_480>
465
+ </fields>
466
+ </carousel_setting>
467
+ <!-- Information -->
468
+ <advanded_parameter>
469
+ <label>Information - Support</label>
470
+ <frontend_type>text</frontend_type>
471
+ <sort_order>6003</sort_order>
472
+ <show_in_default>1</show_in_default>
473
+ <show_in_website>1</show_in_website>
474
+ <show_in_store>1</show_in_store>
475
+ <fields>
476
+ <help_code translate="label">
477
+ <label>Set Module Visable On Pages, Position</label>
478
+ <frontend_type>label</frontend_type>
479
+ <frontend_model>bumble_filter/system_config_form_field_helpcode</frontend_model>
480
+ <sort_order>70</sort_order>
481
+ <show_in_default>1</show_in_default>
482
+ <show_in_website>0</show_in_website>
483
+ <show_in_store>0</show_in_store>
484
+ </help_code>
485
+ <module_information translate="label">
486
+ <label>Set Module Visable On Pages, Position</label>
487
+ <frontend_type>label</frontend_type>
488
+ <frontend_model>bumble_filter/system_config_form_field_information</frontend_model>
489
+ <sort_order>100</sort_order>
490
+ <show_in_default>1</show_in_default>
491
+ <show_in_website>0</show_in_website>
492
+ <show_in_store>0</show_in_store>
493
+ </module_information>
494
+
495
+ </fields>
496
+ </advanded_parameter>
497
+ </groups>
498
+ </bumble_filter>
499
+ </sections>
500
+ </config>
app/code/community/Bumble/Filter/etc/widget.xml ADDED
@@ -0,0 +1,381 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <widgets>
3
+
4
+ <!-- Widget scroll filters-->
5
+ <widget_filter_scroll type="bumble_filter/widget_carousel">
6
+ <name>Bumble Carousel</name>
7
+ <description>Create a Carousel Of your Group/s</description>
8
+ <parameters>
9
+ <spacer_1 translate="label">
10
+ <label>General Setting</label>
11
+ <type>bumble_filter/system_config_form_field_heading</type>
12
+ <sort_order>1</sort_order>
13
+ <visible>1</visible>
14
+ <description></description>
15
+ </spacer_1>
16
+
17
+ <filter_group translate="label" module="core">
18
+ <label>Filter Group</label>
19
+ <sort_order>2</sort_order>
20
+ <type>select</type>
21
+ <source_model>bumble_filter/system_config_source_listGroup</source_model>
22
+ <description>Choose Group to show on frontend.</description>
23
+ <visible>1</visible>
24
+ </filter_group>
25
+
26
+ <slide_by>
27
+ <label>Slide By</label>
28
+ <type>text</type>
29
+ <description>Number Items will slide on a time. Default: 1</description>
30
+ <sort_order>3</sort_order>
31
+ <visible>1</visible>
32
+ <value>1</value>
33
+ </slide_by>
34
+
35
+ <slide_col>
36
+ <label>Columns show</label>
37
+ <type>text</type>
38
+ <description>Width of each slide. Set field without unit px. Default: 245px</description>
39
+ <sort_order>4</sort_order>
40
+ <visible>1</visible>
41
+ <value>3</value>
42
+ </slide_col>
43
+
44
+ <autoplay>
45
+ <label>Autoplay</label>
46
+ <type>select</type>
47
+ <values>
48
+ <yes translate="label">
49
+ <label>Yes</label>
50
+ <value>true</value>
51
+ </yes>
52
+ <no translate="label">
53
+ <label>No</label>
54
+ <value>false</value>
55
+ </no>
56
+ </values>
57
+ <sort_order>5</sort_order>
58
+ <visible>1</visible>
59
+ <value>true</value>
60
+ </autoplay>
61
+
62
+ <showarrow>
63
+ <visible>1</visible>
64
+ <label>Show Arrow</label>
65
+ <type>select</type>
66
+ <values>
67
+ <yes translate="label">
68
+ <label>Yes</label>
69
+ <value>true</value>
70
+ </yes>
71
+ <no translate="label">
72
+ <label>No</label>
73
+ <value>false</value>
74
+ </no>
75
+ </values>
76
+ <sort_order>6</sort_order>
77
+ <value>true</value>
78
+ </showarrow>
79
+
80
+ <show_dots>
81
+ <label>Show Dots indicators</label>
82
+ <type>select</type>
83
+ <values>
84
+ <yes translate="label">
85
+ <label>Yes</label>
86
+ <value>true</value>
87
+ </yes>
88
+ <no translate="label">
89
+ <label>No</label>
90
+ <value>false</value>
91
+ </no>
92
+ </values>
93
+ <sort_order>6</sort_order>
94
+ <visible>1</visible>
95
+ <value>true</value>
96
+ </show_dots>
97
+
98
+ <interval>
99
+ <visible>1</visible>
100
+ <label>Speed</label>
101
+ <comment>Determines the duration of the transition in milliseconds. Default will be 4000 milliseconds</comment>
102
+ <type>text</type>
103
+ <sort_order>7</sort_order>
104
+ <value>4000</value>
105
+ </interval>
106
+
107
+
108
+ <!-- Responsive 1024 -->
109
+ <spacer_2 translate="label">
110
+ <label>General Setting</label>
111
+ <type>bumble_filter/system_config_form_field_responsive1024</type>
112
+ <sort_order>8</sort_order>
113
+ <visible>1</visible>
114
+ <description></description>
115
+ </spacer_2>
116
+
117
+ <slide_by_resp_1024>
118
+ <label>Slide By</label>
119
+ <type>text</type>
120
+ <description>Number Items will slide on a time. Default: 1</description>
121
+ <sort_order>9</sort_order>
122
+ <visible>1</visible>
123
+ <value>1</value>
124
+ </slide_by_resp_1024>
125
+
126
+ <slide_col_resp_1024>
127
+ <label>Columns show</label>
128
+ <type>text</type>
129
+ <description>Width of each slide. Set field without unit px. Default: 245px</description>
130
+ <sort_order>10</sort_order>
131
+ <visible>1</visible>
132
+ <value>3</value>
133
+ </slide_col_resp_1024>
134
+
135
+ <autoplay_resp_1024>
136
+ <label>Autoplay</label>
137
+ <type>select</type>
138
+ <values>
139
+ <yes translate="label">
140
+ <label>Yes</label>
141
+ <value>true</value>
142
+ </yes>
143
+ <no translate="label">
144
+ <label>No</label>
145
+ <value>false</value>
146
+ </no>
147
+ </values>
148
+ <sort_order>11</sort_order>
149
+ <visible>1</visible>
150
+ <value>true</value>
151
+ </autoplay_resp_1024>
152
+
153
+ <showarrow_resp_1024>
154
+ <visible>1</visible>
155
+ <label>Show Arrow</label>
156
+ <type>select</type>
157
+ <values>
158
+ <yes translate="label">
159
+ <label>Yes</label>
160
+ <value>true</value>
161
+ </yes>
162
+ <no translate="label">
163
+ <label>No</label>
164
+ <value>false</value>
165
+ </no>
166
+ </values>
167
+ <sort_order>20</sort_order>
168
+ <value>true</value>
169
+ </showarrow_resp_1024>
170
+
171
+ <show_dots_resp_1024>
172
+ <label>Show Dots indicators</label>
173
+ <type>select</type>
174
+ <values>
175
+ <yes translate="label">
176
+ <label>Yes</label>
177
+ <value>true</value>
178
+ </yes>
179
+ <no translate="label">
180
+ <label>No</label>
181
+ <value>false</value>
182
+ </no>
183
+ </values>
184
+ <sort_order>22</sort_order>
185
+ <visible>1</visible>
186
+ <value>true</value>
187
+ </show_dots_resp_1024>
188
+
189
+ <interval_resp_1024>
190
+ <visible>1</visible>
191
+ <label>Speed</label>
192
+ <comment>Determines the duration of the transition in milliseconds. Default will be 4000 milliseconds</comment>
193
+ <type>text</type>
194
+ <sort_order>30</sort_order>
195
+ <value>4000</value>
196
+ </interval_resp_1024>
197
+
198
+ <!-- Responsive 600 -->
199
+ <spacer_3 translate="label">
200
+ <label>General Setting</label>
201
+ <type>bumble_filter/system_config_form_field_responsive600</type>
202
+ <sort_order>40</sort_order>
203
+ <visible>1</visible>
204
+ <description></description>
205
+ </spacer_3>
206
+
207
+ <slide_by_resp_600>
208
+ <label>Slide By</label>
209
+ <type>text</type>
210
+ <description>Number Items will slide on a time. Default: 1</description>
211
+ <sort_order>50</sort_order>
212
+ <visible>1</visible>
213
+ <value>1</value>
214
+ </slide_by_resp_600>
215
+
216
+ <slide_col_resp_600>
217
+ <label>Columns show</label>
218
+ <type>text</type>
219
+ <description>Width of each slide. Set field without unit px. Default: 245px</description>
220
+ <sort_order>60</sort_order>
221
+ <visible>1</visible>
222
+ <value>3</value>
223
+ </slide_col_resp_600>
224
+
225
+ <autoplay_resp_600>
226
+ <label>Autoplay</label>
227
+ <type>select</type>
228
+ <values>
229
+ <yes translate="label">
230
+ <label>Yes</label>
231
+ <value>true</value>
232
+ </yes>
233
+ <no translate="label">
234
+ <label>No</label>
235
+ <value>false</value>
236
+ </no>
237
+ </values>
238
+ <sort_order>70</sort_order>
239
+ <visible>1</visible>
240
+ <value>true</value>
241
+ </autoplay_resp_600>
242
+
243
+ <showarrow_resp_600>
244
+ <visible>1</visible>
245
+ <label>Show Arrow</label>
246
+ <type>select</type>
247
+ <values>
248
+ <yes translate="label">
249
+ <label>Yes</label>
250
+ <value>true</value>
251
+ </yes>
252
+ <no translate="label">
253
+ <label>No</label>
254
+ <value>false</value>
255
+ </no>
256
+ </values>
257
+ <sort_order>80</sort_order>
258
+ <value>true</value>
259
+ </showarrow_resp_600>
260
+
261
+ <show_dots_resp_600>
262
+ <label>Show Dots indicators</label>
263
+ <type>select</type>
264
+ <values>
265
+ <yes translate="label">
266
+ <label>Yes</label>
267
+ <value>true</value>
268
+ </yes>
269
+ <no translate="label">
270
+ <label>No</label>
271
+ <value>false</value>
272
+ </no>
273
+ </values>
274
+ <sort_order>82</sort_order>
275
+ <visible>1</visible>
276
+ <value>true</value>
277
+ </show_dots_resp_600>
278
+
279
+ <interval_resp_600>
280
+ <visible>1</visible>
281
+ <label>Speed</label>
282
+ <comment>Determines the duration of the transition in milliseconds. Default will be 4000 milliseconds</comment>
283
+ <type>text</type>
284
+ <sort_order>90</sort_order>
285
+ <value>4000</value>
286
+ </interval_resp_600>
287
+
288
+ <!-- Responsive 480 -->
289
+ <spacer_4 translate="label">
290
+ <label>General Setting</label>
291
+ <type>bumble_filter/system_config_form_field_responsive480</type>
292
+ <sort_order>100</sort_order>
293
+ <visible>1</visible>
294
+ <description></description>
295
+ </spacer_4>
296
+
297
+ <slide_by_resp_480>
298
+ <label>Slide By</label>
299
+ <type>text</type>
300
+ <description>Number Items will slide on a time. Default: 1</description>
301
+ <sort_order>110</sort_order>
302
+ <visible>1</visible>
303
+ <value>1</value>
304
+ </slide_by_resp_480>
305
+
306
+ <slide_col_resp_480>
307
+ <label>Columns show</label>
308
+ <type>text</type>
309
+ <description>Width of each slide. Set field without unit px. Default: 245px</description>
310
+ <sort_order>120</sort_order>
311
+ <visible>1</visible>
312
+ <value>3</value>
313
+ </slide_col_resp_480>
314
+
315
+ <autoplay_resp_480>
316
+ <label>Autoplay</label>
317
+ <type>select</type>
318
+ <values>
319
+ <yes translate="label">
320
+ <label>Yes</label>
321
+ <value>true</value>
322
+ </yes>
323
+ <no translate="label">
324
+ <label>No</label>
325
+ <value>false</value>
326
+ </no>
327
+ </values>
328
+ <sort_order>130</sort_order>
329
+ <visible>1</visible>
330
+ <value>true</value>
331
+ </autoplay_resp_480>
332
+
333
+ <showarrow_resp_480>
334
+ <visible>1</visible>
335
+ <label>Show Arrow</label>
336
+ <type>select</type>
337
+ <values>
338
+ <yes translate="label">
339
+ <label>Yes</label>
340
+ <value>true</value>
341
+ </yes>
342
+ <no translate="label">
343
+ <label>No</label>
344
+ <value>false</value>
345
+ </no>
346
+ </values>
347
+ <sort_order>140</sort_order>
348
+ <value>true</value>
349
+ </showarrow_resp_480>
350
+
351
+ <show_dots_resp_480>
352
+ <label>Show Dots indicators</label>
353
+ <type>select</type>
354
+ <values>
355
+ <yes translate="label">
356
+ <label>Yes</label>
357
+ <value>true</value>
358
+ </yes>
359
+ <no translate="label">
360
+ <label>No</label>
361
+ <value>false</value>
362
+ </no>
363
+ </values>
364
+ <sort_order>149</sort_order>
365
+ <visible>1</visible>
366
+ <value>true</value>
367
+ </show_dots_resp_480>
368
+
369
+ <interval_resp_480>
370
+ <visible>1</visible>
371
+ <label>Speed</label>
372
+ <comment>Determines the duration of the transition in milliseconds. Default will be 4000 milliseconds</comment>
373
+ <type>text</type>
374
+ <sort_order>150</sort_order>
375
+ <value>4000</value>
376
+ </interval_resp_480>
377
+
378
+ </parameters>
379
+ </widget_filter_scroll>
380
+
381
+ </widgets>
app/code/community/Bumble/Filter/sql/.DS_Store ADDED
Binary file
app/code/community/Bumble/Filter/sql/bumble_filter_setup/mysql4-install-1.1.0.php ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ $installer = $this;
5
+ /* @var $installer Mage_Core_Model_Resource_Setup */
6
+ $installer->startSetup();
7
+ $installer->run("
8
+
9
+ CREATE TABLE IF NOT EXISTS `{$this->getTable('bumble_filter/filter')}` (
10
+ `filter_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
11
+ `title` varchar(255) NOT NULL DEFAULT '',
12
+ `manufacturer` varchar(250) NOT NULL,
13
+ `usemanufacturer` varchar(250) NOT NULL,
14
+ `extraatt` varchar(250) NOT NULL,
15
+ `subatt` varchar(250) NOT NULL,
16
+ `category` varchar(250) NOT NULL,
17
+ `identifier` varchar(255) NOT NULL DEFAULT '',
18
+ `meta_keywords` text NOT NULL,
19
+ `meta_description` text NOT NULL,
20
+ `is_active` tinyint(1) NOT NULL DEFAULT '0',
21
+
22
+
23
+ PRIMARY KEY (`filter_id`),
24
+ UNIQUE KEY `identifier` (`identifier`)
25
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;
26
+
27
+
28
+
29
+ CREATE TABLE IF NOT EXISTS `{$this->getTable('bumble_filter/filter_store')}` (
30
+ `filter_id` int(10) unsigned NOT NULL,
31
+ `group_id` int(10) unsigned NOT NULL,
32
+ `store_id` smallint(5) unsigned NOT NULL,
33
+ PRIMARY KEY (`filter_id`,`store_id`),
34
+ CONSTRAINT `FK_ARMAH_ST` FOREIGN KEY (`filter_id`) REFERENCES `{$this->getTable('bumble_filter/filter')}` (`filter_id`) ON UPDATE CASCADE ON DELETE CASCADE,
35
+ CONSTRAINT `FK_ARMAH_VI` FOREIGN KEY (`store_id`) REFERENCES `{$this->getTable('core/store')}` (`store_id`) ON UPDATE CASCADE ON DELETE CASCADE
36
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Filter items to Stores';
37
+
38
+ ");
39
+
40
+
41
+
42
+
43
+ $installer->endSetup();
44
+
app/code/community/Bumble/Filter/sql/bumble_filter_setup/mysql4-upgrade-1.1.0-1.2.0.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $installer = $this;
4
+ /* @var $installer Mage_Core_Model_Resource_Setup */
5
+
6
+ $installer->startSetup();
7
+
8
+ $installer->run("
9
+
10
+ CREATE TABLE IF NOT EXISTS `{$this->getTable('bumble_filter/group')}`(
11
+ `group_id` int(11) NOT NULL AUTO_INCREMENT,
12
+ `filter_id` varchar(225),
13
+ `title` varchar(225),
14
+ `identifier` varchar(255) NOT NULL DEFAULT '',
15
+ `description` text NOT NULL,
16
+ `file` varchar(255) NOT NULL,
17
+ `tabs` varchar(255) NOT NULL,
18
+ `status` tinyint(1) NOT NULL DEFAULT '0',
19
+ PRIMARY KEY (`group_id`)
20
+ ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
21
+
22
+ ALTER TABLE `{$this->getTable('bumble_filter/filter')}` ADD COLUMN `group_filter_id` int(11) DEFAULT '1' AFTER `filter_id`;
23
+ ");
24
+
25
+ $installer->endSetup();
app/design/adminhtml/default/default/template/bumble_filter/filter.phtml ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="content-header">
2
+ <table cellspacing="0">
3
+ <tr>
4
+ <td style="width:90%;"><h3 class="icon-head head-filter"><?php echo Mage::helper('bumble_filter')->__('Groups Manager') ?></h3></td>
5
+ <td class="a-right">
6
+ <?php echo $this->getAddNewButtonHtml() ?>
7
+ </td>
8
+
9
+ </tr>
10
+ </table>
11
+ </div>
12
+ <?php echo $this->getStoreSwitcherHtml() ?>
13
+ <div>
14
+ <?php echo $this->getGridHtml() ?>
15
+ </div>
app/design/adminhtml/default/default/template/bumble_filter/grid.phtml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="content-header">
2
+ <table cellspacing="0">
3
+ <tr>
4
+ <td style="width:90%;"><h3 class="icon-head head-filter"><?php echo Mage::helper('bumble_filter')->__(' List Group Filter') ?></h3></td>
5
+ <td class="a-right">
6
+ <?php echo $this->getAddNewButtonHtml() ?>
7
+ </td>
8
+ <td class="a-right">
9
+ <?php echo $this->getMassRewriteCatButtonHtml() ?>
10
+ </td>
11
+
12
+ </tr>
13
+ </table>
14
+ </div>
15
+ <?php echo $this->getStoreSwitcherHtml() ?>
16
+ <div>
17
+ <?php echo $this->getGridHtml() ?>
18
+ </div>
app/design/adminhtml/default/default/template/bumble_filter/group.phtml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="content-header">
2
+ <table cellspacing="0">
3
+ <tr>
4
+ <td style="width:90%;"><h3 class="icon-head head-filter"><?php echo Mage::helper('bumble_filter')->__(' List Group Filter') ?></h3></td>
5
+ <td class="a-right">
6
+ <?php echo $this->getAddNewButtonHtml() ?>
7
+ </td>
8
+ <td class="a-right">
9
+ <?php echo $this->getMassRewriteCatButtonHtml() ?>
10
+ </td>
11
+
12
+ </tr>
13
+ </table>
14
+ </div>
15
+ <?php echo $this->getStoreSwitcherHtml() ?>
16
+ <div>
17
+ <?php echo $this->getGridHtml() ?>
18
+ </div>
app/design/frontend/base/default/layout/bumble_filter.xml ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <default>
4
+ <reference name="head">
5
+ <action method="addItem"><type>skin_css</type><name>bumble_filter/style.css</name></action>
6
+ <!--<action method="addItem"><type>skin_css</type><name>bumble_filter/widgetcarousel.css</name></action>
7
+ <action method="addJs"><script>bumble_filter/jssor.slider.min.js</script></action>-->
8
+ <action method="addItem"><type>skin_css</type><name>bumble_filter/slick.css</name></action>
9
+ <action method="addItem"><type>skin_css</type><name>bumble_filter/slick-theme.css</name></action>
10
+ <action method="addJs"><script>bumble_filter/slick.min.js</script></action>
11
+
12
+
13
+ </reference>
14
+ <reference name="left">
15
+ <block type="bumble_filter/layer_sale" name="catal.leftnav" after="currency" template="catalog/layer/view.phtml"/>
16
+ </reference>
17
+ <reference name="footerTop">
18
+ <block type="bumble_filter/scroll" before="-" name="bumble.filter" />
19
+ </reference>
20
+ </default>
21
+ <cms_index_index>
22
+ <reference name="contentTop">
23
+ <block type="bumble_filter/scroll" after="-" name="bumble.filter" />
24
+ </reference>
25
+ </cms_index_index>
26
+
27
+ <filter_filter_index>
28
+ <reference name="right">
29
+ <block type="bumble_filter/groupmenu" name="bumble.groupmenu" before="-" />
30
+ </reference>
31
+ <reference name="content">
32
+ <block type="bumble_filter/filter_list" name="arma.list">
33
+ <block type="bumble_filter/filter_toolbar" name="fdo.list.toolbar" template="bumble/filter/toolbar.phtml"/>
34
+ </block>
35
+ </reference>
36
+
37
+ <reference name="root">
38
+ <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
39
+ </reference>
40
+ </filter_filter_index>
41
+
42
+
43
+ <filter_filtergroup_view>
44
+
45
+ <reference name="right">
46
+ <block type="core/template" name="filter.right" before="-" template="page/custom.phtml" />
47
+ </reference>
48
+ <reference name="content">
49
+
50
+ <block type="bumble_filter/filter_productlist" name="c.filter.products" template="catalog/product/list.phtml">
51
+ <action method="setTemplate" >
52
+ <template>bumble/filter/filter.phtml</template>
53
+ </action>
54
+
55
+ <block type="bumble_filter/filter_productlist" name="products" template="catalog/product/list.phtml">
56
+ <block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
57
+ <block type="page/html_pager" name="product_list_toolbar_pager"/>
58
+
59
+ </block>
60
+ <action method="addColumnCountLayoutDepend"><layout>empty</layout><count>6</count></action>
61
+ <action method="addColumnCountLayoutDepend"><layout>one_column</layout><count>5</count></action>
62
+ <action method="addColumnCountLayoutDepend"><layout>two_columns_left</layout><count>4</count></action>
63
+ <action method="addColumnCountLayoutDepend"><layout>two_columns_right</layout><count>4</count></action>
64
+ <action method="addColumnCountLayoutDepend"><layout>three_columns</layout><count>3</count></action>
65
+ <action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
66
+ </block>
67
+
68
+ </block>
69
+
70
+ </reference>
71
+ <!--<reference name="content">
72
+ <block type="bumble_filter/carousel" name="cau" after="filter.products" />
73
+ </reference>-->
74
+
75
+ <reference name="root">
76
+ <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
77
+ </reference>
78
+ </filter_filtergroup_view>
79
+
80
+
81
+ <catalog_product_view>
82
+
83
+ <block type="catalog/product_view" name="product.filtericon">
84
+ <action method="setTemplate">
85
+ <template>bumble/filter/block/icon.phtml</template>
86
+ </action>
87
+ </block>
88
+ <reference name="product.info.extrahint">
89
+ <action method="insert"><block>product.filtericon</block></action>
90
+ </reference>
91
+ </catalog_product_view>
92
+
93
+
94
+ </layout>
app/design/frontend/base/default/template/bumble/filter/.DS_Store ADDED
Binary file
app/design/frontend/base/default/template/bumble/filter/block/brandnav.phtml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="block filternav-block">
2
+ <div class="block-title">
3
+ <strong><span><?php echo $this->getConfig("filternav_title"); ?></span></strong>
4
+ <?php if( ($pretext = $this->getConfig("pretext")) && !$cms ) { ?>
5
+ <div class="pretext"><?php echo $pretext;?></div>
6
+ <?php } elseif(isset($cms) && $cms != '') {
7
+ ?>
8
+ <div class="pretext"><?php echo $cms;?></div>
9
+ <?php
10
+ } ?>
11
+ </div>
12
+ <?php $filters = Mage::getModel('bumble_filter/filter')->getCollection() ?>
13
+ <div class="block-content">
14
+ <?php if( !$this->getConfig("isdropdown") ): ?>
15
+ <ul>
16
+ <?php foreach( $filters as $filter ): ?>
17
+ <li><a href="<?php echo $filter->getLink();?>" title="<?php echo $filter->getTitle();?>"><span><?php echo $filter->getTitle();?></span></a></li>
18
+ <?php endforeach; ?>
19
+ </ul>
20
+ <?php else: ?>
21
+ <select name="select-filter-nav" onchange="window.location.href=this.value">
22
+ <option value=""><?php echo $this->__("-----------");?></option>
23
+ <?php foreach( $filters as $filter ): ?>
24
+ <option value="<?php echo $filter->getLink();?>"><?php echo $filter->getTitle();?></option>
25
+ <?php endforeach; ?>
26
+ </select>
27
+ <?php endif; ?>
28
+ </div>
29
+ </div>
app/design/frontend/base/default/template/bumble/filter/block/carousel.phtml ADDED
@@ -0,0 +1,250 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ ---------------------------------------------------------------------------*/
10
+ ?>
11
+ <?php
12
+
13
+ $url= $_SERVER['HTTP_HOST'];
14
+
15
+ //RECUPERO DATI
16
+ $show_sett = Mage::getStoreConfig( 'bumble_filter/general_setting/show' );//[general_setting][fields][show]
17
+ $filter_group = Mage::getStoreConfig( 'bumble_filter/carousel_setting/filter_group' ); //filter_group
18
+ $slide_by = Mage::getStoreConfig( 'bumble_filter/carousel_setting/slide_by' ); //slide_by
19
+ $use_owl_carousel = Mage::getStoreConfig( 'bumble_filter/carousel_setting/enable_owl_carousel' ); //enable_owl_carousel
20
+ $interval = Mage::getStoreConfig( 'bumble_filter/carousel_setting/interval' ); //interval
21
+ $autoplay = Mage::getStoreConfig( 'bumble_filter/carousel_setting/autoplay' ); //autoplay
22
+ $showarrow = Mage::getStoreConfig( 'bumble_filter/carousel_setting/showarrow' ); //showarrow
23
+ $slide_col = Mage::getStoreConfig( 'bumble_filter/carousel_setting/slide_col' ); //slide_col
24
+ $show_dots = Mage::getStoreConfig( 'bumble_filter/carousel_setting/show_dots' ); //show_dots
25
+
26
+ //responsive 1024
27
+ $slide_by_resp_1024 = Mage::getStoreConfig( 'bumble_filter/carousel_setting/slide_by_resp_1024' ); //slide_by
28
+ $interval_resp_1024 = Mage::getStoreConfig( 'bumble_filter/carousel_setting/interval_resp_1024' ); //interval
29
+ $autoplay_resp_1024 = Mage::getStoreConfig( 'bumble_filter/carousel_setting/autoplay_resp_1024' ); //autoplay
30
+ $showarrow_resp_1024 = Mage::getStoreConfig( 'bumble_filter/carousel_setting/showarrow_resp_1024' ); //showarrow
31
+ $slide_col_resp_1024 = Mage::getStoreConfig( 'bumble_filter/carousel_setting/slide_col_resp_1024' ); //slide_col
32
+ $show_dots_resp_1024 = Mage::getStoreConfig( 'bumble_filter/carousel_setting/show_dots_resp_1024' ); //show_dots
33
+
34
+ //responsive 600
35
+ $slide_by_resp_600 = Mage::getStoreConfig( 'bumble_filter/carousel_setting/slide_by_resp_600' ); //slide_by
36
+ $interval_resp_600 = Mage::getStoreConfig( 'bumble_filter/carousel_setting/interval_resp_600' ); //interval
37
+ $autoplay_resp_600 = Mage::getStoreConfig( 'bumble_filter/carousel_setting/autoplay_resp_600' ); //autoplay
38
+ $showarrow_resp_600 = Mage::getStoreConfig( 'bumble_filter/carousel_setting/showarrow_resp_600' ); //showarrow
39
+ $slide_col_resp_600 = Mage::getStoreConfig( 'bumble_filter/carousel_setting/slide_col_resp_600' ); //slide_col
40
+ $show_dots_resp_600 = Mage::getStoreConfig( 'bumble_filter/carousel_setting/show_dots_resp_600' ); //show_dots
41
+
42
+ //responsive 480
43
+ $slide_by_resp_480 = Mage::getStoreConfig( 'bumble_filter/carousel_setting/slide_by_resp_480' ); //slide_by
44
+ $interval_resp_480 = Mage::getStoreConfig( 'bumble_filter/carousel_setting/interval_resp_480' ); //interval
45
+ $autoplay_resp_480 = Mage::getStoreConfig( 'bumble_filter/carousel_setting/autoplay_resp_480' ); //autoplay
46
+ $showarrow_resp_480 = Mage::getStoreConfig( 'bumble_filter/carousel_setting/showarrow_resp_480' ); //showarrow
47
+ $slide_col_resp_480 = Mage::getStoreConfig( 'bumble_filter/carousel_setting/slide_col_resp_480' ); //slide_col
48
+ $show_dots_resp_480 = Mage::getStoreConfig( 'bumble_filter/carousel_setting/show_dots_resp_480' ); //show_dots
49
+
50
+ if($showarrow == 0){
51
+ $showarrowp = 'false';
52
+ }else{
53
+ $showarrowp = 'true';
54
+ }
55
+
56
+ if($autoplay == 0){
57
+ $autoplay = 'false';
58
+ }else{
59
+ $autoplay = 'true';
60
+ }
61
+
62
+ if($show_dots == 0){
63
+ $show_dots = 'false';
64
+ }else{
65
+ $show_dots = 'true';
66
+ }
67
+
68
+ //responsive 1024
69
+ if($showarrow_resp_1024 == 0){
70
+ $showarrowp_resp_1024 = 'false';
71
+ }else{
72
+ $showarrowp_resp_1024 = 'true';
73
+ }
74
+
75
+ if($autoplay_resp_1024 == 0){
76
+ $autoplay_resp_1024 = 'false';
77
+ }else{
78
+ $autoplay_resp_1024 = 'true';
79
+ }
80
+
81
+ if($show_dots_resp_1024 == 0){
82
+ $show_dots_resp_1024 = 'false';
83
+ }else{
84
+ $show_dots_resp_1024 = 'true';
85
+ }
86
+
87
+ //responsive 600
88
+ if($showarrow_resp_600 == 0){
89
+ $showarrowp_resp_600 = 'false';
90
+ }else{
91
+ $showarrowp_resp_600 = 'true';
92
+ }
93
+
94
+ if($autoplay_resp_600 == 0){
95
+ $autoplay_resp_600 = 'false';
96
+ }else{
97
+ $autoplay_resp_600 = 'true';
98
+ }
99
+
100
+ if($show_dots_resp_600 == 0){
101
+ $show_dots_resp_600 = 'false';
102
+ }else{
103
+ $show_dots_resp_600 = 'true';
104
+ }
105
+
106
+ //responsive 480
107
+ if($showarrow_resp_480 == 0){
108
+ $showarrowp_resp_480 = 'false';
109
+ }else{
110
+ $showarrowp_resp_480 = 'true';
111
+ }
112
+
113
+ if($autoplay_resp_480 == 0){
114
+ $autoplay_resp_480 = 'false';
115
+ }else{
116
+ $autoplay_resp_480 = 'true';
117
+ }
118
+
119
+ if($show_dots_resp_480 == 0){
120
+ $show_dots_resp_480 = 'false';
121
+ }else{
122
+ $show_dots_resp_480 = 'true';
123
+ }
124
+ ?>
125
+ <script>
126
+
127
+ jQuery(document).ready(function(){
128
+ jQuery('.bumble_carousel').slick({
129
+ infinite: true,
130
+ slidesToShow: <?php echo $slide_col ?>,
131
+ slidesToScroll: <?php echo $slide_by ?>,
132
+ autoplay: <?php echo $autoplay ?>,
133
+ autoplaySpeed: <?php echo $interval ?>,
134
+ dots: <?php echo $show_dots ?>,
135
+ centerMode: true,
136
+ centerPadding:"10px",
137
+ arrows: <?php echo $showarrowp ?>,
138
+
139
+ responsive: [
140
+ {
141
+ breakpoint: 1024,
142
+ settings: {
143
+ infinite: true,
144
+ slidesToShow: <?php echo $slide_col_resp_1024 ?>,
145
+ slidesToScroll: <?php echo $slide_by_resp_1024 ?>,
146
+ autoplay: <?php echo $autoplay_resp_1024 ?>,
147
+ autoplaySpeed: <?php echo $interval_resp_1024 ?>,
148
+ dots: <?php echo $show_dots_resp_1024 ?>,
149
+ centerMode: true,
150
+ centerPadding:"10px",
151
+ arrows: <?php echo $showarrowp_resp_1024 ?>,
152
+ }
153
+ },
154
+ {
155
+ breakpoint: 600,
156
+ settings: {
157
+ infinite: true,
158
+ slidesToShow: <?php echo $slide_col_resp_600 ?>,
159
+ slidesToScroll: <?php echo $slide_by_resp_600 ?>,
160
+ autoplay: <?php echo $autoplay_resp_600 ?>,
161
+ autoplaySpeed: <?php echo $interval_resp_600 ?>,
162
+ dots: <?php echo $show_dots_resp_600 ?>,
163
+ centerMode: true,
164
+ centerPadding:"10px",
165
+ arrows: <?php echo $showarrowp_resp_600 ?>,
166
+ }
167
+ },
168
+ {
169
+ breakpoint: 480,
170
+ settings: {
171
+ infinite: true,
172
+ slidesToShow: <?php echo $slide_col_resp_480 ?>,
173
+ slidesToScroll: <?php echo $slide_by_resp_480 ?>,
174
+ autoplay: <?php echo $autoplay_resp_480 ?>,
175
+ autoplaySpeed: <?php echo $interval_resp_480 ?>,
176
+ dots: <?php echo $show_dots_resp_480 ?>,
177
+ centerMode: true,
178
+ centerPadding:"10px",
179
+ arrows: <?php echo $showarrowp_resp_480 ?>,
180
+ }
181
+ }
182
+
183
+ ]
184
+ });
185
+ });
186
+
187
+ </script>
188
+ <?php if ($show_sett == 1) : ?>
189
+ <?php if ($use_owl_carousel == 1) : ?>
190
+ <div class="bumble_carousel">
191
+ <?php
192
+ $filter = Mage::getModel('bumble_filter/group')->getCollection(); ?>
193
+ <?php if($filter_group == 0 || $filter_group == "") : ?>
194
+ <?php foreach ($filter as $filters): ?>
195
+
196
+ <?php $res = $filters->getFile();
197
+ $title= $filters->getTitle();
198
+ $filterId= $filters->getFilterId();
199
+ $show= $filters->getStatus();
200
+ $groupIdentifier= Mage::getModel('bumble_filter/filter')->load($filterId)->getIdentifier();
201
+ $identi= $filters->getIdentifier();
202
+ $extension = '.html'; ?>
203
+ <?php if($show == 1) : ?>
204
+
205
+ <div>
206
+ <a href="http://<?php echo $url ?>/<?php echo $groupIdentifier ?>/<?php echo $identi ?><?php echo $extension ?>"><img data-u="image" class="logo-carousel" src="media/<?php echo $res ?>" alt="<?php echo $filters->getTitle() ?>" />
207
+ </a>
208
+ </div>
209
+ <?php endif ?>
210
+
211
+ <?php endforeach ?>
212
+ <?php endif ?>
213
+ <?php if($filter_group != 0 || $filter_group != "") : ?>
214
+
215
+ <?php foreach ($filter as $filters) : ?>
216
+
217
+ <?php
218
+ $res = $filters->getFile();
219
+ $title= $filters->getTitle();
220
+ $filterId= $filters->getFilterId();
221
+ $show= $filters->getStatus(); ?>
222
+ <?php if($filter_group == $filterId) : ?>
223
+ <?php $groupIdentifier= Mage::getModel('bumble_filter/filter')->load($filterId)->getIdentifier();
224
+ $identi= $filters->getIdentifier();
225
+ $extension = '.html'; ?>
226
+
227
+ <?php if($show == 1) : ?>
228
+
229
+ <div>
230
+ <a href="http://<?php echo $url ?>/<?php echo $groupIdentifier ?>/<?php echo $identi ?><?php echo $extension ?>"><img data-u="image" class="logo-carousel" src="media/<?php echo $res ?>" alt="<?php echo $filters->getTitle() ?>" />
231
+ </a>
232
+ </div>
233
+ <?php endif ?>
234
+ <?php endif ?>
235
+
236
+ <?php endforeach ?>
237
+ <?php endif ?>
238
+
239
+ </div>
240
+
241
+ <?php endif; //end if $use ?>
242
+
243
+ <?php endif; //end if $show_sett ?>
244
+
245
+
246
+
247
+
248
+
249
+
250
+
app/design/frontend/base/default/template/bumble/filter/block/icon.phtml ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php $_product = $this->getProduct();
2
+ $id = $_product->getBumblefilter();
3
+ ?>
4
+ <?php if( $id && Mage::getStoreConfig( "bumble_filter/general_setting/enable_icon" ) && Mage::getStoreConfig( "bumble_filter/general_setting/show" ) ): $filter = $this->helper('bumble_filter/data')->getFilterById($id); ?>
5
+ <div class="product-filter" style="clear:both">
6
+ <strong><?php echo $this->__("Filter");?></strong> <a href="<?php echo $filter->getLink();?>" title="<?php echo $filter->getTitle();?>">
7
+ <img src="<?php echo $filter->getIconUrl();?>" alt="<?php echo $filter->getTitle();?>"/>
8
+ </a>
9
+ </div>
10
+ <?php endif; ?>
app/design/frontend/base/default/template/bumble/filter/block/scroll.phtml ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $itemsperpage = (int)$this->getConfig("max_items") ;
3
+ $itemsperpage = !empty($itemsperpage)?$itemsperpage:6;
4
+ $columns = (int)$this->getConfig("columns");
5
+ $columns = !empty($columns)?$columns:6;
6
+
7
+ $c = $this->getGeneralConfig( 'filter_imagesize', "" );
8
+ $tmp = explode( "x", $c );
9
+ $thumb_width = $thumb_height = "";
10
+ if( count($tmp) > 0 && (int)$tmp[0] ){
11
+ $thumb_width = (int)$tmp[0];
12
+ $thumb_height = (int)$tmp[1];
13
+ }
14
+ $id = rand(1,100).rand(1,time());
15
+ $span = 12/$columns;
16
+ $total = count($filters);
17
+ $i = 1;
18
+ $x = 0;
19
+ $title = $this->getConfig("scrollmod_title");
20
+
21
+ ?>
22
+ <div id="bumble-filtercarousel-<?php echo $id?>" class="block bumble-filtercarousel">
23
+ <?php if($title) { ?>
24
+ <div class="block-title">
25
+ <strong>
26
+ <span>
27
+ <?php echo $title; ?>
28
+ </span>
29
+ </strong>
30
+ <?php if( ($pretext = $this->getConfig("pretext")) && !$cms ) { ?>
31
+ <div class="pretext"><?php echo $pretext;?></div>
32
+ <?php } elseif(isset($cms) && $cms != '') {
33
+ ?>
34
+ <div class="pretext"><?php echo $cms;?></div>
35
+ <?php
36
+ } ?>
37
+ </div>
38
+ <?php } ?>
39
+ <div class="block-content">
40
+ <div id="bumblefiltercarousel-<?php echo $id;?>" class="carousel slide bumblecarousel hidden-xs">
41
+ <div class="carousel-inner">
42
+ <?php if($filters) { ?>
43
+ <?php foreach ($filters as $filter) {?>
44
+
45
+ <?php if( $itemsperpage == 1 || $i % $itemsperpage == 1){ ?>
46
+ <div class="item <?php if($i==1) {?>first<?php }elseif( ($i+$itemsperpage) >= $total ) {?>last<?php } ?> <?php if($i==1) {?>active<?php } ?>">
47
+ <?php } ?>
48
+
49
+ <?php if( $columns == 1 || $x%$columns == 0 || $x%$itemsperpage == 0){ ?>
50
+ <div class="row">
51
+ <?php } ?>
52
+
53
+ <div class="col-lg-<?php echo $span;?> col-xs-6 col-sm-2">
54
+ <div class="item-inner">
55
+ <?php $filter_link = $filter->getLink(); ?>
56
+ <?php
57
+ $image = "";
58
+ if($thumb_width && $thumb_height) {
59
+ $image = Mage::helper('bumble_filter')->resize($filter->getFile(), $thumb_width, $thumb_height);
60
+ } else {
61
+ $image = $filter->getImageUrl("l");
62
+ }
63
+ ?>
64
+ <?php if ($filter_link) { ?>
65
+ <a href="<?php echo $filter_link; ?>"><img src="<?php echo $image; ?>" alt="<?php echo $filter->getTitle(); ?>" class="img-responsive" /></a>
66
+ <?php } else { ?>
67
+ <img src="<?php echo $image; ?>" alt="<?php echo $filter->getTitle(); ?>" class="img-responsive" />
68
+ <?php } ?>
69
+ </div>
70
+ </div>
71
+
72
+ <?php if( $columns == 1 || ($x+1)%$columns == 0 || $i == $total || ($x>0 && ($x+1)%$itemsperpage == 0) ) { ?>
73
+ </div>
74
+ <?php } ?>
75
+
76
+ <?php if( $itemsperpage == 1 || ($i+1)%$itemsperpage == 1 || $i == $total ) { $x = -1; ?>
77
+ </div>
78
+ <?php } ?>
79
+
80
+ <?php $i++;$x++; } ?>
81
+ </div>
82
+ <?php } //end if?>
83
+ <?php if( (int)$total > $columns ){ ?>
84
+ <div class="carousel-controls">
85
+ <a class="carousel-control left fa fa-angle-left" href="#bumblefiltercarousel<?php echo $id;?>" data-slide="prev"></a>
86
+ <a class="carousel-control right fa fa-angle-right" href="#bumblefiltercarousel<?php echo $id;?>" data-slide="next"></a>
87
+ </div>
88
+ <?php } ?>
89
+ <?php if ($this->getConfig("show_more")) { ?>
90
+ <div class="filter-showmore"><a class="btn btn-info" role="button" href="<?php echo $this->getMoreViewLink(); ?>">Show More Filter</a></div>
91
+ <?php } ?>
92
+ </div> <!--end bumblefiltercarousel -->
93
+ </div> <!--end block-content -->
94
+ </div> <!--end bumble-filtercarousel -->
95
+ <?php if( (int)$total > 1 ){ ?>
96
+ <script type="text/javascript"><!--
97
+ jQuery('#bumblefiltercarousel-<?php echo $id;?>').carousel({interval:false});
98
+ --></script>
99
+ <?php } ?>
app/design/frontend/base/default/template/bumble/filter/brand.phtml ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ ---------------------------------------------------------------------------*/
10
+ ?>
11
+ <?php
12
+ $c = Mage::getStoreConfig( 'bumble_filter/general_setting/prod_imagesize' );
13
+ if (strpos($c, 'x') !== false) {
14
+
15
+ $tmp = explode( "x", $c );
16
+
17
+ $width = (int)$tmp[0];
18
+ $height = (int)$tmp[1];
19
+
20
+ if($width == 0 )
21
+ {
22
+ $width= '100%';
23
+ }
24
+
25
+ if($height == 0)
26
+ {
27
+ $height= '';
28
+ }
29
+ }
30
+ else
31
+ {
32
+ $width= '';
33
+ $height= '';
34
+ }
35
+ ?>
36
+ <?php $url= $_SERVER['HTTP_HOST']; ?>
37
+ <div class="bumble-filter-page">
38
+
39
+ <div class="bumble-pres">
40
+
41
+ <h1><?php echo $this->__( "%s", $this->getFilter()->getTitle() ); ?></h1>
42
+
43
+ <?php if( $this->getFilter()->getDescription() ) : ?>
44
+ <div class="filter-description">
45
+ <?php echo $this->getFilter()->getDescription();?>
46
+ </div>
47
+ <?php endif; ?>
48
+
49
+ <?php if( $this->getFilter()->getFile() ) :?>
50
+ <div class="filter-image">
51
+ <img src="http://<?php echo $url; ?>/media/<?php echo $this->getFilter()->getFile();?>" width="<?php echo $width; ?>" height="<?php echo $height; ?>" title="<?php echo $this->getFilter()->getTitle();?>" />
52
+ </div>
53
+ <?php endif; ?>
54
+ </div>
55
+
56
+
57
+ </div>
58
+ <div class="filter-product bumbleclear" >
59
+ <?php echo $this->getChildHtml('products') ?>
60
+ </div>
app/design/frontend/base/default/template/bumble/filter/brandprod.phtml ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ <div class="filter-product bumbleclear" >
2
+ <?php echo $this->getChildHtml('products') ?>
3
+ </div>
app/design/frontend/base/default/template/bumble/filter/carousel.phtml ADDED
@@ -0,0 +1,170 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ <?php
3
+ $url= $_SERVER['HTTP_HOST'];
4
+
5
+ $imga03 = 'http://'.$url.'/skin/frontend/base/default/bumble_filter/images/a03.png';
6
+ $imgb03 = 'http://'.$url.'/skin/frontend/base/default/bumble_filter/images/b03.png';
7
+ $imgload = 'http://'.$url.'/skin/frontend/base/default/bumble_filter/images/loading.gif';
8
+
9
+ $conf_show = Mage::getStoreConfig( "bumble_filter/carousel_setting/enable_owl_carousel");
10
+ $conf_showc = Mage::getStoreConfig( "bumble_filter/widget_filter_scroll/use_owl_carousel");
11
+
12
+ $conf_slide = Mage::getStoreConfig( "bumble_filter/carousel_setting/slide_by");
13
+ $conf_speed = Mage::getStoreConfig( "bumble_filter/carousel_setting/interval");
14
+
15
+ $enable_cache = $this->getConfig("enable_cache", 1 )
16
+ ?>
17
+
18
+
19
+ <!-- use jssor.slider.debug.js instead for debug -->
20
+ <script>
21
+ jssor_1_slider_init = function() {
22
+
23
+ var jssor_1_options = {
24
+ $AutoPlay: true,
25
+ $AutoPlaySteps: <?php echo $conf_slide; ?>,
26
+ $SlideDuration: 210,
27
+ $AutoPlayInterval:<?php echo $conf_speed; ?>,
28
+ $SlideWidth: 200,
29
+ $SlideSpacing: 65,
30
+ $Cols: 4,
31
+ $ArrowNavigatorOptions: {
32
+ $Class: $JssorArrowNavigator$,
33
+ $Steps: <?php echo $conf_slide; ?>
34
+ },
35
+ $BulletNavigatorOptions: {
36
+ $Class: $JssorBulletNavigator$,
37
+ $SpacingX: 1,
38
+ $SpacingY: 1
39
+ }
40
+ };
41
+
42
+ var jssor_1_slider = new $JssorSlider$("jssor_1", jssor_1_options);
43
+
44
+ //responsive code begin
45
+ //you can remove responsive code if you don't want the slider scales while window resizing
46
+ function ScaleSlider() {
47
+ var refSize = jssor_1_slider.$Elmt.parentNode.clientWidth;
48
+ if (refSize) {
49
+ refSize = Math.min(refSize, refSize);
50
+ jssor_1_slider.$ScaleWidth(refSize);
51
+ }
52
+ else {
53
+ window.setTimeout(ScaleSlider, 30);
54
+ }
55
+ }
56
+ ScaleSlider();
57
+ $Jssor$.$AddEvent(window, "load", ScaleSlider);
58
+ $Jssor$.$AddEvent(window, "resize", ScaleSlider);
59
+ $Jssor$.$AddEvent(window, "orientationchange", ScaleSlider);
60
+ //responsive code end
61
+ };
62
+ </script>
63
+
64
+ <style>
65
+
66
+ /* jssor slider bullet navigator skin 03 css */
67
+ /*
68
+ .jssorb03 div (normal)
69
+ .jssorb03 div:hover (normal mouseover)
70
+ .jssorb03 .av (active)
71
+ .jssorb03 .av:hover (active mouseover)
72
+ .jssorb03 .dn (mousedown)
73
+ */
74
+ .jssorb03 {
75
+ position: absolute;
76
+ }
77
+ .jssorb03 div, .jssorb03 div:hover, .jssorb03 .av {
78
+ position: absolute;
79
+ /* size of bullet elment */
80
+ width: 21px;
81
+ height: 21px;
82
+ text-align: center;
83
+ line-height: 21px;
84
+ color: black;
85
+ font-size: 12px;
86
+ background: url(<?php echo $imgb03; ?>) no-repeat;
87
+ overflow: hidden;
88
+ cursor: pointer;
89
+ }
90
+ .jssorb03 div { background-position: -5px -4px; }
91
+ .jssorb03 div:hover, .jssorb03 .av:hover { background-position: -35px -4px; }
92
+ .jssorb03 .av { background-position: -65px -4px; }
93
+ .jssorb03 .dn, .jssorb03 .dn:hover { background-position: -95px -4px; }
94
+
95
+ /* jssor slider arrow navigator skin 03 css */
96
+ /*
97
+ .jssora03l (normal)
98
+ .jssora03r (normal)
99
+ .jssora03l:hover (normal mouseover)
100
+ .jssora03r:hover (normal mouseover)
101
+ .jssora03l.jssora03ldn (mousedown)
102
+ .jssora03r.jssora03rdn (mousedown)
103
+ */
104
+ .jssora03l, .jssora03r {
105
+ display: block;
106
+ position: absolute;
107
+ /* size of arrow element */
108
+ width: 55px;
109
+ height: 55px;
110
+ cursor: pointer;
111
+ background: url(<?php echo $imga03; ?>) no-repeat;
112
+ overflow: hidden;
113
+ }
114
+ .jssora03l { background-position: -3px -33px; }
115
+ .jssora03r { background-position: -63px -33px; }
116
+ .jssora03l:hover { background-position: -123px -33px; }
117
+ .jssora03r:hover { background-position: -183px -33px; }
118
+ .jssora03l.jssora03ldn { background-position: -243px -33px; }
119
+ .jssora03r.jssora03rdn { background-position: -303px -33px; }
120
+ </style>
121
+ <?php if($conf_show == 1) : ?>
122
+ <h2 class="title-block"> All Filters </h2>
123
+ <div class="shadow">
124
+ <img src="media/wysiwyg/hsmimage/after_shadow.png" alt="">
125
+ </div>
126
+ <div id="jssor_1" style="position: relative; margin: 0 auto; top: 0px; left: 0px; height: 190px; overflow: hidden; visibility: hidden;">
127
+ <!-- Loading Screen -->
128
+ <div data-u="loading" style="position: absolute; top: 0px; left: 0px;">
129
+ <div style="filter: alpha(opacity=70); opacity: 0.7; position: absolute; display: block; top: 0px; left: 0px; width: 100%; height: 100%;"></div>
130
+ <div style="position:absolute;display:block;background:url(<?php echo $imgload; ?>) no-repeat center center;top:0px;left:0px;width:100%;height:100%;"></div>
131
+ </div>
132
+ <div data-u="slides" style="cursor: default; position: relative; top: 0px; left: 0px; width: 1200px; height: 150px; overflow: hidden;">
133
+ <?php
134
+ $filter = Mage::getModel('bumble_filter/group')->getCollection();
135
+
136
+ foreach ($filter as $filters)
137
+ {
138
+ $res = $filters->getFile();
139
+ $title= $filters->getTitle();
140
+ $filterId= $filters->getFilterId();
141
+ $groupIdentifier= Mage::getModel('bumble_filter/filter')->load($filterId)->getIdentifier();
142
+ $identi= $filters->getIdentifier();
143
+ $extension = '.html';
144
+
145
+ ?>
146
+
147
+ <div style="display: none;">
148
+ <a href="http://<?php echo $url;?>/<?php echo $groupIdentifier;?>/<?php echo $identi;?><?php echo $extension;?>"><img data-u="image" class="logo-carousel" src="media/<?php echo $res;?>" alt="<?php echo $filters->getTitle();?>" />
149
+ </a>
150
+ </div>
151
+
152
+ <?php } ?>
153
+
154
+
155
+ </div>
156
+ <!-- Bullet Navigator -->
157
+ <div data-u="navigator" class="jssorb03" style="bottom:10px;right:10px;">
158
+ <!-- bullet navigator item prototype -->
159
+ <div data-u="prototype" style="width:21px;height:21px;">
160
+ <div data-u="numbertemplate"></div>
161
+ </div>
162
+ </div>
163
+ <!-- Arrow Navigator -->
164
+ <span data-u="arrowleft" class="jssora03l" style="top:0px;bottom: 10px;left:8px;width:55px;height:55px;" data-autocenter="2"></span>
165
+ <span data-u="arrowright" class="jssora03r" style="top:0px;bottom: 10px;right:8px;width:55px;height:55px;" data-autocenter="2"></span>
166
+ </div>
167
+ <script>
168
+ jssor_1_slider_init();
169
+ </script>
170
+ <?php endif ?>
app/design/frontend/base/default/template/bumble/filter/cmenu.phtml ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ ---------------------------------------------------------------------------*/
10
+ ?>
11
+ <?php
12
+ $enabled = $this->getConfig('enable_categoryfilter', '');
13
+ $title = $this->__("Categories");
14
+ $style = $this->getConfig('menustyle', '');
15
+ $event = $this->getConfig('event', '');
16
+ ?>
17
+ <?php if($enabled == 1)://start enabled?>
18
+ <div class="block bumble-filter-menu">
19
+ <div class="block-title">
20
+ <strong><span><?php echo $title;?></span></strong>
21
+ </div>
22
+ <div class="block-content">
23
+ <?php if($style=='Dropdown'):?>
24
+ <ul id="bumble-dropdown">
25
+ <?php foreach ($this->getStoreCategories() as $_category): ?>
26
+ <?php echo $this->mtdrawItem($_category) ?>
27
+ <?php endforeach; ?>
28
+ </ul>
29
+ <?php endif; //end dropdown menu?>
30
+ <?php if ($style=='Accordion'):?>
31
+ <script type="text/javascript">
32
+ $jmenu(document).ready(function(){
33
+ // applying the settings
34
+ $jmenu("#bumble-accordion li.active span.head").addClass("selected");
35
+ $jmenu('#bumble-accordion').Accordion({
36
+ active: 'span.selected',
37
+ header: 'span.head',
38
+ alwaysOpen: false,
39
+ animated: true,
40
+ showSpeed: 400,
41
+ hideSpeed: 800,
42
+ event: '<?php echo $event; ?>'
43
+ });
44
+ });
45
+ </script>
46
+ <ul id="bumble-accordion">
47
+ <?php foreach ($this->getStoreCategories() as $_category): ?>
48
+ <?php echo $this->drawItem($_category) ?>
49
+ <?php endforeach ?>
50
+ </ul>
51
+ <?php endif; //end Accordion menu?>
52
+ <?php if ($style=='Tree'):?>
53
+ <ul id="bumble-tree">
54
+ <?php foreach ($this->getStoreCategories() as $_category): ?>
55
+ <?php echo $this->drawItem($_category) ?>
56
+ <?php endforeach; ?>
57
+ </ul>
58
+ <?php endif;//end tree menu?>
59
+ </div> <!-- end class=block-content -->
60
+ </div> <!-- end class=bumble-categoriesmenu -->
61
+ <?php endif;//end enabled menu?>
app/design/frontend/base/default/template/bumble/filter/default.phtml ADDED
@@ -0,0 +1,228 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ --------------------------------------------------------------------------*/
10
+ ?>
11
+
12
+ <?php $show = Mage::getStoreConfig( 'bumble_filter/general_setting/show' ); ?>
13
+ <?php if($show == 0): ?>
14
+ <p class="note-msg">Non é possibile visualizzare i Gruppi.<br />
15
+ Controllare in <i>Bumble Setting > General Setting > Enable</i> sia impostato su SI</p>
16
+ <?php endif ?>
17
+
18
+ <?php
19
+ $max_col_ls = Mage::getStoreConfig( 'bumble_filter/general_setting/grid_col_ls' );
20
+ $max_col_ms = Mage::getStoreConfig( 'bumble_filter/general_setting/grid_col_ms' );
21
+ $max_col_ss = Mage::getStoreConfig( 'bumble_filter/general_setting/grid_col_ss' );
22
+ $max_col_mss = Mage::getStoreConfig( 'bumble_filter/general_setting/grid_col_mss' );
23
+ ?>
24
+
25
+ <?php if($show == 1) : ?>
26
+ <?php
27
+
28
+ $c = Mage::getStoreConfig( 'bumble_filter/general_setting/filter_imagesize' );
29
+ if (strpos($c, 'x') !== false) {
30
+
31
+ $tmp = explode( "x", $c );
32
+
33
+ $width = (int)$tmp[0];
34
+ $height = (int)$tmp[1];
35
+
36
+ if($width == 0 )
37
+ {
38
+ $width= '100%';
39
+ }
40
+
41
+ if($height == 0)
42
+ {
43
+ $height= '';
44
+ }
45
+ }
46
+ else
47
+ {
48
+ $width= '';
49
+ $height= '';
50
+ }
51
+
52
+
53
+
54
+ $urlhost= $_SERVER['HTTP_HOST'];
55
+
56
+
57
+
58
+
59
+ $layout_mode = $this->getLayoutMode();
60
+ if("grid" == $layout_mode) {
61
+
62
+ //ls
63
+ if($max_col_ls != "")
64
+ {
65
+ $cla_ls = "filt-columnls";
66
+ $split_col_ls = round(100/$max_col_ls, 2)."%";
67
+ }else
68
+ {
69
+ $cla_ls = "filt-columnls";
70
+ $split_col_ls= "auto";
71
+ }
72
+ //ms
73
+ if($max_col_ms != "")
74
+ {
75
+ $cla_ms = "filt-columnms";
76
+ $split_col_ms = round(100/$max_col_ms, 2)."%";
77
+ }else
78
+ {
79
+ $cla_ms = "filt-columnms";
80
+ $split_col_ms= "auto";
81
+ }
82
+ //ss
83
+ if($max_col_ss != "")
84
+ {
85
+ $cla_ss = "filt-columnss";
86
+ $split_col_ss = round(100/$max_col_ss, 2)."%";
87
+ }else
88
+ {
89
+ $cla_ss = "filt-columnss";
90
+ $split_col_ss= "auto";
91
+ }
92
+ //mss
93
+ if($max_col_mss != "")
94
+ {
95
+ $cla_mss = "filt-columnmss";
96
+ $split_col_mss = round(100/$max_col_mss, 2)."%";
97
+ }else
98
+ {
99
+ $cla_mss = "filt-columnmss";
100
+ $split_col_mss= "auto";
101
+ }
102
+ ?>
103
+
104
+ <style>
105
+
106
+
107
+
108
+ .filt-columnls-<?php echo $max_col_ls; ?> {
109
+ float: left;
110
+ <?php if ($max_col_ls != "") {?>width: <?php echo $split_col_ls; ?> !important;<?php } ?>
111
+ }
112
+
113
+
114
+ @media screen and (max-width: 1024px) {
115
+ .filt-columnms-<?php echo $max_col_ms; ?> {
116
+ float: left;
117
+ <?php if ($max_col_ms != "") {?>width: <?php echo $split_col_ms; ?> !important;<?php } ?>
118
+ }
119
+ }
120
+ @media screen and (max-width: 600px) {
121
+ .filt-columnss-<?php echo $max_col_ss; ?> {
122
+ float: left;
123
+ <?php if ($max_col_ss != "") {?>width: <?php echo $split_col_ss; ?> !important;<?php } ?>
124
+ }
125
+ }
126
+ @media screen and (max-width: 480px) {
127
+ .filt-columnmss-<?php echo $max_col_mss; ?> {
128
+ float: left;
129
+ <?php if ($max_col_mss != "") {?>width: <?php echo $split_col_mss; ?> !important;<?php } ?>
130
+ }
131
+
132
+ }
133
+
134
+
135
+ </style>
136
+
137
+ <?php }else{ $cla = ""; }
138
+ if("list" == $layout_mode ) {
139
+ $span_large = $span_medium = $span_small = $span_mini = 12;
140
+ $list = "margin: 0 auto;";
141
+ }
142
+ ?>
143
+ <div class="bumble-filterlist-page block">
144
+ <div class="block-title">
145
+ <h1><?php echo $this->__($this->_getTitleCurrentGroup())?></h1>
146
+ </div>
147
+ <div class="block-content">
148
+ <?php
149
+ $url= $_SERVER['HTTP_HOST'];
150
+ $url2 = $_SERVER["REQUEST_URI"];
151
+ $route= str_replace($url, '', $url2);
152
+ $route = str_replace('en/', '', $route);
153
+ $route= str_replace('/', '', $route);
154
+ $baseUrl = Mage::app()->getStore($storeId)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK);
155
+ #var_dump($route);
156
+
157
+ $bra= array();
158
+ $resource = Mage::getSingleton('core/resource');
159
+ $readConnection = $resource->getConnection('core_read');
160
+ //first query
161
+ $query = "SELECT `filter_id` FROM bumble_filter_filter WHERE `identifier`= '$route'";
162
+
163
+ $results = $readConnection->fetchAll($query);
164
+ $id = $results[0]['filter_id'];
165
+ $query = "SELECT `filter_id` FROM bumble_filter_group WHERE `filter_id`= '$id'";
166
+
167
+ $results = $readConnection->fetchAll($query);
168
+
169
+ $lungh_ids = count($results);
170
+ //var_dump($results);
171
+ //$id = $results[0]['filter_id'];
172
+ $filters = Mage::getModel('bumble_filter/group')->getCollection();
173
+
174
+ $_collectionSize = count($filters);
175
+ $_columnCount = !empty($grid_col_ls)?$grid_col_ls:$_collectionSize;
176
+ foreach( $filters as $filter ): ?>
177
+ <?php $bra[]= $filter ?>
178
+ <?php endforeach ?>
179
+ <?php $lunghezzaArray= count($bra); ?>
180
+ <?php if($lunghezzaArray == 1): ?>
181
+ <?php $head = 'http://'.$url.'/'.$route.'/'.$bra[0]['identifier'].'.html';
182
+ header('Location: '.$head);
183
+ die();
184
+ ?>
185
+ <?php endif ?>
186
+
187
+
188
+ <?php $i =$max_col;$j=0; ?>
189
+ <?php // echo $i;?>
190
+ <div class="filters-row">
191
+ <?php foreach( $filters as $filter ): ?>
192
+ <?php $bra_id = $filter->getFilterId(); ?>
193
+ <?php if($i == 0){ $i = $max_col; } ?>
194
+ <?php $show= $filter->getStatus(); ?>
195
+ <?php if($bra_id == $id) : ?>
196
+ <?php if($show == 1) : ?>
197
+
198
+
199
+
200
+ <div class="<?php if ("grid" == $layout_mode) { echo $cla_ls.'-'.$max_col_ls;} ?> <?php if ("grid" == $layout_mode) { echo $cla_ms.'-'.$max_col_ms;} ?> <?php if ("grid" == $layout_mode) { echo $cla_ss.'-'.$max_col_ss;} ?> <?php if ("grid" == $layout_mode) { echo $cla_mss.'-'.$max_col_mss;} ?> filter-col <?php if($layout_mode =='list'){ echo "col-fullwidth";} ?>" >
201
+
202
+ <div class="filter-item">
203
+ <a class="filter-logo" href="<?php echo $baseUrl ?><?php echo $route; ?>/<?php echo $filter->getIdentifier(); ?>.html" title="<?php echo $filter->getTitle();?>">
204
+ <img src="http://<?php echo $urlhost; ?>/media/<?php echo $filter->getFile();?>" width="<?php echo $width; ?>" height="<?php echo $height; ?>" style="<?php echo $list; ?>" alt="<?php echo $filter->getTitle();?>" />
205
+ </a>
206
+ <a class="filter-title" href="<?php echo $baseUrl; ?><?php echo $route; ?>/<?php echo $filter->getIdentifier(); ?>.html" title="<?php echo $filter->getTitle();?>">
207
+ <span><?php echo $filter->getTitle();?></span>
208
+ </a>
209
+ </div>
210
+
211
+ </div>
212
+
213
+ <?php endif ?>
214
+ <?php endif ?>
215
+ <?php $i--; ?>
216
+ <?php //echo $i; ?>
217
+ <?php endforeach; ?>
218
+ </div>
219
+ <?php //echo $lungh_ids; echo $i; echo $max_col; ?>
220
+
221
+
222
+ </div>
223
+
224
+ </div>
225
+ <?php echo $this->getChildHtml('filter.list.toolbar'); ?>
226
+
227
+ <?php endif ?>
228
+ <div style="clear:both;"></div>
app/design/frontend/base/default/template/bumble/filter/filter.phtml ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ ---------------------------------------------------------------------------*/
10
+ ?>
11
+ <?php
12
+ $c = Mage::getStoreConfig( 'bumble_filter/general_setting/prod_imagesize' );
13
+ if (strpos($c, 'x') !== false) {
14
+
15
+ $tmp = explode( "x", $c );
16
+
17
+ $width = (int)$tmp[0];
18
+ $height = (int)$tmp[1];
19
+
20
+ if($width == 0 )
21
+ {
22
+ $width= '100%';
23
+ }
24
+
25
+ if($height == 0)
26
+ {
27
+ $height= '';
28
+ }
29
+ }
30
+ else
31
+ {
32
+ $width= '';
33
+ $height= '';
34
+ }
35
+ ?>
36
+ <?php $url= $_SERVER['HTTP_HOST']; ?>
37
+ <div class="bumble-filter-page">
38
+
39
+ <div class="bumble-pres">
40
+
41
+ <h1><?php echo $this->__( "%s", $this->getFilter()->getTitle() ); ?></h1>
42
+
43
+ <?php if( $this->getFilter()->getDescription() ) : ?>
44
+ <div class="filter-description">
45
+ <?php echo $this->getFilter()->getDescription();?>
46
+ </div>
47
+ <?php endif; ?>
48
+
49
+ <?php if( $this->getFilter()->getFile() ) :?>
50
+ <div class="filter-image">
51
+ <img src="http://<?php echo $url; ?>/media/<?php echo $this->getFilter()->getFile();?>" width="<?php echo $width; ?>" height="<?php echo $height; ?>" title="<?php echo $this->getFilter()->getTitle();?>" />
52
+ </div>
53
+ <?php endif; ?>
54
+ </div>
55
+
56
+
57
+ </div>
58
+ <div class="filter-product bumbleclear" >
59
+ <?php echo $this->getChildHtml('products') ?>
60
+ </div>
app/design/frontend/base/default/template/bumble/filter/grid.phtml ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ ------------------------------------------------------------------------*/
10
+ ?>
11
+ <div class="bumble-filterlist-page">
12
+ <h1><?php echo $this->__( $this->getTitleFilter() );?></h1>
13
+
14
+ <div class="filter-wrapper bumbleclear layout-grid">
15
+ <ul>
16
+ <?php $filters = $this->getFilters(); ?>
17
+ <?php foreach( $filters as $filter ): ?>
18
+ <li class="filter-item">
19
+ <a class="filter-logo" href="<?php echo $filter->getLink();?>" title="<?php echo $filter->getTitle();?>">
20
+ <img src="<?php echo $filter->getIconUrl();?>" alt="<?php echo $filter->getTitle();?>" />
21
+ </a>
22
+ <a class="filter-title" href="<?php echo $filter->getLink();?>" title="<?php echo $filter->getTitle();?>">
23
+ <span><?php echo $filter->getTitle();?></span>
24
+ </a>
25
+ </li>
26
+ <?php endforeach; ?>
27
+ </ul>
28
+ </div>
29
+ <?php echo $this->getChildHtml('filter.list.toolbar'); ?>
30
+ </div>
app/design/frontend/base/default/template/bumble/filter/groupmenu.phtml ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ ---------------------------------------------------------------------------*/
10
+ ?>
11
+ <?php
12
+ $enable_show = Mage::getStoreConfig( 'bumble_filter/module_setting/enable_filternavmodule' );
13
+ $title_filternav = Mage::getStoreConfig( 'bumble_filter/module_setting/filternav_title' );
14
+ //$filter_filternav = Mage::getStoreConfig( 'bumble_filter/module_setting/filter_group' );
15
+ //var_dump($filter_filternav);
16
+
17
+ $collection = $this->getCategoryFilters();
18
+ //var_dump($collection);
19
+ ?>
20
+ <?php $coll = Mage::getModel('bumble_filter/filter')->getCollection(); ?>
21
+ <?php $count = array(); ?>
22
+ <?php foreach( $collection as $menu ): ?>
23
+ <?php foreach( $coll as $countColl ): ?>
24
+ <?php if($menu->getFilterId() == $countColl->getFilterId()) : ?>
25
+ <?php $count[] = $countColl->getTitle(); ?>
26
+ <?php endif; ?>
27
+ <?php endforeach; ?>
28
+ <?php endforeach; ?>
29
+ <?php if($enable_show == 1) : ?>
30
+ <?php $countArray= count($count); if($countArray != 0) : ?>
31
+ <div class="bumble-filter-menu block">
32
+ <div class="block-title">
33
+ <strong>
34
+ <span><?php echo $this->__($title_filternav) ?></span>
35
+ </strong>
36
+ </div>
37
+
38
+ <div class="block-content">
39
+ <?php //if( count($collection) ): ?>
40
+ <ul id="filter-menu">
41
+ <?php
42
+ $obj = new Bumble_Filter_Block_Filter_List;
43
+
44
+ $title = $obj->_getTitleCurrentGroup();
45
+ ?>
46
+ <?php foreach( $collection as $menu ): ?>
47
+ <?php if($title != $menu->getTitle()) : ?>
48
+ <li class="parent">
49
+ <a href="<?php echo Mage::getBaseUrl().$menu->getIdentifier(); ?>" title="<?php echo $menu->getTitle(); ?>">
50
+ <span><?php echo $menu->getTitle(); ?></span>
51
+ </a>
52
+ </li>
53
+ <?php endif; ?>
54
+ <?php endforeach; ?>
55
+
56
+ </ul>
57
+
58
+ <?php// endif; ?>
59
+ </div>
60
+ </div>
61
+ <?php endif;//if count gt 1 ?>
62
+ <?php endif; ?>
app/design/frontend/base/default/template/bumble/filter/left.phtml ADDED
@@ -0,0 +1,177 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ <?php
3
+
4
+ $url= $_SERVER['HTTP_HOST'];
5
+
6
+ $id = $_GET['p'];
7
+ $category = $_GET['category'];
8
+ $labelPrice= $_GET['labelPrice'];
9
+ $price= $_GET['price'];
10
+ $route =strtok($_SERVER["REQUEST_URI"],'?');
11
+
12
+
13
+
14
+ ?>
15
+
16
+
17
+
18
+ <div class="block block-layered-nav">
19
+ <div class="block-title">
20
+ <strong><span><?php echo $this->__('Shop By') ?></span></strong>
21
+ <?php echo $url2; ?>
22
+ </div>
23
+
24
+
25
+ <div class="remove-filter">
26
+ <ul>
27
+ <?php
28
+ if ($category != "" || $price != "")
29
+ {
30
+
31
+ if($category != ""){
32
+ ?>
33
+ <div>
34
+ <p style="float:left;">Category</p><a style="margin-left: 20px;" href="http://<?php echo $url; ?><?php echo $route; ?><?php if($price != ""){ echo '?labelPrice=price&price='.$price;} ?>"><button> X</button></a>
35
+ </div>
36
+ <?php }
37
+ if($price != ""){
38
+ ?>
39
+ <div>
40
+ <p style="float:left;">Price<?php echo ' '. $price; ?></p><a style="margin-left: 20px;" href="http://<?php echo $url; ?><?php echo $route; ?><?php if($category != ""){ echo '?category='.$category; }?>"><button> X</button></a>
41
+ </div>
42
+
43
+
44
+
45
+ <?php
46
+ }
47
+ }
48
+
49
+ ?>
50
+ </ul>
51
+ </div>
52
+
53
+
54
+ <div class="block-content">
55
+
56
+
57
+ <div class="item-category">
58
+ <h3 style="background-color: #ddd; padding: 4px; margin-bottom: 0px;">Category</h3>
59
+ <ul style="border:1px solid #ddd;padding-bottom: 10px;">
60
+ <?php
61
+
62
+ $products= Mage::getModel('catalog/product')->getCollection();
63
+ $option= array();
64
+
65
+ $i = 0;
66
+ $att = array();
67
+
68
+ foreach($products as $product)
69
+ {
70
+
71
+ $prod=Mage::getModel('catalog/product')->load($product->getId());
72
+ $categoria=$prod->getCategoryIds();
73
+ $_cat=Mage::getModel('catalog/category')->load($categoria[0]);
74
+
75
+ $att[$i]= $_cat;
76
+ $i++;
77
+
78
+
79
+ }
80
+
81
+
82
+ foreach ($att as $key) {
83
+
84
+ $option[]= array('value' => $key->getId(),
85
+ 'label'=> $key->getName() );
86
+ }
87
+
88
+
89
+ $length=0;
90
+ foreach($option as $o){
91
+ $length++;
92
+ }
93
+
94
+
95
+ for($i=0;$i<$length;$i++){
96
+ for($j=$i+1;$j<$length;$j++){
97
+ if($option[$i]['value']==$option[$j]['value']){
98
+ unset($option[$i]);
99
+
100
+ }
101
+ }
102
+ }
103
+ sort($option);
104
+
105
+ foreach ($option as $optCat) {
106
+ ?>
107
+
108
+
109
+ <li style="margin-left: 15px;">
110
+ <a href="http://<?php echo $url; ?><?php echo $route; ?>?category=<?php echo $optCat['value']; ?><?php if($price != ""){ echo '&labelPrice=price&price='.$price;} ?>"><?php echo $optCat['label']; ?></a>
111
+ </li>
112
+
113
+ <?php }
114
+
115
+ ?>
116
+
117
+ </ul>
118
+ </div><!-- first filter -->
119
+
120
+
121
+ <div class="item-category">
122
+ <h3 style="background-color: #ddd; padding: 4px; margin-bottom: 0px;">Price</h3>
123
+ <ul style="border:1px solid #ddd;padding-bottom: 10px;">
124
+ <?php
125
+ $products= Mage::getModel('catalog/product')->getCollection();
126
+ $option = array();
127
+
128
+ $i = 0;
129
+ $att = array();
130
+
131
+ foreach($products as $product)
132
+ {
133
+ $prod= Mage::getSingleton('catalog/product')->load($product->getId());
134
+ $at= Mage::helper('core')->currency($prod->getPrice(),true,false);
135
+ $att[$i]= $at;
136
+ $i++;
137
+ }
138
+
139
+ $result = array_unique($att);
140
+
141
+ foreach ($result as $key)
142
+ {
143
+
144
+ $option[] = array( 'value' => $key,
145
+ 'label' => $key );
146
+
147
+ }
148
+ sort($option);
149
+ foreach ($option as $optPrice){
150
+
151
+ $pri = $optPrice['value'];
152
+ $pric= str_replace(' €', '', $pri);
153
+ ?>
154
+
155
+
156
+ <li style="margin-left: 15px;">
157
+ <a href="http://<?php echo $url; ?><?php echo $route; ?>?labelPrice=price&price=<?php echo $pric.'00'; ?><?php if($category != ""){ echo '&category='.$category; }?>"><?php echo $optPrice['label']; ?></a>
158
+ </li>
159
+
160
+ <?php }
161
+
162
+ ?>
163
+
164
+ </ul>
165
+ </div><!-- second filter -->
166
+
167
+
168
+
169
+
170
+ </div><!-- fine blocco content -->
171
+ </div>
172
+
173
+
174
+
175
+
176
+
177
+
app/design/frontend/base/default/template/bumble/filter/list.phtml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ * Bumble Extension Module
4
+ * @package SocialConnect
5
+ * @author Lanzillo Ferdinando, Sabatino Francesco
6
+ * @copyright Copyright (C) 2016 http://www.armah.it/armah-extension-en/ All Rights Reserved.
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ * @Technical-Support http://www.armah.it/armah-extension-en/
9
+ -------------------------------------------------------------------------*/
10
+ ?>
11
+ <div class="bumble-filterlist-page">
12
+ <h1><?php echo $this->__( $this->getTitleFilter() );?></h1>
13
+
14
+ <div class="filter-wrapper bumbleclear layout-list">
15
+ <ul>
16
+ <?php $filters = $this->getFilters();?>
17
+
18
+ <?php foreach( $filters as $filter ): ?>
19
+ <li class="filter-item">
20
+ <a class="filter-logo" href="<?php echo $filter->getLink();?>" title="<?php echo $filter->getTitle();?>">
21
+ <img src="<?php echo $filter->getIconUrl();?>" alt="<?php echo $filter->getTitle();?>" />
22
+ </a>
23
+ <a class="filter-title" href="<?php echo $filter->getLink();?>" title="<?php echo $filter->getTitle();?>">
24
+ <span><?php echo $filter->getTitle();?></span>
25
+ </a>
26
+ </li>
27
+ <?php endforeach; ?>
28
+ </ul>
29
+ </div>
30
+ <?php echo $this->getChildHtml('filter.list.toolbar'); ?>
31
+ </div>
app/design/frontend/base/default/template/bumble/filter/toolbar.phtml ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Bumbletheme
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Bumbletheme EULA that is bundled with
8
+ * this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://www.bumbletheme.com/LICENSE-1.0.html
11
+ *
12
+ * DISCLAIMER
13
+ *
14
+ * Do not edit or add to this file if you wish to upgrade the extension
15
+ * to newer versions in the future. If you wish to customize the extension
16
+ * for your needs please refer to http://www.bumbletheme.com/ for more information
17
+ *
18
+ * @category Bumble
19
+ * @package Bumble_Blog
20
+ * @copyright Copyright (c) 2014 Bumbletheme (http://www.bumbletheme.com/)
21
+ * @license http://www.bumbletheme.com/LICENSE-1.0.html
22
+ */
23
+
24
+ /**
25
+ * Bumble Blog Extension
26
+ *
27
+ * @category Bumble
28
+ * @package Bumble_Blog
29
+ * @author Bumbletheme Dev Team <bumbletheme@gmail.com>
30
+ */
31
+ ?>
32
+ <?php $page = $this->getRequest()->getParam('page') ? $this->getRequest()->getParam('page') : 1; ?>
33
+ <?php $itemsPerPage = $this->getLimitPerPage(); $count = ($this->getTotal()); ?>
34
+ <?php if( $count > $itemsPerPage ) : ?>
35
+ <div class="pager">
36
+ <p class="amount">
37
+ <?php if($this->getPages() == 1): ?>
38
+ <strong><?php echo $count.' '. $this->__("Item(s)"); ?></strong>
39
+ <?php else:
40
+ $nextT = ($itemsPerPage*$page) <= $count ? ($itemsPerPage*$page):$count;
41
+ ?>
42
+ <?php echo sprintf( $this->__("%s to %s of %s Item(s) "), (($itemsPerPage*($page-1))+1), $nextT, $count ); ?>
43
+ <?php endif; ?>
44
+ </p>
45
+ <?php if($this->getPages() > 1): ?>
46
+ <?php $current_link = $this->getCurrentLink(); ?>
47
+ <div class="pages">
48
+ <div><strong><?php echo $this->__('Page:') ?></strong></div>
49
+ <ol>
50
+ <?php if($page > 1): ?>
51
+ <li>
52
+ <a class="previous" title="<?php echo $this->__('Previous') ?>" href="<?php echo (strpos($current_link, "?") === FALSE)?$current_link.'?page='.($page-1):$current_link.'&page='.($page-1); ?>">
53
+ <img class="v-middle" alt="<?php $this->__('Previous') ?>" src="<?php echo $this->getSkinUrl('images/i_pager-prev.gif') ?>" />
54
+ </a>
55
+ </li>
56
+ <?php endif; ?>
57
+ <?php for($i = 1; $i <= $this->getPages(); $i++): ?>
58
+ <?php if($i == $page): ?>
59
+ <li class="current"><?php echo $i; ?></li>
60
+ <?php else: ?>
61
+ <li>
62
+ <a href="<?php echo (strpos($current_link, "?") === FALSE)?$current_link.'?page='.$i:$current_link.'&page='.$i; ?>"><?php echo $i; ?></a>
63
+ </li>
64
+ <?php endif; ?>
65
+ <?php endfor; ?>
66
+ <?php if($page < $this->getPages()): ?>
67
+ <li>
68
+ <a class="next" title="<?php echo $this->__('Next') ?>" href="<?php echo (strpos($current_link, "?") === FALSE)?$current_link.'?page='.($page+1):$current_link.'&page='.($page+1); ?>">
69
+ <img class="v-middle" alt="<?php $this->__('Next') ?>" src="<?php echo $this->getSkinUrl('images/i_pager-next.gif') ?>" />
70
+ </a>
71
+ </li>
72
+ <?php endif; ?>
73
+ </ol>
74
+ </div>
75
+ <?php endif; ?>
76
+ </div>
77
+ <?php endif; ?>
app/design/frontend/base/default/template/page/custom.phtml ADDED
@@ -0,0 +1,380 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+
5
+ if($pricelt == "" || $pricegt == "")
6
+ {
7
+ $product = Mage::getModel('catalog/product');
8
+ $attributes = Mage::getResourceModel('eav/entity_attribute_collection')
9
+ ->setEntityTypeFilter($product->getResource()->getTypeId())
10
+ ->addFieldToFilter('attribute_code', 'manufacturer'); //can be changed to any attribute
11
+ $attribute = $attributes->getFirstItem()->setEntity($product->getResource());
12
+ $manufacturers = $attribute->getSource()->getAllOptions(false);
13
+
14
+ $filter = Mage::registry('current_group');
15
+ $filter_id= $filter->getFilterId();
16
+ $allmanu = Mage::getModel('bumble_filter/filter')->load($filter_id);
17
+ $all = $allmanu->getManufacturer();
18
+ $use = $allmanu->getUsemanufacturer();
19
+ $getLabel= $filter->getTabs();
20
+ if($getLabel == "")
21
+ {
22
+ $filtertype = $all;
23
+ }
24
+ else{
25
+ foreach ($manufacturers as $manufacturer){
26
+ if($getLabel == $manufacturer['label'])
27
+ {
28
+ $filtertype= $manufacturer['value'] ;
29
+ }
30
+ }
31
+ }
32
+ //filter for min and max price
33
+ $productColh = Mage::getModel('catalog/product')->getCollection();
34
+ if($use == 1){
35
+
36
+ $productColh->addFieldToFilter(array(
37
+ array('attribute'=>'manufacturer','eq'=>$filtertype),
38
+
39
+ ));
40
+ }
41
+ $productColh->addAttributeToSort('price', 'desc')//max
42
+ ->setPageSize(1)
43
+ ->load();
44
+
45
+ $productColg = Mage::getModel('catalog/product')->getCollection();
46
+ if($use == 1){
47
+
48
+ $productColg->addFieldToFilter(array(
49
+ array('attribute'=>'manufacturer','eq'=>$filtertype),
50
+
51
+ ));
52
+ }
53
+ $productColg->addAttributeToSort('price', 'asc')//min
54
+ ->setPageSize(1)
55
+ ->load();
56
+
57
+ $productExt = Mage::getModel('catalog/product')->getCollection();
58
+ if($use == 1){
59
+
60
+ $productExt->addFieldToFilter(array(
61
+ array('attribute'=>'manufacturer','eq'=>$filtertype),
62
+
63
+ ));
64
+ $productExt->addAttributeToFilter('price', array('gt' => $gt_price));
65
+ $productExt->addAttributeToFilter('price', array('lt' => $lt_price));
66
+ }#$gt_price &pricelt= $lt_price
67
+ $productExt->load();
68
+
69
+ $countExt = count($productExt);
70
+
71
+
72
+ $max_price = $productColh->getFirstItem()->getPrice();
73
+ $max_price = str_replace('.0000', '', $max_price);
74
+ $min_price = $productColg->getFirstItem()->getPrice();
75
+ $min_price = str_replace('.0000', '', $min_price);
76
+ //var_dump($max_price);
77
+ if($max_price > 100){ $split = 4;}
78
+ if($max_price <= 100){ $split = 2;}
79
+
80
+ $med_price = $max_price / $split;
81
+ $med_price = floor($med_price);
82
+ $diff= $max_price /3;
83
+ $diff= floor($diff);
84
+ $lt_price = $min_price + $diff;
85
+ $lt_price = floor($lt_price);
86
+ $bet_price = $med_price + $med_price;
87
+ $gt_price = $max_price - $diff ;
88
+ $gt_price = floor($gt_price);
89
+ if($split == 2)
90
+ {$l_lt_price = $lt_price - 1; $g_lt_price = $gt_price - 1; $gt_price = $min_price + $diff; $lt_price= $max_price - $diff;}
91
+ else
92
+ {$l_lt_price = $lt_price - 1; $g_lt_price = $gt_price - 1;}
93
+ $lab_lt_price = $l_lt_price .',99';
94
+
95
+ $lab_gt_price = $g_lt_price .',99';
96
+ }
97
+
98
+ /*********************** Category Option *******************************/
99
+
100
+ $filter = $coll;
101
+
102
+ $ob = new Bumble_Filter_Block_Filter_Productlist;
103
+
104
+ $pr= $ob->_getProductCollection();
105
+
106
+ $option= array();
107
+ $i = 0;
108
+ $att = array();
109
+
110
+ foreach($pr as $product) {
111
+
112
+ $categoria=$product->getCategoryIds();
113
+
114
+ $_cat=Mage::getModel('catalog/category')->load($categoria[0]);
115
+
116
+ $att[$i]= $_cat;
117
+ $i++;
118
+
119
+
120
+ }
121
+
122
+ ?>
123
+
124
+ <?php foreach ($att as $key) : ?>
125
+ <?php
126
+
127
+ //$count = $key->getProductCount();
128
+
129
+ $option[]= array('value' => $key->getId(),
130
+ 'label'=> $key->getName() );
131
+ ?>
132
+ <?php endforeach ?>
133
+
134
+ <?php $length=0; ?>
135
+ <?php foreach($option as $o): ?>
136
+ <?php $length++; ?>
137
+ <?php endforeach ?>
138
+
139
+ <?php for($i=0;$i<$length;$i++) : ?>
140
+ <?php for($j=$i+1;$j<$length;$j++) : ?>
141
+ <?php if($option[$i]['value']==$option[$j]['value']): ?>
142
+ <?php unset($option[$i]); ?>
143
+
144
+ <?php endif ?>
145
+ <?php endfor ?>
146
+ <?php endfor ?>
147
+
148
+ <?php sort($option); ?>
149
+ <?php /***************************End Category option************************/ ?>
150
+ <?php $lunghezzaArray= count($option); ?>
151
+
152
+
153
+ <?php
154
+
155
+ $url= $_SERVER['HTTP_HOST'];
156
+
157
+ $route =strtok($_SERVER["REQUEST_URI"],'?');
158
+ $cat= Mage::registry('current_group')->getFilterId();
159
+ $coll = Mage::getModel('bumble_filter/filter')->load($cat);
160
+ $_cat= $coll->getCategory();
161
+
162
+
163
+ if($_cat)
164
+ {
165
+ $category = $_cat;
166
+ }else{
167
+ $category = $_GET['category'];
168
+ }
169
+
170
+ $pricelt = $_GET['pricelt'];
171
+ $pricegt = $_GET['pricegt'];
172
+
173
+
174
+ ?>
175
+
176
+
177
+ <div class="block block-layered-nav">
178
+ <div class="block-title">
179
+ <strong><span><?php echo $this->__('Shop By') ?></span></strong>
180
+ </div>
181
+
182
+ <div class="block-content">
183
+ <!-- Categorie -->
184
+ <?php if($category != "") : ?>
185
+ <?php if($pricelt != null && $pricegt == null): ?>
186
+ <?php $pricelt= '?pricelt='.$pricelt; ?>
187
+ <?php endif ?>
188
+ <?php if($pricegt != null && $pricelt == null): ?>
189
+ <?php $pricegt= '?pricegt='.$pricegt; ?>
190
+ <?php endif ?>
191
+ <?php if($pricelt != null && $pricegt != null): ?>
192
+ <?php $pricelt= '?pricelt='.$pricelt; ?>
193
+ <?php $pricegt= '&pricegt='.$pricegt; ?>
194
+ <?php endif ?>
195
+
196
+ <div class="currently">
197
+
198
+
199
+ <a class="btn-remove" href="http://<?php echo $url; ?><?php echo $route; ?><?php echo $pricelt; ?><?php echo $pricegt; ?>" <?php if($lunghezzaArray == 1) { ?> title="Non hai altre categorie associate con i filtri impostati per questo articolo" <?php }else{ ?> title="Rimuovi questo articolo" <?php } ?>><i class="fa fa-times"></i></a>
200
+ <span class="value" style="font-size: 1.2em">Categoria:</span> <span class="value"><?php echo ' '.' '; ?><?php echo Mage::getModel('catalog/category')->load($category)->getName(); ?></span>
201
+
202
+ </div>
203
+
204
+ <?php endif ?>
205
+ <!-- Prezzo -->
206
+ <?php if($pricelt != "" || $pricegt != "" ) : ?>
207
+ <?php if($category != null): ?>
208
+ <?php $caturl= '?category='.$category; ?>
209
+ <?php endif ?>
210
+ <?php if($category == null) :?>
211
+ <?php $caturl= '' ?>
212
+ <?php endif ?>
213
+ <?php
214
+ $pricelt= $_GET['pricelt'];
215
+ $pricegt= $_GET['pricegt'];
216
+ ?>
217
+
218
+ <?php if($pricelt <= $lt_price && $pricegt == "") : ?>
219
+ <?php $label = '0,00 € - '.$lab_lt_price.' €' ?>
220
+ <?php endif ?>
221
+
222
+ <?php if( ($pricelt == $gt_price && $pricegt == $lt_price) || $pricegt == $lt_price || ($pricelt == $lt_price && $pricegt == $gt_price) ) : ?>
223
+ <?php $label = $lab_lt_price.' € - '.$lab_gt_price.' €' ?>
224
+ <?php endif ?>
225
+
226
+ <?php if($pricegt >= $gt_price && $pricelt == "") : ?>
227
+ <?php $label = 'Oltre '.$lab_gt_price.' €' ?>
228
+ <?php endif ?>
229
+
230
+
231
+ <div class="currently">
232
+
233
+
234
+ <a class="btn-remove" href="http://<?php echo $url; ?><?php echo $route; ?><?php echo $caturl; ?>" title="Rimuovi questo articolo"><i class="fa fa-times"></i></a>
235
+ <span class="value" style="font-size: 1.2em">Prezzo:</span><?php echo ' '.' '.$label; ?><span class="value"></span>
236
+
237
+ </div>
238
+
239
+ <?php endif ?>
240
+
241
+ <?php if(($pricelt != null && $category != null) || ($pricegt != null && $category != null) || ($pricegt != null && $pricelt != null && $category != null)) : ?>
242
+ <div class="actions">
243
+ <a href="http://<?php echo $url; ?><?php echo $route; ?>">Rimuovi tutto</a>
244
+ </div>
245
+ <?php endif ?>
246
+
247
+ <dl id="narrow-by-list">
248
+ <?php if($category == null) : ?>
249
+ <dt class="last odd">Categorie</dt>
250
+ <dd class="last odd">
251
+ <ol>
252
+
253
+
254
+ <?php foreach ($option as $optCat) : ?>
255
+ <?php if ($lunghezzaArray == 1){ $cat = ''; $title = $optCat['label'].' é l\'unica categoria presente'; }else{ $cat = "?category=".$optCat['value']; $title = $optCat['label']; } ?>
256
+ <?php
257
+ if( $pricelt != null && $pricegt != null && $cat != "" )
258
+ {$set_price = '&pricegt='.$pricegt.'&pricelt='.$pricelt; }
259
+ if( $pricelt != null && $pricegt != null && $cat == "" )
260
+ {$set_price = '?pricegt='.$pricegt.'&pricelt='.$pricelt;}
261
+ if($pricegt == null && $pricelt != null && $cat != "")
262
+ {$set_price = '&pricelt='.$pricelt; }
263
+ if($pricegt == null && $pricelt != null && $cat == "")
264
+ {$set_price = '?pricelt='.$pricelt;}
265
+ if( $pricelt == null && $pricegt != null && $cat != "" )
266
+ {$set_price = '&pricegt='.$pricegt; }
267
+ if( $pricelt == null && $pricegt != null && $cat == "" )
268
+ {$set_price = '?pricegt='.$pricegt;}
269
+
270
+ ?>
271
+
272
+ <li>
273
+ <a href="http://<?php echo $url; ?><?php echo $route; ?><?php echo $cat; ?><?php echo $set_price; ?>" title="<?php echo $title; ?>"><span><?php echo $optCat['label']; ?></span></a>
274
+ </li>
275
+
276
+ <?php endforeach ?>
277
+
278
+
279
+ </ol>
280
+ </dd><!-- fine primo filter -->
281
+ <?php endif ?><!-- fine category filter -->
282
+
283
+ <?php if($pricelt == null && $pricegt == null ) : ?>
284
+ <dt class="last odd">Prezzo</dt>
285
+ <dd class="last odd">
286
+ <ol>
287
+
288
+ <?php if($pricegt == "" && $pricelt == ""): ?>
289
+ <?php if($max_price <= $l_lt_price && $min_price <= $l_lt_price) : ?>
290
+ <?php
291
+ if($category != null){$cat= '&category='.$category; }else {$cat = '';}
292
+ $head = 'http://'.$url.$route.'?pricelt='.$lt_price.$cat;
293
+ header('Location: '.$head);
294
+ die();
295
+ ?>
296
+ <?php endif ?>
297
+ <?php endif ?>
298
+ <?php if($pricegt == "" && $pricelt == ""): ?>
299
+ <?php if(($max_price > $l_lt_price && $max_price <= $g_lt_price) && ($min_price > $l_lt_price && $min_price <= $g_lt_price)) : ?>
300
+ <?php
301
+ if($category != null){$cat= '&category='.$category; }else {$cat = '';}
302
+ $head = 'http://'.$url.$route.'?pricegt='.$lt_price.'&pricelt='.$gt_price.$cat;
303
+ header('Location: '.$head);
304
+ die();
305
+ ?>
306
+ <?php endif ?>
307
+ <?php endif ?>
308
+ <?php if($pricegt == "" && $pricelt == ""): ?>
309
+ <?php if($max_price > $g_lt_price && $min_price > $g_lt_price) : ?>
310
+ <?php
311
+ if($category != null){$cat= '&category='.$category; }else {$cat = '';}
312
+ $head = 'http://'.$url.$route.'?pricegt='.$gt_price.$cat;
313
+ header('Location: '.$head);
314
+ die();
315
+ ?>
316
+ <?php endif ?>
317
+ <?php endif ?>
318
+ <?php /*if($lunghezzaArray == 1) : ?>
319
+ <?php
320
+ if($pricegt != null && $pricelt != null ){
321
+ $pri= '?pricegt='.$lt_price.'&pricelt='.$gt_price;
322
+ $head = 'http://'.$url.$route.$pri.'&category='.$optCat["value"];
323
+ }else{
324
+ $head = 'http://'.$url.$route.'?category='.$optCat["value"];
325
+ }
326
+
327
+ if($pricelt != null && $pricegt == null){
328
+
329
+ $pri= '?pricelt='.$pricelt;
330
+ $head = 'http://'.$url.$route.$pri.'&category='.$optCat["value"];
331
+ }else{
332
+ $head = 'http://'.$url.$route.'?category='.$optCat["value"];
333
+ }
334
+ if($pricegt != null && $pricelt == null){
335
+ $pri= '?pricegt='.$pricegt;
336
+ $head = 'http://'.$url.$route.$pri.'&category='.$optCat["value"];
337
+ }else{
338
+ $head = 'http://'.$url.$route.'?category='.$optCat["value"];
339
+ }
340
+
341
+ header('Location: '.$head);
342
+ die();
343
+ ?>
344
+ <?php endif */?>
345
+ <!-- filtri -->
346
+ <?php if($max_price <= $l_lt_price || $min_price <= $l_lt_price) : ?>
347
+ <li>
348
+ <a href="http://<?php echo $url; ?><?php echo $route; ?>?pricelt=<?php echo $gt_price ?><?php if($category != null){echo '&category='.$category; } ?>"><span>0,00 € - <?php echo $lab_lt_price ?> €</span></a>
349
+ </li>
350
+ <?php endif ?>
351
+ <?php if( ($max_price > $l_lt_price && $max_price <= $g_lt_price) || ($max_price > $l_lt_price && $max_price >= $g_lt_price) ) : ?>
352
+ <?php
353
+ if($countExt > 1) :
354
+ ?>
355
+ <li>
356
+ <a href="http://<?php echo $url; ?><?php echo $route; ?>?pricegt=<?php echo $gt_price ?>&pricelt=<?php echo $lt_price ?><?php if($category != null){echo '&category='.$category; } ?>"><span><?php echo $lab_lt_price ?> € - <?php echo $lab_gt_price ?> €</span></a>
357
+ </li>
358
+ <?php endif ?>
359
+ <?php endif ?>
360
+ <?php if($max_price > $g_lt_price) : ?>
361
+ <li>
362
+ <a href="http://<?php echo $url; ?><?php echo $route; ?>?pricegt=<?php echo $lt_price ?><?php if($category != null){echo '&category='.$category; } ?>"><span>Oltre <?php echo $lab_gt_price ?> €</span></a>
363
+ </li>
364
+ <?php endif ?>
365
+ </ol>
366
+ </dd><!-- fine second filter -->
367
+ <?php endif ?><!-- fine if second filter -->
368
+ </dl>
369
+
370
+
371
+
372
+ </div><!-- fine blocco content -->
373
+ <script type="text/javascript">decorateDataList('narrow-by-list')</script>
374
+ </div>
375
+
376
+
377
+
378
+
379
+
380
+
app/etc/modules/Bumble_Filter.xml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Bumble_Filter>
5
+ <active>true</active>
6
+ <codePool>community</codePool>
7
+ </Bumble_Filter>
8
+ </modules>
9
+ </config>
app/locale/it_IT/Bumble_Filter.csv ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "Configuration Groups","Configurazione Gruppi"
2
+ "Add Group","Aggiungi Gruppo"
3
+ "Manage Groups","Modifica Gruppi"
4
+ "Group Name","Nome Gruppo"
5
+ "Status","Stato"
6
+ "Enable","Abilita"
7
+ "Disable","Disabilita"
8
+ "List Group Filter","Lista Gruppi"
9
+ "Title","Titolo"
10
+ "Identifier","Identificatore"
11
+ "Manufacturer","Produttore"
12
+ "Exta Attribute","Attributo Extra"
13
+ "Is Active","Attivo"
14
+ "Add Record","Aggiungi Gruppo"
15
+ "Delete","Elimina"
16
+ "Actions","Azioni"
17
+ "Groups Manager","Lista Gruppi"
18
+ "General Setting","Impostazioni Generali"
19
+ "Modules Setting","Impostazioni Modulo"
20
+ "Owl Carousel Settings","Impostazioni Owl Carousel"
21
+ "Information - Support","Informazione - Supporto"
22
+ "Enabled","Abilita"
23
+ "Layout Of Groups List Page","Layout Lista Gruppi"
24
+ "Limit Items On Listing Page","Limite elementi visibili nella pagina"
25
+ "CONFIG FOR GRID LAYOUT","CONFIGURAZIONE GRIGLIA"
26
+ "Columns in Large Screen","Colonne visibili in Large Screen"
27
+ "Columns In Medium Screen","Colonne visibili in Medium Screen"
28
+ "Columns In Small Screen","Colonne visibili in Small Screen"
29
+ "Columns In Mini Small Screen","Colonne visibili in Mini Small Screen"
30
+ "Set Width and Height for Images","Imposta Larghezza e Altezza per Immagine"
31
+ "Image Size, it is used in Group list","Dimensione Immagine nella lista Gruppi"
32
+ "Image Size, it is used in Product list","Dimensione Immagine nella lista Prodotti Gruppi"
33
+ "Group Navigator Module","Navigazione Gruppi a livelli"
34
+ "Enable Navigator Module","Abilita Navigazione Gruppi"
35
+ "Group Navigator Title","Titolo Navigazione a livelli"
36
+ "Filter by Group","Filtro per Gruppi"
37
+ "Choose Group/s to show on Navigator","Scegli il/i Gruppo/i da visualizzare nel frontend della navigazione a livelli."
38
+ "Use OWL Carousel","Usa Owl Carousel"
39
+ "Speed","Velocita"
40
+ "Determines the duration of the transition in milliseconds. Default will be 4000 milliseconds","Determinare la durata della transizione in millisecondi. Di default sará di 4000 millesecondi"
41
+ "Yes","Si"
42
+ "YES","SI"
43
+ "-- All Groups --","-- Tutti i Gruppi --"
44
+ "Grid","Griglia"
45
+ "List","Lista"
46
+ "All","Tutti"
47
+ "Total of %d record(s) were successfully deleted","Totale di %d elemento(i) sono stati cancellati con successo"
48
+ "Group was successfully saved","Gruppo salvato con successo"
49
+ "Next step field up all details, and Save your Record","Inserisci i dati per completare il salvataggio del Gruppo. "
50
+ "No records found.","Nessun record trovato"
51
+ "Carousel Title","Titolo carousel"
52
+ "Chose title you want show on the top of Carousel. Or leave empty if you wont show title","Scegli il titolo da mostrare sopra al Carousel. O lascia vuoto per disabilitare il titolo"
53
+ "If you need to insert Carousel like a block, you can paste the follow code in CMS page :","Se hai bisogno di inserire il Carousel come blocco, puoi copiare il codice seguente nella tua pagina CMS :"
54
+ "For more Info on ours module o for a support have a look on","Per ulteriori info sul nostro modulo o per un supporto tecnico visita"
55
+ "Choose how show the List Page","Scegli come vedere la Lista Gruppi"
56
+ "Limit Items Show On Groups Listing Page","Limite Elementi da vedere nella pagina lista Gruppi"
57
+ "Choose Number column will show in grid mode","Scegli il numero di colonne da visualizzare in modalitá griglia"
58
+ "Formart WidthxHeight, for example: 600x250 o Auto for basic formart","Formato LarghezzaxAltezza, per esempio 600x250 o Auto per il suo formato di base"
59
+ "Number Items will slide on a time. Default: 1","Numero di Elementi per transizione. Default: 1"
60
+ "Developers :","Sviluppatori :"
61
+ "www.armah.it/armah-extension-en/","www.armah.it/armah-extension-it/"
62
+ "Successfully Save, you can continue to edit","Salvataggio riuscito, puoi continuare a modificare"
63
+ "Your Group has been modify","Il Gruppo é stato modificato con successo"
64
+ "Save Changes And Go in Configuration Group","Salva le Modifiche e vai in Configurazione Gruppo"
65
+ "Save Changes","Salva le Modifiche"
66
+ "Save And Go in Configuration Group","Salva e vai in Configurazione Gruppo"
67
+ "Save And Continue Edit","Salva e Continua a modificare"
68
+ "General Information","Informazioni Generali"
69
+ "Group Information","Informazioni Gruppo"
70
+ "Add New Group","Aggiungi un nuovo Gruppo"
71
+ "Configuration Group","Configurazione Gruppo"
72
+ "General Information ","Informazioni Generali "
73
+ "Group: %s","Gruppo: %s"
74
+ "Save Group","Salva Gruppo"
75
+ "Back","Indietro"
76
+ "Meta Information","Informazioni Meta"
77
+ "Meta Description","Meta Descrizione"
78
+ "Select Extra Attribute","Seleziona Extra Attributo"
79
+ "Select Category","Seleziona una Categoria"
80
+ "Change status","Cambia stato"
81
+ "Page","Pagina"
82
+ " of "," di "
83
+ "Total ","Totale "
84
+ " Items"," Elementi"
85
+ "By Default the title will be the same of Label","Di Default il titolo sará uguale all'etichetta"
86
+ "Width of each slide. Set field without unit px. Default: 180px","Larghezza di ogni Slide. Imposta il valore senza l'unitá px. Default: 180px"
87
+ "Show Arrow","Mostra Freccie Direzionali"
88
+ "Slide Width","Larghezze Slide"
89
+ "Developed:","Sviluppato:"
bumble_trasf.php ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+
5
+
6
+ $a_json = array();
7
+ $a_json_row= array();
8
+
9
+
10
+ require_once 'app/Mage.php';
11
+ Mage::app();
12
+
13
+ $products = Mage::getModel('catalog/product')->getCollection();
14
+
15
+
16
+ $a_json_row[] = array( 'value' => "",
17
+ 'label' => $this->__('Select Extra Attribute'));
18
+
19
+ $res = $_GET['p'] ;
20
+
21
+
22
+ $j = 0;
23
+ $k = array();
24
+
25
+ foreach($products as $product)
26
+ {
27
+ $prod= Mage::getSingleton('catalog/product')->load($product->getId());
28
+ $attribute = $prod->getResource()->getAttribute($res);
29
+ $options= $attribute->getSource()->getAllOptions(true, true);
30
+
31
+ foreach ($options as $option)
32
+ {
33
+
34
+ if ($option['value'] == $prod->getData($res) && $prod->getData($res) != "" && !in_array($option['value'],$k))
35
+ {
36
+
37
+ $value = $option['value'];
38
+ $label = $option['label'];
39
+
40
+
41
+ $k[$j]= $option['value'];
42
+ $j++;
43
+
44
+ $a_json_row[] = array( 'value' => $value,
45
+ 'label' => $label );
46
+
47
+ }
48
+ }
49
+ }
50
+
51
+
52
+ array_push($a_json, $a_json_row);
53
+ echo json_encode($a_json);
54
+ flush();
js/bumble_filter/form/scr.js ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // JavaScript Document
2
+
3
+
4
+ function pippo(){
5
+
6
+ var x = document.getElementById("row_bumble_filter_section_one_module_head_two");
7
+ while(x.hasChildNodes())
8
+ {
9
+ x.removeChild(x.firstChild);
10
+ }
11
+
12
+
13
+ }
js/bumble_filter/form/script.js ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // JavaScript Document
2
+
3
+
4
+ function getComune(){
5
+
6
+ var x = document.getElementById("demo");
7
+ while(x.hasChildNodes())
8
+ {
9
+ x.removeChild(x.firstChild);
10
+ }
11
+
12
+
13
+ }
js/bumble_filter/form/style.css ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @charset "utf-8";
2
+ /* CSS Document */
3
+ #config_edit_form .entry-edit-head{border-left:12px solid #849BA3!important;}
4
+ #config_edit_form .entry-edit-head a{padding:8px!important;}
5
+ .box, .entry-edit fieldset, .entry-edit .fieldset{ border-color:#849BA3}
6
+ .system-fieldset-sub-head h4{ font-size:10px; font-weight:bold; color:#666; border-left:#CCC solid 5px; padding:2px 12px;}
7
+ .note{ color:#666}
8
+ tr:hover .note, tr:hover label{color:#F30;}
9
+ tr:hover label{font-weight:bold;}
10
+ .lof-description li{
11
+ margin:9px 67px!important;
12
+ list-style-type:disc
13
+ }
js/bumble_filter/jscolor/arrow.gif ADDED
Binary file
js/bumble_filter/jscolor/cross.gif ADDED
Binary file
js/bumble_filter/jscolor/hs.png ADDED
Binary file
js/bumble_filter/jscolor/hv.png ADDED
Binary file
js/bumble_filter/jscolor/jscolor.js ADDED
@@ -0,0 +1,840 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * jscolor, JavaScript Color Picker
3
+ *
4
+ * @version 1.3.1
5
+ * @license GNU Lesser General Public License, http://www.gnu.org/copyleft/lesser.html
6
+ * @author Jan Odvarko, http://odvarko.cz
7
+ * @created 2008-06-15
8
+ * @updated 2010-01-23
9
+ * @link http://jscolor.com
10
+ */
11
+
12
+
13
+ var jscolor = {
14
+
15
+
16
+ dir : '', // location of jscolor directory (leave empty to autodetect)
17
+ bindClass : 'color', // class name
18
+ binding : true, // automatic binding via <input class="...">
19
+ preloading : true, // use image preloading?
20
+
21
+
22
+ install : function() {
23
+ jscolor.addEvent(window, 'load', jscolor.init);
24
+ },
25
+
26
+
27
+ init : function() {
28
+ if(jscolor.binding) {
29
+ jscolor.bind();
30
+ }
31
+ if(jscolor.preloading) {
32
+ jscolor.preload();
33
+ }
34
+ },
35
+
36
+
37
+ getDir : function() {
38
+ if(!jscolor.dir) {
39
+ var detected = jscolor.detectDir();
40
+ jscolor.dir = detected!==false ? detected : 'jscolor/';
41
+ }
42
+ return jscolor.dir;
43
+ },
44
+
45
+
46
+ detectDir : function() {
47
+ var base = location.href;
48
+
49
+ var e = document.getElementsByTagName('base');
50
+ for(var i=0; i<e.length; i+=1) {
51
+ if(e[i].href) { base = e[i].href; }
52
+ }
53
+
54
+ var e = document.getElementsByTagName('script');
55
+ for(var i=0; i<e.length; i+=1) {
56
+ if(e[i].src && /(^|\/)jscolor\.js([?#].*)?$/i.test(e[i].src)) {
57
+ var src = new jscolor.URI(e[i].src);
58
+ var srcAbs = src.toAbsolute(base);
59
+ srcAbs.path = srcAbs.path.replace(/[^\/]+$/, ''); // remove filename
60
+ srcAbs.query = null;
61
+ srcAbs.fragment = null;
62
+ return srcAbs.toString();
63
+ }
64
+ }
65
+ return false;
66
+ },
67
+
68
+
69
+ bind : function() {
70
+ var matchClass = new RegExp('(^|\\s)('+jscolor.bindClass+')\\s*(\\{[^}]*\\})?', 'i');
71
+ var e = document.getElementsByTagName('input');
72
+ for(var i=0; i<e.length; i+=1) {
73
+ var m;
74
+ if(!e[i].color && e[i].className && (m = e[i].className.match(matchClass))) {
75
+ var prop = {};
76
+ if(m[3]) {
77
+ try {
78
+ eval('prop='+m[3]);
79
+ } catch(eInvalidProp) {}
80
+ }
81
+ e[i].color = new jscolor.color(e[i], prop);
82
+ }
83
+ }
84
+ },
85
+
86
+
87
+ preload : function() {
88
+ for(var fn in jscolor.imgRequire) {
89
+ if(jscolor.imgRequire.hasOwnProperty(fn)) {
90
+ jscolor.loadImage(fn);
91
+ }
92
+ }
93
+ },
94
+
95
+
96
+ images : {
97
+ pad : [ 181, 101 ],
98
+ sld : [ 16, 101 ],
99
+ cross : [ 15, 15 ],
100
+ arrow : [ 7, 11 ]
101
+ },
102
+
103
+
104
+ imgRequire : {},
105
+ imgLoaded : {},
106
+
107
+
108
+ requireImage : function(filename) {
109
+ jscolor.imgRequire[filename] = true;
110
+ },
111
+
112
+
113
+ loadImage : function(filename) {
114
+ if(!jscolor.imgLoaded[filename]) {
115
+ jscolor.imgLoaded[filename] = new Image();
116
+ jscolor.imgLoaded[filename].src = jscolor.getDir()+filename;
117
+ }
118
+ },
119
+
120
+
121
+ fetchElement : function(mixed) {
122
+ return typeof mixed === 'string' ? document.getElementById(mixed) : mixed;
123
+ },
124
+
125
+
126
+ addEvent : function(el, evnt, func) {
127
+ if(el.addEventListener) {
128
+ el.addEventListener(evnt, func, false);
129
+ } else if(el.attachEvent) {
130
+ el.attachEvent('on'+evnt, func);
131
+ }
132
+ },
133
+
134
+
135
+ fireEvent : function(el, evnt) {
136
+ if(!el) {
137
+ return;
138
+ }
139
+ if(document.createEventObject) {
140
+ var ev = document.createEventObject();
141
+ el.fireEvent('on'+evnt, ev);
142
+ } else if(document.createEvent) {
143
+ var ev = document.createEvent('HTMLEvents');
144
+ ev.initEvent(evnt, true, true);
145
+ el.dispatchEvent(ev);
146
+ } else if(el['on'+evnt]) { // alternatively use the traditional event model (IE5)
147
+ el['on'+evnt]();
148
+ }
149
+ },
150
+
151
+
152
+ getElementPos : function(e) {
153
+ var e1=e, e2=e;
154
+ var x=0, y=0;
155
+ if(e1.offsetParent) {
156
+ do {
157
+ x += e1.offsetLeft;
158
+ y += e1.offsetTop;
159
+ } while(e1 = e1.offsetParent);
160
+ }
161
+ while((e2 = e2.parentNode) && e2.nodeName.toUpperCase() !== 'BODY') {
162
+ x -= e2.scrollLeft;
163
+ y -= e2.scrollTop;
164
+ }
165
+ return [x, y];
166
+ },
167
+
168
+
169
+ getElementSize : function(e) {
170
+ return [e.offsetWidth, e.offsetHeight];
171
+ },
172
+
173
+
174
+ getMousePos : function(e) {
175
+ if(!e) { e = window.event; }
176
+ if(typeof e.pageX === 'number') {
177
+ return [e.pageX, e.pageY];
178
+ } else if(typeof e.clientX === 'number') {
179
+ return [
180
+ e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft,
181
+ e.clientY + document.body.scrollTop + document.documentElement.scrollTop
182
+ ];
183
+ }
184
+ },
185
+
186
+
187
+ getViewPos : function() {
188
+ if(typeof window.pageYOffset === 'number') {
189
+ return [window.pageXOffset, window.pageYOffset];
190
+ } else if(document.body && (document.body.scrollLeft || document.body.scrollTop)) {
191
+ return [document.body.scrollLeft, document.body.scrollTop];
192
+ } else if(document.documentElement && (document.documentElement.scrollLeft || document.documentElement.scrollTop)) {
193
+ return [document.documentElement.scrollLeft, document.documentElement.scrollTop];
194
+ } else {
195
+ return [0, 0];
196
+ }
197
+ },
198
+
199
+
200
+ getViewSize : function() {
201
+ if(typeof window.innerWidth === 'number') {
202
+ return [window.innerWidth, window.innerHeight];
203
+ } else if(document.body && (document.body.clientWidth || document.body.clientHeight)) {
204
+ return [document.body.clientWidth, document.body.clientHeight];
205
+ } else if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
206
+ return [document.documentElement.clientWidth, document.documentElement.clientHeight];
207
+ } else {
208
+ return [0, 0];
209
+ }
210
+ },
211
+
212
+
213
+ URI : function(uri) { // See RFC3986
214
+
215
+ this.scheme = null;
216
+ this.authority = null;
217
+ this.path = '';
218
+ this.query = null;
219
+ this.fragment = null;
220
+
221
+ this.parse = function(uri) {
222
+ var m = uri.match(/^(([A-Za-z][0-9A-Za-z+.-]*)(:))?((\/\/)([^\/?#]*))?([^?#]*)((\?)([^#]*))?((#)(.*))?/);
223
+ this.scheme = m[3] ? m[2] : null;
224
+ this.authority = m[5] ? m[6] : null;
225
+ this.path = m[7];
226
+ this.query = m[9] ? m[10] : null;
227
+ this.fragment = m[12] ? m[13] : null;
228
+ return this;
229
+ };
230
+
231
+ this.toString = function() {
232
+ var result = '';
233
+ if(this.scheme !== null) { result = result + this.scheme + ':'; }
234
+ if(this.authority !== null) { result = result + '//' + this.authority; }
235
+ if(this.path !== null) { result = result + this.path; }
236
+ if(this.query !== null) { result = result + '?' + this.query; }
237
+ if(this.fragment !== null) { result = result + '#' + this.fragment; }
238
+ return result;
239
+ };
240
+
241
+ this.toAbsolute = function(base) {
242
+ var base = new jscolor.URI(base);
243
+ var r = this;
244
+ var t = new jscolor.URI;
245
+
246
+ if(base.scheme === null) { return false; }
247
+
248
+ if(r.scheme !== null && r.scheme.toLowerCase() === base.scheme.toLowerCase()) {
249
+ r.scheme = null;
250
+ }
251
+
252
+ if(r.scheme !== null) {
253
+ t.scheme = r.scheme;
254
+ t.authority = r.authority;
255
+ t.path = removeDotSegments(r.path);
256
+ t.query = r.query;
257
+ } else {
258
+ if(r.authority !== null) {
259
+ t.authority = r.authority;
260
+ t.path = removeDotSegments(r.path);
261
+ t.query = r.query;
262
+ } else {
263
+ if(r.path === '') { // TODO: == or === ?
264
+ t.path = base.path;
265
+ if(r.query !== null) {
266
+ t.query = r.query;
267
+ } else {
268
+ t.query = base.query;
269
+ }
270
+ } else {
271
+ if(r.path.substr(0,1) === '/') {
272
+ t.path = removeDotSegments(r.path);
273
+ } else {
274
+ if(base.authority !== null && base.path === '') { // TODO: == or === ?
275
+ t.path = '/'+r.path;
276
+ } else {
277
+ t.path = base.path.replace(/[^\/]+$/,'')+r.path;
278
+ }
279
+ t.path = removeDotSegments(t.path);
280
+ }
281
+ t.query = r.query;
282
+ }
283
+ t.authority = base.authority;
284
+ }
285
+ t.scheme = base.scheme;
286
+ }
287
+ t.fragment = r.fragment;
288
+
289
+ return t;
290
+ };
291
+
292
+ function removeDotSegments(path) {
293
+ var out = '';
294
+ while(path) {
295
+ if(path.substr(0,3)==='../' || path.substr(0,2)==='./') {
296
+ path = path.replace(/^\.+/,'').substr(1);
297
+ } else if(path.substr(0,3)==='/./' || path==='/.') {
298
+ path = '/'+path.substr(3);
299
+ } else if(path.substr(0,4)==='/../' || path==='/..') {
300
+ path = '/'+path.substr(4);
301
+ out = out.replace(/\/?[^\/]*$/, '');
302
+ } else if(path==='.' || path==='..') {
303
+ path = '';
304
+ } else {
305
+ var rm = path.match(/^\/?[^\/]*/)[0];
306
+ path = path.substr(rm.length);
307
+ out = out + rm;
308
+ }
309
+ }
310
+ return out;
311
+ }
312
+
313
+ if(uri) {
314
+ this.parse(uri);
315
+ }
316
+
317
+ },
318
+
319
+
320
+ /*
321
+ * Usage example:
322
+ * var myColor = new jscolor.color(myInputElement)
323
+ */
324
+
325
+ color : function(target, prop) {
326
+
327
+
328
+ this.required = true; // refuse empty values?
329
+ this.adjust = true; // adjust value to uniform notation?
330
+ this.hash = false; // prefix color with # symbol?
331
+ this.caps = true; // uppercase?
332
+ this.valueElement = target; // value holder
333
+ this.styleElement = target; // where to reflect current color
334
+ this.hsv = [0, 0, 1]; // read-only 0-6, 0-1, 0-1
335
+ this.rgb = [1, 1, 1]; // read-only 0-1, 0-1, 0-1
336
+
337
+ this.pickerOnfocus = true; // display picker on focus?
338
+ this.pickerMode = 'HSV'; // HSV | HVS
339
+ this.pickerPosition = 'bottom'; // left | right | top | bottom
340
+ this.pickerFace = 10; // px
341
+ this.pickerFaceColor = 'ThreeDFace'; // CSS color
342
+ this.pickerBorder = 1; // px
343
+ this.pickerBorderColor = 'ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight'; // CSS color
344
+ this.pickerInset = 1; // px
345
+ this.pickerInsetColor = 'ThreeDShadow ThreeDHighlight ThreeDHighlight ThreeDShadow'; // CSS color
346
+ this.pickerZIndex = 10000;
347
+
348
+
349
+ for(var p in prop) {
350
+ if(prop.hasOwnProperty(p)) {
351
+ this[p] = prop[p];
352
+ }
353
+ }
354
+
355
+
356
+ this.hidePicker = function() {
357
+ if(isPickerOwner()) {
358
+ removePicker();
359
+ }
360
+ };
361
+
362
+
363
+ this.showPicker = function() {
364
+ if(!isPickerOwner()) {
365
+ var tp = jscolor.getElementPos(target); // target pos
366
+ var ts = jscolor.getElementSize(target); // target size
367
+ var vp = jscolor.getViewPos(); // view pos
368
+ var vs = jscolor.getViewSize(); // view size
369
+ var ps = [ // picker size
370
+ 2*this.pickerBorder + 4*this.pickerInset + 2*this.pickerFace + jscolor.images.pad[0] + 2*jscolor.images.arrow[0] + jscolor.images.sld[0],
371
+ 2*this.pickerBorder + 2*this.pickerInset + 2*this.pickerFace + jscolor.images.pad[1]
372
+ ];
373
+ var a, b, c;
374
+ switch(this.pickerPosition.toLowerCase()) {
375
+ case 'left': a=1; b=0; c=-1; break;
376
+ case 'right':a=1; b=0; c=1; break;
377
+ case 'top': a=0; b=1; c=-1; break;
378
+ default: a=0; b=1; c=1; break;
379
+ }
380
+ var l = (ts[b]+ps[b])/2;
381
+ var pp = [ // picker pos
382
+ -vp[a]+tp[a]+ps[a] > vs[a] ?
383
+ (-vp[a]+tp[a]+ts[a]/2 > vs[a]/2 && tp[a]+ts[a]-ps[a] >= 0 ? tp[a]+ts[a]-ps[a] : tp[a]) :
384
+ tp[a],
385
+ -vp[b]+tp[b]+ts[b]+ps[b]-l+l*c > vs[b] ?
386
+ (-vp[b]+tp[b]+ts[b]/2 > vs[b]/2 && tp[b]+ts[b]-l-l*c >= 0 ? tp[b]+ts[b]-l-l*c : tp[b]+ts[b]-l+l*c) :
387
+ (tp[b]+ts[b]-l+l*c >= 0 ? tp[b]+ts[b]-l+l*c : tp[b]+ts[b]-l-l*c)
388
+ ];
389
+ drawPicker(pp[a], pp[b]);
390
+ }
391
+ };
392
+
393
+
394
+ this.importColor = function() {
395
+ if(!valueElement) {
396
+ this.exportColor();
397
+ } else {
398
+ if(!this.adjust) {
399
+ if(!this.fromString(valueElement.value, leaveValue)) {
400
+ styleElement.style.backgroundColor = styleElement.jscStyle.backgroundColor;
401
+ styleElement.style.color = styleElement.jscStyle.color;
402
+ this.exportColor(leaveValue | leaveStyle);
403
+ }
404
+ } else if(!this.required && /^\s*$/.test(valueElement.value)) {
405
+ valueElement.value = '';
406
+ styleElement.style.backgroundColor = styleElement.jscStyle.backgroundColor;
407
+ styleElement.style.color = styleElement.jscStyle.color;
408
+ this.exportColor(leaveValue | leaveStyle);
409
+
410
+ } else if(this.fromString(valueElement.value)) {
411
+ // OK
412
+ } else {
413
+ this.exportColor();
414
+ }
415
+ }
416
+ };
417
+
418
+
419
+ this.exportColor = function(flags) {
420
+ if(!(flags & leaveValue) && valueElement) {
421
+ var value = this.toString();
422
+ if(this.caps) { value = value.toUpperCase(); }
423
+ if(this.hash) { value = '#'+value; }
424
+ valueElement.value = value;
425
+ }
426
+ if(!(flags & leaveStyle) && styleElement) {
427
+ styleElement.style.backgroundColor =
428
+ '#'+this.toString();
429
+ styleElement.style.color =
430
+ 0.213 * this.rgb[0] +
431
+ 0.715 * this.rgb[1] +
432
+ 0.072 * this.rgb[2]
433
+ < 0.5 ? '#FFF' : '#000';
434
+ }
435
+ if(!(flags & leavePad) && isPickerOwner()) {
436
+ redrawPad();
437
+ }
438
+ if(!(flags & leaveSld) && isPickerOwner()) {
439
+ redrawSld();
440
+ }
441
+ };
442
+
443
+
444
+ this.fromHSV = function(h, s, v, flags) { // null = don't change
445
+ h<0 && (h=0) || h>6 && (h=6);
446
+ s<0 && (s=0) || s>1 && (s=1);
447
+ v<0 && (v=0) || v>1 && (v=1);
448
+ this.rgb = HSV_RGB(
449
+ h===null ? this.hsv[0] : (this.hsv[0]=h),
450
+ s===null ? this.hsv[1] : (this.hsv[1]=s),
451
+ v===null ? this.hsv[2] : (this.hsv[2]=v)
452
+ );
453
+ this.exportColor(flags);
454
+ };
455
+
456
+
457
+ this.fromRGB = function(r, g, b, flags) { // null = don't change
458
+ r<0 && (r=0) || r>1 && (r=1);
459
+ g<0 && (g=0) || g>1 && (g=1);
460
+ b<0 && (b=0) || b>1 && (b=1);
461
+ var hsv = RGB_HSV(
462
+ r===null ? this.rgb[0] : (this.rgb[0]=r),
463
+ g===null ? this.rgb[1] : (this.rgb[1]=g),
464
+ b===null ? this.rgb[2] : (this.rgb[2]=b)
465
+ );
466
+ if(hsv[0] !== null) {
467
+ this.hsv[0] = hsv[0];
468
+ }
469
+ if(hsv[2] !== 0) {
470
+ this.hsv[1] = hsv[1];
471
+ }
472
+ this.hsv[2] = hsv[2];
473
+ this.exportColor(flags);
474
+ };
475
+
476
+
477
+ this.fromString = function(hex, flags) {
478
+ var m = hex.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i);
479
+ if(!m) {
480
+ return false;
481
+ } else {
482
+ if(m[1].length === 6) { // 6-char notation
483
+ this.fromRGB(
484
+ parseInt(m[1].substr(0,2),16) / 255,
485
+ parseInt(m[1].substr(2,2),16) / 255,
486
+ parseInt(m[1].substr(4,2),16) / 255,
487
+ flags
488
+ );
489
+ } else { // 3-char notation
490
+ this.fromRGB(
491
+ parseInt(m[1].charAt(0)+m[1].charAt(0),16) / 255,
492
+ parseInt(m[1].charAt(1)+m[1].charAt(1),16) / 255,
493
+ parseInt(m[1].charAt(2)+m[1].charAt(2),16) / 255,
494
+ flags
495
+ );
496
+ }
497
+ return true;
498
+ }
499
+ };
500
+
501
+
502
+ this.toString = function() {
503
+ return (
504
+ (0x100 | Math.round(255*this.rgb[0])).toString(16).substr(1) +
505
+ (0x100 | Math.round(255*this.rgb[1])).toString(16).substr(1) +
506
+ (0x100 | Math.round(255*this.rgb[2])).toString(16).substr(1)
507
+ );
508
+ };
509
+
510
+
511
+ function RGB_HSV(r, g, b) {
512
+ var n = Math.min(Math.min(r,g),b);
513
+ var v = Math.max(Math.max(r,g),b);
514
+ var m = v - n;
515
+ if(m === 0) { return [ null, 0, v ]; }
516
+ var h = r===n ? 3+(b-g)/m : (g===n ? 5+(r-b)/m : 1+(g-r)/m);
517
+ return [ h===6?0:h, m/v, v ];
518
+ }
519
+
520
+
521
+ function HSV_RGB(h, s, v) {
522
+ if(h === null) { return [ v, v, v ]; }
523
+ var i = Math.floor(h);
524
+ var f = i%2 ? h-i : 1-(h-i);
525
+ var m = v * (1 - s);
526
+ var n = v * (1 - s*f);
527
+ switch(i) {
528
+ case 6:
529
+ case 0: return [v,n,m];
530
+ case 1: return [n,v,m];
531
+ case 2: return [m,v,n];
532
+ case 3: return [m,n,v];
533
+ case 4: return [n,m,v];
534
+ case 5: return [v,m,n];
535
+ }
536
+ }
537
+
538
+
539
+ function removePicker() {
540
+ delete jscolor.picker.owner;
541
+ document.getElementsByTagName('body')[0].removeChild(jscolor.picker.boxB);
542
+ }
543
+
544
+
545
+ function drawPicker(x, y) {
546
+ if(!jscolor.picker) {
547
+ jscolor.picker = {
548
+ box : document.createElement('div'),
549
+ boxB : document.createElement('div'),
550
+ pad : document.createElement('div'),
551
+ padB : document.createElement('div'),
552
+ padM : document.createElement('div'),
553
+ sld : document.createElement('div'),
554
+ sldB : document.createElement('div'),
555
+ sldM : document.createElement('div')
556
+ };
557
+ for(var i=0,segSize=4; i<jscolor.images.sld[1]; i+=segSize) {
558
+ var seg = document.createElement('div');
559
+ seg.style.height = segSize+'px';
560
+ seg.style.fontSize = '1px';
561
+ seg.style.lineHeight = '0';
562
+ jscolor.picker.sld.appendChild(seg);
563
+ }
564
+ jscolor.picker.sldB.appendChild(jscolor.picker.sld);
565
+ jscolor.picker.box.appendChild(jscolor.picker.sldB);
566
+ jscolor.picker.box.appendChild(jscolor.picker.sldM);
567
+ jscolor.picker.padB.appendChild(jscolor.picker.pad);
568
+ jscolor.picker.box.appendChild(jscolor.picker.padB);
569
+ jscolor.picker.box.appendChild(jscolor.picker.padM);
570
+ jscolor.picker.boxB.appendChild(jscolor.picker.box);
571
+ }
572
+
573
+ var p = jscolor.picker;
574
+
575
+ // recompute controls positions
576
+ posPad = [
577
+ x+THIS.pickerBorder+THIS.pickerFace+THIS.pickerInset,
578
+ y+THIS.pickerBorder+THIS.pickerFace+THIS.pickerInset ];
579
+ posSld = [
580
+ null,
581
+ y+THIS.pickerBorder+THIS.pickerFace+THIS.pickerInset ];
582
+
583
+ // controls interaction
584
+ p.box.onmouseup =
585
+ p.box.onmouseout = function() { target.focus(); };
586
+ p.box.onmousedown = function() { abortBlur=true; };
587
+ p.box.onmousemove = function(e) { holdPad && setPad(e); holdSld && setSld(e); };
588
+ p.padM.onmouseup =
589
+ p.padM.onmouseout = function() { if(holdPad) { holdPad=false; jscolor.fireEvent(valueElement,'change'); } };
590
+ p.padM.onmousedown = function(e) { holdPad=true; setPad(e); };
591
+ p.sldM.onmouseup =
592
+ p.sldM.onmouseout = function() { if(holdSld) { holdSld=false; jscolor.fireEvent(valueElement,'change'); } };
593
+ p.sldM.onmousedown = function(e) { holdSld=true; setSld(e); };
594
+
595
+ // picker
596
+ p.box.style.width = 4*THIS.pickerInset + 2*THIS.pickerFace + jscolor.images.pad[0] + 2*jscolor.images.arrow[0] + jscolor.images.sld[0] + 'px';
597
+ p.box.style.height = 2*THIS.pickerInset + 2*THIS.pickerFace + jscolor.images.pad[1] + 'px';
598
+
599
+ // picker border
600
+ p.boxB.style.position = 'absolute';
601
+ p.boxB.style.clear = 'both';
602
+ p.boxB.style.left = x+'px';
603
+ p.boxB.style.top = y+'px';
604
+ p.boxB.style.zIndex = THIS.pickerZIndex;
605
+ p.boxB.style.border = THIS.pickerBorder+'px solid';
606
+ p.boxB.style.borderColor = THIS.pickerBorderColor;
607
+ p.boxB.style.background = THIS.pickerFaceColor;
608
+
609
+ // pad image
610
+ p.pad.style.width = jscolor.images.pad[0]+'px';
611
+ p.pad.style.height = jscolor.images.pad[1]+'px';
612
+
613
+ // pad border
614
+ p.padB.style.position = 'absolute';
615
+ p.padB.style.left = THIS.pickerFace+'px';
616
+ p.padB.style.top = THIS.pickerFace+'px';
617
+ p.padB.style.border = THIS.pickerInset+'px solid';
618
+ p.padB.style.borderColor = THIS.pickerInsetColor;
619
+
620
+ // pad mouse area
621
+ p.padM.style.position = 'absolute';
622
+ p.padM.style.left = '0';
623
+ p.padM.style.top = '0';
624
+ p.padM.style.width = THIS.pickerFace + 2*THIS.pickerInset + jscolor.images.pad[0] + jscolor.images.arrow[0] + 'px';
625
+ p.padM.style.height = p.box.style.height;
626
+ p.padM.style.cursor = 'crosshair';
627
+
628
+ // slider image
629
+ p.sld.style.overflow = 'hidden';
630
+ p.sld.style.width = jscolor.images.sld[0]+'px';
631
+ p.sld.style.height = jscolor.images.sld[1]+'px';
632
+
633
+ // slider border
634
+ p.sldB.style.position = 'absolute';
635
+ p.sldB.style.right = THIS.pickerFace+'px';
636
+ p.sldB.style.top = THIS.pickerFace+'px';
637
+ p.sldB.style.border = THIS.pickerInset+'px solid';
638
+ p.sldB.style.borderColor = THIS.pickerInsetColor;
639
+
640
+ // slider mouse area
641
+ p.sldM.style.position = 'absolute';
642
+ p.sldM.style.right = '0';
643
+ p.sldM.style.top = '0';
644
+ p.sldM.style.width = jscolor.images.sld[0] + jscolor.images.arrow[0] + THIS.pickerFace + 2*THIS.pickerInset + 'px';
645
+ p.sldM.style.height = p.box.style.height;
646
+ try {
647
+ p.sldM.style.cursor = 'pointer';
648
+ } catch(eOldIE) {
649
+ p.sldM.style.cursor = 'hand';
650
+ }
651
+
652
+ // load images in optimal order
653
+ switch(modeID) {
654
+ case 0: var padImg = 'hs.png'; break;
655
+ case 1: var padImg = 'hv.png'; break;
656
+ }
657
+ p.padM.style.background = "url('"+jscolor.getDir()+"cross.gif') no-repeat";
658
+ p.sldM.style.background = "url('"+jscolor.getDir()+"arrow.gif') no-repeat";
659
+ p.pad.style.background = "url('"+jscolor.getDir()+padImg+"') 0 0 no-repeat";
660
+
661
+ // place pointers
662
+ redrawPad();
663
+ redrawSld();
664
+
665
+ jscolor.picker.owner = THIS;
666
+ document.getElementsByTagName('body')[0].appendChild(p.boxB);
667
+ }
668
+
669
+
670
+ function redrawPad() {
671
+ // redraw the pad pointer
672
+ switch(modeID) {
673
+ case 0: var yComponent = 1; break;
674
+ case 1: var yComponent = 2; break;
675
+ }
676
+ var x = Math.round((THIS.hsv[0]/6) * (jscolor.images.pad[0]-1));
677
+ var y = Math.round((1-THIS.hsv[yComponent]) * (jscolor.images.pad[1]-1));
678
+ jscolor.picker.padM.style.backgroundPosition =
679
+ (THIS.pickerFace+THIS.pickerInset+x - Math.floor(jscolor.images.cross[0]/2)) + 'px ' +
680
+ (THIS.pickerFace+THIS.pickerInset+y - Math.floor(jscolor.images.cross[1]/2)) + 'px';
681
+
682
+ // redraw the slider image
683
+ var seg = jscolor.picker.sld.childNodes;
684
+
685
+ switch(modeID) {
686
+ case 0:
687
+ var rgb = HSV_RGB(THIS.hsv[0], THIS.hsv[1], 1);
688
+ for(var i=0; i<seg.length; i+=1) {
689
+ seg[i].style.backgroundColor = 'rgb('+
690
+ (rgb[0]*(1-i/seg.length)*100)+'%,'+
691
+ (rgb[1]*(1-i/seg.length)*100)+'%,'+
692
+ (rgb[2]*(1-i/seg.length)*100)+'%)';
693
+ }
694
+ break;
695
+ case 1:
696
+ var rgb, s, c = [ THIS.hsv[2], 0, 0 ];
697
+ var i = Math.floor(THIS.hsv[0]);
698
+ var f = i%2 ? THIS.hsv[0]-i : 1-(THIS.hsv[0]-i);
699
+ switch(i) {
700
+ case 6:
701
+ case 0: rgb=[0,1,2]; break;
702
+ case 1: rgb=[1,0,2]; break;
703
+ case 2: rgb=[2,0,1]; break;
704
+ case 3: rgb=[2,1,0]; break;
705
+ case 4: rgb=[1,2,0]; break;
706
+ case 5: rgb=[0,2,1]; break;
707
+ }
708
+ for(var i=0; i<seg.length; i+=1) {
709
+ s = 1 - 1/(seg.length-1)*i;
710
+ c[1] = c[0] * (1 - s*f);
711
+ c[2] = c[0] * (1 - s);
712
+ seg[i].style.backgroundColor = 'rgb('+
713
+ (c[rgb[0]]*100)+'%,'+
714
+ (c[rgb[1]]*100)+'%,'+
715
+ (c[rgb[2]]*100)+'%)';
716
+ }
717
+ break;
718
+ }
719
+ }
720
+
721
+
722
+ function redrawSld() {
723
+ // redraw the slider pointer
724
+ switch(modeID) {
725
+ case 0: var yComponent = 2; break;
726
+ case 1: var yComponent = 1; break;
727
+ }
728
+ var y = Math.round((1-THIS.hsv[yComponent]) * (jscolor.images.sld[1]-1));
729
+ jscolor.picker.sldM.style.backgroundPosition =
730
+ '0 ' + (THIS.pickerFace+THIS.pickerInset+y - Math.floor(jscolor.images.arrow[1]/2)) + 'px';
731
+ }
732
+
733
+
734
+ function isPickerOwner() {
735
+ return jscolor.picker && jscolor.picker.owner === THIS;
736
+ }
737
+
738
+
739
+ function blurTarget() {
740
+ if(valueElement === target) {
741
+ THIS.importColor();
742
+ }
743
+ if(THIS.pickerOnfocus) {
744
+ THIS.hidePicker();
745
+ }
746
+ }
747
+
748
+
749
+ function blurValue() {
750
+ if(valueElement !== target) {
751
+ THIS.importColor();
752
+ }
753
+ }
754
+
755
+
756
+ function setPad(e) {
757
+ var posM = jscolor.getMousePos(e);
758
+ var x = posM[0]-posPad[0];
759
+ var y = posM[1]-posPad[1];
760
+ switch(modeID) {
761
+ case 0: THIS.fromHSV(x*(6/(jscolor.images.pad[0]-1)), 1 - y/(jscolor.images.pad[1]-1), null, leaveSld); break;
762
+ case 1: THIS.fromHSV(x*(6/(jscolor.images.pad[0]-1)), null, 1 - y/(jscolor.images.pad[1]-1), leaveSld); break;
763
+ }
764
+ }
765
+
766
+
767
+ function setSld(e) {
768
+ var posM = jscolor.getMousePos(e);
769
+ var y = posM[1]-posPad[1];
770
+ switch(modeID) {
771
+ case 0: THIS.fromHSV(null, null, 1 - y/(jscolor.images.sld[1]-1), leavePad); break;
772
+ case 1: THIS.fromHSV(null, 1 - y/(jscolor.images.sld[1]-1), null, leavePad); break;
773
+ }
774
+ }
775
+
776
+
777
+ var THIS = this;
778
+ var modeID = this.pickerMode.toLowerCase()==='hvs' ? 1 : 0;
779
+ var abortBlur = false;
780
+ var
781
+ valueElement = jscolor.fetchElement(this.valueElement),
782
+ styleElement = jscolor.fetchElement(this.styleElement);
783
+ var
784
+ holdPad = false,
785
+ holdSld = false;
786
+ var
787
+ posPad,
788
+ posSld;
789
+ var
790
+ leaveValue = 1<<0,
791
+ leaveStyle = 1<<1,
792
+ leavePad = 1<<2,
793
+ leaveSld = 1<<3;
794
+
795
+ // target
796
+ jscolor.addEvent(target, 'focus', function() {
797
+ if(THIS.pickerOnfocus) { THIS.showPicker(); }
798
+ });
799
+ jscolor.addEvent(target, 'blur', function() {
800
+ if(!abortBlur) {
801
+ window.setTimeout(function(){ abortBlur || blurTarget(); abortBlur=false; }, 0);
802
+ } else {
803
+ abortBlur = false;
804
+ }
805
+ });
806
+
807
+ // valueElement
808
+ if(valueElement) {
809
+ var updateField = function() {
810
+ THIS.fromString(valueElement.value, leaveValue);
811
+ };
812
+ jscolor.addEvent(valueElement, 'keyup', updateField);
813
+ jscolor.addEvent(valueElement, 'input', updateField);
814
+ jscolor.addEvent(valueElement, 'blur', blurValue);
815
+ valueElement.setAttribute('autocomplete', 'off');
816
+ }
817
+
818
+ // styleElement
819
+ if(styleElement) {
820
+ styleElement.jscStyle = {
821
+ backgroundColor : styleElement.style.backgroundColor,
822
+ color : styleElement.style.color
823
+ };
824
+ }
825
+
826
+ // require images
827
+ switch(modeID) {
828
+ case 0: jscolor.requireImage('hs.png'); break;
829
+ case 1: jscolor.requireImage('hv.png'); break;
830
+ }
831
+ jscolor.requireImage('cross.gif');
832
+ jscolor.requireImage('arrow.gif');
833
+
834
+ this.importColor();
835
+ }
836
+
837
+ };
838
+
839
+
840
+ jscolor.install();
js/bumble_filter/jssor.slider.min.js ADDED
@@ -0,0 +1,2 @@
 
 
1
+ (function(k,f,c,j,d,l,g){/*! Jssor */
2
+ new(function(){this.$DebugMode=d;this.$Log=function(c,d){var a=k.console||{},b=this.$DebugMode;if(b&&a.log)a.log(c);else b&&d&&alert(c)};this.$Error=function(b,d){var c=k.console||{},a=this.$DebugMode;if(a&&c.error)c.error(b);else a&&alert(b);if(a)throw d||new Error(b);};this.$Fail=function(a){throw new Error(a);};this.$Assert=function(b,c){var a=this.$DebugMode;if(a)if(!b)throw new Error("Assert failed "+c||"");};this.$Trace=function(c){var a=k.console||{},b=this.$DebugMode;b&&a.log&&a.log(c)};this.$Execute=function(b){var a=this.$DebugMode;a&&b()};this.$LiveStamp=function(c,d){var b=this.$DebugMode;if(b){var a=f.createElement("DIV");a.setAttribute("id",d);c.$Live=a}};this.$C_AbstractProperty=function(){throw new Error("The property is abstract, it should be implemented by subclass.");};this.$C_AbstractMethod=function(){throw new Error("The method is abstract, it should be implemented by subclass.");};function a(b){if(b.constructor===a.caller)throw new Error("Cannot create instance of an abstract class.");}this.$C_AbstractClass=a});var e=k.$JssorEasing$={$EaseSwing:function(a){return-c.cos(a*c.PI)/2+.5},$EaseLinear:function(a){return a},$EaseInQuad:function(a){return a*a},$EaseOutQuad:function(a){return-a*(a-2)},$EaseInOutQuad:function(a){return(a*=2)<1?1/2*a*a:-1/2*(--a*(a-2)-1)},$EaseInCubic:function(a){return a*a*a},$EaseOutCubic:function(a){return(a-=1)*a*a+1},$EaseInOutCubic:function(a){return(a*=2)<1?1/2*a*a*a:1/2*((a-=2)*a*a+2)},$EaseInQuart:function(a){return a*a*a*a},$EaseOutQuart:function(a){return-((a-=1)*a*a*a-1)},$EaseInOutQuart:function(a){return(a*=2)<1?1/2*a*a*a*a:-1/2*((a-=2)*a*a*a-2)},$EaseInQuint:function(a){return a*a*a*a*a},$EaseOutQuint:function(a){return(a-=1)*a*a*a*a+1},$EaseInOutQuint:function(a){return(a*=2)<1?1/2*a*a*a*a*a:1/2*((a-=2)*a*a*a*a+2)},$EaseInSine:function(a){return 1-c.cos(a*c.PI/2)},$EaseOutSine:function(a){return c.sin(a*c.PI/2)},$EaseInOutSine:function(a){return-1/2*(c.cos(c.PI*a)-1)},$EaseInExpo:function(a){return a==0?0:c.pow(2,10*(a-1))},$EaseOutExpo:function(a){return a==1?1:-c.pow(2,-10*a)+1},$EaseInOutExpo:function(a){return a==0||a==1?a:(a*=2)<1?1/2*c.pow(2,10*(a-1)):1/2*(-c.pow(2,-10*--a)+2)},$EaseInCirc:function(a){return-(c.sqrt(1-a*a)-1)},$EaseOutCirc:function(a){return c.sqrt(1-(a-=1)*a)},$EaseInOutCirc:function(a){return(a*=2)<1?-1/2*(c.sqrt(1-a*a)-1):1/2*(c.sqrt(1-(a-=2)*a)+1)},$EaseInElastic:function(a){if(!a||a==1)return a;var b=.3,d=.075;return-(c.pow(2,10*(a-=1))*c.sin((a-d)*2*c.PI/b))},$EaseOutElastic:function(a){if(!a||a==1)return a;var b=.3,d=.075;return c.pow(2,-10*a)*c.sin((a-d)*2*c.PI/b)+1},$EaseInOutElastic:function(a){if(!a||a==1)return a;var b=.45,d=.1125;return(a*=2)<1?-.5*c.pow(2,10*(a-=1))*c.sin((a-d)*2*c.PI/b):c.pow(2,-10*(a-=1))*c.sin((a-d)*2*c.PI/b)*.5+1},$EaseInBack:function(a){var b=1.70158;return a*a*((b+1)*a-b)},$EaseOutBack:function(a){var b=1.70158;return(a-=1)*a*((b+1)*a+b)+1},$EaseInOutBack:function(a){var b=1.70158;return(a*=2)<1?1/2*a*a*(((b*=1.525)+1)*a-b):1/2*((a-=2)*a*(((b*=1.525)+1)*a+b)+2)},$EaseInBounce:function(a){return 1-e.$EaseOutBounce(1-a)},$EaseOutBounce:function(a){return a<1/2.75?7.5625*a*a:a<2/2.75?7.5625*(a-=1.5/2.75)*a+.75:a<2.5/2.75?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375},$EaseInOutBounce:function(a){return a<1/2?e.$EaseInBounce(a*2)*.5:e.$EaseOutBounce(a*2-1)*.5+.5},$EaseGoBack:function(a){return 1-c.abs(2-1)},$EaseInWave:function(a){return 1-c.cos(a*c.PI*2)},$EaseOutWave:function(a){return c.sin(a*c.PI*2)},$EaseOutJump:function(a){return 1-((a*=2)<1?(a=1-a)*a*a:(a-=1)*a*a)},$EaseInJump:function(a){return(a*=2)<1?a*a*a:(a=2-a)*a*a}},h=k.$Jease$={$Swing:e.$EaseSwing,$Linear:e.$EaseLinear,$InQuad:e.$EaseInQuad,$OutQuad:e.$EaseOutQuad,$InOutQuad:e.$EaseInOutQuad,$InCubic:e.$EaseInCubic,$OutCubic:e.$EaseOutCubic,$InOutCubic:e.$EaseInOutCubic,$InQuart:e.$EaseInQuart,$OutQuart:e.$EaseOutQuart,$InOutQuart:e.$EaseInOutQuart,$InQuint:e.$EaseInQuint,$OutQuint:e.$EaseOutQuint,$InOutQuint:e.$EaseInOutQuint,$InSine:e.$EaseInSine,$OutSine:e.$EaseOutSine,$InOutSine:e.$EaseInOutSine,$InExpo:e.$EaseInExpo,$OutExpo:e.$EaseOutExpo,$InOutExpo:e.$EaseInOutExpo,$InCirc:e.$EaseInCirc,$OutCirc:e.$EaseOutCirc,$InOutCirc:e.$EaseInOutCirc,$InElastic:e.$EaseInElastic,$OutElastic:e.$EaseOutElastic,$InOutElastic:e.$EaseInOutElastic,$InBack:e.$EaseInBack,$OutBack:e.$EaseOutBack,$InOutBack:e.$EaseInOutBack,$InBounce:e.$EaseInBounce,$OutBounce:e.$EaseOutBounce,$InOutBounce:e.$EaseInOutBounce,$GoBack:e.$EaseGoBack,$InWave:e.$EaseInWave,$OutWave:e.$EaseOutWave,$OutJump:e.$EaseOutJump,$InJump:e.$EaseInJump};k.$JssorDirection$={$TO_LEFT:1,$TO_RIGHT:2,$TO_TOP:4,$TO_BOTTOM:8,$HORIZONTAL:3,$VERTICAL:12,$GetDirectionHorizontal:function(a){return a&3},$GetDirectionVertical:function(a){return a&12},$IsHorizontal:function(a){return a&3},$IsVertical:function(a){return a&12}};var b=k.$Jssor$=new function(){var h=this,Ab=/\S+/g,L=1,jb=2,nb=3,mb=4,rb=5,M,s=0,i=0,t=0,z=0,A=0,D=navigator,vb=D.appName,o=D.userAgent,y=f.documentElement,q=parseFloat;function Jb(){if(!M){M={$Touchable:"ontouchstart"in k||"createTouch"in f};var a;if(D.pointerEnabled||(a=D.msPointerEnabled))M.$TouchActionAttr=a?"msTouchAction":"touchAction"}return M}function v(h){if(!s){s=-1;if(vb=="Microsoft Internet Explorer"&&!!k.attachEvent&&!!k.ActiveXObject){var e=o.indexOf("MSIE");s=L;t=q(o.substring(e+5,o.indexOf(";",e)));/*@cc_on z=@_jscript_version@*/;i=f.documentMode||t}else if(vb=="Netscape"&&!!k.addEventListener){var d=o.indexOf("Firefox"),b=o.indexOf("Safari"),g=o.indexOf("Chrome"),c=o.indexOf("AppleWebKit");if(d>=0){s=jb;i=q(o.substring(d+8))}else if(b>=0){var j=o.substring(0,b).lastIndexOf("/");s=g>=0?mb:nb;i=q(o.substring(j+1,b))}else{var a=/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/i.exec(o);if(a){s=L;i=t=q(a[1])}}if(c>=0)A=q(o.substring(c+12))}else{var a=/(opera)(?:.*version|)[ \/]([\w.]+)/i.exec(o);if(a){s=rb;i=q(a[2])}}}return h==s}function r(){return v(L)}function T(){return r()&&(i<6||f.compatMode=="BackCompat")}function Bb(){return v(jb)}function lb(){return v(nb)}function Eb(){return v(mb)}function qb(){return v(rb)}function gb(){return lb()&&A>534&&A<535}function H(){v();return A>537||i>42||s==L&&i>=11}function R(){return r()&&i<9}function hb(a){var b,c;return function(f){if(!b){b=d;var e=a.substr(0,1).toUpperCase()+a.substr(1);n([a].concat(["WebKit","ms","Moz","O","webkit"]),function(h,d){var b=a;if(d)b=h+e;if(f.style[b]!=g)return c=b})}return c}}function fb(b){var a;return function(c){a=a||hb(b)(c)||b;return a}}var N=fb("transform");function ub(a){return{}.toString.call(a)}var K;function Gb(){if(!K){K={};n(["Boolean","Number","String","Function","Array","Date","RegExp","Object"],function(a){K["[object "+a+"]"]=a.toLowerCase()})}return K}function n(b,d){var a,c;if(ub(b)=="[object Array]"){for(a=0;a<b.length;a++)if(c=d(b[a],a,b))return c}else for(a in b)if(c=d(b[a],a,b))return c}function F(a){return a==j?String(a):Gb()[ub(a)]||"object"}function sb(a){for(var b in a)return d}function B(a){try{return F(a)=="object"&&!a.nodeType&&a!=a.window&&(!a.constructor||{}.hasOwnProperty.call(a.constructor.prototype,"isPrototypeOf"))}catch(b){}}function p(a,b){return{x:a,y:b}}function yb(b,a){setTimeout(b,a||0)}function C(b,d,c){var a=!b||b=="inherit"?"":b;n(d,function(c){var b=c.exec(a);if(b){var d=a.substr(0,b.index),e=a.substr(b.index+b[0].length+1,a.length-1);a=d+e}});a=c+(!a.indexOf(" ")?"":" ")+a;return a}function U(b,a){if(i<9)b.style.filter=a}h.$Device=Jb;h.$IsBrowserIE=r;h.$IsBrowserIeQuirks=T;h.$IsBrowserFireFox=Bb;h.$IsBrowserSafari=lb;h.$IsBrowserChrome=Eb;h.$IsBrowserOpera=qb;h.$IsBrowserBadTransform=gb;h.$IsBrowser3dSafe=H;h.$IsBrowserIe9Earlier=R;h.$GetTransformProperty=hb("transform");h.$BrowserVersion=function(){return i};h.$BrowserEngineVersion=function(){return t||i};h.$WebKitVersion=function(){v();return A};h.$Delay=yb;h.$Inherit=function(a,b){b.call(a);return E({},a)};function bb(a){a.constructor===bb.caller&&a.$Construct&&a.$Construct.apply(a,bb.caller.arguments)}h.$Construct=bb;h.$GetElement=function(a){if(h.$IsString(a))a=f.getElementById(a);return a};function u(a){return a||k.event}h.$GetEvent=u;h.$EvtSrc=function(b){b=u(b);var a=b.target||b.srcElement||f;if(a.nodeType==3)a=h.$ParentNode(a);return a};h.$EvtTarget=function(a){a=u(a);return a.relatedTarget||a.toElement};h.$EvtWhich=function(a){a=u(a);return a.which||([0,1,3,0,2])[a.button]||a.charCode||a.keyCode};h.$MousePosition=function(a){a=u(a);return{x:a.pageX||a.clientX||0,y:a.pageY||a.clientY||0}};h.$PageScroll=function(){var a=f.body;return{x:(k.pageXOffset||y.scrollLeft||a.scrollLeft||0)-(y.clientLeft||a.clientLeft||0),y:(k.pageYOffset||y.scrollTop||a.scrollTop||0)-(y.clientTop||a.clientTop||0)}};h.$WindowSize=function(){var a=f.body;return{x:a.clientWidth||y.clientWidth,y:a.clientHeight||y.clientHeight}};function G(c,d,a){if(a!==g)c.style[d]=a==g?"":a;else{var b=c.currentStyle||c.style;a=b[d];if(a==""&&k.getComputedStyle){b=c.ownerDocument.defaultView.getComputedStyle(c,j);b&&(a=b.getPropertyValue(d)||b[d])}return a}}function db(b,c,a,d){if(a!==g){if(a==j)a="";else d&&(a+="px");G(b,c,a)}else return q(G(b,c))}function Kb(b,c,a){return db(b,c,a,d)}function m(c,a){var d=a?db:G,b;if(a&4)b=fb(c);return function(e,f){return d(e,b?b(e):c,f,a&2)}}function Db(b){if(r()&&t<9){var a=/opacity=([^)]*)/.exec(b.style.filter||"");return a?q(a[1])/100:1}else return q(b.style.opacity||"1")}function Fb(b,a,f){if(r()&&t<9){var h=b.style.filter||"",i=new RegExp(/[\s]*alpha\([^\)]*\)/g),e=c.round(100*a),d="";if(e<100||f)d="alpha(opacity="+e+") ";var g=C(h,[i],d);U(b,g)}else b.style.opacity=a==1?"":c.round(a*100)/100}var O={$Rotate:["rotate"],$RotateX:["rotateX"],$RotateY:["rotateY"],$SkewX:["skewX"],$SkewY:["skewY"]};if(!H())O=E(O,{$ScaleX:["scaleX",2],$ScaleY:["scaleY",2],$TranslateZ:["translateZ",1]});function P(d,a){var c="";if(a){if(r()&&i&&i<10){delete a.$RotateX;delete a.$RotateY;delete a.$TranslateZ}b.$Each(a,function(d,b){var a=O[b];if(a){var e=a[1]||0;if(Q[b]!=d)c+=" "+a[0]+"("+d+(["deg","px",""])[e]+")"}});if(H()){if(a.$TranslateX||a.$TranslateY||a.$TranslateZ)c+=" translate3d("+(a.$TranslateX||0)+"px,"+(a.$TranslateY||0)+"px,"+(a.$TranslateZ||0)+"px)";if(a.$ScaleX==g)a.$ScaleX=1;if(a.$ScaleY==g)a.$ScaleY=1;if(a.$ScaleX!=1||a.$ScaleY!=1)c+=" scale3d("+a.$ScaleX+", "+a.$ScaleY+", 1)"}}d.style[N(d)]=c}h.$CssTransformOrigin=m("transformOrigin",4);h.$CssBackfaceVisibility=m("backfaceVisibility",4);h.$CssTransformStyle=m("transformStyle",4);h.$CssPerspective=m("perspective",6);h.$CssPerspectiveOrigin=m("perspectiveOrigin",4);h.$CssScale=function(a,b){if(r()&&t<9||t<10&&T())a.style.zoom=b==1?"":b;else{var c=N(a),f="scale("+b+")",e=a.style[c],g=new RegExp(/[\s]*scale\(.*?\)/g),d=C(e,[g],f);a.style[c]=d}};var pb=0,kb=0;h.$WindowResizeFilter=function(b,a){return R()?function(){var g=d,c=T()?b.document.body:b.document.documentElement;if(c){var f=c.offsetWidth-pb,e=c.offsetHeight-kb;if(f||e){pb+=f;kb+=e}else g=l}g&&a()}:a};h.$MouseOverOutFilter=function(b,a){return function(c){c=u(c);var e=c.type,d=c.relatedTarget||(e=="mouseout"?c.toElement:c.fromElement);(!d||d!==a&&!h.$IsChild(a,d))&&b(c)}};h.$AddEvent=function(a,c,d,b){a=h.$GetElement(a);if(a.addEventListener){c=="mousewheel"&&a.addEventListener("DOMMouseScroll",d,b);a.addEventListener(c,d,b)}else if(a.attachEvent){a.attachEvent("on"+c,d);b&&a.setCapture&&a.setCapture()}};h.$RemoveEvent=function(a,c,d,b){a=h.$GetElement(a);if(a.removeEventListener){c=="mousewheel"&&a.removeEventListener("DOMMouseScroll",d,b);a.removeEventListener(c,d,b)}else if(a.detachEvent){a.detachEvent("on"+c,d);b&&a.releaseCapture&&a.releaseCapture()}};h.$FireEvent=function(c,b){var a;if(f.createEvent){a=f.createEvent("HTMLEvents");a.initEvent(b,l,l);c.dispatchEvent(a)}else{var d="on"+b;a=f.createEventObject();c.fireEvent(d,a)}};h.$CancelEvent=function(a){a=u(a);a.preventDefault&&a.preventDefault();a.cancel=d;a.returnValue=l};h.$StopEvent=function(a){a=u(a);a.stopPropagation&&a.stopPropagation();a.cancelBubble=d};h.$CreateCallback=function(d,c){var a=[].slice.call(arguments,2),b=function(){var b=a.concat([].slice.call(arguments,0));return c.apply(d,b)};return b};h.$InnerText=function(a,b){if(b==g)return a.textContent||a.innerText;var c=f.createTextNode(b);h.$Empty(a);a.appendChild(c)};h.$InnerHtml=function(a,b){if(b==g)return a.innerHTML;a.innerHTML=b};h.$GetClientRect=function(b){var a=b.getBoundingClientRect();return{x:a.left,y:a.top,w:a.right-a.left,h:a.bottom-a.top}};h.$ClearInnerHtml=function(a){a.innerHTML=""};h.$EncodeHtml=function(b){var a=h.$CreateDiv();h.$InnerText(a,b);return h.$InnerHtml(a)};h.$DecodeHtml=function(b){var a=h.$CreateDiv();h.$InnerHtml(a,b);return h.$InnerText(a)};h.$SelectElement=function(c){var b;if(k.getSelection)b=k.getSelection();var a=j;if(f.createRange){a=f.createRange();a.selectNode(c)}else{a=f.body.createTextRange();a.moveToElementText(c);a.select()}b&&b.addRange(a)};h.$DeselectElements=function(){if(f.selection)f.selection.empty();else k.getSelection&&k.getSelection().removeAllRanges()};h.$Children=function(d,c){for(var b=[],a=d.firstChild;a;a=a.nextSibling)(c||a.nodeType==1)&&b.push(a);return b};function tb(a,c,e,b){b=b||"u";for(a=a?a.firstChild:j;a;a=a.nextSibling)if(a.nodeType==1){if(Y(a,b)==c)return a;if(!e){var d=tb(a,c,e,b);if(d)return d}}}h.$FindChild=tb;function W(a,d,f,b){b=b||"u";var c=[];for(a=a?a.firstChild:j;a;a=a.nextSibling)if(a.nodeType==1){Y(a,b)==d&&c.push(a);if(!f){var e=W(a,d,f,b);if(e.length)c=c.concat(e)}}return c}function ob(a,c,d){for(a=a?a.firstChild:j;a;a=a.nextSibling)if(a.nodeType==1){if(a.tagName==c)return a;if(!d){var b=ob(a,c,d);if(b)return b}}}h.$FindChildByTag=ob;function ib(a,c,e){var b=[];for(a=a?a.firstChild:j;a;a=a.nextSibling)if(a.nodeType==1){(!c||a.tagName==c)&&b.push(a);if(!e){var d=ib(a,c,e);if(d.length)b=b.concat(d)}}return b}h.$FindChildrenByTag=ib;h.$GetElementsByTag=function(b,a){return b.getElementsByTagName(a)};function E(){var e=arguments,d,c,b,a,h=1&e[0],f=1+h;d=e[f-1]||{};for(;f<e.length;f++)if(c=e[f])for(b in c){a=c[b];if(a!==g){a=c[b];var i=d[b];d[b]=h&&(B(i)||B(a))?E(h,{},i,a):a}}return d}h.$Extend=E;function cb(f,g){var d={},c,a,b;for(c in f){a=f[c];b=g[c];if(a!==b){var e;if(B(a)&&B(b)){a=cb(a,b);e=!sb(a)}!e&&(d[c]=a)}}return d}h.$Unextend=cb;h.$IsFunction=function(a){return F(a)=="function"};h.$IsArray=function(a){return F(a)=="array"};h.$IsString=function(a){return F(a)=="string"};h.$IsNumeric=function(a){return!isNaN(q(a))&&isFinite(a)};h.$Type=F;h.$Each=n;h.$IsNotEmpty=sb;h.$IsPlainObject=B;function V(a){return f.createElement(a)}h.$CreateElement=V;h.$CreateDiv=function(){return V("DIV")};h.$CreateSpan=function(){return V("SPAN")};h.$EmptyFunction=function(){};function Z(b,c,a){if(a==g)return b.getAttribute(c);b.setAttribute(c,a)}function Y(a,b){return Z(a,b)||Z(a,"data-"+b)}h.$Attribute=Z;h.$AttributeEx=Y;function x(b,a){if(a==g)return b.className;b.className=a}h.$ClassName=x;function xb(b){var a={};n(b,function(b){a[b]=b});return a}function Ib(b){var a=[];n(b,function(b){a.push(b)});return a}function zb(b,a){return b.match(a||Ab)}function S(b,a){return xb(zb(b||"",a))}h.$ToHash=xb;h.$FromHash=Ib;h.$Split=zb;function eb(b,c){var a="";n(c,function(c){a&&(a+=b);a+=c});return a}function J(a,c,b){x(a,eb(" ",E(cb(S(x(a)),S(c)),S(b))))}h.$Join=eb;h.$AddClass=function(b,a){J(b,j,a)};h.$RemoveClass=J;h.$ReplaceClass=J;h.$ParentNode=function(a){return a.parentNode};h.$HideElement=function(a){h.$CssDisplay(a,"none")};h.$EnableElement=function(a,b){if(b)h.$Attribute(a,"disabled",d);else h.$RemoveAttribute(a,"disabled")};h.$HideElements=function(b){for(var a=0;a<b.length;a++)h.$HideElement(b[a])};h.$ShowElement=function(a,b){h.$CssDisplay(a,b?"none":"")};h.$ShowElements=function(b,c){for(var a=0;a<b.length;a++)h.$ShowElement(b[a],c)};h.$RemoveAttribute=function(b,a){b.removeAttribute(a)};h.$CanClearClip=function(){return r()&&i<10};h.$SetStyleClip=function(d,a){if(a)d.style.clip="rect("+c.round(a.$Top)+"px "+c.round(a.$Right)+"px "+c.round(a.$Bottom)+"px "+c.round(a.$Left)+"px)";else if(a!==g){var h=d.style.cssText,f=[new RegExp(/[\s]*clip: rect\(.*?\)[;]?/i),new RegExp(/[\s]*cliptop: .*?[;]?/i),new RegExp(/[\s]*clipright: .*?[;]?/i),new RegExp(/[\s]*clipbottom: .*?[;]?/i),new RegExp(/[\s]*clipleft: .*?[;]?/i)],e=C(h,f,"");b.$CssCssText(d,e)}};h.$GetNow=function(){return+new Date};h.$AppendChild=function(b,a){b.appendChild(a)};h.$AppendChildren=function(b,a){n(a,function(a){h.$AppendChild(b,a)})};h.$InsertBefore=function(b,a,c){(c||a.parentNode).insertBefore(b,a)};h.$InsertAfter=function(b,a,c){h.$InsertBefore(b,a.nextSibling,c||a.parentNode)};h.$InsertAdjacentHtml=function(b,a,c){b.insertAdjacentHTML(a,c)};h.$RemoveElement=function(b,a){a=a||b.parentNode;a&&a.removeChild(b)};h.$RemoveElements=function(a,b){n(a,function(a){h.$RemoveElement(a,b)})};h.$Empty=function(a){h.$RemoveElements(h.$Children(a,d),a)};h.$CenterElement=function(a,b){var c=h.$ParentNode(a);b&1&&h.$CssLeft(a,(h.$CssWidth(c)-h.$CssWidth(a))/2);b&2&&h.$CssTop(a,(h.$CssHeight(c)-h.$CssHeight(a))/2)};h.$ParseInt=function(b,a){return parseInt(b,a||10)};h.$ParseFloat=q;h.$IsChild=function(b,a){var c=f.body;while(a&&b!==a&&c!==a)try{a=a.parentNode}catch(d){return l}return b===a};function ab(d,c,b){var a=d.cloneNode(!c);!b&&h.$RemoveAttribute(a,"id");return a}h.$CloneNode=ab;h.$LoadImage=function(e,f){var a=new Image;function b(e,d){h.$RemoveEvent(a,"load",b);h.$RemoveEvent(a,"abort",c);h.$RemoveEvent(a,"error",c);f&&f(a,d)}function c(a){b(a,d)}if(qb()&&i<11.6||!e)b(!e);else{h.$AddEvent(a,"load",b);h.$AddEvent(a,"abort",c);h.$AddEvent(a,"error",c);a.src=e}};h.$LoadImages=function(d,a,e){var c=d.length+1;function b(b){c--;if(a&&b&&b.src==a.src)a=b;!c&&e&&e(a)}n(d,function(a){h.$LoadImage(a.src,b)});b()};h.$BuildElement=function(a,g,i,h){if(h)a=ab(a);var c=W(a,g);if(!c.length)c=b.$GetElementsByTag(a,g);for(var f=c.length-1;f>-1;f--){var d=c[f],e=ab(i);x(e,x(d));b.$CssCssText(e,d.style.cssText);b.$InsertBefore(e,d);b.$RemoveElement(d)}return a};function Hb(a){var l=this,p="",r=["av","pv","ds","dn"],e=[],q,k=0,i=0,d=0;function j(){J(a,q,e[d||k||i&2||i]);b.$Css(a,"pointer-events",d?"none":"")}function c(){k=0;j();h.$RemoveEvent(f,"mouseup",c);h.$RemoveEvent(f,"touchend",c);h.$RemoveEvent(f,"touchcancel",c)}function o(a){if(d)h.$CancelEvent(a);else{k=4;j();h.$AddEvent(f,"mouseup",c);h.$AddEvent(f,"touchend",c);h.$AddEvent(f,"touchcancel",c)}}l.$Selected=function(a){if(a===g)return i;i=a&2||a&1;j()};l.$Enable=function(a){if(a===g)return!d;d=a?0:3;j()};l.$Elmt=a=h.$GetElement(a);var m=b.$Split(x(a));if(m)p=m.shift();n(r,function(a){e.push(p+a)});q=eb(" ",e);e.unshift("");h.$AddEvent(a,"mousedown",o);h.$AddEvent(a,"touchstart",o)}h.$Buttonize=function(a){return new Hb(a)};h.$Css=G;h.$CssN=db;h.$CssP=Kb;h.$CssOverflow=m("overflow");h.$CssTop=m("top",2);h.$CssLeft=m("left",2);h.$CssWidth=m("width",2);h.$CssHeight=m("height",2);h.$CssMarginLeft=m("marginLeft",2);h.$CssMarginTop=m("marginTop",2);h.$CssPosition=m("position");h.$CssDisplay=m("display");h.$CssZIndex=m("zIndex",1);h.$CssFloat=function(b,a){return G(b,r()?"styleFloat":"cssFloat",a)};h.$CssOpacity=function(b,a,c){if(a!=g)Fb(b,a,c);else return Db(b)};h.$CssCssText=function(a,b){if(b!=g)a.style.cssText=b;else return a.style.cssText};var X={$Opacity:h.$CssOpacity,$Top:h.$CssTop,$Left:h.$CssLeft,$Width:h.$CssWidth,$Height:h.$CssHeight,$Position:h.$CssPosition,$Display:h.$CssDisplay,$ZIndex:h.$CssZIndex};h.$GetStyles=function(c,b){var a={};n(b,function(d,b){if(X[b])a[b]=X[b](c)});return a};function w(f,l){var e=R(),b=H(),d=gb(),i=N(f);function k(b,d,a){var e=b.$TransformPoint(p(-d/2,-a/2)),f=b.$TransformPoint(p(d/2,-a/2)),g=b.$TransformPoint(p(d/2,a/2)),h=b.$TransformPoint(p(-d/2,a/2));b.$TransformPoint(p(300,300));return p(c.min(e.x,f.x,g.x,h.x)+d/2,c.min(e.y,f.y,g.y,h.y)+a/2)}function a(d,a){a=a||{};var f=a.$TranslateZ||0,l=(a.$RotateX||0)%360,m=(a.$RotateY||0)%360,o=(a.$Rotate||0)%360,p=a.$ScaleZ;if(e){f=0;l=0;m=0;p=0}var c=new Cb(a.$TranslateX,a.$TranslateY,f);c.$RotateX(l);c.$RotateY(m);c.$RotateZ(o);c.$Skew(a.$SkewX,a.$SkewY);c.$Scale(a.$ScaleX,a.$ScaleY,p);if(b){c.$Move(a.$MoveX,a.$MoveY);d.style[i]=c.$Format3d()}else if(!z||z<9){var j="";if(o||a.$ScaleX!=g&&a.$ScaleX!=1||a.$ScaleY!=g&&a.$ScaleY!=1){var n=k(c,a.$OriginalWidth,a.$OriginalHeight);h.$CssMarginTop(d,n.y);h.$CssMarginLeft(d,n.x);j=c.$Format2d()}var r=d.style.filter,s=new RegExp(/[\s]*progid:DXImageTransform\.Microsoft\.Matrix\([^\)]*\)/g),q=C(r,[s],j);U(d,q)}}w=function(e,c){c=c||{};var i=c.$MoveX,k=c.$MoveY,f;n(X,function(a,b){f=c[b];f!==g&&a(e,f)});h.$SetStyleClip(e,c.$Clip);if(!b){i!=g&&h.$CssLeft(e,c.$OriginalX+i);k!=g&&h.$CssTop(e,c.$OriginalY+k)}if(c.$Transform)if(d)yb(h.$CreateCallback(j,P,e,c));else a(e,c)};h.$SetStyleTransform=P;if(d)h.$SetStyleTransform=w;if(e)h.$SetStyleTransform=a;else if(!b)a=P;h.$SetStyles=w;w(f,l)}h.$SetStyleTransform=w;h.$SetStyles=w;function Cb(k,l,p){var d=this,b=[1,0,0,0,0,1,0,0,0,0,1,0,k||0,l||0,p||0,1],i=c.sin,h=c.cos,m=c.tan;function f(a){return a*c.PI/180}function o(a,b){return{x:a,y:b}}function n(b,c,f,g,i,l,n,o,q,t,u,w,y,A,C,F,a,d,e,h,j,k,m,p,r,s,v,x,z,B,D,E){return[b*a+c*j+f*r+g*z,b*d+c*k+f*s+g*B,b*e+c*m+f*v+g*D,b*h+c*p+f*x+g*E,i*a+l*j+n*r+o*z,i*d+l*k+n*s+o*B,i*e+l*m+n*v+o*D,i*h+l*p+n*x+o*E,q*a+t*j+u*r+w*z,q*d+t*k+u*s+w*B,q*e+t*m+u*v+w*D,q*h+t*p+u*x+w*E,y*a+A*j+C*r+F*z,y*d+A*k+C*s+F*B,y*e+A*m+C*v+F*D,y*h+A*p+C*x+F*E]}function e(c,a){return n.apply(j,(a||b).concat(c))}d.$Matrix=function(){return b};d.$Scale=function(a,c,d){if(a==g)a=1;if(c==g)c=1;if(d==g)d=1;if(a!=1||c!=1||d!=1)b=e([a,0,0,0,0,c,0,0,0,0,d,0,0,0,0,1])};d.$Translate=function(a,c,d){if(a||c||d)b=e([1,0,0,0,0,1,0,0,0,0,1,0,a||0,c||0,d||0,1])};d.$Move=function(a,c,d){b[12]+=a||0;b[13]+=c||0;b[14]+=d||0};d.$RotateX=function(c){if(c){a=f(c);var d=h(a),g=i(a);b=e([1,0,0,0,0,d,g,0,0,-g,d,0,0,0,0,1])}};d.$RotateY=function(c){if(c){a=f(c);var d=h(a),g=i(a);b=e([d,0,-g,0,0,1,0,0,g,0,d,0,0,0,0,1])}};d.$RotateZ=function(c){if(c){a=f(c);var d=h(a),g=i(a);b=e([d,g,0,0,-g,d,0,0,0,0,1,0,0,0,0,1])}};d.$Skew=function(a,c){if(a||c){k=f(a);l=f(c);b=e([1,m(l),0,0,m(k),1,0,0,0,0,1,0,0,0,0,1])}};d.$TransformPoint=function(c){var a=e(b,[1,0,0,0,0,1,0,0,0,0,1,0,c.x,c.y,0,1]);return o(a[12],a[13])};d.$Format3d=function(){return"matrix3d("+b.join(",")+")"};d.$Format2d=function(){return"progid:DXImageTransform.Microsoft.Matrix(M11="+b[0]+", M12="+b[4]+", M21="+b[1]+", M22="+b[5]+", SizingMethod='auto expand')"}}new(function(){var a=this;function b(d,g){for(var j=d[0].length,i=d.length,h=g[0].length,f=[],c=0;c<i;c++)for(var k=f[c]=[],b=0;b<h;b++){for(var e=0,a=0;a<j;a++)e+=d[c][a]*g[a][b];k[b]=e}return f}a.$ScaleX=function(b,c){return a.$ScaleXY(b,c,0)};a.$ScaleY=function(b,c){return a.$ScaleXY(b,0,c)};a.$ScaleXY=function(a,c,d){return b(a,[[c,0],[0,d]])};a.$TransformPoint=function(d,c){var a=b(d,[[c.x],[c.y]]);return p(a[0][0],a[1][0])}});var Q={$OriginalX:0,$OriginalY:0,$MoveX:0,$MoveY:0,$Zoom:1,$ScaleX:1,$ScaleY:1,$Rotate:0,$RotateX:0,$RotateY:0,$TranslateX:0,$TranslateY:0,$TranslateZ:0,$SkewX:0,$SkewY:0};h.$FormatEasings=function(a){var c=a||{};if(a)if(b.$IsFunction(a))c={$Default:c};else if(b.$IsFunction(a.$Clip))c.$Clip={$Default:a.$Clip};return c};function wb(c,a){var b={};n(c,function(c,d){var e=c;if(a[d]!=g)if(h.$IsNumeric(c))e=c+a[d];else e=wb(c,a[d]);b[d]=e});return b}h.$AddDif=wb;h.$Cast=function(l,m,w,n,y,z,o){var a=m;if(l){a={};for(var h in m){var A=z[h]||1,v=y[h]||[0,1],f=(w-v[0])/v[1];f=c.min(c.max(f,0),1);f=f*A;var u=c.floor(f);if(f!=u)f-=u;var i=n.$Default||e.$EaseSwing,k,B=l[h],q=m[h];if(b.$IsNumeric(q)){i=n[h]||i;var x=i(f);k=B+q*x}else{k=b.$Extend({$Offset:{}},l[h]);b.$Each(q.$Offset||q,function(d,a){if(n.$Clip)i=n.$Clip[a]||n.$Clip.$Default||i;var c=i(f),b=d*c;k.$Offset[a]=b;k[a]+=b})}a[h]=k}var t=b.$Each(m,function(b,a){return Q[a]!=g});t&&b.$Each(Q,function(c,b){if(a[b]==g&&l[b]!==g)a[b]=l[b]});if(t){if(a.$Zoom)a.$ScaleX=a.$ScaleY=a.$Zoom;a.$OriginalWidth=o.$OriginalWidth;a.$OriginalHeight=o.$OriginalHeight;a.$Transform=d}}if(m.$Clip&&o.$Move){var p=a.$Clip.$Offset,s=(p.$Top||0)+(p.$Bottom||0),r=(p.$Left||0)+(p.$Right||0);a.$Left=(a.$Left||0)+r;a.$Top=(a.$Top||0)+s;a.$Clip.$Left-=r;a.$Clip.$Right-=r;a.$Clip.$Top-=s;a.$Clip.$Bottom-=s}if(a.$Clip&&b.$CanClearClip()&&!a.$Clip.$Top&&!a.$Clip.$Left&&a.$Clip.$Right==o.$OriginalWidth&&a.$Clip.$Bottom==o.$OriginalHeight)a.$Clip=j;return a}};function n(){var a=this,d=[],c=[];function h(a,b){d.push({$EventName:a,$Handler:b})}function g(a,c){b.$Each(d,function(b,e){b.$EventName==a&&b.$Handler===c&&d.splice(e,1)})}function f(){d=[]}function e(){b.$Each(c,function(a){b.$RemoveEvent(a.$Obj,a.$EventName,a.$Handler)});c=[]}a.$Listen=function(e,a,d,f){b.$AddEvent(e,a,d,f);c.push({$Obj:e,$EventName:a,$Handler:d})};a.$Unlisten=function(e,a,d){b.$Each(c,function(f,g){if(f.$Obj===e&&f.$EventName==a&&f.$Handler===d){b.$RemoveEvent(e,a,d);c.splice(g,1)}})};a.$UnlistenAll=e;a.$On=a.addEventListener=h;a.$Off=a.removeEventListener=g;a.$TriggerEvent=function(a){var c=[].slice.call(arguments,1);b.$Each(d,function(b){b.$EventName==a&&b.$Handler.apply(k,c)})};a.$Destroy=function(){e();f();for(var b in a)delete a[b]}}var m=k.$JssorAnimator$=function(z,C,h,L,O,J){z=z||0;var a=this,q,N,n,o,v,A=0,H,I,G,B,y=0,g=0,m=0,D,i,s,f,e,p,w=[],x;function P(a){f+=a;e+=a;i+=a;s+=a;g+=a;m+=a;y+=a}function u(o){var j=o;if(p&&(j>=e||j<=f))j=((j-f)%p+p)%p+f;if(!D||v||g!=j){var k=c.min(j,e);k=c.max(k,f);if(!D||v||k!=m){if(J){var l=(k-i)/(C||1);if(h.$Reverse)l=1-l;var n=b.$Cast(O,J,l,H,G,I,h);if(x)b.$Each(n,function(b,a){x[a]&&x[a](L,b)});else b.$SetStyles(L,n)}a.$OnInnerOffsetChange(m-i,k-i);m=k;b.$Each(w,function(b,c){var a=o<g?w[w.length-c-1]:b;a.$GoToPosition(m-y)});var r=g,q=m;g=j;D=d;a.$OnPositionChange(r,q)}}}function E(a,b,d){b&&a.$Shift(e);if(!d){f=c.min(f,a.$GetPosition_OuterBegin()+y);e=c.max(e,a.$GetPosition_OuterEnd()+y)}w.push(a)}var r=k.requestAnimationFrame||k.webkitRequestAnimationFrame||k.mozRequestAnimationFrame||k.msRequestAnimationFrame;if(b.$IsBrowserSafari()&&b.$BrowserVersion()<7)r=j;r=r||function(a){b.$Delay(a,h.$Interval)};function K(){if(q){var d=b.$GetNow(),e=c.min(d-A,h.$IntervalMax),a=g+e*o;A=d;if(a*o>=n*o)a=n;u(a);if(!v&&a*o>=n*o)M(B);else r(K)}}function t(h,i,j){if(!q){q=d;v=j;B=i;h=c.max(h,f);h=c.min(h,e);n=h;o=n<g?-1:1;a.$OnStart();A=b.$GetNow();r(K)}}function M(b){if(q){v=q=B=l;a.$OnStop();b&&b()}}a.$Play=function(a,b,c){t(a?g+a:e,b,c)};a.$PlayToPosition=t;a.$PlayToBegin=function(a,b){t(f,a,b)};a.$PlayToEnd=function(a,b){t(e,a,b)};a.$Stop=M;a.$Continue=function(a){t(a)};a.$GetPosition=function(){return g};a.$GetPlayToPosition=function(){return n};a.$GetPosition_Display=function(){return m};a.$GoToPosition=u;a.$GoToBegin=function(){u(f,d)};a.$GoToEnd=function(){u(e,d)};a.$Move=function(a){u(g+a)};a.$CombineMode=function(){return N};a.$GetDuration=function(){return C};a.$IsPlaying=function(){return q};a.$IsOnTheWay=function(){return g>i&&g<=s};a.$SetLoopLength=function(a){p=a};a.$Shift=P;a.$Join=E;a.$Combine=function(a,b){E(a,0,b)};a.$Chain=function(a){E(a,1)};a.$Expand=function(a){e+=a};a.$GetPosition_InnerBegin=function(){return i};a.$GetPosition_InnerEnd=function(){return s};a.$GetPosition_OuterBegin=function(){return f};a.$GetPosition_OuterEnd=function(){return e};a.$OnPositionChange=a.$OnStart=a.$OnStop=a.$OnInnerOffsetChange=b.$EmptyFunction;a.$Version=b.$GetNow();h=b.$Extend({$Interval:16,$IntervalMax:50},h);p=h.$LoopLength;x=h.$Setter;f=i=z;e=s=z+C;I=h.$Round||{};G=h.$During||{};H=b.$FormatEasings(h.$Easing)};var p=k.$JssorSlideshowFormations$=new function(){var h=this,b=0,a=1,f=2,e=3,s=1,r=2,t=4,q=8,w=256,x=512,v=1024,u=2048,j=u+s,i=u+r,o=x+s,m=x+r,n=w+t,k=w+q,l=v+t,p=v+q;function y(a){return(a&r)==r}function z(a){return(a&t)==t}function g(b,a,c){c.push(a);b[a]=b[a]||[];b[a].push(c)}h.$FormationStraight=function(f){for(var d=f.$Cols,e=f.$Rows,s=f.$Assembly,t=f.$Count,r=[],a=0,b=0,p=d-1,q=e-1,h=t-1,c,b=0;b<e;b++)for(a=0;a<d;a++){switch(s){case j:c=h-(a*e+(q-b));break;case l:c=h-(b*d+(p-a));break;case o:c=h-(a*e+b);case n:c=h-(b*d+a);break;case i:c=a*e+b;break;case k:c=b*d+(p-a);break;case m:c=a*e+(q-b);break;default:c=b*d+a}g(r,c,[b,a])}return r};h.$FormationSwirl=function(q){var x=q.$Cols,y=q.$Rows,B=q.$Assembly,w=q.$Count,A=[],z=[],u=0,c=0,h=0,r=x-1,s=y-1,t,p,v=0;switch(B){case j:c=r;h=0;p=[f,a,e,b];break;case l:c=0;h=s;p=[b,e,a,f];break;case o:c=r;h=s;p=[e,a,f,b];break;case n:c=r;h=s;p=[a,e,b,f];break;case i:c=0;h=0;p=[f,b,e,a];break;case k:c=r;h=0;p=[a,f,b,e];break;case m:c=0;h=s;p=[e,b,f,a];break;default:c=0;h=0;p=[b,f,a,e]}u=0;while(u<w){t=h+","+c;if(c>=0&&c<x&&h>=0&&h<y&&!z[t]){z[t]=d;g(A,u++,[h,c])}else switch(p[v++%p.length]){case b:c--;break;case f:h--;break;case a:c++;break;case e:h++}switch(p[v%p.length]){case b:c++;break;case f:h++;break;case a:c--;break;case e:h--}}return A};h.$FormationZigZag=function(p){var w=p.$Cols,x=p.$Rows,z=p.$Assembly,v=p.$Count,t=[],u=0,c=0,d=0,q=w-1,r=x-1,y,h,s=0;switch(z){case j:c=q;d=0;h=[f,a,e,a];break;case l:c=0;d=r;h=[b,e,a,e];break;case o:c=q;d=r;h=[e,a,f,a];break;case n:c=q;d=r;h=[a,e,b,e];break;case i:c=0;d=0;h=[f,b,e,b];break;case k:c=q;d=0;h=[a,f,b,f];break;case m:c=0;d=r;h=[e,b,f,b];break;default:c=0;d=0;h=[b,f,a,f]}u=0;while(u<v){y=d+","+c;if(c>=0&&c<w&&d>=0&&d<x&&typeof t[y]=="undefined"){g(t,u++,[d,c]);switch(h[s%h.length]){case b:c++;break;case f:d++;break;case a:c--;break;case e:d--}}else{switch(h[s++%h.length]){case b:c--;break;case f:d--;break;case a:c++;break;case e:d++}switch(h[s++%h.length]){case b:c++;break;case f:d++;break;case a:c--;break;case e:d--}}}return t};h.$FormationStraightStairs=function(q){var u=q.$Cols,v=q.$Rows,e=q.$Assembly,t=q.$Count,r=[],s=0,c=0,d=0,f=u-1,h=v-1,x=t-1;switch(e){case j:case m:case o:case i:var a=0,b=0;break;case k:case l:case n:case p:var a=f,b=0;break;default:e=p;var a=f,b=0}c=a;d=b;while(s<t){if(z(e)||y(e))g(r,x-s++,[d,c]);else g(r,s++,[d,c]);switch(e){case j:case m:c--;d++;break;case o:case i:c++;d--;break;case k:case l:c--;d--;break;case p:case n:default:c++;d++}if(c<0||d<0||c>f||d>h){switch(e){case j:case m:a++;break;case k:case l:case o:case i:b++;break;case p:case n:default:a--}if(a<0||b<0||a>f||b>h){switch(e){case j:case m:a=f;b++;break;case o:case i:b=h;a++;break;case k:case l:b=h;a--;break;case p:case n:default:a=0;b++}if(b>h)b=h;else if(b<0)b=0;else if(a>f)a=f;else if(a<0)a=0}d=b;c=a}}return r};h.$FormationSquare=function(i){var a=i.$Cols||1,b=i.$Rows||1,j=[],d,e,f,h,k;f=a<b?(b-a)/2:0;h=a>b?(a-b)/2:0;k=c.round(c.max(a/2,b/2))+1;for(d=0;d<a;d++)for(e=0;e<b;e++)g(j,k-c.min(d+1+f,e+1+h,a-d+f,b-e+h),[e,d]);return j};h.$FormationRectangle=function(f){var d=f.$Cols||1,e=f.$Rows||1,h=[],a,b,i;i=c.round(c.min(d/2,e/2))+1;for(a=0;a<d;a++)for(b=0;b<e;b++)g(h,i-c.min(a+1,b+1,d-a,e-b),[b,a]);return h};h.$FormationRandom=function(d){for(var e=[],a,b=0;b<d.$Rows;b++)for(a=0;a<d.$Cols;a++)g(e,c.ceil(1e5*c.random())%13,[b,a]);return e};h.$FormationCircle=function(d){for(var e=d.$Cols||1,f=d.$Rows||1,h=[],a,i=e/2-.5,j=f/2-.5,b=0;b<e;b++)for(a=0;a<f;a++)g(h,c.round(c.sqrt(c.pow(b-i,2)+c.pow(a-j,2))),[a,b]);return h};h.$FormationCross=function(d){for(var e=d.$Cols||1,f=d.$Rows||1,h=[],a,i=e/2-.5,j=f/2-.5,b=0;b<e;b++)for(a=0;a<f;a++)g(h,c.round(c.min(c.abs(b-i),c.abs(a-j))),[a,b]);return h};h.$FormationRectangleCross=function(f){for(var h=f.$Cols||1,i=f.$Rows||1,j=[],a,d=h/2-.5,e=i/2-.5,k=c.max(d,e)+1,b=0;b<h;b++)for(a=0;a<i;a++)g(j,c.round(k-c.max(d-c.abs(b-d),e-c.abs(a-e)))-1,[a,b]);return j}};k.$JssorSlideshowRunner$=function(k,s,q,u,z){var f=this,v,g,a,y=0,x=u.$TransitionsOrder,r,h=8;function t(a){if(a.$Top)a.$MoveY=a.$Top;if(a.$Left)a.$MoveX=a.$Left;b.$Each(a,function(a){b.$IsPlainObject(a)&&t(a)})}function i(g,f){var a={$Interval:f,$Duration:1,$Delay:0,$Cols:1,$Rows:1,$Opacity:0,$Zoom:0,$Clip:0,$Move:l,$SlideOut:l,$Reverse:l,$Formation:p.$FormationRandom,$Assembly:1032,$ChessMode:{$Column:0,$Row:0},$Easing:e.$EaseSwing,$Round:{},$Blocks:[],$During:{}};b.$Extend(a,g);t(a);a.$Count=a.$Cols*a.$Rows;a.$Easing=b.$FormatEasings(a.$Easing);a.$FramesCount=c.ceil(a.$Duration/a.$Interval);a.$GetBlocks=function(c,b){c/=a.$Cols;b/=a.$Rows;var f=c+"x"+b;if(!a.$Blocks[f]){a.$Blocks[f]={$Width:c,$Height:b};for(var d=0;d<a.$Cols;d++)for(var e=0;e<a.$Rows;e++)a.$Blocks[f][e+","+d]={$Top:e*b,$Right:d*c+c,$Bottom:e*b+b,$Left:d*c}}return a.$Blocks[f]};if(a.$Brother){a.$Brother=i(a.$Brother,f);a.$SlideOut=d}return a}function o(B,h,a,w,o,m){var z=this,u,v={},i={},n=[],f,e,s,q=a.$ChessMode.$Column||0,r=a.$ChessMode.$Row||0,g=a.$GetBlocks(o,m),p=C(a),D=p.length-1,t=a.$Duration+a.$Delay*D,x=w+t,k=a.$SlideOut,y;x+=50;function C(a){var b=a.$Formation(a);return a.$Reverse?b.reverse():b}z.$EndTime=x;z.$ShowFrame=function(d){d-=w;var e=d<t;if(e||y){y=e;if(!k)d=t-d;var f=c.ceil(d/a.$Interval);b.$Each(i,function(a,e){var d=c.max(f,a.$Min);d=c.min(d,a.length-1);if(a.$LastFrameIndex!=d){if(!a.$LastFrameIndex&&!k)b.$ShowElement(n[e]);else d==a.$Max&&k&&b.$HideElement(n[e]);a.$LastFrameIndex=d;b.$SetStyles(n[e],a[d])}})}};h=b.$CloneNode(h);b.$SetStyleTransform(h,j);if(b.$IsBrowserIe9Earlier()){var E=!h["no-image"],A=b.$FindChildrenByTag(h);b.$Each(A,function(a){(E||a["jssor-slider"])&&b.$CssOpacity(a,b.$CssOpacity(a),d)})}b.$Each(p,function(h,j){b.$Each(h,function(G){var K=G[0],J=G[1],t=K+","+J,n=l,p=l,x=l;if(q&&J%2){if(q&3)n=!n;if(q&12)p=!p;if(q&16)x=!x}if(r&&K%2){if(r&3)n=!n;if(r&12)p=!p;if(r&16)x=!x}a.$Top=a.$Top||a.$Clip&4;a.$Bottom=a.$Bottom||a.$Clip&8;a.$Left=a.$Left||a.$Clip&1;a.$Right=a.$Right||a.$Clip&2;var C=p?a.$Bottom:a.$Top,z=p?a.$Top:a.$Bottom,B=n?a.$Right:a.$Left,A=n?a.$Left:a.$Right;a.$Clip=C||z||B||A;s={};e={$MoveY:0,$MoveX:0,$Opacity:1,$Width:o,$Height:m};f=b.$Extend({},e);u=b.$Extend({},g[t]);if(a.$Opacity)e.$Opacity=2-a.$Opacity;if(a.$ZIndex){e.$ZIndex=a.$ZIndex;f.$ZIndex=0}var I=a.$Cols*a.$Rows>1||a.$Clip;if(a.$Zoom||a.$Rotate){var H=d;if(b.$IsBrowserIe9Earlier())if(a.$Cols*a.$Rows>1)H=l;else I=l;if(H){e.$Zoom=a.$Zoom?a.$Zoom-1:1;f.$Zoom=1;if(b.$IsBrowserIe9Earlier()||b.$IsBrowserOpera())e.$Zoom=c.min(e.$Zoom,2);var N=a.$Rotate||0;e.$Rotate=N*360*(x?-1:1);f.$Rotate=0}}if(I){var h=u.$Offset={};if(a.$Clip){var w=a.$ScaleClip||1;if(C&&z){h.$Top=g.$Height/2*w;h.$Bottom=-h.$Top}else if(C)h.$Bottom=-g.$Height*w;else if(z)h.$Top=g.$Height*w;if(B&&A){h.$Left=g.$Width/2*w;h.$Right=-h.$Left}else if(B)h.$Right=-g.$Width*w;else if(A)h.$Left=g.$Width*w}s.$Clip=u;f.$Clip=g[t]}var L=n?1:-1,M=p?1:-1;if(a.x)e.$MoveX+=o*a.x*L;if(a.y)e.$MoveY+=m*a.y*M;b.$Each(e,function(a,c){if(b.$IsNumeric(a))if(a!=f[c])s[c]=a-f[c]});v[t]=k?f:e;var D=a.$FramesCount,y=c.round(j*a.$Delay/a.$Interval);i[t]=new Array(y);i[t].$Min=y;i[t].$Max=y+D-1;for(var F=0;F<=D;F++){var E=b.$Cast(f,s,F/D,a.$Easing,a.$During,a.$Round,{$Move:a.$Move,$OriginalWidth:o,$OriginalHeight:m});E.$ZIndex=E.$ZIndex||1;i[t].push(E)}})});p.reverse();b.$Each(p,function(a){b.$Each(a,function(c){var f=c[0],e=c[1],d=f+","+e,a=h;if(e||f)a=b.$CloneNode(h);b.$SetStyles(a,v[d]);b.$CssOverflow(a,"hidden");b.$CssPosition(a,"absolute");B.$AddClipElement(a);n[d]=a;b.$ShowElement(a,!k)})})}function w(){var b=this,c=0;m.call(b,0,v);b.$OnPositionChange=function(d,b){if(b-c>h){c=b;a&&a.$ShowFrame(b);g&&g.$ShowFrame(b)}};b.$Transition=r}f.$GetTransition=function(){var a=0,b=u.$Transitions,d=b.length;if(x)a=y++%d;else a=c.floor(c.random()*d);b[a]&&(b[a].$Index=a);return b[a]};f.$Initialize=function(w,x,l,m,b){r=b;b=i(b,h);var j=m.$Item,e=l.$Item;j["no-image"]=!m.$Image;e["no-image"]=!l.$Image;var n=j,p=e,u=b,d=b.$Brother||i({},h);if(!b.$SlideOut){n=e;p=j}var t=d.$Shift||0;g=new o(k,p,d,c.max(t-d.$Interval,0),s,q);a=new o(k,n,u,c.max(d.$Interval-t,0),s,q);g.$ShowFrame(0);a.$ShowFrame(0);v=c.max(g.$EndTime,a.$EndTime);f.$Index=w};f.$Clear=function(){k.$Clear();g=j;a=j};f.$GetProcessor=function(){var b=j;if(a)b=new w;return b};if(b.$IsBrowserIe9Earlier()||b.$IsBrowserOpera()||z&&b.$WebKitVersion()<537)h=16;n.call(f);m.call(f,-1e7,1e7)};var i=k.$JssorSlider$=function(p,hc){var h=this;function Fc(){var a=this;m.call(a,-1e8,2e8);a.$GetCurrentSlideInfo=function(){var b=a.$GetPosition_Display(),d=c.floor(b),f=t(d),e=b-c.floor(b);return{$Index:f,$VirtualIndex:d,$Position:e}};a.$OnPositionChange=function(b,a){var e=c.floor(a);if(e!=a&&a>b)e++;Wb(e,d);h.$TriggerEvent(i.$EVT_POSITION_CHANGE,t(a),t(b),a,b)}}function Ec(){var a=this;m.call(a,0,0,{$LoopLength:r});b.$Each(C,function(b){D&1&&b.$SetLoopLength(r);a.$Chain(b);b.$Shift(fb/dc)})}function Dc(){var a=this,b=Vb.$Elmt;m.call(a,-1,2,{$Easing:e.$EaseLinear,$Setter:{$Position:bc},$LoopLength:r},b,{$Position:1},{$Position:-2});a.$Wrapper=b}function rc(o,n){var b=this,e,f,g,k,c;m.call(b,-1e8,2e8,{$IntervalMax:100});b.$OnStart=function(){O=d;R=j;h.$TriggerEvent(i.$EVT_SWIPE_START,t(w.$GetPosition()),w.$GetPosition())};b.$OnStop=function(){O=l;k=l;var a=w.$GetCurrentSlideInfo();h.$TriggerEvent(i.$EVT_SWIPE_END,t(w.$GetPosition()),w.$GetPosition());!a.$Position&&Hc(a.$VirtualIndex,s)};b.$OnPositionChange=function(i,h){var b;if(k)b=c;else{b=f;if(g){var d=h/g;b=a.$SlideEasing(d)*(f-e)+e}}w.$GoToPosition(b)};b.$PlayCarousel=function(a,d,c,h){e=a;f=d;g=c;w.$GoToPosition(a);b.$GoToPosition(0);b.$PlayToPosition(c,h)};b.$StandBy=function(a){k=d;c=a;b.$Play(a,j,d)};b.$SetStandByPosition=function(a){c=a};b.$MoveCarouselTo=function(a){w.$GoToPosition(a)};w=new Fc;w.$Combine(o);w.$Combine(n)}function sc(){var c=this,a=Zb();b.$CssZIndex(a,0);b.$Css(a,"pointerEvents","none");c.$Elmt=a;c.$AddClipElement=function(c){b.$AppendChild(a,c);b.$ShowElement(a)};c.$Clear=function(){b.$HideElement(a);b.$Empty(a)}}function Bc(k,f){var e=this,q,H,x,o,y=[],w,B,W,G,Q,F,g,v,p,eb;m.call(e,-u,u+1,{$SlideItemAnimator:d});function E(a){q&&q.$Revert();T(k,a,0);F=d;q=new I.$Class(k,I,b.$ParseFloat(b.$AttributeEx(k,"idle"))||qc);q.$GoToPosition(0)}function Y(){q.$Version<I.$Version&&E()}function N(p,r,n){if(!G){G=d;if(o&&n){var g=n.width,c=n.height,m=g,k=c;if(g&&c&&a.$FillMode){if(a.$FillMode&3&&(!(a.$FillMode&4)||g>K||c>J)){var j=l,q=K/J*c/g;if(a.$FillMode&1)j=q>1;else if(a.$FillMode&2)j=q<1;m=j?g*J/c:K;k=j?J:c*K/g}b.$CssWidth(o,m);b.$CssHeight(o,k);b.$CssTop(o,(J-k)/2);b.$CssLeft(o,(K-m)/2)}b.$CssPosition(o,"absolute");h.$TriggerEvent(i.$EVT_LOAD_END,f)}}b.$HideElement(r);p&&p(e)}function X(b,c,d,g){if(g==R&&s==f&&P)if(!Gc){var a=t(b);A.$Initialize(a,f,c,e,d);c.$HideContentForSlideshow();U.$Shift(a-U.$GetPosition_OuterBegin()-1);U.$GoToPosition(a);z.$PlayCarousel(b,b,0)}}function ab(b){if(b==R&&s==f){if(!g){var a=j;if(A)if(A.$Index==f)a=A.$GetProcessor();else A.$Clear();Y();g=new zc(k,f,a,q);g.$SetPlayer(p)}!g.$IsPlaying()&&g.$Replay()}}function S(d,h,l){if(d==f){if(d!=h)C[h]&&C[h].$ParkOut();else!l&&g&&g.$AdjustIdleOnPark();p&&p.$Enable();var m=R=b.$GetNow();e.$LoadImage(b.$CreateCallback(j,ab,m))}else{var k=c.min(f,d),i=c.max(f,d),o=c.min(i-k,k+r-i),n=u+a.$LazyLoading-1;(!Q||o<=n)&&e.$LoadImage()}}function bb(){if(s==f&&g){g.$Stop();p&&p.$Quit();p&&p.$Disable();g.$OpenSlideshowPanel()}}function db(){s==f&&g&&g.$Stop()}function Z(a){!M&&h.$TriggerEvent(i.$EVT_CLICK,f,a)}function O(){p=v.pInstance;g&&g.$SetPlayer(p)}e.$LoadImage=function(c,a){a=a||x;if(y.length&&!G){b.$ShowElement(a);if(!W){W=d;h.$TriggerEvent(i.$EVT_LOAD_START,f);b.$Each(y,function(a){if(!b.$Attribute(a,"src")){a.src=b.$AttributeEx(a,"src2");b.$CssDisplay(a,a["display-origin"])}})}b.$LoadImages(y,o,b.$CreateCallback(j,N,c,a))}else N(c,a)};e.$GoForNextSlide=function(){var h=f;if(a.$AutoPlaySteps<0)h-=r;var d=h+a.$AutoPlaySteps*xc;if(D&2)d=t(d);if(!(D&1))d=c.max(0,c.min(d,r-u));if(d!=f){if(A){var e=A.$GetTransition(r);if(e){var i=R=b.$GetNow(),g=C[t(d)];return g.$LoadImage(b.$CreateCallback(j,X,d,g,e,i),x)}}nb(d)}};e.$TryActivate=function(){S(f,f,d)};e.$ParkOut=function(){p&&p.$Quit();p&&p.$Disable();e.$UnhideContentForSlideshow();g&&g.$Abort();g=j;E()};e.$StampSlideItemElements=function(a){a=eb+"_"+a};e.$HideContentForSlideshow=function(){b.$HideElement(k)};e.$UnhideContentForSlideshow=function(){b.$ShowElement(k)};e.$EnablePlayer=function(){p&&p.$Enable()};function T(a,c,e){if(b.$Attribute(a,"jssor-slider"))return;if(!F){if(a.tagName=="IMG"){y.push(a);if(!b.$Attribute(a,"src")){Q=d;a["display-origin"]=b.$CssDisplay(a);b.$HideElement(a)}}b.$IsBrowserIe9Earlier()&&b.$CssZIndex(a,(b.$CssZIndex(a)||0)+1)}var f=b.$Children(a);b.$Each(f,function(f){var h=f.tagName,i=b.$AttributeEx(f,"u");if(i=="player"&&!v){v=f;if(v.pInstance)O();else b.$AddEvent(v,"dataavailable",O)}if(i=="caption"){if(c){b.$CssTransformOrigin(f,b.$AttributeEx(f,"to"));b.$CssBackfaceVisibility(f,b.$AttributeEx(f,"bf"));b.$AttributeEx(f,"3d")&&b.$CssTransformStyle(f,"preserve-3d")}else if(!b.$IsBrowserIE()){var g=b.$CloneNode(f,l,d);b.$InsertBefore(g,f,a);b.$RemoveElement(f,a);f=g;c=d}}else if(!F&&!e&&!o){if(h=="A"){if(b.$AttributeEx(f,"u")=="image")o=b.$FindChildByTag(f,"IMG");else o=b.$FindChild(f,"image",d);if(o){w=f;b.$CssDisplay(w,"block");b.$SetStyles(w,V);B=b.$CloneNode(w,d);b.$CssPosition(w,"relative");b.$CssOpacity(B,0);b.$Css(B,"backgroundColor","#000")}}else if(h=="IMG"&&b.$AttributeEx(f,"u")=="image")o=f;if(o){o.border=0;b.$SetStyles(o,V)}}T(f,c,e+1)})}e.$OnInnerOffsetChange=function(c,b){var a=u-b;bc(H,a)};e.$Index=f;n.call(e);b.$CssPerspective(k,b.$AttributeEx(k,"p"));b.$CssPerspectiveOrigin(k,b.$AttributeEx(k,"po"));var L=b.$FindChild(k,"thumb",d);if(L){e.$Thumb=b.$CloneNode(L);b.$HideElement(L)}b.$ShowElement(k);x=b.$CloneNode(cb);b.$CssZIndex(x,1e3);b.$AddEvent(k,"click",Z);E(d);e.$Image=o;e.$Link=B;e.$Item=k;e.$Wrapper=H=k;b.$AppendChild(H,x);h.$On(203,S);h.$On(28,db);h.$On(24,bb)}function zc(y,f,p,q){var a=this,n=0,u=0,g,j,e,c,k,t,r,o=C[f];m.call(a,0,0);function v(){b.$Empty(N);fc&&k&&o.$Link&&b.$AppendChild(N,o.$Link);b.$ShowElement(N,!k&&o.$Image)}function w(){a.$Replay()}function x(b){r=b;a.$Stop();a.$Replay()}a.$Replay=function(){var b=a.$GetPosition_Display();if(!B&&!O&&!r&&s==f){if(!b){if(g&&!k){k=d;a.$OpenSlideshowPanel(d);h.$TriggerEvent(i.$EVT_SLIDESHOW_START,f,n,u,g,c)}v()}var l,p=i.$EVT_STATE_CHANGE;if(b!=c)if(b==e)l=c;else if(b==j)l=e;else if(!b)l=j;else l=a.$GetPlayToPosition();h.$TriggerEvent(p,f,b,n,j,e,c);var m=P&&(!E||F);if(b==c)(e!=c&&!(E&12)||m)&&o.$GoForNextSlide();else(m||b!=e)&&a.$PlayToPosition(l,w)}};a.$AdjustIdleOnPark=function(){e==c&&e==a.$GetPosition_Display()&&a.$GoToPosition(j)};a.$Abort=function(){A&&A.$Index==f&&A.$Clear();var b=a.$GetPosition_Display();b<c&&h.$TriggerEvent(i.$EVT_STATE_CHANGE,f,-b-1,n,j,e,c)};a.$OpenSlideshowPanel=function(a){p&&b.$CssOverflow(hb,a&&p.$Transition.$Outside?"":"hidden")};a.$OnInnerOffsetChange=function(b,a){if(k&&a>=g){k=l;v();o.$UnhideContentForSlideshow();A.$Clear();h.$TriggerEvent(i.$EVT_SLIDESHOW_END,f,n,u,g,c)}h.$TriggerEvent(i.$EVT_PROGRESS_CHANGE,f,a,n,j,e,c)};a.$SetPlayer=function(a){if(a&&!t){t=a;a.$On($JssorPlayer$.$EVT_SWITCH,x)}};p&&a.$Chain(p);g=a.$GetPosition_OuterEnd();a.$Chain(q);j=g+q.$IdleBegin;e=g+q.$IdleEnd;c=a.$GetPosition_OuterEnd()}function Mb(a,c,d){b.$CssLeft(a,c);b.$CssTop(a,d)}function bc(c,b){var a=x>0?x:gb,d=Bb*b*(a&1),e=Cb*b*(a>>1&1);Mb(c,d,e)}function Rb(){pb=O;Kb=z.$GetPlayToPosition();G=w.$GetPosition()}function ic(){Rb();if(B||!F&&E&12){z.$Stop();h.$TriggerEvent(i.$EVT_FREEZE)}}function gc(f){if(!B&&(F||!(E&12))&&!z.$IsPlaying()){var d=w.$GetPosition(),b=c.ceil(G);if(f&&c.abs(H)>=a.$MinDragOffsetToSlide){b=c.ceil(d);b+=eb}if(!(D&1))b=c.min(r-u,c.max(b,0));var e=c.abs(b-d);e=1-c.pow(1-e,5);if(!M&&pb)z.$Continue(Kb);else if(d==b){tb.$EnablePlayer();tb.$TryActivate()}else z.$PlayCarousel(d,b,e*Xb)}}function Ib(a){!b.$AttributeEx(b.$EvtSrc(a),"nodrag")&&b.$CancelEvent(a)}function vc(a){ac(a,1)}function ac(a,c){a=b.$GetEvent(a);var k=b.$EvtSrc(a);if(!L&&!b.$AttributeEx(k,"nodrag")&&wc()&&(!c||a.touches.length==1)){B=d;Ab=l;R=j;b.$AddEvent(f,c?"touchmove":"mousemove",Db);b.$GetNow();M=0;ic();if(!pb)x=0;if(c){var g=a.touches[0];vb=g.clientX;wb=g.clientY}else{var e=b.$MousePosition(a);vb=e.x;wb=e.y}H=0;bb=0;eb=0;h.$TriggerEvent(i.$EVT_DRAG_START,t(G),G,a)}}function Db(e){if(B){e=b.$GetEvent(e);var f;if(e.type!="mousemove"){var l=e.touches[0];f={x:l.clientX,y:l.clientY}}else f=b.$MousePosition(e);if(f){var j=f.x-vb,k=f.y-wb;if(c.floor(G)!=G)x=x||gb&L;if((j||k)&&!x){if(L==3)if(c.abs(k)>c.abs(j))x=2;else x=1;else x=L;if(jb&&x==1&&c.abs(k)-c.abs(j)>3)Ab=d}if(x){var a=k,i=Cb;if(x==1){a=j;i=Bb}if(!(D&1)){if(a>0){var g=i*s,h=a-g;if(h>0)a=g+c.sqrt(h)*5}if(a<0){var g=i*(r-u-s),h=-a-g;if(h>0)a=-g-c.sqrt(h)*5}}if(H-bb<-2)eb=0;else if(H-bb>2)eb=-1;bb=H;H=a;sb=G-H/i/(Z||1);if(H&&x&&!Ab){b.$CancelEvent(e);if(!O)z.$StandBy(sb);else z.$SetStandByPosition(sb)}}}}}function mb(){tc();if(B){B=l;b.$GetNow();b.$RemoveEvent(f,"mousemove",Db);b.$RemoveEvent(f,"touchmove",Db);M=H;z.$Stop();var a=w.$GetPosition();h.$TriggerEvent(i.$EVT_DRAG_END,t(a),a,t(G),G);E&12&&Rb();gc(d)}}function mc(c){if(M){b.$StopEvent(c);var a=b.$EvtSrc(c);while(a&&v!==a){a.tagName=="A"&&b.$CancelEvent(c);try{a=a.parentNode}catch(d){break}}}}function Lb(a){C[s];s=t(a);tb=C[s];Wb(a);return s}function Hc(a,b){x=0;Lb(a);h.$TriggerEvent(i.$EVT_PARK,t(a),b)}function Wb(a,c){yb=a;b.$Each(S,function(b){b.$SetCurrentIndex(t(a),a,c)})}function wc(){var b=i.$DragRegistry||0,a=Y;if(jb)a&1&&(a&=1);i.$DragRegistry|=a;return L=a&~b}function tc(){if(L){i.$DragRegistry&=~Y;L=0}}function Zb(){var a=b.$CreateDiv();b.$SetStyles(a,V);b.$CssPosition(a,"absolute");return a}function t(a){return(a%r+r)%r}function nc(b,d){if(d)if(!D){b=c.min(c.max(b+yb,0),r-u);d=l}else if(D&2){b=t(b+yb);d=l}nb(b,a.$SlideDuration,d)}function zb(){b.$Each(S,function(a){a.$Show(a.$Options.$ChanceToShow<=F)})}function kc(){if(!F){F=1;zb();if(!B){E&12&&gc();E&3&&C[s].$TryActivate()}}}function jc(){if(F){F=0;zb();B||!(E&12)||ic()}}function lc(){V={$Width:K,$Height:J,$Top:0,$Left:0};b.$Each(T,function(a){b.$SetStyles(a,V);b.$CssPosition(a,"absolute");b.$CssOverflow(a,"hidden");b.$HideElement(a)});b.$SetStyles(cb,V)}function lb(b,a){nb(b,a,d)}function nb(h,f,k){if(Tb&&(!B&&(F||!(E&12))||a.$NaviQuitDrag)){O=d;B=l;z.$Stop();if(f==g)f=Xb;var e=Eb.$GetPosition_Display(),b=h;if(k){b=e+h;if(h>0)b=c.ceil(b);else b=c.floor(b)}if(D&2)b=t(b);if(!(D&1))b=c.max(0,c.min(b,r-u));var j=(b-e)%r;b=e+j;var i=e==b?0:f*c.abs(j);i=c.min(i,f*u*1.5);z.$PlayCarousel(e,b,i||1)}}h.$PlayTo=nb;h.$GoTo=function(a){w.$GoToPosition(Lb(a))};h.$Next=function(){lb(1)};h.$Prev=function(){lb(-1)};h.$Pause=function(){P=l};h.$Play=function(){if(!P){P=d;C[s]&&C[s].$TryActivate()}};h.$SetSlideshowTransitions=function(b){a.$SlideshowOptions.$Transitions=b};h.$SetCaptionTransitions=function(a){I.$Transitions=a;I.$Version=b.$GetNow()};h.$SlidesCount=function(){return T.length};h.$CurrentIndex=function(){return s};h.$IsAutoPlaying=function(){return P};h.$IsDragging=function(){return B};h.$IsSliding=function(){return O};h.$IsMouseOver=function(){return!F};h.$LastDragSucceded=function(){return M};function X(){return b.$CssWidth(y||p)}function ib(){return b.$CssHeight(y||p)}h.$OriginalWidth=h.$GetOriginalWidth=X;h.$OriginalHeight=h.$GetOriginalHeight=ib;function Gb(c,d){if(c==g)return b.$CssWidth(p);if(!y){var a=b.$CreateDiv(f);b.$ClassName(a,b.$ClassName(p));b.$CssCssText(a,b.$CssCssText(p));b.$CssDisplay(a,"block");b.$CssPosition(a,"relative");b.$CssTop(a,0);b.$CssLeft(a,0);b.$CssOverflow(a,"visible");y=b.$CreateDiv(f);b.$CssPosition(y,"absolute");b.$CssTop(y,0);b.$CssLeft(y,0);b.$CssWidth(y,b.$CssWidth(p));b.$CssHeight(y,b.$CssHeight(p));b.$CssTransformOrigin(y,"0 0");b.$AppendChild(y,a);var i=b.$Children(p);b.$AppendChild(p,y);b.$Css(p,"backgroundImage","");b.$Each(i,function(c){b.$AppendChild(b.$AttributeEx(c,"noscale")?p:a,c);b.$AttributeEx(c,"autocenter")&&Nb.push(c)})}Z=c/(d?b.$CssHeight:b.$CssWidth)(y);b.$CssScale(y,Z);var h=d?Z*X():c,e=d?c:Z*ib();b.$CssWidth(p,h);b.$CssHeight(p,e);b.$Each(Nb,function(a){var c=b.$ParseInt(b.$AttributeEx(a,"autocenter"));b.$CenterElement(a,c)})}h.$ScaleHeight=h.$GetScaleHeight=function(a){if(a==g)return b.$CssHeight(p);Gb(a,d)};h.$ScaleWidth=h.$SetScaleWidth=h.$GetScaleWidth=Gb;h.$GetVirtualIndex=function(a){var d=c.ceil(t(fb/dc)),b=t(a-s+d);if(b>u){if(a-s>r/2)a-=r;else if(a-s<=-r/2)a+=r}else a=s+b-d;return a};n.call(h);h.$Elmt=p=b.$GetElement(p);var a=b.$Extend({$FillMode:0,$LazyLoading:1,$ArrowKeyNavigation:1,$StartIndex:0,$AutoPlay:l,$Loop:1,$HWA:d,$NaviQuitDrag:d,$AutoPlaySteps:1,$AutoPlayInterval:3e3,$PauseOnHover:1,$SlideDuration:500,$SlideEasing:e.$EaseOutQuad,$MinDragOffsetToSlide:20,$SlideSpacing:0,$Cols:1,$Align:0,$UISearchMode:1,$PlayOrientation:1,$DragOrientation:1},hc);a.$HWA=a.$HWA&&b.$IsBrowser3dSafe();if(a.$Idle!=g)a.$AutoPlayInterval=a.$Idle;if(a.$ParkingPosition!=g)a.$Align=a.$ParkingPosition;var gb=a.$PlayOrientation&3,xc=(a.$PlayOrientation&4)/-4||1,db=a.$SlideshowOptions,I=b.$Extend({$Class:q,$PlayInMode:1,$PlayOutMode:1,$HWA:a.$HWA},a.$CaptionSliderOptions);I.$Transitions=I.$Transitions||I.$CaptionTransitions;var qb=a.$BulletNavigatorOptions,W=a.$ArrowNavigatorOptions,ab=a.$ThumbnailNavigatorOptions,Q=!a.$UISearchMode,y,v=b.$FindChild(p,"slides",Q),cb=b.$FindChild(p,"loading",Q)||b.$CreateDiv(f),Jb=b.$FindChild(p,"navigator",Q),ec=b.$FindChild(p,"arrowleft",Q),cc=b.$FindChild(p,"arrowright",Q),Hb=b.$FindChild(p,"thumbnavigator",Q),pc=b.$CssWidth(v),oc=b.$CssHeight(v),V,T=[],yc=b.$Children(v);b.$Each(yc,function(a){if(a.tagName=="DIV"&&!b.$AttributeEx(a,"u"))T.push(a);else b.$IsBrowserIe9Earlier()&&b.$CssZIndex(a,(b.$CssZIndex(a)||0)+1)});var s=-1,yb,tb,r=T.length,K=a.$SlideWidth||pc,J=a.$SlideHeight||oc,Yb=a.$SlideSpacing,Bb=K+Yb,Cb=J+Yb,dc=gb&1?Bb:Cb,u=c.min(a.$Cols,r),hb,x,L,Ab,S=[],Sb,Ub,Qb,fc,Gc,P,E=a.$PauseOnHover,qc=a.$AutoPlayInterval,Xb=a.$SlideDuration,rb,ub,fb,Tb=u<r,D=Tb?a.$Loop:0,Y,M,F=1,O,B,R,vb=0,wb=0,H,bb,eb,Eb,w,U,z,Vb=new sc,Z,Nb=[];if(r){if(a.$HWA)Mb=function(a,c,d){b.$SetStyleTransform(a,{$TranslateX:c,$TranslateY:d})};P=a.$AutoPlay;h.$Options=hc;lc();b.$Attribute(p,"jssor-slider",d);b.$CssZIndex(v,b.$CssZIndex(v)||0);b.$CssPosition(v,"absolute");hb=b.$CloneNode(v,d);b.$InsertBefore(hb,v);if(db){fc=db.$ShowLink;rb=db.$Class;ub=u==1&&r>1&&rb&&(!b.$IsBrowserIE()||b.$BrowserVersion()>=8)}fb=ub||u>=r||!(D&1)?0:a.$Align;Y=(u>1||fb?gb:-1)&a.$DragOrientation;var xb=v,C=[],A,N,Fb=b.$Device(),jb=Fb.$Touchable,G,pb,Kb,sb;Fb.$TouchActionAttr&&b.$Css(xb,Fb.$TouchActionAttr,([j,"pan-y","pan-x","none"])[Y]||"");U=new Dc;if(ub)A=new rb(Vb,K,J,db,jb);b.$AppendChild(hb,U.$Wrapper);b.$CssOverflow(v,"hidden");N=Zb();b.$Css(N,"backgroundColor","#000");b.$CssOpacity(N,0);b.$InsertBefore(N,xb.firstChild,xb);for(var ob=0;ob<T.length;ob++){var Ac=T[ob],Cc=new Bc(Ac,ob);C.push(Cc)}b.$HideElement(cb);Eb=new Ec;z=new rc(Eb,U);if(Y){b.$AddEvent(v,"mousedown",ac);b.$AddEvent(v,"touchstart",vc);b.$AddEvent(v,"dragstart",Ib);b.$AddEvent(v,"selectstart",Ib);b.$AddEvent(f,"mouseup",mb);b.$AddEvent(f,"touchend",mb);b.$AddEvent(f,"touchcancel",mb);b.$AddEvent(k,"blur",mb)}E&=jb?10:5;if(Jb&&qb){Sb=new qb.$Class(Jb,qb,X(),ib());S.push(Sb)}if(W&&ec&&cc){W.$Loop=D;W.$Cols=u;Ub=new W.$Class(ec,cc,W,X(),ib());S.push(Ub)}if(Hb&&ab){ab.$StartIndex=a.$StartIndex;Qb=new ab.$Class(Hb,ab);S.push(Qb)}b.$Each(S,function(a){a.$Reset(r,C,cb);a.$On(o.$NAVIGATIONREQUEST,nc)});b.$Css(p,"visibility","visible");Gb(X());b.$AddEvent(v,"click",mc,d);b.$AddEvent(p,"mouseout",b.$MouseOverOutFilter(kc,p));b.$AddEvent(p,"mouseover",b.$MouseOverOutFilter(jc,p));zb();a.$ArrowKeyNavigation&&b.$AddEvent(f,"keydown",function(b){if(b.keyCode==37)lb(-a.$ArrowKeyNavigation);else b.keyCode==39&&lb(a.$ArrowKeyNavigation)});var kb=a.$StartIndex;if(!(D&1))kb=c.max(0,c.min(kb,r-u));z.$PlayCarousel(kb,kb,0)}};i.$EVT_CLICK=21;i.$EVT_DRAG_START=22;i.$EVT_DRAG_END=23;i.$EVT_SWIPE_START=24;i.$EVT_SWIPE_END=25;i.$EVT_LOAD_START=26;i.$EVT_LOAD_END=27;i.$EVT_FREEZE=28;i.$EVT_POSITION_CHANGE=202;i.$EVT_PARK=203;i.$EVT_SLIDESHOW_START=206;i.$EVT_SLIDESHOW_END=207;i.$EVT_PROGRESS_CHANGE=208;i.$EVT_STATE_CHANGE=209;var o={$NAVIGATIONREQUEST:1,$INDEXCHANGE:2,$RESET:3};k.$JssorBulletNavigator$=function(e,C){var f=this;n.call(f);e=b.$GetElement(e);var s,A,z,r,k=0,a,m,i,w,x,h,g,q,p,B=[],y=[];function v(a){a!=-1&&y[a].$Selected(a==k)}function t(a){f.$TriggerEvent(o.$NAVIGATIONREQUEST,a*m)}f.$Elmt=e;f.$GetCurrentIndex=function(){return r};f.$SetCurrentIndex=function(a){if(a!=r){var d=k,b=c.floor(a/m);k=b;r=a;v(d);v(b)}};f.$Show=function(a){b.$ShowElement(e,a)};var u;f.$Reset=function(E){if(!u){s=c.ceil(E/m);k=0;var o=q+w,r=p+x,n=c.ceil(s/i)-1;A=q+o*(!h?n:i-1);z=p+r*(h?n:i-1);b.$CssWidth(e,A);b.$CssHeight(e,z);for(var f=0;f<s;f++){var C=b.$CreateSpan();b.$InnerText(C,f+1);var l=b.$BuildElement(g,"numbertemplate",C,d);b.$CssPosition(l,"absolute");var v=f%(n+1);b.$CssLeft(l,!h?o*v:f%i*o);b.$CssTop(l,h?r*v:c.floor(f/(n+1))*r);b.$AppendChild(e,l);B[f]=l;a.$ActionMode&1&&b.$AddEvent(l,"click",b.$CreateCallback(j,t,f));a.$ActionMode&2&&b.$AddEvent(l,"mouseover",b.$MouseOverOutFilter(b.$CreateCallback(j,t,f),l));y[f]=b.$Buttonize(l)}u=d}};f.$Options=a=b.$Extend({$SpacingX:10,$SpacingY:10,$Orientation:1,$ActionMode:1},C);g=b.$FindChild(e,"prototype");q=b.$CssWidth(g);p=b.$CssHeight(g);b.$RemoveElement(g,e);m=a.$Steps||1;i=a.$Rows||1;w=a.$SpacingX;x=a.$SpacingY;h=a.$Orientation-1;a.$Scale==l&&b.$Attribute(e,"noscale",d);a.$AutoCenter&&b.$Attribute(e,"autocenter",a.$AutoCenter)};k.$JssorArrowNavigator$=function(a,g,h){var c=this;n.call(c);var r,q,e,f,i;b.$CssWidth(a);b.$CssHeight(a);function k(a){c.$TriggerEvent(o.$NAVIGATIONREQUEST,a,d)}function p(c){b.$ShowElement(a,c||!h.$Loop&&e==0);b.$ShowElement(g,c||!h.$Loop&&e>=q-h.$Cols);r=c}c.$GetCurrentIndex=function(){return e};c.$SetCurrentIndex=function(b,a,c){if(c)e=a;else{e=b;p(r)}};c.$Show=p;var m;c.$Reset=function(c){q=c;e=0;if(!m){b.$AddEvent(a,"click",b.$CreateCallback(j,k,-i));b.$AddEvent(g,"click",b.$CreateCallback(j,k,i));b.$Buttonize(a);b.$Buttonize(g);m=d}};c.$Options=f=b.$Extend({$Steps:1},h);i=f.$Steps;if(f.$Scale==l){b.$Attribute(a,"noscale",d);b.$Attribute(g,"noscale",d)}if(f.$AutoCenter){b.$Attribute(a,"autocenter",f.$AutoCenter);b.$Attribute(g,"autocenter",f.$AutoCenter)}};k.$JssorThumbnailNavigator$=function(g,B){var h=this,y,p,a,v=[],z,x,e,q,r,u,t,m,s,f,k;n.call(h);g=b.$GetElement(g);function A(n,f){var g=this,c,m,l;function q(){m.$Selected(p==f)}function i(d){if(d||!s.$LastDragSucceded()){var a=e-f%e,b=s.$GetVirtualIndex((f+a)/e-1),c=b*e+e-a;h.$TriggerEvent(o.$NAVIGATIONREQUEST,c)}}g.$Index=f;g.$Highlight=q;l=n.$Thumb||n.$Image||b.$CreateDiv();g.$Wrapper=c=b.$BuildElement(k,"thumbnailtemplate",l,d);m=b.$Buttonize(c);a.$ActionMode&1&&b.$AddEvent(c,"click",b.$CreateCallback(j,i,0));a.$ActionMode&2&&b.$AddEvent(c,"mouseover",b.$MouseOverOutFilter(b.$CreateCallback(j,i,1),c))}h.$GetCurrentIndex=function(){return p};h.$SetCurrentIndex=function(b,d,f){var a=p;p=b;a!=-1&&v[a].$Highlight();v[b].$Highlight();!f&&s.$PlayTo(s.$GetVirtualIndex(c.floor(d/e)))};h.$Show=function(a){b.$ShowElement(g,a)};var w;h.$Reset=function(F,D){if(!w){y=F;c.ceil(y/e);p=-1;m=c.min(m,D.length);var h=a.$Orientation&1,n=u+(u+q)*(e-1)*(1-h),k=t+(t+r)*(e-1)*h,B=n+(n+q)*(m-1)*h,o=k+(k+r)*(m-1)*(1-h);b.$CssPosition(f,"absolute");b.$CssOverflow(f,"hidden");a.$AutoCenter&1&&b.$CssLeft(f,(z-B)/2);a.$AutoCenter&2&&b.$CssTop(f,(x-o)/2);b.$CssWidth(f,B);b.$CssHeight(f,o);var j=[];b.$Each(D,function(l,g){var i=new A(l,g),d=i.$Wrapper,a=c.floor(g/e),k=g%e;b.$CssLeft(d,(u+q)*k*(1-h));b.$CssTop(d,(t+r)*k*h);if(!j[a]){j[a]=b.$CreateDiv();b.$AppendChild(f,j[a])}b.$AppendChild(j[a],d);v.push(i)});var E=b.$Extend({$AutoPlay:l,$NaviQuitDrag:l,$SlideWidth:n,$SlideHeight:k,$SlideSpacing:q*h+r*(1-h),$MinDragOffsetToSlide:12,$SlideDuration:200,$PauseOnHover:1,$PlayOrientation:a.$Orientation,$DragOrientation:a.$NoDrag||a.$DisableDrag?0:a.$Orientation},a);s=new i(g,E);w=d}};h.$Options=a=b.$Extend({$SpacingX:0,$SpacingY:0,$Cols:1,$Orientation:1,$AutoCenter:3,$ActionMode:1},B);z=b.$CssWidth(g);x=b.$CssHeight(g);f=b.$FindChild(g,"slides",d);k=b.$FindChild(f,"prototype");u=b.$CssWidth(k);t=b.$CssHeight(k);b.$RemoveElement(k,f);e=a.$Rows||1;q=a.$SpacingX;r=a.$SpacingY;m=a.$Cols;a.$Scale==l&&b.$Attribute(g,"noscale",d)};function q(e,d,c){var a=this;m.call(a,0,c);a.$Revert=b.$EmptyFunction;a.$IdleBegin=0;a.$IdleEnd=c}k.$JssorCaptionSlideo$=function(n,f,l){var a=this,o,g={},i=f.$Transitions,c=new m(0,0);m.call(a,0,0);function j(d,c){var a={};b.$Each(d,function(d,f){var e=g[f];if(e){if(b.$IsPlainObject(d))d=j(d,c||f=="e");else if(c)if(b.$IsNumeric(d))d=o[d];a[e]=d}});return a}function k(e,c){var a=[],d=b.$Children(e);b.$Each(d,function(d){var h=b.$AttributeEx(d,"u")=="caption";if(h){var e=b.$AttributeEx(d,"t"),g=i[b.$ParseInt(e)]||i[e],f={$Elmt:d,$Transition:g};a.push(f)}if(c<5)a=a.concat(k(d,c+1))});return a}function r(d,e,a){b.$Each(e,function(g){var e=j(g),f=b.$FormatEasings(e.$Easing);if(e.$Left){e.$MoveX=e.$Left;f.$MoveX=f.$Left;delete e.$Left}if(e.$Top){e.$MoveY=e.$Top;f.$MoveY=f.$Top;delete e.$Top}var h={$Easing:f,$OriginalWidth:a.$Width,$OriginalHeight:a.$Height},i=new m(g.b,g.d,h,d,a,e);c.$Combine(i);a=b.$AddDif(a,e)});return a}function q(a){b.$Each(a,function(f){var a=f.$Elmt,e=b.$CssWidth(a),d=b.$CssHeight(a),c={$Left:b.$CssLeft(a),$Top:b.$CssTop(a),$MoveX:0,$MoveY:0,$Opacity:1,$ZIndex:b.$CssZIndex(a)||0,$Rotate:0,$RotateX:0,$RotateY:0,$ScaleX:1,$ScaleY:1,$TranslateX:0,$TranslateY:0,$TranslateZ:0,$SkewX:0,$SkewY:0,$Width:e,$Height:d,$Clip:{$Top:0,$Right:e,$Bottom:d,$Left:0}};c.$OriginalX=c.$Left;c.$OriginalY=c.$Top;r(a,f.$Transition,c)})}function t(g,f,h){var e=g.b-f;if(e){var b=new m(f,e);b.$Combine(c,d);b.$Shift(h);a.$Combine(b)}a.$Expand(g.d);return e}function s(f){var d=c.$GetPosition_OuterBegin(),e=0;b.$Each(f,function(c,f){c=b.$Extend({d:l},c);t(c,d,e);d=c.b;e+=c.d;if(!f||c.t==2){a.$IdleBegin=d;a.$IdleEnd=d+c.d}})}a.$Revert=function(){a.$GoToPosition(-1,d)};o=[h.$Swing,h.$Linear,h.$InQuad,h.$OutQuad,h.$InOutQuad,h.$InCubic,h.$OutCubic,h.$InOutCubic,h.$InQuart,h.$OutQuart,h.$InOutQuart,h.$InQuint,h.$OutQuint,h.$InOutQuint,h.$InSine,h.$OutSine,h.$InOutSine,h.$InExpo,h.$OutExpo,h.$InOutExpo,h.$InCirc,h.$OutCirc,h.$InOutCirc,h.$InElastic,h.$OutElastic,h.$InOutElastic,h.$InBack,h.$OutBack,h.$InOutBack,h.$InBounce,h.$OutBounce,h.$InOutBounce,h.$GoBack,h.$InWave,h.$OutWave,h.$OutJump,h.$InJump];var u={$Top:"y",$Left:"x",$Bottom:"m",$Right:"t",$Rotate:"r",$RotateX:"rX",$RotateY:"rY",$ScaleX:"sX",$ScaleY:"sY",$TranslateX:"tX",$TranslateY:"tY",$TranslateZ:"tZ",$SkewX:"kX",$SkewY:"kY",$Opacity:"o",$Easing:"e",$ZIndex:"i",$Clip:"c"};b.$Each(u,function(b,a){g[b]=a});q(k(n,1));c.$GoToPosition(-1);var p=f.$Breaks||[],e=[].concat(p[b.$ParseInt(b.$AttributeEx(n,"b"))]||[]);e.push({b:c.$GetPosition_OuterEnd(),d:e.length?0:l});s(e);a.$GoToPosition(-1)}})(window,document,Math,null,true,false)
js/bumble_filter/slick.js ADDED
@@ -0,0 +1,2892 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ _ _ _ _
3
+ ___| (_) ___| | __ (_)___
4
+ / __| | |/ __| |/ / | / __|
5
+ \__ \ | | (__| < _ | \__ \
6
+ |___/_|_|\___|_|\_(_)/ |___/
7
+ |__/
8
+
9
+ Version: 1.6.0
10
+ Author: Ken Wheeler
11
+ Website: http://kenwheeler.github.io
12
+ Docs: http://kenwheeler.github.io/slick
13
+ Repo: http://github.com/kenwheeler/slick
14
+ Issues: http://github.com/kenwheeler/slick/issues
15
+
16
+ */
17
+ /* global window, document, define, jQuery, setInterval, clearInterval */
18
+ (function(factory) {
19
+ 'use strict';
20
+ if (typeof define === 'function' && define.amd) {
21
+ define(['jquery'], factory);
22
+ } else if (typeof exports !== 'undefined') {
23
+ module.exports = factory(require('jquery'));
24
+ } else {
25
+ factory(jQuery);
26
+ }
27
+
28
+ }(function($) {
29
+ 'use strict';
30
+ var Slick = window.Slick || {};
31
+
32
+ Slick = (function() {
33
+
34
+ var instanceUid = 0;
35
+
36
+ function Slick(element, settings) {
37
+
38
+ var _ = this, dataSettings;
39
+
40
+ _.defaults = {
41
+ accessibility: true,
42
+ adaptiveHeight: false,
43
+ appendArrows: $(element),
44
+ appendDots: $(element),
45
+ arrows: true,
46
+ asNavFor: null,
47
+ prevArrow: '<button type="button" data-role="none" class="slick-prev" aria-label="Previous" tabindex="0" role="button">Previous</button>',
48
+ nextArrow: '<button type="button" data-role="none" class="slick-next" aria-label="Next" tabindex="0" role="button">Next</button>',
49
+ autoplay: false,
50
+ autoplaySpeed: 3000,
51
+ centerMode: false,
52
+ centerPadding: '50px',
53
+ cssEase: 'ease',
54
+ customPaging: function(slider, i) {
55
+ return $('<button type="button" data-role="none" role="button" tabindex="0" />').text(i + 1);
56
+ },
57
+ dots: false,
58
+ dotsClass: 'slick-dots',
59
+ draggable: true,
60
+ easing: 'linear',
61
+ edgeFriction: 0.35,
62
+ fade: false,
63
+ focusOnSelect: false,
64
+ infinite: true,
65
+ initialSlide: 0,
66
+ lazyLoad: 'ondemand',
67
+ mobileFirst: false,
68
+ pauseOnHover: true,
69
+ pauseOnFocus: true,
70
+ pauseOnDotsHover: false,
71
+ respondTo: 'window',
72
+ responsive: null,
73
+ rows: 1,
74
+ rtl: false,
75
+ slide: '',
76
+ slidesPerRow: 1,
77
+ slidesToShow: 1,
78
+ slidesToScroll: 1,
79
+ speed: 500,
80
+ swipe: true,
81
+ swipeToSlide: false,
82
+ touchMove: true,
83
+ touchThreshold: 5,
84
+ useCSS: true,
85
+ useTransform: true,
86
+ variableWidth: false,
87
+ vertical: false,
88
+ verticalSwiping: false,
89
+ waitForAnimate: true,
90
+ zIndex: 1000
91
+ };
92
+
93
+ _.initials = {
94
+ animating: false,
95
+ dragging: false,
96
+ autoPlayTimer: null,
97
+ currentDirection: 0,
98
+ currentLeft: null,
99
+ currentSlide: 0,
100
+ direction: 1,
101
+ $dots: null,
102
+ listWidth: null,
103
+ listHeight: null,
104
+ loadIndex: 0,
105
+ $nextArrow: null,
106
+ $prevArrow: null,
107
+ slideCount: null,
108
+ slideWidth: null,
109
+ $slideTrack: null,
110
+ $slides: null,
111
+ sliding: false,
112
+ slideOffset: 0,
113
+ swipeLeft: null,
114
+ $list: null,
115
+ touchObject: {},
116
+ transformsEnabled: false,
117
+ unslicked: false
118
+ };
119
+
120
+ $.extend(_, _.initials);
121
+
122
+ _.activeBreakpoint = null;
123
+ _.animType = null;
124
+ _.animProp = null;
125
+ _.breakpoints = [];
126
+ _.breakpointSettings = [];
127
+ _.cssTransitions = false;
128
+ _.focussed = false;
129
+ _.interrupted = false;
130
+ _.hidden = 'hidden';
131
+ _.paused = true;
132
+ _.positionProp = null;
133
+ _.respondTo = null;
134
+ _.rowCount = 1;
135
+ _.shouldClick = true;
136
+ _.$slider = $(element);
137
+ _.$slidesCache = null;
138
+ _.transformType = null;
139
+ _.transitionType = null;
140
+ _.visibilityChange = 'visibilitychange';
141
+ _.windowWidth = 0;
142
+ _.windowTimer = null;
143
+
144
+ dataSettings = $(element).data('slick') || {};
145
+
146
+ _.options = $.extend({}, _.defaults, settings, dataSettings);
147
+
148
+ _.currentSlide = _.options.initialSlide;
149
+
150
+ _.originalSettings = _.options;
151
+
152
+ if (typeof document.mozHidden !== 'undefined') {
153
+ _.hidden = 'mozHidden';
154
+ _.visibilityChange = 'mozvisibilitychange';
155
+ } else if (typeof document.webkitHidden !== 'undefined') {
156
+ _.hidden = 'webkitHidden';
157
+ _.visibilityChange = 'webkitvisibilitychange';
158
+ }
159
+
160
+ _.autoPlay = $.proxy(_.autoPlay, _);
161
+ _.autoPlayClear = $.proxy(_.autoPlayClear, _);
162
+ _.autoPlayIterator = $.proxy(_.autoPlayIterator, _);
163
+ _.changeSlide = $.proxy(_.changeSlide, _);
164
+ _.clickHandler = $.proxy(_.clickHandler, _);
165
+ _.selectHandler = $.proxy(_.selectHandler, _);
166
+ _.setPosition = $.proxy(_.setPosition, _);
167
+ _.swipeHandler = $.proxy(_.swipeHandler, _);
168
+ _.dragHandler = $.proxy(_.dragHandler, _);
169
+ _.keyHandler = $.proxy(_.keyHandler, _);
170
+
171
+ _.instanceUid = instanceUid++;
172
+
173
+ // A simple way to check for HTML strings
174
+ // Strict HTML recognition (must start with <)
175
+ // Extracted from jQuery v1.11 source
176
+ _.htmlExpr = /^(?:\s*(<[\w\W]+>)[^>]*)$/;
177
+
178
+
179
+ _.registerBreakpoints();
180
+ _.init(true);
181
+
182
+ }
183
+
184
+ return Slick;
185
+
186
+ }());
187
+
188
+ Slick.prototype.activateADA = function() {
189
+ var _ = this;
190
+
191
+ _.$slideTrack.find('.slick-active').attr({
192
+ 'aria-hidden': 'false'
193
+ }).find('a, input, button, select').attr({
194
+ 'tabindex': '0'
195
+ });
196
+
197
+ };
198
+
199
+ Slick.prototype.addSlide = Slick.prototype.slickAdd = function(markup, index, addBefore) {
200
+
201
+ var _ = this;
202
+
203
+ if (typeof(index) === 'boolean') {
204
+ addBefore = index;
205
+ index = null;
206
+ } else if (index < 0 || (index >= _.slideCount)) {
207
+ return false;
208
+ }
209
+
210
+ _.unload();
211
+
212
+ if (typeof(index) === 'number') {
213
+ if (index === 0 && _.$slides.length === 0) {
214
+ $(markup).appendTo(_.$slideTrack);
215
+ } else if (addBefore) {
216
+ $(markup).insertBefore(_.$slides.eq(index));
217
+ } else {
218
+ $(markup).insertAfter(_.$slides.eq(index));
219
+ }
220
+ } else {
221
+ if (addBefore === true) {
222
+ $(markup).prependTo(_.$slideTrack);
223
+ } else {
224
+ $(markup).appendTo(_.$slideTrack);
225
+ }
226
+ }
227
+
228
+ _.$slides = _.$slideTrack.children(this.options.slide);
229
+
230
+ _.$slideTrack.children(this.options.slide).detach();
231
+
232
+ _.$slideTrack.append(_.$slides);
233
+
234
+ _.$slides.each(function(index, element) {
235
+ $(element).attr('data-slick-index', index);
236
+ });
237
+
238
+ _.$slidesCache = _.$slides;
239
+
240
+ _.reinit();
241
+
242
+ };
243
+
244
+ Slick.prototype.animateHeight = function() {
245
+ var _ = this;
246
+ if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) {
247
+ var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true);
248
+ _.$list.animate({
249
+ height: targetHeight
250
+ }, _.options.speed);
251
+ }
252
+ };
253
+
254
+ Slick.prototype.animateSlide = function(targetLeft, callback) {
255
+
256
+ var animProps = {},
257
+ _ = this;
258
+
259
+ _.animateHeight();
260
+
261
+ if (_.options.rtl === true && _.options.vertical === false) {
262
+ targetLeft = -targetLeft;
263
+ }
264
+ if (_.transformsEnabled === false) {
265
+ if (_.options.vertical === false) {
266
+ _.$slideTrack.animate({
267
+ left: targetLeft
268
+ }, _.options.speed, _.options.easing, callback);
269
+ } else {
270
+ _.$slideTrack.animate({
271
+ top: targetLeft
272
+ }, _.options.speed, _.options.easing, callback);
273
+ }
274
+
275
+ } else {
276
+
277
+ if (_.cssTransitions === false) {
278
+ if (_.options.rtl === true) {
279
+ _.currentLeft = -(_.currentLeft);
280
+ }
281
+ $({
282
+ animStart: _.currentLeft
283
+ }).animate({
284
+ animStart: targetLeft
285
+ }, {
286
+ duration: _.options.speed,
287
+ easing: _.options.easing,
288
+ step: function(now) {
289
+ now = Math.ceil(now);
290
+ if (_.options.vertical === false) {
291
+ animProps[_.animType] = 'translate(' +
292
+ now + 'px, 0px)';
293
+ _.$slideTrack.css(animProps);
294
+ } else {
295
+ animProps[_.animType] = 'translate(0px,' +
296
+ now + 'px)';
297
+ _.$slideTrack.css(animProps);
298
+ }
299
+ },
300
+ complete: function() {
301
+ if (callback) {
302
+ callback.call();
303
+ }
304
+ }
305
+ });
306
+
307
+ } else {
308
+
309
+ _.applyTransition();
310
+ targetLeft = Math.ceil(targetLeft);
311
+
312
+ if (_.options.vertical === false) {
313
+ animProps[_.animType] = 'translate3d(' + targetLeft + 'px, 0px, 0px)';
314
+ } else {
315
+ animProps[_.animType] = 'translate3d(0px,' + targetLeft + 'px, 0px)';
316
+ }
317
+ _.$slideTrack.css(animProps);
318
+
319
+ if (callback) {
320
+ setTimeout(function() {
321
+
322
+ _.disableTransition();
323
+
324
+ callback.call();
325
+ }, _.options.speed);
326
+ }
327
+
328
+ }
329
+
330
+ }
331
+
332
+ };
333
+
334
+ Slick.prototype.getNavTarget = function() {
335
+
336
+ var _ = this,
337
+ asNavFor = _.options.asNavFor;
338
+
339
+ if ( asNavFor && asNavFor !== null ) {
340
+ asNavFor = $(asNavFor).not(_.$slider);
341
+ }
342
+
343
+ return asNavFor;
344
+
345
+ };
346
+
347
+ Slick.prototype.asNavFor = function(index) {
348
+
349
+ var _ = this,
350
+ asNavFor = _.getNavTarget();
351
+
352
+ if ( asNavFor !== null && typeof asNavFor === 'object' ) {
353
+ asNavFor.each(function() {
354
+ var target = $(this).slick('getSlick');
355
+ if(!target.unslicked) {
356
+ target.slideHandler(index, true);
357
+ }
358
+ });
359
+ }
360
+
361
+ };
362
+
363
+ Slick.prototype.applyTransition = function(slide) {
364
+
365
+ var _ = this,
366
+ transition = {};
367
+
368
+ if (_.options.fade === false) {
369
+ transition[_.transitionType] = _.transformType + ' ' + _.options.speed + 'ms ' + _.options.cssEase;
370
+ } else {
371
+ transition[_.transitionType] = 'opacity ' + _.options.speed + 'ms ' + _.options.cssEase;
372
+ }
373
+
374
+ if (_.options.fade === false) {
375
+ _.$slideTrack.css(transition);
376
+ } else {
377
+ _.$slides.eq(slide).css(transition);
378
+ }
379
+
380
+ };
381
+
382
+ Slick.prototype.autoPlay = function() {
383
+
384
+ var _ = this;
385
+
386
+ _.autoPlayClear();
387
+
388
+ if ( _.slideCount > _.options.slidesToShow ) {
389
+ _.autoPlayTimer = setInterval( _.autoPlayIterator, _.options.autoplaySpeed );
390
+ }
391
+
392
+ };
393
+
394
+ Slick.prototype.autoPlayClear = function() {
395
+
396
+ var _ = this;
397
+
398
+ if (_.autoPlayTimer) {
399
+ clearInterval(_.autoPlayTimer);
400
+ }
401
+
402
+ };
403
+
404
+ Slick.prototype.autoPlayIterator = function() {
405
+
406
+ var _ = this,
407
+ slideTo = _.currentSlide + _.options.slidesToScroll;
408
+
409
+ if ( !_.paused && !_.interrupted && !_.focussed ) {
410
+
411
+ if ( _.options.infinite === false ) {
412
+
413
+ if ( _.direction === 1 && ( _.currentSlide + 1 ) === ( _.slideCount - 1 )) {
414
+ _.direction = 0;
415
+ }
416
+
417
+ else if ( _.direction === 0 ) {
418
+
419
+ slideTo = _.currentSlide - _.options.slidesToScroll;
420
+
421
+ if ( _.currentSlide - 1 === 0 ) {
422
+ _.direction = 1;
423
+ }
424
+
425
+ }
426
+
427
+ }
428
+
429
+ _.slideHandler( slideTo );
430
+
431
+ }
432
+
433
+ };
434
+
435
+ Slick.prototype.buildArrows = function() {
436
+
437
+ var _ = this;
438
+
439
+ if (_.options.arrows === true ) {
440
+
441
+ _.$prevArrow = $(_.options.prevArrow).addClass('slick-arrow');
442
+ _.$nextArrow = $(_.options.nextArrow).addClass('slick-arrow');
443
+
444
+ if( _.slideCount > _.options.slidesToShow ) {
445
+
446
+ _.$prevArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex');
447
+ _.$nextArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex');
448
+
449
+ if (_.htmlExpr.test(_.options.prevArrow)) {
450
+ _.$prevArrow.prependTo(_.options.appendArrows);
451
+ }
452
+
453
+ if (_.htmlExpr.test(_.options.nextArrow)) {
454
+ _.$nextArrow.appendTo(_.options.appendArrows);
455
+ }
456
+
457
+ if (_.options.infinite !== true) {
458
+ _.$prevArrow
459
+ .addClass('slick-disabled')
460
+ .attr('aria-disabled', 'true');
461
+ }
462
+
463
+ } else {
464
+
465
+ _.$prevArrow.add( _.$nextArrow )
466
+
467
+ .addClass('slick-hidden')
468
+ .attr({
469
+ 'aria-disabled': 'true',
470
+ 'tabindex': '-1'
471
+ });
472
+
473
+ }
474
+
475
+ }
476
+
477
+ };
478
+
479
+ Slick.prototype.buildDots = function() {
480
+
481
+ var _ = this,
482
+ i, dot;
483
+
484
+ if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
485
+
486
+ _.$slider.addClass('slick-dotted');
487
+
488
+ dot = $('<ul />').addClass(_.options.dotsClass);
489
+
490
+ for (i = 0; i <= _.getDotCount(); i += 1) {
491
+ dot.append($('<li />').append(_.options.customPaging.call(this, _, i)));
492
+ }
493
+
494
+ _.$dots = dot.appendTo(_.options.appendDots);
495
+
496
+ _.$dots.find('li').first().addClass('slick-active').attr('aria-hidden', 'false');
497
+
498
+ }
499
+
500
+ };
501
+
502
+ Slick.prototype.buildOut = function() {
503
+
504
+ var _ = this;
505
+
506
+ _.$slides =
507
+ _.$slider
508
+ .children( _.options.slide + ':not(.slick-cloned)')
509
+ .addClass('slick-slide');
510
+
511
+ _.slideCount = _.$slides.length;
512
+
513
+ _.$slides.each(function(index, element) {
514
+ $(element)
515
+ .attr('data-slick-index', index)
516
+ .data('originalStyling', $(element).attr('style') || '');
517
+ });
518
+
519
+ _.$slider.addClass('slick-slider');
520
+
521
+ _.$slideTrack = (_.slideCount === 0) ?
522
+ $('<div class="slick-track"/>').appendTo(_.$slider) :
523
+ _.$slides.wrapAll('<div class="slick-track"/>').parent();
524
+
525
+ _.$list = _.$slideTrack.wrap(
526
+ '<div aria-live="polite" class="slick-list"/>').parent();
527
+ _.$slideTrack.css('opacity', 0);
528
+
529
+ if (_.options.centerMode === true || _.options.swipeToSlide === true) {
530
+ _.options.slidesToScroll = 1;
531
+ }
532
+
533
+ $('img[data-lazy]', _.$slider).not('[src]').addClass('slick-loading');
534
+
535
+ _.setupInfinite();
536
+
537
+ _.buildArrows();
538
+
539
+ _.buildDots();
540
+
541
+ _.updateDots();
542
+
543
+
544
+ _.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0);
545
+
546
+ if (_.options.draggable === true) {
547
+ _.$list.addClass('draggable');
548
+ }
549
+
550
+ };
551
+
552
+ Slick.prototype.buildRows = function() {
553
+
554
+ var _ = this, a, b, c, newSlides, numOfSlides, originalSlides,slidesPerSection;
555
+
556
+ newSlides = document.createDocumentFragment();
557
+ originalSlides = _.$slider.children();
558
+
559
+ if(_.options.rows > 1) {
560
+
561
+ slidesPerSection = _.options.slidesPerRow * _.options.rows;
562
+ numOfSlides = Math.ceil(
563
+ originalSlides.length / slidesPerSection
564
+ );
565
+
566
+ for(a = 0; a < numOfSlides; a++){
567
+ var slide = document.createElement('div');
568
+ for(b = 0; b < _.options.rows; b++) {
569
+ var row = document.createElement('div');
570
+ for(c = 0; c < _.options.slidesPerRow; c++) {
571
+ var target = (a * slidesPerSection + ((b * _.options.slidesPerRow) + c));
572
+ if (originalSlides.get(target)) {
573
+ row.appendChild(originalSlides.get(target));
574
+ }
575
+ }
576
+ slide.appendChild(row);
577
+ }
578
+ newSlides.appendChild(slide);
579
+ }
580
+
581
+ _.$slider.empty().append(newSlides);
582
+ _.$slider.children().children().children()
583
+ .css({
584
+ 'width':(100 / _.options.slidesPerRow) + '%',
585
+ 'display': 'inline-block'
586
+ });
587
+
588
+ }
589
+
590
+ };
591
+
592
+ Slick.prototype.checkResponsive = function(initial, forceUpdate) {
593
+
594
+ var _ = this,
595
+ breakpoint, targetBreakpoint, respondToWidth, triggerBreakpoint = false;
596
+ var sliderWidth = _.$slider.width();
597
+ var windowWidth = window.innerWidth || $(window).width();
598
+
599
+ if (_.respondTo === 'window') {
600
+ respondToWidth = windowWidth;
601
+ } else if (_.respondTo === 'slider') {
602
+ respondToWidth = sliderWidth;
603
+ } else if (_.respondTo === 'min') {
604
+ respondToWidth = Math.min(windowWidth, sliderWidth);
605
+ }
606
+
607
+ if ( _.options.responsive &&
608
+ _.options.responsive.length &&
609
+ _.options.responsive !== null) {
610
+
611
+ targetBreakpoint = null;
612
+
613
+ for (breakpoint in _.breakpoints) {
614
+ if (_.breakpoints.hasOwnProperty(breakpoint)) {
615
+ if (_.originalSettings.mobileFirst === false) {
616
+ if (respondToWidth < _.breakpoints[breakpoint]) {
617
+ targetBreakpoint = _.breakpoints[breakpoint];
618
+ }
619
+ } else {
620
+ if (respondToWidth > _.breakpoints[breakpoint]) {
621
+ targetBreakpoint = _.breakpoints[breakpoint];
622
+ }
623
+ }
624
+ }
625
+ }
626
+
627
+ if (targetBreakpoint !== null) {
628
+ if (_.activeBreakpoint !== null) {
629
+ if (targetBreakpoint !== _.activeBreakpoint || forceUpdate) {
630
+ _.activeBreakpoint =
631
+ targetBreakpoint;
632
+ if (_.breakpointSettings[targetBreakpoint] === 'unslick') {
633
+ _.unslick(targetBreakpoint);
634
+ } else {
635
+ _.options = $.extend({}, _.originalSettings,
636
+ _.breakpointSettings[
637
+ targetBreakpoint]);
638
+ if (initial === true) {
639
+ _.currentSlide = _.options.initialSlide;
640
+ }
641
+ _.refresh(initial);
642
+ }
643
+ triggerBreakpoint = targetBreakpoint;
644
+ }
645
+ } else {
646
+ _.activeBreakpoint = targetBreakpoint;
647
+ if (_.breakpointSettings[targetBreakpoint] === 'unslick') {
648
+ _.unslick(targetBreakpoint);
649
+ } else {
650
+ _.options = $.extend({}, _.originalSettings,
651
+ _.breakpointSettings[
652
+ targetBreakpoint]);
653
+ if (initial === true) {
654
+ _.currentSlide = _.options.initialSlide;
655
+ }
656
+ _.refresh(initial);
657
+ }
658
+ triggerBreakpoint = targetBreakpoint;
659
+ }
660
+ } else {
661
+ if (_.activeBreakpoint !== null) {
662
+ _.activeBreakpoint = null;
663
+ _.options = _.originalSettings;
664
+ if (initial === true) {
665
+ _.currentSlide = _.options.initialSlide;
666
+ }
667
+ _.refresh(initial);
668
+ triggerBreakpoint = targetBreakpoint;
669
+ }
670
+ }
671
+
672
+ // only trigger breakpoints during an actual break. not on initialize.
673
+ if( !initial && triggerBreakpoint !== false ) {
674
+ _.$slider.trigger('breakpoint', [_, triggerBreakpoint]);
675
+ }
676
+ }
677
+
678
+ };
679
+
680
+ Slick.prototype.changeSlide = function(event, dontAnimate) {
681
+
682
+ var _ = this,
683
+ $target = $(event.currentTarget),
684
+ indexOffset, slideOffset, unevenOffset;
685
+
686
+ // If target is a link, prevent default action.
687
+ if($target.is('a')) {
688
+ event.preventDefault();
689
+ }
690
+
691
+ // If target is not the <li> element (ie: a child), find the <li>.
692
+ if(!$target.is('li')) {
693
+ $target = $target.closest('li');
694
+ }
695
+
696
+ unevenOffset = (_.slideCount % _.options.slidesToScroll !== 0);
697
+ indexOffset = unevenOffset ? 0 : (_.slideCount - _.currentSlide) % _.options.slidesToScroll;
698
+
699
+ switch (event.data.message) {
700
+
701
+ case 'previous':
702
+ slideOffset = indexOffset === 0 ? _.options.slidesToScroll : _.options.slidesToShow - indexOffset;
703
+ if (_.slideCount > _.options.slidesToShow) {
704
+ _.slideHandler(_.currentSlide - slideOffset, false, dontAnimate);
705
+ }
706
+ break;
707
+
708
+ case 'next':
709
+ slideOffset = indexOffset === 0 ? _.options.slidesToScroll : indexOffset;
710
+ if (_.slideCount > _.options.slidesToShow) {
711
+ _.slideHandler(_.currentSlide + slideOffset, false, dontAnimate);
712
+ }
713
+ break;
714
+
715
+ case 'index':
716
+ var index = event.data.index === 0 ? 0 :
717
+ event.data.index || $target.index() * _.options.slidesToScroll;
718
+
719
+ _.slideHandler(_.checkNavigable(index), false, dontAnimate);
720
+ $target.children().trigger('focus');
721
+ break;
722
+
723
+ default:
724
+ return;
725
+ }
726
+
727
+ };
728
+
729
+ Slick.prototype.checkNavigable = function(index) {
730
+
731
+ var _ = this,
732
+ navigables, prevNavigable;
733
+
734
+ navigables = _.getNavigableIndexes();
735
+ prevNavigable = 0;
736
+ if (index > navigables[navigables.length - 1]) {
737
+ index = navigables[navigables.length - 1];
738
+ } else {
739
+ for (var n in navigables) {
740
+ if (index < navigables[n]) {
741
+ index = prevNavigable;
742
+ break;
743
+ }
744
+ prevNavigable = navigables[n];
745
+ }
746
+ }
747
+
748
+ return index;
749
+ };
750
+
751
+ Slick.prototype.cleanUpEvents = function() {
752
+
753
+ var _ = this;
754
+
755
+ if (_.options.dots && _.$dots !== null) {
756
+
757
+ $('li', _.$dots)
758
+ .off('click.slick', _.changeSlide)
759
+ .off('mouseenter.slick', $.proxy(_.interrupt, _, true))
760
+ .off('mouseleave.slick', $.proxy(_.interrupt, _, false));
761
+
762
+ }
763
+
764
+ _.$slider.off('focus.slick blur.slick');
765
+
766
+ if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
767
+ _.$prevArrow && _.$prevArrow.off('click.slick', _.changeSlide);
768
+ _.$nextArrow && _.$nextArrow.off('click.slick', _.changeSlide);
769
+ }
770
+
771
+ _.$list.off('touchstart.slick mousedown.slick', _.swipeHandler);
772
+ _.$list.off('touchmove.slick mousemove.slick', _.swipeHandler);
773
+ _.$list.off('touchend.slick mouseup.slick', _.swipeHandler);
774
+ _.$list.off('touchcancel.slick mouseleave.slick', _.swipeHandler);
775
+
776
+ _.$list.off('click.slick', _.clickHandler);
777
+
778
+ $(document).off(_.visibilityChange, _.visibility);
779
+
780
+ _.cleanUpSlideEvents();
781
+
782
+ if (_.options.accessibility === true) {
783
+ _.$list.off('keydown.slick', _.keyHandler);
784
+ }
785
+
786
+ if (_.options.focusOnSelect === true) {
787
+ $(_.$slideTrack).children().off('click.slick', _.selectHandler);
788
+ }
789
+
790
+ $(window).off('orientationchange.slick.slick-' + _.instanceUid, _.orientationChange);
791
+
792
+ $(window).off('resize.slick.slick-' + _.instanceUid, _.resize);
793
+
794
+ $('[draggable!=true]', _.$slideTrack).off('dragstart', _.preventDefault);
795
+
796
+ $(window).off('load.slick.slick-' + _.instanceUid, _.setPosition);
797
+ $(document).off('ready.slick.slick-' + _.instanceUid, _.setPosition);
798
+
799
+ };
800
+
801
+ Slick.prototype.cleanUpSlideEvents = function() {
802
+
803
+ var _ = this;
804
+
805
+ _.$list.off('mouseenter.slick', $.proxy(_.interrupt, _, true));
806
+ _.$list.off('mouseleave.slick', $.proxy(_.interrupt, _, false));
807
+
808
+ };
809
+
810
+ Slick.prototype.cleanUpRows = function() {
811
+
812
+ var _ = this, originalSlides;
813
+
814
+ if(_.options.rows > 1) {
815
+ originalSlides = _.$slides.children().children();
816
+ originalSlides.removeAttr('style');
817
+ _.$slider.empty().append(originalSlides);
818
+ }
819
+
820
+ };
821
+
822
+ Slick.prototype.clickHandler = function(event) {
823
+
824
+ var _ = this;
825
+
826
+ if (_.shouldClick === false) {
827
+ event.stopImmediatePropagation();
828
+ event.stopPropagation();
829
+ event.preventDefault();
830
+ }
831
+
832
+ };
833
+
834
+ Slick.prototype.destroy = function(refresh) {
835
+
836
+ var _ = this;
837
+
838
+ _.autoPlayClear();
839
+
840
+ _.touchObject = {};
841
+
842
+ _.cleanUpEvents();
843
+
844
+ $('.slick-cloned', _.$slider).detach();
845
+
846
+ if (_.$dots) {
847
+ _.$dots.remove();
848
+ }
849
+
850
+
851
+ if ( _.$prevArrow && _.$prevArrow.length ) {
852
+
853
+ _.$prevArrow
854
+ .removeClass('slick-disabled slick-arrow slick-hidden')
855
+ .removeAttr('aria-hidden aria-disabled tabindex')
856
+ .css('display','');
857
+
858
+ if ( _.htmlExpr.test( _.options.prevArrow )) {
859
+ _.$prevArrow.remove();
860
+ }
861
+ }
862
+
863
+ if ( _.$nextArrow && _.$nextArrow.length ) {
864
+
865
+ _.$nextArrow
866
+ .removeClass('slick-disabled slick-arrow slick-hidden')
867
+ .removeAttr('aria-hidden aria-disabled tabindex')
868
+ .css('display','');
869
+
870
+ if ( _.htmlExpr.test( _.options.nextArrow )) {
871
+ _.$nextArrow.remove();
872
+ }
873
+
874
+ }
875
+
876
+
877
+ if (_.$slides) {
878
+
879
+ _.$slides
880
+ .removeClass('slick-slide slick-active slick-center slick-visible slick-current')
881
+ .removeAttr('aria-hidden')
882
+ .removeAttr('data-slick-index')
883
+ .each(function(){
884
+ $(this).attr('style', $(this).data('originalStyling'));
885
+ });
886
+
887
+ _.$slideTrack.children(this.options.slide).detach();
888
+
889
+ _.$slideTrack.detach();
890
+
891
+ _.$list.detach();
892
+
893
+ _.$slider.append(_.$slides);
894
+ }
895
+
896
+ _.cleanUpRows();
897
+
898
+ _.$slider.removeClass('slick-slider');
899
+ _.$slider.removeClass('slick-initialized');
900
+ _.$slider.removeClass('slick-dotted');
901
+
902
+ _.unslicked = true;
903
+
904
+ if(!refresh) {
905
+ _.$slider.trigger('destroy', [_]);
906
+ }
907
+
908
+ };
909
+
910
+ Slick.prototype.disableTransition = function(slide) {
911
+
912
+ var _ = this,
913
+ transition = {};
914
+
915
+ transition[_.transitionType] = '';
916
+
917
+ if (_.options.fade === false) {
918
+ _.$slideTrack.css(transition);
919
+ } else {
920
+ _.$slides.eq(slide).css(transition);
921
+ }
922
+
923
+ };
924
+
925
+ Slick.prototype.fadeSlide = function(slideIndex, callback) {
926
+
927
+ var _ = this;
928
+
929
+ if (_.cssTransitions === false) {
930
+
931
+ _.$slides.eq(slideIndex).css({
932
+ zIndex: _.options.zIndex
933
+ });
934
+
935
+ _.$slides.eq(slideIndex).animate({
936
+ opacity: 1
937
+ }, _.options.speed, _.options.easing, callback);
938
+
939
+ } else {
940
+
941
+ _.applyTransition(slideIndex);
942
+
943
+ _.$slides.eq(slideIndex).css({
944
+ opacity: 1,
945
+ zIndex: _.options.zIndex
946
+ });
947
+
948
+ if (callback) {
949
+ setTimeout(function() {
950
+
951
+ _.disableTransition(slideIndex);
952
+
953
+ callback.call();
954
+ }, _.options.speed);
955
+ }
956
+
957
+ }
958
+
959
+ };
960
+
961
+ Slick.prototype.fadeSlideOut = function(slideIndex) {
962
+
963
+ var _ = this;
964
+
965
+ if (_.cssTransitions === false) {
966
+
967
+ _.$slides.eq(slideIndex).animate({
968
+ opacity: 0,
969
+ zIndex: _.options.zIndex - 2
970
+ }, _.options.speed, _.options.easing);
971
+
972
+ } else {
973
+
974
+ _.applyTransition(slideIndex);
975
+
976
+ _.$slides.eq(slideIndex).css({
977
+ opacity: 0,
978
+ zIndex: _.options.zIndex - 2
979
+ });
980
+
981
+ }
982
+
983
+ };
984
+
985
+ Slick.prototype.filterSlides = Slick.prototype.slickFilter = function(filter) {
986
+
987
+ var _ = this;
988
+
989
+ if (filter !== null) {
990
+
991
+ _.$slidesCache = _.$slides;
992
+
993
+ _.unload();
994
+
995
+ _.$slideTrack.children(this.options.slide).detach();
996
+
997
+ _.$slidesCache.filter(filter).appendTo(_.$slideTrack);
998
+
999
+ _.reinit();
1000
+
1001
+ }
1002
+
1003
+ };
1004
+
1005
+ Slick.prototype.focusHandler = function() {
1006
+
1007
+ var _ = this;
1008
+
1009
+ _.$slider
1010
+ .off('focus.slick blur.slick')
1011
+ .on('focus.slick blur.slick',
1012
+ '*:not(.slick-arrow)', function(event) {
1013
+
1014
+ event.stopImmediatePropagation();
1015
+ var $sf = $(this);
1016
+
1017
+ setTimeout(function() {
1018
+
1019
+ if( _.options.pauseOnFocus ) {
1020
+ _.focussed = $sf.is(':focus');
1021
+ _.autoPlay();
1022
+ }
1023
+
1024
+ }, 0);
1025
+
1026
+ });
1027
+ };
1028
+
1029
+ Slick.prototype.getCurrent = Slick.prototype.slickCurrentSlide = function() {
1030
+
1031
+ var _ = this;
1032
+ return _.currentSlide;
1033
+
1034
+ };
1035
+
1036
+ Slick.prototype.getDotCount = function() {
1037
+
1038
+ var _ = this;
1039
+
1040
+ var breakPoint = 0;
1041
+ var counter = 0;
1042
+ var pagerQty = 0;
1043
+
1044
+ if (_.options.infinite === true) {
1045
+ while (breakPoint < _.slideCount) {
1046
+ ++pagerQty;
1047
+ breakPoint = counter + _.options.slidesToScroll;
1048
+ counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
1049
+ }
1050
+ } else if (_.options.centerMode === true) {
1051
+ pagerQty = _.slideCount;
1052
+ } else if(!_.options.asNavFor) {
1053
+ pagerQty = 1 + Math.ceil((_.slideCount - _.options.slidesToShow) / _.options.slidesToScroll);
1054
+ }else {
1055
+ while (breakPoint < _.slideCount) {
1056
+ ++pagerQty;
1057
+ breakPoint = counter + _.options.slidesToScroll;
1058
+ counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
1059
+ }
1060
+ }
1061
+
1062
+ return pagerQty - 1;
1063
+
1064
+ };
1065
+
1066
+ Slick.prototype.getLeft = function(slideIndex) {
1067
+
1068
+ var _ = this,
1069
+ targetLeft,
1070
+ verticalHeight,
1071
+ verticalOffset = 0,
1072
+ targetSlide;
1073
+
1074
+ _.slideOffset = 0;
1075
+ verticalHeight = _.$slides.first().outerHeight(true);
1076
+
1077
+ if (_.options.infinite === true) {
1078
+ if (_.slideCount > _.options.slidesToShow) {
1079
+ _.slideOffset = (_.slideWidth * _.options.slidesToShow) * -1;
1080
+ verticalOffset = (verticalHeight * _.options.slidesToShow) * -1;
1081
+ }
1082
+ if (_.slideCount % _.options.slidesToScroll !== 0) {
1083
+ if (slideIndex + _.options.slidesToScroll > _.slideCount && _.slideCount > _.options.slidesToShow) {
1084
+ if (slideIndex > _.slideCount) {
1085
+ _.slideOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * _.slideWidth) * -1;
1086
+ verticalOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * verticalHeight) * -1;
1087
+ } else {
1088
+ _.slideOffset = ((_.slideCount % _.options.slidesToScroll) * _.slideWidth) * -1;
1089
+ verticalOffset = ((_.slideCount % _.options.slidesToScroll) * verticalHeight) * -1;
1090
+ }
1091
+ }
1092
+ }
1093
+ } else {
1094
+ if (slideIndex + _.options.slidesToShow > _.slideCount) {
1095
+ _.slideOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * _.slideWidth;
1096
+ verticalOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * verticalHeight;
1097
+ }
1098
+ }
1099
+
1100
+ if (_.slideCount <= _.options.slidesToShow) {
1101
+ _.slideOffset = 0;
1102
+ verticalOffset = 0;
1103
+ }
1104
+
1105
+ if (_.options.centerMode === true && _.options.infinite === true) {
1106
+ _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2) - _.slideWidth;
1107
+ } else if (_.options.centerMode === true) {
1108
+ _.slideOffset = 0;
1109
+ _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2);
1110
+ }
1111
+
1112
+ if (_.options.vertical === false) {
1113
+ targetLeft = ((slideIndex * _.slideWidth) * -1) + _.slideOffset;
1114
+ } else {
1115
+ targetLeft = ((slideIndex * verticalHeight) * -1) + verticalOffset;
1116
+ }
1117
+
1118
+ if (_.options.variableWidth === true) {
1119
+
1120
+ if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) {
1121
+ targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex);
1122
+ } else {
1123
+ targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow);
1124
+ }
1125
+
1126
+ if (_.options.rtl === true) {
1127
+ if (targetSlide[0]) {
1128
+ targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1;
1129
+ } else {
1130
+ targetLeft = 0;
1131
+ }
1132
+ } else {
1133
+ targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;
1134
+ }
1135
+
1136
+ if (_.options.centerMode === true) {
1137
+ if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) {
1138
+ targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex);
1139
+ } else {
1140
+ targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow + 1);
1141
+ }
1142
+
1143
+ if (_.options.rtl === true) {
1144
+ if (targetSlide[0]) {
1145
+ targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1;
1146
+ } else {
1147
+ targetLeft = 0;
1148
+ }
1149
+ } else {
1150
+ targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;
1151
+ }
1152
+
1153
+ targetLeft += (_.$list.width() - targetSlide.outerWidth()) / 2;
1154
+ }
1155
+ }
1156
+
1157
+ return targetLeft;
1158
+
1159
+ };
1160
+
1161
+ Slick.prototype.getOption = Slick.prototype.slickGetOption = function(option) {
1162
+
1163
+ var _ = this;
1164
+
1165
+ return _.options[option];
1166
+
1167
+ };
1168
+
1169
+ Slick.prototype.getNavigableIndexes = function() {
1170
+
1171
+ var _ = this,
1172
+ breakPoint = 0,
1173
+ counter = 0,
1174
+ indexes = [],
1175
+ max;
1176
+
1177
+ if (_.options.infinite === false) {
1178
+ max = _.slideCount;
1179
+ } else {
1180
+ breakPoint = _.options.slidesToScroll * -1;
1181
+ counter = _.options.slidesToScroll * -1;
1182
+ max = _.slideCount * 2;
1183
+ }
1184
+
1185
+ while (breakPoint < max) {
1186
+ indexes.push(breakPoint);
1187
+ breakPoint = counter + _.options.slidesToScroll;
1188
+ counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
1189
+ }
1190
+
1191
+ return indexes;
1192
+
1193
+ };
1194
+
1195
+ Slick.prototype.getSlick = function() {
1196
+
1197
+ return this;
1198
+
1199
+ };
1200
+
1201
+ Slick.prototype.getSlideCount = function() {
1202
+
1203
+ var _ = this,
1204
+ slidesTraversed, swipedSlide, centerOffset;
1205
+
1206
+ centerOffset = _.options.centerMode === true ? _.slideWidth * Math.floor(_.options.slidesToShow / 2) : 0;
1207
+
1208
+ if (_.options.swipeToSlide === true) {
1209
+ _.$slideTrack.find('.slick-slide').each(function(index, slide) {
1210
+ if (slide.offsetLeft - centerOffset + ($(slide).outerWidth() / 2) > (_.swipeLeft * -1)) {
1211
+ swipedSlide = slide;
1212
+ return false;
1213
+ }
1214
+ });
1215
+
1216
+ slidesTraversed = Math.abs($(swipedSlide).attr('data-slick-index') - _.currentSlide) || 1;
1217
+
1218
+ return slidesTraversed;
1219
+
1220
+ } else {
1221
+ return _.options.slidesToScroll;
1222
+ }
1223
+
1224
+ };
1225
+
1226
+ Slick.prototype.goTo = Slick.prototype.slickGoTo = function(slide, dontAnimate) {
1227
+
1228
+ var _ = this;
1229
+
1230
+ _.changeSlide({
1231
+ data: {
1232
+ message: 'index',
1233
+ index: parseInt(slide)
1234
+ }
1235
+ }, dontAnimate);
1236
+
1237
+ };
1238
+
1239
+ Slick.prototype.init = function(creation) {
1240
+
1241
+ var _ = this;
1242
+
1243
+ if (!$(_.$slider).hasClass('slick-initialized')) {
1244
+
1245
+ $(_.$slider).addClass('slick-initialized');
1246
+
1247
+ _.buildRows();
1248
+ _.buildOut();
1249
+ _.setProps();
1250
+ _.startLoad();
1251
+ _.loadSlider();
1252
+ _.initializeEvents();
1253
+ _.updateArrows();
1254
+ _.updateDots();
1255
+ _.checkResponsive(true);
1256
+ _.focusHandler();
1257
+
1258
+ }
1259
+
1260
+ if (creation) {
1261
+ _.$slider.trigger('init', [_]);
1262
+ }
1263
+
1264
+ if (_.options.accessibility === true) {
1265
+ _.initADA();
1266
+ }
1267
+
1268
+ if ( _.options.autoplay ) {
1269
+
1270
+ _.paused = false;
1271
+ _.autoPlay();
1272
+
1273
+ }
1274
+
1275
+ };
1276
+
1277
+ Slick.prototype.initADA = function() {
1278
+ var _ = this;
1279
+ _.$slides.add(_.$slideTrack.find('.slick-cloned')).attr({
1280
+ 'aria-hidden': 'true',
1281
+ 'tabindex': '-1'
1282
+ }).find('a, input, button, select').attr({
1283
+ 'tabindex': '-1'
1284
+ });
1285
+
1286
+ _.$slideTrack.attr('role', 'listbox');
1287
+
1288
+ _.$slides.not(_.$slideTrack.find('.slick-cloned')).each(function(i) {
1289
+ $(this).attr({
1290
+ 'role': 'option',
1291
+ 'aria-describedby': 'slick-slide' + _.instanceUid + i + ''
1292
+ });
1293
+ });
1294
+
1295
+ if (_.$dots !== null) {
1296
+ _.$dots.attr('role', 'tablist').find('li').each(function(i) {
1297
+ $(this).attr({
1298
+ 'role': 'presentation',
1299
+ 'aria-selected': 'false',
1300
+ 'aria-controls': 'navigation' + _.instanceUid + i + '',
1301
+ 'id': 'slick-slide' + _.instanceUid + i + ''
1302
+ });
1303
+ })
1304
+ .first().attr('aria-selected', 'true').end()
1305
+ .find('button').attr('role', 'button').end()
1306
+ .closest('div').attr('role', 'toolbar');
1307
+ }
1308
+ _.activateADA();
1309
+
1310
+ };
1311
+
1312
+ Slick.prototype.initArrowEvents = function() {
1313
+
1314
+ var _ = this;
1315
+
1316
+ if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
1317
+ _.$prevArrow
1318
+ .off('click.slick')
1319
+ .on('click.slick', {
1320
+ message: 'previous'
1321
+ }, _.changeSlide);
1322
+ _.$nextArrow
1323
+ .off('click.slick')
1324
+ .on('click.slick', {
1325
+ message: 'next'
1326
+ }, _.changeSlide);
1327
+ }
1328
+
1329
+ };
1330
+
1331
+ Slick.prototype.initDotEvents = function() {
1332
+
1333
+ var _ = this;
1334
+
1335
+ if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
1336
+ $('li', _.$dots).on('click.slick', {
1337
+ message: 'index'
1338
+ }, _.changeSlide);
1339
+ }
1340
+
1341
+ if ( _.options.dots === true && _.options.pauseOnDotsHover === true ) {
1342
+
1343
+ $('li', _.$dots)
1344
+ .on('mouseenter.slick', $.proxy(_.interrupt, _, true))
1345
+ .on('mouseleave.slick', $.proxy(_.interrupt, _, false));
1346
+
1347
+ }
1348
+
1349
+ };
1350
+
1351
+ Slick.prototype.initSlideEvents = function() {
1352
+
1353
+ var _ = this;
1354
+
1355
+ if ( _.options.pauseOnHover ) {
1356
+
1357
+ _.$list.on('mouseenter.slick', $.proxy(_.interrupt, _, true));
1358
+ _.$list.on('mouseleave.slick', $.proxy(_.interrupt, _, false));
1359
+
1360
+ }
1361
+
1362
+ };
1363
+
1364
+ Slick.prototype.initializeEvents = function() {
1365
+
1366
+ var _ = this;
1367
+
1368
+ _.initArrowEvents();
1369
+
1370
+ _.initDotEvents();
1371
+ _.initSlideEvents();
1372
+
1373
+ _.$list.on('touchstart.slick mousedown.slick', {
1374
+ action: 'start'
1375
+ }, _.swipeHandler);
1376
+ _.$list.on('touchmove.slick mousemove.slick', {
1377
+ action: 'move'
1378
+ }, _.swipeHandler);
1379
+ _.$list.on('touchend.slick mouseup.slick', {
1380
+ action: 'end'
1381
+ }, _.swipeHandler);
1382
+ _.$list.on('touchcancel.slick mouseleave.slick', {
1383
+ action: 'end'
1384
+ }, _.swipeHandler);
1385
+
1386
+ _.$list.on('click.slick', _.clickHandler);
1387
+
1388
+ $(document).on(_.visibilityChange, $.proxy(_.visibility, _));
1389
+
1390
+ if (_.options.accessibility === true) {
1391
+ _.$list.on('keydown.slick', _.keyHandler);
1392
+ }
1393
+
1394
+ if (_.options.focusOnSelect === true) {
1395
+ $(_.$slideTrack).children().on('click.slick', _.selectHandler);
1396
+ }
1397
+
1398
+ $(window).on('orientationchange.slick.slick-' + _.instanceUid, $.proxy(_.orientationChange, _));
1399
+
1400
+ $(window).on('resize.slick.slick-' + _.instanceUid, $.proxy(_.resize, _));
1401
+
1402
+ $('[draggable!=true]', _.$slideTrack).on('dragstart', _.preventDefault);
1403
+
1404
+ $(window).on('load.slick.slick-' + _.instanceUid, _.setPosition);
1405
+ $(document).on('ready.slick.slick-' + _.instanceUid, _.setPosition);
1406
+
1407
+ };
1408
+
1409
+ Slick.prototype.initUI = function() {
1410
+
1411
+ var _ = this;
1412
+
1413
+ if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
1414
+
1415
+ _.$prevArrow.show();
1416
+ _.$nextArrow.show();
1417
+
1418
+ }
1419
+
1420
+ if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
1421
+
1422
+ _.$dots.show();
1423
+
1424
+ }
1425
+
1426
+ };
1427
+
1428
+ Slick.prototype.keyHandler = function(event) {
1429
+
1430
+ var _ = this;
1431
+ //Dont slide if the cursor is inside the form fields and arrow keys are pressed
1432
+ if(!event.target.tagName.match('TEXTAREA|INPUT|SELECT')) {
1433
+ if (event.keyCode === 37 && _.options.accessibility === true) {
1434
+ _.changeSlide({
1435
+ data: {
1436
+ message: _.options.rtl === true ? 'next' : 'previous'
1437
+ }
1438
+ });
1439
+ } else if (event.keyCode === 39 && _.options.accessibility === true) {
1440
+ _.changeSlide({
1441
+ data: {
1442
+ message: _.options.rtl === true ? 'previous' : 'next'
1443
+ }
1444
+ });
1445
+ }
1446
+ }
1447
+
1448
+ };
1449
+
1450
+ Slick.prototype.lazyLoad = function() {
1451
+
1452
+ var _ = this,
1453
+ loadRange, cloneRange, rangeStart, rangeEnd;
1454
+
1455
+ function loadImages(imagesScope) {
1456
+
1457
+ $('img[data-lazy]', imagesScope).each(function() {
1458
+
1459
+ var image = $(this),
1460
+ imageSource = $(this).attr('data-lazy'),
1461
+ imageToLoad = document.createElement('img');
1462
+
1463
+ imageToLoad.onload = function() {
1464
+
1465
+ image
1466
+ .animate({ opacity: 0 }, 100, function() {
1467
+ image
1468
+ .attr('src', imageSource)
1469
+ .animate({ opacity: 1 }, 200, function() {
1470
+ image
1471
+ .removeAttr('data-lazy')
1472
+ .removeClass('slick-loading');
1473
+ });
1474
+ _.$slider.trigger('lazyLoaded', [_, image, imageSource]);
1475
+ });
1476
+
1477
+ };
1478
+
1479
+ imageToLoad.onerror = function() {
1480
+
1481
+ image
1482
+ .removeAttr( 'data-lazy' )
1483
+ .removeClass( 'slick-loading' )
1484
+ .addClass( 'slick-lazyload-error' );
1485
+
1486
+ _.$slider.trigger('lazyLoadError', [ _, image, imageSource ]);
1487
+
1488
+ };
1489
+
1490
+ imageToLoad.src = imageSource;
1491
+
1492
+ });
1493
+
1494
+ }
1495
+
1496
+ if (_.options.centerMode === true) {
1497
+ if (_.options.infinite === true) {
1498
+ rangeStart = _.currentSlide + (_.options.slidesToShow / 2 + 1);
1499
+ rangeEnd = rangeStart + _.options.slidesToShow + 2;
1500
+ } else {
1501
+ rangeStart = Math.max(0, _.currentSlide - (_.options.slidesToShow / 2 + 1));
1502
+ rangeEnd = 2 + (_.options.slidesToShow / 2 + 1) + _.currentSlide;
1503
+ }
1504
+ } else {
1505
+ rangeStart = _.options.infinite ? _.options.slidesToShow + _.currentSlide : _.currentSlide;
1506
+ rangeEnd = Math.ceil(rangeStart + _.options.slidesToShow);
1507
+ if (_.options.fade === true) {
1508
+ if (rangeStart > 0) rangeStart--;
1509
+ if (rangeEnd <= _.slideCount) rangeEnd++;
1510
+ }
1511
+ }
1512
+
1513
+ loadRange = _.$slider.find('.slick-slide').slice(rangeStart, rangeEnd);
1514
+ loadImages(loadRange);
1515
+
1516
+ if (_.slideCount <= _.options.slidesToShow) {
1517
+ cloneRange = _.$slider.find('.slick-slide');
1518
+ loadImages(cloneRange);
1519
+ } else
1520
+ if (_.currentSlide >= _.slideCount - _.options.slidesToShow) {
1521
+ cloneRange = _.$slider.find('.slick-cloned').slice(0, _.options.slidesToShow);
1522
+ loadImages(cloneRange);
1523
+ } else if (_.currentSlide === 0) {
1524
+ cloneRange = _.$slider.find('.slick-cloned').slice(_.options.slidesToShow * -1);
1525
+ loadImages(cloneRange);
1526
+ }
1527
+
1528
+ };
1529
+
1530
+ Slick.prototype.loadSlider = function() {
1531
+
1532
+ var _ = this;
1533
+
1534
+ _.setPosition();
1535
+
1536
+ _.$slideTrack.css({
1537
+ opacity: 1
1538
+ });
1539
+
1540
+ _.$slider.removeClass('slick-loading');
1541
+
1542
+ _.initUI();
1543
+
1544
+ if (_.options.lazyLoad === 'progressive') {
1545
+ _.progressiveLazyLoad();
1546
+ }
1547
+
1548
+ };
1549
+
1550
+ Slick.prototype.next = Slick.prototype.slickNext = function() {
1551
+
1552
+ var _ = this;
1553
+
1554
+ _.changeSlide({
1555
+ data: {
1556
+ message: 'next'
1557
+ }
1558
+ });
1559
+
1560
+ };
1561
+
1562
+ Slick.prototype.orientationChange = function() {
1563
+
1564
+ var _ = this;
1565
+
1566
+ _.checkResponsive();
1567
+ _.setPosition();
1568
+
1569
+ };
1570
+
1571
+ Slick.prototype.pause = Slick.prototype.slickPause = function() {
1572
+
1573
+ var _ = this;
1574
+
1575
+ _.autoPlayClear();
1576
+ _.paused = true;
1577
+
1578
+ };
1579
+
1580
+ Slick.prototype.play = Slick.prototype.slickPlay = function() {
1581
+
1582
+ var _ = this;
1583
+
1584
+ _.autoPlay();
1585
+ _.options.autoplay = true;
1586
+ _.paused = false;
1587
+ _.focussed = false;
1588
+ _.interrupted = false;
1589
+
1590
+ };
1591
+
1592
+ Slick.prototype.postSlide = function(index) {
1593
+
1594
+ var _ = this;
1595
+
1596
+ if( !_.unslicked ) {
1597
+
1598
+ _.$slider.trigger('afterChange', [_, index]);
1599
+
1600
+ _.animating = false;
1601
+
1602
+ _.setPosition();
1603
+
1604
+ _.swipeLeft = null;
1605
+
1606
+ if ( _.options.autoplay ) {
1607
+ _.autoPlay();
1608
+ }
1609
+
1610
+ if (_.options.accessibility === true) {
1611
+ _.initADA();
1612
+ }
1613
+
1614
+ }
1615
+
1616
+ };
1617
+
1618
+ Slick.prototype.prev = Slick.prototype.slickPrev = function() {
1619
+
1620
+ var _ = this;
1621
+
1622
+ _.changeSlide({
1623
+ data: {
1624
+ message: 'previous'
1625
+ }
1626
+ });
1627
+
1628
+ };
1629
+
1630
+ Slick.prototype.preventDefault = function(event) {
1631
+
1632
+ event.preventDefault();
1633
+
1634
+ };
1635
+
1636
+ Slick.prototype.progressiveLazyLoad = function( tryCount ) {
1637
+
1638
+ tryCount = tryCount || 1;
1639
+
1640
+ var _ = this,
1641
+ $imgsToLoad = $( 'img[data-lazy]', _.$slider ),
1642
+ image,
1643
+ imageSource,
1644
+ imageToLoad;
1645
+
1646
+ if ( $imgsToLoad.length ) {
1647
+
1648
+ image = $imgsToLoad.first();
1649
+ imageSource = image.attr('data-lazy');
1650
+ imageToLoad = document.createElement('img');
1651
+
1652
+ imageToLoad.onload = function() {
1653
+
1654
+ image
1655
+ .attr( 'src', imageSource )
1656
+ .removeAttr('data-lazy')
1657
+ .removeClass('slick-loading');
1658
+
1659
+ if ( _.options.adaptiveHeight === true ) {
1660
+ _.setPosition();
1661
+ }
1662
+
1663
+ _.$slider.trigger('lazyLoaded', [ _, image, imageSource ]);
1664
+ _.progressiveLazyLoad();
1665
+
1666
+ };
1667
+
1668
+ imageToLoad.onerror = function() {
1669
+
1670
+ if ( tryCount < 3 ) {
1671
+
1672
+ /**
1673
+ * try to load the image 3 times,
1674
+ * leave a slight delay so we don't get
1675
+ * servers blocking the request.
1676
+ */
1677
+ setTimeout( function() {
1678
+ _.progressiveLazyLoad( tryCount + 1 );
1679
+ }, 500 );
1680
+
1681
+ } else {
1682
+
1683
+ image
1684
+ .removeAttr( 'data-lazy' )
1685
+ .removeClass( 'slick-loading' )
1686
+ .addClass( 'slick-lazyload-error' );
1687
+
1688
+ _.$slider.trigger('lazyLoadError', [ _, image, imageSource ]);
1689
+
1690
+ _.progressiveLazyLoad();
1691
+
1692
+ }
1693
+
1694
+ };
1695
+
1696
+ imageToLoad.src = imageSource;
1697
+
1698
+ } else {
1699
+
1700
+ _.$slider.trigger('allImagesLoaded', [ _ ]);
1701
+
1702
+ }
1703
+
1704
+ };
1705
+
1706
+ Slick.prototype.refresh = function( initializing ) {
1707
+
1708
+ var _ = this, currentSlide, lastVisibleIndex;
1709
+
1710
+ lastVisibleIndex = _.slideCount - _.options.slidesToShow;
1711
+
1712
+ // in non-infinite sliders, we don't want to go past the
1713
+ // last visible index.
1714
+ if( !_.options.infinite && ( _.currentSlide > lastVisibleIndex )) {
1715
+ _.currentSlide = lastVisibleIndex;
1716
+ }
1717
+
1718
+ // if less slides than to show, go to start.
1719
+ if ( _.slideCount <= _.options.slidesToShow ) {
1720
+ _.currentSlide = 0;
1721
+
1722
+ }
1723
+
1724
+ currentSlide = _.currentSlide;
1725
+
1726
+ _.destroy(true);
1727
+
1728
+ $.extend(_, _.initials, { currentSlide: currentSlide });
1729
+
1730
+ _.init();
1731
+
1732
+ if( !initializing ) {
1733
+
1734
+ _.changeSlide({
1735
+ data: {
1736
+ message: 'index',
1737
+ index: currentSlide
1738
+ }
1739
+ }, false);
1740
+
1741
+ }
1742
+
1743
+ };
1744
+
1745
+ Slick.prototype.registerBreakpoints = function() {
1746
+
1747
+ var _ = this, breakpoint, currentBreakpoint, l,
1748
+ responsiveSettings = _.options.responsive || null;
1749
+
1750
+ if ( $.type(responsiveSettings) === 'array' && responsiveSettings.length ) {
1751
+
1752
+ _.respondTo = _.options.respondTo || 'window';
1753
+
1754
+ for ( breakpoint in responsiveSettings ) {
1755
+
1756
+ l = _.breakpoints.length-1;
1757
+ currentBreakpoint = responsiveSettings[breakpoint].breakpoint;
1758
+
1759
+ if (responsiveSettings.hasOwnProperty(breakpoint)) {
1760
+
1761
+ // loop through the breakpoints and cut out any existing
1762
+ // ones with the same breakpoint number, we don't want dupes.
1763
+ while( l >= 0 ) {
1764
+ if( _.breakpoints[l] && _.breakpoints[l] === currentBreakpoint ) {
1765
+ _.breakpoints.splice(l,1);
1766
+ }
1767
+ l--;
1768
+ }
1769
+
1770
+ _.breakpoints.push(currentBreakpoint);
1771
+ _.breakpointSettings[currentBreakpoint] = responsiveSettings[breakpoint].settings;
1772
+
1773
+ }
1774
+
1775
+ }
1776
+
1777
+ _.breakpoints.sort(function(a, b) {
1778
+ return ( _.options.mobileFirst ) ? a-b : b-a;
1779
+ });
1780
+
1781
+ }
1782
+
1783
+ };
1784
+
1785
+ Slick.prototype.reinit = function() {
1786
+
1787
+ var _ = this;
1788
+
1789
+ _.$slides =
1790
+ _.$slideTrack
1791
+ .children(_.options.slide)
1792
+ .addClass('slick-slide');
1793
+
1794
+ _.slideCount = _.$slides.length;
1795
+
1796
+ if (_.currentSlide >= _.slideCount && _.currentSlide !== 0) {
1797
+ _.currentSlide = _.currentSlide - _.options.slidesToScroll;
1798
+ }
1799
+
1800
+ if (_.slideCount <= _.options.slidesToShow) {
1801
+ _.currentSlide = 0;
1802
+ }
1803
+
1804
+ _.registerBreakpoints();
1805
+
1806
+ _.setProps();
1807
+ _.setupInfinite();
1808
+ _.buildArrows();
1809
+ _.updateArrows();
1810
+ _.initArrowEvents();
1811
+ _.buildDots();
1812
+ _.updateDots();
1813
+ _.initDotEvents();
1814
+ _.cleanUpSlideEvents();
1815
+ _.initSlideEvents();
1816
+
1817
+ _.checkResponsive(false, true);
1818
+
1819
+ if (_.options.focusOnSelect === true) {
1820
+ $(_.$slideTrack).children().on('click.slick', _.selectHandler);
1821
+ }
1822
+
1823
+ _.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0);
1824
+
1825
+ _.setPosition();
1826
+ _.focusHandler();
1827
+
1828
+ _.paused = !_.options.autoplay;
1829
+ _.autoPlay();
1830
+
1831
+ _.$slider.trigger('reInit', [_]);
1832
+
1833
+ };
1834
+
1835
+ Slick.prototype.resize = function() {
1836
+
1837
+ var _ = this;
1838
+
1839
+ if ($(window).width() !== _.windowWidth) {
1840
+ clearTimeout(_.windowDelay);
1841
+ _.windowDelay = window.setTimeout(function() {
1842
+ _.windowWidth = $(window).width();
1843
+ _.checkResponsive();
1844
+ if( !_.unslicked ) { _.setPosition(); }
1845
+ }, 50);
1846
+ }
1847
+ };
1848
+
1849
+ Slick.prototype.removeSlide = Slick.prototype.slickRemove = function(index, removeBefore, removeAll) {
1850
+
1851
+ var _ = this;
1852
+
1853
+ if (typeof(index) === 'boolean') {
1854
+ removeBefore = index;
1855
+ index = removeBefore === true ? 0 : _.slideCount - 1;
1856
+ } else {
1857
+ index = removeBefore === true ? --index : index;
1858
+ }
1859
+
1860
+ if (_.slideCount < 1 || index < 0 || index > _.slideCount - 1) {
1861
+ return false;
1862
+ }
1863
+
1864
+ _.unload();
1865
+
1866
+ if (removeAll === true) {
1867
+ _.$slideTrack.children().remove();
1868
+ } else {
1869
+ _.$slideTrack.children(this.options.slide).eq(index).remove();
1870
+ }
1871
+
1872
+ _.$slides = _.$slideTrack.children(this.options.slide);
1873
+
1874
+ _.$slideTrack.children(this.options.slide).detach();
1875
+
1876
+ _.$slideTrack.append(_.$slides);
1877
+
1878
+ _.$slidesCache = _.$slides;
1879
+
1880
+ _.reinit();
1881
+
1882
+ };
1883
+
1884
+ Slick.prototype.setCSS = function(position) {
1885
+
1886
+ var _ = this,
1887
+ positionProps = {},
1888
+ x, y;
1889
+
1890
+ if (_.options.rtl === true) {
1891
+ position = -position;
1892
+ }
1893
+ x = _.positionProp == 'left' ? Math.ceil(position) + 'px' : '0px';
1894
+ y = _.positionProp == 'top' ? Math.ceil(position) + 'px' : '0px';
1895
+
1896
+ positionProps[_.positionProp] = position;
1897
+
1898
+ if (_.transformsEnabled === false) {
1899
+ _.$slideTrack.css(positionProps);
1900
+ } else {
1901
+ positionProps = {};
1902
+ if (_.cssTransitions === false) {
1903
+ positionProps[_.animType] = 'translate(' + x + ', ' + y + ')';
1904
+ _.$slideTrack.css(positionProps);
1905
+ } else {
1906
+ positionProps[_.animType] = 'translate3d(' + x + ', ' + y + ', 0px)';
1907
+ _.$slideTrack.css(positionProps);
1908
+ }
1909
+ }
1910
+
1911
+ };
1912
+
1913
+ Slick.prototype.setDimensions = function() {
1914
+
1915
+ var _ = this;
1916
+
1917
+ if (_.options.vertical === false) {
1918
+ if (_.options.centerMode === true) {
1919
+ _.$list.css({
1920
+ padding: ('0px ' + _.options.centerPadding)
1921
+ });
1922
+ }
1923
+ } else {
1924
+ _.$list.height(_.$slides.first().outerHeight(true) * _.options.slidesToShow);
1925
+ if (_.options.centerMode === true) {
1926
+ _.$list.css({
1927
+ padding: (_.options.centerPadding + ' 0px')
1928
+ });
1929
+ }
1930
+ }
1931
+
1932
+ _.listWidth = _.$list.width();
1933
+ _.listHeight = _.$list.height();
1934
+
1935
+
1936
+ if (_.options.vertical === false && _.options.variableWidth === false) {
1937
+ _.slideWidth = Math.ceil(_.listWidth / _.options.slidesToShow);
1938
+ _.$slideTrack.width(Math.ceil((_.slideWidth * _.$slideTrack.children('.slick-slide').length)));
1939
+
1940
+ } else if (_.options.variableWidth === true) {
1941
+ _.$slideTrack.width(5000 * _.slideCount);
1942
+ } else {
1943
+ _.slideWidth = Math.ceil(_.listWidth);
1944
+ _.$slideTrack.height(Math.ceil((_.$slides.first().outerHeight(true) * _.$slideTrack.children('.slick-slide').length)));
1945
+ }
1946
+
1947
+ var offset = _.$slides.first().outerWidth(true) - _.$slides.first().width();
1948
+ if (_.options.variableWidth === false) _.$slideTrack.children('.slick-slide').width(_.slideWidth - offset);
1949
+
1950
+ };
1951
+
1952
+ Slick.prototype.setFade = function() {
1953
+
1954
+ var _ = this,
1955
+ targetLeft;
1956
+
1957
+ _.$slides.each(function(index, element) {
1958
+ targetLeft = (_.slideWidth * index) * -1;
1959
+ if (_.options.rtl === true) {
1960
+ $(element).css({
1961
+ position: 'relative',
1962
+ right: targetLeft,
1963
+ top: 0,
1964
+ zIndex: _.options.zIndex - 2,
1965
+ opacity: 0
1966
+ });
1967
+ } else {
1968
+ $(element).css({
1969
+ position: 'relative',
1970
+ left: targetLeft,
1971
+ top: 0,
1972
+ zIndex: _.options.zIndex - 2,
1973
+ opacity: 0
1974
+ });
1975
+ }
1976
+ });
1977
+
1978
+ _.$slides.eq(_.currentSlide).css({
1979
+ zIndex: _.options.zIndex - 1,
1980
+ opacity: 1
1981
+ });
1982
+
1983
+ };
1984
+
1985
+ Slick.prototype.setHeight = function() {
1986
+
1987
+ var _ = this;
1988
+
1989
+ if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) {
1990
+ var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true);
1991
+ _.$list.css('height', targetHeight);
1992
+ }
1993
+
1994
+ };
1995
+
1996
+ Slick.prototype.setOption =
1997
+ Slick.prototype.slickSetOption = function() {
1998
+
1999
+ /**
2000
+ * accepts arguments in format of:
2001
+ *
2002
+ * - for changing a single option's value:
2003
+ * .slick("setOption", option, value, refresh )
2004
+ *
2005
+ * - for changing a set of responsive options:
2006
+ * .slick("setOption", 'responsive', [{}, ...], refresh )
2007
+ *
2008
+ * - for updating multiple values at once (not responsive)
2009
+ * .slick("setOption", { 'option': value, ... }, refresh )
2010
+ */
2011
+
2012
+ var _ = this, l, item, option, value, refresh = false, type;
2013
+
2014
+ if( $.type( arguments[0] ) === 'object' ) {
2015
+
2016
+ option = arguments[0];
2017
+ refresh = arguments[1];
2018
+ type = 'multiple';
2019
+
2020
+ } else if ( $.type( arguments[0] ) === 'string' ) {
2021
+
2022
+ option = arguments[0];
2023
+ value = arguments[1];
2024
+ refresh = arguments[2];
2025
+
2026
+ if ( arguments[0] === 'responsive' && $.type( arguments[1] ) === 'array' ) {
2027
+
2028
+ type = 'responsive';
2029
+
2030
+ } else if ( typeof arguments[1] !== 'undefined' ) {
2031
+
2032
+ type = 'single';
2033
+
2034
+ }
2035
+
2036
+ }
2037
+
2038
+ if ( type === 'single' ) {
2039
+
2040
+ _.options[option] = value;
2041
+
2042
+
2043
+ } else if ( type === 'multiple' ) {
2044
+
2045
+ $.each( option , function( opt, val ) {
2046
+
2047
+ _.options[opt] = val;
2048
+
2049
+ });
2050
+
2051
+
2052
+ } else if ( type === 'responsive' ) {
2053
+
2054
+ for ( item in value ) {
2055
+
2056
+ if( $.type( _.options.responsive ) !== 'array' ) {
2057
+
2058
+ _.options.responsive = [ value[item] ];
2059
+
2060
+ } else {
2061
+
2062
+ l = _.options.responsive.length-1;
2063
+
2064
+ // loop through the responsive object and splice out duplicates.
2065
+ while( l >= 0 ) {
2066
+
2067
+ if( _.options.responsive[l].breakpoint === value[item].breakpoint ) {
2068
+
2069
+ _.options.responsive.splice(l,1);
2070
+
2071
+ }
2072
+
2073
+ l--;
2074
+
2075
+ }
2076
+
2077
+ _.options.responsive.push( value[item] );
2078
+
2079
+ }
2080
+
2081
+ }
2082
+
2083
+ }
2084
+
2085
+ if ( refresh ) {
2086
+
2087
+ _.unload();
2088
+ _.reinit();
2089
+
2090
+ }
2091
+
2092
+ };
2093
+
2094
+ Slick.prototype.setPosition = function() {
2095
+
2096
+ var _ = this;
2097
+
2098
+ _.setDimensions();
2099
+
2100
+ _.setHeight();
2101
+
2102
+ if (_.options.fade === false) {
2103
+ _.setCSS(_.getLeft(_.currentSlide));
2104
+ } else {
2105
+ _.setFade();
2106
+ }
2107
+
2108
+ _.$slider.trigger('setPosition', [_]);
2109
+
2110
+ };
2111
+
2112
+ Slick.prototype.setProps = function() {
2113
+
2114
+ var _ = this,
2115
+ bodyStyle = document.body.style;
2116
+
2117
+ _.positionProp = _.options.vertical === true ? 'top' : 'left';
2118
+
2119
+ if (_.positionProp === 'top') {
2120
+ _.$slider.addClass('slick-vertical');
2121
+ } else {
2122
+ _.$slider.removeClass('slick-vertical');
2123
+ }
2124
+
2125
+ if (bodyStyle.WebkitTransition !== undefined ||
2126
+ bodyStyle.MozTransition !== undefined ||
2127
+ bodyStyle.msTransition !== undefined) {
2128
+ if (_.options.useCSS === true) {
2129
+ _.cssTransitions = true;
2130
+ }
2131
+ }
2132
+
2133
+ if ( _.options.fade ) {
2134
+ if ( typeof _.options.zIndex === 'number' ) {
2135
+ if( _.options.zIndex < 3 ) {
2136
+ _.options.zIndex = 3;
2137
+ }
2138
+ } else {
2139
+ _.options.zIndex = _.defaults.zIndex;
2140
+ }
2141
+ }
2142
+
2143
+ if (bodyStyle.OTransform !== undefined) {
2144
+ _.animType = 'OTransform';
2145
+ _.transformType = '-o-transform';
2146
+ _.transitionType = 'OTransition';
2147
+ if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false;
2148
+ }
2149
+ if (bodyStyle.MozTransform !== undefined) {
2150
+ _.animType = 'MozTransform';
2151
+ _.transformType = '-moz-transform';
2152
+ _.transitionType = 'MozTransition';
2153
+ if (bodyStyle.perspectiveProperty === undefined && bodyStyle.MozPerspective === undefined) _.animType = false;
2154
+ }
2155
+ if (bodyStyle.webkitTransform !== undefined) {
2156
+ _.animType = 'webkitTransform';
2157
+ _.transformType = '-webkit-transform';
2158
+ _.transitionType = 'webkitTransition';
2159
+ if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false;
2160
+ }
2161
+ if (bodyStyle.msTransform !== undefined) {
2162
+ _.animType = 'msTransform';
2163
+ _.transformType = '-ms-transform';
2164
+ _.transitionType = 'msTransition';
2165
+ if (bodyStyle.msTransform === undefined) _.animType = false;
2166
+ }
2167
+ if (bodyStyle.transform !== undefined && _.animType !== false) {
2168
+ _.animType = 'transform';
2169
+ _.transformType = 'transform';
2170
+ _.transitionType = 'transition';
2171
+ }
2172
+ _.transformsEnabled = _.options.useTransform && (_.animType !== null && _.animType !== false);
2173
+ };
2174
+
2175
+
2176
+ Slick.prototype.setSlideClasses = function(index) {
2177
+
2178
+ var _ = this,
2179
+ centerOffset, allSlides, indexOffset, remainder;
2180
+
2181
+ allSlides = _.$slider
2182
+ .find('.slick-slide')
2183
+ .removeClass('slick-active slick-center slick-current')
2184
+ .attr('aria-hidden', 'true');
2185
+
2186
+ _.$slides
2187
+ .eq(index)
2188
+ .addClass('slick-current');
2189
+
2190
+ if (_.options.centerMode === true) {
2191
+
2192
+ centerOffset = Math.floor(_.options.slidesToShow / 2);
2193
+
2194
+ if (_.options.infinite === true) {
2195
+
2196
+ if (index >= centerOffset && index <= (_.slideCount - 1) - centerOffset) {
2197
+
2198
+ _.$slides
2199
+ .slice(index - centerOffset, index + centerOffset + 1)
2200
+ .addClass('slick-active')
2201
+ .attr('aria-hidden', 'false');
2202
+
2203
+ } else {
2204
+
2205
+ indexOffset = _.options.slidesToShow + index;
2206
+ allSlides
2207
+ .slice(indexOffset - centerOffset + 1, indexOffset + centerOffset + 2)
2208
+ .addClass('slick-active')
2209
+ .attr('aria-hidden', 'false');
2210
+
2211
+ }
2212
+
2213
+ if (index === 0) {
2214
+
2215
+ allSlides
2216
+ .eq(allSlides.length - 1 - _.options.slidesToShow)
2217
+ .addClass('slick-center');
2218
+
2219
+ } else if (index === _.slideCount - 1) {
2220
+
2221
+ allSlides
2222
+ .eq(_.options.slidesToShow)
2223
+ .addClass('slick-center');
2224
+
2225
+ }
2226
+
2227
+ }
2228
+
2229
+ _.$slides
2230
+ .eq(index)
2231
+ .addClass('slick-center');
2232
+
2233
+ } else {
2234
+
2235
+ if (index >= 0 && index <= (_.slideCount - _.options.slidesToShow)) {
2236
+
2237
+ _.$slides
2238
+ .slice(index, index + _.options.slidesToShow)
2239
+ .addClass('slick-active')
2240
+ .attr('aria-hidden', 'false');
2241
+
2242
+ } else if (allSlides.length <= _.options.slidesToShow) {
2243
+
2244
+ allSlides
2245
+ .addClass('slick-active')
2246
+ .attr('aria-hidden', 'false');
2247
+
2248
+ } else {
2249
+
2250
+ remainder = _.slideCount % _.options.slidesToShow;
2251
+ indexOffset = _.options.infinite === true ? _.options.slidesToShow + index : index;
2252
+
2253
+ if (_.options.slidesToShow == _.options.slidesToScroll && (_.slideCount - index) < _.options.slidesToShow) {
2254
+
2255
+ allSlides
2256
+ .slice(indexOffset - (_.options.slidesToShow - remainder), indexOffset + remainder)
2257
+ .addClass('slick-active')
2258
+ .attr('aria-hidden', 'false');
2259
+
2260
+ } else {
2261
+
2262
+ allSlides
2263
+ .slice(indexOffset, indexOffset + _.options.slidesToShow)
2264
+ .addClass('slick-active')
2265
+ .attr('aria-hidden', 'false');
2266
+
2267
+ }
2268
+
2269
+ }
2270
+
2271
+ }
2272
+
2273
+ if (_.options.lazyLoad === 'ondemand') {
2274
+ _.lazyLoad();
2275
+ }
2276
+
2277
+ };
2278
+
2279
+ Slick.prototype.setupInfinite = function() {
2280
+
2281
+ var _ = this,
2282
+ i, slideIndex, infiniteCount;
2283
+
2284
+ if (_.options.fade === true) {
2285
+ _.options.centerMode = false;
2286
+ }
2287
+
2288
+ if (_.options.infinite === true && _.options.fade === false) {
2289
+
2290
+ slideIndex = null;
2291
+
2292
+ if (_.slideCount > _.options.slidesToShow) {
2293
+
2294
+ if (_.options.centerMode === true) {
2295
+ infiniteCount = _.options.slidesToShow + 1;
2296
+ } else {
2297
+ infiniteCount = _.options.slidesToShow;
2298
+ }
2299
+
2300
+ for (i = _.slideCount; i > (_.slideCount -
2301
+ infiniteCount); i -= 1) {
2302
+ slideIndex = i - 1;
2303
+ $(_.$slides[slideIndex]).clone(true).attr('id', '')
2304
+ .attr('data-slick-index', slideIndex - _.slideCount)
2305
+ .prependTo(_.$slideTrack).addClass('slick-cloned');
2306
+ }
2307
+ for (i = 0; i < infiniteCount; i += 1) {
2308
+ slideIndex = i;
2309
+ $(_.$slides[slideIndex]).clone(true).attr('id', '')
2310
+ .attr('data-slick-index', slideIndex + _.slideCount)
2311
+ .appendTo(_.$slideTrack).addClass('slick-cloned');
2312
+ }
2313
+ _.$slideTrack.find('.slick-cloned').find('[id]').each(function() {
2314
+ $(this).attr('id', '');
2315
+ });
2316
+
2317
+ }
2318
+
2319
+ }
2320
+
2321
+ };
2322
+
2323
+ Slick.prototype.interrupt = function( toggle ) {
2324
+
2325
+ var _ = this;
2326
+
2327
+ if( !toggle ) {
2328
+ _.autoPlay();
2329
+ }
2330
+ _.interrupted = toggle;
2331
+
2332
+ };
2333
+
2334
+ Slick.prototype.selectHandler = function(event) {
2335
+
2336
+ var _ = this;
2337
+
2338
+ var targetElement =
2339
+ $(event.target).is('.slick-slide') ?
2340
+ $(event.target) :
2341
+ $(event.target).parents('.slick-slide');
2342
+
2343
+ var index = parseInt(targetElement.attr('data-slick-index'));
2344
+
2345
+ if (!index) index = 0;
2346
+
2347
+ if (_.slideCount <= _.options.slidesToShow) {
2348
+
2349
+ _.setSlideClasses(index);
2350
+ _.asNavFor(index);
2351
+ return;
2352
+
2353
+ }
2354
+
2355
+ _.slideHandler(index);
2356
+
2357
+ };
2358
+
2359
+ Slick.prototype.slideHandler = function(index, sync, dontAnimate) {
2360
+
2361
+ var targetSlide, animSlide, oldSlide, slideLeft, targetLeft = null,
2362
+ _ = this, navTarget;
2363
+
2364
+ sync = sync || false;
2365
+
2366
+ if (_.animating === true && _.options.waitForAnimate === true) {
2367
+ return;
2368
+ }
2369
+
2370
+ if (_.options.fade === true && _.currentSlide === index) {
2371
+ return;
2372
+ }
2373
+
2374
+ if (_.slideCount <= _.options.slidesToShow) {
2375
+ return;
2376
+ }
2377
+
2378
+ if (sync === false) {
2379
+ _.asNavFor(index);
2380
+ }
2381
+
2382
+ targetSlide = index;
2383
+ targetLeft = _.getLeft(targetSlide);
2384
+ slideLeft = _.getLeft(_.currentSlide);
2385
+
2386
+ _.currentLeft = _.swipeLeft === null ? slideLeft : _.swipeLeft;
2387
+
2388
+ if (_.options.infinite === false && _.options.centerMode === false && (index < 0 || index > _.getDotCount() * _.options.slidesToScroll)) {
2389
+ if (_.options.fade === false) {
2390
+ targetSlide = _.currentSlide;
2391
+ if (dontAnimate !== true) {
2392
+ _.animateSlide(slideLeft, function() {
2393
+ _.postSlide(targetSlide);
2394
+ });
2395
+ } else {
2396
+ _.postSlide(targetSlide);
2397
+ }
2398
+ }
2399
+ return;
2400
+ } else if (_.options.infinite === false && _.options.centerMode === true && (index < 0 || index > (_.slideCount - _.options.slidesToScroll))) {
2401
+ if (_.options.fade === false) {
2402
+ targetSlide = _.currentSlide;
2403
+ if (dontAnimate !== true) {
2404
+ _.animateSlide(slideLeft, function() {
2405
+ _.postSlide(targetSlide);
2406
+ });
2407
+ } else {
2408
+ _.postSlide(targetSlide);
2409
+ }
2410
+ }
2411
+ return;
2412
+ }
2413
+
2414
+ if ( _.options.autoplay ) {
2415
+ clearInterval(_.autoPlayTimer);
2416
+ }
2417
+
2418
+ if (targetSlide < 0) {
2419
+ if (_.slideCount % _.options.slidesToScroll !== 0) {
2420
+ animSlide = _.slideCount - (_.slideCount % _.options.slidesToScroll);
2421
+ } else {
2422
+ animSlide = _.slideCount + targetSlide;
2423
+ }
2424
+ } else if (targetSlide >= _.slideCount) {
2425
+ if (_.slideCount % _.options.slidesToScroll !== 0) {
2426
+ animSlide = 0;
2427
+ } else {
2428
+ animSlide = targetSlide - _.slideCount;
2429
+ }
2430
+ } else {
2431
+ animSlide = targetSlide;
2432
+ }
2433
+
2434
+ _.animating = true;
2435
+
2436
+ _.$slider.trigger('beforeChange', [_, _.currentSlide, animSlide]);
2437
+
2438
+ oldSlide = _.currentSlide;
2439
+ _.currentSlide = animSlide;
2440
+
2441
+ _.setSlideClasses(_.currentSlide);
2442
+
2443
+ if ( _.options.asNavFor ) {
2444
+
2445
+ navTarget = _.getNavTarget();
2446
+ navTarget = navTarget.slick('getSlick');
2447
+
2448
+ if ( navTarget.slideCount <= navTarget.options.slidesToShow ) {
2449
+ navTarget.setSlideClasses(_.currentSlide);
2450
+ }
2451
+
2452
+ }
2453
+
2454
+ _.updateDots();
2455
+ _.updateArrows();
2456
+
2457
+ if (_.options.fade === true) {
2458
+ if (dontAnimate !== true) {
2459
+
2460
+ _.fadeSlideOut(oldSlide);
2461
+
2462
+ _.fadeSlide(animSlide, function() {
2463
+ _.postSlide(animSlide);
2464
+ });
2465
+
2466
+ } else {
2467
+ _.postSlide(animSlide);
2468
+ }
2469
+ _.animateHeight();
2470
+ return;
2471
+ }
2472
+
2473
+ if (dontAnimate !== true) {
2474
+ _.animateSlide(targetLeft, function() {
2475
+ _.postSlide(animSlide);
2476
+ });
2477
+ } else {
2478
+ _.postSlide(animSlide);
2479
+ }
2480
+
2481
+ };
2482
+
2483
+ Slick.prototype.startLoad = function() {
2484
+
2485
+ var _ = this;
2486
+
2487
+ if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
2488
+
2489
+ _.$prevArrow.hide();
2490
+ _.$nextArrow.hide();
2491
+
2492
+ }
2493
+
2494
+ if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
2495
+
2496
+ _.$dots.hide();
2497
+
2498
+ }
2499
+
2500
+ _.$slider.addClass('slick-loading');
2501
+
2502
+ };
2503
+
2504
+ Slick.prototype.swipeDirection = function() {
2505
+
2506
+ var xDist, yDist, r, swipeAngle, _ = this;
2507
+
2508
+ xDist = _.touchObject.startX - _.touchObject.curX;
2509
+ yDist = _.touchObject.startY - _.touchObject.curY;
2510
+ r = Math.atan2(yDist, xDist);
2511
+
2512
+ swipeAngle = Math.round(r * 180 / Math.PI);
2513
+ if (swipeAngle < 0) {
2514
+ swipeAngle = 360 - Math.abs(swipeAngle);
2515
+ }
2516
+
2517
+ if ((swipeAngle <= 45) && (swipeAngle >= 0)) {
2518
+ return (_.options.rtl === false ? 'left' : 'right');
2519
+ }
2520
+ if ((swipeAngle <= 360) && (swipeAngle >= 315)) {
2521
+ return (_.options.rtl === false ? 'left' : 'right');
2522
+ }
2523
+ if ((swipeAngle >= 135) && (swipeAngle <= 225)) {
2524
+ return (_.options.rtl === false ? 'right' : 'left');
2525
+ }
2526
+ if (_.options.verticalSwiping === true) {
2527
+ if ((swipeAngle >= 35) && (swipeAngle <= 135)) {
2528
+ return 'down';
2529
+ } else {
2530
+ return 'up';
2531
+ }
2532
+ }
2533
+
2534
+ return 'vertical';
2535
+
2536
+ };
2537
+
2538
+ Slick.prototype.swipeEnd = function(event) {
2539
+
2540
+ var _ = this,
2541
+ slideCount,
2542
+ direction;
2543
+
2544
+ _.dragging = false;
2545
+ _.interrupted = false;
2546
+ _.shouldClick = ( _.touchObject.swipeLength > 10 ) ? false : true;
2547
+
2548
+ if ( _.touchObject.curX === undefined ) {
2549
+ return false;
2550
+ }
2551
+
2552
+ if ( _.touchObject.edgeHit === true ) {
2553
+ _.$slider.trigger('edge', [_, _.swipeDirection() ]);
2554
+ }
2555
+
2556
+ if ( _.touchObject.swipeLength >= _.touchObject.minSwipe ) {
2557
+
2558
+ direction = _.swipeDirection();
2559
+
2560
+ switch ( direction ) {
2561
+
2562
+ case 'left':
2563
+ case 'down':
2564
+
2565
+ slideCount =
2566
+ _.options.swipeToSlide ?
2567
+ _.checkNavigable( _.currentSlide + _.getSlideCount() ) :
2568
+ _.currentSlide + _.getSlideCount();
2569
+
2570
+ _.currentDirection = 0;
2571
+
2572
+ break;
2573
+
2574
+ case 'right':
2575
+ case 'up':
2576
+
2577
+ slideCount =
2578
+ _.options.swipeToSlide ?
2579
+ _.checkNavigable( _.currentSlide - _.getSlideCount() ) :
2580
+ _.currentSlide - _.getSlideCount();
2581
+
2582
+ _.currentDirection = 1;
2583
+
2584
+ break;
2585
+
2586
+ default:
2587
+
2588
+
2589
+ }
2590
+
2591
+ if( direction != 'vertical' ) {
2592
+
2593
+ _.slideHandler( slideCount );
2594
+ _.touchObject = {};
2595
+ _.$slider.trigger('swipe', [_, direction ]);
2596
+
2597
+ }
2598
+
2599
+ } else {
2600
+
2601
+ if ( _.touchObject.startX !== _.touchObject.curX ) {
2602
+
2603
+ _.slideHandler( _.currentSlide );
2604
+ _.touchObject = {};
2605
+
2606
+ }
2607
+
2608
+ }
2609
+
2610
+ };
2611
+
2612
+ Slick.prototype.swipeHandler = function(event) {
2613
+
2614
+ var _ = this;
2615
+
2616
+ if ((_.options.swipe === false) || ('ontouchend' in document && _.options.swipe === false)) {
2617
+ return;
2618
+ } else if (_.options.draggable === false && event.type.indexOf('mouse') !== -1) {
2619
+ return;
2620
+ }
2621
+
2622
+ _.touchObject.fingerCount = event.originalEvent && event.originalEvent.touches !== undefined ?
2623
+ event.originalEvent.touches.length : 1;
2624
+
2625
+ _.touchObject.minSwipe = _.listWidth / _.options
2626
+ .touchThreshold;
2627
+
2628
+ if (_.options.verticalSwiping === true) {
2629
+ _.touchObject.minSwipe = _.listHeight / _.options
2630
+ .touchThreshold;
2631
+ }
2632
+
2633
+ switch (event.data.action) {
2634
+
2635
+ case 'start':
2636
+ _.swipeStart(event);
2637
+ break;
2638
+
2639
+ case 'move':
2640
+ _.swipeMove(event);
2641
+ break;
2642
+
2643
+ case 'end':
2644
+ _.swipeEnd(event);
2645
+ break;
2646
+
2647
+ }
2648
+
2649
+ };
2650
+
2651
+ Slick.prototype.swipeMove = function(event) {
2652
+
2653
+ var _ = this,
2654
+ edgeWasHit = false,
2655
+ curLeft, swipeDirection, swipeLength, positionOffset, touches;
2656
+
2657
+ touches = event.originalEvent !== undefined ? event.originalEvent.touches : null;
2658
+
2659
+ if (!_.dragging || touches && touches.length !== 1) {
2660
+ return false;
2661
+ }
2662
+
2663
+ curLeft = _.getLeft(_.currentSlide);
2664
+
2665
+ _.touchObject.curX = touches !== undefined ? touches[0].pageX : event.clientX;
2666
+ _.touchObject.curY = touches !== undefined ? touches[0].pageY : event.clientY;
2667
+
2668
+ _.touchObject.swipeLength = Math.round(Math.sqrt(
2669
+ Math.pow(_.touchObject.curX - _.touchObject.startX, 2)));
2670
+
2671
+ if (_.options.verticalSwiping === true) {
2672
+ _.touchObject.swipeLength = Math.round(Math.sqrt(
2673
+ Math.pow(_.touchObject.curY - _.touchObject.startY, 2)));
2674
+ }
2675
+
2676
+ swipeDirection = _.swipeDirection();
2677
+
2678
+ if (swipeDirection === 'vertical') {
2679
+ return;
2680
+ }
2681
+
2682
+ if (event.originalEvent !== undefined && _.touchObject.swipeLength > 4) {
2683
+ event.preventDefault();
2684
+ }
2685
+
2686
+ positionOffset = (_.options.rtl === false ? 1 : -1) * (_.touchObject.curX > _.touchObject.startX ? 1 : -1);
2687
+ if (_.options.verticalSwiping === true) {
2688
+ positionOffset = _.touchObject.curY > _.touchObject.startY ? 1 : -1;
2689
+ }
2690
+
2691
+
2692
+ swipeLength = _.touchObject.swipeLength;
2693
+
2694
+ _.touchObject.edgeHit = false;
2695
+
2696
+ if (_.options.infinite === false) {
2697
+ if ((_.currentSlide === 0 && swipeDirection === 'right') || (_.currentSlide >= _.getDotCount() && swipeDirection === 'left')) {
2698
+ swipeLength = _.touchObject.swipeLength * _.options.edgeFriction;
2699
+ _.touchObject.edgeHit = true;
2700
+ }
2701
+ }
2702
+
2703
+ if (_.options.vertical === false) {
2704
+ _.swipeLeft = curLeft + swipeLength * positionOffset;
2705
+ } else {
2706
+ _.swipeLeft = curLeft + (swipeLength * (_.$list.height() / _.listWidth)) * positionOffset;
2707
+ }
2708
+ if (_.options.verticalSwiping === true) {
2709
+ _.swipeLeft = curLeft + swipeLength * positionOffset;
2710
+ }
2711
+
2712
+ if (_.options.fade === true || _.options.touchMove === false) {
2713
+ return false;
2714
+ }
2715
+
2716
+ if (_.animating === true) {
2717
+ _.swipeLeft = null;
2718
+ return false;
2719
+ }
2720
+
2721
+ _.setCSS(_.swipeLeft);
2722
+
2723
+ };
2724
+
2725
+ Slick.prototype.swipeStart = function(event) {
2726
+
2727
+ var _ = this,
2728
+ touches;
2729
+
2730
+ _.interrupted = true;
2731
+
2732
+ if (_.touchObject.fingerCount !== 1 || _.slideCount <= _.options.slidesToShow) {
2733
+ _.touchObject = {};
2734
+ return false;
2735
+ }
2736
+
2737
+ if (event.originalEvent !== undefined && event.originalEvent.touches !== undefined) {
2738
+ touches = event.originalEvent.touches[0];
2739
+ }
2740
+
2741
+ _.touchObject.startX = _.touchObject.curX = touches !== undefined ? touches.pageX : event.clientX;
2742
+ _.touchObject.startY = _.touchObject.curY = touches !== undefined ? touches.pageY : event.clientY;
2743
+
2744
+ _.dragging = true;
2745
+
2746
+ };
2747
+
2748
+ Slick.prototype.unfilterSlides = Slick.prototype.slickUnfilter = function() {
2749
+
2750
+ var _ = this;
2751
+
2752
+ if (_.$slidesCache !== null) {
2753
+
2754
+ _.unload();
2755
+
2756
+ _.$slideTrack.children(this.options.slide).detach();
2757
+
2758
+ _.$slidesCache.appendTo(_.$slideTrack);
2759
+
2760
+ _.reinit();
2761
+
2762
+ }
2763
+
2764
+ };
2765
+
2766
+ Slick.prototype.unload = function() {
2767
+
2768
+ var _ = this;
2769
+
2770
+ $('.slick-cloned', _.$slider).remove();
2771
+
2772
+ if (_.$dots) {
2773
+ _.$dots.remove();
2774
+ }
2775
+
2776
+ if (_.$prevArrow && _.htmlExpr.test(_.options.prevArrow)) {
2777
+ _.$prevArrow.remove();
2778
+ }
2779
+
2780
+ if (_.$nextArrow && _.htmlExpr.test(_.options.nextArrow)) {
2781
+ _.$nextArrow.remove();
2782
+ }
2783
+
2784
+ _.$slides
2785
+ .removeClass('slick-slide slick-active slick-visible slick-current')
2786
+ .attr('aria-hidden', 'true')
2787
+ .css('width', '');
2788
+
2789
+ };
2790
+
2791
+ Slick.prototype.unslick = function(fromBreakpoint) {
2792
+
2793
+ var _ = this;
2794
+ _.$slider.trigger('unslick', [_, fromBreakpoint]);
2795
+ _.destroy();
2796
+
2797
+ };
2798
+
2799
+ Slick.prototype.updateArrows = function() {
2800
+
2801
+ var _ = this,
2802
+ centerOffset;
2803
+
2804
+ centerOffset = Math.floor(_.options.slidesToShow / 2);
2805
+
2806
+ if ( _.options.arrows === true &&
2807
+ _.slideCount > _.options.slidesToShow &&
2808
+ !_.options.infinite ) {
2809
+
2810
+ _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
2811
+ _.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
2812
+
2813
+ if (_.currentSlide === 0) {
2814
+
2815
+ _.$prevArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
2816
+ _.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
2817
+
2818
+ } else if (_.currentSlide >= _.slideCount - _.options.slidesToShow && _.options.centerMode === false) {
2819
+
2820
+ _.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
2821
+ _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
2822
+
2823
+ } else if (_.currentSlide >= _.slideCount - 1 && _.options.centerMode === true) {
2824
+
2825
+ _.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
2826
+ _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
2827
+
2828
+ }
2829
+
2830
+ }
2831
+
2832
+ };
2833
+
2834
+ Slick.prototype.updateDots = function() {
2835
+
2836
+ var _ = this;
2837
+
2838
+ if (_.$dots !== null) {
2839
+
2840
+ _.$dots
2841
+ .find('li')
2842
+ .removeClass('slick-active')
2843
+ .attr('aria-hidden', 'true');
2844
+
2845
+ _.$dots
2846
+ .find('li')
2847
+ .eq(Math.floor(_.currentSlide / _.options.slidesToScroll))
2848
+ .addClass('slick-active')
2849
+ .attr('aria-hidden', 'false');
2850
+
2851
+ }
2852
+
2853
+ };
2854
+
2855
+ Slick.prototype.visibility = function() {
2856
+
2857
+ var _ = this;
2858
+
2859
+ if ( _.options.autoplay ) {
2860
+
2861
+ if ( document[_.hidden] ) {
2862
+
2863
+ _.interrupted = true;
2864
+
2865
+ } else {
2866
+
2867
+ _.interrupted = false;
2868
+
2869
+ }
2870
+
2871
+ }
2872
+
2873
+ };
2874
+
2875
+ $.fn.slick = function() {
2876
+ var _ = this,
2877
+ opt = arguments[0],
2878
+ args = Array.prototype.slice.call(arguments, 1),
2879
+ l = _.length,
2880
+ i,
2881
+ ret;
2882
+ for (i = 0; i < l; i++) {
2883
+ if (typeof opt == 'object' || typeof opt == 'undefined')
2884
+ _[i].slick = new Slick(_[i], opt);
2885
+ else
2886
+ ret = _[i].slick[opt].apply(_[i].slick, args);
2887
+ if (typeof ret != 'undefined') return ret;
2888
+ }
2889
+ return _;
2890
+ };
2891
+
2892
+ }));
js/bumble_filter/slick.min.js ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ _ _ _ _
3
+ ___| (_) ___| | __ (_)___
4
+ / __| | |/ __| |/ / | / __|
5
+ \__ \ | | (__| < _ | \__ \
6
+ |___/_|_|\___|_|\_(_)/ |___/
7
+ |__/
8
+
9
+ Version: 1.6.0
10
+ Author: Ken Wheeler
11
+ Website: http://kenwheeler.github.io
12
+ Docs: http://kenwheeler.github.io/slick
13
+ Repo: http://github.com/kenwheeler/slick
14
+ Issues: http://github.com/kenwheeler/slick/issues
15
+
16
+ */
17
+ !function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):"undefined"!=typeof exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){"use strict";var b=window.Slick||{};b=function(){function c(c,d){var f,e=this;e.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:a(c),appendDots:a(c),arrows:!0,asNavFor:null,prevArrow:'<button type="button" data-role="none" class="slick-prev" aria-label="Previous" tabindex="0" role="button">Previous</button>',nextArrow:'<button type="button" data-role="none" class="slick-next" aria-label="Next" tabindex="0" role="button">Next</button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(b,c){return a('<button type="button" data-role="none" role="button" tabindex="0" />').text(c+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,infinite:!0,initialSlide:0,lazyLoad:"ondemand",mobileFirst:!1,pauseOnHover:!0,pauseOnFocus:!0,pauseOnDotsHover:!1,respondTo:"window",responsive:null,rows:1,rtl:!1,slide:"",slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,zIndex:1e3},e.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:!1,slideOffset:0,swipeLeft:null,$list:null,touchObject:{},transformsEnabled:!1,unslicked:!1},a.extend(e,e.initials),e.activeBreakpoint=null,e.animType=null,e.animProp=null,e.breakpoints=[],e.breakpointSettings=[],e.cssTransitions=!1,e.focussed=!1,e.interrupted=!1,e.hidden="hidden",e.paused=!0,e.positionProp=null,e.respondTo=null,e.rowCount=1,e.shouldClick=!0,e.$slider=a(c),e.$slidesCache=null,e.transformType=null,e.transitionType=null,e.visibilityChange="visibilitychange",e.windowWidth=0,e.windowTimer=null,f=a(c).data("slick")||{},e.options=a.extend({},e.defaults,d,f),e.currentSlide=e.options.initialSlide,e.originalSettings=e.options,"undefined"!=typeof document.mozHidden?(e.hidden="mozHidden",e.visibilityChange="mozvisibilitychange"):"undefined"!=typeof document.webkitHidden&&(e.hidden="webkitHidden",e.visibilityChange="webkitvisibilitychange"),e.autoPlay=a.proxy(e.autoPlay,e),e.autoPlayClear=a.proxy(e.autoPlayClear,e),e.autoPlayIterator=a.proxy(e.autoPlayIterator,e),e.changeSlide=a.proxy(e.changeSlide,e),e.clickHandler=a.proxy(e.clickHandler,e),e.selectHandler=a.proxy(e.selectHandler,e),e.setPosition=a.proxy(e.setPosition,e),e.swipeHandler=a.proxy(e.swipeHandler,e),e.dragHandler=a.proxy(e.dragHandler,e),e.keyHandler=a.proxy(e.keyHandler,e),e.instanceUid=b++,e.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/,e.registerBreakpoints(),e.init(!0)}var b=0;return c}(),b.prototype.activateADA=function(){var a=this;a.$slideTrack.find(".slick-active").attr({"aria-hidden":"false"}).find("a, input, button, select").attr({tabindex:"0"})},b.prototype.addSlide=b.prototype.slickAdd=function(b,c,d){var e=this;if("boolean"==typeof c)d=c,c=null;else if(0>c||c>=e.slideCount)return!1;e.unload(),"number"==typeof c?0===c&&0===e.$slides.length?a(b).appendTo(e.$slideTrack):d?a(b).insertBefore(e.$slides.eq(c)):a(b).insertAfter(e.$slides.eq(c)):d===!0?a(b).prependTo(e.$slideTrack):a(b).appendTo(e.$slideTrack),e.$slides=e.$slideTrack.children(this.options.slide),e.$slideTrack.children(this.options.slide).detach(),e.$slideTrack.append(e.$slides),e.$slides.each(function(b,c){a(c).attr("data-slick-index",b)}),e.$slidesCache=e.$slides,e.reinit()},b.prototype.animateHeight=function(){var a=this;if(1===a.options.slidesToShow&&a.options.adaptiveHeight===!0&&a.options.vertical===!1){var b=a.$slides.eq(a.currentSlide).outerHeight(!0);a.$list.animate({height:b},a.options.speed)}},b.prototype.animateSlide=function(b,c){var d={},e=this;e.animateHeight(),e.options.rtl===!0&&e.options.vertical===!1&&(b=-b),e.transformsEnabled===!1?e.options.vertical===!1?e.$slideTrack.animate({left:b},e.options.speed,e.options.easing,c):e.$slideTrack.animate({top:b},e.options.speed,e.options.easing,c):e.cssTransitions===!1?(e.options.rtl===!0&&(e.currentLeft=-e.currentLeft),a({animStart:e.currentLeft}).animate({animStart:b},{duration:e.options.speed,easing:e.options.easing,step:function(a){a=Math.ceil(a),e.options.vertical===!1?(d[e.animType]="translate("+a+"px, 0px)",e.$slideTrack.css(d)):(d[e.animType]="translate(0px,"+a+"px)",e.$slideTrack.css(d))},complete:function(){c&&c.call()}})):(e.applyTransition(),b=Math.ceil(b),e.options.vertical===!1?d[e.animType]="translate3d("+b+"px, 0px, 0px)":d[e.animType]="translate3d(0px,"+b+"px, 0px)",e.$slideTrack.css(d),c&&setTimeout(function(){e.disableTransition(),c.call()},e.options.speed))},b.prototype.getNavTarget=function(){var b=this,c=b.options.asNavFor;return c&&null!==c&&(c=a(c).not(b.$slider)),c},b.prototype.asNavFor=function(b){var c=this,d=c.getNavTarget();null!==d&&"object"==typeof d&&d.each(function(){var c=a(this).slick("getSlick");c.unslicked||c.slideHandler(b,!0)})},b.prototype.applyTransition=function(a){var b=this,c={};b.options.fade===!1?c[b.transitionType]=b.transformType+" "+b.options.speed+"ms "+b.options.cssEase:c[b.transitionType]="opacity "+b.options.speed+"ms "+b.options.cssEase,b.options.fade===!1?b.$slideTrack.css(c):b.$slides.eq(a).css(c)},b.prototype.autoPlay=function(){var a=this;a.autoPlayClear(),a.slideCount>a.options.slidesToShow&&(a.autoPlayTimer=setInterval(a.autoPlayIterator,a.options.autoplaySpeed))},b.prototype.autoPlayClear=function(){var a=this;a.autoPlayTimer&&clearInterval(a.autoPlayTimer)},b.prototype.autoPlayIterator=function(){var a=this,b=a.currentSlide+a.options.slidesToScroll;a.paused||a.interrupted||a.focussed||(a.options.infinite===!1&&(1===a.direction&&a.currentSlide+1===a.slideCount-1?a.direction=0:0===a.direction&&(b=a.currentSlide-a.options.slidesToScroll,a.currentSlide-1===0&&(a.direction=1))),a.slideHandler(b))},b.prototype.buildArrows=function(){var b=this;b.options.arrows===!0&&(b.$prevArrow=a(b.options.prevArrow).addClass("slick-arrow"),b.$nextArrow=a(b.options.nextArrow).addClass("slick-arrow"),b.slideCount>b.options.slidesToShow?(b.$prevArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),b.$nextArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),b.htmlExpr.test(b.options.prevArrow)&&b.$prevArrow.prependTo(b.options.appendArrows),b.htmlExpr.test(b.options.nextArrow)&&b.$nextArrow.appendTo(b.options.appendArrows),b.options.infinite!==!0&&b.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true")):b.$prevArrow.add(b.$nextArrow).addClass("slick-hidden").attr({"aria-disabled":"true",tabindex:"-1"}))},b.prototype.buildDots=function(){var c,d,b=this;if(b.options.dots===!0&&b.slideCount>b.options.slidesToShow){for(b.$slider.addClass("slick-dotted"),d=a("<ul />").addClass(b.options.dotsClass),c=0;c<=b.getDotCount();c+=1)d.append(a("<li />").append(b.options.customPaging.call(this,b,c)));b.$dots=d.appendTo(b.options.appendDots),b.$dots.find("li").first().addClass("slick-active").attr("aria-hidden","false")}},b.prototype.buildOut=function(){var b=this;b.$slides=b.$slider.children(b.options.slide+":not(.slick-cloned)").addClass("slick-slide"),b.slideCount=b.$slides.length,b.$slides.each(function(b,c){a(c).attr("data-slick-index",b).data("originalStyling",a(c).attr("style")||"")}),b.$slider.addClass("slick-slider"),b.$slideTrack=0===b.slideCount?a('<div class="slick-track"/>').appendTo(b.$slider):b.$slides.wrapAll('<div class="slick-track"/>').parent(),b.$list=b.$slideTrack.wrap('<div aria-live="polite" class="slick-list"/>').parent(),b.$slideTrack.css("opacity",0),(b.options.centerMode===!0||b.options.swipeToSlide===!0)&&(b.options.slidesToScroll=1),a("img[data-lazy]",b.$slider).not("[src]").addClass("slick-loading"),b.setupInfinite(),b.buildArrows(),b.buildDots(),b.updateDots(),b.setSlideClasses("number"==typeof b.currentSlide?b.currentSlide:0),b.options.draggable===!0&&b.$list.addClass("draggable")},b.prototype.buildRows=function(){var b,c,d,e,f,g,h,a=this;if(e=document.createDocumentFragment(),g=a.$slider.children(),a.options.rows>1){for(h=a.options.slidesPerRow*a.options.rows,f=Math.ceil(g.length/h),b=0;f>b;b++){var i=document.createElement("div");for(c=0;c<a.options.rows;c++){var j=document.createElement("div");for(d=0;d<a.options.slidesPerRow;d++){var k=b*h+(c*a.options.slidesPerRow+d);g.get(k)&&j.appendChild(g.get(k))}i.appendChild(j)}e.appendChild(i)}a.$slider.empty().append(e),a.$slider.children().children().children().css({width:100/a.options.slidesPerRow+"%",display:"inline-block"})}},b.prototype.checkResponsive=function(b,c){var e,f,g,d=this,h=!1,i=d.$slider.width(),j=window.innerWidth||a(window).width();if("window"===d.respondTo?g=j:"slider"===d.respondTo?g=i:"min"===d.respondTo&&(g=Math.min(j,i)),d.options.responsive&&d.options.responsive.length&&null!==d.options.responsive){f=null;for(e in d.breakpoints)d.breakpoints.hasOwnProperty(e)&&(d.originalSettings.mobileFirst===!1?g<d.breakpoints[e]&&(f=d.breakpoints[e]):g>d.breakpoints[e]&&(f=d.breakpoints[e]));null!==f?null!==d.activeBreakpoint?(f!==d.activeBreakpoint||c)&&(d.activeBreakpoint=f,"unslick"===d.breakpointSettings[f]?d.unslick(f):(d.options=a.extend({},d.originalSettings,d.breakpointSettings[f]),b===!0&&(d.currentSlide=d.options.initialSlide),d.refresh(b)),h=f):(d.activeBreakpoint=f,"unslick"===d.breakpointSettings[f]?d.unslick(f):(d.options=a.extend({},d.originalSettings,d.breakpointSettings[f]),b===!0&&(d.currentSlide=d.options.initialSlide),d.refresh(b)),h=f):null!==d.activeBreakpoint&&(d.activeBreakpoint=null,d.options=d.originalSettings,b===!0&&(d.currentSlide=d.options.initialSlide),d.refresh(b),h=f),b||h===!1||d.$slider.trigger("breakpoint",[d,h])}},b.prototype.changeSlide=function(b,c){var f,g,h,d=this,e=a(b.currentTarget);switch(e.is("a")&&b.preventDefault(),e.is("li")||(e=e.closest("li")),h=d.slideCount%d.options.slidesToScroll!==0,f=h?0:(d.slideCount-d.currentSlide)%d.options.slidesToScroll,b.data.message){case"previous":g=0===f?d.options.slidesToScroll:d.options.slidesToShow-f,d.slideCount>d.options.slidesToShow&&d.slideHandler(d.currentSlide-g,!1,c);break;case"next":g=0===f?d.options.slidesToScroll:f,d.slideCount>d.options.slidesToShow&&d.slideHandler(d.currentSlide+g,!1,c);break;case"index":var i=0===b.data.index?0:b.data.index||e.index()*d.options.slidesToScroll;d.slideHandler(d.checkNavigable(i),!1,c),e.children().trigger("focus");break;default:return}},b.prototype.checkNavigable=function(a){var c,d,b=this;if(c=b.getNavigableIndexes(),d=0,a>c[c.length-1])a=c[c.length-1];else for(var e in c){if(a<c[e]){a=d;break}d=c[e]}return a},b.prototype.cleanUpEvents=function(){var b=this;b.options.dots&&null!==b.$dots&&a("li",b.$dots).off("click.slick",b.changeSlide).off("mouseenter.slick",a.proxy(b.interrupt,b,!0)).off("mouseleave.slick",a.proxy(b.interrupt,b,!1)),b.$slider.off("focus.slick blur.slick"),b.options.arrows===!0&&b.slideCount>b.options.slidesToShow&&(b.$prevArrow&&b.$prevArrow.off("click.slick",b.changeSlide),b.$nextArrow&&b.$nextArrow.off("click.slick",b.changeSlide)),b.$list.off("touchstart.slick mousedown.slick",b.swipeHandler),b.$list.off("touchmove.slick mousemove.slick",b.swipeHandler),b.$list.off("touchend.slick mouseup.slick",b.swipeHandler),b.$list.off("touchcancel.slick mouseleave.slick",b.swipeHandler),b.$list.off("click.slick",b.clickHandler),a(document).off(b.visibilityChange,b.visibility),b.cleanUpSlideEvents(),b.options.accessibility===!0&&b.$list.off("keydown.slick",b.keyHandler),b.options.focusOnSelect===!0&&a(b.$slideTrack).children().off("click.slick",b.selectHandler),a(window).off("orientationchange.slick.slick-"+b.instanceUid,b.orientationChange),a(window).off("resize.slick.slick-"+b.instanceUid,b.resize),a("[draggable!=true]",b.$slideTrack).off("dragstart",b.preventDefault),a(window).off("load.slick.slick-"+b.instanceUid,b.setPosition),a(document).off("ready.slick.slick-"+b.instanceUid,b.setPosition)},b.prototype.cleanUpSlideEvents=function(){var b=this;b.$list.off("mouseenter.slick",a.proxy(b.interrupt,b,!0)),b.$list.off("mouseleave.slick",a.proxy(b.interrupt,b,!1))},b.prototype.cleanUpRows=function(){var b,a=this;a.options.rows>1&&(b=a.$slides.children().children(),b.removeAttr("style"),a.$slider.empty().append(b))},b.prototype.clickHandler=function(a){var b=this;b.shouldClick===!1&&(a.stopImmediatePropagation(),a.stopPropagation(),a.preventDefault())},b.prototype.destroy=function(b){var c=this;c.autoPlayClear(),c.touchObject={},c.cleanUpEvents(),a(".slick-cloned",c.$slider).detach(),c.$dots&&c.$dots.remove(),c.$prevArrow&&c.$prevArrow.length&&(c.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),c.htmlExpr.test(c.options.prevArrow)&&c.$prevArrow.remove()),c.$nextArrow&&c.$nextArrow.length&&(c.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),c.htmlExpr.test(c.options.nextArrow)&&c.$nextArrow.remove()),c.$slides&&(c.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each(function(){a(this).attr("style",a(this).data("originalStyling"))}),c.$slideTrack.children(this.options.slide).detach(),c.$slideTrack.detach(),c.$list.detach(),c.$slider.append(c.$slides)),c.cleanUpRows(),c.$slider.removeClass("slick-slider"),c.$slider.removeClass("slick-initialized"),c.$slider.removeClass("slick-dotted"),c.unslicked=!0,b||c.$slider.trigger("destroy",[c])},b.prototype.disableTransition=function(a){var b=this,c={};c[b.transitionType]="",b.options.fade===!1?b.$slideTrack.css(c):b.$slides.eq(a).css(c)},b.prototype.fadeSlide=function(a,b){var c=this;c.cssTransitions===!1?(c.$slides.eq(a).css({zIndex:c.options.zIndex}),c.$slides.eq(a).animate({opacity:1},c.options.speed,c.options.easing,b)):(c.applyTransition(a),c.$slides.eq(a).css({opacity:1,zIndex:c.options.zIndex}),b&&setTimeout(function(){c.disableTransition(a),b.call()},c.options.speed))},b.prototype.fadeSlideOut=function(a){var b=this;b.cssTransitions===!1?b.$slides.eq(a).animate({opacity:0,zIndex:b.options.zIndex-2},b.options.speed,b.options.easing):(b.applyTransition(a),b.$slides.eq(a).css({opacity:0,zIndex:b.options.zIndex-2}))},b.prototype.filterSlides=b.prototype.slickFilter=function(a){var b=this;null!==a&&(b.$slidesCache=b.$slides,b.unload(),b.$slideTrack.children(this.options.slide).detach(),b.$slidesCache.filter(a).appendTo(b.$slideTrack),b.reinit())},b.prototype.focusHandler=function(){var b=this;b.$slider.off("focus.slick blur.slick").on("focus.slick blur.slick","*:not(.slick-arrow)",function(c){c.stopImmediatePropagation();var d=a(this);setTimeout(function(){b.options.pauseOnFocus&&(b.focussed=d.is(":focus"),b.autoPlay())},0)})},b.prototype.getCurrent=b.prototype.slickCurrentSlide=function(){var a=this;return a.currentSlide},b.prototype.getDotCount=function(){var a=this,b=0,c=0,d=0;if(a.options.infinite===!0)for(;b<a.slideCount;)++d,b=c+a.options.slidesToScroll,c+=a.options.slidesToScroll<=a.options.slidesToShow?a.options.slidesToScroll:a.options.slidesToShow;else if(a.options.centerMode===!0)d=a.slideCount;else if(a.options.asNavFor)for(;b<a.slideCount;)++d,b=c+a.options.slidesToScroll,c+=a.options.slidesToScroll<=a.options.slidesToShow?a.options.slidesToScroll:a.options.slidesToShow;else d=1+Math.ceil((a.slideCount-a.options.slidesToShow)/a.options.slidesToScroll);return d-1},b.prototype.getLeft=function(a){var c,d,f,b=this,e=0;return b.slideOffset=0,d=b.$slides.first().outerHeight(!0),b.options.infinite===!0?(b.slideCount>b.options.slidesToShow&&(b.slideOffset=b.slideWidth*b.options.slidesToShow*-1,e=d*b.options.slidesToShow*-1),b.slideCount%b.options.slidesToScroll!==0&&a+b.options.slidesToScroll>b.slideCount&&b.slideCount>b.options.slidesToShow&&(a>b.slideCount?(b.slideOffset=(b.options.slidesToShow-(a-b.slideCount))*b.slideWidth*-1,e=(b.options.slidesToShow-(a-b.slideCount))*d*-1):(b.slideOffset=b.slideCount%b.options.slidesToScroll*b.slideWidth*-1,e=b.slideCount%b.options.slidesToScroll*d*-1))):a+b.options.slidesToShow>b.slideCount&&(b.slideOffset=(a+b.options.slidesToShow-b.slideCount)*b.slideWidth,e=(a+b.options.slidesToShow-b.slideCount)*d),b.slideCount<=b.options.slidesToShow&&(b.slideOffset=0,e=0),b.options.centerMode===!0&&b.options.infinite===!0?b.slideOffset+=b.slideWidth*Math.floor(b.options.slidesToShow/2)-b.slideWidth:b.options.centerMode===!0&&(b.slideOffset=0,b.slideOffset+=b.slideWidth*Math.floor(b.options.slidesToShow/2)),c=b.options.vertical===!1?a*b.slideWidth*-1+b.slideOffset:a*d*-1+e,b.options.variableWidth===!0&&(f=b.slideCount<=b.options.slidesToShow||b.options.infinite===!1?b.$slideTrack.children(".slick-slide").eq(a):b.$slideTrack.children(".slick-slide").eq(a+b.options.slidesToShow),c=b.options.rtl===!0?f[0]?-1*(b.$slideTrack.width()-f[0].offsetLeft-f.width()):0:f[0]?-1*f[0].offsetLeft:0,b.options.centerMode===!0&&(f=b.slideCount<=b.options.slidesToShow||b.options.infinite===!1?b.$slideTrack.children(".slick-slide").eq(a):b.$slideTrack.children(".slick-slide").eq(a+b.options.slidesToShow+1),c=b.options.rtl===!0?f[0]?-1*(b.$slideTrack.width()-f[0].offsetLeft-f.width()):0:f[0]?-1*f[0].offsetLeft:0,c+=(b.$list.width()-f.outerWidth())/2)),c},b.prototype.getOption=b.prototype.slickGetOption=function(a){var b=this;return b.options[a]},b.prototype.getNavigableIndexes=function(){var e,a=this,b=0,c=0,d=[];for(a.options.infinite===!1?e=a.slideCount:(b=-1*a.options.slidesToScroll,c=-1*a.options.slidesToScroll,e=2*a.slideCount);e>b;)d.push(b),b=c+a.options.slidesToScroll,c+=a.options.slidesToScroll<=a.options.slidesToShow?a.options.slidesToScroll:a.options.slidesToShow;return d},b.prototype.getSlick=function(){return this},b.prototype.getSlideCount=function(){var c,d,e,b=this;return e=b.options.centerMode===!0?b.slideWidth*Math.floor(b.options.slidesToShow/2):0,b.options.swipeToSlide===!0?(b.$slideTrack.find(".slick-slide").each(function(c,f){return f.offsetLeft-e+a(f).outerWidth()/2>-1*b.swipeLeft?(d=f,!1):void 0}),c=Math.abs(a(d).attr("data-slick-index")-b.currentSlide)||1):b.options.slidesToScroll},b.prototype.goTo=b.prototype.slickGoTo=function(a,b){var c=this;c.changeSlide({data:{message:"index",index:parseInt(a)}},b)},b.prototype.init=function(b){var c=this;a(c.$slider).hasClass("slick-initialized")||(a(c.$slider).addClass("slick-initialized"),c.buildRows(),c.buildOut(),c.setProps(),c.startLoad(),c.loadSlider(),c.initializeEvents(),c.updateArrows(),c.updateDots(),c.checkResponsive(!0),c.focusHandler()),b&&c.$slider.trigger("init",[c]),c.options.accessibility===!0&&c.initADA(),c.options.autoplay&&(c.paused=!1,c.autoPlay())},b.prototype.initADA=function(){var b=this;b.$slides.add(b.$slideTrack.find(".slick-cloned")).attr({"aria-hidden":"true",tabindex:"-1"}).find("a, input, button, select").attr({tabindex:"-1"}),b.$slideTrack.attr("role","listbox"),b.$slides.not(b.$slideTrack.find(".slick-cloned")).each(function(c){a(this).attr({role:"option","aria-describedby":"slick-slide"+b.instanceUid+c})}),null!==b.$dots&&b.$dots.attr("role","tablist").find("li").each(function(c){a(this).attr({role:"presentation","aria-selected":"false","aria-controls":"navigation"+b.instanceUid+c,id:"slick-slide"+b.instanceUid+c})}).first().attr("aria-selected","true").end().find("button").attr("role","button").end().closest("div").attr("role","toolbar"),b.activateADA()},b.prototype.initArrowEvents=function(){var a=this;a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&(a.$prevArrow.off("click.slick").on("click.slick",{message:"previous"},a.changeSlide),a.$nextArrow.off("click.slick").on("click.slick",{message:"next"},a.changeSlide))},b.prototype.initDotEvents=function(){var b=this;b.options.dots===!0&&b.slideCount>b.options.slidesToShow&&a("li",b.$dots).on("click.slick",{message:"index"},b.changeSlide),b.options.dots===!0&&b.options.pauseOnDotsHover===!0&&a("li",b.$dots).on("mouseenter.slick",a.proxy(b.interrupt,b,!0)).on("mouseleave.slick",a.proxy(b.interrupt,b,!1))},b.prototype.initSlideEvents=function(){var b=this;b.options.pauseOnHover&&(b.$list.on("mouseenter.slick",a.proxy(b.interrupt,b,!0)),b.$list.on("mouseleave.slick",a.proxy(b.interrupt,b,!1)))},b.prototype.initializeEvents=function(){var b=this;b.initArrowEvents(),b.initDotEvents(),b.initSlideEvents(),b.$list.on("touchstart.slick mousedown.slick",{action:"start"},b.swipeHandler),b.$list.on("touchmove.slick mousemove.slick",{action:"move"},b.swipeHandler),b.$list.on("touchend.slick mouseup.slick",{action:"end"},b.swipeHandler),b.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},b.swipeHandler),b.$list.on("click.slick",b.clickHandler),a(document).on(b.visibilityChange,a.proxy(b.visibility,b)),b.options.accessibility===!0&&b.$list.on("keydown.slick",b.keyHandler),b.options.focusOnSelect===!0&&a(b.$slideTrack).children().on("click.slick",b.selectHandler),a(window).on("orientationchange.slick.slick-"+b.instanceUid,a.proxy(b.orientationChange,b)),a(window).on("resize.slick.slick-"+b.instanceUid,a.proxy(b.resize,b)),a("[draggable!=true]",b.$slideTrack).on("dragstart",b.preventDefault),a(window).on("load.slick.slick-"+b.instanceUid,b.setPosition),a(document).on("ready.slick.slick-"+b.instanceUid,b.setPosition)},b.prototype.initUI=function(){var a=this;a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&(a.$prevArrow.show(),a.$nextArrow.show()),a.options.dots===!0&&a.slideCount>a.options.slidesToShow&&a.$dots.show()},b.prototype.keyHandler=function(a){var b=this;a.target.tagName.match("TEXTAREA|INPUT|SELECT")||(37===a.keyCode&&b.options.accessibility===!0?b.changeSlide({data:{message:b.options.rtl===!0?"next":"previous"}}):39===a.keyCode&&b.options.accessibility===!0&&b.changeSlide({data:{message:b.options.rtl===!0?"previous":"next"}}))},b.prototype.lazyLoad=function(){function g(c){a("img[data-lazy]",c).each(function(){var c=a(this),d=a(this).attr("data-lazy"),e=document.createElement("img");e.onload=function(){c.animate({opacity:0},100,function(){c.attr("src",d).animate({opacity:1},200,function(){c.removeAttr("data-lazy").removeClass("slick-loading")}),b.$slider.trigger("lazyLoaded",[b,c,d])})},e.onerror=function(){c.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),b.$slider.trigger("lazyLoadError",[b,c,d])},e.src=d})}var c,d,e,f,b=this;b.options.centerMode===!0?b.options.infinite===!0?(e=b.currentSlide+(b.options.slidesToShow/2+1),f=e+b.options.slidesToShow+2):(e=Math.max(0,b.currentSlide-(b.options.slidesToShow/2+1)),f=2+(b.options.slidesToShow/2+1)+b.currentSlide):(e=b.options.infinite?b.options.slidesToShow+b.currentSlide:b.currentSlide,f=Math.ceil(e+b.options.slidesToShow),b.options.fade===!0&&(e>0&&e--,f<=b.slideCount&&f++)),c=b.$slider.find(".slick-slide").slice(e,f),g(c),b.slideCount<=b.options.slidesToShow?(d=b.$slider.find(".slick-slide"),g(d)):b.currentSlide>=b.slideCount-b.options.slidesToShow?(d=b.$slider.find(".slick-cloned").slice(0,b.options.slidesToShow),g(d)):0===b.currentSlide&&(d=b.$slider.find(".slick-cloned").slice(-1*b.options.slidesToShow),g(d))},b.prototype.loadSlider=function(){var a=this;a.setPosition(),a.$slideTrack.css({opacity:1}),a.$slider.removeClass("slick-loading"),a.initUI(),"progressive"===a.options.lazyLoad&&a.progressiveLazyLoad()},b.prototype.next=b.prototype.slickNext=function(){var a=this;a.changeSlide({data:{message:"next"}})},b.prototype.orientationChange=function(){var a=this;a.checkResponsive(),a.setPosition()},b.prototype.pause=b.prototype.slickPause=function(){var a=this;a.autoPlayClear(),a.paused=!0},b.prototype.play=b.prototype.slickPlay=function(){var a=this;a.autoPlay(),a.options.autoplay=!0,a.paused=!1,a.focussed=!1,a.interrupted=!1},b.prototype.postSlide=function(a){var b=this;b.unslicked||(b.$slider.trigger("afterChange",[b,a]),b.animating=!1,b.setPosition(),b.swipeLeft=null,b.options.autoplay&&b.autoPlay(),b.options.accessibility===!0&&b.initADA())},b.prototype.prev=b.prototype.slickPrev=function(){var a=this;a.changeSlide({data:{message:"previous"}})},b.prototype.preventDefault=function(a){a.preventDefault()},b.prototype.progressiveLazyLoad=function(b){b=b||1;var e,f,g,c=this,d=a("img[data-lazy]",c.$slider);d.length?(e=d.first(),f=e.attr("data-lazy"),g=document.createElement("img"),g.onload=function(){e.attr("src",f).removeAttr("data-lazy").removeClass("slick-loading"),c.options.adaptiveHeight===!0&&c.setPosition(),c.$slider.trigger("lazyLoaded",[c,e,f]),c.progressiveLazyLoad()},g.onerror=function(){3>b?setTimeout(function(){c.progressiveLazyLoad(b+1)},500):(e.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),c.$slider.trigger("lazyLoadError",[c,e,f]),c.progressiveLazyLoad())},g.src=f):c.$slider.trigger("allImagesLoaded",[c])},b.prototype.refresh=function(b){var d,e,c=this;e=c.slideCount-c.options.slidesToShow,!c.options.infinite&&c.currentSlide>e&&(c.currentSlide=e),c.slideCount<=c.options.slidesToShow&&(c.currentSlide=0),d=c.currentSlide,c.destroy(!0),a.extend(c,c.initials,{currentSlide:d}),c.init(),b||c.changeSlide({data:{message:"index",index:d}},!1)},b.prototype.registerBreakpoints=function(){var c,d,e,b=this,f=b.options.responsive||null;if("array"===a.type(f)&&f.length){b.respondTo=b.options.respondTo||"window";for(c in f)if(e=b.breakpoints.length-1,d=f[c].breakpoint,f.hasOwnProperty(c)){for(;e>=0;)b.breakpoints[e]&&b.breakpoints[e]===d&&b.breakpoints.splice(e,1),e--;b.breakpoints.push(d),b.breakpointSettings[d]=f[c].settings}b.breakpoints.sort(function(a,c){return b.options.mobileFirst?a-c:c-a})}},b.prototype.reinit=function(){var b=this;b.$slides=b.$slideTrack.children(b.options.slide).addClass("slick-slide"),b.slideCount=b.$slides.length,b.currentSlide>=b.slideCount&&0!==b.currentSlide&&(b.currentSlide=b.currentSlide-b.options.slidesToScroll),b.slideCount<=b.options.slidesToShow&&(b.currentSlide=0),b.registerBreakpoints(),b.setProps(),b.setupInfinite(),b.buildArrows(),b.updateArrows(),b.initArrowEvents(),b.buildDots(),b.updateDots(),b.initDotEvents(),b.cleanUpSlideEvents(),b.initSlideEvents(),b.checkResponsive(!1,!0),b.options.focusOnSelect===!0&&a(b.$slideTrack).children().on("click.slick",b.selectHandler),b.setSlideClasses("number"==typeof b.currentSlide?b.currentSlide:0),b.setPosition(),b.focusHandler(),b.paused=!b.options.autoplay,b.autoPlay(),b.$slider.trigger("reInit",[b])},b.prototype.resize=function(){var b=this;a(window).width()!==b.windowWidth&&(clearTimeout(b.windowDelay),b.windowDelay=window.setTimeout(function(){b.windowWidth=a(window).width(),b.checkResponsive(),b.unslicked||b.setPosition()},50))},b.prototype.removeSlide=b.prototype.slickRemove=function(a,b,c){var d=this;return"boolean"==typeof a?(b=a,a=b===!0?0:d.slideCount-1):a=b===!0?--a:a,d.slideCount<1||0>a||a>d.slideCount-1?!1:(d.unload(),c===!0?d.$slideTrack.children().remove():d.$slideTrack.children(this.options.slide).eq(a).remove(),d.$slides=d.$slideTrack.children(this.options.slide),d.$slideTrack.children(this.options.slide).detach(),d.$slideTrack.append(d.$slides),d.$slidesCache=d.$slides,void d.reinit())},b.prototype.setCSS=function(a){var d,e,b=this,c={};b.options.rtl===!0&&(a=-a),d="left"==b.positionProp?Math.ceil(a)+"px":"0px",e="top"==b.positionProp?Math.ceil(a)+"px":"0px",c[b.positionProp]=a,b.transformsEnabled===!1?b.$slideTrack.css(c):(c={},b.cssTransitions===!1?(c[b.animType]="translate("+d+", "+e+")",b.$slideTrack.css(c)):(c[b.animType]="translate3d("+d+", "+e+", 0px)",b.$slideTrack.css(c)))},b.prototype.setDimensions=function(){var a=this;a.options.vertical===!1?a.options.centerMode===!0&&a.$list.css({padding:"0px "+a.options.centerPadding}):(a.$list.height(a.$slides.first().outerHeight(!0)*a.options.slidesToShow),a.options.centerMode===!0&&a.$list.css({padding:a.options.centerPadding+" 0px"})),a.listWidth=a.$list.width(),a.listHeight=a.$list.height(),a.options.vertical===!1&&a.options.variableWidth===!1?(a.slideWidth=Math.ceil(a.listWidth/a.options.slidesToShow),a.$slideTrack.width(Math.ceil(a.slideWidth*a.$slideTrack.children(".slick-slide").length))):a.options.variableWidth===!0?a.$slideTrack.width(5e3*a.slideCount):(a.slideWidth=Math.ceil(a.listWidth),a.$slideTrack.height(Math.ceil(a.$slides.first().outerHeight(!0)*a.$slideTrack.children(".slick-slide").length)));var b=a.$slides.first().outerWidth(!0)-a.$slides.first().width();a.options.variableWidth===!1&&a.$slideTrack.children(".slick-slide").width(a.slideWidth-b)},b.prototype.setFade=function(){var c,b=this;b.$slides.each(function(d,e){c=b.slideWidth*d*-1,b.options.rtl===!0?a(e).css({position:"relative",right:c,top:0,zIndex:b.options.zIndex-2,opacity:0}):a(e).css({position:"relative",left:c,top:0,zIndex:b.options.zIndex-2,opacity:0})}),b.$slides.eq(b.currentSlide).css({zIndex:b.options.zIndex-1,opacity:1})},b.prototype.setHeight=function(){var a=this;if(1===a.options.slidesToShow&&a.options.adaptiveHeight===!0&&a.options.vertical===!1){var b=a.$slides.eq(a.currentSlide).outerHeight(!0);a.$list.css("height",b)}},b.prototype.setOption=b.prototype.slickSetOption=function(){var c,d,e,f,h,b=this,g=!1;if("object"===a.type(arguments[0])?(e=arguments[0],g=arguments[1],h="multiple"):"string"===a.type(arguments[0])&&(e=arguments[0],f=arguments[1],g=arguments[2],"responsive"===arguments[0]&&"array"===a.type(arguments[1])?h="responsive":"undefined"!=typeof arguments[1]&&(h="single")),"single"===h)b.options[e]=f;else if("multiple"===h)a.each(e,function(a,c){b.options[a]=c});else if("responsive"===h)for(d in f)if("array"!==a.type(b.options.responsive))b.options.responsive=[f[d]];else{for(c=b.options.responsive.length-1;c>=0;)b.options.responsive[c].breakpoint===f[d].breakpoint&&b.options.responsive.splice(c,1),c--;b.options.responsive.push(f[d])}g&&(b.unload(),b.reinit())},b.prototype.setPosition=function(){var a=this;a.setDimensions(),a.setHeight(),a.options.fade===!1?a.setCSS(a.getLeft(a.currentSlide)):a.setFade(),a.$slider.trigger("setPosition",[a])},b.prototype.setProps=function(){var a=this,b=document.body.style;a.positionProp=a.options.vertical===!0?"top":"left","top"===a.positionProp?a.$slider.addClass("slick-vertical"):a.$slider.removeClass("slick-vertical"),(void 0!==b.WebkitTransition||void 0!==b.MozTransition||void 0!==b.msTransition)&&a.options.useCSS===!0&&(a.cssTransitions=!0),a.options.fade&&("number"==typeof a.options.zIndex?a.options.zIndex<3&&(a.options.zIndex=3):a.options.zIndex=a.defaults.zIndex),void 0!==b.OTransform&&(a.animType="OTransform",a.transformType="-o-transform",a.transitionType="OTransition",void 0===b.perspectiveProperty&&void 0===b.webkitPerspective&&(a.animType=!1)),void 0!==b.MozTransform&&(a.animType="MozTransform",a.transformType="-moz-transform",a.transitionType="MozTransition",void 0===b.perspectiveProperty&&void 0===b.MozPerspective&&(a.animType=!1)),void 0!==b.webkitTransform&&(a.animType="webkitTransform",a.transformType="-webkit-transform",a.transitionType="webkitTransition",void 0===b.perspectiveProperty&&void 0===b.webkitPerspective&&(a.animType=!1)),void 0!==b.msTransform&&(a.animType="msTransform",a.transformType="-ms-transform",a.transitionType="msTransition",void 0===b.msTransform&&(a.animType=!1)),void 0!==b.transform&&a.animType!==!1&&(a.animType="transform",a.transformType="transform",a.transitionType="transition"),a.transformsEnabled=a.options.useTransform&&null!==a.animType&&a.animType!==!1},b.prototype.setSlideClasses=function(a){var c,d,e,f,b=this;d=b.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden","true"),b.$slides.eq(a).addClass("slick-current"),b.options.centerMode===!0?(c=Math.floor(b.options.slidesToShow/2),b.options.infinite===!0&&(a>=c&&a<=b.slideCount-1-c?b.$slides.slice(a-c,a+c+1).addClass("slick-active").attr("aria-hidden","false"):(e=b.options.slidesToShow+a,
18
+ d.slice(e-c+1,e+c+2).addClass("slick-active").attr("aria-hidden","false")),0===a?d.eq(d.length-1-b.options.slidesToShow).addClass("slick-center"):a===b.slideCount-1&&d.eq(b.options.slidesToShow).addClass("slick-center")),b.$slides.eq(a).addClass("slick-center")):a>=0&&a<=b.slideCount-b.options.slidesToShow?b.$slides.slice(a,a+b.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"):d.length<=b.options.slidesToShow?d.addClass("slick-active").attr("aria-hidden","false"):(f=b.slideCount%b.options.slidesToShow,e=b.options.infinite===!0?b.options.slidesToShow+a:a,b.options.slidesToShow==b.options.slidesToScroll&&b.slideCount-a<b.options.slidesToShow?d.slice(e-(b.options.slidesToShow-f),e+f).addClass("slick-active").attr("aria-hidden","false"):d.slice(e,e+b.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false")),"ondemand"===b.options.lazyLoad&&b.lazyLoad()},b.prototype.setupInfinite=function(){var c,d,e,b=this;if(b.options.fade===!0&&(b.options.centerMode=!1),b.options.infinite===!0&&b.options.fade===!1&&(d=null,b.slideCount>b.options.slidesToShow)){for(e=b.options.centerMode===!0?b.options.slidesToShow+1:b.options.slidesToShow,c=b.slideCount;c>b.slideCount-e;c-=1)d=c-1,a(b.$slides[d]).clone(!0).attr("id","").attr("data-slick-index",d-b.slideCount).prependTo(b.$slideTrack).addClass("slick-cloned");for(c=0;e>c;c+=1)d=c,a(b.$slides[d]).clone(!0).attr("id","").attr("data-slick-index",d+b.slideCount).appendTo(b.$slideTrack).addClass("slick-cloned");b.$slideTrack.find(".slick-cloned").find("[id]").each(function(){a(this).attr("id","")})}},b.prototype.interrupt=function(a){var b=this;a||b.autoPlay(),b.interrupted=a},b.prototype.selectHandler=function(b){var c=this,d=a(b.target).is(".slick-slide")?a(b.target):a(b.target).parents(".slick-slide"),e=parseInt(d.attr("data-slick-index"));return e||(e=0),c.slideCount<=c.options.slidesToShow?(c.setSlideClasses(e),void c.asNavFor(e)):void c.slideHandler(e)},b.prototype.slideHandler=function(a,b,c){var d,e,f,g,j,h=null,i=this;return b=b||!1,i.animating===!0&&i.options.waitForAnimate===!0||i.options.fade===!0&&i.currentSlide===a||i.slideCount<=i.options.slidesToShow?void 0:(b===!1&&i.asNavFor(a),d=a,h=i.getLeft(d),g=i.getLeft(i.currentSlide),i.currentLeft=null===i.swipeLeft?g:i.swipeLeft,i.options.infinite===!1&&i.options.centerMode===!1&&(0>a||a>i.getDotCount()*i.options.slidesToScroll)?void(i.options.fade===!1&&(d=i.currentSlide,c!==!0?i.animateSlide(g,function(){i.postSlide(d)}):i.postSlide(d))):i.options.infinite===!1&&i.options.centerMode===!0&&(0>a||a>i.slideCount-i.options.slidesToScroll)?void(i.options.fade===!1&&(d=i.currentSlide,c!==!0?i.animateSlide(g,function(){i.postSlide(d)}):i.postSlide(d))):(i.options.autoplay&&clearInterval(i.autoPlayTimer),e=0>d?i.slideCount%i.options.slidesToScroll!==0?i.slideCount-i.slideCount%i.options.slidesToScroll:i.slideCount+d:d>=i.slideCount?i.slideCount%i.options.slidesToScroll!==0?0:d-i.slideCount:d,i.animating=!0,i.$slider.trigger("beforeChange",[i,i.currentSlide,e]),f=i.currentSlide,i.currentSlide=e,i.setSlideClasses(i.currentSlide),i.options.asNavFor&&(j=i.getNavTarget(),j=j.slick("getSlick"),j.slideCount<=j.options.slidesToShow&&j.setSlideClasses(i.currentSlide)),i.updateDots(),i.updateArrows(),i.options.fade===!0?(c!==!0?(i.fadeSlideOut(f),i.fadeSlide(e,function(){i.postSlide(e)})):i.postSlide(e),void i.animateHeight()):void(c!==!0?i.animateSlide(h,function(){i.postSlide(e)}):i.postSlide(e))))},b.prototype.startLoad=function(){var a=this;a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&(a.$prevArrow.hide(),a.$nextArrow.hide()),a.options.dots===!0&&a.slideCount>a.options.slidesToShow&&a.$dots.hide(),a.$slider.addClass("slick-loading")},b.prototype.swipeDirection=function(){var a,b,c,d,e=this;return a=e.touchObject.startX-e.touchObject.curX,b=e.touchObject.startY-e.touchObject.curY,c=Math.atan2(b,a),d=Math.round(180*c/Math.PI),0>d&&(d=360-Math.abs(d)),45>=d&&d>=0?e.options.rtl===!1?"left":"right":360>=d&&d>=315?e.options.rtl===!1?"left":"right":d>=135&&225>=d?e.options.rtl===!1?"right":"left":e.options.verticalSwiping===!0?d>=35&&135>=d?"down":"up":"vertical"},b.prototype.swipeEnd=function(a){var c,d,b=this;if(b.dragging=!1,b.interrupted=!1,b.shouldClick=b.touchObject.swipeLength>10?!1:!0,void 0===b.touchObject.curX)return!1;if(b.touchObject.edgeHit===!0&&b.$slider.trigger("edge",[b,b.swipeDirection()]),b.touchObject.swipeLength>=b.touchObject.minSwipe){switch(d=b.swipeDirection()){case"left":case"down":c=b.options.swipeToSlide?b.checkNavigable(b.currentSlide+b.getSlideCount()):b.currentSlide+b.getSlideCount(),b.currentDirection=0;break;case"right":case"up":c=b.options.swipeToSlide?b.checkNavigable(b.currentSlide-b.getSlideCount()):b.currentSlide-b.getSlideCount(),b.currentDirection=1}"vertical"!=d&&(b.slideHandler(c),b.touchObject={},b.$slider.trigger("swipe",[b,d]))}else b.touchObject.startX!==b.touchObject.curX&&(b.slideHandler(b.currentSlide),b.touchObject={})},b.prototype.swipeHandler=function(a){var b=this;if(!(b.options.swipe===!1||"ontouchend"in document&&b.options.swipe===!1||b.options.draggable===!1&&-1!==a.type.indexOf("mouse")))switch(b.touchObject.fingerCount=a.originalEvent&&void 0!==a.originalEvent.touches?a.originalEvent.touches.length:1,b.touchObject.minSwipe=b.listWidth/b.options.touchThreshold,b.options.verticalSwiping===!0&&(b.touchObject.minSwipe=b.listHeight/b.options.touchThreshold),a.data.action){case"start":b.swipeStart(a);break;case"move":b.swipeMove(a);break;case"end":b.swipeEnd(a)}},b.prototype.swipeMove=function(a){var d,e,f,g,h,b=this;return h=void 0!==a.originalEvent?a.originalEvent.touches:null,!b.dragging||h&&1!==h.length?!1:(d=b.getLeft(b.currentSlide),b.touchObject.curX=void 0!==h?h[0].pageX:a.clientX,b.touchObject.curY=void 0!==h?h[0].pageY:a.clientY,b.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(b.touchObject.curX-b.touchObject.startX,2))),b.options.verticalSwiping===!0&&(b.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(b.touchObject.curY-b.touchObject.startY,2)))),e=b.swipeDirection(),"vertical"!==e?(void 0!==a.originalEvent&&b.touchObject.swipeLength>4&&a.preventDefault(),g=(b.options.rtl===!1?1:-1)*(b.touchObject.curX>b.touchObject.startX?1:-1),b.options.verticalSwiping===!0&&(g=b.touchObject.curY>b.touchObject.startY?1:-1),f=b.touchObject.swipeLength,b.touchObject.edgeHit=!1,b.options.infinite===!1&&(0===b.currentSlide&&"right"===e||b.currentSlide>=b.getDotCount()&&"left"===e)&&(f=b.touchObject.swipeLength*b.options.edgeFriction,b.touchObject.edgeHit=!0),b.options.vertical===!1?b.swipeLeft=d+f*g:b.swipeLeft=d+f*(b.$list.height()/b.listWidth)*g,b.options.verticalSwiping===!0&&(b.swipeLeft=d+f*g),b.options.fade===!0||b.options.touchMove===!1?!1:b.animating===!0?(b.swipeLeft=null,!1):void b.setCSS(b.swipeLeft)):void 0)},b.prototype.swipeStart=function(a){var c,b=this;return b.interrupted=!0,1!==b.touchObject.fingerCount||b.slideCount<=b.options.slidesToShow?(b.touchObject={},!1):(void 0!==a.originalEvent&&void 0!==a.originalEvent.touches&&(c=a.originalEvent.touches[0]),b.touchObject.startX=b.touchObject.curX=void 0!==c?c.pageX:a.clientX,b.touchObject.startY=b.touchObject.curY=void 0!==c?c.pageY:a.clientY,void(b.dragging=!0))},b.prototype.unfilterSlides=b.prototype.slickUnfilter=function(){var a=this;null!==a.$slidesCache&&(a.unload(),a.$slideTrack.children(this.options.slide).detach(),a.$slidesCache.appendTo(a.$slideTrack),a.reinit())},b.prototype.unload=function(){var b=this;a(".slick-cloned",b.$slider).remove(),b.$dots&&b.$dots.remove(),b.$prevArrow&&b.htmlExpr.test(b.options.prevArrow)&&b.$prevArrow.remove(),b.$nextArrow&&b.htmlExpr.test(b.options.nextArrow)&&b.$nextArrow.remove(),b.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden","true").css("width","")},b.prototype.unslick=function(a){var b=this;b.$slider.trigger("unslick",[b,a]),b.destroy()},b.prototype.updateArrows=function(){var b,a=this;b=Math.floor(a.options.slidesToShow/2),a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&!a.options.infinite&&(a.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false"),a.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false"),0===a.currentSlide?(a.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true"),a.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false")):a.currentSlide>=a.slideCount-a.options.slidesToShow&&a.options.centerMode===!1?(a.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),a.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")):a.currentSlide>=a.slideCount-1&&a.options.centerMode===!0&&(a.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),a.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")))},b.prototype.updateDots=function(){var a=this;null!==a.$dots&&(a.$dots.find("li").removeClass("slick-active").attr("aria-hidden","true"),a.$dots.find("li").eq(Math.floor(a.currentSlide/a.options.slidesToScroll)).addClass("slick-active").attr("aria-hidden","false"))},b.prototype.visibility=function(){var a=this;a.options.autoplay&&(document[a.hidden]?a.interrupted=!0:a.interrupted=!1)},a.fn.slick=function(){var f,g,a=this,c=arguments[0],d=Array.prototype.slice.call(arguments,1),e=a.length;for(f=0;e>f;f++)if("object"==typeof c||"undefined"==typeof c?a[f].slick=new b(a[f],c):g=a[f].slick[c].apply(a[f].slick,d),"undefined"!=typeof g)return g;return a}});
package.xml ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Bumble_Filter</name>
4
+ <version>1.2.0</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://www.opensource.org/licences/osl-3.0.php">OSL v3.0</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Create separete pages with custom filter of your products, where you can filter by Manufacturer, Category, for every attributes of your products or all of them.</summary>
10
+ <description>Armah Extension gives you more for your Shop Online, you can create separete pages with custom filter of your products, where you can filter by Manufacturer, Category,for every attributes of your products or all of the above.&#xD;
11
+ &#xD;
12
+ Allowing your customers a better experience and easier navigation, by this filter you can decide wich products show to client, and given them a plus navigation filter on the side bar ( By Category and Price ).&#xD;
13
+ &#xD;
14
+ Every Groups created is visible in frontend pages by wirting in the url after domin name the identifier of belonging group ( ex. yourDominName.com/identifier ).&#xD;
15
+ &#xD;
16
+ For each elements of the group you can link a Title, Desciption and a Image where you can show through a Widget Carousel all elements of single group or all of groups.&#xD;
17
+ &#xD;
18
+ The extension works in Italian and English and has been tested and works with Magento Community Edition 1.9</description>
19
+ <notes>This version has been tested and works with Magento Community Edition 1.9</notes>
20
+ <authors><author><name>Ferdinando Lanzillo</name><user>Ferdinando</user><email>flanzillo05@gmail.com</email></author></authors>
21
+ <date>2016-08-23</date>
22
+ <time>10:50:36</time>
23
+ <contents><target name="magecommunity"><dir name="Bumble"><dir name="Filter"><dir name="Block"><dir name="Adminhtml"><dir name="Filter"><dir name="Edit"><file name="Form.php" hash="07886b55e9d4514702c9a17abd192772"/><dir name="Tab"><file name="Form.php" hash="7201b9055ccacd73de1f2a1692e82f3e"/><file name="Meta.php" hash="6da6fa35445f084a448b4c00a40ab25c"/><file name="Param.php" hash="563a387b9816d811b8bab678ea008dcc"/></dir><file name="Tabs.php" hash="c52c4cdfe6d667292345a9b1416415cc"/><file name=".DS_Store" hash="841d5ea1ad314705f089e8d5b37da41d"/></dir><file name="Edit.php" hash="3920f1e1f2219f91bf2dc5bfaa95caf7"/><file name="Grid.php" hash="4d167235bf9d304583c3f5967608a89e"/><file name=".DS_Store" hash="ec9d7461cc2c1cc064463b32709ce0e3"/></dir><file name="Filter.php" hash="c4cc7841ecd5227b158eb6d4a5f3fbfc"/><dir name="Group"><dir name="Edit"><file name="Form.php" hash="d014fc1b5e81dcac5db918906173a315"/><dir name="Tab"><file name="Form1.php" hash="dc999740ab92f8a65cba3bbd6d41fa87"/><file name="Form10.php" hash="19add2cba1a809496749807747a675aa"/><file name="Form11.php" hash="a894402635e72f93f8bf050aa709b868"/><file name="Form12.php" hash="99feaf00f2d7a7a4a41e930ddb5684ea"/><file name="Form13.php" hash="9faea6b2f3c21f5f6daa30c278e89b59"/><file name="Form14.php" hash="367da47c1b9740b6a1980665e870ec17"/><file name="Form15.php" hash="b716205d3c9eefe1f5770d52a530c437"/><file name="Form16.php" hash="1ec322a3cab00febd1f815f23ad08fc6"/><file name="Form17.php" hash="29b631ddae029f76ec58cb2886915d08"/><file name="Form18.php" hash="fd69211b17f3e2150889f90547618483"/><file name="Form19.php" hash="b8f457665147a97840f214d899287a6d"/><file name="Form2.php" hash="ed8e99fa3e3b04c8315c41a893cbcc7e"/><file name="Form20.php" hash="5eb3b2b52e2c4b5282ad1bbf0958a195"/><file name="Form21.php" hash="a1d27c40d60a3b1aa67d706cf241f5e2"/><file name="Form3.php" hash="cb6886160c38d2cfd3cf5773b8966b56"/><file name="Form4.php" hash="439d0c936d1db71d6cbd8add6b1d01a4"/><file name="Form5.php" hash="eb21bc4bb25b9a06ee708d4299b41e70"/><file name="Form6.php" hash="02c9cddfecb2e2fd48650921de2556f3"/><file name="Form7.php" hash="678eccc66af0e00a11246ae2f37c069a"/><file name="Form8.php" hash="df16fbde89b851c07f867ba55723be29"/><file name="Form9.php" hash="97b176baa7edb340503376bc1f78bad4"/></dir><file name="Tabs.php" hash="881e2173a376a4aa6b392b296985df41"/></dir><file name="Edit.php" hash="8abe60dc01a88683ad9da30fb57be7ec"/><file name="Grid.php" hash="1f70833a04dd1b1e6cfc94ed20e29a1d"/></dir><file name="Group.php" hash="5ffd721ff9a9989f2cfeb6e15ac9ccee"/><dir name="Renderer"><file name="Group.php" hash="d0217fce45fe4bd9f48788746e59fe31"/><file name="Image.php" hash="628e3eec5a14ed07abf1568d948da46e"/></dir><file name=".DS_Store" hash="601e0e93deb6716699f150ec9ea7dc3d"/></dir><file name="Brandnav.php" hash="71096c47b22ba420685045e5c4580d4c"/><file name="Carousel.php" hash="69c95867f1e532cdb577b77d6cd89677"/><dir name="Catalog"><dir name="Layer"><file name="Sale.php" hash="7a43c94423f16a8d6758a24404fd0a24"/></dir></dir><file name="Cmenu.php" hash="f0c491e8009de6d22d0f21ebd1dcf999"/><dir name="Config"><dir name="Adminhtml"><dir name="Form"><dir name="Field"><file name="Country.php" hash="7bdb06f3c47846b295c9c5b8390be5c0"/></dir></dir></dir><file name="GridShip.php" hash="343db9ded99cd6e2d67a89a0eb8d1810"/><file name="ShippingCosts.php" hash="7e55aa412029127635f5b251395bb38f"/></dir><dir name="Filter"><file name="Evidenzia.php" hash="3b6a782d014142c4345707100bfa8ad2"/><file name="List.php" hash="732ac69e6b867d6d35b5d0dd003cf8eb"/><file name="Productlist.php" hash="7523356517f8a94def399fa3abf67581"/><file name="Test.php" hash="40ff328fcf39817170b29eda8d8d53d7"/><file name="Toolbar.php" hash="22c12a7132e07f79d6db1015703aee49"/></dir><file name="Groupmenu.php" hash="5d5c67a93b236b645a0be45e12a6ce02"/><dir name="Layer"><dir name="Filter"><file name="Abstract.php" hash="26cfe0ba6bef1c56f76466edbefe1ce0"/><file name="Attribute.php" hash="9b02a223a683c7be185582d98b2a7612"/><file name="Category.php" hash="7f36055f41c1f01ff74df0c8abc47b8a"/><file name="Decimal.php" hash="8aaca18bd68307f5c455db66eca04317"/><file name="Price.php" hash="886d30496748bd6da910cf01761642fe"/></dir><file name="State.php" hash="918a1fb39494bc5cb236dbf9012b8f6f"/><file name="View.php" hash="2bff2c6d744a1338690d9c563082c3f4"/></dir><file name="Left.php" hash="8e38b2c49692a05743422c56148ac575"/><file name="List.php" hash="b6cbd80534ee40c77b6f5a7bd7bb0aa5"/><file name="Ourtab.php" hash="1d0e6a68a05a5172ae4b8f6eae65ea6e"/><file name="Prova.php" hash="ad87867a5f2e2dc582e60b4d05cbb059"/><file name="Scroll.php" hash="d2473171020587ddf724fcc5ded5bc38"/><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Dev.php" hash="48ce35a12fe61fd8b40a3e5482e533d3"/><file name="DevNames.php" hash="5dd9d86c0b6d697949be1977a9137491"/><file name="Devnames2.php" hash="3209cc8ebcf5715b214dad27ac520839"/><file name="Heading.php" hash="f9b1655c33d24a2276f23c80399c3bd0"/><file name="Headtitle.php" hash="3df8b7cec032a497188b7e763d6f1739"/><file name="Helpcode.php" hash="7cdb09596bfdd04c9bb01b9c91f51500"/><file name="Information.php" hash="1724efc14b721ec7755ef28a8afd9fec"/><file name="Notification.php" hash="ee76d2d03052d36f27d7540596c5be7c"/><file name="Responsive1024.php" hash="65a1bf2861b1c1e4ba2de071e60dcf49"/><file name="Responsive480.php" hash="55acd78909725cd8572edaeada27aa9f"/><file name="Responsive600.php" hash="9ed59d9a0f89ce9f7988b088e64d44d4"/><file name="Spacer.php" hash="02c1b66eefc449609746e47cc1e70456"/></dir><file name=".DS_Store" hash="b5c55df1f5f86e680b91d20ffc533359"/></dir><file name=".DS_Store" hash="5b30262920b43248209786529f61ea66"/></dir><file name=".DS_Store" hash="4f445c49400b0c304890c824c5eedeb0"/></dir><dir name="Widget"><file name="Carousel.php" hash="e959149df5ab23ca77c8de6674596ee6"/><file name="List.php" hash="7d94f0d8fc1f36e5e33fc1ba1030ffec"/><file name="Scroll.php" hash="ca252c5a78e987850de66505ace00a5e"/><file name="Wysiwyg.php" hash="1978bf8fb524e828ad92b1aebf3b54a8"/></dir><file name=".DS_Store" hash="250616bc99dd6d7535fd25a1d1628bc1"/></dir><dir name="Helper"><file name="Data.php" hash="51a15c3d0b843bd1cab6ea6a64cfb2bd"/><file name="Media.php" hash="eeb493b55999dbf6c8d661258375ed38"/><file name="Recaptcha.php" hash="816f767dbc312822ba72e5b1a89bf027"/><file name="Uploadhandler.php" hash="a241c0c3b6bf91380a7ad9b72442feb7"/><file name="uploadedfile.php" hash="b22c2be9142e3d59db8f0146547b5f56"/><file name=".DS_Store" hash="d9d2545c662d2e04bf08bd88a0c0b802"/></dir><dir name="Media"><file name="Uploader.php" hash="afaa97e70e0f65abc0097825ef0b3280"/></dir><dir name="Model"><file name="Button.php" hash="2e6828e4271d6a8a7e4b8e061cebc380"/><dir name="Catalog"><file name="Layer.php" hash="af44a5045b5d76b27fe909dcad0de8c4"/></dir><file name="Config.php" hash="6e4cf707b98cab82d6706487462f9965"/><file name="Filter.php" hash="5de5eac3a7ac6afc96c585d5cb66b9ee"/><file name="Filtergrid.php" hash="ed9e4ff04954f3fc33100685024c3035"/><file name="Filtergridtwo.php" hash="18650ce51f2c6c9e6f7fbb7324e829e1"/><file name="Group.php" hash="625440f860fb6a82dd1a1fa94e2b52fb"/><dir name="Mysql4"><dir name="Filter"><file name="Collection.php" hash="0803d1e2c4fa222817b9331bf4774093"/></dir><file name="Filter.php" hash="e891fbf70947d2ea13c1ccdbee920630"/><dir name="Group"><file name="Collection.php" hash="2ce9f7eb003186b1b190a59646b9e8d1"/></dir><file name="Group.php" hash="4b15f8041bc1bc6e943e81f08a995c82"/><file name=".DS_Store" hash="06fbdae9c241e5e5c84122b447b7bde9"/></dir><file name="Observer.php" hash="ce946a7f39183948761e7e015d1427ff"/><file name="Opt.php" hash="d365f211551017614e42ce33bbcca9aa"/><file name="Options.php" hash="fae68c7ce6a408417722338042616488"/><file name="Options2.php" hash="d51c8611a4a7fd8f9b51a5245914ec42"/><dir name="Resource"><dir name="Mysql4"><file name="Setup.php" hash="80e621d4fb11b8a8069281f07de57d0d"/></dir><file name=".DS_Store" hash="6e21205ac6b04cd952e0774d6d4d2688"/></dir><dir name="Source"><file name="Page.php" hash="1a3c5f188f317bc45b33ada4536aa767"/><file name="Template.php" hash="4a2f2ad9b8c54b74f9642e3b58c9751a"/><file name="Type.php" hash="6ef8e5f13deaef3fffe201bbf450a907"/></dir><dir name="System"><dir name="Config"><dir name="Backend"><dir name="Filter"><file name="Cache.php" hash="f76dd2e8b97f46fa6ad66675d3c1b556"/><file name="CheckInputCategory.php" hash="59e2f67223086d840ff06794ec507216"/><file name="CheckQty.php" hash="c0037f37d1f005c068e3b0921bc3d4fa"/><file name="Checkvalue.php" hash="104525325490a232ba6ad76b945ae6b8"/></dir><file name=".DS_Store" hash="74a9af459a27136c159a6624899687ba"/></dir><dir name="Source"><file name="Imagetypes.php" hash="dfce70a81edbe7dd420a2eaa4d0a9761"/><file name="ListBrand.php" hash="292d77c34ac0c544e0d2ce56a42f61ab"/><file name="ListCms.php" hash="f6c8ad0002bd46a6f3d9d21660bc345f"/><file name="ListComment.php" hash="cbd7611fed1ce182ff4c78d5fab7468c"/><file name="ListEvents.php" hash="04df2be5062cc04509671b101ac9e9d4"/><file name="ListGroup.php" hash="c837cf43a6c1c4648dee07ed92b239c5"/><file name="ListImagegroup.php" hash="0063b4737e0d1468e5e234fa547cad18"/><file name="ListLayouts.php" hash="ba4f439074030c67d3495052a38c33d7"/><file name="ListManufacturers.php" hash="c5ce0a5f5807f03b79b889fa4fb8a236"/><file name="ListMenu.php" hash="bb43ec8353e3760ac70448b12f538c72"/><file name="ListMenuStyles.php" hash="e025a3964a2cdf50465fb176c4b0d901"/><file name="ListOption.php" hash="01344eb9deb0078cf3ca6a3883db764f"/><file name="ListPosition.php" hash="fa1ecacb86d059fc2a5aeb95bc3e341e"/><file name="ListSourceType.php" hash="a246d0d2ea360fa74d116bf7b706ac82"/><file name="ListTheme.php" hash="ef39819ae597b31d7db34e7445e2e806"/><file name="Listcolumns.php" hash="8717cd93a5ee288bb60402d63a0aa9f1"/></dir><file name=".DS_Store" hash="8ab42f7c02de9cccc8b66f09dd507650"/></dir><file name=".DS_Store" hash="7d6aeb2aec48f9c01fcd9013d7d37a36"/></dir><file name=".DS_Store" hash="941c70bb9cff6c696234e3f1fe516a53"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="FilterController.php" hash="b635d081c44a1c60d920fd28beefb41c"/><file name="FiltergroupController.php" hash="027e2ddf1b572fe8580be933c253f869"/></dir><file name="FilterController.php" hash="8c5f512c9ee6648b91807b6ed04afb06"/><file name="FiltergroupController.php" hash="0f86d66781bf1894d810ced5b04b58e4"/></dir><dir name="etc"><file name="adminhtml.xml" hash="77b3954fa7ff4ecc4fa9110e2359d505"/><file name="config.xml" hash="0871bdb137021d11ac1762299a0eebf4"/><file name="system.xml" hash="beafb1c8d2fd1cd1672e6d6b7d80a021"/><file name="widget.xml" hash="6caeb54667fc4d38e28eb27884babbe7"/></dir><dir name="sql"><dir name="bumble_filter_setup"><file name="mysql4-install-1.1.0.php" hash="7a3874babc93cc9bba50efea065f56b4"/><file name="mysql4-upgrade-1.1.0-1.2.0.php" hash="22730eaf58ded0182581552ffb1ba161"/></dir><file name=".DS_Store" hash="1e52d0b7a3e2b0923ae902099c23e4c9"/></dir><file name=".DS_Store" hash="53dd274323a8b1a8cb51f6a93fca9268"/></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="bumble_filter"><file name="filter.phtml" hash="ec5ad226a232e013fd5592304f8737d4"/><file name="grid.phtml" hash="8007b4f236cc96f1c1194708ccbfccb6"/><file name="group.phtml" hash="8007b4f236cc96f1c1194708ccbfccb6"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="bumble_filter.xml" hash="1f859d84223fe057731eb3a179462e09"/></dir><dir name="template"><dir name="bumble"><dir name="filter"><dir name="block"><file name="brandnav.phtml" hash="d793e6d8d130ca307a622de92a6003f5"/><file name="carousel.phtml" hash="d1c6f7ab6f5e375b68bc1d7c51069e86"/><file name="icon.phtml" hash="e5a0a06ed7171c26958d37d9937a2be5"/><file name="scroll.phtml" hash="47e3ed77a5fca02f4c1ea07120569889"/></dir><file name="brand.phtml" hash="8a064fb15514a80daea1e4ea62310655"/><file name="brandprod.phtml" hash="81d647b3518980f2e52160465eb03dc0"/><file name="carousel.phtml" hash="f8813483ffc535b315fb5e342f72c467"/><file name="cmenu.phtml" hash="c422fb1e27593707e74d944c87837ae4"/><file name="default.phtml" hash="a9ff194c7c964d23c68e70f9d8865d24"/><file name="filter.phtml" hash="8a064fb15514a80daea1e4ea62310655"/><file name="grid.phtml" hash="7398f647d14e122d2100b74493d44bcf"/><file name="groupmenu.phtml" hash="5005e9e1b5e2a43ff53a6ea926037bf0"/><file name="left.phtml" hash="fb3c42adfd757b0dc7748c24ba935674"/><file name="list.phtml" hash="26a1d686fa35bc163e3726cdc1e8be44"/><file name="toolbar.phtml" hash="221219c1a0a45652be1afa21a4266166"/><file name=".DS_Store" hash="22c467996119401e94b50d9d1058e35c"/></dir></dir><dir name="page"><file name="custom.phtml" hash="a48624b2879810e91f19b248fa34df10"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="it_IT"><file name="Bumble_Filter.csv" hash="9b5a778cf2c76be3c0a479ba272242d3"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><dir name="bumble"><file name="bumble.png" hash="638ba2569ea8570baf43cbeb3fb23b85"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="bumble_filter"><dir name="fonts"><file name="slick.eot" hash="ced611daf7709cc778da928fec876475"/><file name="slick.svg" hash="f97e3bbf73254b0112091d0192f17aec"/><file name="slick.ttf" hash="d41f55a78e6f49a5512878df1737e58a"/><file name="slick.woff" hash="b7c9e1e479de3b53f1e4e30ebac2403a"/></dir><dir name="images"><file name="a03.png" hash="a32b0a342a7e39147f4141073e062d5a"/><file name="after_shadow.png" hash="ca18d430cbd7b5705047f61ebb821edc"/><file name="arrow-carousel.png" hash="c6c6e484a947c9a446f7e76c080b3119"/><file name="arrow_carousel.png" hash="c6c6e484a947c9a446f7e76c080b3119"/><file name="b03.png" hash="66ddc21fc1fad1a9fd04d042e7f442e8"/><file name="button-next.png" hash="60bffd387dd2f13d1f1caae4322b0316"/><file name="button-previous.png" hash="c4d3c21f083faddbb2634fc07c0708a1"/><file name="freccia.png" hash="951793b304239e66e7b02e0e0353b283"/><file name="loading.gif" hash="dd78ac008009bd821d2bf2da98108854"/><file name="menu_bg_li1.gif" hash="dcad8070b6a20bf9aabeaf5f10482d14"/><file name="menu_bg_li1.png" hash="def368fa8e493464dee1f0265fabd371"/><file name="menu_bg_li2.gif" hash="86567e3470983901c948411ded90ae60"/><file name="menu_bg_li2.png" hash="761745701e9e945093eb95dd8503cf2b"/><file name="menu_down.gif" hash="efa81c9993c25e98a629f0a3ec90eec3"/><file name="menu_down.png" hash="f53b59005c566922fbb2471e0d34e8d2"/><file name="menu_up.gif" hash="ec6021e66c4f7a44c3b096aead0906d4"/><file name="menu_up.png" hash="33ea837220e5a69c719b5013425e5d10"/><file name="next-prev.png" hash="7933c71dc9f68c476de5c6bd362c78e1"/></dir><file name="slick-theme.css" hash="dc5b8bb92e7a40914f395e40cad78430"/><file name="slick.css" hash="13b1b6672b8cfb0d9ae7f899f1c42875"/><file name="style.css" hash="81fb4071cb2d3107522b2d5ec46e0ac9"/><file name="widgetcarousel.css" hash="806cae5a89176fbe442b2513274ffa25"/></dir></dir></dir></dir></target><target name="mage"><dir name="js"><file name="bumble_filter" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir><dir name="."><file name="bumble_trasf.php" hash="94b5f480ee6a6b4833d2c77944961429"/></dir></target><target name="mageetc"><dir name="modules"><file name="Bumble_Filter.xml" hash="086f6ef8acbed1176d0d3ede282b075c"/></dir></target></contents>
24
+ <compatible/>
25
+ <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
26
+ </package>
skin/adminhtml/default/default/images/bumble/bumble.png ADDED
Binary file
skin/frontend/base/default/bumble_filter/fonts/slick.eot ADDED
Binary file
skin/frontend/base/default/bumble_filter/fonts/slick.svg ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3
+ <svg xmlns="http://www.w3.org/2000/svg">
4
+ <metadata>Generated by Fontastic.me</metadata>
5
+ <defs>
6
+ <font id="slick" horiz-adv-x="512">
7
+ <font-face font-family="slick" units-per-em="512" ascent="480" descent="-32"/>
8
+ <missing-glyph horiz-adv-x="512" />
9
+
10
+ <glyph unicode="&#8594;" d="M241 113l130 130c4 4 6 8 6 13 0 5-2 9-6 13l-130 130c-3 3-7 5-12 5-5 0-10-2-13-5l-29-30c-4-3-6-7-6-12 0-5 2-10 6-13l87-88-87-88c-4-3-6-8-6-13 0-5 2-9 6-12l29-30c3-3 8-5 13-5 5 0 9 2 12 5z m234 143c0-40-9-77-29-110-20-34-46-60-80-80-33-20-70-29-110-29-40 0-77 9-110 29-34 20-60 46-80 80-20 33-29 70-29 110 0 40 9 77 29 110 20 34 46 60 80 80 33 20 70 29 110 29 40 0 77-9 110-29 34-20 60-46 80-80 20-33 29-70 29-110z"/>
11
+ <glyph unicode="&#8592;" d="M296 113l29 30c4 3 6 7 6 12 0 5-2 10-6 13l-87 88 87 88c4 3 6 8 6 13 0 5-2 9-6 12l-29 30c-3 3-8 5-13 5-5 0-9-2-12-5l-130-130c-4-4-6-8-6-13 0-5 2-9 6-13l130-130c3-3 7-5 12-5 5 0 10 2 13 5z m179 143c0-40-9-77-29-110-20-34-46-60-80-80-33-20-70-29-110-29-40 0-77 9-110 29-34 20-60 46-80 80-20 33-29 70-29 110 0 40 9 77 29 110 20 34 46 60 80 80 33 20 70 29 110 29 40 0 77-9 110-29 34-20 60-46 80-80 20-33 29-70 29-110z"/>
12
+ <glyph unicode="&#8226;" d="M475 256c0-40-9-77-29-110-20-34-46-60-80-80-33-20-70-29-110-29-40 0-77 9-110 29-34 20-60 46-80 80-20 33-29 70-29 110 0 40 9 77 29 110 20 34 46 60 80 80 33 20 70 29 110 29 40 0 77-9 110-29 34-20 60-46 80-80 20-33 29-70 29-110z"/>
13
+ <glyph unicode="&#97;" d="M475 439l0-128c0-5-1-9-5-13-4-4-8-5-13-5l-128 0c-8 0-13 3-17 11-3 7-2 14 4 20l40 39c-28 26-62 39-100 39-20 0-39-4-57-11-18-8-33-18-46-32-14-13-24-28-32-46-7-18-11-37-11-57 0-20 4-39 11-57 8-18 18-33 32-46 13-14 28-24 46-32 18-7 37-11 57-11 23 0 44 5 64 15 20 9 38 23 51 42 2 1 4 3 7 3 3 0 5-1 7-3l39-39c2-2 3-3 3-6 0-2-1-4-2-6-21-25-46-45-76-59-29-14-60-20-93-20-30 0-58 5-85 17-27 12-51 27-70 47-20 19-35 43-47 70-12 27-17 55-17 85 0 30 5 58 17 85 12 27 27 51 47 70 19 20 43 35 70 47 27 12 55 17 85 17 28 0 55-5 81-15 26-11 50-26 70-45l37 37c6 6 12 7 20 4 8-4 11-9 11-17z"/>
14
+ </font></defs></svg>
skin/frontend/base/default/bumble_filter/fonts/slick.ttf ADDED
Binary file
skin/frontend/base/default/bumble_filter/fonts/slick.woff ADDED
Binary file
skin/frontend/base/default/bumble_filter/images/a03.png ADDED
Binary file
skin/frontend/base/default/bumble_filter/images/after_shadow.png ADDED
Binary file
skin/frontend/base/default/bumble_filter/images/arrow-carousel.png ADDED
Binary file
skin/frontend/base/default/bumble_filter/images/arrow_carousel.png ADDED
Binary file
skin/frontend/base/default/bumble_filter/images/b03.png ADDED
Binary file
skin/frontend/base/default/bumble_filter/images/button-next.png ADDED
Binary file
skin/frontend/base/default/bumble_filter/images/button-previous.png ADDED
Binary file
skin/frontend/base/default/bumble_filter/images/freccia.png ADDED
Binary file
skin/frontend/base/default/bumble_filter/images/loading.gif ADDED
Binary file
skin/frontend/base/default/bumble_filter/images/menu_bg_li1.gif ADDED
Binary file
skin/frontend/base/default/bumble_filter/images/menu_bg_li1.png ADDED
Binary file
skin/frontend/base/default/bumble_filter/images/menu_bg_li2.gif ADDED
Binary file
skin/frontend/base/default/bumble_filter/images/menu_bg_li2.png ADDED
Binary file
skin/frontend/base/default/bumble_filter/images/menu_down.gif ADDED
Binary file
skin/frontend/base/default/bumble_filter/images/menu_down.png ADDED
Binary file
skin/frontend/base/default/bumble_filter/images/menu_up.gif ADDED
Binary file
skin/frontend/base/default/bumble_filter/images/menu_up.png ADDED
Binary file
skin/frontend/base/default/bumble_filter/images/next-prev.png ADDED
Binary file
skin/frontend/base/default/bumble_filter/slick-theme.css ADDED
@@ -0,0 +1,204 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @charset 'UTF-8';
2
+ /* Slider */
3
+ .slick-loading .slick-list
4
+ {
5
+ background: #fff url('./ajax-loader.gif') center center no-repeat;
6
+ }
7
+
8
+ /* Icons */
9
+ @font-face
10
+ {
11
+ font-family: 'slick';
12
+ font-weight: normal;
13
+ font-style: normal;
14
+
15
+ src: url('./fonts/slick.eot');
16
+ src: url('./fonts/slick.eot?#iefix') format('embedded-opentype'), url('./fonts/slick.woff') format('woff'), url('./fonts/slick.ttf') format('truetype'), url('./fonts/slick.svg#slick') format('svg');
17
+ }
18
+ /* Arrows */
19
+ .slick-prev,
20
+ .slick-next
21
+ {
22
+ font-size: 0;
23
+ line-height: 0;
24
+
25
+ position: absolute;
26
+ top: 50%;
27
+
28
+ display: block;
29
+
30
+ width: 20px;
31
+ height: 20px;
32
+ padding: 0;
33
+ -webkit-transform: translate(0, -50%);
34
+ -ms-transform: translate(0, -50%);
35
+ transform: translate(0, -50%);
36
+
37
+ cursor: pointer;
38
+
39
+ color: transparent;
40
+ border: none;
41
+ outline: none;
42
+ background: transparent;
43
+ }
44
+ .slick-prev:hover,
45
+ .slick-prev:focus,
46
+ .slick-next:hover,
47
+ .slick-next:focus
48
+ {
49
+ color: transparent;
50
+ outline: none;
51
+ background: transparent;
52
+ }
53
+ .slick-prev:hover:before,
54
+ .slick-prev:focus:before,
55
+ .slick-next:hover:before,
56
+ .slick-next:focus:before
57
+ {
58
+ opacity: 1;
59
+ }
60
+ .slick-prev.slick-disabled:before,
61
+ .slick-next.slick-disabled:before
62
+ {
63
+ opacity: .25;
64
+ }
65
+
66
+ .slick-prev:before,
67
+ .slick-next:before
68
+ {
69
+ font-family: 'slick';
70
+ font-size: 20px;
71
+ line-height: 1;
72
+
73
+ opacity: .75;
74
+ color: grey;
75
+
76
+ -webkit-font-smoothing: antialiased;
77
+ -moz-osx-font-smoothing: grayscale;
78
+ }
79
+
80
+ .slick-prev
81
+ {
82
+ left: -25px;
83
+ }
84
+ [dir='rtl'] .slick-prev
85
+ {
86
+ right: -25px;
87
+ left: auto;
88
+ }
89
+ .slick-prev:before
90
+ {
91
+ content: '←';
92
+ }
93
+ [dir='rtl'] .slick-prev:before
94
+ {
95
+ content: '→';
96
+ }
97
+
98
+ .slick-next
99
+ {
100
+ right: -25px;
101
+ }
102
+ [dir='rtl'] .slick-next
103
+ {
104
+ right: auto;
105
+ left: -25px;
106
+ }
107
+ .slick-next:before
108
+ {
109
+ content: '→';
110
+ }
111
+ [dir='rtl'] .slick-next:before
112
+ {
113
+ content: '←';
114
+ }
115
+
116
+ /* Dots */
117
+ .slick-dotted.slick-slider
118
+ {
119
+ margin-bottom: 30px;
120
+ }
121
+
122
+ .slick-dots
123
+ {
124
+ position: absolute;
125
+ bottom: -25px;
126
+
127
+ display: block;
128
+
129
+ width: 100%;
130
+ padding: 0;
131
+ margin: 0;
132
+
133
+ list-style: none;
134
+
135
+ text-align: center;
136
+ }
137
+ .slick-dots li
138
+ {
139
+ position: relative;
140
+
141
+ display: inline-block;
142
+
143
+ width: 20px;
144
+ height: 20px;
145
+ margin: 0 5px;
146
+ padding: 0;
147
+
148
+ cursor: pointer;
149
+ }
150
+ .slick-dots li button
151
+ {
152
+ font-size: 0;
153
+ line-height: 0;
154
+
155
+ display: block;
156
+
157
+ width: 20px;
158
+ height: 20px;
159
+ padding: 5px;
160
+
161
+ cursor: pointer;
162
+
163
+ color: transparent;
164
+ border: 0;
165
+ outline: none;
166
+ background: transparent;
167
+ }
168
+ .slick-dots li button:hover,
169
+ .slick-dots li button:focus
170
+ {
171
+ outline: none;
172
+ }
173
+ .slick-dots li button:hover:before,
174
+ .slick-dots li button:focus:before
175
+ {
176
+ opacity: 1;
177
+ }
178
+ .slick-dots li button:before
179
+ {
180
+ font-family: 'slick';
181
+ font-size: 6px;
182
+ line-height: 20px;
183
+
184
+ position: absolute;
185
+ top: 0;
186
+ left: 0;
187
+
188
+ width: 20px;
189
+ height: 20px;
190
+
191
+ content: '•';
192
+ text-align: center;
193
+
194
+ opacity: .25;
195
+ color: black;
196
+
197
+ -webkit-font-smoothing: antialiased;
198
+ -moz-osx-font-smoothing: grayscale;
199
+ }
200
+ .slick-dots li.slick-active button:before
201
+ {
202
+ opacity: .75;
203
+ color: black;
204
+ }
skin/frontend/base/default/bumble_filter/slick.css ADDED
@@ -0,0 +1,117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Slider */
2
+ .slick-slider
3
+ {
4
+ position: relative;
5
+
6
+ display: block;
7
+ box-sizing: border-box;
8
+
9
+ -webkit-user-select: none;
10
+ -moz-user-select: none;
11
+ -ms-user-select: none;
12
+ user-select: none;
13
+
14
+ -webkit-touch-callout: none;
15
+ -khtml-user-select: none;
16
+ -ms-touch-action: pan-y;
17
+ touch-action: pan-y;
18
+ -webkit-tap-highlight-color: transparent;
19
+ }
20
+
21
+ .slick-list
22
+ {
23
+ position: relative;
24
+
25
+ display: block;
26
+ overflow: hidden;
27
+
28
+ margin: 0;
29
+ padding: 0;
30
+ }
31
+ .slick-list:focus
32
+ {
33
+ outline: none;
34
+ }
35
+ .slick-list.dragging
36
+ {
37
+ cursor: pointer;
38
+ cursor: hand;
39
+ }
40
+
41
+ .slick-slider .slick-track,
42
+ .slick-slider .slick-list
43
+ {
44
+ -webkit-transform: translate3d(0, 0, 0);
45
+ -moz-transform: translate3d(0, 0, 0);
46
+ -ms-transform: translate3d(0, 0, 0);
47
+ -o-transform: translate3d(0, 0, 0);
48
+ transform: translate3d(0, 0, 0);
49
+ }
50
+
51
+ .slick-track
52
+ {
53
+ position: relative;
54
+ top: 0;
55
+ left: 0;
56
+
57
+ display: block;
58
+ }
59
+ .slick-track:before,
60
+ .slick-track:after
61
+ {
62
+ display: table;
63
+
64
+ content: '';
65
+ }
66
+ .slick-track:after
67
+ {
68
+ clear: both;
69
+ }
70
+ .slick-loading .slick-track
71
+ {
72
+ visibility: hidden;
73
+ }
74
+
75
+ .slick-slide
76
+ {
77
+ display: none;
78
+ float: left;
79
+
80
+ height: 100%;
81
+ min-height: 1px;
82
+ }
83
+ [dir='rtl'] .slick-slide
84
+ {
85
+ float: right;
86
+ }
87
+ .slick-slide img
88
+ {
89
+ display: block;
90
+ }
91
+ .slick-slide.slick-loading img
92
+ {
93
+ display: none;
94
+ }
95
+ .slick-slide.dragging img
96
+ {
97
+ pointer-events: none;
98
+ }
99
+ .slick-initialized .slick-slide
100
+ {
101
+ display: block;
102
+ }
103
+ .slick-loading .slick-slide
104
+ {
105
+ visibility: hidden;
106
+ }
107
+ .slick-vertical .slick-slide
108
+ {
109
+ display: block;
110
+
111
+ height: auto;
112
+
113
+ border: 1px solid transparent;
114
+ }
115
+ .slick-arrow.slick-hidden {
116
+ display: none;
117
+ }
skin/frontend/base/default/bumble_filter/style.css ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .parent a{
2
+ color: #636363;
3
+ margin-left: 5px;
4
+ }
5
+ .parent a:hover {
6
+ text-decoration: none;
7
+ margin-left: 10px;
8
+ }
9
+ .bumble-filterlist-page .filter-logo {
10
+ float: none;
11
+ margin-bottom: 5px;
12
+ min-height: 80px;
13
+ display: block;
14
+ }
15
+
16
+ .bumble-filterlist-page .filter-title {
17
+ font-size: 15px;
18
+ font-weight: bold;
19
+ }
20
+ .filter-item {
21
+ text-align: center !important;
22
+ }
23
+
24
+ a.filter-logo img {
25
+ margin: 0 auto !important;
26
+ }
27
+ .bumble-filterlist-page li,.bumble-filterlist-page .filter-item{
28
+ min-height: 130px;
29
+ text-align: center;
30
+ background-color: white;
31
+ border: 1px solid #DDDDDD;
32
+ padding: 8px;
33
+ margin: 5px;
34
+ }
35
+ .bumble-pres h1{
36
+
37
+ }
38
+ .filter-description {
39
+ float: left;
40
+ }
41
+ .filter-product.bumbleclear {
42
+ position: relative;
43
+ top: 15px;
44
+ }
45
+ .bumbleclear {
46
+ clear: both;
47
+ }
48
+ .filter-image{
49
+ position: relative;
50
+ bottom: 20px;
51
+ float: right;
52
+ width: auto;
53
+ height: auto;
54
+ }
55
+ .filters-row {
56
+ float: left;
57
+ width: 100%;
58
+ }
59
+ .column {
60
+ float: left;
61
+ width: auto;
62
+ }
63
+ .bumble-filterlist-page .layout-grid li, .bumble-filterlist-page .layout-grid .filter-item{
64
+ float: left;
65
+ }
66
+ .bumble-filterlist-page .pager .pages {display: block; margin-left: 10px ;}
67
+
68
+ .bumble-filter-menu li {
69
+ border-top: 1px solid rgba(255, 255, 255, 0.1);
70
+ }
71
+ .bumble-filter-menu li:first-child {
72
+ border: medium none;
73
+ }
74
+ .filter-showmore{
75
+ text-align: center;
76
+ margin: 10px 0px;
77
+ }
78
+ .filter-submit{
79
+ text-align: right;
80
+ margin: 10px;
81
+ }
skin/frontend/base/default/bumble_filter/widgetcarousel.css ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* jssor slider bullet navigator skin 03 css */
2
+ /*
3
+ .jssorb03 div (normal)
4
+ .jssorb03 div:hover (normal mouseover)
5
+ .jssorb03 .av (active)
6
+ .jssorb03 .av:hover (active mouseover)
7
+ .jssorb03 .dn (mousedown)
8
+ */
9
+ .title-block {
10
+ margin: 0 auto;
11
+ text-align: center;
12
+ margin-bottom: 5px;
13
+ }
14
+ .shadow img {
15
+ margin: 0 auto;
16
+ margin-bottom: 5px;
17
+
18
+ }
19
+ .jssorb03 {
20
+ position: absolute;
21
+ }
22
+ .jssorb03 div, .jssorb03 div:hover, .jssorb03 .av {
23
+ position: absolute;
24
+ /* size of bullet elment */
25
+ width: 21px;
26
+ height: 21px;
27
+ text-align: center;
28
+ line-height: 21px;
29
+ color: black;
30
+ font-size: 12px;
31
+ background: url("/skin/frontend/base/default/bumble_filter/images/b03.png") no-repeat;
32
+ overflow: hidden;
33
+ cursor: pointer;
34
+ }
35
+ .jssorb03 div { background-position: -5px -4px; }
36
+ .jssorb03 div:hover, .jssorb03 .av:hover { background-position: -35px -4px; }
37
+ .jssorb03 .av { background-position: -65px -4px; }
38
+ .jssorb03 .dn, .jssorb03 .dn:hover { background-position: -95px -4px; }
39
+
40
+ /* jssor slider arrow navigator skin 03 css */
41
+ /*
42
+ .jssora03l (normal)
43
+ .jssora03r (normal)
44
+ .jssora03l:hover (normal mouseover)
45
+ .jssora03r:hover (normal mouseover)
46
+ .jssora03l.jssora03ldn (mousedown)
47
+ .jssora03r.jssora03rdn (mousedown)
48
+ */
49
+ .jssora03l, .jssora03r {
50
+ display: block;
51
+ position: absolute;
52
+ /* size of arrow element */
53
+ width: 55px;
54
+ height: 55px;
55
+ cursor: pointer;
56
+ background: url("/skin/frontend/base/default/bumble_filter/images/a03.png") no-repeat;
57
+ overflow: hidden;
58
+ }
59
+ .jssora03l { background-position: -3px -33px; }
60
+ .jssora03r { background-position: -63px -33px; }
61
+ .jssora03l:hover { background-position: -123px -33px; }
62
+ .jssora03r:hover { background-position: -183px -33px; }
63
+ .jssora03l.jssora03ldn { background-position: -243px -33px; }
64
+ .jssora03r.jssora03rdn { background-position: -303px -33px; }
65
+
66
+ .shadow{ display: none; }
67
+
68
+
69
+ img.logo-carousel {
70
+ width: 170px !important;
71
+ height: auto !important;
72
+ }
73
+
74
+ div#jssor_1 {
75
+ height: 84px !important;
76
+ }