Skip to content

Commit

Permalink
Merge pull request #219 from magento-vanilla/MAGETWO-44467
Browse files Browse the repository at this point in the history
[Vanilla] Tasks
  • Loading branch information
guz-anton committed Dec 1, 2015
2 parents 6969b54 + 4e447c1 commit bf4e733
Show file tree
Hide file tree
Showing 145 changed files with 3,116 additions and 3,070 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,59 +21,28 @@
<argument name="requestFieldName" xsi:type="string">id</argument>
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/grid/provider</item>
<item name="update_url" xsi:type="url" path="mui/index/render"/>
</item>
</argument>
</argument>
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/grid/provider</item>
</item>
</argument>
</dataSource>
<container name="listing_top">
<listingToolbar name="listing_top">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="template" xsi:type="string">ui/grid/toolbar</item>
<item name="sticky" xsi:type="boolean">true</item>
</item>
</argument>
<bookmark name="bookmarks">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="storageConfig" xsi:type="array">
<item name="namespace" xsi:type="string">product_listing</item>
</item>
</item>
</argument>
</bookmark>
<component name="columns_controls">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/grid/controls/columns</item>
<item name="displayArea" xsi:type="string">dataGridActions</item>
<item name="columnsData" xsi:type="array">
<item name="provider" xsi:type="string">product_listing.product_listing.product_columns</item>
</item>
</item>
</argument>
</component>
<bookmark name="bookmarks"/>
<columnsControls name="columns_controls"/>
<filters name="listing_filters">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="columnsProvider" xsi:type="string">product_listing.product_listing.product_columns</item>
<item name="storageConfig" xsi:type="array">
<item name="provider" xsi:type="string">product_listing.product_listing.listing_top.bookmarks</item>
<item name="namespace" xsi:type="string">current.filters</item>
</item>
</item>
</argument>
<filterSelect name="store_id">
<argument name="optionsProvider" xsi:type="configurableObject">
<argument name="class" xsi:type="string">Magento\Store\Ui\Component\Listing\Column\Store\Options</argument>
</argument>
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="provider" xsi:type="string">product_listing.product_listing.listing_top.listing_filters</item>
<item name="provider" xsi:type="string">${ $.parentName }</item>
<item name="dataScope" xsi:type="string">store_id</item>
<item name="caption" xsi:type="string" translate="true">All Store Views</item>
<item name="label" xsi:type="string" translate="true">Store View</item>
Expand All @@ -84,9 +53,7 @@
<massaction name="listing_massaction">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="selectProvider" xsi:type="string">product_listing.product_listing.product_columns.ids</item>
<item name="component" xsi:type="string">Magento_Ui/js/grid/tree-massactions</item>
<item name="indexField" xsi:type="string">entity_id</item>
</item>
</argument>
<action name="delete">
Expand Down Expand Up @@ -136,25 +103,11 @@
</argument>
</action>
</massaction>
<paging name="listing_paging">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="selectProvider" xsi:type="string">product_listing.product_listing.product_columns.ids</item>
<item name="storageConfig" xsi:type="array">
<item name="provider" xsi:type="string">product_listing.product_listing.listing_top.bookmarks</item>
<item name="namespace" xsi:type="string">current.paging</item>
</item>
</item>
</argument>
</paging>
</container>
<paging name="listing_paging"/>
</listingToolbar>
<columns name="product_columns" class="Magento\Catalog\Ui\Component\Listing\Columns">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="storageConfig" xsi:type="array">
<item name="provider" xsi:type="string">product_listing.product_listing.listing_top.bookmarks</item>
<item name="namespace" xsi:type="string">current</item>
</item>
<item name="childDefaults" xsi:type="array">
<item name="fieldAction" xsi:type="array">
<item name="provider" xsi:type="string">product_listing.product_listing.product_columns.actions</item>
Expand All @@ -164,11 +117,6 @@
<item name="1" xsi:type="string">${ $.$data.rowIndex }</item>
</item>
</item>
<item name="storageConfig" xsi:type="array">
<item name="provider" xsi:type="string">product_listing.product_listing.listing_top.bookmarks</item>
<item name="root" xsi:type="string">columns.${ $.index }</item>
<item name="namespace" xsi:type="string">current.${ $.storageConfig.root}</item>
</item>
</item>
</item>
</argument>
Expand Down
5 changes: 1 addition & 4 deletions app/code/Magento/Checkout/view/frontend/requirejs-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,5 @@ var config = {
checkoutData: 'Magento_Checkout/js/checkout-data',
proceedToCheckout: 'Magento_Checkout/js/proceed-to-checkout'
}
},
deps: [
"Magento_Checkout/js/checkout-loader"
]
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// @codingStandardsIgnoreFile
?>
<div id="checkout" data-bind="scope:'checkout'" class="checkout-container">
<div id="checkout-loader" data-role="checkout-loader" class="loading-mask">
<div id="checkout-loader" data-role="checkout-loader" class="loading-mask" data-mage-init='{"checkoutLoader": {}}'>
<div class="loader">
<img src="<?php /* @escapeNotVerified */ echo $block->getViewFileUrl('images/loader-1.gif'); ?>"
alt="<?php /* @escapeNotVerified */ echo __('Loading...'); ?>"
Expand Down
49 changes: 22 additions & 27 deletions app/code/Magento/Checkout/view/frontend/web/js/checkout-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,29 @@
* Copyright © 2015 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
/*jslint browser: true*/
(function () {
define([
'rjsResolver'
], function (resolver) {
'use strict';

var checkInterval;
/**
* Removes provided loader element from DOM.
*
* @param {HTMLElement} $loader - Loader DOM element.
*/
function hideLoader($loader) {
$loader.parentNode.removeChild($loader);
}

checkInterval = setInterval(function () {
var checkoutContainer = document.getElementById('checkoutSteps'),
steps,
loaderContainer;
/**
* Initializes assets loading process listener.
*
* @param {Object} config - Optional configuration
* @param {HTMLElement} $loader - Loader DOM element.
*/
function init(config, $loader) {
resolver(hideLoader.bind(null, $loader));
}

//Return if checkout steps container not loaded
if (!checkoutContainer) {
return;
}

//Checkout steps
steps = checkoutContainer.getElementsByTagName('li');

//Remove loader and clear update interval if content loaded
if (steps && steps.length > 0) {
clearInterval(checkInterval);
loaderContainer = document.getElementById('checkout-loader');

if (loaderContainer && loaderContainer.parentNode) {
loaderContainer.parentNode.removeChild(loaderContainer);
}
}

}, 100);
})();
return init;
});
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
*/
/*jshint browser:true jquery:true*/
/*global alert*/
define(
['jquery'],
function ($) {
define([
'jquery',
'rjsResolver'
], function ($, resolver) {
'use strict';

var containerId = '#checkout';
Expand All @@ -22,9 +23,14 @@ define(

/**
* Stop full page loader action
*
* @param {Boolean} forceStop
*/
stopLoader: function () {
$(containerId).trigger('processStop');
stopLoader: function (forceStop) {
var $elem = $(containerId),
stop = $elem.trigger.bind($elem, 'processStop');

forceStop ? stop() : resolver(stop);
}
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,62 +29,27 @@
<argument name="requestFieldName" xsi:type="string">id</argument>
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/grid/provider</item>
<item name="update_url" xsi:type="url" path="mui/index/render"/>
<item name="storageConfig" xsi:type="array">
<item name="indexField" xsi:type="string">block_id</item>
</item>
</item>
</argument>
</argument>
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/grid/provider</item>
</item>
</argument>
</dataSource>
<container name="listing_top">
<listingToolbar name="listing_top">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="template" xsi:type="string">ui/grid/toolbar</item>
<item name="sticky" xsi:type="boolean">true</item>
</item>
</argument>
<bookmark name="bookmarks">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="storageConfig" xsi:type="array">
<item name="namespace" xsi:type="string">cms_block_listing</item>
</item>
</item>
</argument>
</bookmark>
<component name="columns_controls">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="columnsData" xsi:type="array">
<item name="provider" xsi:type="string">cms_block_listing.cms_block_listing.cms_block_columns</item>
</item>
<item name="component" xsi:type="string">Magento_Ui/js/grid/controls/columns</item>
<item name="displayArea" xsi:type="string">dataGridActions</item>
</item>
</argument>
</component>
<filterSearch name="fulltext">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="provider" xsi:type="string">cms_block_listing.cms_block_listing_data_source</item>
<item name="chipsProvider" xsi:type="string">cms_block_listing.cms_block_listing.listing_top.listing_filters_chips</item>
<item name="storageConfig" xsi:type="array">
<item name="provider" xsi:type="string">cms_block_listing.cms_block_listing.listing_top.bookmarks</item>
<item name="namespace" xsi:type="string">current.search</item>
</item>
</item>
</argument>
</filterSearch>
<bookmark name="bookmarks"/>
<columnsControls name="columns_controls"/>
<filterSearch name="fulltext"/>
<filters name="listing_filters">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="columnsProvider" xsi:type="string">cms_block_listing.cms_block_listing.cms_block_columns</item>
<item name="storageConfig" xsi:type="array">
<item name="provider" xsi:type="string">cms_block_listing.cms_block_listing.listing_top.bookmarks</item>
<item name="namespace" xsi:type="string">current.filters</item>
</item>
<item name="templates" xsi:type="array">
<item name="filters" xsi:type="array">
<item name="select" xsi:type="array">
Expand All @@ -93,12 +58,6 @@
</item>
</item>
</item>
<item name="childDefaults" xsi:type="array">
<item name="provider" xsi:type="string">cms_block_listing.cms_block_listing.listing_top.listing_filters</item>
<item name="imports" xsi:type="array">
<item name="visible" xsi:type="string">cms_block_listing.cms_block_listing.cms_block_columns.${ $.index }:visible</item>
</item>
</item>
</item>
</argument>
<filterSelect name="store_id">
Expand All @@ -107,6 +66,10 @@
</argument>
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="provider" xsi:type="string">${ $.parentName }</item>
<item name="imports" xsi:type="array">
<item name="visible" xsi:type="string">componentType = column, index = ${ $.index }:visible</item>
</item>
<item name="dataScope" xsi:type="string">store_id</item>
<item name="label" xsi:type="string" translate="true">Store View</item>
<item name="captionValue" xsi:type="string">0</item>
Expand All @@ -115,12 +78,6 @@
</filterSelect>
</filters>
<massaction name="listing_massaction">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="selectProvider" xsi:type="string">cms_block_listing.cms_block_listing.cms_block_columns.ids</item>
<item name="indexField" xsi:type="string">block_id</item>
</item>
</argument>
<action name="delete">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
Expand All @@ -147,25 +104,11 @@
</argument>
</action>
</massaction>
<paging name="listing_paging">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="storageConfig" xsi:type="array">
<item name="provider" xsi:type="string">cms_block_listing.cms_block_listing.listing_top.bookmarks</item>
<item name="namespace" xsi:type="string">current.paging</item>
</item>
<item name="selectProvider" xsi:type="string">cms_block_listing.cms_block_listing.cms_block_columns.ids</item>
</item>
</argument>
</paging>
</container>
<paging name="listing_paging"/>
</listingToolbar>
<columns name="cms_block_columns">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="storageConfig" xsi:type="array">
<item name="provider" xsi:type="string">cms_block_listing.cms_block_listing.listing_top.bookmarks</item>
<item name="namespace" xsi:type="string">current</item>
</item>
<item name="editorConfig" xsi:type="array">
<item name="selectProvider" xsi:type="string">cms_block_listing.cms_block_listing.cms_block_columns.ids</item>
<item name="enabled" xsi:type="boolean">true</item>
Expand All @@ -184,11 +127,6 @@
<item name="1" xsi:type="boolean">true</item>
</item>
</item>
<item name="storageConfig" xsi:type="array">
<item name="provider" xsi:type="string">cms_block_listing.cms_block_listing.listing_top.bookmarks</item>
<item name="root" xsi:type="string">columns.${ $.index }</item>
<item name="namespace" xsi:type="string">current.${ $.storageConfig.root }</item>
</item>
</item>
</item>
</argument>
Expand Down
Loading

0 comments on commit bf4e733

Please sign in to comment.