-
Notifications
You must be signed in to change notification settings - Fork 378
/
index.html
499 lines (491 loc) · 12.7 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
<html>
<head>
<title>Evolved Web Apps with SAPUI5 - Exercise Solutions</title>
<script id="sap-ui-bootstrap"
src="../../resources/sap-ui-core.js"
data-sap-ui-theme="sap_belize"
data-sap-ui-compatVersion="edge"
data-sap-ui-async="true">
</script>
<script id="xmlView" type="text/xmldata">
<mvc:View xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m" xmlns:l="sap.ui.layout" controllerName="indexController" displayBlock="true">
<SearchField
liveChange=".onSearch"/>
<List
id="units"
mode="SingleSelectMaster"
selectionChange=".onSelectUnit"
items="{
path: '/units',
sorter : {
path : 'category',
group : true
}
}"
class="sapUiSizeCompact">
<CustomListItem
type="Navigation">
<l:VerticalLayout width="100%" class="sapUiTinyMargin">
<l:HorizontalLayout>
<Title level="H4" titleStyle="H4" text="{title}" class="sapUiTinyMargin"/>
<RatingIndicator
value="1"
visible="{= ${challenge} === true }"
iconSize="1rem"
maxValue="1"
editable="false"/>
</l:HorizontalLayout>
<Tokenizer
width="100%"
tokens="{
path: 'keywords',
templateShareable: true
}"
editable="false"
class="wrapTags">
<Token
text="{}"/>
</Tokenizer>
</l:VerticalLayout>
</CustomListItem>
</List>
</mvc:View>
</script>
<script>
sap.ui.require([
'sap/ui/core/mvc/Controller',
'sap/ui/model/json/JSONModel',
'sap/ui/core/mvc/XMLView',
'sap/ui/model/Filter',
'sap/ui/model/FilterOperator',
'sap/m/library',
'sap/m/MessageStrip'
], function (Controller, JSONModel, XMLView, Filter, FilterOperator, mobileLibrary, MessageStrip) {
Controller.extend("indexController", {
onInit: function() {
var model = new JSONModel();
model.setData({
units: [
{
category: "Week 1",
key: "w1u1",
title: "Unit 1: Welcome to the Course",
url: "w1u1/README.md",
keywords: [
"Introduction",
"Course overview",
"Target audience",
"Key learnings"
]
},
{
category: "Week 1",
key: "w1u2a",
title: "Unit 2: Developing in the Cloud with SAP Web IDE",
url: "w1u2/webapp/index.html",
keywords: [
"Setup",
"SAP Web IDE",
"SAP Cloud Platform",
"SAP Fiori Launchpad",
"Development Environment",
"ES5 Destination"
]
},
{
category: "Week 1",
key: "w1u3",
title: "Unit 3: Local Setup with the UI5 Tooling",
url: "w1u3/README.md",
keywords: [
"UI5 Tooling",
"Local Development",
"node.js",
"proxy"
]
},
{
category: "Week 1",
key: "w1u4",
title: "Unit 4: Unleashing Your UI5 Skills",
url: "w1u4/webapp/index.html",
keywords: [
"Learning Resources",
"Demo Kit",
"OpenUI5.org",
"Community"
]
},
{
category: "Week 1",
key: "w1u5",
title: "Unit 5: Introducing Smart Little Helpers",
url: "w1u5/README.md",
keywords: [
"UI5 Inspector",
"Support Tools",
"Troubleshooting",
"ESlint"
]
},
{
category: "Week 1",
key: "w1u6",
title: "Unit 6: Getting Ready for the Course Exercises",
url: "w1u6/webapp/index.html",
keywords: [
"Course Exercises",
"Validator",
"Rufus",
"Solutions",
"Reset",
"GitHub"
]
},
{
category: "Week 2",
key: "w2u1",
title: "Unit 1: Starting Your Journey to Evolved Web Apps",
url: "w2u1/webapp/index.html",
challenge: true,
keywords: [
"Best Practices",
"Recommendations",
"Asynchronous loading",
"Templates",
"CSP",
"MVC",
"UI5 Evolution"
]
},
{
category: "Week 2",
key: "w2u2",
title: "Unit 2: Waking Up Your UI Controls with Events",
url: "w2u2/webapp/index.html",
keywords: [
"Control",
"Controller",
"Event",
"Event Parameters"
]
},
{
category: "Week 2",
key: "w2u3",
title: "Unit 3: Binding Data and Using Models",
url: "w2u3/webapp/index.html",
keywords: [
"Data Binding",
"Binding Syntax",
"Models",
"i18n",
"Resource Bundle",
"Device Model",
"Responsiveness",
]
},
{
category: "Week 2",
key: "w2u4",
title: "Unit 4: Adding Views and Configuring Navigation",
url: "w2u4/webapp/index.html",
challenge: true,
keywords: [
"Navigation",
"Routing",
"Router",
"Targets",
"Not Found",
"bypassed"
]
},
{
category: "Week 2",
key: "w2u5",
title: "Unit 5: Discovering Enterprise-Grade Horizons\n",
url: "w2u5/webapp/index.html",
keywords: [
"Enterprise-Grade",
"User Experience",
"Consistency",
"Security",
"Accessibility",
"Translation"
]
},
{
category: "Week 3",
key: "w3u1",
title: "Unit 1: Kick-Start Apps with Templates",
url: "w3u1/webapp/index.html",
challenge: true,
keywords: [
"FlexibleColumnLayout",
"Master-Detail Template",
"Fiori Floorplan",
"Customization"
]
},
{
category: "Week 3",
key: "w3u2",
title: "Unit 2: Introducing the Power of OData",
url: "w3u2/webapp/index.html",
keywords: [
"OData Model",
"Service Metadata",
"OData V4",
"Expand"
]
},
{
category: "Week 3",
key: "odatav4",
title: "OData V4 Demo",
url: "demo/odatav4/webapp/index.html",
keywords: [
"OData V4",
"Filtered Expand",
"OData.org"
]
},
{
category: "Week 3",
key: "w3u3",
title: "Unit 3: Increasing Developer Productivity with SAP Web IDE",
url: "w3u3/webapp/index.html",
keywords: [
"SAP Web IDE",
"Storyboard editor",
"Layout Editor",
"Auto-fix",
"Developer Productivity"
]
},
{
category: "Week 3",
key: "w3u4",
title: "Unit 4: Spicing Up Your Scenario with Feature-Rich Controls",
url: "w3u4/webapp/index.html",
challenge: true,
keywords: [
"Control Library",
"Feature-rich controls",
"Object Page",
"Formatting",
"Layouting",
"Indicators"
]
},
{
category: "Week 3",
key: "w3u5",
title: "Unit 5: Scaling Up with UI Reuse Patterns",
url: "w3u5/webapp/index.html",
keywords: [
"UI Reuse",
"Control",
"View",
"Fragement",
"Custom Control",
"XML Composite"
]
},
{
category: "Week 4",
key: "w4u1",
title: "Unit 1: Creating Items and Validating User Input",
url: "w4u1/webapp/index.html",
keywords: [
"Create",
"Input Validation",
"Data Types",
"Constraints"
]
},
{
category: "Week 4",
key: "w4u2",
title: "Unit 2: Improving User Experience with Drag and Drop",
url: "w4u2/webapp/index.html",
challenge: true,
keywords: [
"Drag and Drop",
"User Experience",
"Enhancement",
"Reorder"
]
},
{
category: "Week 4",
key: "w4u3",
title: "Unit 3: Testing Application Logic with QUnit and Karma",
url: "w4u1/webapp/index.html",
keywords: [
"Testing Pyramid",
"Unit Tests",
"QUnit",
"Karma",
"Formatter"
]
},
{
category: "Week 4",
key: "w4u4",
title: "Unit 4: Writing Integration Tests with OPA5 and MockServer",
url: "w4u1/webapp/index.html",
keywords: [
"Create",
"Input Validation",
"Data Types",
"Constraints"
]
},
{
category: "Week 4",
key: "w4u5",
title: "Unit 1: Building and Deploying Your App",
url: "w4u5/webapp/index.html",
challenge: true,
keywords: [
"UI5 Tooling",
"Self-contained Build",
"Register FLP tile",
"Deployment"
]
},
{
category: "Week 5",
key: "w5u1",
title: "Unit 1: Generating Apps with SAP Fiori Elements",
url: "w5u1/webapp/test/flpSandbox.html",
keywords: [
"SAP Fiori Elements",
"List Report",
"CDS",
"Developer Productivity"
]
},
{
category: "Week 5",
key: "w5u2",
title: "Unit 2: Creating Annotation-Driven UIs for SAP Fiori Elements",
url: "w5u2/webapp/test/flpSandbox.html",
challenge: true,
keywords: [
"SAP Fiori Elements",
"Annotation Modeller",
"OData Annotations",
"Customizing",
"Developer Productivity"
]
},
{
category: "Week 5",
key: "w5u3",
title: "Unit 3: Tuning SAP Fiori Elements with Flexibility Changes",
url: "w5u3/webapp/test/flpSandbox.html",
keywords: [
"SAP Fiori Elements",
"SAPUI5 Flexibility",
"Visual Editor",
"UI Changes",
"Developer Productivity",
"Deployment",
"Register FLP tile"
]
},
{
category: "Week 5",
key: "w5u4",
title: "Unit 4: Extending Your SAP Fiori Launchpad with Plugins",
url: "w5u4/webapp/Component.js",
keywords: [
"SAP Fiori launchpad",
"Bookmark Service",
"Plugin"
]
},
{
category: "Week 5",
key: "w5u5",
title: "Unit 5: Adapting Running Apps with SAPUI5 Flexibility",
url: "w5u5/webapp/test/flpSandboxMock.html",
keywords: [
"SAPUI5 Flexibility",
"UI Changes",
"Key User Adaptation",
"Personalization"
]
},
{
category: "Week 5",
key: "w5u6",
title: "Unit 6: Extending Apps with Adaptation Projects",
url: "w5u6/webapp/test/flpSandbox.html",
challenge: true,
keywords: [
"SAPUI5 Flexibility",
"Adaptation Project",
"Visual Editor",
"Code Extension",
"Map"
]
}
]
});
// convert keywords to one searchable string for easy filtering
model.getData().units.forEach(function (oItem) {
oItem.search = oItem.keywords.join(" ");
});
this.getView().setModel(model);
},
onSearch: function(oEvent) {
var oListBinding = this.byId("units").getBinding("items");
var sQuery = oEvent.getParameter("newValue");
var oFilterTitle = new Filter("title", FilterOperator.Contains, sQuery);
var oFilterKeywords = new Filter("search", FilterOperator.Contains, sQuery);
oListBinding.filter(new Filter ({
filters: [oFilterTitle, oFilterKeywords],
and: false
}));
},
onSelectUnit: function (oEvent) {
var sURL = oEvent.getParameter("listItem").getBindingContext().getProperty("url");
mobileLibrary.URLHelper.redirect(sURL, true);
}
});
XMLView.create({
id: "indexView",
definition: jQuery('#xmlView').html()
}).then(function (oView) {
oView.placeAt("content");
}.bind(this));
new MessageStrip({
text: "We recommend to browse this repository in SAP Web IDE - most units require a backend destination or SAPUI5 modules and will not run in a local development environment or when browsing from GitHub.",
type: "Information",
showCloseButton: true,
showIcon: true
}).addStyleClass("sapUiSmallMarginBottom").placeAt("note");
});
</script>
<style>
/* wrap tokens in list */
.wrapTags {
white-space: pre-line !important;
}
/* increase group header text size */
.sapMGHLITitle {
font-size: 1.125rem;
font-weight: bold;
color: rgb(19, 102, 162);
}
</style>
</head>
<body class="sapUiBody sapUiMediumMargin sapUiForceWidthAuto">
<h1>Evolved Web Apps with SAPUI5 - Exercise Solutions</h1>
<div id="note"></div>
<div id="content"></div>
</body>
</html>