Browse files

2.0.0.0-dev44

* Product creating & editing:
  * Added ability to control base text styling without WYSIWYG when editing description fields
  * Added validation for price and quantity fields
  * Removed category suggest limit
* Product template management:
  * Automatically update Product Template when modifying structure in Create Product flow
  * Improvements to change attribute set functionality
* Refactored JavaScript to use JQuery library:
  * Refactored the following pages: catalog tags, one page checkout, multishipping checkout, gift options, gift messages (across the board)
  * Converted jQuery popupwindow.js plugin to a jQuery widget
  * Replaced Prototype code for Switch/Maestro and Solo credit card with jQuery widget
  * Replaced Prototype Validation with jQuery validation plugin
  * Converted credit card payment tool tip to jQuery in all themes
  * Removed legacy JS files from all themes
* Various improvements in look & feel of backend UI:
  * Styling of components: catalog, sales, customers, reports, CMS, newsletter
  * Generic styling: grids, popup windows
  * Changes to support IE browser
* Enhancements in "suggest" JavaScript widget:
  * Ability to delete selected item using keyboard
  * Ability to display all available search items, if "recent items" is empty
  * Fixes of behavior of currently selected elements and "spinner"
  * Display "No Records" message in suggest widget if all items already selected
  * Fixed suggest widget to no longer show deleted items
* Improved `Magento_Test_Helper_ObjectManager` in unit tests to discover types of constructor arguments
* Removed workaround of unsetting objects referenced in `tearDown()` of integration tests
* Updated Menu and Navigation layout, including redesigned backend menu item System -> My Account
* Made store address format consistent with format of shipping origin address
* Added ability to navigate directly to a section in backend system configuration, with corresponding accordion expanded
* Removed some of unnecessary coupling between several modules
* General improvements to unit and integration test code coverage, as well as compliance with coding standards
* Application framework:
  * Implemented ability to compress/decompress data in a cache backend
  * Verified ability to disable in configuration triggering of system upgrade
  * Abolished code pools and the mechanism of overriding files using include\_path (without alternative)
  * Implemented segmentation of cache by types -- ability to assign separate cache configuration per type. Reviewed and verified possibility to isolate configuration cache segment
  * Segregated application configuration into several layers. Primary configuration is used by the object manager and loaded before application is initialized
  * Instead of `Zend\Di`, implemented `Magento\ObjectManager` library that has less features and suits Magento application needs better in terms of performance
  * Introduced "context" object as dependencies for super-classes (`Mage_Core_Model_Abstract`, `Mage_Core_Block_Abstract`, etc) to reduce complexity of their constructors' API
  * Implemented tools for pre-populating all auto-generated proxy and factory classes, used by dependency injection framework
  * Replaced "developer" mode with general "mode", that has 3 states: developer, default, production
  * In "production" mode, the application will not invoke fallback for static view files (images, CSS-files, JavaScript). Instead, it will assume that they are already placed in a fully qualified location. Added tools for populating static view files from `app` directory into `pub/static`
  * Introduced support for Twig templating
    * template rendering, including phtml, was abstracted into a 'Template Engine' to make support for other template engines easier
    * included Magento-specific Twig functions and filters
    * phtml templates can now only access public methods of the corresponding Block class
    * ability to define dependencies on data provided by a service that is then made available to the templates -- eliminates some of the code in Blocks
  * Introduced support for webhooks and callbacks: outbound HTTP requests for notifications and real-time integrations
  * Added ability to define options for System Configuration select fields in XML: static options are defined inline, dynamic options can reuse data provided by a service
* Moved product business logic found in blocks into `Mage_Catalog_Service_Product` to consolidate logic into a single structure that both controllers and web services can invoke
* Converted product view page to demonstrate use of Twig templates and services
* Updated shipping carrier `collectRates` logic to support remote callbacks and converted the FedEx shipping carrier to comply with the same interface
* Added webhook support for the following topics: `customer/created`, `customer/updated`, `customer/deleted`, and `order/created`
* Visual design editor:
  * Ability to view all CSS-files of a theme
  * Ported numerous features of visual design editor from Magento Go 1.x to Magento Core 2.x: style editing, managing catalog images
  * Various improvements in UI
  * Improved image sizing functionality
  * Improved test coverage
  * Ability to launch physical themes, including workflow preview mode and workflow design mode
  * Ability to duplicate existing themes for customization
* GitHub requests
  * [#162](#162) -- classmap needs to be prepended to autoloader stack to have any effect
  * [#179](#179) -- fix that makes `Mage_Install` compatible with the new version of SimpleXml
  * [#180](#180) -- fixed `getBaseUrl()` when type was injected via setter
  * [#203](#203) -- fixed problem with login in to backend area on php 5.4
  * [#216](#216) -- explicit nullification of `$_store` in `Mage_Core_Model_Sore_Storage_Db->_initStores()`
  * [#220](#220) -- make topmenu HTML editable by an event
  * [#221](#221) -- changed minimum required PHP version from PHP 5.2.3 to 5.3.3
* Bug fixes:
  * Restored missing Paypal configuration options
  * Fixed numerous display issues on the following pages: admin login, product management, category management, CMS poll, VDE, tax, shipping
  * Fixed XSS vulnerability related to customer data & bundle options
  * Fixed "Preview Theme" functionality
  * Fixed JS File upload problem with Internet Explorer
  * Replaced `truncateOptions` function in `varien/js.js` with inline widget
  * Fixed broken XPaths in `SystemConfiguration.yml`
  * Fixed jQuery metadata plugin's data attribute scanning for validation
  * Synchronized default value of `quantity_and_stock_status` with Stock Availability control
  * Fixed display of G.T. Purchased column in Order grid when order in non-default currency
  * Fixed Foreign Key support for MS SQL
  * Fixed "Create Customer" functionality on New Order screen
  * Restored State/Province field to Review Order page
  * Fixed Add New Tax Rate functionality
  * Fixed problem with displaying New Shopping Cart Price Rule tab
  * Fixed problem of configurable product options getting lost when adding product to wishlist
  * Fixed UPS Shipping label printing
  * Fixed performance issue with Catalog Management
  * Fixed input file type validation when importing customers
  * Fixed custom product placeholder image display
  * Added missing files referenced by `quick\_style.css`
  * Fixed validation error messaging and message placement
  * Fixed access problem to SOAP/XML User and Roles pages
  * Fixed access problem created when editing your own permissions
  * Several fixes for problems with cleaning cache in tag scope
  * Fixed invalid link problem in Gift Card email
  * Fixed problem with deleting selected product category after changing attribute set
  * Fixed theme management for Windows by adopting `Magento_Filesystem` abstraction to access directories
  * Fixed cart rendering in case of empty cart
  * Remove duplicate "Link to Store Front" link from admin, made obsolete by "Customer View" link
  * Removed "Flat Rate" from pre-installed shipping methods
  • Loading branch information...
1 parent 5b266f6 commit 04446b656b7808dbb6da6efea717f2bc21012002 @magento-team magento-team committed Apr 7, 2013
Showing with 8,096 additions and 62 deletions.
  1. +5 −3 .gitignore
  2. +104 −0 CHANGELOG.markdown
  3. +41 −47 app/Mage.php
  4. +7 −12 app/bootstrap.php
  5. 0 app/code/{core → }/Mage/AdminNotification/Helper/Data.php
  6. 0 app/code/{core → }/Mage/AdminNotification/Model/Config/Source/Frequency.php
  7. 0 app/code/{core → }/Mage/AdminNotification/Model/Feed.php
  8. 0 app/code/{core → }/Mage/AdminNotification/Model/Inbox.php
  9. 0 app/code/{core → }/Mage/AdminNotification/Model/Observer.php
  10. 0 app/code/{core → }/Mage/AdminNotification/Model/Resource/Inbox.php
  11. 0 app/code/{core → }/Mage/AdminNotification/Model/Resource/Inbox/Collection.php
  12. 0 app/code/{core → }/Mage/AdminNotification/Model/Survey.php
  13. +45 −0 app/code/Mage/AdminNotification/etc/adminhtml/acl.xml
  14. +32 −0 app/code/Mage/AdminNotification/etc/adminhtml/menu.xml
  15. 0 app/code/{core → }/Mage/AdminNotification/etc/adminhtml/system.xml
  16. +81 −0 app/code/Mage/AdminNotification/etc/config.xml
  17. 0 app/code/{core → }/Mage/AdminNotification/locale/de_DE/Mage_AdminNotification.csv
  18. 0 app/code/{core → }/Mage/AdminNotification/locale/en_US/Mage_AdminNotification.csv
  19. 0 app/code/{core → }/Mage/AdminNotification/locale/es_ES/Mage_AdminNotification.csv
  20. 0 app/code/{core → }/Mage/AdminNotification/locale/fr_FR/Mage_AdminNotification.csv
  21. 0 app/code/{core → }/Mage/AdminNotification/locale/nl_NL/Mage_AdminNotification.csv
  22. 0 app/code/{core → }/Mage/AdminNotification/locale/pt_BR/Mage_AdminNotification.csv
  23. 0 app/code/{core → }/Mage/AdminNotification/locale/zh_CN/Mage_AdminNotification.csv
  24. 0 app/code/{core → }/Mage/AdminNotification/sql/adminnotification_setup/install-1.6.0.0.php
  25. 0 app/code/{core → }/Mage/Adminhtml/Block/Api/Buttons.php
  26. 0 app/code/{core → }/Mage/Adminhtml/Block/Api/Editroles.php
  27. 0 app/code/{core → }/Mage/Adminhtml/Block/Api/Grid/Role.php
  28. 0 app/code/{core → }/Mage/Adminhtml/Block/Api/Role.php
  29. 0 app/code/{core → }/Mage/Adminhtml/Block/Api/Role/Grid/User.php
  30. 0 app/code/{core → }/Mage/Adminhtml/Block/Api/Roles.php
  31. 0 app/code/{core → }/Mage/Adminhtml/Block/Api/Tab/Roleinfo.php
  32. 0 app/code/{core → }/Mage/Adminhtml/Block/Api/Tab/Rolesedit.php
  33. +54 −0 app/code/Mage/Adminhtml/Block/Api/Tab/Rolesusers.php
  34. 0 app/code/{core → }/Mage/Adminhtml/Block/Api/User.php
  35. 0 app/code/{core → }/Mage/Adminhtml/Block/Api/User/Edit.php
  36. 0 app/code/{core → }/Mage/Adminhtml/Block/Api/User/Edit/Form.php
  37. 0 app/code/{core → }/Mage/Adminhtml/Block/Api/User/Edit/Tab/Main.php
  38. 0 app/code/{core → }/Mage/Adminhtml/Block/Api/User/Edit/Tab/Roles.php
  39. 0 app/code/{core → }/Mage/Adminhtml/Block/Api/User/Edit/Tabs.php
  40. 0 app/code/{core → }/Mage/Adminhtml/Block/Api/User/Grid.php
  41. 0 app/code/{core → }/Mage/Adminhtml/Block/Backup.php
  42. 0 app/code/{core → }/Mage/Adminhtml/Block/Backup/Dialogs.php
  43. 0 app/code/{core → }/Mage/Adminhtml/Block/Cache.php
  44. 0 app/code/{core → }/Mage/Adminhtml/Block/Cache/Additional.php
  45. 0 app/code/{core → }/Mage/Adminhtml/Block/Cache/Grid.php
  46. 0 app/code/{core → }/Mage/Adminhtml/Block/Cache/Notifications.php
  47. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Category/Abstract.php
  48. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Category/Checkboxes/Tree.php
  49. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Category/Edit.php
  50. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Category/Edit/Form.php
  51. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Category/Helper/Image.php
  52. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Category/Helper/Pricestep.php
  53. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Category/Helper/Sortby/Available.php
  54. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Category/Helper/Sortby/Default.php
  55. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Category/Tab/Attributes.php
  56. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Category/Tab/Design.php
  57. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Category/Tab/General.php
  58. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Category/Tab/Product.php
  59. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Category/Tabs.php
  60. +409 −0 app/code/Mage/Adminhtml/Block/Catalog/Category/Tree.php
  61. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Category/Widget/Chooser.php
  62. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Form.php
  63. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Form/Renderer/Attribute/Urlkey.php
  64. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Form/Renderer/Config/DateFieldsOrder.php
  65. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Form/Renderer/Config/YearRange.php
  66. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Form/Renderer/Fieldset/Element.php
  67. +96 −0 app/code/Mage/Adminhtml/Block/Catalog/Helper/Form/Wysiwyg.php
  68. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Helper/Form/Wysiwyg/Content.php
  69. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product.php
  70. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Attribute.php
  71. +123 −0 app/code/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit.php
  72. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Form.php
  73. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tab/Front.php
  74. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tab/Main.php
  75. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tab/Options.php
  76. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tab/System.php
  77. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tabs.php
  78. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Attribute/Grid.php
  79. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Attribute/New/Product/Attributes.php
  80. +99 −0 app/code/Mage/Adminhtml/Block/Catalog/Product/Attribute/New/Product/Created.php
  81. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main.php
  82. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main/Formattribute.php
  83. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main/Formgroup.php
  84. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main/Formset.php
  85. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main/Tree/Attribute.php
  86. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main/Tree/Group.php
  87. +89 −0 app/code/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Toolbar/Add.php
  88. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Toolbar/Main.php
  89. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Toolbar/Main/Filter.php
  90. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Composite/Configure.php
  91. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Composite/Error.php
  92. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Composite/Fieldset.php
  93. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Composite/Fieldset/Configurable.php
  94. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Composite/Fieldset/Grouped.php
  95. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Composite/Fieldset/Options.php
  96. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Composite/Fieldset/Qty.php
  97. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Composite/Update/Result.php
  98. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Created.php
  99. +360 −0 app/code/Mage/Adminhtml/Block/Catalog/Product/Edit.php
  100. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute.php
  101. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute/Tab/Attributes.php
  102. +102 −0 app/code/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute/Tab/Inventory.php
  103. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute/Tab/Websites.php
  104. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute/Tabs.php
  105. +53 −0 app/code/Mage/Adminhtml/Block/Catalog/Product/Edit/AttributeSet.php
  106. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Edit/Js.php
  107. +104 −0 app/code/Mage/Adminhtml/Block/Catalog/Product/Edit/NewCategory.php
  108. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Ajax/Serializer.php
  109. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Alerts.php
  110. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Alerts/Price.php
  111. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Alerts/Stock.php
  112. +184 −0 app/code/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Attributes.php
  113. +113 −0 app/code/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Attributes/Create.php
  114. +272 −0 app/code/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Crosssell.php
  115. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Inventory.php
  116. +67 −0 app/code/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options.php
  117. +352 −0 app/code/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Option.php
  118. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Popup/Grid.php
  119. +69 −0 app/code/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/Abstract.php
  120. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/Date.php
  121. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/File.php
  122. +87 −0 app/code/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/Select.php
  123. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/Text.php
  124. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Price.php
  125. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Price/Group.php
  126. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Price/Group/Abstract.php
  127. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Price/Recurring.php
  128. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Price/Tier.php
  129. +270 −0 app/code/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Related.php
  130. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Reviews.php
  131. +383 −0 app/code/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config.php
  132. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Attribute.php
  133. 0 ...de/{core → }/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Grid/Filter/Inventory.php
  134. 0 ...e/{core → }/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Grid/Renderer/Checkbox.php
  135. 0 .../{core → }/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Grid/Renderer/Inventory.php
  136. +239 −0 app/code/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Matrix.php
  137. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Simple.php
  138. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Settings.php
  139. +269 −0 app/code/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Upsell.php
  140. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Websites.php
  141. +260 −0 app/code/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs.php
  142. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs/Configurable.php
  143. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs/Grouped.php
  144. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Frontend/Product/Watermark.php
  145. +353 −0 app/code/Mage/Adminhtml/Block/Catalog/Product/Grid.php
  146. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Apply.php
  147. +183 −0 app/code/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/BaseImage.php
  148. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Boolean.php
  149. +111 −0 app/code/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Category.php
  150. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Config.php
  151. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Gallery.php
  152. +175 −0 app/code/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Gallery/Content.php
  153. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Image.php
  154. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Msrp/Enabled.php
  155. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Msrp/Price.php
  156. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Price.php
  157. +95 −0 app/code/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Weight.php
  158. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Options/Ajax.php
  159. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Price.php
  160. +296 −0 app/code/Mage/Adminhtml/Block/Catalog/Product/Widget/Chooser.php
  161. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Product/Widget/Chooser/Container.php
  162. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Search.php
  163. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Search/Edit.php
  164. 0 app/code/{core → }/Mage/Adminhtml/Block/Catalog/Search/Edit/Form.php
  165. 0 app/code/{core → }/Mage/Adminhtml/Block/Checkout/Agreement.php
  166. 0 app/code/{core → }/Mage/Adminhtml/Block/Checkout/Agreement/Edit.php
  167. 0 app/code/{core → }/Mage/Adminhtml/Block/Checkout/Agreement/Edit/Form.php
  168. +116 −0 app/code/Mage/Adminhtml/Block/Checkout/Agreement/Grid.php
  169. 0 app/code/{core → }/Mage/Adminhtml/Block/Cms/Block.php
  170. 0 app/code/{core → }/Mage/Adminhtml/Block/Cms/Block/Edit.php
  171. 0 app/code/{core → }/Mage/Adminhtml/Block/Cms/Block/Edit/Form.php
  172. 0 app/code/{core → }/Mage/Adminhtml/Block/Cms/Block/Grid.php
  173. 0 app/code/{core → }/Mage/Adminhtml/Block/Cms/Block/Widget/Chooser.php
  174. 0 app/code/{core → }/Mage/Adminhtml/Block/Cms/Page.php
  175. +155 −0 app/code/Mage/Adminhtml/Block/Cms/Page/Edit.php
  176. 0 app/code/{core → }/Mage/Adminhtml/Block/Cms/Page/Edit/Form.php
  177. 0 app/code/{core → }/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Content.php
  178. 0 app/code/{core → }/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Design.php
  179. 0 app/code/{core → }/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Main.php
  180. 0 app/code/{core → }/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Meta.php
  181. 0 app/code/{core → }/Mage/Adminhtml/Block/Cms/Page/Edit/Tabs.php
  182. 0 app/code/{core → }/Mage/Adminhtml/Block/Cms/Page/Grid.php
  183. 0 app/code/{core → }/Mage/Adminhtml/Block/Cms/Page/Grid/Renderer/Action.php
  184. +169 −0 app/code/Mage/Adminhtml/Block/Cms/Page/Widget/Chooser.php
  185. +161 −0 app/code/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content.php
  186. 0 app/code/{core → }/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content/Files.php
  187. 0 app/code/{core → }/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content/Newfolder.php
  188. 0 app/code/{core → }/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content/Uploader.php
  189. 0 app/code/{core → }/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Tree.php
  190. 0 app/code/{core → }/Mage/Adminhtml/Block/Customer.php
  191. 0 app/code/{core → }/Mage/Adminhtml/Block/Customer/Edit.php
  192. 0 app/code/{core → }/Mage/Adminhtml/Block/Customer/Edit/Form.php
  193. 0 app/code/{core → }/Mage/Adminhtml/Block/Customer/Edit/Renderer/Attribute/Group.php
  194. 0 app/code/{core → }/Mage/Adminhtml/Block/Customer/Edit/Renderer/Newpass.php
  195. 0 app/code/{core → }/Mage/Adminhtml/Block/Customer/Edit/Renderer/Region.php
  196. +399 −0 app/code/Mage/Adminhtml/Block/Customer/Edit/Tab/Account.php
  197. 0 app/code/{core → }/Mage/Adminhtml/Block/Customer/Edit/Tab/Addresses.php
  198. 0 app/code/{core → }/Mage/Adminhtml/Block/Customer/Edit/Tab/Cart.php
  199. +64 −0 app/code/Mage/Adminhtml/Block/Customer/Edit/Tab/Carts.php
  200. 0 app/code/{core → }/Mage/Adminhtml/Block/Customer/Edit/Tab/Newsletter.php
  201. 0 app/code/{core → }/Mage/Adminhtml/Block/Customer/Edit/Tab/Newsletter/Grid.php
  202. 0 app/code/{core → }/Mage/Adminhtml/Block/Customer/Edit/Tab/Newsletter/Grid/Filter/Status.php
  203. 0 app/code/{core → }/Mage/Adminhtml/Block/Customer/Edit/Tab/Newsletter/Grid/Renderer/Action.php
  204. 0 app/code/{core → }/Mage/Adminhtml/Block/Customer/Edit/Tab/Newsletter/Grid/Renderer/Status.php
  205. 0 app/code/{core → }/Mage/Adminhtml/Block/Customer/Edit/Tab/Orders.php
  206. 0 app/code/{core → }/Mage/Adminhtml/Block/Customer/Edit/Tab/Reviews.php
  207. 0 app/code/{core → }/Mage/Adminhtml/Block/Customer/Edit/Tab/View.php
  208. 0 app/code/{core → }/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Accordion.php
  209. 0 app/code/{core → }/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Cart.php
  210. 0 app/code/{core → }/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Grid/Renderer/Item.php
  211. 0 app/code/{core → }/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Orders.php
  212. 0 app/code/{core → }/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Sales.php
  213. 0 app/code/{core → }/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Wishlist.php
  214. 0 app/code/{core → }/Mage/Adminhtml/Block/Customer/Edit/Tab/Wishlist/Grid/Renderer/Description.php
  215. +129 −0 app/code/Mage/Adminhtml/Block/Customer/Edit/Tabs.php
  216. 0 app/code/{core → }/Mage/Adminhtml/Block/Customer/Form/Element/Boolean.php
  217. 0 app/code/{core → }/Mage/Adminhtml/Block/Customer/Form/Element/File.php
  218. 0 app/code/{core → }/Mage/Adminhtml/Block/Customer/Form/Element/Image.php
  219. 0 app/code/{core → }/Mage/Adminhtml/Block/Customer/Grid.php
  220. 0 app/code/{core → }/Mage/Adminhtml/Block/Customer/Grid/Filter/Country.php
  221. 0 app/code/{core → }/Mage/Adminhtml/Block/Customer/Grid/Renderer/Multiaction.php
  222. 0 app/code/{core → }/Mage/Adminhtml/Block/Customer/Group.php
  223. 0 app/code/{core → }/Mage/Adminhtml/Block/Customer/Group/Edit.php
  224. 0 app/code/{core → }/Mage/Adminhtml/Block/Customer/Group/Edit/Form.php
  225. 0 app/code/{core → }/Mage/Adminhtml/Block/Customer/Group/Grid.php
  226. 0 app/code/{core → }/Mage/Adminhtml/Block/Customer/Online.php
  227. 0 app/code/{core → }/Mage/Adminhtml/Block/Customer/Online/Filter.php
  228. 0 app/code/{core → }/Mage/Adminhtml/Block/Customer/Online/Grid.php
  229. 0 app/code/{core → }/Mage/Adminhtml/Block/Customer/Online/Grid/Renderer/Ip.php
  230. 0 app/code/{core → }/Mage/Adminhtml/Block/Customer/Online/Grid/Renderer/Type.php
  231. 0 app/code/{core → }/Mage/Adminhtml/Block/Customer/Online/Grid/Renderer/Url.php
  232. 0 app/code/{core → }/Mage/Adminhtml/Block/Customer/Sales/Order/Address/Form/Renderer/Vat.php
  233. +158 −0 app/code/Mage/Adminhtml/Block/Customer/System/Config/Validatevat.php
  234. +45 −0 app/code/Mage/Adminhtml/Block/Customer/System/Config/ValidatevatFactory.php
  235. 0 app/code/{core → }/Mage/Adminhtml/Block/Dashboard.php
  236. 0 app/code/{core → }/Mage/Adminhtml/Block/Dashboard/Abstract.php
  237. 0 app/code/{core → }/Mage/Adminhtml/Block/Dashboard/Bar.php
  238. 0 app/code/{core → }/Mage/Adminhtml/Block/Dashboard/Diagrams.php
  239. 0 app/code/{core → }/Mage/Adminhtml/Block/Dashboard/Graph.php
  240. 0 app/code/{core → }/Mage/Adminhtml/Block/Dashboard/Grid.php
  241. 0 app/code/{core → }/Mage/Adminhtml/Block/Dashboard/Grids.php
  242. 0 app/code/{core → }/Mage/Adminhtml/Block/Dashboard/Orders/Grid.php
  243. 0 app/code/{core → }/Mage/Adminhtml/Block/Dashboard/Sales.php
  244. 0 app/code/{core → }/Mage/Adminhtml/Block/Dashboard/Searches/Last.php
  245. 0 app/code/{core → }/Mage/Adminhtml/Block/Dashboard/Searches/Renderer/Searchquery.php
  246. 0 app/code/{core → }/Mage/Adminhtml/Block/Dashboard/Searches/Top.php
  247. 0 app/code/{core → }/Mage/Adminhtml/Block/Dashboard/Tab/Amounts.php
  248. 0 app/code/{core → }/Mage/Adminhtml/Block/Dashboard/Tab/Customers/Most.php
  249. 0 app/code/{core → }/Mage/Adminhtml/Block/Dashboard/Tab/Customers/Newest.php
  250. 0 app/code/{core → }/Mage/Adminhtml/Block/Dashboard/Tab/Orders.php
  251. 0 app/code/{core → }/Mage/Adminhtml/Block/Dashboard/Tab/Products/Ordered.php
  252. 0 app/code/{core → }/Mage/Adminhtml/Block/Dashboard/Tab/Products/Viewed.php
  253. 0 app/code/{core → }/Mage/Adminhtml/Block/Dashboard/Totals.php
  254. 0 app/code/{core → }/Mage/Adminhtml/Block/Denied.php
  255. +36 −0 app/code/Mage/Adminhtml/Block/Html/Date.php
  256. +36 −0 app/code/Mage/Adminhtml/Block/Html/Select.php
  257. 0 app/code/{core → }/Mage/Adminhtml/Block/Media/Uploader.php
  258. +37 −0 app/code/Mage/Adminhtml/Block/Messages.php
  259. 0 app/code/{core → }/Mage/Adminhtml/Block/Newsletter/Problem.php
  260. 0 app/code/{core → }/Mage/Adminhtml/Block/Newsletter/Problem/Grid/Filter/Checkbox.php
  261. 0 app/code/{core → }/Mage/Adminhtml/Block/Newsletter/Problem/Grid/Renderer/Checkbox.php
  262. +259 −0 app/code/Mage/Adminhtml/Block/Newsletter/Queue/Edit.php
  263. 0 app/code/{core → }/Mage/Adminhtml/Block/Newsletter/Queue/Edit/Form.php
  264. 0 app/code/{core → }/Mage/Adminhtml/Block/Newsletter/Queue/Grid/Renderer/Action.php
  265. 0 app/code/{core → }/Mage/Adminhtml/Block/Newsletter/Queue/Preview.php
  266. 0 app/code/{core → }/Mage/Adminhtml/Block/Newsletter/Queue/Preview/Form.php
  267. 0 app/code/{core → }/Mage/Adminhtml/Block/Newsletter/Subscriber.php
  268. +237 −0 app/code/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid.php
  269. 0 app/code/{core → }/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid/Filter/Checkbox.php
  270. 0 app/code/{core → }/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid/Filter/Website.php
  271. 0 app/code/{core → }/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid/Renderer/Checkbox.php
  272. 0 app/code/{core → }/Mage/Adminhtml/Block/Newsletter/Template.php
  273. +327 −0 app/code/Mage/Adminhtml/Block/Newsletter/Template/Edit.php
  274. 0 app/code/{core → }/Mage/Adminhtml/Block/Newsletter/Template/Edit/Form.php
  275. +139 −0 app/code/Mage/Adminhtml/Block/Newsletter/Template/Grid.php
  276. 0 app/code/{core → }/Mage/Adminhtml/Block/Newsletter/Template/Grid/Renderer/Action.php
  277. 0 app/code/{core → }/Mage/Adminhtml/Block/Newsletter/Template/Grid/Renderer/Sender.php
  278. 0 app/code/{core → }/Mage/Adminhtml/Block/Newsletter/Template/Preview.php
  279. 0 app/code/{core → }/Mage/Adminhtml/Block/Newsletter/Template/Preview/Form.php
  280. 0 app/code/{core → }/Mage/Adminhtml/Block/Notification/Baseurl.php
  281. 0 app/code/{core → }/Mage/Adminhtml/Block/Notification/Grid.php
  282. 0 app/code/{core → }/Mage/Adminhtml/Block/Notification/Grid/Renderer/Actions.php
  283. 0 app/code/{core → }/Mage/Adminhtml/Block/Notification/Grid/Renderer/Notice.php
  284. 0 app/code/{core → }/Mage/Adminhtml/Block/Notification/Grid/Renderer/Severity.php
  285. 0 app/code/{core → }/Mage/Adminhtml/Block/Notification/Inbox.php
  286. 0 app/code/{core → }/Mage/Adminhtml/Block/Notification/Security.php
  287. 0 app/code/{core → }/Mage/Adminhtml/Block/Notification/Survey.php
  288. 0 app/code/{core → }/Mage/Adminhtml/Block/Notification/Toolbar.php
  289. 0 app/code/{core → }/Mage/Adminhtml/Block/Notification/Window.php
  290. 0 app/code/{core → }/Mage/Adminhtml/Block/Page.php
  291. 0 app/code/{core → }/Mage/Adminhtml/Block/Page/Footer.php
  292. +47 −0 app/code/Mage/Adminhtml/Block/Page/Head.php
  293. 0 app/code/{core → }/Mage/Adminhtml/Block/Page/Header.php
  294. 0 app/code/{core → }/Mage/Adminhtml/Block/Page/Notices.php
  295. 0 app/code/{core → }/Mage/Adminhtml/Block/Page/System/Config/Robots/Reset.php
  296. 0 app/code/{core → }/Mage/Adminhtml/Block/Poll/Answer/Edit.php
  297. 0 app/code/{core → }/Mage/Adminhtml/Block/Poll/Answer/Edit/Form.php
  298. 0 app/code/{core → }/Mage/Adminhtml/Block/Poll/Edit.php
  299. 0 app/code/{core → }/Mage/Adminhtml/Block/Poll/Edit/Form.php
  300. 0 app/code/{core → }/Mage/Adminhtml/Block/Poll/Edit/Tab/Answers.php
Sorry, we could not display the entire diff because too many files (13,666) changed.
View
8 .gitignore
@@ -13,7 +13,8 @@ atlassian*
/app/config_sandbox
/app/etc/local.xml
/app/etc/local.xml.*
-/app/etc/modules/XEnterprise_Enabler.xml
+/app/etc/modules/XEnterprise_Edition.xml
+/app/etc/modules/XSaas_Edition.xml
/downloader/.cache
/downloader/cache.cfg
/downloader/connect.cfg
@@ -28,6 +29,7 @@ atlassian*
/pub/media/*
/pub/media/customer/*
/pub/media/downloadable/*
-/pub/media/theme/*
-/pub/media/theme/customization/*
+/pub/static/*
+!/pub/static/.htaccess
/var/*
+*swp
View
104 CHANGELOG.markdown
@@ -1,3 +1,107 @@
+2.0.0.0-dev44
+=============
+* Product creating & editing:
+ * Added ability to control base text styling without WYSIWYG when editing description fields
+ * Added validation for price and quantity fields
+ * Removed category suggest limit
+* Product template management:
+ * Automatically update Product Template when modifying structure in Create Product flow
+ * Improvements to change attribute set functionality
+* Refactored JavaScript to use JQuery library:
+ * Refactored the following pages: catalog tags, one page checkout, multishipping checkout, gift options, gift messages (across the board)
+ * Converted jQuery popupwindow.js plugin to a jQuery widget
+ * Replaced Prototype code for Switch/Maestro and Solo credit card with jQuery widget
+ * Replaced Prototype Validation with jQuery validation plugin
+ * Converted credit card payment tool tip to jQuery in all themes
+ * Removed legacy JS files from all themes
+* Various improvements in look & feel of backend UI:
+ * Styling of components: catalog, sales, customers, reports, CMS, newsletter
+ * Generic styling: grids, popup windows
+ * Changes to support IE browser
+* Enhancements in "suggest" JavaScript widget:
+ * Ability to delete selected item using keyboard
+ * Ability to display all available search items, if "recent items" is empty
+ * Fixes of behavior of currently selected elements and "spinner"
+ * Display "No Records" message in suggest widget if all items already selected
+ * Fixed suggest widget to no longer show deleted items
+* Improved `Magento_Test_Helper_ObjectManager` in unit tests to discover types of constructor arguments
+* Removed workaround of unsetting objects referenced in `tearDown()` of integration tests
+* Updated Menu and Navigation layout, including redesigned backend menu item System -> My Account
+* Made store address format consistent with format of shipping origin address
+* Added ability to navigate directly to a section in backend system configuration, with corresponding accordion expanded
+* Removed some of unnecessary coupling between several modules
+* General improvements to unit and integration test code coverage, as well as compliance with coding standards
+* Application framework:
+ * Implemented ability to compress/decompress data in a cache backend
+ * Verified ability to disable in configuration triggering of system upgrade
+ * Abolished code pools and the mechanism of overriding files using include\_path (without alternative)
+ * Implemented segmentation of cache by types -- ability to assign separate cache configuration per type. Reviewed and verified possibility to isolate configuration cache segment
+ * Segregated application configuration into several layers. Primary configuration is used by the object manager and loaded before application is initialized
+ * Instead of `Zend\Di`, implemented `Magento\ObjectManager` library that has less features and suits Magento application needs better in terms of performance
+ * Introduced "context" object as dependencies for super-classes (`Mage_Core_Model_Abstract`, `Mage_Core_Block_Abstract`, etc) to reduce complexity of their constructors' API
+ * Implemented tools for pre-populating all auto-generated proxy and factory classes, used by dependency injection framework
+ * Replaced "developer" mode with general "mode", that has 3 states: developer, default, production
+ * In "production" mode, the application will not invoke fallback for static view files (images, CSS-files, JavaScript). Instead, it will assume that they are already placed in a fully qualified location. Added tools for populating static view files from `app` directory into `pub/static`
+ * Introduced support for Twig templating
+ * template rendering, including phtml, was abstracted into a `Mage_Core_Block_Template_Engine` to make support for other template engines easier
+ * included Magento-specific Twig functions and filters
+ * phtml templates can now only access public methods of the corresponding Block class
+ * ability to define dependencies on data provided by a service that is then made available to the templates -- eliminates some of the code in Blocks
+ * Introduced support for webhooks and callbacks: outbound HTTP requests for notifications and real-time integrations
+ * Added ability to define options for System Configuration select fields in XML: static options are defined inline, dynamic options can reuse data provided by a service
+* Moved product business logic found in blocks into `Mage_Catalog_Service_Product` to consolidate logic into a single structure that both controllers and web services can invoke
+* Converted product view page to demonstrate use of Twig templates and services
+* Updated shipping carrier `collectRates` logic to support remote callbacks and converted the FedEx shipping carrier to comply with the same interface
+* Added webhook support for the following topics: `customer/created`, `customer/updated`, `customer/deleted`, and `order/created`
+* Visual design editor:
+ * Ability to view all CSS-files of a theme
+ * Ported numerous features of visual design editor from Magento Go 1.x to Magento Core 2.x: style editing, managing catalog images
+ * Various improvements in UI
+ * Improved image sizing functionality
+ * Improved test coverage
+ * Ability to launch physical themes, including workflow preview mode and workflow design mode
+ * Ability to duplicate existing themes for customization
+* GitHub requests
+ * [#162](https://github.com/magento/magento2/pull/162) -- classmap needs to be prepended to autoloader stack to have any effect
+ * [#179](https://github.com/magento/magento2/pull/179) -- fix that makes `Mage_Install` compatible with the new version of SimpleXml
+ * [#180](https://github.com/magento/magento2/pull/180) -- fixed `getBaseUrl()` when type was injected via setter
+ * [#203](https://github.com/magento/magento2/pull/203) -- fixed problem with login in to backend area on php 5.4
+ * [#216](https://github.com/magento/magento2/pull/216) -- explicit nullification of `$_store` in `Mage_Core_Model_Sore_Storage_Db->_initStores()`
+ * [#220](https://github.com/magento/magento2/pull/220) -- make topmenu HTML editable by an event
+ * [#221](https://github.com/magento/magento2/pull/221) -- changed minimum required PHP version from PHP 5.2.3 to 5.3.3
+* Bug fixes:
+ * Restored missing Paypal configuration options
+ * Fixed numerous display issues on the following pages: admin login, product management, category management, CMS poll, VDE, tax, shipping
+ * Fixed XSS vulnerability related to customer data & bundle options
+ * Fixed "Preview Theme" functionality
+ * Fixed JS File upload problem with Internet Explorer
+ * Replaced `truncateOptions` function in `varien/js.js` with inline widget
+ * Fixed broken XPaths in `SystemConfiguration.yml`
+ * Fixed jQuery metadata plugin's data attribute scanning for validation
+ * Synchronized default value of `quantity_and_stock_status` with Stock Availability control
+ * Fixed display of G.T. Purchased column in Order grid when order in non-default currency
+ * Fixed Foreign Key support for MS SQL
+ * Fixed "Create Customer" functionality on New Order screen
+ * Restored State/Province field to Review Order page
+ * Fixed Add New Tax Rate functionality
+ * Fixed problem with displaying New Shopping Cart Price Rule tab
+ * Fixed problem of configurable product options getting lost when adding product to wishlist
+ * Fixed UPS Shipping label printing
+ * Fixed performance issue with Catalog Management
+ * Fixed input file type validation when importing customers
+ * Fixed custom product placeholder image display
+ * Added missing files referenced by `quick\_style.css`
+ * Fixed validation error messaging and message placement
+ * Fixed access problem to SOAP/XML User and Roles pages
+ * Fixed access problem created when editing your own permissions
+ * Several fixes for problems with cleaning cache in tag scope
+ * Fixed invalid link problem in Gift Card email
+ * Fixed problem with deleting selected product category after changing attribute set
+ * Fixed theme management for Windows by adopting `Magento_Filesystem` abstraction to access directories
+ * Fixed cart rendering in case of empty cart
+ * Remove duplicate "Link to Store Front" link from admin, made obsolete by "Customer View" link
+ * Removed "Flat Rate" from pre-installed shipping methods
+
2.0.0.0-dev43
=============
* Implemented functional limitation that restricts max number of catalog products in the system
View
88 app/Mage.php
@@ -47,6 +47,11 @@
const PARAM_RUN_TYPE = 'MAGE_RUN_TYPE';
/**
+ * Application run code
+ */
+ const PARAM_MODE = 'MAGE_MODE';
+
+ /**
* Base directory
*/
const PARAM_BASEDIR = 'base_dir';
@@ -99,7 +104,7 @@
*
* @var array
*/
- static private $_registry = array();
+ static private $_registry = array();
/**
* Application root absolute path
@@ -141,21 +146,14 @@
*
* @var bool
*/
- static private $_isDownloader = false;
-
- /**
- * Is developer mode flag
- *
- * @var bool
- */
- static private $_isDeveloperMode = false;
+ static private $_isDownloader = false;
/**
* Is allow throw Exception about headers already sent
*
* @var bool
*/
- public static $headersSentThrowsException = true;
+ public static $headersSentThrowsException = true;
/**
* Logger entities
@@ -220,7 +218,7 @@ public static function getVersionInfo()
'revision' => '0',
'patch' => '0',
'stability' => 'dev',
- 'number' => '43',
+ 'number' => '44',
);
}
@@ -258,9 +256,9 @@ public static function reset()
self::$_config = null;
self::$_objects = null;
self::$_isDownloader = false;
- self::$_isDeveloperMode = false;
self::$_loggers = array();
self::$_design = null;
+ self::$_objectManager = null;
// do not reset $headersSentThrowsException
}
@@ -375,9 +373,7 @@ public static function objects($key = null)
*/
public static function getBaseDir($type = Mage_Core_Model_Dir::ROOT)
{
- /** @var $dirs Mage_Core_Model_Dir */
- $dirs = self::$_objectManager->get('Mage_Core_Model_Dir');
- return $dirs->getDir($type);
+ return self::getSingleton('Mage_Core_Model_Dir')->getDir($type);
}
/**
@@ -442,8 +438,7 @@ public static function getBaseUrl($type = Mage_Core_Model_Store::URL_TYPE_LINK,
*/
public static function getUrl($route = '', $params = array())
{
- return self::getObjectManager()->create('Mage_Core_Model_Url', array('data' => array()))
- ->getUrl($route, $params);
+ return self::getObjectManager()->create('Mage_Core_Model_Url')->getUrl($route, $params);
}
/**
@@ -488,9 +483,7 @@ public static function getConfig()
*/
public static function dispatchEvent($name, array $data = array())
{
- /** @var $eventManager Mage_Core_Model_Event_Manager */
- $eventManager = self::$_objectManager->get('Mage_Core_Model_Event_Manager');
- $eventManager->dispatch($name, $data);
+ return Mage::getSingleton('Mage_Core_Model_Event_Manager')->dispatch($name, $data);
}
/**
@@ -506,21 +499,20 @@ public static function getModel($modelClass = '', $arguments = array())
if (!is_array($arguments)) {
$arguments = array($arguments);
}
- return self::getObjectManager()->create($modelClass, $arguments, false);
+ return self::getObjectManager()->create($modelClass, $arguments);
}
/**
* Retrieve model object singleton
*
* @param string $modelClass
- * @param array $arguments
* @return Mage_Core_Model_Abstract
*/
- public static function getSingleton($modelClass = '', array $arguments=array())
+ public static function getSingleton($modelClass = '')
{
$registryKey = '_singleton/'.$modelClass;
if (!self::registry($registryKey)) {
- self::register($registryKey, self::getObjectManager()->get($modelClass, $arguments));
+ self::register($registryKey, self::getObjectManager()->get($modelClass));
}
return self::registry($registryKey);
}
@@ -565,17 +557,16 @@ public static function getResourceModel($modelClass, $arguments = array())
}
/**
- * Retrieve resource vodel object singleton
+ * Retrieve resource model object singleton
*
* @param string $modelClass
- * @param array $arguments
* @return object
*/
- public static function getResourceSingleton($modelClass = '', array $arguments = array())
+ public static function getResourceSingleton($modelClass = '')
{
$registryKey = '_resource_singleton/'.$modelClass;
if (!self::registry($registryKey)) {
- self::register($registryKey, self::getObjectManager()->get($modelClass, $arguments));
+ self::register($registryKey, self::getObjectManager()->get($modelClass));
}
return self::registry($registryKey);
}
@@ -629,7 +620,13 @@ public static function getResourceHelper($moduleName)
if (substr($moduleName, 0, 5) == 'Mage_') {
$connection = substr($connection, 5);
}
- return self::getObjectManager()->get($helperClassName, array('modulePrefix' => $connection));
+ $key = 'resourceHelper/' . $connection;
+ if (!self::registry($key)) {
+ self::register(
+ $key, self::getObjectManager()->create($helperClassName, array('modulePrefix' => $connection))
+ );
+ }
+ return self::registry($key);
}
/**
@@ -682,7 +679,7 @@ public static function app()
*/
public static function isInstalled()
{
- return (bool) self::$_objectManager->get('Mage_Core_Model_Config_Primary')->getInstallDate();
+ return (bool) Mage::getSingleton('Mage_Core_Model_Config_Primary')->getInstallDate();
}
/**
@@ -724,28 +721,25 @@ public static function logException(Exception $e)
}
/**
- * Set enabled developer mode
- *
- * @param bool $mode
- * @return bool
- *
- * @deprecated use Mage_Core_Model_App_State::setIsDeveloperMode()
- */
- public static function setIsDeveloperMode($mode)
- {
- self::$_isDeveloperMode = (bool)$mode;
- return self::$_isDeveloperMode;
- }
-
- /**
* Retrieve enabled developer mode
*
* @return bool
- * @deprecated use Mage_Core_Model_App_State::isDeveloperMode()
+ * @deprecated use Mage_Core_Model_App_State::getMode()
*/
public static function getIsDeveloperMode()
{
- return self::$_isDeveloperMode;
+ $objectManager = self::getObjectManager();
+ if (!$objectManager) {
+ return false;
+ }
+
+ $appState = $objectManager->get('Mage_Core_Model_App_State');
+ if (!$appState) {
+ return false;
+ }
+
+ $mode = $appState->getMode();
+ return $mode == Mage_Core_Model_App_State::MODE_DEVELOPER;
}
/**
@@ -756,7 +750,7 @@ public static function getIsDeveloperMode()
*/
public static function printException(Exception $e, $extra = '')
{
- if (self::$_isDeveloperMode) {
+ if (self::getIsDeveloperMode()) {
print '<pre>';
if (!empty($extra)) {
View
19 app/bootstrap.php
@@ -34,20 +34,18 @@
* Environment initialization
*/
error_reporting(E_ALL | E_STRICT);
-#ini_set('display_errors', 1);
+ini_set('display_errors', 1);
umask(0);
/**
* Require necessary files
*/
-require_once BP . '/app/code/core/Mage/Core/functions.php';
+require_once BP . '/app/code/Mage/Core/functions.php';
require_once BP . '/app/Mage.php';
require_once __DIR__ . '/autoload.php';
Magento_Autoload_IncludePath::addIncludePath(array(
- BP . DS . 'app' . DS . 'code' . DS . 'local',
- BP . DS . 'app' . DS . 'code' . DS . 'community',
- BP . DS . 'app' . DS . 'code' . DS . 'core',
+ BP . DS . 'app' . DS . 'code',
BP . DS . 'lib',
BP . DS . 'var' . DS . 'generation',
));
@@ -56,22 +54,22 @@
require_once BP . '/lib/Magento/Autoload/ClassMap.php';
$classMap = new Magento_Autoload_ClassMap(BP);
$classMap->addMap(unserialize(file_get_contents($classMapPath)));
- spl_autoload_register(array($classMap, 'load'));
+ spl_autoload_register(array($classMap, 'load'), true, true);
}
if (!defined('BARE_BOOTSTRAP')) {
/* PHP version validation */
- if (version_compare(phpversion(), '5.3.0', '<') === true) {
+ if (version_compare(phpversion(), '5.3.3', '<') === true) {
if (PHP_SAPI == 'cli') {
- echo 'Magento supports PHP 5.3.0 or newer. Please read http://www.magento.com/install.';
+ echo 'Magento supports PHP 5.3.3 or newer. Please read http://www.magento.com/install.';
} else {
echo <<<HTML
<div style="font:12px/1.35em arial, helvetica, sans-serif;">
<div style="margin:0 0 25px 0; border-bottom:1px solid #ccc;">
<h3 style="margin:0;font-size:1.7em;font-weight:normal;text-transform:none;text-align:left;color:#2f2f2f;">
Whoops, it looks like you have an invalid PHP version.</h3>
</div>
- <p>Magento supports PHP 5.3.0 or newer.
+ <p>Magento supports PHP 5.3.3 or newer.
<a href="http://www.magento.com/install" target="">Find out</a>
how to install Magento using PHP-CGI as a work-around.
</p>
@@ -88,9 +86,6 @@
}
exit;
}
- if (isset($_SERVER['MAGE_IS_DEVELOPER_MODE'])) {
- Mage::setIsDeveloperMode(true);
- }
if (!empty($_SERVER['MAGE_PROFILER'])) {
$profilerConfigData = $_SERVER['MAGE_PROFILER'];
View
0 ...re/Mage/AdminNotification/Helper/Data.php → ...de/Mage/AdminNotification/Helper/Data.php
File renamed without changes.
View
0 ...ication/Model/Config/Source/Frequency.php → ...ication/Model/Config/Source/Frequency.php
File renamed without changes.
View
0 ...ore/Mage/AdminNotification/Model/Feed.php → ...ode/Mage/AdminNotification/Model/Feed.php
File renamed without changes.
View
0 ...re/Mage/AdminNotification/Model/Inbox.php → ...de/Mage/AdminNotification/Model/Inbox.php
File renamed without changes.
View
0 ...Mage/AdminNotification/Model/Observer.php → ...Mage/AdminNotification/Model/Observer.php
File renamed without changes.
View
0 ...dminNotification/Model/Resource/Inbox.php → ...dminNotification/Model/Resource/Inbox.php 100755 → 100644
File renamed without changes.
View
0 ...ation/Model/Resource/Inbox/Collection.php → ...ation/Model/Resource/Inbox/Collection.php 100755 → 100644
File renamed without changes.
View
0 ...e/Mage/AdminNotification/Model/Survey.php → ...e/Mage/AdminNotification/Model/Survey.php
File renamed without changes.
View
45 app/code/Mage/AdminNotification/etc/adminhtml/acl.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<!--
+/**
+ * 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 Mage
+ * @package Mage_AdminNotification
+ * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
+ */
+-->
+<config>
+ <acl>
+ <resources>
+ <resource id="Mage_Adminhtml::admin">
+ <resource id="Mage_Adminhtml::system">
+ <resource id="Mage_Adminhtml::system_other_settings">
+ <resource id="Mage_AdminNotification::adminnotification" module="Mage_AdminNotification" title="Notifications" sortOrder="10">
+ <resource id="Mage_AdminNotification::show_toolbar" module="Mage_AdminNotification" title="Show Toolbar" sortOrder="10" />
+ <resource id="Mage_AdminNotification::show_list" module="Mage_AdminNotification" title="Show List" sortOrder="20" />
+ <resource id="Mage_AdminNotification::mark_as_read" module="Mage_AdminNotification" title="Mark as Read" sortOrder="30" />
+ <resource id="Mage_AdminNotification::adminnotification_remove" module="Mage_AdminNotification" title="Remove" sortOrder="40" />
+ </resource>
+ </resource>
+ </resource>
+ </resource>
+ </resources>
+ </acl>
+</config>
View
32 app/code/Mage/AdminNotification/etc/adminhtml/menu.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<!--
+/**
+ * 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 Mage
+ * @package Mage_AdminNotification
+ * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
+ */
+-->
+<config>
+ <menu>
+ <add id="Mage_AdminNotification::system_adminnotification" title="Notifications" module="Mage_AdminNotification" sortOrder="10" parent="Mage_Adminhtml::system_other_settings" action="adminhtml/notification" resource="Mage_AdminNotification::adminnotification"/>
+ </menu>
+</config>
View
0 ...dminNotification/etc/adminhtml/system.xml → ...dminNotification/etc/adminhtml/system.xml
File renamed without changes.
View
81 app/code/Mage/AdminNotification/etc/config.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0"?>
+<!--
+/**
+ * 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 Mage
+ * @package Mage_AdminNotification
+ * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
+ */
+-->
+<config>
+ <modules>
+ <Mage_AdminNotification>
+ <version>1.6.0.0</version>
+ <active>true</active>
+ <depends>
+ <Mage_Core/>
+ <Mage_Adminhtml/>
+ </depends>
+ </Mage_AdminNotification>
+ </modules>
+ <global>
+ <resources>
+ <adminnotification_setup>
+ <setup>
+ <module>Mage_AdminNotification</module>
+ </setup>
+ </adminnotification_setup>
+ </resources>
+ </global>
+ <adminhtml>
+ <translate>
+ <modules>
+ <Mage_AdminNotification>
+ <files>
+ <default>Mage_AdminNotification.csv</default>
+ </files>
+ </Mage_AdminNotification>
+ </modules>
+ </translate>
+ <events>
+ <controller_action_predispatch>
+ <observers>
+ <adminnotification>
+ <class>Mage_AdminNotification_Model_Observer</class>
+ <method>preDispatch</method>
+ </adminnotification>
+ </observers>
+ </controller_action_predispatch>
+ </events>
+ </adminhtml>
+ <default>
+ <system>
+ <adminnotification>
+ <feed_url>notifications.magentocommerce.com/community/notifications.rss</feed_url>
+ <popup_url>widgets.magentocommerce.com/notificationPopup</popup_url>
+ <severity_icons_url>widgets.magentocommerce.com/%s/%s.gif</severity_icons_url>
+ <use_https>0</use_https>
+ <frequency>1</frequency>
+ <last_update>0</last_update>
+ </adminnotification>
+ </system>
+ </default>
+</config>
View
0 ...n/locale/de_DE/Mage_AdminNotification.csv → ...n/locale/de_DE/Mage_AdminNotification.csv
File renamed without changes.
View
0 ...n/locale/en_US/Mage_AdminNotification.csv → ...n/locale/en_US/Mage_AdminNotification.csv
File renamed without changes.
View
0 ...n/locale/es_ES/Mage_AdminNotification.csv → ...n/locale/es_ES/Mage_AdminNotification.csv
File renamed without changes.
View
0 ...n/locale/fr_FR/Mage_AdminNotification.csv → ...n/locale/fr_FR/Mage_AdminNotification.csv
File renamed without changes.
View
0 ...n/locale/nl_NL/Mage_AdminNotification.csv → ...n/locale/nl_NL/Mage_AdminNotification.csv
File renamed without changes.
View
0 ...n/locale/pt_BR/Mage_AdminNotification.csv → ...n/locale/pt_BR/Mage_AdminNotification.csv
File renamed without changes.
View
0 ...n/locale/zh_CN/Mage_AdminNotification.csv → ...n/locale/zh_CN/Mage_AdminNotification.csv
File renamed without changes.
View
0 ...minnotification_setup/install-1.6.0.0.php → ...minnotification_setup/install-1.6.0.0.php
File renamed without changes.
View
0 ...core/Mage/Adminhtml/Block/Api/Buttons.php → ...code/Mage/Adminhtml/Block/Api/Buttons.php
File renamed without changes.
View
0 ...re/Mage/Adminhtml/Block/Api/Editroles.php → ...de/Mage/Adminhtml/Block/Api/Editroles.php
File renamed without changes.
View
0 ...re/Mage/Adminhtml/Block/Api/Grid/Role.php → ...de/Mage/Adminhtml/Block/Api/Grid/Role.php
File renamed without changes.
View
0 ...de/core/Mage/Adminhtml/Block/Api/Role.php → app/code/Mage/Adminhtml/Block/Api/Role.php
File renamed without changes.
View
0 ...ge/Adminhtml/Block/Api/Role/Grid/User.php → ...ge/Adminhtml/Block/Api/Role/Grid/User.php
File renamed without changes.
View
0 ...e/core/Mage/Adminhtml/Block/Api/Roles.php → app/code/Mage/Adminhtml/Block/Api/Roles.php
File renamed without changes.
View
0 ...Mage/Adminhtml/Block/Api/Tab/Roleinfo.php → ...Mage/Adminhtml/Block/Api/Tab/Roleinfo.php
File renamed without changes.
View
0 ...age/Adminhtml/Block/Api/Tab/Rolesedit.php → ...age/Adminhtml/Block/Api/Tab/Rolesedit.php
File renamed without changes.
View
54 app/code/Mage/Adminhtml/Block/Api/Tab/Rolesusers.php
@@ -0,0 +1,54 @@
+<?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_Adminhtml
+ * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+ */
+
+class Mage_Adminhtml_Block_Api_Tab_Rolesusers extends Mage_Adminhtml_Block_Widget_Tabs {
+
+ protected function _construct()
+ {
+ parent::_construct();
+
+ $roleId = $this->getRequest()->getParam('rid', false);
+
+ $users = Mage::getModel('Mage_Api_Model_User')->getCollection()->load();
+ $this->setTemplate('api/rolesusers.phtml')
+ ->assign('users', $users->getItems())
+ ->assign('roleId', $roleId);
+ }
+
+ protected function _prepareLayout()
+ {
+ $this->setChild(
+ 'userGrid',
+ $this->getLayout()->createBlock('Mage_Adminhtml_Block_Api_Role_Grid_User', 'roleUsersGrid')
+ );
+ return parent::_prepareLayout();
+ }
+
+ public function getGridHtml()
+ {
+ return $this->getChildHtml('userGrid');
+ }
+}
View
0 ...de/core/Mage/Adminhtml/Block/Api/User.php → app/code/Mage/Adminhtml/Block/Api/User.php
File renamed without changes.
View
0 ...re/Mage/Adminhtml/Block/Api/User/Edit.php → ...de/Mage/Adminhtml/Block/Api/User/Edit.php
File renamed without changes.
View
0 ...ge/Adminhtml/Block/Api/User/Edit/Form.php → ...ge/Adminhtml/Block/Api/User/Edit/Form.php
File renamed without changes.
View
0 ...dminhtml/Block/Api/User/Edit/Tab/Main.php → ...dminhtml/Block/Api/User/Edit/Tab/Main.php
File renamed without changes.
View
0 ...minhtml/Block/Api/User/Edit/Tab/Roles.php → ...minhtml/Block/Api/User/Edit/Tab/Roles.php
File renamed without changes.
View
0 ...ge/Adminhtml/Block/Api/User/Edit/Tabs.php → ...ge/Adminhtml/Block/Api/User/Edit/Tabs.php
File renamed without changes.
View
0 ...re/Mage/Adminhtml/Block/Api/User/Grid.php → ...de/Mage/Adminhtml/Block/Api/User/Grid.php
File renamed without changes.
View
0 ...code/core/Mage/Adminhtml/Block/Backup.php → app/code/Mage/Adminhtml/Block/Backup.php
File renamed without changes.
View
0 ...e/Mage/Adminhtml/Block/Backup/Dialogs.php → ...e/Mage/Adminhtml/Block/Backup/Dialogs.php
File renamed without changes.
View
0 app/code/core/Mage/Adminhtml/Block/Cache.php → app/code/Mage/Adminhtml/Block/Cache.php
File renamed without changes.
View
0 ...Mage/Adminhtml/Block/Cache/Additional.php → ...Mage/Adminhtml/Block/Cache/Additional.php
File renamed without changes.
View
0 .../core/Mage/Adminhtml/Block/Cache/Grid.php → app/code/Mage/Adminhtml/Block/Cache/Grid.php
File renamed without changes.
View
0 ...e/Adminhtml/Block/Cache/Notifications.php → ...e/Adminhtml/Block/Cache/Notifications.php
File renamed without changes.
View
0 ...nhtml/Block/Catalog/Category/Abstract.php → ...nhtml/Block/Catalog/Category/Abstract.php
File renamed without changes.
View
0 ...lock/Catalog/Category/Checkboxes/Tree.php → ...lock/Catalog/Category/Checkboxes/Tree.php
File renamed without changes.
View
0 ...Adminhtml/Block/Catalog/Category/Edit.php → ...Adminhtml/Block/Catalog/Category/Edit.php
File renamed without changes.
View
0 ...html/Block/Catalog/Category/Edit/Form.php → ...html/Block/Catalog/Category/Edit/Form.php
File renamed without changes.
View
0 ...l/Block/Catalog/Category/Helper/Image.php → ...l/Block/Catalog/Category/Helper/Image.php
File renamed without changes.
View
0 ...ock/Catalog/Category/Helper/Pricestep.php → ...ock/Catalog/Category/Helper/Pricestep.php
File renamed without changes.
View
0 ...alog/Category/Helper/Sortby/Available.php → ...alog/Category/Helper/Sortby/Available.php
File renamed without changes.
View
0 ...atalog/Category/Helper/Sortby/Default.php → ...atalog/Category/Helper/Sortby/Default.php
File renamed without changes.
View
0 ...Block/Catalog/Category/Tab/Attributes.php → ...Block/Catalog/Category/Tab/Attributes.php
File renamed without changes.
View
0 ...tml/Block/Catalog/Category/Tab/Design.php → ...tml/Block/Catalog/Category/Tab/Design.php
File renamed without changes.
View
0 ...ml/Block/Catalog/Category/Tab/General.php → ...ml/Block/Catalog/Category/Tab/General.php
File renamed without changes.
View
0 ...ml/Block/Catalog/Category/Tab/Product.php → ...ml/Block/Catalog/Category/Tab/Product.php
File renamed without changes.
View
0 ...Adminhtml/Block/Catalog/Category/Tabs.php → ...Adminhtml/Block/Catalog/Category/Tabs.php
File renamed without changes.
View
409 app/code/Mage/Adminhtml/Block/Catalog/Category/Tree.php
@@ -0,0 +1,409 @@
+<?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_Adminhtml
+ * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+ */
+
+
+/**
+ * Categories tree block
+ *
+ * @category Mage
+ * @package Mage_Adminhtml
+ * @author Magento Core Team <core@magentocommerce.com>
+ */
+class Mage_Adminhtml_Block_Catalog_Category_Tree extends Mage_Adminhtml_Block_Catalog_Category_Abstract
+{
+ protected $_withProductCount;
+
+ protected $_template = 'catalog/category/tree.phtml';
+
+
+ protected function _construct()
+ {
+ parent::_construct();
+ $this->setUseAjax(true);
+ $this->_withProductCount = true;
+ }
+
+ protected function _prepareLayout()
+ {
+ $addUrl = $this->getUrl("*/*/add", array(
+ '_current'=>true,
+ 'id'=>null,
+ '_query' => false
+ ));
+
+ $this->addChild('add_sub_button', 'Mage_Adminhtml_Block_Widget_Button', array(
+ 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Add Subcategory'),
+ 'onclick' => "addNew('".$addUrl."', false)",
+ 'class' => 'add',
+ 'id' => 'add_subcategory_button',
+ 'style' => $this->canAddSubCategory() ? '' : 'display: none;'
+ ));
+
+ if ($this->canAddRootCategory()) {
+ $this->addChild('add_root_button', 'Mage_Adminhtml_Block_Widget_Button', array(
+ 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Add Root Category'),
+ 'onclick' => "addNew('".$addUrl."', true)",
+ 'class' => 'add',
+ 'id' => 'add_root_category_button'
+ ));
+ }
+
+ $this->setChild('store_switcher',
+ $this->getLayout()->createBlock('Mage_Backend_Block_Store_Switcher')
+ ->setSwitchUrl($this->getUrl('*/*/*', array('_current'=>true, '_query'=>false, 'store'=>null)))
+ ->setTemplate('store/switcher/enhanced.phtml')
+ );
+ return parent::_prepareLayout();
+ }
+
+ protected function _getDefaultStoreId()
+ {
+ return Mage_Catalog_Model_Abstract::DEFAULT_STORE_ID;
+ }
+
+ public function getCategoryCollection()
+ {
+ $storeId = $this->getRequest()->getParam('store', $this->_getDefaultStoreId());
+ $collection = $this->getData('category_collection');
+ if (is_null($collection)) {
+ $collection = Mage::getModel('Mage_Catalog_Model_Category')->getCollection();
+
+ /* @var $collection Mage_Catalog_Model_Resource_Category_Collection */
+ $collection->addAttributeToSelect('name')
+ ->addAttributeToSelect('is_active')
+ ->setProductStoreId($storeId)
+ ->setLoadProductCount($this->_withProductCount)
+ ->setStoreId($storeId);
+
+ $this->setData('category_collection', $collection);
+ }
+ return $collection;
+ }
+
+ /**
+ * Retrieve list of categories with name containing $namePart and their parents
+ *
+ * @param string $namePart
+ * @return string
+ */
+ public function getSuggestedCategoriesJson($namePart)
+ {
+ $storeId = $this->getRequest()->getParam('store', $this->_getDefaultStoreId());
+
+ /* @var $collection Mage_Catalog_Model_Resource_Category_Collection */
+ $collection = Mage::getModel('Mage_Catalog_Model_Category')->getCollection();
+
+ $matchingNamesCollection = clone $collection;
+ $escapedNamePart = Mage::getResourceHelper('Mage_Core')->addLikeEscape($namePart, array('position' => 'any'));
+ $matchingNamesCollection->addAttributeToFilter('name', array('like' => $escapedNamePart))
+ ->addAttributeToFilter('entity_id', array('neq' => Mage_Catalog_Model_Category::TREE_ROOT_ID))
+ ->addAttributeToSelect('path')
+ ->setStoreId($storeId);
+
+ $shownCategoriesIds = array();
+ foreach ($matchingNamesCollection as $category) {
+ foreach (explode('/', $category->getPath()) as $parentId) {
+ $shownCategoriesIds[$parentId] = 1;
+ }
+ }
+
+ $collection->addAttributeToFilter('entity_id', array('in' => array_keys($shownCategoriesIds)))
+ ->addAttributeToSelect(array('name', 'is_active', 'parent_id'))
+ ->setStoreId($storeId);
+
+ $categoryById = array(
+ Mage_Catalog_Model_Category::TREE_ROOT_ID => array(
+ 'id' => Mage_Catalog_Model_Category::TREE_ROOT_ID,
+ 'children' => array()
+ )
+ );
+ foreach ($collection as $category) {
+ foreach (array($category->getId(), $category->getParentId()) as $categoryId) {
+ if (!isset($categoryById[$categoryId])) {
+ $categoryById[$categoryId] = array('id' => $categoryId, 'children' => array());
+ }
+ }
+ $categoryById[$category->getId()]['is_active'] = $category->getIsActive();
+ $categoryById[$category->getId()]['label'] = $category->getName();
+ $categoryById[$category->getParentId()]['children'][] = &$categoryById[$category->getId()];
+ }
+
+ return Mage::helper('Mage_Core_Helper_Data')->jsonEncode(
+ $categoryById[Mage_Catalog_Model_Category::TREE_ROOT_ID]['children']
+ );
+ }
+
+ public function getAddRootButtonHtml()
+ {
+ return $this->getChildHtml('add_root_button');
+ }
+
+ public function getAddSubButtonHtml()
+ {
+ return $this->getChildHtml('add_sub_button');
+ }
+
+ public function getExpandButtonHtml()
+ {
+ return $this->getChildHtml('expand_button');
+ }
+
+ public function getCollapseButtonHtml()
+ {
+ return $this->getChildHtml('collapse_button');
+ }
+
+ public function getStoreSwitcherHtml()
+ {
+ return $this->getChildHtml('store_switcher');
+ }
+
+ public function getLoadTreeUrl($expanded=null)
+ {
+ $params = array('_current'=>true, 'id'=>null,'store'=>null);
+ if (
+ (is_null($expanded) && Mage::getSingleton('Mage_Backend_Model_Auth_Session')->getIsTreeWasExpanded())
+ || $expanded == true) {
+ $params['expand_all'] = true;
+ }
+ return $this->getUrl('*/*/categoriesJson', $params);
+ }
+
+ public function getNodesUrl()
+ {
+ return $this->getUrl('*/catalog_category/jsonTree');
+ }
+
+ public function getSwitchTreeUrl()
+ {
+ return $this->getUrl(
+ "*/catalog_category/tree",
+ array('_current'=>true, 'store'=>null, '_query'=>false, 'id'=>null, 'parent'=>null)
+ );
+ }
+
+ public function getIsWasExpanded()
+ {
+ return Mage::getSingleton('Mage_Backend_Model_Auth_Session')->getIsTreeWasExpanded();
+ }
+
+ public function getMoveUrl()
+ {
+ return $this->getUrl('*/catalog_category/move', array('store'=>$this->getRequest()->getParam('store')));
+ }
+
+ public function getTree($parenNodeCategory=null)
+ {
+ $rootArray = $this->_getNodeJson($this->getRoot($parenNodeCategory));
+ $tree = isset($rootArray['children']) ? $rootArray['children'] : array();
+ return $tree;
+ }
+
+ public function getTreeJson($parenNodeCategory=null)
+ {
+ $rootArray = $this->_getNodeJson($this->getRoot($parenNodeCategory));
+ $json = Mage::helper('Mage_Core_Helper_Data')->jsonEncode(
+ isset($rootArray['children']) ? $rootArray['children'] : array()
+ );
+ return $json;
+ }
+
+ /**
+ * Get JSON of array of categories, that are breadcrumbs for specified category path
+ *
+ * @param string $path
+ * @param string $javascriptVarName
+ * @return string
+ */
+ public function getBreadcrumbsJavascript($path, $javascriptVarName)
+ {
+ if (empty($path)) {
+ return '';
+ }
+
+ $categories = Mage::getResourceSingleton('Mage_Catalog_Model_Resource_Category_Tree')
+ ->setStoreId($this->getStore()->getId())->loadBreadcrumbsArray($path);
+ if (empty($categories)) {
+ return '';
+ }
+ foreach ($categories as $key => $category) {
+ $categories[$key] = $this->_getNodeJson($category);
+ }
+ return
+ '<script type="text/javascript">'
+ . $javascriptVarName . ' = ' . Mage::helper('Mage_Core_Helper_Data')->jsonEncode($categories) . ';'
+ . ($this->canAddSubCategory()
+ ? '$("add_subcategory_button").show();'
+ : '$("add_subcategory_button").hide();')
+ . '</script>';
+ }
+
+ /**
+ * Get JSON of a tree node or an associative array
+ *
+ * @param Varien_Data_Tree_Node|array $node
+ * @param int $level
+ * @return string
+ */
+ protected function _getNodeJson($node, $level = 0)
+ {
+ // create a node from data array
+ if (is_array($node)) {
+ $node = new Varien_Data_Tree_Node($node, 'entity_id', new Varien_Data_Tree);
+ }
+
+ $item = array();
+ $item['text'] = $this->buildNodeName($node);
+
+ /* $rootForStores = Mage::getModel('Mage_Core_Model_Store')
+ ->getCollection()
+ ->loadByCategoryIds(array($node->getEntityId())); */
+ $rootForStores = in_array($node->getEntityId(), $this->getRootIds());
+
+ $item['id'] = $node->getId();
+ $item['store'] = (int) $this->getStore()->getId();
+ $item['path'] = $node->getData('path');
+
+ $item['cls'] = 'folder ' . ($node->getIsActive() ? 'active-category' : 'no-active-category');
+ //$item['allowDrop'] = ($level<3) ? true : false;
+ $allowMove = $this->_isCategoryMoveable($node);
+ $item['allowDrop'] = $allowMove;
+ // disallow drag if it's first level and category is root of a store
+ $item['allowDrag'] = $allowMove && (($node->getLevel()==1 && $rootForStores) ? false : true);
+
+ if ((int)$node->getChildrenCount()>0) {
+ $item['children'] = array();
+ }
+
+ $isParent = $this->_isParentSelectedCategory($node);
+
+ if ($node->hasChildren()) {
+ $item['children'] = array();
+ if (!($this->getUseAjax() && $node->getLevel() > 1 && !$isParent)) {
+ foreach ($node->getChildren() as $child) {
+ $item['children'][] = $this->_getNodeJson($child, $level+1);
+ }
+ }
+ }
+
+ if ($isParent || $node->getLevel() < 2) {
+ $item['expanded'] = true;
+ }
+
+ return $item;
+ }
+
+ /**
+ * Get category name
+ *
+ * @param Varien_Object $node
+ * @return string
+ */
+ public function buildNodeName($node)
+ {
+ $result = $this->escapeHtml($node->getName());
+ if ($this->_withProductCount) {
+ $result .= ' (' . $node->getProductCount() . ')';
+ }
+ return $result;
+ }
+
+ protected function _isCategoryMoveable($node)
+ {
+ $options = new Varien_Object(array(
+ 'is_moveable' => true,
+ 'category' => $node
+ ));
+
+ Mage::dispatchEvent('adminhtml_catalog_category_tree_is_moveable',
+ array('options'=>$options)
+ );
+
+ return $options->getIsMoveable();
+ }
+
+ protected function _isParentSelectedCategory($node)
+ {
+ if ($node && $this->getCategory()) {
+ $pathIds = $this->getCategory()->getPathIds();
+ if (in_array($node->getId(), $pathIds)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Check if page loaded by outside link to category edit
+ *
+ * @return boolean
+ */
+ public function isClearEdit()
+ {
+ return (bool) $this->getRequest()->getParam('clear');
+ }
+
+ /**
+ * Check availability of adding root category
+ *
+ * @return boolean
+ */
+ public function canAddRootCategory()
+ {
+ $options = new Varien_Object(array('is_allow'=>true));
+ Mage::dispatchEvent(
+ 'adminhtml_catalog_category_tree_can_add_root_category',
+ array(
+ 'category' => $this->getCategory(),
+ 'options' => $options,
+ 'store' => $this->getStore()->getId()
+ )
+ );
+
+ return $options->getIsAllow();
+ }
+
+ /**
+ * Check availability of adding sub category
+ *
+ * @return boolean
+ */
+ public function canAddSubCategory()
+ {
+ $options = new Varien_Object(array('is_allow'=>true));
+ Mage::dispatchEvent(
+ 'adminhtml_catalog_category_tree_can_add_sub_category',
+ array(
+ 'category' => $this->getCategory(),
+ 'options' => $options,
+ 'store' => $this->getStore()->getId()
+ )
+ );
+
+ return $options->getIsAllow();
+ }
+}
View
0 ...Block/Catalog/Category/Widget/Chooser.php → ...Block/Catalog/Category/Widget/Chooser.php
File renamed without changes.
View
0 ...ore/Mage/Adminhtml/Block/Catalog/Form.php → ...ode/Mage/Adminhtml/Block/Catalog/Form.php
File renamed without changes.
View
0 ...atalog/Form/Renderer/Attribute/Urlkey.php → ...atalog/Form/Renderer/Attribute/Urlkey.php
File renamed without changes.
View
0 .../Form/Renderer/Config/DateFieldsOrder.php → .../Form/Renderer/Config/DateFieldsOrder.php
File renamed without changes.
View
0 ...atalog/Form/Renderer/Config/YearRange.php → ...atalog/Form/Renderer/Config/YearRange.php
File renamed without changes.
View
0 ...atalog/Form/Renderer/Fieldset/Element.php → ...atalog/Form/Renderer/Fieldset/Element.php
File renamed without changes.
View
96 app/code/Mage/Adminhtml/Block/Catalog/Helper/Form/Wysiwyg.php
@@ -0,0 +1,96 @@
+<?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_Adminhtml
+ * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+ */
+
+/**
+ * Catalog textarea attribute WYSIWYG button
+ *
+ * @category Mage
+ * @package Mage_Adminhtml
+ * @author Magento Core Team <core@magentocommerce.com>
+ */
+class Mage_Adminhtml_Block_Catalog_Helper_Form_Wysiwyg extends Varien_Data_Form_Element_Textarea
+{
+ /**
+ * Retrieve additional html and put it at the end of element html
+ *
+ * @return string
+ */
+ public function getAfterElementHtml()
+ {
+ $html = parent::getAfterElementHtml();
+ if ($this->getIsWysiwygEnabled()) {
+ $disabled = ($this->getDisabled() || $this->getReadonly());
+ $html .= Mage::app()->getLayout()
+ ->createBlock('Mage_Adminhtml_Block_Widget_Button', '', array('data' => array(
+ 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('WYSIWYG Editor'),
+ 'type' => 'button',
+ 'disabled' => $disabled,
+ 'class' => ($disabled) ? 'disabled action-wysiwyg' : 'action-wysiwyg',
+ 'onclick' => 'catalogWysiwygEditor.open(\''
+ . Mage::helper('Mage_Adminhtml_Helper_Data')->getUrl('adminhtml/catalog_product/wysiwyg')
+ . '\', \'' . $this->getHtmlId().'\')'
+ )))->toHtml();
+ $html .= <<<HTML
+<script type="text/javascript">
+jQuery('#{$this->getHtmlId()}')
+ .addClass('wysiwyg-editor')
+ .data(
+ 'wysiwygEditor',
+ new tinyMceWysiwygSetup(
+ '{$this->getHtmlId()}',
+ {
+ settings: {
+ theme_advanced_buttons1 : 'bold,italic,|,justifyleft,justifycenter,justifyright,|,' +
+ 'fontselect,fontsizeselect,|,forecolor,backcolor,|,link,unlink,image,|,bullist,numlist,|,code',
+ theme_advanced_buttons2: null,
+ theme_advanced_buttons3: null,
+ theme_advanced_buttons4: null,
+ theme_advanced_statusbar_location: null
+ }
+ }
+ ).turnOn()
+ );
+</script>
+HTML;
+ }
+ return $html;
+ }
+
+ /**
+ * Check whether wysiwyg enabled or not
+ *
+ * @return boolean
+ */
+ public function getIsWysiwygEnabled()
+ {
+ if (Mage::helper('Mage_Catalog_Helper_Data')->isModuleEnabled('Mage_Cms')) {
+ return (bool)(Mage::getSingleton('Mage_Cms_Model_Wysiwyg_Config')->isEnabled()
+ && $this->getEntityAttribute()->getIsWysiwygEnabled());
+ }
+
+ return false;
+ }
+}
View
0 ...k/Catalog/Helper/Form/Wysiwyg/Content.php → ...k/Catalog/Helper/Form/Wysiwyg/Content.php
File renamed without changes.
View
0 .../Mage/Adminhtml/Block/Catalog/Product.php → .../Mage/Adminhtml/Block/Catalog/Product.php
File renamed without changes.
View
0 ...nhtml/Block/Catalog/Product/Attribute.php → ...nhtml/Block/Catalog/Product/Attribute.php
File renamed without changes.
View
123 app/code/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit.php
@@ -0,0 +1,123 @@
+<?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_Adminhtml
+ * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+ */
+
+/**
+ * Product attribute edit page
+ *
+ * @category Mage
+ * @package Mage_Adminhtml
+ * @author Magento Core Team <core@magentocommerce.com>
+ */
+
+class Mage_Adminhtml_Block_Catalog_Product_Attribute_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
+{
+
+ protected function _construct()
+ {
+ $this->_objectId = 'attribute_id';
+ $this->_controller = 'catalog_product_attribute';
+
+ parent::_construct();
+
+ if($this->getRequest()->getParam('popup')) {
+ $this->_removeButton('back');
+ $this->_addButton(
+ 'save_in_new_set',
+ array(
+ 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Save in New Attribute Set'),
+ 'class' => 'save',
+ 'onclick' => 'saveAttributeInNewSet(\''
+ . Mage::helper('Mage_Catalog_Helper_Data')->__('Enter Name for New Attribute Set')
+ . '\')',
+ )
+ );
+ } else {
+ $this->_addButton(
+ 'save_and_edit_button',
+ array(
+ 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Save and Continue Edit'),
+ 'class' => 'save',
+ 'data_attribute' => array(
+ 'mage-init' => array(
+ 'button' => array('event' => 'saveAndContinueEdit', 'target' => '#edit_form'),
+ ),
+ ),
+ ),
+ 100
+ );
+ }
+
+ $this->_updateButton('save', 'label', Mage::helper('Mage_Catalog_Helper_Data')->__('Save Attribute'));
+ $this->_updateButton('save', 'data_attribute', array(
+ 'mage-init' => array(
+ 'button' => array('event' => 'save', 'target' => '#edit_form'),
+ ),
+ ));
+
+ if (!Mage::registry('entity_attribute') || !Mage::registry('entity_attribute')->getIsUserDefined()) {
+ $this->_removeButton('delete');
+ } else {
+ $this->_updateButton('delete', 'label', Mage::helper('Mage_Catalog_Helper_Data')->__('Delete Attribute'));
+ }
+ }
+
+ /**
+ * Retrieve header text
+ *
+ * @return string
+ */
+ public function getHeaderText()
+ {
+ if (Mage::registry('entity_attribute')->getId()) {
+ $frontendLabel = Mage::registry('entity_attribute')->getFrontendLabel();
+ if (is_array($frontendLabel)) {
+ $frontendLabel = $frontendLabel[0];
+ }
+ return Mage::helper('Mage_Catalog_Helper_Data')->__('Edit Product Attribute "%s"', $this->escapeHtml($frontendLabel));
+ }
+ return Mage::helper('Mage_Catalog_Helper_Data')->__('New Product Attribute');
+ }
+
+ /**
+ * Retrieve URL for validation
+ *
+ * @return string
+ */
+ public function getValidationUrl()
+ {
+ return $this->getUrl('*/*/validate', array('_current'=>true));
+ }
+
+ /**
+ * Retrieve URL for save
+ *
+ * @return string
+ */
+ public function getSaveUrl()
+ {
+ return $this->getUrl('*/'.$this->_controller.'/save', array('_current'=>true, 'back'=>null));
+ }
+}
View
0 ...k/Catalog/Product/Attribute/Edit/Form.php → ...k/Catalog/Product/Attribute/Edit/Form.php
File renamed without changes.
View
0 ...alog/Product/Attribute/Edit/Tab/Front.php → ...alog/Product/Attribute/Edit/Tab/Front.php
File renamed without changes.
View
0 ...talog/Product/Attribute/Edit/Tab/Main.php → ...talog/Product/Attribute/Edit/Tab/Main.php
File renamed without changes.
View
0 ...og/Product/Attribute/Edit/Tab/Options.php → ...og/Product/Attribute/Edit/Tab/Options.php
File renamed without changes.
View
0 ...log/Product/Attribute/Edit/Tab/System.php → ...log/Product/Attribute/Edit/Tab/System.php
File renamed without changes.
View
0