Skip to content

Commit

Permalink
Merge pull request #544 from magento-firedrakes/MAGETWO-51824
Browse files Browse the repository at this point in the history
[Firedrakes] Bugfixes
  • Loading branch information
Momotenko,Natalia(nmomotenko) committed Apr 18, 2016
2 parents 6a377bb + 67cc48e commit 8cf5dc6
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ protected function setUp()
false
);
$this->hydratorMock = $this->getMock(
'Magento\Framework\Model\Entity\EntityHydrator',
'Magento\Framework\Model\Entity\Hydrator',
['extract'],
[],
'',
Expand Down
12 changes: 0 additions & 12 deletions app/code/Magento/Catalog/etc/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -542,18 +542,6 @@
</argument>
</arguments>
</type>
<type name="Magento\Framework\Model\OrchestratorPool">
<arguments>
<argument name="operations" xsi:type="array">
<item name="default" xsi:type="array">
<item name="read" xsi:type="string">Magento\Framework\Model\Operation\Read</item>
<item name="create" xsi:type="string">Magento\Framework\EntityManager\Operation\Write\Create</item>
<item name="update" xsi:type="string">Magento\Framework\EntityManager\Operation\Write\Update</item>
<item name="delete" xsi:type="string">Magento\Framework\EntityManager\Operation\Write\Delete</item>
</item>
</argument>
</arguments>
</type>
<type name="Magento\Framework\Model\Entity\RepositoryFactory">
<arguments>
<argument name="entities" xsi:type="array">
Expand Down
17 changes: 11 additions & 6 deletions app/code/Magento/Ui/view/base/web/js/form/element/date.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,12 @@ define([
}

shiftedValue = shiftedValue.format(this.datetimeFormat);
} else {
shiftedValue = '';
}

if (shiftedValue !== this.shiftedValue()) {
this.shiftedValue(shiftedValue);
}
if (shiftedValue !== this.shiftedValue()) {
this.shiftedValue(shiftedValue);
}
},

Expand All @@ -130,17 +132,20 @@ define([
var value;

if (shiftedValue) {

if (this.showsTime) {
value = moment.utc(shiftedValue, this.datetimeFormat);
value = value.subtract(this.timeOffset, 'seconds').toISOString();
} else {
value = moment(shiftedValue, this.datetimeFormat);
value = value.format(this.outputDateFormat);
}
} else {
value = '';
}

if (value !== this.value()) {
this.value(value);
}
if (value !== this.value()) {
this.value(value);
}
},

Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Ui/view/base/web/js/modal/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@ define([
this._createOverlay();
this._setActive();
this._setKeyListener();
this.modal.one(this.options.transitionEvent, _.bind(this._trigger, this, 'opened'));
this.modal.one(this.options.transitionEvent, _.bind(this._setFocus, this, 'end', 'opened'));
this.modal.one(this.options.transitionEvent, _.bind(this._trigger, this, 'opened'));
this.modal.addClass(this.options.modalVisibleClass);

if (!this.options.transitionEvent) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ CalendarTest.prototype.testDateTimeMapping = function() {
/*:DOC += <input type="text" id="calendar" /> */
var calendar = $('#calendar').calendar({dateFormat: 'M/d/yy', timeFormat: 'h:mm a'});
assertEquals('mm/d/yy', calendar.calendar('option', 'dateFormat'));
assertEquals('h:mm tt', calendar.calendar('option', 'timeFormat'));
assertEquals('h:mm TT', calendar.calendar('option', 'timeFormat'));
calendar.calendar('destroy');
calendar.calendar({dateFormat: 'MMMM/EEEE/yyyy', timeFormat: 'HH:mm'});
assertEquals('MM/DD/yy', calendar.calendar('option', 'dateFormat'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class CallbackHandler
protected $logger;

/**
* CommitCallback constructor.
* CallbackHandler constructor.
*
* @param MetadataPool $metadataPool
* @param LoggerInterface $logger
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

namespace Magento\Framework\EntityManager\Operation\Write;

use Magento\Framework\EntityManager\Operation\Write\Create\ValidateCreate;
use Magento\Framework\EntityManager\Operation\Write\Create\CreateMain;
use Magento\Framework\EntityManager\Operation\Write\Create\CreateAttributes;
use Magento\Framework\EntityManager\Operation\Write\Create\CreateExtensions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

namespace Magento\Framework\EntityManager\Operation\Write;

use Magento\Framework\EntityManager\Operation\Write\Delete\ValidateDelete;
use Magento\Framework\EntityManager\Operation\Write\Delete\DeleteMain;
use Magento\Framework\EntityManager\Operation\Write\Delete\DeleteAttributes;
use Magento\Framework\EntityManager\Operation\Write\Delete\DeleteExtensions;
Expand All @@ -17,6 +16,8 @@

/**
* Class Delete
*
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
*/
class Delete
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

namespace Magento\Framework\EntityManager\Operation\Write;

use Magento\Framework\EntityManager\Operation\Write\Update\ValidateUpdate;
use Magento\Framework\EntityManager\Operation\Write\Update\UpdateMain;
use Magento\Framework\EntityManager\Operation\Write\Update\UpdateAttributes;
use Magento\Framework\EntityManager\Operation\Write\Update\UpdateExtensions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class OperationPool
private $objectManager;

/**
* OrchestratorPool constructor.
* OperationPool constructor.
* @param ObjectManager $objectManager
* @param string[] $operations
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/web/mage/calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@
'yy': 'yy' // Always long year format on frontend
},
time: {
'a': 'tt',
'a': 'TT',
'HH': 'hh',
'H': 'h'
}
Expand Down

0 comments on commit 8cf5dc6

Please sign in to comment.