Skip to content

Commit 12babe3

Browse files
author
Philipp Hempel
committed
Merge remote-tracking branch 'origin/main' into build-info-json-release-tag-77960
2 parents 31e1dfa + 2b26705 commit 12babe3

File tree

3 files changed

+116
-1
lines changed

3 files changed

+116
-1
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ COFFEE_FILES = \
22
webfrontend/FylrExampleCustomDataType.coffee \
33
webfrontend/ExampleDetailSidebarPlugin.coffee \
44
webfrontend/FylrExampleCustomDatamodelSettings.coffee \
5-
webfrontend/FylrExampleTransition.coffee
5+
webfrontend/FylrExampleTransition.coffee \
6+
webfrontend/FylrExampleExportPluginSleep.coffee
67

78
JS = webfrontend/FylrExample.js
89

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
class FylrExampleExportPluginSleep extends ExportManagerPlugin
2+
name: ->
3+
"fylr_example:sleep"
4+
5+
nameLocalized: ->
6+
"Sleep"
7+
8+
getExportData: ->
9+
exportData = super()
10+
11+
exportData.eas_fields = {}
12+
if not exportData.produce_options
13+
exportData.produce_options = {}
14+
exportData.produce_options.seconds = @__data.seconds
15+
16+
return exportData
17+
18+
renderForm: ->
19+
@__data = @__initData()
20+
21+
form = new CUI.Form
22+
data: @__data
23+
class: "ez5-example-export-form"
24+
fields: [
25+
type: CUI.NumberInput
26+
name: "seconds"
27+
label: "Seconds"
28+
form:
29+
label: "Seconds"
30+
hint: "How long to sleep the export"
31+
]
32+
return form.start()
33+
34+
saveAllowed: ->
35+
true
36+
37+
__initData: ->
38+
data =
39+
seconds: 10
40+
return data
41+
42+
ez5.session_ready ->
43+
ExportManager.registerPlugin(new FylrExampleExportPluginSleep())

webfrontend/FylrExampleExportPluginSleep.coffee.js

Lines changed: 71 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)