@sapui5/sap.suite.ui.commons 1.98.0 → 1.101.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/sap/suite/ui/commons/.library +1 -1
- package/src/sap/suite/ui/commons/AriaProperties.js +1 -1
- package/src/sap/suite/ui/commons/CalculationBuilder.js +1 -1
- package/src/sap/suite/ui/commons/CalculationBuilderExpression.js +1 -1
- package/src/sap/suite/ui/commons/CalculationBuilderFunction.js +1 -1
- package/src/sap/suite/ui/commons/CalculationBuilderGroup.js +1 -1
- package/src/sap/suite/ui/commons/CalculationBuilderItem.js +1 -1
- package/src/sap/suite/ui/commons/CalculationBuilderValidationResult.js +1 -1
- package/src/sap/suite/ui/commons/CalculationBuilderVariable.js +1 -1
- package/src/sap/suite/ui/commons/CloudFileInfo.js +67 -0
- package/src/sap/suite/ui/commons/CloudFilePicker.js +464 -0
- package/src/sap/suite/ui/commons/MicroProcessFlow.js +1 -1
- package/src/sap/suite/ui/commons/MicroProcessFlowItem.js +23 -24
- package/src/sap/suite/ui/commons/flexibility/changeHandler/PropertyChangeMapper.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/CropCustomShapeHistoryItem.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/CropEllipseHistoryItem.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/CropRectangleHistoryItem.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/CustomSizeItem.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/FilterHistoryItem.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/FlipHistoryItem.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/HistoryItem.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/ImageEditor.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/ImageEditorContainer.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/ImageEditorResponsiveContainer.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/ResizeHistoryItem.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/RotateHistoryItem.js +1 -1
- package/src/sap/suite/ui/commons/library.js +25 -1
- package/src/sap/suite/ui/commons/messagebundle.properties +16 -0
- package/src/sap/suite/ui/commons/messagebundle_ar.properties +9 -0
- package/src/sap/suite/ui/commons/messagebundle_bg.properties +9 -0
- package/src/sap/suite/ui/commons/messagebundle_ca.properties +9 -0
- package/src/sap/suite/ui/commons/messagebundle_cs.properties +9 -0
- package/src/sap/suite/ui/commons/messagebundle_cy.properties +9 -0
- package/src/sap/suite/ui/commons/messagebundle_da.properties +9 -0
- package/src/sap/suite/ui/commons/messagebundle_de.properties +9 -0
- package/src/sap/suite/ui/commons/messagebundle_el.properties +9 -0
- package/src/sap/suite/ui/commons/messagebundle_en.properties +9 -0
- package/src/sap/suite/ui/commons/messagebundle_en_GB.properties +9 -0
- package/src/sap/suite/ui/commons/messagebundle_en_US_sappsd.properties +9 -0
- package/src/sap/suite/ui/commons/messagebundle_en_US_saprigi.properties +9 -0
- package/src/sap/suite/ui/commons/messagebundle_en_US_saptrc.properties +9 -0
- package/src/sap/suite/ui/commons/messagebundle_es.properties +9 -0
- package/src/sap/suite/ui/commons/messagebundle_es_MX.properties +9 -0
- package/src/sap/suite/ui/commons/messagebundle_et.properties +9 -0
- package/src/sap/suite/ui/commons/messagebundle_fi.properties +9 -0
- package/src/sap/suite/ui/commons/messagebundle_fr.properties +9 -0
- package/src/sap/suite/ui/commons/messagebundle_fr_CA.properties +9 -0
- package/src/sap/suite/ui/commons/messagebundle_hi.properties +9 -0
- package/src/sap/suite/ui/commons/messagebundle_hr.properties +9 -0
- package/src/sap/suite/ui/commons/messagebundle_hu.properties +9 -0
- package/src/sap/suite/ui/commons/messagebundle_id.properties +9 -0
- package/src/sap/suite/ui/commons/messagebundle_it.properties +9 -0
- package/src/sap/suite/ui/commons/messagebundle_iw.properties +9 -0
- package/src/sap/suite/ui/commons/messagebundle_ja.properties +9 -0
- package/src/sap/suite/ui/commons/messagebundle_kk.properties +9 -0
- package/src/sap/suite/ui/commons/messagebundle_ko.properties +9 -0
- package/src/sap/suite/ui/commons/messagebundle_lt.properties +9 -0
- package/src/sap/suite/ui/commons/messagebundle_lv.properties +9 -0
- package/src/sap/suite/ui/commons/messagebundle_ms.properties +9 -0
- package/src/sap/suite/ui/commons/messagebundle_nl.properties +9 -0
- package/src/sap/suite/ui/commons/messagebundle_no.properties +9 -0
- package/src/sap/suite/ui/commons/messagebundle_pl.properties +9 -0
- package/src/sap/suite/ui/commons/messagebundle_pt.properties +11 -2
- package/src/sap/suite/ui/commons/messagebundle_pt_PT.properties +9 -0
- package/src/sap/suite/ui/commons/messagebundle_ro.properties +9 -0
- package/src/sap/suite/ui/commons/messagebundle_ru.properties +9 -0
- package/src/sap/suite/ui/commons/messagebundle_sh.properties +9 -0
- package/src/sap/suite/ui/commons/messagebundle_sk.properties +9 -0
- package/src/sap/suite/ui/commons/messagebundle_sl.properties +9 -0
- package/src/sap/suite/ui/commons/messagebundle_sv.properties +9 -0
- package/src/sap/suite/ui/commons/messagebundle_th.properties +9 -0
- package/src/sap/suite/ui/commons/messagebundle_tr.properties +9 -0
- package/src/sap/suite/ui/commons/messagebundle_uk.properties +9 -0
- package/src/sap/suite/ui/commons/messagebundle_vi.properties +9 -0
- package/src/sap/suite/ui/commons/messagebundle_zh_CN.properties +9 -0
- package/src/sap/suite/ui/commons/messagebundle_zh_TW.properties +9 -0
- package/src/sap/suite/ui/commons/networkgraph/ElementBase.js +1 -1
- package/src/sap/suite/ui/commons/networkgraph/Graph.js +27 -6
- package/src/sap/suite/ui/commons/networkgraph/GraphRenderer.js +1 -1
- package/src/sap/suite/ui/commons/networkgraph/Group.js +2 -1
- package/src/sap/suite/ui/commons/networkgraph/KeyboardNavigator.js +4 -0
- package/src/sap/suite/ui/commons/networkgraph/Line.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/Circle.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/CustomShape.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/DiscreteThreshold.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/FillingOption.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/LibraryShape.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/Path.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/PropertyThreshold.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/Rectangle.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/Shape.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/ShapeGroup.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/SimpleShape.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/StatusIndicator.js +1 -1
- package/src/sap/suite/ui/commons/taccount/TAccount.js +1 -1
- package/src/sap/suite/ui/commons/taccount/TAccountGroup.js +1 -1
- package/src/sap/suite/ui/commons/taccount/TAccountItem.js +1 -1
- package/src/sap/suite/ui/commons/taccount/TAccountItemProperty.js +1 -1
- package/src/sap/suite/ui/commons/taccount/TAccountPanel.js +1 -1
- package/src/sap/suite/ui/commons/themes/sap_horizon_dark/NetworkLine.less +64 -0
- package/src/sap/suite/ui/commons/themes/sap_horizon_dark/NetworkNode.less +30 -0
- package/src/sap/suite/ui/commons/themes/sap_horizon_dark/ProcessFlowConnection.less +33 -0
- package/src/sap/suite/ui/commons/themes/sap_horizon_dark/ProcessFlowConnectionLabel.less +120 -0
- package/src/sap/suite/ui/commons/themes/sap_horizon_dark/ProcessFlowLaneHeader.less +101 -0
- package/src/sap/suite/ui/commons/themes/sap_horizon_dark/ProcessFlowNode.less +433 -0
- package/src/sap/suite/ui/commons/themes/sap_horizon_dark/library.source.less +18 -0
- package/src/sap/suite/ui/commons/themes/sap_horizon_hcb/MicroProcessFlow.less +12 -0
- package/src/sap/suite/ui/commons/themes/sap_horizon_hcb/NetworkNode.less +32 -0
- package/src/sap/suite/ui/commons/themes/sap_horizon_hcb/ProcessFlowConnection.less +33 -0
- package/src/sap/suite/ui/commons/themes/sap_horizon_hcb/ProcessFlowConnectionLabel.less +120 -0
- package/src/sap/suite/ui/commons/themes/sap_horizon_hcb/ProcessFlowLaneHeader.less +101 -0
- package/src/sap/suite/ui/commons/themes/sap_horizon_hcb/ProcessFlowNode.less +433 -0
- package/src/sap/suite/ui/commons/themes/sap_horizon_hcb/library.source.less +18 -0
- package/src/sap/suite/ui/commons/themes/sap_horizon_hcw/MicroProcessFlow.less +12 -0
- package/src/sap/suite/ui/commons/themes/sap_horizon_hcw/NetworkNode.less +32 -0
- package/src/sap/suite/ui/commons/themes/sap_horizon_hcw/ProcessFlowConnection.less +33 -0
- package/src/sap/suite/ui/commons/themes/sap_horizon_hcw/ProcessFlowConnectionLabel.less +120 -0
- package/src/sap/suite/ui/commons/themes/sap_horizon_hcw/ProcessFlowLaneHeader.less +101 -0
- package/src/sap/suite/ui/commons/themes/sap_horizon_hcw/ProcessFlowNode.less +433 -0
- package/src/sap/suite/ui/commons/themes/sap_horizon_hcw/library.source.less +18 -0
package/package.json
CHANGED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
sap.ui.define([
|
|
2
|
+
'sap/ui/base/ManagedObject'
|
|
3
|
+
], function(ManagedObject) {
|
|
4
|
+
'use strict';
|
|
5
|
+
|
|
6
|
+
var CloudFileInfo = ManagedObject.extend("sap.suite.ui.commons.CloudFileInfo", {
|
|
7
|
+
metadata: {
|
|
8
|
+
library: "sap.suite.ui.commons",
|
|
9
|
+
properties: {
|
|
10
|
+
/**
|
|
11
|
+
* FileShare ID of the selected instance
|
|
12
|
+
*/
|
|
13
|
+
fileShareId : {type : "string", group : "Data"},
|
|
14
|
+
/**
|
|
15
|
+
* FileShareItem ID of the selected instance
|
|
16
|
+
*/
|
|
17
|
+
fileShareItemId : {type : "string", group : "Data"},
|
|
18
|
+
/**
|
|
19
|
+
* Indicate FileShareItem is Folder or not
|
|
20
|
+
*/
|
|
21
|
+
isFolder : {type : "boolean", group : "Data"},
|
|
22
|
+
/**
|
|
23
|
+
* Url of the FileShare OData V4 service.
|
|
24
|
+
*/
|
|
25
|
+
parentFileShareItemId : {type : "string", group : "Data"},
|
|
26
|
+
/**
|
|
27
|
+
* Url of the FileShare OData V4 service.
|
|
28
|
+
*/
|
|
29
|
+
fileShareItemName : {type : "string", group : "Data"},
|
|
30
|
+
/**
|
|
31
|
+
* Url of the FileShare OData V4 service.
|
|
32
|
+
*/
|
|
33
|
+
createdByUser : {type : "string", group : "Data"},
|
|
34
|
+
/**
|
|
35
|
+
* Url of the FileShare OData V4 service.
|
|
36
|
+
*/
|
|
37
|
+
creationDateTime : {type : "string", group : "Data"},
|
|
38
|
+
/**
|
|
39
|
+
* Url of the FileShare OData V4 service.
|
|
40
|
+
*/
|
|
41
|
+
lastChangedByUser : {type : "string", group : "Data"},
|
|
42
|
+
/**
|
|
43
|
+
* Url of the FileShare OData V4 service.
|
|
44
|
+
*/
|
|
45
|
+
lastChangeDateTime : {type : "string", group : "Data"},
|
|
46
|
+
/**
|
|
47
|
+
* Url of the FileShare OData V4 service.
|
|
48
|
+
*/
|
|
49
|
+
fileShareItemContent : {type : "string", group : "Data"},
|
|
50
|
+
/**
|
|
51
|
+
* Url of the FileShare OData V4 service.
|
|
52
|
+
*/
|
|
53
|
+
fileShareItemContentType : {type : "string", group : "Data"},
|
|
54
|
+
/**
|
|
55
|
+
* Url of the FileShare OData V4 service.
|
|
56
|
+
*/
|
|
57
|
+
fileShareItemContentSize : {type : "number", group : "Data"},
|
|
58
|
+
/**
|
|
59
|
+
* Url of the FileShare OData V4 service.
|
|
60
|
+
*/
|
|
61
|
+
fileShareItemContentLink : {type : "string", group : "Data"}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
return CloudFileInfo;
|
|
67
|
+
});
|
|
@@ -0,0 +1,464 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
*
|
|
3
|
+
SAP UI development toolkit for HTML5 (SAPUI5)
|
|
4
|
+
(c) Copyright 2009-2015 SAP SE. All rights reserved
|
|
5
|
+
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
// Provides control sap.ui.rta.appVariant.AppVariantOverviewDialog.
|
|
9
|
+
sap.ui.define(
|
|
10
|
+
[
|
|
11
|
+
"sap/m/Button",
|
|
12
|
+
"sap/m/Dialog",
|
|
13
|
+
"sap/m/DialogRenderer",
|
|
14
|
+
"sap/m/List",
|
|
15
|
+
"sap/m/StandardListItem",
|
|
16
|
+
"sap/ui/model/odata/v4/ODataModel",
|
|
17
|
+
"sap/m/VBox",
|
|
18
|
+
"sap/m/Select",
|
|
19
|
+
"sap/m/Label",
|
|
20
|
+
"sap/m/Input",
|
|
21
|
+
"sap/ui/layout/form/SimpleForm",
|
|
22
|
+
"sap/ui/core/IconPool",
|
|
23
|
+
"sap/m/Page",
|
|
24
|
+
"sap/m/Breadcrumbs",
|
|
25
|
+
"sap/m/Link",
|
|
26
|
+
"./CloudFileInfo",
|
|
27
|
+
"./library",
|
|
28
|
+
"sap/m/library"
|
|
29
|
+
],
|
|
30
|
+
function (
|
|
31
|
+
Button,
|
|
32
|
+
Dialog,
|
|
33
|
+
DialogRenderer,
|
|
34
|
+
List,
|
|
35
|
+
StandardListItem,
|
|
36
|
+
ODataModel,
|
|
37
|
+
VBox,
|
|
38
|
+
Select,
|
|
39
|
+
Label,
|
|
40
|
+
Input,
|
|
41
|
+
SimpleForm,
|
|
42
|
+
IconPool,
|
|
43
|
+
Page,
|
|
44
|
+
Breadcrumbs,
|
|
45
|
+
Link,
|
|
46
|
+
CloudFileInfo,
|
|
47
|
+
library,
|
|
48
|
+
mLibrary
|
|
49
|
+
) {
|
|
50
|
+
"use strict";
|
|
51
|
+
var oResourceBundle = sap.ui
|
|
52
|
+
.getCore()
|
|
53
|
+
.getLibraryResourceBundle("sap.suite.ui.commons");
|
|
54
|
+
var CloudFilePicker = Dialog.extend(
|
|
55
|
+
"sap.suite.ui.commons.CloudFilePicker",
|
|
56
|
+
{
|
|
57
|
+
metadata: {
|
|
58
|
+
library: "sap.suite.ui.commons",
|
|
59
|
+
properties: {
|
|
60
|
+
/**
|
|
61
|
+
* Url of the FileShare OData V4 service.
|
|
62
|
+
*/
|
|
63
|
+
serviceUrl: {
|
|
64
|
+
type: "sap.ui.core.URI",
|
|
65
|
+
group: "Data",
|
|
66
|
+
defaultValue: ""
|
|
67
|
+
},
|
|
68
|
+
/**
|
|
69
|
+
* Overwrites the default text for the confirmation button
|
|
70
|
+
*/
|
|
71
|
+
confirmButtonText: {
|
|
72
|
+
type: "string",
|
|
73
|
+
group: "Data",
|
|
74
|
+
defaultValue: oResourceBundle.getText(
|
|
75
|
+
"CLOUD_FILE_PICKER_SELECTBUTTONTEXT"
|
|
76
|
+
)
|
|
77
|
+
},
|
|
78
|
+
/**
|
|
79
|
+
* Allow the type of resource which could be selected
|
|
80
|
+
*/
|
|
81
|
+
filePickerMode: {
|
|
82
|
+
type: "sap.suite.ui.commons.FilePickerModes",
|
|
83
|
+
group: "Data",
|
|
84
|
+
defaultValue: "All"
|
|
85
|
+
},
|
|
86
|
+
/**
|
|
87
|
+
* Specifies the text for selectButton.
|
|
88
|
+
*/
|
|
89
|
+
title: {
|
|
90
|
+
type: "string",
|
|
91
|
+
group: "Data",
|
|
92
|
+
defaultValue: oResourceBundle.getText("CLOUD_FILE_PICKER_TITLE")
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
events: {
|
|
96
|
+
select: {
|
|
97
|
+
parameters: {
|
|
98
|
+
/**
|
|
99
|
+
* Files.
|
|
100
|
+
*/
|
|
101
|
+
selectedFiles: { type: "sap.suite.ui.commons.CloudFileInfo[]" }
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Event is fired when the cancel button is pressed
|
|
107
|
+
*
|
|
108
|
+
*
|
|
109
|
+
*/
|
|
110
|
+
cancel: {}
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
constructor: function () {
|
|
114
|
+
Dialog.prototype.constructor.apply(this, arguments);
|
|
115
|
+
|
|
116
|
+
this.setResizable(true);
|
|
117
|
+
this._createDialogContent();
|
|
118
|
+
// this.addContent(this.oManageAppsComponentContainer);
|
|
119
|
+
this._createButton();
|
|
120
|
+
|
|
121
|
+
this.setContentWidth("34%");
|
|
122
|
+
this.setContentHeight("50%");
|
|
123
|
+
|
|
124
|
+
this.setHorizontalScrolling(false);
|
|
125
|
+
this.setVerticalScrolling(false);
|
|
126
|
+
this.setTitle(this.getTitle());
|
|
127
|
+
|
|
128
|
+
// this.addStyleClass(RtaUtils.getRtaStyleClassName());
|
|
129
|
+
},
|
|
130
|
+
renderer: DialogRenderer
|
|
131
|
+
}
|
|
132
|
+
);
|
|
133
|
+
CloudFilePicker.prototype._createDialogContent = function () {
|
|
134
|
+
var sServiceURL = this.getServiceUrl();
|
|
135
|
+
var oModel = new ODataModel({
|
|
136
|
+
serviceUrl: sServiceURL,
|
|
137
|
+
synchronizationMode: "None"
|
|
138
|
+
});
|
|
139
|
+
this.setModel(oModel);
|
|
140
|
+
// Adding Select for cloud spaces
|
|
141
|
+
var oSimpleForm = this._createCloudDropdownAndFileNameField();
|
|
142
|
+
|
|
143
|
+
// Adding list to show the files and folders
|
|
144
|
+
var BreadcrumbLinks = this._createBreadcrumbLinks();
|
|
145
|
+
|
|
146
|
+
this.oNavigationMap = new Map();
|
|
147
|
+
|
|
148
|
+
// Adding list to show the files and folders
|
|
149
|
+
var oList = this._createListContent();
|
|
150
|
+
var oPage = new Page({
|
|
151
|
+
content: [oList],
|
|
152
|
+
enableScrolling: true,
|
|
153
|
+
title: oResourceBundle.getText("CLOUD_FILE_PICKER_LISTHEADERTEXT")
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
this.addContent(oSimpleForm);
|
|
157
|
+
this.addContent(BreadcrumbLinks);
|
|
158
|
+
this.addContent(oPage);
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
CloudFilePicker.prototype._createCloudDropdownAndFileNameField =
|
|
162
|
+
function () {
|
|
163
|
+
var that = this;
|
|
164
|
+
var oLocationLabel = new Label({
|
|
165
|
+
text: oResourceBundle.getText("CLOUD_FILE_PICKER_LOCATIONTEXT"),
|
|
166
|
+
showColon: true,
|
|
167
|
+
labelFor: "cloudSpaceSelect"
|
|
168
|
+
}).addStyleClass("sapUiSmallMarginTopBottom ");
|
|
169
|
+
|
|
170
|
+
this._oSelect = new Select({
|
|
171
|
+
selectedKey: "{FileShare}",
|
|
172
|
+
id: "cloudSpaceSelect",
|
|
173
|
+
change: function () {
|
|
174
|
+
var sPath =
|
|
175
|
+
"/FileShares(" +
|
|
176
|
+
"'" +
|
|
177
|
+
this.getSelectedKey() +
|
|
178
|
+
"'" +
|
|
179
|
+
")/_Root/_Children";
|
|
180
|
+
var oNewContext = this.getModel().createBindingContext(sPath);
|
|
181
|
+
that.oNavigationMap.clear();
|
|
182
|
+
that._oList.setBindingContext(oNewContext);
|
|
183
|
+
that._oBreadcrumbLinks.destroyLinks();
|
|
184
|
+
that._oFileNameField.setValue("");
|
|
185
|
+
that.aVisibleLinks = [
|
|
186
|
+
oResourceBundle.getText("CLOUD_FILE_PICKER_DOCUMENTSTEXT")
|
|
187
|
+
];
|
|
188
|
+
that._oBreadcrumbLinks.setCurrentLocationText(
|
|
189
|
+
oResourceBundle.getText("CLOUD_FILE_PICKER_DOCUMENTSTEXT")
|
|
190
|
+
);
|
|
191
|
+
}
|
|
192
|
+
}).bindItems({
|
|
193
|
+
path: "/FileShares",
|
|
194
|
+
template: new sap.ui.core.Item({
|
|
195
|
+
key: "{FileShare}",
|
|
196
|
+
text: "{FileShareDescription}"
|
|
197
|
+
})
|
|
198
|
+
});
|
|
199
|
+
|
|
200
|
+
var oSimpleForm = new SimpleForm({
|
|
201
|
+
layout: "ResponsiveGridLayout",
|
|
202
|
+
singleContainerFullSize: false
|
|
203
|
+
});
|
|
204
|
+
oSimpleForm.addContent(oLocationLabel);
|
|
205
|
+
oSimpleForm.addContent(this._oSelect);
|
|
206
|
+
|
|
207
|
+
var oLabel = new Label({
|
|
208
|
+
text: oResourceBundle.getText("CLOUD_FILE_PICKER_FILENAMETEXT"),
|
|
209
|
+
showColon: true,
|
|
210
|
+
labelFor: "fileName"
|
|
211
|
+
}).addStyleClass("sapUiSmallMarginTopBottom");
|
|
212
|
+
|
|
213
|
+
this._oFileNameField = new Input({
|
|
214
|
+
id: "fileName"
|
|
215
|
+
});
|
|
216
|
+
|
|
217
|
+
oSimpleForm.addContent(oLabel);
|
|
218
|
+
oSimpleForm.addContent(this._oFileNameField);
|
|
219
|
+
|
|
220
|
+
return oSimpleForm;
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
CloudFilePicker.prototype._createBreadcrumbLinks = function () {
|
|
224
|
+
this._oBreadcrumbLinks = new Breadcrumbs(this.getId() + "-breadcrumbs", {
|
|
225
|
+
currentLocationText: oResourceBundle.getText(
|
|
226
|
+
"CLOUD_FILE_PICKER_DOCUMENTSTEXT"
|
|
227
|
+
)
|
|
228
|
+
}).addStyleClass(
|
|
229
|
+
"sapUiSmallMarginEnd sapUiSmallMarginTopBottom sapUiSmallMarginBegin"
|
|
230
|
+
);
|
|
231
|
+
this.aVisibleLinks = [
|
|
232
|
+
oResourceBundle.getText("CLOUD_FILE_PICKER_DOCUMENTSTEXT")
|
|
233
|
+
];
|
|
234
|
+
return this._oBreadcrumbLinks;
|
|
235
|
+
};
|
|
236
|
+
|
|
237
|
+
CloudFilePicker.prototype._updateBreadcrumbLinks = function () {
|
|
238
|
+
if (this.aVisibleLinks && this.aVisibleLinks.length > 1) {
|
|
239
|
+
var aVisibleLinksRev = this.aVisibleLinks.slice().reverse();
|
|
240
|
+
var newLinks = [];
|
|
241
|
+
aVisibleLinksRev.forEach(
|
|
242
|
+
function (dimLabel, index, array) {
|
|
243
|
+
// Set current drill position in breadcrumb control
|
|
244
|
+
if (index == 0) {
|
|
245
|
+
this._oBreadcrumbLinks.setCurrentLocationText(dimLabel);
|
|
246
|
+
} else {
|
|
247
|
+
var oCrumb = new Link({
|
|
248
|
+
text: dimLabel,
|
|
249
|
+
press: function (oEvent) {
|
|
250
|
+
var iLinkIndex = this._oBreadcrumbLinks.indexOfLink(
|
|
251
|
+
oEvent.getSource()
|
|
252
|
+
);
|
|
253
|
+
var aRemovedLinks = this.aVisibleLinks.splice(iLinkIndex + 1);
|
|
254
|
+
var sPath, oNewContext;
|
|
255
|
+
this._updateBreadcrumbLinks();
|
|
256
|
+
if (this.aVisibleLinks.length > 1) {
|
|
257
|
+
// update binding context for the levels below the root
|
|
258
|
+
sPath = this.oNavigationMap.get(
|
|
259
|
+
this.aVisibleLinks[this.aVisibleLinks.length - 1]
|
|
260
|
+
);
|
|
261
|
+
for (var sKey in aRemovedLinks) {
|
|
262
|
+
this.oNavigationMap.delete(aRemovedLinks[sKey]);
|
|
263
|
+
}
|
|
264
|
+
oNewContext = this.getModel().createBindingContext(sPath);
|
|
265
|
+
this._oList.setBindingContext(oNewContext);
|
|
266
|
+
} else {
|
|
267
|
+
// update binding context for root
|
|
268
|
+
this.oNavigationMap.clear();
|
|
269
|
+
sPath =
|
|
270
|
+
"/FileShares(" +
|
|
271
|
+
"'" +
|
|
272
|
+
this._oSelect.getSelectedKey() +
|
|
273
|
+
"'" +
|
|
274
|
+
")/_Root/_Children";
|
|
275
|
+
oNewContext = this.getModel().createBindingContext(sPath);
|
|
276
|
+
this._oList.setBindingContext(oNewContext);
|
|
277
|
+
}
|
|
278
|
+
}.bind(this)
|
|
279
|
+
});
|
|
280
|
+
newLinks.push(oCrumb); //note the links are added in an incorrect order need to reverse
|
|
281
|
+
}
|
|
282
|
+
}.bind(this)
|
|
283
|
+
);
|
|
284
|
+
|
|
285
|
+
newLinks.reverse();
|
|
286
|
+
// Clear aggregation before we rebuild it
|
|
287
|
+
if (this._oBreadcrumbLinks.getLinks()) {
|
|
288
|
+
this._oBreadcrumbLinks.removeAllLinks();
|
|
289
|
+
}
|
|
290
|
+
for (var i = 0; i < newLinks.length; i++) {
|
|
291
|
+
this._oBreadcrumbLinks.addLink(newLinks[i]);
|
|
292
|
+
}
|
|
293
|
+
} else {
|
|
294
|
+
this.aVisibleLinks = [
|
|
295
|
+
oResourceBundle.getText("CLOUD_FILE_PICKER_DOCUMENTSTEXT")
|
|
296
|
+
];
|
|
297
|
+
this._oBreadcrumbLinks.destroyLinks();
|
|
298
|
+
// this._oFileNameField.setValue('');
|
|
299
|
+
this._oBreadcrumbLinks.setCurrentLocationText(
|
|
300
|
+
oResourceBundle.getText("CLOUD_FILE_PICKER_DOCUMENTSTEXT")
|
|
301
|
+
);
|
|
302
|
+
}
|
|
303
|
+
};
|
|
304
|
+
|
|
305
|
+
CloudFilePicker.prototype._createListContent = function () {
|
|
306
|
+
var that = this;
|
|
307
|
+
this._oList = new List({
|
|
308
|
+
mode:
|
|
309
|
+
this.getFilePickerMode() === library.FilePickerModes.FileOnly
|
|
310
|
+
? mLibrary.ListMode.SingleSelectMaster
|
|
311
|
+
: mLibrary.ListMode.SingleSelectLeft,
|
|
312
|
+
id: "detailsList",
|
|
313
|
+
|
|
314
|
+
itemPress: function () {
|
|
315
|
+
var oContext = this.getSelectedItem().getBindingContext();
|
|
316
|
+
if (this.getMode() === mLibrary.ListMode.SingleSelectMaster &&
|
|
317
|
+
oContext.getObject("FileShareItemKind") === "folder") {
|
|
318
|
+
var sForwardPath = oContext.getCanonicalPath() + "/_Children";
|
|
319
|
+
var sCurrentItemTitle = this.getSelectedItem().getTitle();
|
|
320
|
+
that.oNavigationMap.set(sCurrentItemTitle, sForwardPath);
|
|
321
|
+
var oNewContext = oContext
|
|
322
|
+
.getModel()
|
|
323
|
+
.createBindingContext(sForwardPath);
|
|
324
|
+
that.aVisibleLinks.push(this.getSelectedItem().getTitle());
|
|
325
|
+
that._updateBreadcrumbLinks();
|
|
326
|
+
this.setBindingContext(oNewContext);
|
|
327
|
+
}
|
|
328
|
+
},
|
|
329
|
+
select: function () {
|
|
330
|
+
var oContext = this.getSelectedItem().getBindingContext();
|
|
331
|
+
var sFieldValue =
|
|
332
|
+
oContext.getProperty("FileShareItemKind") === "document"
|
|
333
|
+
? oContext.getProperty("FileShareItemName")
|
|
334
|
+
: "";
|
|
335
|
+
that._oFileNameField.setValue(sFieldValue);
|
|
336
|
+
}
|
|
337
|
+
});
|
|
338
|
+
|
|
339
|
+
this._oList.bindItems({
|
|
340
|
+
path: "",
|
|
341
|
+
template: new StandardListItem({
|
|
342
|
+
title: "{FileShareItemName}",
|
|
343
|
+
icon: {
|
|
344
|
+
parts: ["FileShareItemKind", "FileShareItemContentType"],
|
|
345
|
+
formatter: function (
|
|
346
|
+
sFileShareItemKind,
|
|
347
|
+
sFileShareItemContentType
|
|
348
|
+
) {
|
|
349
|
+
if (sFileShareItemKind === "folder") {
|
|
350
|
+
return "sap-icon://folder";
|
|
351
|
+
} else {
|
|
352
|
+
return IconPool.getIconForMimeType(sFileShareItemContentType);
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
},
|
|
356
|
+
type: "{= ${FileShareItemKind} === 'folder' ? 'Navigation' : 'Active'}",
|
|
357
|
+
press: function () {
|
|
358
|
+
var oContext = this.getBindingContext();
|
|
359
|
+
if (oContext.getObject("FileShareItemKind") === "folder") {
|
|
360
|
+
var sForwardPath = oContext.getCanonicalPath() + "/_Children";
|
|
361
|
+
var sCurrentItemTitle = this.getTitle();
|
|
362
|
+
that.oNavigationMap.set(sCurrentItemTitle, sForwardPath);
|
|
363
|
+
var oNewContext = oContext
|
|
364
|
+
.getModel()
|
|
365
|
+
.createBindingContext(sForwardPath);
|
|
366
|
+
that.aVisibleLinks.push(sCurrentItemTitle);
|
|
367
|
+
that._updateBreadcrumbLinks();
|
|
368
|
+
that._oList.setBindingContext(oNewContext);
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
})
|
|
372
|
+
});
|
|
373
|
+
var sBindingPath =
|
|
374
|
+
"/FileShares(" +
|
|
375
|
+
"'" +
|
|
376
|
+
this._oSelect.getSelectedKey() +
|
|
377
|
+
"'" +
|
|
378
|
+
")/_Root/_Children";
|
|
379
|
+
var oNewContext = this.getModel().createBindingContext(
|
|
380
|
+
sBindingPath + "/_Children"
|
|
381
|
+
);
|
|
382
|
+
this._oList.setBindingContext(oNewContext);
|
|
383
|
+
|
|
384
|
+
return this._oList;
|
|
385
|
+
};
|
|
386
|
+
|
|
387
|
+
CloudFilePicker.prototype._createButton = function () {
|
|
388
|
+
this.addButton(
|
|
389
|
+
new Button({
|
|
390
|
+
text: this.getConfirmButtonText(),
|
|
391
|
+
type: "Emphasized",
|
|
392
|
+
press: function () {
|
|
393
|
+
var mParameters = this._createSelectionParameter([
|
|
394
|
+
this._oList.getSelectedItem()
|
|
395
|
+
]);
|
|
396
|
+
this.fireEvent("select", mParameters);
|
|
397
|
+
this.close();
|
|
398
|
+
this.destroy();
|
|
399
|
+
}.bind(this)
|
|
400
|
+
})
|
|
401
|
+
);
|
|
402
|
+
this.addButton(
|
|
403
|
+
new Button({
|
|
404
|
+
text: oResourceBundle.getText("CLOUD_FILE_PICKER_CANCELBUTTONTEXT"),
|
|
405
|
+
press: function () {
|
|
406
|
+
this.close();
|
|
407
|
+
this.fireCancel();
|
|
408
|
+
this.destroy();
|
|
409
|
+
}.bind(this)
|
|
410
|
+
})
|
|
411
|
+
);
|
|
412
|
+
};
|
|
413
|
+
|
|
414
|
+
CloudFilePicker.prototype._createSelectionParameter = function (
|
|
415
|
+
aSelectedItems
|
|
416
|
+
) {
|
|
417
|
+
var mParameters = {};
|
|
418
|
+
mParameters.selectedFiles = [];
|
|
419
|
+
|
|
420
|
+
aSelectedItems.forEach(function (oSelectedItem) {
|
|
421
|
+
var oCloudFileInfo = new CloudFileInfo();
|
|
422
|
+
var oContext = oSelectedItem.getBindingContext();
|
|
423
|
+
oCloudFileInfo.setFileShareId(oContext.getObject("FileShare"));
|
|
424
|
+
oCloudFileInfo.setFileShareItemId(oContext.getObject("FileShareItem"));
|
|
425
|
+
oCloudFileInfo.setParentFileShareItemId(
|
|
426
|
+
oContext.getObject("ParentFileShareItem")
|
|
427
|
+
);
|
|
428
|
+
oCloudFileInfo.setIsFolder(
|
|
429
|
+
oContext.getObject("FileShareItemKind") === "folder"
|
|
430
|
+
);
|
|
431
|
+
oCloudFileInfo.setFileShareItemName(
|
|
432
|
+
oContext.getObject("FileShareItemName")
|
|
433
|
+
);
|
|
434
|
+
oCloudFileInfo.setCreatedByUser(oContext.getObject("CreatedByUser"));
|
|
435
|
+
oCloudFileInfo.setCreationDateTime(
|
|
436
|
+
oContext.getObject("CreationDateTime")
|
|
437
|
+
);
|
|
438
|
+
oCloudFileInfo.setLastChangedByUser(
|
|
439
|
+
oContext.getObject("LastChangedByUser")
|
|
440
|
+
);
|
|
441
|
+
oCloudFileInfo.setLastChangeDateTime(
|
|
442
|
+
oContext.getObject("LastChangeDateTime")
|
|
443
|
+
);
|
|
444
|
+
oCloudFileInfo.setFileShareItemContent(
|
|
445
|
+
oContext.getObject("FileShareItemContent")
|
|
446
|
+
);
|
|
447
|
+
oCloudFileInfo.setFileShareItemContentType(
|
|
448
|
+
oContext.getObject("FileShareItemContentType")
|
|
449
|
+
);
|
|
450
|
+
oCloudFileInfo.setFileShareItemContentSize(
|
|
451
|
+
oContext.getObject("FileShareItemContentSize")
|
|
452
|
+
);
|
|
453
|
+
oCloudFileInfo.setFileShareItemContentLink(
|
|
454
|
+
oContext.getObject("FileShareItemContentLink")
|
|
455
|
+
);
|
|
456
|
+
mParameters.selectedFiles.push(oCloudFileInfo);
|
|
457
|
+
});
|
|
458
|
+
|
|
459
|
+
return mParameters;
|
|
460
|
+
};
|
|
461
|
+
|
|
462
|
+
return CloudFilePicker;
|
|
463
|
+
}
|
|
464
|
+
);
|