Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:magento/magento2ce into MAGETWO-…
Browse files Browse the repository at this point in the history
…64523
  • Loading branch information
rganin committed Feb 15, 2017
2 parents abaf0b3 + cb93edb commit 9f63978
Show file tree
Hide file tree
Showing 461 changed files with 20,671 additions and 15,263 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Use the following table to verify you have the correct prerequisites to install
<td><a href="http://devdocs.magento.com/guides/v2.0/install-gde/prereq/apache.html">Apache</a></td>
</tr>
<tr>
<td>PHP 5.6.x, 7.0.2 or 7.0.6</td>
<td>PHP 5.6.x, 7.0.2, 7.0.4 or 7.0.6</td>
<td><code>php -v</code></td>
<td><a href="http://devdocs.magento.com/guides/v2.0/install-gde/prereq/php-ubuntu.html">PHP Ubuntu</a><br><a href="http://devdocs.magento.com/guides/v2.0/install-gde/prereq/php-centos.html">PHP CentOS</a></td>
</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/

define([
'jquery',
'mage/template',
Expand All @@ -15,20 +16,22 @@ define([
modalClass: 'modal-system-messages',
systemMessageTemplate:
'<% _.each(data.items, function(item) { %>' +
'<li class="message message-warning <% if (item.severity == 1) { %>error<% } else { %>warning<% } %>">' +
'<li class="message message-warning' +
'<% if (item.severity == 1) { %>error<% } else { %>warning<% } %>">' +
'<%= item.text %>' +
'</li>' +
'<% }); %>'
},

_create: function() {
/** @inheritdoc */
_create: function () {
this.options.title = $('#message-system-all').attr('title');
this._super();
},

/** @inheritdoc */
openModal: function (severity) {
var superMethod = $.proxy(this._super, this);
//this.modal.options

$.ajax({
url: this.options.ajaxUrl,
Expand Down Expand Up @@ -56,6 +59,8 @@ define([

return this;
},

/** @inheritdoc */
closeModal: function () {
this._super();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,22 @@
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/

define([
"jquery",
"jquery/ui",
"domReady!"
'jquery',
'jquery/ui',
'domReady!'
], function ($) {
'use strict';

// Mark notification as read via AJAX call
/**
* Mark notification as read via AJAX call.
*
* @param {String} notificationId
*/
var markNotificationAsRead = function (notificationId) {
var requestUrl = $('.notifications-wrapper .admin__action-dropdown-menu').attr('data-mark-as-read-url');

$.ajax({
url: requestUrl,
type: 'POST',
Expand All @@ -22,19 +28,24 @@ define([
showLoader: false
});
},

notificationCount = $('.notifications-wrapper').attr('data-notification-count'),

// Remove notification from the list
/**
* Remove notification from the list.
*
* @param {jQuery} notificationEntry
*/
removeNotificationFromList = function (notificationEntry) {
var notificationIcon, actionElement;

notificationEntry.remove();
notificationCount--;
$('.notifications-wrapper').attr('data-notification-count', notificationCount);

if (notificationCount == 0) {
if (notificationCount == 0) {// eslint-disable-line eqeqeq
// Change appearance of the bubble and its behavior when the last notification is removed
$('.notifications-wrapper .admin__action-dropdown-menu').remove();
var notificationIcon = $('.notifications-wrapper .notifications-icon');
notificationIcon = $('.notifications-wrapper .notifications-icon');
notificationIcon.removeAttr('data-toggle');
notificationIcon.off('click.dropdown');
$('.notifications-action .notifications-counter').text('').hide();
Expand All @@ -45,12 +56,16 @@ define([
}
$('.notifications-entry-last .notifications-counter').text(notificationCount);
// Modify caption of the 'See All' link
var actionElement = $('.notifications-wrapper .admin__action-dropdown-menu .last .action-more');
actionElement = $('.notifications-wrapper .admin__action-dropdown-menu .last .action-more');
actionElement.text(actionElement.text().replace(/\d+/, notificationCount));
}
},

// Show notification details
/**
* Show notification details.
*
* @param {jQuery} notificationEntry
*/
showNotificationDetails = function (notificationEntry) {
var notificationDescription = notificationEntry.find('.notifications-entry-description'),
notificationDescriptionEnd = notificationEntry.find('.notifications-entry-description-end');
Expand All @@ -59,20 +74,22 @@ define([
notificationDescriptionEnd.addClass('_show');
}

if(notificationDescription.hasClass('_cutted')) {
if (notificationDescription.hasClass('_cutted')) {
notificationDescription.removeClass('_cutted');
}
};

// Show notification description when corresponding item is clicked
$('.notifications-wrapper .admin__action-dropdown-menu .notifications-entry').on('click.showNotification', function (event) {
// hide notification dropdown
$('.notifications-wrapper .notifications-icon').trigger('click.dropdown');
$('.notifications-wrapper .admin__action-dropdown-menu .notifications-entry').on(
'click.showNotification',
function (event) {
// hide notification dropdown
$('.notifications-wrapper .notifications-icon').trigger('click.dropdown');

showNotificationDetails($(this));
event.stopPropagation();

});
showNotificationDetails($(this));
event.stopPropagation();
}
);

// Remove corresponding notification from the list and mark it as read
$('.notifications-close').on('click.removeNotification', function (event) {
Expand All @@ -83,19 +100,19 @@ define([
removeNotificationFromList(notificationEntry);

// Checking for last unread notification to hide dropdown
if (notificationCount == 0) {
if (notificationCount == 0) {// eslint-disable-line eqeqeq
$('.notifications-wrapper').removeClass('active')
.find('.notifications-action').removeAttr('data-toggle')
.off('click.dropdown');
.find('.notifications-action')
.removeAttr('data-toggle')
.off('click.dropdown');
}
event.stopPropagation();
});

// Hide notifications bubble
if (notificationCount == 0) {
if (notificationCount == 0) {// eslint-disable-line eqeqeq
$('.notifications-action .notifications-counter').hide();
} else {
$('.notifications-action .notifications-counter').show();
}

});
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/

(function (factory) {
if (typeof define === 'function' && define.amd) {
define([
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,21 @@
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
/*browser:true*/
/*global define*/
define(
[
'uiComponent',
'Magento_Checkout/js/model/payment/renderer-list'
],
function (
Component,
rendererList
) {
'use strict';
rendererList.push(
{
type: 'authorizenet_directpost',
component: 'Magento_Authorizenet/js/view/payment/method-renderer/authorizenet-directpost'
}
);
/** Add view logic here if needed */
return Component.extend({});
}
);

define([
'uiComponent',
'Magento_Checkout/js/model/payment/renderer-list'
],
function (Component, rendererList) {
'use strict';

rendererList.push(
{
type: 'authorizenet_directpost',
component: 'Magento_Authorizenet/js/view/payment/method-renderer/authorizenet-directpost'
}
);

/** Add view logic here if needed */
return Component.extend({});
});
Original file line number Diff line number Diff line change
Expand Up @@ -2,64 +2,63 @@
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
define(
[
'jquery',
'Magento_Payment/js/view/payment/iframe',
'mage/translate'
],
function ($, Component, $t) {
'use strict';

return Component.extend({
defaults: {
template: 'Magento_Authorizenet/payment/authorizenet-directpost',
timeoutMessage: $t('Sorry, but something went wrong. Please contact the seller.')
},
placeOrderHandler: null,
validateHandler: null,
define([
'jquery',
'Magento_Payment/js/view/payment/iframe',
'mage/translate'
],
function ($, Component, $t) {
'use strict';

/**
* @param {Object} handler
*/
setPlaceOrderHandler: function (handler) {
this.placeOrderHandler = handler;
},
return Component.extend({
defaults: {
template: 'Magento_Authorizenet/payment/authorizenet-directpost',
timeoutMessage: $t('Sorry, but something went wrong. Please contact the seller.')
},
placeOrderHandler: null,
validateHandler: null,

/**
* @param {Object} handler
*/
setValidateHandler: function (handler) {
this.validateHandler = handler;
},
/**
* @param {Object} handler
*/
setPlaceOrderHandler: function (handler) {
this.placeOrderHandler = handler;
},

/**
* @returns {Object}
*/
context: function () {
return this;
},
/**
* @param {Object} handler
*/
setValidateHandler: function (handler) {
this.validateHandler = handler;
},

/**
* @returns {Boolean}
*/
isShowLegend: function () {
return true;
},
/**
* @returns {Object}
*/
context: function () {
return this;
},

/**
* @returns {String}
*/
getCode: function () {
return 'authorizenet_directpost';
},
/**
* @returns {Boolean}
*/
isShowLegend: function () {
return true;
},

/**
* @returns {Boolean}
*/
isActive: function () {
return true;
}
});
}
);
/**
* @returns {String}
*/
getCode: function () {
return 'authorizenet_directpost';
},

/**
* @returns {Boolean}
*/
isActive: function () {
return true;
}
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
/*eslint no-unused-vars: 0*/

var config = {
map: {
'*': {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/

require([
"Magento_Variable/variables",
"mage/adminhtml/browser"
'Magento_Variable/variables',
'mage/adminhtml/browser'
]);
Loading

0 comments on commit 9f63978

Please sign in to comment.