Skip to content

Commit

Permalink
2.0.0.0-dev29
Browse files Browse the repository at this point in the history
* 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
magento-team committed Oct 24, 2012
1 parent 784be09 commit 21af2d4
Show file tree
Hide file tree
Showing 123 changed files with 4,438 additions and 5,776 deletions.
135 changes: 77 additions & 58 deletions CHANGELOG.markdown

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/Mage.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public static function getVersionInfo()
'revision' => '0',
'patch' => '0',
'stability' => 'dev',
'number' => '1',
'number' => '29',
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'
));
Expand All @@ -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'
));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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')
));
Expand All @@ -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')
));
Expand Down
4 changes: 2 additions & 2 deletions app/code/core/Mage/Adminhtml/Block/Poll/Grid.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
6 changes: 3 additions & 3 deletions app/code/core/Mage/Adminhtml/Block/Report/Filter/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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'),
Expand All @@ -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'),
Expand Down
7 changes: 6 additions & 1 deletion app/code/core/Mage/Adminhtml/Block/Report/Grid.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' => '',
Expand Down Expand Up @@ -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);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
));

Expand Down
9 changes: 6 additions & 3 deletions app/code/core/Mage/Adminhtml/view/adminhtml/main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
93 changes: 35 additions & 58 deletions app/code/core/Mage/Adminhtml/view/adminhtml/page/js/calendar.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Loading

0 comments on commit 21af2d4

Please sign in to comment.