Permalink
Browse files

2.0.0.0-dev29

* Implemented and verified ability to upgrade DB from CE 1.7 (EE 1.12) to 2.x
* Replaced calendar UI component with jQuery calendar
* 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
  • Loading branch information...
1 parent 784be09 commit 21af2d4e2e8377bec92a6a08212c2304147997b2 @magento-team magento-team committed Oct 24, 2012
Showing with 4,438 additions and 5,776 deletions.
  1. +77 −58 CHANGELOG.markdown
  2. +1 −1 app/Mage.php
  3. +3 −5 app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Design.php
  4. +6 −5 app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Edit/Form.php
  5. +2 −2 app/code/core/Mage/Adminhtml/Block/Poll/Grid.php
  6. +3 −3 app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit/Tab/Main.php
  7. +3 −3 app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Main.php
  8. +3 −3 app/code/core/Mage/Adminhtml/Block/Report/Filter/Form.php
  9. +6 −1 app/code/core/Mage/Adminhtml/Block/Report/Grid.php
  10. +1 −1 app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form/Abstract.php
  11. +1 −1 app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit/Tab/Wizard.php
  12. +3 −3 app/code/core/Mage/Adminhtml/Block/System/Design/Edit/Tab/General.php
  13. +6 −3 app/code/core/Mage/Adminhtml/view/adminhtml/main.xml
  14. +35 −58 app/code/core/Mage/Adminhtml/view/adminhtml/page/js/calendar.phtml
  15. +27 −38 app/code/core/Mage/Adminhtml/view/adminhtml/report/grid.phtml
  16. +17 −32 app/code/core/Mage/Adminhtml/view/adminhtml/system/convert/profile/wizard.phtml
  17. +11 −0 app/code/core/Mage/Backend/Block/Widget.php
  18. +1 −1 app/code/core/Mage/Backend/Block/Widget/Form.php
  19. +16 −47 app/code/core/Mage/Backend/Block/Widget/Grid/Column/Filter/Date.php
  20. +20 −26 app/code/core/Mage/Backend/Block/Widget/Grid/Column/Filter/Datetime.php
  21. +2 −2 app/code/core/Mage/Catalog/Block/Product/View/Options/Type/Date.php
  22. +2 −0 app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.14-1.6.0.0.15.php
  23. +1 −4 app/code/core/Mage/Catalog/view/frontend/layout.xml
  24. +1 −1 app/code/core/Mage/CatalogSearch/Block/Advanced/Form.php
  25. +1 −1 app/code/core/Mage/CatalogSearch/Model/Indexer/Fulltext.php
  26. +1 −3 app/code/core/Mage/CatalogSearch/view/frontend/layout.xml
  27. +2 −2 app/code/core/Mage/Core/Block/Html/Calendar.php
  28. +17 −29 app/code/core/Mage/Core/Block/Html/Date.php
  29. +1 −1 app/code/core/Mage/Core/Controller/Varien/Exception.php
  30. +0 −22 app/code/core/Mage/Core/Model/Locale.php
  31. +36 −0 app/code/core/Mage/Core/data/core_setup/data-upgrade-1.6.0.4-1.6.0.5.php
  32. +1 −1 app/code/core/Mage/Core/etc/config.xml
  33. +1 −1 app/code/core/Mage/Customer/Block/Widget/Dob.php
  34. +1 −1 app/code/core/Mage/Customer/etc/config.xml
  35. +30 −0 app/code/core/Mage/Customer/sql/customer_setup/upgrade-1.6.2.0.1-1.6.2.0.3.php
  36. +0 −4 app/code/core/Mage/DesignEditor/view/frontend/layout.xml
  37. +2 −2 app/code/core/Mage/Eav/Block/Adminhtml/Attribute/Edit/Main/Abstract.php
  38. +28 −26 app/code/core/Mage/Eav/Model/Entity/Setup.php
  39. +1 −1 app/code/core/Mage/ImportExport/Block/Adminhtml/Export/Filter.php
  40. +10 −7 app/code/core/Mage/ImportExport/Model/Import/Entity/Eav/Customer.php
  41. +2 −23 app/code/core/Mage/ImportExport/Model/Import/Entity/Eav/Customer/Address.php
  42. +2 −2 app/code/core/Mage/ImportExport/Model/Import/Entity/Product.php
  43. +7 −3 app/code/core/Mage/Oauth/view/adminhtml/layout.xml
  44. +32 −55 app/code/core/Mage/Page/view/frontend/js/calendar.phtml
  45. +1 −21 app/code/core/Mage/Page/view/frontend/layout.xml
  46. +34 −0 app/code/core/Mage/Page/view/frontend/layout_addons.xml
  47. +2 −3 app/code/core/Mage/Payment/Block/Catalog/Product/View/Profile.php
  48. +1 −1 app/code/core/Mage/Rule/Model/Condition/Abstract.php
  49. +35 −0 app/code/core/Mage/Sales/Model/Resource/Setup.php
  50. +1 −27 app/code/core/Mage/Sales/sql/sales_setup/install-1.6.0.0.php
  51. +2 −0 app/code/core/Mage/Sales/sql/sales_setup/upgrade-1.6.0.7-1.6.0.8.php
  52. +43 −14 app/code/core/Mage/User/data/user_setup/data-install-1.6.0.0.php
  53. +266 −0 app/code/core/Mage/User/data/user_setup/data-upgrade-1.6.1.1-1.6.1.2.php
  54. +1 −1 app/code/core/Mage/User/etc/config.xml
  55. +156 −147 app/code/core/Mage/User/sql/user_setup/install-1.6.0.0.php
  56. +16 −21 app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Datetime.php
  57. +2 −2 app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Edit/Form.php
  58. +1 −1 app/code/core/Mage/XmlConnect/Block/Customer/Address/Form.php
  59. +1 −4 app/design/frontend/default/iphone/Mage_Catalog/layout.xml
  60. +1 −3 app/design/frontend/default/iphone/Mage_CatalogSearch/layout.xml
  61. +4 −24 app/design/frontend/default/iphone/Mage_Page/layout.xml
  62. +262 −265 app/design/frontend/default/modern/Mage_Catalog/layout.xml
  63. +1 −3 app/design/frontend/default/modern/Mage_CatalogSearch/layout.xml
  64. +4 −0 app/design/frontend/default/modern/Mage_Page/layout.xml
  65. +54 −0 dev/tests/integration/testsuite/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/DesignTest.php
  66. +55 −0 dev/tests/integration/testsuite/Mage/Adminhtml/Block/Newsletter/Queue/Edit/FormTest.php
  67. +49 −0 dev/tests/integration/testsuite/Mage/Adminhtml/Block/Poll/GridTest.php
  68. +54 −0 dev/tests/integration/testsuite/Mage/Adminhtml/Block/Promo/Catalog/Edit/Tab/MainTest.php
  69. +54 −0 dev/tests/integration/testsuite/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/MainTest.php
  70. +49 −0 dev/tests/integration/testsuite/Mage/Adminhtml/Block/Report/Filter/FormTest.php
  71. +38 −0 dev/tests/integration/testsuite/Mage/Adminhtml/Block/Report/GridTest.php
  72. +58 −0 dev/tests/integration/testsuite/Mage/Adminhtml/Block/Sales/Order/Create/Form/AbstractTest.php
  73. +38 −0 dev/tests/integration/testsuite/Mage/Adminhtml/Block/System/Convert/Gui/Edit/Tab/WizardTest.php
  74. +53 −0 dev/tests/integration/testsuite/Mage/Adminhtml/Block/System/Design/Edit/Tab/GeneralTest.php
  75. +57 −0 dev/tests/integration/testsuite/Mage/Backend/Block/Widget/FormTest.php
  76. +39 −0 dev/tests/integration/testsuite/Mage/Backend/Block/WidgetTest.php
  77. +7 −7 dev/tests/integration/testsuite/Mage/Core/Model/Design/PackageMergingTest.php
  78. +12 −10 dev/tests/integration/testsuite/Mage/Core/Model/Design/PackageTest.php
  79. +38 −0 dev/tests/integration/testsuite/Mage/Customer/Block/Widget/DobTest.php
  80. +56 −0 dev/tests/integration/testsuite/Mage/Eav/Block/Adminhtml/Attribute/Edit/Main/AbstractTest.php
  81. +58 −0 dev/tests/integration/testsuite/Mage/ImportExport/Block/Adminhtml/Export/FilterTest.php
  82. +6 −0 dev/tests/integration/testsuite/Mage/ImportExport/Model/Import/Entity/Eav/CustomerImportTest.php
  83. +3 −2 dev/tests/integration/testsuite/Mage/ImportExport/Model/Import/Entity/EavAbstractTest.php
  84. +41 −0 dev/tests/integration/testsuite/Mage/ImportExport/Model/Import/Entity/ProductTest.php
  85. +4 −0 ...ation/testsuite/Mage/ImportExport/Model/Import/Entity/_files/products_to_import_with_datetime.csv
  86. +1 −1 dev/tests/integration/testsuite/Mage/ImportExport/_files/import_data.php
  87. +52 −0 dev/tests/integration/testsuite/Mage/Payment/Block/Catalog/Product/View/ProfileTest.php
  88. +53 −0 dev/tests/integration/testsuite/Mage/Rule/Model/Condition/AbstractTest.php
  89. +2 −0 dev/tests/js/jsTestDriver.php.dist
  90. +111 −0 dev/tests/js/testsuite/mage/calendar/calendarTest.js
  91. +83 −0 dev/tests/js/testsuite/mage/calendar/daterangeTest.js
  92. +3 −0 dev/tests/static/testsuite/Legacy/_files/obsolete_methods.php
  93. +20 −14 lib/Varien/Data/Form/Element/Date.php
  94. +0 −56 lib/Varien/Date.php
  95. +1 −8 pub/.htaccess
  96. +0 −232 pub/lib/calendar/calendar-blue.css
  97. +0 −236 pub/lib/calendar/calendar-blue2.css
  98. +0 −225 pub/lib/calendar/calendar-brown.css
  99. +0 −229 pub/lib/calendar/calendar-green.css
  100. +0 −21 pub/lib/calendar/calendar-setup.js
  101. +0 −251 pub/lib/calendar/calendar-system.css
  102. +0 −239 pub/lib/calendar/calendar-tas.css
  103. +0 −271 pub/lib/calendar/calendar-win2k-1.css
  104. +0 −271 pub/lib/calendar/calendar-win2k-2.css
  105. +0 −265 pub/lib/calendar/calendar-win2k-cold-1.css
  106. +0 −271 pub/lib/calendar/calendar-win2k-cold-2.css
  107. +0 −1,912 pub/lib/calendar/calendar.js
  108. BIN pub/lib/calendar/img.gif
  109. BIN pub/lib/calendar/menuarrow.gif
  110. BIN pub/lib/calendar/menuarrow2.gif
  111. BIN pub/lib/calendar/skins/aqua/active-bg.gif
  112. BIN pub/lib/calendar/skins/aqua/dark-bg.gif
  113. BIN pub/lib/calendar/skins/aqua/hover-bg.gif
  114. BIN pub/lib/calendar/skins/aqua/menuarrow.gif
  115. BIN pub/lib/calendar/skins/aqua/normal-bg.gif
  116. BIN pub/lib/calendar/skins/aqua/rowhover-bg.gif
  117. BIN pub/lib/calendar/skins/aqua/status-bg.gif
  118. +0 −236 pub/lib/calendar/skins/aqua/theme.css
  119. BIN pub/lib/calendar/skins/aqua/title-bg.gif
  120. BIN pub/lib/calendar/skins/aqua/today-bg.gif
  121. +1,530 −0 pub/lib/jquery/jquery-ui-timepicker-addon.js
  122. +289 −0 pub/lib/mage/calendar.css
  123. +213 −0 pub/lib/mage/calendar.js
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -149,7 +149,7 @@ public static function getVersionInfo()
'revision' => '0',
'patch' => '0',
'stability' => 'dev',
- 'number' => '1',
+ 'number' => '29',
);
}
@@ -80,15 +80,13 @@ protected function _prepareForm()
'disabled' => $isElementDisabled
));
- $dateFormatIso = Mage::app()->getLocale()->getDateFormat(
- Mage_Core_Model_Locale::FORMAT_TYPE_SHORT
- );
+ $dateFormat = Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT);
$designFieldset->addField('custom_theme_from', 'date', array(
'name' => 'custom_theme_from',
'label' => Mage::helper('Mage_Cms_Helper_Data')->__('Custom Design From'),
'image' => $this->getSkinUrl('images/grid-cal.gif'),
- 'format' => $dateFormatIso,
+ 'date_format' => $dateFormat,
'disabled' => $isElementDisabled,
'class' => 'validate-date validate-date-range date-range-custom_theme-from'
));
@@ -97,7 +95,7 @@ protected function _prepareForm()
'name' => 'custom_theme_to',
'label' => Mage::helper('Mage_Cms_Helper_Data')->__('Custom Design To'),
'image' => $this->getSkinUrl('images/grid-cal.gif'),
- 'format' => $dateFormatIso,
+ 'date_format' => $dateFormat,
'disabled' => $isElementDisabled,
'class' => 'validate-date validate-date-range date-range-custom_theme-to'
));
@@ -54,13 +54,14 @@ protected function _prepareForm()
'class' => 'fieldset-wide'
));
- $outputFormat = Mage::app()->getLocale()->getDateTimeFormat(Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM);
+ $dateFormat = Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM);
+ $timeFormat = Mage::app()->getLocale()->getTimeFormat(Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM);
if($queue->getQueueStatus() == Mage_Newsletter_Model_Queue::STATUS_NEVER) {
$fieldset->addField('date', 'date',array(
'name' => 'start_at',
- 'time' => true,
- 'format' => $outputFormat,
+ 'date_format' => $dateFormat,
+ 'time_format' => $timeFormat,
'label' => Mage::helper('Mage_Newsletter_Helper_Data')->__('Queue Date Start'),
'image' => $this->getSkinUrl('images/grid-cal.gif')
));
@@ -83,10 +84,10 @@ protected function _prepareForm()
} else {
$fieldset->addField('date','date',array(
'name' => 'start_at',
- 'time' => true,
'disabled' => 'true',
'style' => 'width:38%;',
- 'format' => $outputFormat,
+ 'date_format' => $dateFormat,
+ 'time_format' => $timeFormat,
'label' => Mage::helper('Mage_Newsletter_Helper_Data')->__('Queue Date Start'),
'image' => $this->getSkinUrl('images/grid-cal.gif')
));
@@ -84,7 +84,7 @@ protected function _prepareColumns()
'width' => '120px',
'type' => 'datetime',
'index' => 'date_posted',
- 'format' => Mage::app()->getLocale()->getDateFormat()
+ 'date_format' => Mage::app()->getLocale()->getDateFormat()
));
$this->addColumn('date_closed', array(
@@ -94,7 +94,7 @@ protected function _prepareColumns()
'type' => 'datetime',
'default' => '--',
'index' => 'date_closed',
- 'format' => Mage::app()->getLocale()->getDateFormat()
+ 'date_format' => Mage::app()->getLocale()->getDateFormat()
));
if (!Mage::app()->isSingleStoreMode()) {
@@ -149,22 +149,22 @@ protected function _prepareForm()
'values' => Mage::getResourceModel('Mage_Customer_Model_Resource_Group_Collection')->toOptionArray()
));
- $dateFormatIso = Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT);
+ $dateFormat = Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT);
$fieldset->addField('from_date', 'date', array(
'name' => 'from_date',
'label' => Mage::helper('Mage_CatalogRule_Helper_Data')->__('From Date'),
'title' => Mage::helper('Mage_CatalogRule_Helper_Data')->__('From Date'),
'image' => $this->getSkinUrl('images/grid-cal.gif'),
'input_format' => Varien_Date::DATE_INTERNAL_FORMAT,
- 'format' => $dateFormatIso
+ 'date_format' => $dateFormat
));
$fieldset->addField('to_date', 'date', array(
'name' => 'to_date',
'label' => Mage::helper('Mage_CatalogRule_Helper_Data')->__('To Date'),
'title' => Mage::helper('Mage_CatalogRule_Helper_Data')->__('To Date'),
'image' => $this->getSkinUrl('images/grid-cal.gif'),
'input_format' => Varien_Date::DATE_INTERNAL_FORMAT,
- 'format' => $dateFormatIso
+ 'date_format' => $dateFormat
));
$fieldset->addField('sort_order', 'text', array(
@@ -202,22 +202,22 @@ protected function _prepareForm()
'label' => Mage::helper('Mage_SalesRule_Helper_Data')->__('Uses per Customer'),
));
- $dateFormatIso = Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT);
+ $dateFormat = Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT);
$fieldset->addField('from_date', 'date', array(
'name' => 'from_date',
'label' => Mage::helper('Mage_SalesRule_Helper_Data')->__('From Date'),
'title' => Mage::helper('Mage_SalesRule_Helper_Data')->__('From Date'),
'image' => $this->getSkinUrl('images/grid-cal.gif'),
'input_format' => Varien_Date::DATE_INTERNAL_FORMAT,
- 'format' => $dateFormatIso
+ 'date_format' => $dateFormat
));
$fieldset->addField('to_date', 'date', array(
'name' => 'to_date',
'label' => Mage::helper('Mage_SalesRule_Helper_Data')->__('To Date'),
'title' => Mage::helper('Mage_SalesRule_Helper_Data')->__('To Date'),
'image' => $this->getSkinUrl('images/grid-cal.gif'),
'input_format' => Varien_Date::DATE_INTERNAL_FORMAT,
- 'format' => $dateFormatIso
+ 'date_format' => $dateFormat
));
$fieldset->addField('sort_order', 'text', array(
@@ -124,7 +124,7 @@ protected function _prepareForm()
$form->setHtmlIdPrefix($htmlIdPrefix);
$fieldset = $form->addFieldset('base_fieldset', array('legend'=>Mage::helper('Mage_Reports_Helper_Data')->__('Filter')));
- $dateFormatIso = Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT);
+ $dateFormat = Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT);
$fieldset->addField('store_ids', 'hidden', array(
'name' => 'store_ids'
@@ -149,7 +149,7 @@ protected function _prepareForm()
$fieldset->addField('from', 'date', array(
'name' => 'from',
- 'format' => $dateFormatIso,
+ 'date_format' => $dateFormat,
'image' => $this->getSkinUrl('images/grid-cal.gif'),
'label' => Mage::helper('Mage_Reports_Helper_Data')->__('From'),
'title' => Mage::helper('Mage_Reports_Helper_Data')->__('From'),
@@ -158,7 +158,7 @@ protected function _prepareForm()
$fieldset->addField('to', 'date', array(
'name' => 'to',
- 'format' => $dateFormatIso,
+ 'date_format' => $dateFormat,
'image' => $this->getSkinUrl('images/grid-cal.gif'),
'label' => Mage::helper('Mage_Reports_Helper_Data')->__('To'),
'title' => Mage::helper('Mage_Reports_Helper_Data')->__('To'),
@@ -43,6 +43,11 @@ class Mage_Adminhtml_Block_Report_Grid extends Mage_Adminhtml_Block_Widget_Grid
protected $_filters = array();
+ /**
+ * @var Mage_Core_Model_Locale
+ */
+ protected $_locale;
+
protected $_defaultFilters = array(
'report_from' => '',
'report_to' => '',
@@ -292,7 +297,7 @@ public function getPeriods()
public function getDateFormat()
{
- return $this->getLocale()->getDateStrFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT);
+ return $this->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT);
}
/**
@@ -176,7 +176,7 @@ protected function _addAttributesToForm($attributes, Varien_Data_Form_Abstract $
} else if ($inputType == 'date') {
$format = Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT);
$element->setImage($this->getSkinUrl('images/grid-cal.gif'));
- $element->setFormat($format);
+ $element->setDateFormat($format);
}
}
}
@@ -228,7 +228,7 @@ public function getStoreCollection()
public function getShortDateFormat()
{
if (!$this->_shortDateFormat) {
- $this->_shortDateFormat = Mage::app()->getLocale()->getDateStrFormat(
+ $this->_shortDateFormat = Mage::app()->getLocale()->getDateFormat(
Mage_Core_Model_Locale::FORMAT_TYPE_SHORT
);
}
@@ -57,21 +57,21 @@ protected function _prepareForm()
'required' => true,
));
- $dateFormatIso = Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT);
+ $dateFormat = Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT);
$fieldset->addField('date_from', 'date', array(
'label' => Mage::helper('Mage_Core_Helper_Data')->__('Date From'),
'title' => Mage::helper('Mage_Core_Helper_Data')->__('Date From'),
'name' => 'date_from',
'image' => $this->getSkinUrl('images/grid-cal.gif'),
- 'format' => $dateFormatIso,
+ 'date_format' => $dateFormat,
//'required' => true,
));
$fieldset->addField('date_to', 'date', array(
'label' => Mage::helper('Mage_Core_Helper_Data')->__('Date To'),
'title' => Mage::helper('Mage_Core_Helper_Data')->__('Date To'),
'name' => 'date_to',
'image' => $this->getSkinUrl('images/grid-cal.gif'),
- 'format' => $dateFormatIso,
+ 'date_format' => $dateFormat,
//'required' => true,
));
@@ -87,9 +87,12 @@ Supported layout update handles (special):
<action method="addJs"><file>lib/ds-sleight.js</file><params>defer</params><if>lt IE 7</if></action>
- <action method="addCss"><file>calendar/calendar-win2k-1.css</file><params/><!--<if/><condition>can_load_calendar_js</condition>--></action>
- <action method="addJs"><file>calendar/calendar.js</file><!--<params/><if/><condition>can_load_calendar_js</condition>--></action>
- <action method="addJs"><file>calendar/calendar-setup.js</file><!--<params/><if/><condition>can_load_calendar_js</condition>--></action>
+ <action method="addCss"><file>mage/calendar.css</file><params/></action>
+ <action method="addJs"><file>jquery/jquery-1.7.1.min.js</file></action>
+ <action method="addJs"><file>mage/jquery-no-conflict.js</file></action>
+ <action method="addJs"><file>jquery/jquery-ui-1.8.18.custom.min.js</file></action>
+ <action method="addJs"><file>jquery/jquery-ui-timepicker-addon.js</file><!--<if/><condition>can_load_calendar_js</condition>--></action>
+ <action method="addJs"><file>mage/calendar.js</file><!--<if/><condition>can_load_calendar_js</condition>--></action>
<action method="addJs"><file>extjs/ext-tree.js</file><params/><if/><condition>can_load_ext_js</condition></action>
<action method="addJs"><file>mage/adminhtml/fix-extjs-defer.js</file><params/><if/><condition>can_load_ext_js</condition></action>
@@ -36,65 +36,42 @@
<script type="text/javascript">
//<![CDATA[
-enUS = <?php echo $enUS?>; // en_US locale reference
-Calendar._DN = <?php echo $days['wide']?>; // full day names
-Calendar._SDN = <?php echo $days['abbreviated']?>; // short day names
-Calendar._FD = <?php echo $firstDay?>; // First day of the week. "0" means display Sunday first, "1" means display Monday first, etc.
-Calendar._MN = <?php echo $months['wide']?>; // full month names
-Calendar._SMN = <?php echo $months['abbreviated']?>; // short month names
-Calendar._am = <?php echo $am ?>; // am/pm
-Calendar._pm = <?php echo $pm ?>;
-
-// tooltips
-Calendar._TT = {};
-Calendar._TT["INFO"] = "<?php echo $this->__('About the calendar');?>";
-
-Calendar._TT["ABOUT"] =
-"<?php echo $this->__('DHTML Date/Time Selector')?>\n" +
-"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" +
-"<?php echo $this->__('For latest version visit: %s', 'http://www.dynarch.com/projects/calendar/')?>\n" +
-"<?php echo $this->__('Distributed under GNU LGPL. See %s for details.', 'http://gnu.org/licenses/lgpl.html')?>" +
-"\n\n" +
-"<?php echo $this->__('Date selection:')?>\n" +
-"<?php echo $this->__('- Use the %s, %s buttons to select year', '\\xab', '\xbb')?>\n" +
-"<?php echo $this->__('- Use the %s buttons to select month', '" + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + "')?>\n" +
-"<?php echo $this->__('- Hold mouse button on any of the above buttons for faster selection.')?>";
-Calendar._TT["ABOUT_TIME"] = "\n\n" +
-"<?php echo $this->__('Time selection:')?>\n" +
-"<?php echo $this->__('- Click on any of the time parts to increase it')?>\n" +
-"<?php echo $this->__('- or Shift-click to decrease it')?>\n" +
-"<?php echo $this->__('- or click and drag for faster selection.')?>";
-
-Calendar._TT["PREV_YEAR"] = "<?php echo $this->__('Prev. year (hold for menu)');?>";
-Calendar._TT["PREV_MONTH"] = "<?php echo $this->__('Prev. month (hold for menu)');?>";
-Calendar._TT["GO_TODAY"] = "<?php echo $this->__('Go Today');?>";
-Calendar._TT["NEXT_MONTH"] = "<?php echo $this->__('Next month (hold for menu)');?>";
-Calendar._TT["NEXT_YEAR"] = "<?php echo $this->__('Next year (hold for menu)');?>";
-Calendar._TT["SEL_DATE"] = "<?php echo $this->__('Select date');?>";
-Calendar._TT["DRAG_TO_MOVE"] = "<?php echo $this->__('Drag to move');?>";
-Calendar._TT["PART_TODAY"] = ' (' + <?php echo $today ?> + ')';
-
-// the following is to inform that "%s" is to be the first day of week
-Calendar._TT["DAY_FIRST"] = "<?php echo $this->__('Display %s first', '%s');?>";
+(function($) {
+ $.extend(true, $, {
+ calendarConfig: {
+ dayNames: <?php echo $days['wide']?>,
+ dayNamesMin: <?php echo $days['abbreviated']?>,
+ monthNames: <?php echo $months['wide']?>,
+ monthNamesShort: <?php echo $months['abbreviated']?>,
+ infoTitle: "<?php echo $this->__('About the calendar');?>",
+ firstDay: <?php echo $firstDay?>,
+ closeText: "<?php echo $this->__('Close');?>",
+ currentText: "<?php echo $this->__('Go Today'); ?>",
+ prevText: "<?php echo $this->__('Previous');?>",
+ nextText: "<?php echo $this->__('Next');?>",
+ weekHeader: "<?php echo $this->__('WK'); ?>",
+ timeText: "<?php echo $this->__('Time');?>",
+ hourText: "<?php echo $this->__('Hour');?>",
+ minuteText: "<?php echo $this->__('Minute');?>",
+ dateFormat: $.datepicker.RFC_2822,
+ showOn: "button",
+ showAnim: "",
+ changeMonth: true,
+ changeYear: true,
+ buttonImageOnly: true,
+ showButtonPanel: true,
+ showWeek: true,
+ timeFormat: '',
+ showTime: false,
+ showHour: false,
+ showMinute: false,
+ localTimezone: <?php echo $this->getTimezoneOffsetSeconds() ?>,
+ serverTimezoneSeconds:<?php echo $this->getStoreTimestamp() ?>
+ }
+ });
+})(jQuery);
-// This may be locale-dependent. It specifies the week-end days, as an array
-// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1
-// means Monday, etc.
-Calendar._TT["WEEKEND"] = <?php echo $weekendDays?>;
-
-Calendar._TT["CLOSE"] = "<?php echo $this->__('Close');?>";
-Calendar._TT["TODAY"] = <?php echo $today ?>;
-Calendar._TT["TIME_PART"] = "<?php echo $this->__('(Shift-)Click or drag to change value');?>";
-
-// date formats
-Calendar._TT["DEF_DATE_FORMAT"] = <?php echo $defaultFormat?>;
-Calendar._TT["TT_DATE_FORMAT"] = <?php echo $toolTipFormat?>;
-
-Calendar._TT["WK"] = <?php echo $week ?>;
-Calendar._TT["TIME"] = "<?php echo $this->__('Time:');?>";
-
-CalendarDateObject._LOCAL_TIMZEONE_OFFSET_SECONDS = <?php echo $this->getTimezoneOffsetSeconds() ?>;
-CalendarDateObject._SERVER_TIMZEONE_SECONDS = <?php echo $this->getStoreTimestamp() ?>;
+enUS = <?php echo $enUS?>; // en_US locale reference
//]]>
</script>
Oops, something went wrong.

0 comments on commit 21af2d4

Please sign in to comment.