Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

2.0.0.0-dev36

* Visual design editor refactored
  * VDE controls and VDE actions moved to backend area
  * Added IFRAME that allows to navigate through frontend pages in Navigation Mode and to modify blocks position in Design Mode
  * Inline JavaScript code is disabled in Design Mode
  * Store selection is performed on saving instead of reviewing the theme. List of all available stores is shown during assigning the theme to a store
  * `System -> Design -> Editor` page divided into two tabs:
    * "Available Themes" tab contains all available themes
    * "My Customizations" tab contains themes customized by the store administrator and consists of area with themes assigned to stores and area with unassigned themes
  * Added `vde` area code and `Mage_DesignEditor_Controller_Varien_Router_Standard` to handle requests from design editor
  * Added ability to use custom layout instance in controllers to use specific layout, when design editor is launched
* JavaScript updates
  * Replaced `varienTabs` class with an analogous jQuery widget
  * Displaying of loader during AJAX requests became optional
* Removed `dev/api-tests` directory added by mistake
* Bug fixes
  * Impossible to login to backend with APC enabled. Added call of `session_write_close()` in the session model destructor
  * Unnecessary regions shown when no country is selected in `System -> Sales -> Shipping Settings -> Origin`
  * Fixed various bugs caused by virtual themes implementation and other themes improvements
  • Loading branch information...
commit ca25f65c445ab07ffab38cad1d71d4232f3117d7 1 parent 51f9633
mage2-team mage2-team authored
Showing with 11,860 additions and 4,933 deletions.
  1. +28 −8 CHANGELOG.markdown
  2. +1 −19 app/Mage.php
  3. +1 −1  app/code/core/Mage/Adminhtml/Block/Catalog/Helper/Form/Wysiwyg.php
  4. +1 −1  app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/New/Product/Created.php
  5. +7 −7 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Attributes/Create.php
  6. +1 −1  app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Gallery.php
  7. +5 −2 app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit.php
  8. +12 −8 app/code/core/Mage/Adminhtml/Controller/Action.php
  9. +1 −1  app/code/core/Mage/Adminhtml/controllers/System/Config/System/StorageController.php
  10. +1 −1  app/code/core/Mage/Adminhtml/view/adminhtml/catalog.xml
  11. +2 −2 app/code/core/Mage/Adminhtml/view/adminhtml/catalog/category/edit.js
  12. +6 −4 app/code/core/Mage/Adminhtml/view/adminhtml/catalog/category/edit/form.phtml
  13. +9 −4 app/code/core/Mage/Adminhtml/view/adminhtml/catalog/category/tree.phtml
  14. +9 −15 app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product.js
  15. +0 −2  app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/change_attribute_set_widget.phtml
  16. +8 −10 app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit.phtml
  17. +14 −7 app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/js.phtml
  18. +109 −0 app/code/core/Mage/Adminhtml/view/adminhtml/css/ui-lightness/tabs.css
  19. +12 −12 app/code/core/Mage/Adminhtml/view/adminhtml/main.xml
  20. +14 −4 app/code/core/Mage/Adminhtml/view/adminhtml/widget/tabshoriz.phtml
  21. +3 −0  app/code/core/Mage/Backend/Block/Template.php
  22. +10 −11 app/code/core/Mage/Backend/Controller/ActionAbstract.php
  23. +15 −8 app/code/core/Mage/Backend/Controller/Router/Default.php
  24. +14 −5 app/code/core/Mage/Backend/Controller/System/ConfigAbstract.php
  25. +11 −6 app/code/core/Mage/Backend/controllers/Adminhtml/System/Config/SaveController.php
  26. +1 −1  app/code/core/Mage/Backend/view/adminhtml/admin/login.phtml
  27. +20 −10 app/code/core/Mage/Backend/view/adminhtml/system/config/js.phtml
  28. +17 −6 app/code/core/Mage/Backend/view/adminhtml/widget/tabs.phtml
  29. +3 −3 app/code/core/Mage/Checkout/Block/Links.php
  30. +13 −14 app/code/core/Mage/Cms/Controller/Router.php
  31. +1 −1  app/code/core/Mage/Contacts/view/frontend/layout.xml
  32. +11 −13 app/code/core/Mage/Core/Block/Abstract.php
  33. +21 −55 app/code/core/Mage/Core/Controller/Varien/Action.php
  34. +58 −0 app/code/core/Mage/Core/Controller/Varien/Action/Factory.php
  35. +1 −3 app/code/core/Mage/Core/Controller/Varien/Action/Forward.php
  36. +1 −2  app/code/core/Mage/Core/Controller/Varien/Action/Redirect.php
  37. +0 −73 app/code/core/Mage/Core/Controller/Varien/Action/RedirectAbstract.php
  38. +99 −0 app/code/core/Mage/Core/Controller/Varien/ActionAbstract.php
  39. +60 −18 app/code/core/Mage/Core/Controller/Varien/Front.php
  40. +14 −1 app/code/core/Mage/Core/Controller/Varien/Router/Abstract.php
  41. +45 −48 app/code/core/Mage/Core/Controller/Varien/Router/Base.php
  42. +4 −5 app/code/core/Mage/Core/Controller/Varien/Router/Default.php
  43. +62 −0 app/code/core/Mage/Core/Controller/Varien/Router/Factory.php
  44. +7 −19 app/code/core/Mage/Core/Model/App.php
  45. +209 −99 app/code/core/Mage/Core/Model/Config.php
  46. +0 −5 app/code/core/Mage/Core/Model/Design/Package.php
  47. +1 −1  app/code/core/Mage/Core/Model/Email/Template/Filter.php
  48. +1 −1  app/code/core/Mage/Core/Model/Event/Manager.php
  49. +2 −2 app/code/core/Mage/Core/Model/Layout.php
  50. +76 −0 app/code/core/Mage/Core/Model/Layout/Factory.php
  51. +18 −15 app/code/core/Mage/Core/Model/Resource/Config.php
  52. +10 −9 app/code/core/Mage/Core/Model/Resource/Setup.php
  53. +1 −1  app/code/core/Mage/Core/Model/Resource/Store.php
  54. +17 −1 app/code/core/Mage/Core/Model/Resource/Theme/Collection.php
  55. +2 −2 app/code/core/Mage/Core/Model/Resource/Website.php
  56. +8 −0 app/code/core/Mage/Core/Model/Session/Abstract.php
  57. +13 −5 app/code/core/Mage/Core/Model/Store/Group/Factory.php
  58. +79 −40 app/code/core/Mage/Core/Model/Theme.php
  59. +13 −11 app/code/core/Mage/Core/{Controller/Varien/Router/Standard.php → Model/Theme/Factory.php}
  60. +3 −3 app/code/core/Mage/Core/Model/Theme/Registration.php
  61. +303 −0 app/code/core/Mage/Core/Model/Theme/Service.php
  62. +10 −3 app/code/core/Mage/Core/Model/Url.php
  63. +55 −0 app/code/core/Mage/Core/Model/Url/RewriteFactory.php
  64. +13 −9 app/code/core/Mage/Core/Model/Website.php
  65. +4 −2 app/code/core/Mage/Core/etc/config.xml
  66. +2 −1  app/code/core/Mage/Customer/Block/Account/Link.php
  67. +6 −1 app/code/core/Mage/Customer/sql/customer_setup/upgrade-1.6.2.0.1-1.6.2.0.3.php
  68. +33 −26 app/code/core/Mage/DesignEditor/Block/Adminhtml/{Theme/List.php → Editor/Container.php}
  69. +81 −0 app/code/core/Mage/DesignEditor/Block/Adminhtml/Editor/Toolbar/BlockAbstract.php
  70. +135 −0 app/code/core/Mage/DesignEditor/Block/Adminhtml/Editor/Toolbar/Buttons.php
  71. +64 −19 app/code/core/Mage/DesignEditor/Block/{ → Adminhtml/Editor}/Toolbar/HandlesHierarchy.php
  72. +33 −0 app/code/core/Mage/DesignEditor/Block/Adminhtml/Editor/Toolbar/ViewOptions.php
  73. +0 −64 app/code/core/Mage/DesignEditor/Block/Adminhtml/Launcher/Form.php
  74. +94 −0 app/code/core/Mage/DesignEditor/Block/Adminhtml/Theme.php
  75. +0 −75 app/code/core/Mage/DesignEditor/Block/Adminhtml/Theme/Item.php
  76. +191 −0 app/code/core/Mage/DesignEditor/Block/Adminhtml/Theme/Selector/List/Abstract.php
  77. +55 −0 app/code/core/Mage/DesignEditor/Block/Adminhtml/Theme/Selector/List/Assigned.php
  78. +160 −0 app/code/core/Mage/DesignEditor/Block/Adminhtml/Theme/Selector/List/Available.php
  79. +88 −0 app/code/core/Mage/DesignEditor/Block/Adminhtml/Theme/Selector/List/Unassigned.php
  80. +232 −0 app/code/core/Mage/DesignEditor/Block/Adminhtml/Theme/Selector/StoreView.php
  81. +84 −0 app/code/core/Mage/DesignEditor/Block/Adminhtml/Theme/Selector/Tab/Available.php
  82. +32 −18 ...ode/core/Mage/DesignEditor/Block/{Toolbar/Theme.php → Adminhtml/Theme/Selector/Tab/Customizations.php}
  83. +10 −17 app/code/core/Mage/DesignEditor/Block/Adminhtml/{Launcher/Form/Container.php → Theme/Selector/Tabs.php}
  84. +63 −0 app/code/core/Mage/DesignEditor/Block/Page/Html/Head.php
  85. +14 −22 .../_files/_breadcrumbs_simple_product.php → app/code/core/Mage/DesignEditor/Block/Page/Html/Head/Vde.php
  86. +3 −6 app/code/core/Mage/DesignEditor/Block/Template.php
  87. +0 −84 app/code/core/Mage/DesignEditor/Block/Toolbar.php
  88. +0 −93 app/code/core/Mage/DesignEditor/Block/Toolbar/Breadcrumbs.php
  89. +185 −0 app/code/core/Mage/DesignEditor/Controller/Varien/Router/Standard.php
  90. +98 −0 app/code/core/Mage/DesignEditor/Helper/Data.php
  91. +6 −5 app/code/core/Mage/DesignEditor/{Exception.php → Model/Area.php}
  92. +255 −50 app/code/core/Mage/DesignEditor/Model/Layout.php
  93. +17 −149 app/code/core/Mage/DesignEditor/Model/Observer.php
  94. +0 −90 app/code/core/Mage/DesignEditor/Model/Session.php
  95. +169 −0 app/code/core/Mage/DesignEditor/Model/State.php
  96. +69 −0 app/code/core/Mage/DesignEditor/Model/Url/DesignMode.php
  97. +70 −0 app/code/core/Mage/DesignEditor/Model/Url/Factory.php
  98. +61 −0 app/code/core/Mage/DesignEditor/Model/Url/Handle.php
  99. +15 −15 app/code/core/Mage/DesignEditor/{Block/Toolbar/Buttons.php → Model/Url/NavigationMode.php}
  100. +244 −31 app/code/core/Mage/DesignEditor/controllers/Adminhtml/System/Design/EditorController.php
  101. +0 −218 app/code/core/Mage/DesignEditor/controllers/EditorController.php
  102. +116 −0 app/code/core/Mage/DesignEditor/controllers/PageController.php
  103. +58 −49 app/code/core/Mage/DesignEditor/etc/config.xml
  104. +394 −0 app/code/core/Mage/DesignEditor/view/adminhtml/css/styles.css
  105. +6 −8 app/code/core/Mage/DesignEditor/view/{frontend/page.phtml → adminhtml/editor.phtml}
  106. +5 −9 app/code/core/Mage/DesignEditor/view/{frontend/toolbar.phtml → adminhtml/editor/container.phtml}
  107. +8 −4 app/code/core/Mage/DesignEditor/view/{frontend/toolbar/row.phtml → adminhtml/editor/toolbar.phtml}
  108. +20 −10 app/code/core/Mage/DesignEditor/view/{frontend → adminhtml/editor}/toolbar/buttons.phtml
  109. +12 −9 app/code/core/Mage/DesignEditor/view/{frontend → adminhtml/editor}/toolbar/handles_hierarchy.phtml
  110. +8 −8 .../DesignEditor/view/{frontend/toolbar/highlighting.phtml → adminhtml/editor/toolbar/view_options.phtml}
  111. BIN  app/code/core/Mage/DesignEditor/view/adminhtml/images/arrow_down.png
  112. BIN  app/code/core/Mage/DesignEditor/view/adminhtml/images/arrow_up.png
  113. BIN  app/code/core/Mage/DesignEditor/view/adminhtml/images/block.png
  114. BIN  app/code/core/Mage/DesignEditor/view/adminhtml/images/button.png
  115. BIN  app/code/core/Mage/DesignEditor/view/adminhtml/images/button_hover.png
  116. BIN  app/code/core/Mage/DesignEditor/view/adminhtml/images/checked.png
  117. BIN  app/code/core/Mage/DesignEditor/view/adminhtml/images/container.png
  118. BIN  app/code/core/Mage/DesignEditor/view/adminhtml/images/container_hover.png
  119. BIN  app/code/core/Mage/DesignEditor/view/adminhtml/images/jstree_plus_minus.png
  120. BIN  app/code/core/Mage/DesignEditor/view/adminhtml/images/stub.png
  121. BIN  app/code/core/Mage/DesignEditor/view/adminhtml/images/theme-preview-back.png
  122. +11 −5 app/code/core/Mage/DesignEditor/view/{frontend → adminhtml}/js/base.js
  123. +222 −0 app/code/core/Mage/DesignEditor/view/adminhtml/js/design_editor.js
  124. +166 −0 app/code/core/Mage/DesignEditor/view/adminhtml/js/infinitescroll.js
  125. +222 −0 app/code/core/Mage/DesignEditor/view/adminhtml/js/theme-selector.js
  126. +67 −9 app/code/core/Mage/DesignEditor/view/adminhtml/layout.xml
  127. +18 −4 app/code/core/Mage/DesignEditor/view/adminhtml/theme.phtml
  128. +0 −56 app/code/core/Mage/DesignEditor/view/adminhtml/theme/list.phtml
  129. +54 −0 app/code/core/Mage/DesignEditor/view/adminhtml/theme/list/available.phtml
  130. +6 −1 ...ode/core/Mage/DesignEditor/view/{frontend/container.phtml → adminhtml/theme/list/available_ajax.phtml}
  131. +39 −0 app/code/core/Mage/DesignEditor/view/adminhtml/theme/list/customized.phtml
  132. +8 −8 app/code/core/Mage/DesignEditor/view/adminhtml/theme/{item.phtml → selector/firstEntrance.phtml}
  133. +41 −0 app/code/core/Mage/DesignEditor/view/adminhtml/theme/selector/myCustomizationsTab.phtml
  134. +79 −0 app/code/core/Mage/DesignEditor/view/adminhtml/theme/selector/storeview.phtml
  135. +49 −0 app/code/core/Mage/DesignEditor/view/adminhtml/theme_customizations.phtml
  136. +0 −7 app/code/core/Mage/DesignEditor/view/frontend/css/{styles.css → design.css}
  137. +17 −217 app/code/core/Mage/DesignEditor/view/frontend/js/design_editor.js
  138. +0 −77 app/code/core/Mage/DesignEditor/view/frontend/js/settimeout_override.js
  139. +19 −26 app/code/core/Mage/DesignEditor/view/frontend/layout.xml
  140. +0 −41 app/code/core/Mage/DesignEditor/view/frontend/toolbar/breadcrumbs.phtml
  141. +0 −46 app/code/core/Mage/DesignEditor/view/frontend/toolbar/theme.phtml
  142. +2 −9 app/code/core/Mage/DesignEditor/view/frontend/wrapping.phtml
  143. +1 −1  app/code/core/Mage/GiftMessage/Helper/Message.php
  144. +2 −7 app/code/core/Mage/Install/Controller/Action.php
  145. +1 −1  app/code/core/Mage/Oauth/view/adminhtml/layout.xml
  146. +12 −12 app/code/core/Mage/Page/Block/Template/Links.php
  147. +1 −0  app/code/core/Mage/Page/view/frontend/template/links.phtml
  148. +4 −4 app/code/core/Mage/PageCache/Model/Observer.php
  149. +6 −6 app/code/core/Mage/PageCache/etc/config.xml
  150. +1 −1  app/code/core/Mage/Paypal/Helper/Hss.php
  151. +1 −1  app/code/core/Mage/Persistent/Model/Persistent/Config.php
  152. +1 −1  app/code/core/Mage/Rss/view/frontend/layout.xml
  153. +24 −18 app/code/core/Mage/Theme/Block/Adminhtml/System/Design/Theme/Grid.php
  154. +5 −1 app/code/core/Mage/Theme/controllers/Adminhtml/System/Design/ThemeController.php
  155. +1 −1  app/code/core/Mage/User/view/adminhtml/admin/forgotpassword.phtml
  156. +1 −1  app/code/core/Mage/User/view/adminhtml/admin/resetforgottenpassword.phtml
  157. +1 −1  app/code/core/Mage/Webapi/Model/ConfigAbstract.php
  158. +9 −4 app/design/adminhtml/default/basic/boxes.css
  159. +1 −1  app/design/frontend/default/iphone/Mage_Contacts/layout.xml
  160. +1 −1  app/design/frontend/default/modern/Mage_Contacts/layout.xml
  161. +1 −1  app/design/frontend/default/modern/Mage_Rss/layout.xml
  162. +0 −68 dev/api-tests/integration/etc/local-mysql.xml.dist
  163. +1 −0  dev/build/publication/extruder/ce.txt
  164. +7 −46 dev/tests/integration/framework/Magento/Test/ObjectManager.php
  165. +37 −90 dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/ObjectManagerTest.php
  166. +3 −1 dev/tests/integration/testsuite/Mage/Adminhtml/Controller/ActionTest.php
  167. +3 −1 dev/tests/integration/testsuite/Mage/Backend/Block/System/Config/FormTest.php
  168. +4 −5 dev/tests/integration/testsuite/Mage/Backend/Controller/Router/DefaultTest.php
  169. +6 −7 dev/tests/integration/testsuite/Mage/Backend/Controller/Router/Validator/DefaultTest.php
  170. +4 −3 dev/tests/integration/testsuite/Mage/Backend/controllers/Adminhtml/AuthControllerTest.php
  171. +13 −2 dev/tests/integration/testsuite/Mage/Catalog/Helper/Product/ViewTest.php
  172. +8 −1 dev/tests/integration/testsuite/Mage/Catalog/Model/Layer/Filter/ItemTest.php
  173. +1 −0  dev/tests/integration/testsuite/Mage/Checkout/controllers/OnepageControllerTest.php
  174. +6 −3 dev/tests/integration/testsuite/Mage/Cms/Controller/RouterTest.php
  175. +8 −1 dev/tests/integration/testsuite/Mage/Cms/Helper/PageTest.php
  176. +3 −1 dev/tests/integration/testsuite/Mage/Core/Block/AbstractTest.php
  177. +16 −22 dev/tests/integration/testsuite/Mage/Core/Controller/Varien/ActionTest.php
  178. +45 −19 dev/tests/integration/testsuite/Mage/Core/Controller/Varien/FrontTest.php
  179. +3 −1 dev/tests/integration/testsuite/Mage/Core/Controller/Varien/Router/AbstractTest.php
  180. +3 −27 dev/tests/integration/testsuite/Mage/Core/Controller/Varien/Router/BaseTest.php
  181. +0 −7 dev/tests/integration/testsuite/Mage/Core/Model/AppTest.php
  182. +6 −3 dev/tests/integration/testsuite/Mage/Core/Model/Email/Template/FilterTest.php
  183. +3 −4 dev/tests/integration/testsuite/Mage/Core/Model/ObserverTest.php
  184. +1 −1  dev/tests/integration/testsuite/Mage/Core/Model/Resource/Theme/CollectionTest.php
  185. +90 −0 dev/tests/integration/testsuite/Mage/Core/Model/Theme/ServiceTest.php
  186. +20 −12 dev/tests/integration/testsuite/Mage/{DesignEditor/Block/TemplateTest.php → Core/_files/url_rewrite.php}
  187. +0 −119 dev/tests/integration/testsuite/Mage/DesignEditor/Block/Toolbar/BreadcrumbsTest.php
  188. +0 −86 dev/tests/integration/testsuite/Mage/DesignEditor/Block/Toolbar/HandlesHierarchyTest.php
  189. +0 −100 dev/tests/integration/testsuite/Mage/DesignEditor/Block/Toolbar/ThemeTest.php
  190. +0 −78 dev/tests/integration/testsuite/Mage/DesignEditor/Block/Toolbar/_files/_handles_hierarchy.html
  191. +0 −69 dev/tests/integration/testsuite/Mage/DesignEditor/Block/ToolbarCrosscuttingTest.php
  192. +0 −90 dev/tests/integration/testsuite/Mage/DesignEditor/Block/ToolbarTest.php
  193. +106 −0 dev/tests/integration/testsuite/Mage/DesignEditor/Model/LayoutTest.php
  194. +0 −323 dev/tests/integration/testsuite/Mage/DesignEditor/Model/ObserverTest.php
  195. +0 −137 dev/tests/integration/testsuite/Mage/DesignEditor/Model/SessionTest.php
  196. +22 −9 ...itor/{Block/Toolbar/_files/_breadcrumbs_simple_product.html → Model/_files/expected_layout_update.xml}
  197. +20 −16 ...ts/integration/testsuite/Mage/DesignEditor/{_files/observer_test.xml → Model/_files/layout_update.xml}
  198. +0 −51 dev/tests/integration/testsuite/Mage/DesignEditor/_files/design_editor_active.php
  199. +78 −83 dev/tests/integration/testsuite/Mage/DesignEditor/controllers/Adminhtml/System/Design/EditorControllerTest.php
  200. +0 −159 dev/tests/integration/testsuite/Mage/DesignEditor/controllers/EditorControllerTest.php
  201. +147 −0 dev/tests/integration/testsuite/Mage/DesignEditor/controllers/PageControllerTest.php
  202. +11 −12 ...suite/Mage/{DesignEditor/_files/design_editor_active_rollback.php → Install/Controller/ActionTest.php}
  203. +4 −4 dev/tests/integration/testsuite/Mage/PageCache/Model/ObserverTest.php
  204. +1 −1  dev/tests/integration/testsuite/Magento/DiTest.php
  205. +5 −2 dev/tests/js/jsTestDriver.php.dist
  206. +1 −1  dev/tests/js/testsuite/mage/button/button-test.js
  207. +8 −5 ...r/view/adminhtml/exit.phtml → dev/tests/js/testsuite/mage/design_editor/adminhtml/js/infinitescroll.js
  208. +2 −2 dev/tests/js/testsuite/mage/design_editor/checkbox-test.js
  209. +76 −0 dev/tests/js/testsuite/mage/design_editor/connector-test.js
  210. +5 −5 dev/tests/js/testsuite/mage/design_editor/container-test.js
  211. +1 −1  dev/tests/js/testsuite/mage/design_editor/history-test.js
  212. +1 −1  dev/tests/js/testsuite/mage/design_editor/history-toolbar-test.js
  213. +2 −2 dev/tests/js/testsuite/mage/design_editor/menu-test.js
  214. +9 −190 dev/tests/js/testsuite/mage/design_editor/page-test.js
  215. +92 −0 dev/tests/js/testsuite/mage/design_editor/page-test/highlight-test.js
  216. +37 −0 dev/tests/js/testsuite/mage/design_editor/page-test/init-panel-test.js
  217. +68 −0 dev/tests/js/testsuite/mage/design_editor/page-test/process-markers-test.js
  218. +89 −0 dev/tests/js/testsuite/mage/design_editor/page-test/unhighlight-test.js
  219. +1 −1  dev/tests/js/testsuite/mage/design_editor/panel-test.js
  220. +7 −6 dev/tests/js/testsuite/mage/design_editor/tree-test.js
  221. +6 −0 dev/tests/js/testsuite/mage/form/form-test.js
  222. +261 −0 dev/tests/js/testsuite/mage/tabs/tabs-test.js
  223. +3 −1 dev/tests/static/testsuite/Legacy/LayoutTest.php
  224. +1 −0  dev/tests/static/testsuite/Legacy/_files/obsolete_constants.php
  225. +7 −1 dev/tests/static/testsuite/Php/_files/whitelist/common.txt
  226. +18 −11 dev/tests/unit/testsuite/Mage/Adminhtml/DashboardControllerTest.php
  227. +12 −1 dev/tests/unit/testsuite/Mage/Backend/controllers/Adminhtml/System/Config/SaveControllerTest.php
  228. +73 −0 dev/tests/unit/testsuite/Mage/Core/Controller/Varien/Action/FactoryTest.php
  229. +11 −5 dev/tests/unit/testsuite/Mage/Core/Controller/Varien/Action/ForwardTest.php
  230. +11 −5 dev/tests/unit/testsuite/Mage/Core/Controller/Varien/Action/RedirectTest.php
  231. +92 −0 dev/tests/unit/testsuite/Mage/Core/Controller/Varien/ActionAbstractTest.php
  232. +95 −0 dev/tests/unit/testsuite/Mage/Core/Controller/Varien/Router/FactoryTest.php
  233. +64 −0 dev/tests/unit/testsuite/Mage/Core/Model/AppTest.php
  234. +172 −0 dev/tests/unit/testsuite/Mage/Core/Model/Layout/FactoryTest.php
  235. +218 −0 dev/tests/unit/testsuite/Mage/Core/Model/Theme/ServiceTest.php
  236. +13 −1 dev/tests/unit/testsuite/Mage/Core/Model/ThemeTest.php
  237. +58 −0 dev/tests/unit/testsuite/Mage/Core/Model/Url/RewriteFactoryTest.php
  238. +128 −0 dev/tests/unit/testsuite/Mage/DesignEditor/Block/Adminhtml/Editor/ContainerTest.php
  239. +73 −0 dev/tests/unit/testsuite/Mage/DesignEditor/Block/Adminhtml/Editor/Toolbar/BlockAbstractTest.php
  240. +108 −0 dev/tests/unit/testsuite/Mage/DesignEditor/Block/Adminhtml/Editor/Toolbar/ButtonsTest.php
  241. +223 −0 dev/tests/unit/testsuite/Mage/DesignEditor/Block/Adminhtml/Editor/Toolbar/HandlesHierarchyTest.php
  242. +101 −0 dev/tests/unit/testsuite/Mage/DesignEditor/Block/Adminhtml/Theme/Selector/List/AbstractTest.php
  243. +49 −0 dev/tests/unit/testsuite/Mage/DesignEditor/Block/Adminhtml/ThemeTest.php
  244. +38 −0 dev/tests/unit/testsuite/Mage/DesignEditor/Block/Page/Html/Head/VdeTest.php
  245. +112 −0 dev/tests/unit/testsuite/Mage/DesignEditor/Block/Page/Html/HeadTest.php
  246. +256 −0 dev/tests/unit/testsuite/Mage/DesignEditor/Controller/Varien/Router/StandardTest.php
  247. +140 −0 dev/tests/unit/testsuite/Mage/DesignEditor/Helper/DataTest.php
  248. +127 −1 dev/tests/unit/testsuite/Mage/DesignEditor/Model/LayoutTest.php
  249. +74 −0 dev/tests/unit/testsuite/Mage/DesignEditor/Model/ObserverTest.php
  250. +205 −0 dev/tests/unit/testsuite/Mage/DesignEditor/Model/StateTest.php
  251. +21 −17 ...signEditor/Block/Toolbar/ExitTest.php → unit/testsuite/Mage/DesignEditor/Model/Url/DesignModeTest.php}
  252. +69 −0 dev/tests/unit/testsuite/Mage/DesignEditor/Model/Url/FactoryTest.php
  253. +72 −0 dev/tests/unit/testsuite/Mage/DesignEditor/Model/Url/HandleTest.php
  254. +79 −0 dev/tests/unit/testsuite/Mage/DesignEditor/Model/Url/NavigationModeTest.php
  255. +163 −0 dev/tests/unit/testsuite/Mage/DesignEditor/controllers/Adminhtml/EditorControllerTest.php
  256. +3 −3 ...uite/Magento/Test/Di/InstanceManagerTest.php → unit/testsuite/Magento/Di/InstanceManager/ZendTest.php}
  257. +13 −11 dev/tests/unit/testsuite/Magento/{DiTest.php → Di/ZendTest.php}
  258. +172 −68 dev/tests/unit/testsuite/Magento/ObjectManager/ZendTest.php
  259. +1 −0  dev/tests/unit/testsuite/Magento/_files/empty_definition_file
  260. +6 −512 lib/Magento/Di.php
  261. +23 −0 lib/Magento/Di/DefinitionList/Zend.php
  262. +53 −0 lib/Magento/Di/InstanceManager.php
  263. +5 −3 ...ts/integration/framework/Magento/Test/Di/InstanceManager.php → lib/Magento/Di/InstanceManager/Zend.php
  264. +578 −0 lib/Magento/Di/Zend.php
  265. +45 −1 lib/Magento/ObjectManager.php
  266. +83 −15 lib/Magento/ObjectManager/Zend.php
  267. +85 −28 lib/Varien/File/Uploader.php
  268. +135 −84 lib/Varien/Io/File.php
  269. +6 −0 pub/lib/jquery/jquery-ui-1.9.2.custom.min.js
  270. +198 −0 pub/lib/jquery/jquery.iframe-auto-height.plugin.1.9.0.js
  271. 0  pub/lib/mage/adminhtml/{loader.js → varienLoader.js}
  272. +24 −7 pub/lib/mage/backend/bootstrap.js
  273. +31 −2 pub/lib/mage/backend/form.js
  274. +5 −3 pub/lib/mage/backend/notification.js
  275. +289 −0 pub/lib/mage/backend/tabs.js
  276. +4 −3 pub/lib/mage/backend/validation.js
  277. +2 −1  pub/lib/mage/loader.js
  278. +2 −1  pub/lib/mage/translate-inline.js
36 CHANGELOG.markdown
View
@@ -1,3 +1,24 @@
+2.0.0.0-dev36
+=============
+* Visual design editor refactored
+ * VDE controls and VDE actions moved to backend area
+ * Added IFRAME that allows to navigate through frontend pages in Navigation Mode and to modify blocks position in Design Mode
+ * Inline JavaScript code is disabled in Design Mode
+ * Store selection is performed on saving instead of reviewing the theme. List of all available stores is shown during assigning the theme to a store
+ * `System -> Design -> Editor` page divided into two tabs:
+ * "Available Themes" tab contains all available themes
+ * "My Customizations" tab contains themes customized by the store administrator and consists of area with themes assigned to stores and area with unassigned themes
+ * Added `vde` area code and `Mage_DesignEditor_Controller_Varien_Router_Standard` to handle requests from design editor
+ * Added ability to use custom layout instance in controllers to use specific layout, when design editor is launched
+* JavaScript updates
+ * Replaced `varienTabs` class with an analogous jQuery widget
+ * Displaying of loader during AJAX requests became optional
+* Removed `dev/api-tests` directory added by mistake
+* Bug fixes
+ * Impossible to login to backend with APC enabled. Added call of `session_write_close()` in the session model destructor
+ * Unnecessary regions shown when no country is selected in `System -> Sales -> Shipping Settings -> Origin`
+ * Fixed various bugs caused by virtual themes implementation and other themes improvements
+
2.0.0.0-dev35
=============
* Enhancements of System Configuration:
@@ -206,11 +227,10 @@
2.0.0.0-dev29
=============
-* Added scripts that allow upgrading database from CE 1.7 (EE 1.12) to 2.x
+* Implemented and verified ability to upgrade DB from CE 1.7 (EE 1.12) to 2.x
* Replaced calendar UI component with jQuery calendar
-* Removed store scope selector from backend customers management
-* Renamed `pub/js` (was known as `js` in Magento 1.x) into `pub/lib`
* Restored back the public access to `pub/cron.php` entry point (in the previous patch it was denied by mistake)
+* Fixed typo in label of "Catalog Search" index in UI
2.0.0.0-dev28
=============
@@ -658,7 +678,7 @@
=============
* Implemented a tool for migrating factory table names from 1.x to 2.x. The tool replaces table names by list of names associations
* Changed Unit tests suite running from usage AllTests.php in each directory to configuration in phpunit.xml.dist. Now all tests in `testsuite` directory are launched, there is no necessity to add new tests to the config
-* Implemented in Visual Desig Editor:
+* Implemented in Visual Design Editor:
* Containers highlighting
* Dropping of elements
* Fixed some issues:
@@ -732,10 +752,10 @@
2.0.0.0-dev02
=============
Deprecated code & minor fixes update:
-* eliminated remnants of `htmlescape` implementation
-* eliminated usage of `pub/js/index.php` entry point (used to be `js/index.php`)
-* disbanded the shell root directory: moved scripts into `dev/shell` and classes into app
-* minor refactoring of data fixtures rollback capability in integration testing framework
+* Eliminated remnants of `htmlescape` implementation
+* Eliminated usage of `pub/js/index.php` entry point (used to be `js/index.php`)
+* Disbanded the shell root directory: moved scripts into `dev/shell` and classes into app
+* Minor refactoring of data fixtures rollback capability in integration testing framework
2.0.0.0-dev01
=============
20 app/Mage.php
View
@@ -170,7 +170,7 @@ public static function getVersionInfo()
'revision' => '0',
'patch' => '0',
'stability' => 'dev',
- 'number' => '35',
+ 'number' => '36',
);
}
@@ -564,24 +564,6 @@ public static function getResourceSingleton($modelClass = '', array $arguments =
}
/**
- * Retrieve Controller instance by ClassName
- *
- * @param string $class
- * @param Mage_Core_Controller_Request_Http $request
- * @param Mage_Core_Controller_Response_Http $response
- * @param array $invokeArgs
- * @return Mage_Core_Controller_Front_Action
- */
- public static function getControllerInstance($class, $request, $response, array $invokeArgs = array())
- {
- return self::getObjectManager()->create($class, array(
- 'request' => $request,
- 'response' => $response,
- 'invokeArgs' => $invokeArgs
- ));
- }
-
- /**
* Returns block singleton instance, if current action exists. Otherwise returns FALSE.
*
* @param string $className
2  app/code/core/Mage/Adminhtml/Block/Catalog/Helper/Form/Wysiwyg.php
View
@@ -43,7 +43,7 @@ public function getAfterElementHtml()
$html = parent::getAfterElementHtml();
if ($this->getIsWysiwygEnabled()) {
$disabled = ($this->getDisabled() || $this->getReadonly());
- $html .= Mage::getSingleton('Mage_Core_Model_Layout')
+ $html .= Mage::app()->getLayout()
->createBlock('Mage_Adminhtml_Block_Widget_Button', '', array(
'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('WYSIWYG Editor'),
'type' => 'button',
2  app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/New/Product/Created.php
View
@@ -92,7 +92,7 @@ public function getCloseButtonHtml()
public function getAttributesBlockJson()
{
$result = array(
- $this->getRequest()->getParam('tab') => $this->getChildHtml('attributes')
+ $this->getRequest()->getParam('product_tab') => $this->getChildHtml('attributes')
);
$newAttributeSetId = $this->getRequest()->getParam('new_attribute_set_id');
if ($newAttributeSetId) {
14 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Attributes/Create.php
View
@@ -66,13 +66,13 @@ protected function _beforeToHtml()
->setUrl($this->getUrl(
'*/catalog_product_attribute/new',
array(
- 'group' => $this->getConfig()->getGroupId(),
- 'tab' => $this->getConfig()->getTabId(),
- 'store' => $this->getConfig()->getStoreId(),
- 'product' => $this->getConfig()->getProductId(),
- 'set' => $this->getConfig()->getAttributeSetId(),
- 'type' => $this->getConfig()->getTypeId(),
- 'popup' => 1
+ 'group' => $this->getConfig()->getGroupId(),
+ 'product_tab' => $this->getConfig()->getTabId(),
+ 'store' => $this->getConfig()->getStoreId(),
+ 'product' => $this->getConfig()->getProductId(),
+ 'set' => $this->getConfig()->getAttributeSetId(),
+ 'type' => $this->getConfig()->getTypeId(),
+ 'popup' => 1
)
));
2  app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Gallery.php
View
@@ -50,7 +50,7 @@ public function getContentHtml()
{
/* @var $content Mage_Adminhtml_Block_Catalog_Product_Helper_Form_Gallery_Content */
- $content = Mage::getSingleton('Mage_Core_Model_Layout')
+ $content = Mage::app()->getLayout()
->createBlock('Mage_Adminhtml_Block_Catalog_Product_Helper_Form_Gallery_Content');
$content->setId($this->getHtmlId() . '_content')->setElement($this);
7 app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit.php
View
@@ -130,8 +130,11 @@ function toggleEditor() {
tinyMCE.execCommand('mceRemoveControl', false, 'page_content');
}
}
- " . $tabsBlockJsObject . ".tabsBlockPrefix = '" . $tabsBlockPrefix . "';
- " . $tabsBlockJsObject . ".tabIdArgument = 'active_tab';
+ jQuery(function() {
+ jQuery(\"#" . $tabsBlock->getId() ."\")
+ .tabs('option', 'tabsBlockPrefix', '" . $tabsBlockPrefix . "')
+ .tabs('option', 'tabIdArgument', 'active_tab');
+ });
";
return parent::_prepareLayout();
}
20 app/code/core/Mage/Adminhtml/Controller/Action.php
View
@@ -29,7 +29,6 @@
*/
class Mage_Adminhtml_Controller_Action extends Mage_Backend_Controller_ActionAbstract
{
-
/**
* Used module name in current adminhtml controller
*/
@@ -48,21 +47,26 @@ class Mage_Adminhtml_Controller_Action extends Mage_Backend_Controller_ActionAbs
protected $_translator;
/**
- * Constructor
- *
- * @param Zend_Controller_Request_Abstract $request
- * @param Zend_Controller_Response_Abstract $response
+ * @param Mage_Core_Controller_Request_Http $request
+ * @param Mage_Core_Controller_Response_Http $response
+ * @param string $areaCode
* @param Magento_ObjectManager $objectManager
* @param Mage_Core_Controller_Varien_Front $frontController
+ * @param Mage_Core_Model_Layout_Factory $layoutFactory
* @param array $invokeArgs
*/
- public function __construct(Zend_Controller_Request_Abstract $request,
- Zend_Controller_Response_Abstract $response,
+ public function __construct(
+ Mage_Core_Controller_Request_Http $request,
+ Mage_Core_Controller_Response_Http $response,
+ $areaCode = null,
Magento_ObjectManager $objectManager,
Mage_Core_Controller_Varien_Front $frontController,
+ Mage_Core_Model_Layout_Factory $layoutFactory,
array $invokeArgs = array()
) {
- parent::__construct($request, $response, $objectManager, $frontController, $invokeArgs);
+ parent::__construct($request, $response, $areaCode, $objectManager, $frontController, $layoutFactory,
+ $invokeArgs
+ );
$this->_translator = isset($invokeArgs['translator']) ? $invokeArgs['translator'] : $this->_getTranslator();
}
2  app/code/core/Mage/Adminhtml/controllers/System/Config/System/StorageController.php
View
@@ -155,7 +155,7 @@ public function statusAction()
$state = Mage_Core_Model_File_Storage_Flag::STATE_NOTIFIED;
case Mage_Core_Model_File_Storage_Flag::STATE_NOTIFIED:
- $block = Mage::getSingleton('Mage_Core_Model_Layout')
+ $block = Mage::app()->getLayout()
->createBlock('Mage_Adminhtml_Block_Notification_Toolbar')
->setTemplate('notification/toolbar.phtml');
$result['html'] = $block->toHtml();
2  app/code/core/Mage/Adminhtml/view/adminhtml/catalog.xml
View
@@ -44,6 +44,7 @@
<update handle="editor"/>
<reference name="head">
<action method="addCss"><file>Mage_Adminhtml::css/ui-lightness/jquery-ui-1.8.21.custom.css</file></action>
+ <action method="addCss"><file>Mage_Adminhtml::css/ui-lightness/tabs.css</file></action>
<action method="addCss"><file>Mage_Adminhtml::jquery/fileUploader/css/jquery.fileupload-ui.css</file></action>
<action method="addJs"><file>Mage_Adminhtml::jquery/fileUploader/jquery.iframe-transport.js</file></action>
<action method="addJs"><file>Mage_Adminhtml::jquery/fileUploader/jquery.fileupload.js</file></action>
@@ -79,7 +80,6 @@
<adminhtml_catalog_product_edit>
<update handle="editor"/>
<reference name="head">
- <action method="addCss"><file>Mage_Adminhtml::css/ui-lightness/jquery-ui-1.8.21.custom.css</file></action>
<action method="addCss"><file>Mage_Adminhtml::jquery/fileUploader/css/jquery.fileupload-ui.css</file></action>
<action method="addJs"><file>Mage_Adminhtml::jquery/fileUploader/jquery.iframe-transport.js</file></action>
<action method="addJs"><file>Mage_Adminhtml::jquery/fileUploader/jquery.fileupload.js</file></action>
4 app/code/core/Mage/Adminhtml/view/adminhtml/catalog/category/edit.js
View
@@ -80,8 +80,8 @@
function categorySubmit(url, useAjax) {
var activeTab = $('active_tab_id');
if (activeTab) {
- if (activeTab.tabsJsObject && activeTab.tabsJsObject.activeTab) {
- activeTab.value = activeTab.tabsJsObject.activeTab.id;
+ if (activeTab.tabsJsObject && activeTab.tabsJsObject.tabs('activeAnchor')) {
+ activeTab.value = activeTab.tabsJsObject.tabs('activeAnchor').prop('id');
}
}
10 app/code/core/Mage/Adminhtml/view/adminhtml/catalog/category/edit/form.phtml
View
@@ -123,11 +123,13 @@
<?php endif; ?>
<?php if($this->isAjax() && ($block = $this->getLayout()->getBlock('tabs')) && ($_tabsJsObject=$block->getJsObjectName())): ?>
- <?php echo $_tabsJsObject ?>.moveTabContentInDest();
- if (<?php echo $_tabsJsObject ?>.activeTab) {
- $('active_tab_id').value = <?php echo $_tabsJsObject ?>.activeTab.id;
+ // Temporary solution, will be replaced after refactoring of manage category functionality
+ <?php $tabsBlock = $this->getLayout()->getBlock('tabs'); ?>
+ var activeAnchor = jQuery('#<?php echo $tabsBlock->getId() ?>').tabs('activeAnchor');
+ if (activeAnchor.length) {
+ $('active_tab_id').value = activeAnchor.prop('id');
}
- $('active_tab_id').tabsJsObject = <?php echo $_tabsJsObject ?>;
+ $('active_tab_id').tabsJsObject = jQuery('#<?php echo $tabsBlock->getId() ?>');
<?php endif; ?>
//]]>
</script>
13 app/code/core/Mage/Adminhtml/view/adminhtml/catalog/category/tree.phtml
View
@@ -104,13 +104,18 @@ Ext.extend(Ext.tree.TreePanel.Enhanced, Ext.tree.TreePanel, {
this.currentNodeId = parameters['category_id'];
}
this.selectCurrentNode();
+
+ // Temporary solution will be replaced after refactoring of tree functionality
+ jQuery('body').off('tabsactivate.tree').on('tabsactivate.tree', jQuery.proxy(function(e, ui){
+ this.activeTab = jQuery(ui.newTab).find('a').prop('id');
+ }, this))
},
request : function(url, params)
{
if (!params) {
- if (category_info_tabsJsTabs.activeTab) {
- var params = {active_tab_id:category_info_tabsJsTabs.activeTab.id};
+ if (this.activeTab) {
+ var params = {active_tab_id:this.activeTab};
}
else {
var params = {};
@@ -180,8 +185,8 @@ Ext.extend(Ext.tree.TreePanel.Enhanced, Ext.tree.TreePanel, {
setLocation(url);
return;
}
- if (category_info_tabsJsTabs.activeTab) {
- var params = {active_tab_id:category_info_tabsJsTabs.activeTab.id};
+ if (this.activeTab) {
+ var params = {active_tab_id:this.activeTab};
}
updateContent(url, params);
}
24 app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product.js
View
@@ -53,10 +53,11 @@ Product.Gallery.prototype = {
'(^|.|\\r|\\n)(__([a-zA-Z0-9_]+)__)', ''));
this.fixParentTable();
this.updateImages();
- varienGlobalEvents.attachEventHandler('moveTab', this.onImageTabMove
- .bind(this));
+ jQuery('#' + this.containerId)
+ .closest('.ui-tabs-panel')
+ .on('move.tabs', jQuery.proxy(this.onImageTabMove, this));
},
- onImageTabMove : function(event) {
+ onImageTabMove : function(event, tab) {
var imagesTab = false;
this.container.ancestors().each( function(parentItem) {
if (parentItem.tabObject) {
@@ -65,7 +66,7 @@ Product.Gallery.prototype = {
}
}.bind(this));
- if (imagesTab && event.tab && event.tab.name && imagesTab.name == event.tab.name) {
+ if (imagesTab && tab && tab.name && imagesTab.name === tab.name) {
this.container.select('input[type="radio"]').each(function(radio) {
radio.observe('change', this.onChangeRadio);
}.bind(this));
@@ -270,18 +271,10 @@ Product.AttributesBridge = {
getAttributes : function(tabId) {
return this.bindTabs2Attributes[tabId];
},
- setTabsObject : function(tabs) {
- this.tabsObject = tabs;
- },
- getTabsObject : function() {
- return this.tabsObject;
- },
addAttributeRow : function(data) {
- $H(data).each( function(item) {
- if (this.getTabsObject().activeTab.name != item.key) {
- this.getTabsObject().showTabContent($(item.key));
- }
- this.getAttributes(item.key).addRow(item.value);
+ $H(data).each(function(item) {
+ var element = this.getAttributes(item.key).addRow(item.value);
+ jQuery(element).trigger('focus');
}.bind(this));
}
};
@@ -318,6 +311,7 @@ Product.Attributes.prototype = {
window.scrollTo(0, Position.cumulativeOffset(element)[1]
+ element.offsetHeight);
}
+ return element;
}
};
2  app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/change_attribute_set_widget.phtml
View
@@ -27,7 +27,6 @@
?>
<script type="text/javascript">//<[CDATA[
(function($) {
- 'use strict';
$(function() {
$('#product-edit-form').bind('product:changeAttributeSet', function(event, attributeSetId) {
if ($('.tab-item-link.ajax.changed').length > 0
@@ -41,7 +40,6 @@
uri += 'set=' + window.encodeURIComponent(attributeSetId);
$form.attr('action', uri).addClass('ignore-validate').submit();
});
-
$('#attribute-set-info').dialog({
title: '<?php echo Mage::helper('Mage_Catalog_Helper_Data')->__('Select Attribute Set'); ?>',
autoOpen: false,
18 app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit.phtml
View
@@ -92,17 +92,15 @@
}
jQuery(function() {
- var objName = '<?php echo $this->getSelectedTabId() ?>';
- if (objName) {
- obj = $(objName);
- //IE fix (bubbling event model)
- product_info_tabsJsTabs.setSkipDisplayFirstTab();
- product_info_tabsJsTabs.showTabContent(obj);
+ <?php if ($this->getSelectedTabId()): ?>
+ if(jQuery('#<?php echo $this->getSelectedTabId() ?>').length) {
+ jQuery('#<?php echo $this->getSelectedTabId() ?>').trigger('click');
}
- Product.AttributesBridge.setTabsObject(product_info_tabsJsTabs);
- window.varienGlobalEvents.attachEventHandler('tabChangeBefore', function(data) {
- jQuery('#config_super_product')[data.first ? 'show' : 'hide']();
- });
+ <?php endif; ?>
+ jQuery(window).on('tabsbeforeactivate', function(e, ui){
+ jQuery('#config_super_product')[ui.newTab.index() ? 'hide' : 'show']();
+ }).triggerHandler('tabsbeforeactivate', [{newTab: jQuery('#<?php echo $this->getSelectedTabId() ?>').closest('li')}]);
+
(function ($) {
var masks = <?php echo $this->helper('Mage_Core_Helper_Data')->jsonEncode($this->getFieldsAutogenerationMasks())?>;
21 app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/js.phtml
View
@@ -77,18 +77,25 @@ function recalculateTax()
}
// Bind tab changes
-function bindActiveProductTab(event) {
- if(event.tab && event.tab.name && $('store_switcher')){
- $('store_switcher').switchParams = 'active_tab/'+event.tab.name+'/';
+function bindActiveProductTab(event, ui) {
+ var anchor = jQuery(ui.newTab).find('a');
+ if (anchor && anchor.name && $('store_switcher')) {
+ $('store_switcher').switchParams = 'active_tab/'+anchor.name+'/';
}
}
-varienGlobalEvents.attachEventHandler('showTab', bindActiveProductTab);
+//varienGlobalEvents.attachEventHandler('showTab', bindActiveProductTab);
+jQuery(document).on('tabsactivate', bindActiveProductTab);
// bind active tab
<?php if($tabsBlock = $this->getLayout()->getBlock('product_tabs')): ?>
-if(<?php echo $tabsBlock->getJsObjectName() ?> && <?php echo $tabsBlock->getJsObjectName() ?>.activeTab && $('store_switcher')){
- $('store_switcher').switchParams = 'active_tab/'+<?php echo $tabsBlock->getJsObjectName() ?>.activeTab.name+'/';
-}
+jQuery(document).ready(function(){
+ if (jQuery('#<?php echo $tabsBlock->getId() ?>').length && jQuery('#<?php echo $tabsBlock->getId() ?>').is(':mage-tabs')) {
+ var activeAnchor = jQuery('#<?php echo $tabsBlock->getId() ?>').tabs('activeAnchor');
+ if (activeAnchor && $('store_switcher')) {
+ $('store_switcher').switchParams = 'active_tab/' + activeAnchor.prop('name') + '/';
+ }
+ }
+});
<?php endif; ?>
//]]>
</script>
109 app/code/core/Mage/Adminhtml/view/adminhtml/css/ui-lightness/tabs.css
View
@@ -0,0 +1,109 @@
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Academic Free License (AFL 3.0)
+ * that is bundled with this package in the file LICENSE_AFL.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/afl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @category design
+ * @package base_default
+ * @copyright Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
+ */
+/* TABS
+*******************************************************************************/
+
+/* Vertical Tabs */
+
+.ui-tabs.ui-corner-all, .tabs.ui-corner-all {
+ -moz-border-radius-topleft: 0px;
+ -webkit-border-top-left-radius: 0px;
+ -khtml-border-top-left-radius: 0px;
+ border-top-left-radius: 0px;
+}
+
+.ui-tabs.ui-corner-all, .tabs.ui-corner-all {
+ -moz-border-radius-topright: 0px;
+ -webkit-border-top-right-radius: 0px;
+ -khtml-border-top-right-radius: 0px;
+ border-top-right-radius: 0px;
+}
+
+.ui-tabs.ui-corner-all, .tabs.ui-corner-all {
+ -moz-border-radius-bottomleft: 0px;
+ -webkit-border-bottom-left-radius: 0px;
+ -khtml-border-bottom-left-radius: 0px;
+ border-bottom-left-radius: 0px;
+}
+
+.ui-tabs.ui-corner-all, .tabs.ui-corner-all {
+ -moz-border-radius-bottomright: 0px;
+ -webkit-border-bottom-right-radius: 0px;
+ -khtml-border-bottom-right-radius: 0px;
+ border-bottom-right-radius: 0px;
+}
+
+.tabs.ui-widget-header {
+ border: none !important;
+}
+.tabs li {
+ -moz-border-radius-topleft: 0px;
+ -webkit-border-top-left-radius: 0px;
+ -khtml-border-top-left-radius: 0px;
+ border-top-left-radius: 0px;
+ -moz-border-radius-topright: 0px;
+ -webkit-border-top-right-radius: 0px;
+ -khtml-border-top-right-radius: 0px;
+ border-top-right-radius: 0px;
+ border: none !important;
+}
+.ui-tabs.ui-widget-content {
+ border-left: none;
+ border-right: none;
+ border-bottom: none;
+}
+.ui-tabs {
+ padding: 0;
+}
+
+.ui-tabs .ui-tabs-nav {
+ padding: 0;
+}
+
+.ui-tabs .ui-tabs-nav li {
+ float: none;
+ top: 0;
+ margin: 0;
+}
+
+.ui-tabs .ui-tabs-nav li a {
+ float: none;
+ padding: 0;
+}
+
+.ui-tabs .ui-tabs-nav li.ui-tabs-selected {
+ margin-bottom: 0;
+ padding-bottom: 0;
+}
+
+.ui-tabs .ui-tabs-panel {
+ padding: 0;
+}
+
+.ui-tabs {
+ border-top:1px solid #bebebe;
+ background-color:#e7efef;
+ padding: 0;
+}
24 app/code/core/Mage/Adminhtml/view/adminhtml/main.xml
View
@@ -57,7 +57,7 @@ Supported layout update handles (special):
<action method="setTitle" translate="title"><title>Magento Admin</title></action>
<action method="addJs"><file>jquery/jquery-1.8.2.min.js</file></action>
<action method="addJs"><file>mage/jquery-no-conflict.js</file></action>
- <action method="addJs"><file>jquery/jquery-ui-1.9.1.custom.min.js</file></action>
+ <action method="addJs"><file>jquery/jquery-ui-1.9.2.custom.min.js</file></action>
<action method="addJs"><file>jquery/jquery.tmpl.min.js</file></action>
<action method="addJs"><file>jquery/jquery.validate.js</file></action>
<action method="addJs"><file>mage/translate.js</file></action>
@@ -82,9 +82,9 @@ Supported layout update handles (special):
<action method="addJs"><file>mage/adminhtml/hash.js</file></action>
<action method="addJs"><file>mage/adminhtml/events.js</file></action>
- <action method="addJs"><file>mage/adminhtml/loader.js</file></action>
+ <action method="addJs"><file>mage/adminhtml/varienLoader.js</file></action>
<action method="addJs"><file>mage/adminhtml/grid.js</file></action>
- <action method="addJs"><file>mage/adminhtml/tabs.js</file></action>
+ <action method="addJs"><file>mage/backend/tabs.js</file></action>
<action method="addJs"><file>mage/adminhtml/form.js</file></action>
<action method="addJs"><file>mage/adminhtml/accordion.js</file></action>
<action method="addJs"><file>mage/adminhtml/tools.js</file></action>
@@ -110,14 +110,14 @@ Supported layout update handles (special):
</block>
<block type="Mage_Adminhtml_Block_Page_Notices" name="global_notices" as="global_notices" template="page/notices.phtml" />
- <block type="Mage_Adminhtml_Block_Page_Header" name="header" as="header"></block>
+ <block type="Mage_Adminhtml_Block_Page_Header" name="header" as="header"/>
<container name="notifications" as="notifications" label="Notifications">
- <block type="Mage_Adminhtml_Block_Notification_Baseurl" name="notification_baseurl" as="notification_baseurl" template="notification/baseurl.phtml"></block>
- <block type="Mage_Adminhtml_Block_Cache_Notifications" name="cache_notifications" template="system/cache/notifications.phtml"></block>
+ <block type="Mage_Adminhtml_Block_Notification_Baseurl" name="notification_baseurl" as="notification_baseurl" template="notification/baseurl.phtml"/>
+ <block type="Mage_Adminhtml_Block_Cache_Notifications" name="cache_notifications" template="system/cache/notifications.phtml"/>
<block type="Mage_Adminhtml_Block_Notification_Survey" name="notification_survey" template="notification/survey.phtml"/>
- <block type="Mage_Adminhtml_Block_Notification_Security" name="notification_security" as="notification_security" template="notification/security.phtml"></block>
+ <block type="Mage_Adminhtml_Block_Notification_Security" name="notification_security" as="notification_security" template="notification/security.phtml"/>
</container>
- <block type="Mage_Adminhtml_Block_Widget_Breadcrumbs" name="breadcrumbs" as="breadcrumbs"></block>
+ <block type="Mage_Adminhtml_Block_Widget_Breadcrumbs" name="breadcrumbs" as="breadcrumbs"/>
<!--<update handle="formkey"/> this won't work, see the try/catch and a jammed exception in Mage_Core_Model_Layout::createBlock() -->
<block type="Mage_Core_Block_Template" name="formkey" as="formkey" template="Mage_Adminhtml::admin/formkey.phtml"/>
@@ -204,19 +204,19 @@ Supported layout update handles (special):
<preview>
<block type="Mage_Core_Block_Template" name="root" output="1" template="Mage_Adminhtml::newsletter/template/preview.phtml">
- <block type="Mage_Adminhtml_Block_Newsletter_Template_Preview" name="content" as="content"></block>
+ <block type="Mage_Adminhtml_Block_Newsletter_Template_Preview" name="content" as="content"/>
</block>
</preview>
<newsletter_template_preview>
<block type="Mage_Core_Block_Template" name="root" output="1" template="Mage_Adminhtml::newsletter/template/preview.phtml">
- <block type="Mage_Adminhtml_Block_Newsletter_Template_Preview" name="content" as="content"></block>
+ <block type="Mage_Adminhtml_Block_Newsletter_Template_Preview" name="content" as="content"/>
</block>
</newsletter_template_preview>
<newsletter_queue_preview>
<block type="Mage_Core_Block_Template" name="root" output="1" template="Mage_Adminhtml::newsletter/queue/preview.phtml">
- <block type="Mage_Adminhtml_Block_Newsletter_Queue_Preview" name="content" as="content"></block>
+ <block type="Mage_Adminhtml_Block_Newsletter_Queue_Preview" name="content" as="content"/>
</block>
</newsletter_queue_preview>
@@ -226,7 +226,7 @@ Supported layout update handles (special):
<systemPreview>
<block type="Mage_Core_Block_Template" name="root" output="1" template="Mage_Adminhtml::system/email/template/preview.phtml">
- <block type="Mage_Adminhtml_Block_System_Email_Template_Preview" name="content" as="content"></block>
+ <block type="Mage_Adminhtml_Block_System_Email_Template_Preview" name="content" as="content"/>
</block>
</systemPreview>
18 app/code/core/Mage/Adminhtml/view/adminhtml/widget/tabshoriz.phtml
View
@@ -28,18 +28,28 @@
<h3><?php echo $this->getTitle() ?></h3>
<?php endif ?> -->
<?php if(!empty($tabs)): ?>
-<ul id="<?php echo $this->getId() ?>" class="tabs-horiz">
+<div id="<?php echo $this->getId() ?>">
+<ul class="tabs-horiz">
<?php foreach ($tabs as $_tab): ?>
+ <?php $_tabClass = 'tab-item-link ' . $this->getTabClass($_tab) . ' ' . (preg_match('/\s?ajax\s?/', $_tab->getClass()) ? 'notloaded' : '') ?>
+ <?php $_tabType = (!preg_match('/\s?ajax\s?/', $_tabClass) && $this->getTabUrl($_tab) != '#') ? 'link' : '' ?>
+ <?php $_tabHref = $this->getTabUrl($_tab) == '#' ? '#' . $this->getTabId($_tab) . '_content' : $this->getTabUrl($_tab) ?>
<li>
- <a href="<?php echo $this->getTabUrl($_tab)?>" id="<?php echo $this->getTabId($_tab) ?>" title="<?php echo $this->getTabTitle($_tab) ?>" class="tab-item-link <?php echo $this->getTabClass($_tab) ?><?php if (preg_match('/\s?ajax\s?/', $this->getTabClass($_tab))) {?> notloaded<?php }?>">
+ <a href="<?php echo $_tabHref?>" id="<?php echo $this->getTabId($_tab) ?>" title="<?php echo $this->getTabTitle($_tab) ?>" class="<?php $_tabClass ?>" data-tab-type="<?php $_tabType ?>">
<span><span class="changed" title="<?php echo $this->__('The information in this tab has been changed.') ?>"></span><span class="error" title="<?php echo $this->__('This tab contains invalid data. Please solve the problem before saving.') ?>"></span><?php echo $this->getTabLabel($_tab) ?></span>
</a>
<div id="<?php echo $this->getTabId($_tab) ?>_content" style="display:none"><?php echo $this->getTabContent($_tab) ?></div>
</li>
<?php endforeach; ?>
</ul>
+</div>
<script type="text/javascript">
-
- <?php echo $this->getId() ?>JsTabs = new varienTabs('<?php echo $this->getId() ?>', '<?php echo $this->getDestElementId() ?>', '<?php echo $this->getActiveTabId() ?>', <?php echo $this->getAllShadowTabs()?>);
+ jQuery(function() {
+ jQuery('#<?php echo $this->getId() ?>').tabs({
+ active: '<?php echo $this->getActiveTabId() ?>',
+ destination: '#<?php echo $this->getDestElementId() ?>',
+ shadowTabs: <?php echo $this->getAllShadowTabs()?>
+ });
+ });
</script>
<?php endif; ?>
3  app/code/core/Mage/Backend/Block/Template.php
View
@@ -30,6 +30,9 @@
* @category Mage
* @package Mage_Backend
* @author Magento Core Team <core@magentocommerce.com>
+ *
+ * @SuppressWarnings(PHPMD.NumberOfChildren)
+ * @SuppressWarnings(PHPMD.numberOfChildren)
*/
class Mage_Backend_Block_Template extends Mage_Core_Block_Template
{
21 app/code/core/Mage/Backend/Controller/ActionAbstract.php
View
@@ -54,35 +54,34 @@
protected $_sessionNamespace = self::SESSION_NAMESPACE;
/**
- * Helper
- *
* @var Mage_Backend_Helper_Data
*/
protected $_helper;
/**
- * Session model
- *
* @var Mage_Backend_Model_Session
*/
protected $_session;
/**
- * Constructor
- *
- * @param Zend_Controller_Request_Abstract $request
- * @param Zend_Controller_Response_Abstract $response
+ * @param Mage_Core_Controller_Request_Http $request
+ * @param Mage_Core_Controller_Response_Http $response
+ * @param string $areaCode
* @param Magento_ObjectManager $objectManager
* @param Mage_Core_Controller_Varien_Front $frontController
+ * @param Mage_Core_Model_Layout_Factory $layoutFactory
* @param array $invokeArgs
*/
- public function __construct(Zend_Controller_Request_Abstract $request,
- Zend_Controller_Response_Abstract $response,
+ public function __construct(
+ Mage_Core_Controller_Request_Http $request,
+ Mage_Core_Controller_Response_Http $response,
+ $areaCode = null,
Magento_ObjectManager $objectManager,
Mage_Core_Controller_Varien_Front $frontController,
+ Mage_Core_Model_Layout_Factory $layoutFactory,
array $invokeArgs = array()
) {
- parent::__construct($request, $response, $objectManager, $frontController, $invokeArgs);
+ parent::__construct($request, $response, $areaCode, $objectManager, $frontController, $layoutFactory);
$this->_helper = isset($invokeArgs['helper']) ?
$invokeArgs['helper'] :
23 app/code/core/Mage/Backend/Controller/Router/Default.php
View
@@ -47,13 +47,20 @@ class Mage_Backend_Controller_Router_Default extends Mage_Core_Controller_Varien
protected $_areaFrontName;
/**
+ * @param Mage_Core_Controller_Varien_Action_Factory $controllerFactory
* @param Magento_ObjectManager $objectManager
- * @param array $options
+ * @param string $areaCode
+ * @param string $baseController
* @throws InvalidArgumentException
*/
- public function __construct(Magento_ObjectManager $objectManager, array $options = array())
- {
- parent::__construct($objectManager, $options);
+ public function __construct(
+ Mage_Core_Controller_Varien_Action_Factory $controllerFactory,
+ Magento_ObjectManager $objectManager,
+ $areaCode,
+ $baseController
+ ) {
+ parent::__construct($controllerFactory, $objectManager, $areaCode, $baseController);
+
$this->_areaFrontName = Mage::helper('Mage_Backend_Helper_Data')->getAreaFrontName();
if (empty($this->_areaFrontName)) {
throw new InvalidArgumentException('Area Front Name should be defined');
@@ -99,9 +106,9 @@ protected function _getDefaultPath()
}
/**
- * dummy call to pass through checking
+ * Dummy call to pass through checking
*
- * @return unknown
+ * @return boolean
*/
protected function _beforeModuleMatch()
{
@@ -207,7 +214,7 @@ public function getControllerFileName($realModule, $controller)
$parts = explode('_', $realModule);
$realModule = implode('_', array_splice($parts, 0, 2));
$file = Mage::getModuleDir('controllers', $realModule);
- return $file . DS . ucfirst($this->_area) . DS . uc_words($controller, DS) . 'Controller.php';
+ return $file . DS . ucfirst($this->_areaCode) . DS . uc_words($controller, DS) . 'Controller.php';
}
/**
@@ -232,7 +239,7 @@ public function getControllerClassName($realModule, $controller)
$parts = explode('_', $realModule);
$realModule = implode('_', array_splice($parts, 0, 2));
- return $realModule . '_' . ucfirst($this->_area) . '_' . uc_words($controller) . 'Controller';
+ return $realModule . '_' . ucfirst($this->_areaCode) . '_' . uc_words($controller) . 'Controller';
}
/**
19 app/code/core/Mage/Backend/Controller/System/ConfigAbstract.php
View
@@ -53,25 +53,34 @@
protected $_authSession;
/**
- * @param Zend_Controller_Request_Abstract $request
- * @param Zend_Controller_Response_Abstract $response
+ * @param Mage_Core_Controller_Request_Http $request
+ * @param Mage_Core_Controller_Response_Http $response
+ * @param string $areaCode
* @param Magento_ObjectManager $objectManager
* @param Mage_Core_Controller_Varien_Front $frontController
* @param Mage_Core_Model_Authorization $authorization
* @param Mage_Backend_Model_Config_Structure $configStructure
* @param Mage_Backend_Model_Auth_StorageInterface $authSession
+ * @param Mage_Core_Model_Layout_Factory $layoutFactory
* @param array $invokeArgs
+ *
+ * @SuppressWarnings(PHPMD.ExcessiveParameterList)
*/
- public function __construct(Zend_Controller_Request_Abstract $request,
- Zend_Controller_Response_Abstract $response,
+ public function __construct(
+ Mage_Core_Controller_Request_Http $request,
+ Mage_Core_Controller_Response_Http $response,
+ $areaCode = null,
Magento_ObjectManager $objectManager,
Mage_Core_Controller_Varien_Front $frontController,
Mage_Core_Model_Authorization $authorization,
Mage_Backend_Model_Config_Structure $configStructure,
Mage_Backend_Model_Auth_StorageInterface $authSession,
+ Mage_Core_Model_Layout_Factory $layoutFactory,
array $invokeArgs = array()
) {
- parent::__construct($request, $response, $objectManager, $frontController, $invokeArgs);
+ parent::__construct($request, $response, $areaCode, $objectManager, $frontController, $layoutFactory,
+ $invokeArgs
+ );
$this->_authorization = $authorization;
$this->_configStructure = $configStructure;
17 app/code/core/Mage/Backend/controllers/Adminhtml/System/Config/SaveController.php
View
@@ -66,8 +66,9 @@ class Mage_Backend_Adminhtml_System_Config_SaveController extends Mage_Backend_C
/**
* Constructor
*
- * @param Zend_Controller_Request_Abstract $request
- * @param Zend_Controller_Response_Abstract $response
+ * @param Mage_Core_Controller_Request_Http $request
+ * @param Mage_Core_Controller_Response_Http $response
+ * @param string $areaCode
* @param Magento_ObjectManager $objectManager
* @param Mage_Core_Controller_Varien_Front $frontController
* @param Mage_Core_Model_Authorization $authorization
@@ -77,12 +78,15 @@ class Mage_Backend_Adminhtml_System_Config_SaveController extends Mage_Backend_C
* @param Mage_Core_Model_Event_Manager $eventManager
* @param Mage_Core_Model_App $app
* @param Mage_Backend_Model_Auth_StorageInterface $authSession
+ * @param Mage_Core_Model_Layout_Factory $layoutFactory
* @param array $invokeArgs
*
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
*/
- public function __construct(Zend_Controller_Request_Abstract $request,
- Zend_Controller_Response_Abstract $response,
+ public function __construct(
+ Mage_Core_Controller_Request_Http $request,
+ Mage_Core_Controller_Response_Http $response,
+ $areaCode = null,
Magento_ObjectManager $objectManager,
Mage_Core_Controller_Varien_Front $frontController,
Mage_Core_Model_Authorization $authorization,
@@ -92,10 +96,11 @@ public function __construct(Zend_Controller_Request_Abstract $request,
Mage_Core_Model_Event_Manager $eventManager,
Mage_Core_Model_App $app,
Mage_Backend_Model_Auth_StorageInterface $authSession,
+ Mage_Core_Model_Layout_Factory $layoutFactory,
array $invokeArgs = array()
) {
- parent::__construct($request, $response, $objectManager, $frontController,
- $authorization, $configStructure, $authSession, $invokeArgs
+ parent::__construct($request, $response, $areaCode, $objectManager, $frontController,
+ $authorization, $configStructure, $authSession, $layoutFactory, $invokeArgs
);
$this->_authorization = $authorization;
2  app/code/core/Mage/Backend/view/adminhtml/admin/login.phtml
View
@@ -36,7 +36,7 @@
<script type="text/javascript" src="<?php echo $this->getViewFileUrl('jquery/jquery-1.8.2.min.js') ?>"></script>
<script type="text/javascript" src="<?php echo $this->getViewFileUrl('mage/jquery-no-conflict.js') ?>"></script>
- <script type="text/javascript" src="<?php echo $this->getViewFileUrl('jquery/jquery-ui-1.9.1.custom.min.js') ?>"></script>
+ <script type="text/javascript" src="<?php echo $this->getViewFileUrl('jquery/jquery-ui-1.9.2.custom.min.js') ?>"></script>
<script type="text/javascript" src="<?php echo $this->getViewFileUrl('jquery/jquery.tmpl.min.js') ?>"></script>
<script type="text/javascript" src="<?php echo $this->getViewFileUrl('jquery/jquery.validate.js') ?>"></script>
<script type="text/javascript" src="<?php echo $this->getViewFileUrl('mage/validation.js') ?>"></script>
30 app/code/core/Mage/Backend/view/adminhtml/system/config/js.phtml
View
@@ -127,8 +127,12 @@ originModel.prototype = {
var regionElement = $(countryElement.id.replace(/country_id/, 'region_id'));
if (regionElement) {
this.regionElement = regionElement;
- var url = this.regionsUrl+'parent/'+countryElement.value;
- this.loader.load(url, {}, this.refreshRegionField.bind(this));
+ if (countryElement.value.length) {
+ var url = this.regionsUrl+'parent/'+countryElement.value;
+ this.loader.load(url, {}, this.refreshRegionField.bind(this));
+ } else {
+ this.clearRegionField(this.regionElement.disabled);
+ }
}
}
},
@@ -140,8 +144,12 @@ originModel.prototype = {
var regionElement = $(countryElement.id.replace(/country_id/, 'region_id'));
if (regionElement) {
this.regionElement = regionElement;
- var url = this.regionsUrl+'parent/'+countryElement.value;
- this.loader.load(url, {}, this.refreshRegionField.bind(this));
+ if (countryElement.value.length) {
+ var url = this.regionsUrl+'parent/'+countryElement.value;
+ this.loader.load(url, {}, this.refreshRegionField.bind(this));
+ } else {
+ this.clearRegionField(this.regionElement.disabled);
+ }
}
}
},
@@ -169,14 +177,16 @@ originModel.prototype = {
parentNode.innerHTML = html;
this.regionElement = $(regionElementId);
} else if (this.reload) {
- var html = '<input type="text" name="'+this.regionElement.name+'" id="'+this.regionElement.id+'" class="input-text" title="'+this.regionElement.title+'"'+(disabled?" disabled":"")+'>';
- var parentNode = this.regionElement.parentNode;
- var regionElementId = this.regionElement.id;
- parentNode.innerHTML = html;
- this.regionElement = $(regionElementId);
- //this.regionElement.replace(html);
+ this.clearRegionField(disabled);
}
}
+ },
+ clearRegionField: function(disabled) {
+ var html = '<input type="text" name="' + this.regionElement.name + '" id="' + this.regionElement.id + '" class="input-text" title="' + this.regionElement.title + '"' + (disabled ? " disabled" : "") + '>';
+ var parentNode = this.regionElement.parentNode;
+ var regionElementId = this.regionElement.id;
+ parentNode.innerHTML = html;
+ this.regionElement = $(regionElementId);
}
}
23 app/code/core/Mage/Backend/view/adminhtml/widget/tabs.phtml
View
@@ -24,22 +24,33 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
*/
?>
-<?php if ($this->getTitle()): ?>
+<?php if($this->getTitle()): ?>
<h3 <?php echo $this->getUiId('title') ?>><?php echo $this->getTitle() ?></h3>
<?php endif ?>
-<?php if (!empty($tabs)): ?>
-<ul id="<?php echo $this->getId() ?>" <?php echo $this->getUiId('tab', $this->getId()) ?> class="tabs">
+<?php if(!empty($tabs)): ?>
+<div id="<?php echo $this->getId() ?>">
+<ul <?php echo $this->getUiId('tab', $this->getId()) ?> class="<?php echo $this->getIsHoriz() ? 'tabs-horiz' : 'tabs' ?>">
<?php foreach ($tabs as $_tab): ?>
<?php if (!$this->canShowTab($_tab)): continue; endif; ?>
- <li <?php if ($this->getTabIsHidden($_tab)): ?> style="display:none"<?php endif; ?><?php echo $this->getUiId('tab', 'item', $_tab->getId()) ?>>
- <a href="<?php echo $this->getTabUrl($_tab) ?>" id="<?php echo $this->getTabId($_tab) ?>" name="<?php echo $this->getTabId($_tab, false) ?>" title="<?php echo $this->getTabTitle($_tab) ?>" class="tab-item-link <?php echo $this->getTabClass($_tab) ?><?php if (preg_match('/\s?ajax\s?/', $_tab->getClass())) {?> notloaded<?php }?>"<?php echo $this->getUiId('tab', 'link', $_tab->getId()) ?>>
+ <?php $_tabClass = 'tab-item-link ' . $this->getTabClass($_tab) . ' ' . (preg_match('/\s?ajax\s?/', $_tab->getClass()) ? 'notloaded' : '') ?>
+ <?php $_tabType = (!preg_match('/\s?ajax\s?/', $_tabClass) && $this->getTabUrl($_tab) != '#') ? 'link' : '' ?>
+ <?php $_tabHref = $this->getTabUrl($_tab) == '#' ? '#' . $this->getTabId($_tab) . '_content' : $this->getTabUrl($_tab) ?>
+ <li <?php if($this->getTabIsHidden($_tab)): ?> style="display:none"<?php endif; ?><?php echo $this->getUiId('tab', 'item', $_tab->getId()) ?>>
+ <a href="<?php echo $_tabHref ?>" id="<?php echo $this->getTabId($_tab) ?>" name="<?php echo $this->getTabId($_tab, false) ?>" title="<?php echo $this->getTabTitle($_tab) ?>" class="<?php echo $_tabClass;?>" data-tab-type="<?php echo $_tabType;?>" <?php echo $this->getUiId('tab', 'link', $_tab->getId()) ?>>
<span><span class="changed" title="<?php echo $this->__('The information in this tab has been changed.') ?>"></span><span class="error" title="<?php echo $this->__('This tab contains invalid data. Please solve the problem before saving.') ?>"></span><?php echo $this->getTabLabel($_tab); ?></span>
</a>
<div id="<?php echo $this->getTabId($_tab) ?>_content" style="display:none;"<?php echo $this->getUiId('tab', 'content', $_tab->getId()) ?>><?php echo $this->getTabContent($_tab) ?></div>
</li>
<?php endforeach; ?>
</ul>
+</div>
<script type="text/javascript">
- var <?php echo $this->getJsObjectName() ?> = new varienTabs('<?php echo $this->getId() ?>', '<?php echo $this->getDestElementId() ?>', '<?php echo $this->getActiveTabId() ?>', <?php echo $this->getAllShadowTabs()?>);
+ jQuery(function() {
+ jQuery('#<?php echo $this->getId() ?>').tabs({
+ active: '<?php echo $this->getActiveTabId() ?>',
+ destination: '#<?php echo $this->getDestElementId() ?>',
+ shadowTabs: <?php echo $this->getAllShadowTabs()?>
+ });
+ });
</script>
<?php endif; ?>
6 app/code/core/Mage/Checkout/Block/Links.php
View
@@ -40,6 +40,7 @@ class Mage_Checkout_Block_Links extends Mage_Core_Block_Template
*/
public function addCartLink()
{
+ /** @var $parentBlock Mage_Page_Block_Template_Links */
$parentBlock = $this->getParentBlock();
if ($parentBlock && Mage::helper('Mage_Core_Helper_Data')->isModuleOutputEnabled('Mage_Checkout')) {
$count = $this->getSummaryQty() ? $this->getSummaryQty()
@@ -69,12 +70,11 @@ public function addCheckoutLink()
return $this;
}
+ /** @var $parentBlock Mage_Page_Block_Template_Links */
$parentBlock = $this->getParentBlock();
if ($parentBlock && Mage::helper('Mage_Core_Helper_Data')->isModuleOutputEnabled('Mage_Checkout')) {
$text = $this->__('Checkout');
- $parentBlock->addLink(
- $text, 'checkout', $text,
- true, array('_secure' => true), 60, null,
+ $parentBlock->addLink($text, 'checkout', $text, true, array('_secure' => true), 60, null,
'class="top-link-checkout"'
);
}
27 app/code/core/Mage/Cms/Controller/Router.php
View
@@ -35,19 +35,20 @@
class Mage_Cms_Controller_Router extends Mage_Core_Controller_Varien_Router_Abstract
{
/**
- * Event manager
- *
* @var Mage_Core_Model_Event_Manager
*/
protected $_eventManager;
/**
- * Class constructor
- *
+ * @param Mage_Core_Controller_Varien_Action_Factory $controllerFactory
* @param Mage_Core_Model_Event_Manager $eventManager
*/
- public function __construct(Mage_Core_Model_Event_Manager $eventManager)
- {
+ public function __construct(
+ Mage_Core_Controller_Varien_Action_Factory $controllerFactory,
+ Mage_Core_Model_Event_Manager $eventManager
+ ) {
+ parent::__construct($controllerFactory);
+
$this->_eventManager = $eventManager;
}
@@ -67,12 +68,12 @@ public function initControllerRouters($observer)
/**
* Validate and Match Cms Page and modify request
*
- * @param Zend_Controller_Request_Http $request
+ * @param Mage_Core_Controller_Request_Http $request
* @return bool
*
* @SuppressWarnings(PHPMD.ExitExpression)
*/
- public function match(Zend_Controller_Request_Http $request)
+ public function match(Mage_Core_Controller_Request_Http $request)
{
if (!Mage::isInstalled()) {
Mage::app()->getFrontController()->getResponse()
@@ -98,9 +99,8 @@ public function match(Zend_Controller_Request_Http $request)
->setRedirect($condition->getRedirectUrl())
->sendResponse();
$request->setDispatched(true);
- return Mage::getControllerInstance('Mage_Core_Controller_Varien_Action_Redirect',
- $request,
- Mage::app()->getFrontController()->getResponse()
+ return $this->_controllerFactory->createController('Mage_Core_Controller_Varien_Action_Redirect',
+ array('request' => $request)
);
}
@@ -123,9 +123,8 @@ public function match(Zend_Controller_Request_Http $request)
$identifier
);
- return Mage::getControllerInstance('Mage_Core_Controller_Varien_Action_Forward',
- $request,
- Mage::app()->getFrontController()->getResponse()
+ return $this->_controllerFactory->createController('Mage_Core_Controller_Varien_Action_Forward',
+ array('request' => $request)
);
}
}
2  app/code/core/Mage/Contacts/view/frontend/layout.xml
View
@@ -28,7 +28,7 @@
<layout version="0.1.0">
<default>
<reference name="footer_links">
- <action method="addLink" translate="label title" module="Mage_Contacts" ifconfig="contacts/contacts/enabled"><label>Contact Us</label><url>contacts</url><title>Contact Us</title><prepare>true</prepare></action>
+ <action method="addLink" translate="label title" module="Mage_Contacts" ifconfig="contacts/contacts/enabled"><label>Contact Us</label><url>contacts</url><title>Contact Us</title></action>
</reference>
</default>
24 app/code/core/Mage/Core/Block/Abstract.php
View
@@ -75,9 +75,7 @@
protected $_layout;
/**
- * Request object
- *
- * @var Zend_Controller_Request_Http
+ * @var Mage_Core_Controller_Request_Http
*/
protected $_request;
@@ -152,17 +150,17 @@ public function __construct(
Mage_Core_Model_Factory_Helper $helperFactory,
array $data = array()
) {
- $this->_request = $request;
- $this->_layout = $layout;
- $this->_eventManager = $eventManager;
- $this->_urlBuilder = $urlBuilder;
- $this->_translator = $translator;
- $this->_cache = $cache;
- $this->_designPackage = $designPackage;
- $this->_session = $session;
- $this->_storeConfig = $storeConfig;
+ $this->_request = $request;
+ $this->_layout = $layout;
+ $this->_eventManager = $eventManager;
+ $this->_urlBuilder = $urlBuilder;
+ $this->_translator = $translator;
+ $this->_cache = $cache;
+ $this->_designPackage = $designPackage;
+ $this->_session = $session;
+ $this->_storeConfig = $storeConfig;
$this->_frontController = $frontController;
- $this->_helperFactory = $helperFactory;
+ $this->_helperFactory = $helperFactory;
parent::__construct($data);
$this->_construct();
76 app/code/core/Mage/Core/Controller/Varien/Action.php
View
@@ -34,7 +34,7 @@
* @package Mage_Core
* @author Magento Core Team <core@magentocommerce.com>
*/
-abstract class Mage_Core_Controller_Varien_Action implements Mage_Core_Controller_Varien_DispatchableInterface
+abstract class Mage_Core_Controller_Varien_Action extends Mage_Core_Controller_Varien_ActionAbstract
{
const FLAG_NO_CHECK_INSTALLATION = 'no-install-check';
const FLAG_NO_DISPATCH = 'no-dispatch';
@@ -53,16 +53,12 @@
const XML_PAGE_TYPE_RENDER_INHERITED = 'global/dev/page_type/render_inherited';
/**
- * Request object
- *
- * @var Zend_Controller_Request_Abstract
+ * @var Mage_Core_Controller_Request_Http
*/
protected $_request;
/**
- * Response object
- *
- * @var Zend_Controller_Response_Abstract
+ * @var Mage_Core_Controller_Response_Http
*/
protected $_response;
@@ -139,31 +135,35 @@
protected $_frontController = null;
/**
+ * @var Mage_Core_Model_Layout_Factory
+ */
+ protected $_layoutFactory;
+
+ /**
* Constructor
*
- * @param Zend_Controller_Request_Abstract $request
- * @param Zend_Controller_Response_Abstract $response
+ * @param Mage_Core_Controller_Request_Http $request
+ * @param Mage_Core_Controller_Response_Http $response
+ * @param string $areaCode
* @param Magento_ObjectManager $objectManager
* @param Mage_Core_Controller_Varien_Front $frontController
- * @param array $invokeArgs
+ * @param Mage_Core_Model_Layout_Factory $layoutFactory
*/
public function __construct(
- Zend_Controller_Request_Abstract $request,
- Zend_Controller_Response_Abstract $response,
+ Mage_Core_Controller_Request_Http $request,
+ Mage_Core_Controller_Response_Http $response,
+ $areaCode = null,
Magento_ObjectManager $objectManager,
Mage_Core_Controller_Varien_Front $frontController,
- array $invokeArgs = array()
+ Mage_Core_Model_Layout_Factory $layoutFactory
) {
- $this->_request = $request;
- $this->_response= $response;
- $this->_objectManager = $objectManager;
+ parent::__construct($request, $response, $areaCode);
+ $this->_objectManager = $objectManager;
$this->_frontController = $frontController;
-
+ $this->_layoutFactory = $layoutFactory;
$this->_frontController->setAction($this);
- if (!$this->_currentArea) {
- $this->_currentArea = isset($invokeArgs['areaCode']) ? $invokeArgs['areaCode'] : null;
- }
+
$this->_construct();
}
@@ -189,26 +189,6 @@ public function hasAction($action)
}
/**
- * Retrieve request object
- *
- * @return Mage_Core_Controller_Request_Http
- */
- public function getRequest()
- {
- return $this->_request;
- }
-
- /**
- * Retrieve response object
- *
- * @return Mage_Core_Controller_Response_Http
- */
- public function getResponse()
- {
- return $this->_response;
- }
-
- /**
* Retrieve flag value
*
* @param string $action
@@ -247,27 +227,13 @@ public function setFlag($action, $flag, $value)
}
/**
- * Retrieve full bane of current action current controller and
- * current module
- *
- * @param string $delimiter
- * @return string
- */
- public function getFullActionName($delimiter = '_')
- {
- return $this->getRequest()->getRequestedRouteName().$delimiter.
- $this->getRequest()->getRequestedControllerName().$delimiter.
- $this->getRequest()->getRequestedActionName();
- }
-
- /**
* Retrieve current layout object
*
* @return Mage_Core_Model_Layout
*/
public function getLayout()
{
- return Mage::getSingleton('Mage_Core_Model_Layout', array('area' => $this->_currentArea));
+ return $this->_layoutFactory->createLayout(array('area' => $this->_currentArea));
}
/**
58 app/code/core/Mage/Core/Controller/Varien/Action/Factory.php
View
@@ -0,0 +1,58 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @category Mage
+ * @package Mage_Core
+ * @copyright Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+ */
+
+/**
+ * Controller factory
+ *
+ * @category Mage
+ * @package Mage_Core
+ * @author Magento Core Team <core@magentocommerce.com>
+ */
+class Mage_Core_Controller_Varien_Action_Factory
+{
+ /**
+ * @var Magento_ObjectManager
+ */
+ protected $_objectManager;
+
+ /**
+ * @param Magento_ObjectManager $objectManager
+ */
+ public function __construct(Magento_ObjectManager $objectManager)
+ {
+ $this->_objectManager = $objectManager;
+ }
+
+ /**
+ * @param string $controllerName
+ * @param array $arguments
+ * @return mixed
+ */
+ public function createController($controllerName, array $arguments = array())
+ {
+ return $this->_objectManager->create($controllerName, $arguments);
+ }
+}
4 app/code/core/Mage/Core/Controller/Varien/Action/Forward.php
View
@@ -24,7 +24,6 @@
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
-
/**
* Forward controller
*
@@ -32,13 +31,12 @@
* @package Mage_Core
* @author Magento Core Team <core@magentocommerce.com>
*/
-class Mage_Core_Controller_Varien_Action_Forward extends Mage_Core_Controller_Varien_Action_RedirectAbstract
+class Mage_Core_Controller_Varien_Action_Forward extends Mage_Core_Controller_Varien_ActionAbstract
{
/**
* Dispatch controller action
*
* @param string $action action name
- * @return void
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function dispatch($action)
3  app/code/core/Mage/Core/Controller/Varien/Action/Redirect.php
View
@@ -24,7 +24,6 @@
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
-
/**
* Redirect controller
*
@@ -32,7 +31,7 @@
* @package Mage_Core
* @author Magento Core Team <core@magentocommerce.com>
*/
-class Mage_Core_Controller_Varien_Action_Redirect extends Mage_Core_Controller_Varien_Action_RedirectAbstract
+class Mage_Core_Controller_Varien_Action_Redirect extends Mage_Core_Controller_Varien_ActionAbstract
{
/**
* Dispatch controller action
73 app/code/core/Mage/Core/Controller/Varien/Action/RedirectAbstract.php
View
@@ -1,73 +0,0 @@
-<?php
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @category Mage
- * @package Mage_Core
- * @copyright Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
- */
-
-/**
- * Abstract redirect/forward action class
- *
- * @category Mage
- * @package Mage_Core
- * @author Magento Core Team <core@magentocommerce.com>
- */
-abstract class Mage_Core_Controller_Varien_Action_RedirectAbstract implements Mage_Core_Controller_Varien_DispatchableInterface
-{
- /**
- * Request object
- *
- * @var Zend_Controller_Request_Abstract
- */
- protected $_request;
-
- /**
- * Response object
- *
- * @var Zend_Controller_Response_Abstract
- */
- protected $_response;
-
- /**
- * Currently used area
- *
- * @var string
- */
- protected $_currentArea;
-
- /**
- * Constructor
- *
- * @param Zend_Controller_Request_Abstract $request
- * @param Zend_Controller_Response_Abstract $response
- * @param array $invokeArgs