Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[INTERNAL] sap.f.GridContainer: Rename CardContainer to GridContainer
Change-Id: Ib1f3484c93d6fa3c4daff17ae03a19bd2e55275b
JIRA: BGSOFUIRODOPI-1950
  • Loading branch information
alexandar-mitsev committed Mar 20, 2019
1 parent f3be780 commit 5d5feba
Show file tree
Hide file tree
Showing 21 changed files with 115 additions and 115 deletions.
Expand Up @@ -6,15 +6,15 @@ sap.ui.define([
"sap/ui/base/ManagedObjectObserver",
'sap/ui/core/ResizeHandler',
"sap/ui/core/delegate/ItemNavigation",
"sap/f/CardContainerRenderer",
"sap/f/GridContainerRenderer",
"sap/ui/Device",
"sap/ui/layout/cssgrid/VirtualGrid"

], function (Control,
ManagedObjectObserver,
ResizeHandler,
ItemNavigation,
CardContainerRenderer,
GridContainerRenderer,
Device,
VirtualGrid) {
"use strict";
Expand All @@ -37,7 +37,7 @@ sap.ui.define([
}

/**
* Constructor for a new <code>CardContainer</code>.
* Constructor for a new <code>GridContainer</code>.
*
* @param {string} [sId] ID for the new control, generated automatically if no ID is given
* @param {object} [mSettings] Initial settings for the new control
Expand All @@ -62,10 +62,10 @@ sap.ui.define([
* @experimental
* @since 1.62
* @see {@link TODO Card}
* @alias sap.f.CardContainer
* @alias sap.f.GridContainer
* @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel
*/
var CardContainer = Control.extend("sap.f.CardContainer", /** @lends sap.f.CardContainer.prototype */ {
var GridContainer = Control.extend("sap.f.GridContainer", /** @lends sap.f.GridContainer.prototype */ {
metadata: {
library: "sap.f",
properties: {
Expand All @@ -91,7 +91,7 @@ sap.ui.define([
}
});

CardContainer.prototype._onBeforeItemRendering = function () {
GridContainer.prototype._onBeforeItemRendering = function () {
var container = this.getParent(),
resizeListenerId = container._resizeListeners[this.getId()];

Expand All @@ -102,7 +102,7 @@ sap.ui.define([
delete container._resizeListeners[this.getId()];
};

CardContainer.prototype._onAfterItemRendering = function () {
GridContainer.prototype._onAfterItemRendering = function () {
var container = this.getParent(),
itemColumnCount = getItemColumnCount(this);

Expand All @@ -126,7 +126,7 @@ sap.ui.define([
container._applyLayout();
};

CardContainer.prototype._onItemChange = function (changes) {
GridContainer.prototype._onItemChange = function (changes) {
if (changes.name !== "items" || !changes.child) {
return;
}
Expand All @@ -138,7 +138,7 @@ sap.ui.define([
}
};

CardContainer.prototype._deregisterResizeListeners = function () {
GridContainer.prototype._deregisterResizeListeners = function () {
var key,
id;

Expand All @@ -150,7 +150,7 @@ sap.ui.define([
delete this._resizeListeners;
};

CardContainer.prototype._setItemNavigationItems = function () {
GridContainer.prototype._setItemNavigationItems = function () {
if (!this._isRenderingFinished) {
return;
}
Expand All @@ -161,7 +161,7 @@ sap.ui.define([
// }));
};

CardContainer.prototype.init = function () {
GridContainer.prototype.init = function () {

this._resizeListeners = {};

Expand All @@ -183,7 +183,7 @@ sap.ui.define([
this.addDelegate(this._itemNavigation);
};

CardContainer.prototype.onBeforeRendering = function () {
GridContainer.prototype.onBeforeRendering = function () {
var resizeListenerId = this._resizeListeners[this.getId()];
if (resizeListenerId) {
ResizeHandler.deregister(resizeListenerId);
Expand All @@ -192,7 +192,7 @@ sap.ui.define([
this._isRenderingFinished = false;
};

CardContainer.prototype.onAfterRendering = function () {
GridContainer.prototype.onAfterRendering = function () {
this._resizeListeners[this.getId()] = ResizeHandler.register(this.getDomRef(), this._resizeHandler);

this._isRenderingFinished = true;
Expand All @@ -201,7 +201,7 @@ sap.ui.define([
this._applyLayout();
};

CardContainer.prototype.exit = function () {
GridContainer.prototype.exit = function () {
this._deregisterResizeListeners();

if (this._itemsObserver) {
Expand All @@ -216,11 +216,11 @@ sap.ui.define([
}
};

CardContainer.prototype._resize = function () {
GridContainer.prototype._resize = function () {
this._applyLayout();
};

CardContainer.prototype._applyLayout = function () {
GridContainer.prototype._applyLayout = function () {
if (!this._isRenderingFinished) {
return;
}
Expand All @@ -240,7 +240,7 @@ sap.ui.define([

};

CardContainer.prototype._applyIEPolyfillLayout = function () {
GridContainer.prototype._applyIEPolyfillLayout = function () {

var $that = this.$(),
width = $that.innerWidth(),
Expand Down Expand Up @@ -291,5 +291,5 @@ sap.ui.define([
$that.css("height", virtualGrid.getHeight() + "px");
};

return CardContainer;
return GridContainer;
});
Expand Up @@ -2,29 +2,29 @@
* ${copyright}
*/

// Provides element sap.f.CardItemLayoutData
// Provides element sap.f.GridContainerItemLayoutData
sap.ui.define(['sap/ui/core/LayoutData'],
function(LayoutData) {
"use strict";

/**
* Constructor for a new <code>sap.f.CardItemLayoutData</code>.
* Constructor for a new <code>sap.f.GridContainerItemLayoutData</code>.
*
* @param {string} [sId] ID for the new element, generated automatically if no ID is given
* @param {object} [mSettings] Initial settings for the new element.
*
* @class
* Holds layout data for a CardContainer.
* Holds layout data for a GridContainer.
* @extends sap.ui.core.LayoutData
* @version ${version}
*
* @constructor
* @since 1.62
* @see {@link TODO Card}
* @alias sap.f.CardItemLayoutData
* @alias sap.f.GridContainerItemLayoutData
* @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel
*/
var CardItemLayoutData = LayoutData.extend("sap.f.CardItemLayoutData", /** @lends sap.f.CardItemLayoutData.prototype */ {
var GridContainerItemLayoutData = LayoutData.extend("sap.f.GridContainerItemLayoutData", /** @lends sap.f.GridContainerItemLayoutData.prototype */ {
metadata: {

library: "sap.f",
Expand All @@ -37,5 +37,5 @@ sap.ui.define(['sap/ui/core/LayoutData'],
}
});

return CardItemLayoutData;
return GridContainerItemLayoutData;
});
Expand Up @@ -7,23 +7,23 @@ sap.ui.define([],
"use strict";

/**
* CardContainer renderer
* GridContainer renderer
* @namespace
*/
var CardContainerRenderer = {};
var GridContainerRenderer = {};

/**
* Renders the HTML for the given control, using the provided {@link sap.ui.core.RenderManager}.
*
* @param {sap.ui.core.RenderManager} rm the RenderManager that can be used for writing to the render output buffer
* @param {sap.ui.core.Control} control an object representation of the control that should be rendered
*/
CardContainerRenderer.render = function(rm, control) {
GridContainerRenderer.render = function(rm, control) {

rm.write('<div');
rm.writeControlData(control);

rm.addClass("sapFCardContainer");
rm.addClass("sapFGridContainer");
rm.writeClasses();

// Add inline styles
Expand Down Expand Up @@ -54,6 +54,6 @@ sap.ui.define([],
rm.write("</div>");
};

return CardContainerRenderer;
return GridContainerRenderer;

}, /* bExport= */ true);
4 changes: 2 additions & 2 deletions src/sap.f/src/sap/f/library.js
Expand Up @@ -36,7 +36,7 @@ sap.ui.define(["sap/ui/base/DataType",
"sap.f.cards.NumericHeader",
"sap.f.cards.NumericSideIndicator",
"sap.f.Card",
"sap.f.CardContainer",
"sap.f.GridContainer",
"sap.f.DynamicPage",
"sap.f.DynamicPageHeader",
"sap.f.DynamicPageTitle",
Expand All @@ -46,7 +46,7 @@ sap.ui.define(["sap/ui/base/DataType",
"sap.f.ShellBar"
],
elements: [
"sap.f.CardItemLayoutData",
"sap.f.GridContainerItemLayoutData",
"sap.f.semantic.AddAction",
"sap.f.semantic.CloseAction",
"sap.f.semantic.CopyAction",
Expand Down
@@ -1,8 +1,8 @@
/* ================================== */
/* CSS for control sap.f/CardContainer */
/* CSS for control sap.f/GridContainer */
/* Base theme */
/* ================================== */
.sapFCardContainer {
.sapFGridContainer {
position: relative;
display: grid;
grid-template-columns: repeat(auto-fill, 5rem);
Expand Down
2 changes: 1 addition & 1 deletion src/sap.f/src/sap/f/themes/base/library.source.less
Expand Up @@ -10,7 +10,7 @@
@import "DynamicPageTitle.less";
@import "DynamicPageHeader.less";
@import "Card.less";
@import "CardContainer.less";
@import "GridContainer.less";
@import "FlexibleColumnLayout.less";
@import "SemanticPage.less";
@import "GridList.less";
Expand Down
Expand Up @@ -3,7 +3,7 @@ sap.ui.define([
], function (Controller) {
"use strict";

return Controller.extend("sap.f.cardsVisualTests.controller.CardContainer", {
return Controller.extend("sap.f.cardsVisualTests.controller.GridContainer", {

});
});
12 changes: 6 additions & 6 deletions src/sap.f/test/sap/f/cardsVisualTests/manifest.json
Expand Up @@ -143,9 +143,9 @@
"target": "customContent"
},
{
"pattern": "cardContainer",
"name": "cardContainer",
"target": "cardContainer"
"pattern": "gridContainer",
"name": "gridContainer",
"target": "gridContainer"
},
{
"pattern": "services",
Expand Down Expand Up @@ -229,9 +229,9 @@
"viewName": "Custom",
"viewLevel": 1
},
"cardContainer": {
"viewId": "CardContainer",
"viewName": "CardContainer",
"gridContainer": {
"viewId": "GridContainer",
"viewName": "GridContainer",
"viewLevel": 1
},
"services": {
Expand Down
6 changes: 3 additions & 3 deletions src/sap.f/test/sap/f/cardsVisualTests/model/examples.json
Expand Up @@ -31,9 +31,9 @@
"group": "Other Card Examples"
},
{
"title": "Card Container",
"description": "Card Container",
"route": "cardContainer",
"title": "Grid Container",
"description": "Grid Container",
"route": "gridContainer",
"group": "Other Card Examples"
}
]
Expand Up @@ -13,55 +13,55 @@
</Toolbar>
</subHeader>
<content>
<f:CardContainer id="cContainer">
<f:GridContainer id="cContainer">
<w:Card manifest="{manifests>/listContent/card13}">
<w:layoutData>
<f:CardItemLayoutData columns="3" />
<f:GridContainerItemLayoutData columns="3" />
</w:layoutData>
</w:Card>
<w:Card manifest="{manifests>/noLayout/card7}">
<w:layoutData>
<f:CardItemLayoutData columns="4" />
<f:GridContainerItemLayoutData columns="4" />
</w:layoutData>
</w:Card>
<w:Card manifest="{manifests>/noLayout/card7}">
<w:layoutData>
<f:CardItemLayoutData columns="4" />
<f:GridContainerItemLayoutData columns="4" />
</w:layoutData>
</w:Card>
<w:Card manifest="{manifests>/noLayout/card4}">
<w:layoutData>
<f:CardItemLayoutData columns="3" />
<f:GridContainerItemLayoutData columns="3" />
</w:layoutData>
</w:Card>
<w:Card manifest="{manifests>/listContent/card13}">
<w:layoutData>
<f:CardItemLayoutData columns="3" />
<f:GridContainerItemLayoutData columns="3" />
</w:layoutData>
</w:Card>
<w:Card manifest="{manifests>/noLayout/card4}">
<w:layoutData>
<f:CardItemLayoutData columns="5" />
<f:GridContainerItemLayoutData columns="5" />
</w:layoutData>
</w:Card>
<w:Card manifest="{manifests>/noLayout/card2}">
<w:layoutData>
<f:CardItemLayoutData columns="3" />
<f:GridContainerItemLayoutData columns="3" />
</w:layoutData>
</w:Card>

<w:Card manifest="{manifests>/listContent/card13}">
<w:layoutData>
<f:CardItemLayoutData columns="5" />
<f:GridContainerItemLayoutData columns="5" />
</w:layoutData>
</w:Card>

<w:Card manifest="{manifests>/noLayout/card6}">
<w:layoutData>
<f:CardItemLayoutData columns="8" />
<f:GridContainerItemLayoutData columns="8" />
</w:layoutData>
</w:Card>
</f:CardContainer>
</f:GridContainer>
</content>
</Page>
</mvc:View>
Expand Up @@ -3,7 +3,7 @@ sap.ui.define([
], function (Controller) {
"use strict";

return Controller.extend("sap.f.cardsdemo.controller.CardContainer", {
return Controller.extend("sap.f.cardsdemo.controller.GridContainer", {

});
});

0 comments on commit 5d5feba

Please sign in to comment.