pict-section-form 1.0.10 → 1.0.13
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/.vscode/settings.json +3 -0
- package/example_applications/Build-Examples.sh +41 -0
- package/example_applications/Clean-Examples.sh +10 -0
- package/example_applications/Open-Examples.sh +8 -0
- package/example_applications/README.md +57 -0
- package/example_applications/complex_table/Complex-Tabular-Application.js +219 -0
- package/example_applications/complex_table/FruitData.json +695 -0
- package/example_applications/complex_table/README-ComplexTable.md +31 -0
- package/example_applications/complex_table/html/index.html +13 -0
- package/example_applications/complex_table/package.json +26 -0
- package/example_applications/gradebook/source/Gradebook-Application.js +2 -1
- package/example_applications/gradebook/source/manifests/Assignment-Manifest.json +36 -1
- package/example_applications/gradebook/source/manifests/Gradebook-Manifest.js +20 -3
- package/example_applications/gradebook/source/manifests/Student-Manifest.json +34 -23
- package/example_applications/gradebook/source/views/BasicContent-View-Templates.json +42 -0
- package/example_applications/postcard_example/Pict-Application-Postcard.js +15 -0
- package/example_applications/postcard_example/providers/PictProvider-BestPostcardTheme.js +19 -46
- package/example_applications/postcard_example/providers/PictProvider-Dynamic-Sections-MockServerResponse.json +8 -4
- package/example_applications/simple_form/html/index.html +1 -1
- package/example_applications/simple_table/FruitData.json +693 -692
- package/example_applications/simple_table/Simple-Tabular-Application.js +6 -18
- package/example_applications/simple_table_from_object/FruitDataInAnObject.json +692 -2
- package/example_applications/simple_table_from_object/MigrateThatFruit.js +2 -2
- package/example_applications/simple_table_from_object/Simple-Tabular-Application-FromObject.js +5 -18
- package/package.json +3 -2
- package/source/Pict-Section-Form.js +6 -10
- package/source/{Pict-Section-Form-Application.js → application/Pict-Application-Form.js} +1 -1
- package/source/providers/Pict-Provider-DynamicSolver.js +264 -0
- package/source/{Pict-Section-Form-Provider-Templates-DefaultFormTemplates.js → providers/Pict-Provider-DynamicTemplates-DefaultFormTemplates.js} +88 -77
- package/source/{Pict-Section-Form-Provider-Templates.js → providers/Pict-Provider-DynamicTemplates.js} +4 -1
- package/source/{Pict-Service-Informary.js → providers/Pict-Provider-Informary.js} +13 -4
- package/source/templates/Pict-Template-Base.js +87 -0
- package/source/{Pict-Template-MetacontrollerValueSetWithGroup.js → templates/Pict-Template-Metacontroller-ValueSetWithGroup.js} +1 -1
- package/source/{Pict-Section-Form-View-DefaultConfiguration.json → views/Pict-View-DynamicForm-DefaultConfiguration.json} +1 -0
- package/source/{Pict-Section-Form-View.js → views/Pict-View-DynamicForm.js} +149 -38
- package/source/{Pict-Form-Metacontroller.js → views/Pict-View-Form-Metacontroller.js} +45 -15
- /package/source/{Pict-Section-Form-MetatemplateGenerator.js → providers/Pict-Provider-MetatemplateGenerator.js} +0 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<title>Complex Table.</title>
|
|
5
|
+
<style id="PICT-CSS"></style>
|
|
6
|
+
<script src="./pict.min.js" type="text/javascript"></script>
|
|
7
|
+
<script type="text/javascript">Pict.safeOnDocumentReady(() => { Pict.safeLoadPictApplication(ComplexTabularApplication, 0)});</script>
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<div id="Pict-Form-Container"></div>
|
|
11
|
+
<script src="./complex_tabular_application.min.js" type="text/javascript"></script>
|
|
12
|
+
</body>
|
|
13
|
+
</html>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "complex_tabular_application",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "The most basic tabular application ever!",
|
|
5
|
+
"main": "Complex-Tabular-Application.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"start": "node Complex-Tabular-Application.js",
|
|
8
|
+
"build": "npx quack build && npx quack copy"
|
|
9
|
+
},
|
|
10
|
+
"author": "steven",
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"devDependencies": {},
|
|
13
|
+
"copyFilesSettings": {
|
|
14
|
+
"whenFileExists": "overwrite"
|
|
15
|
+
},
|
|
16
|
+
"copyFiles": [
|
|
17
|
+
{
|
|
18
|
+
"from": "./html/*",
|
|
19
|
+
"to": "./dist/"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"from": "../../node_modules/pict/dist/*",
|
|
23
|
+
"to": "./dist/"
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
|
@@ -22,5 +22,6 @@ module.exports.default_configuration.pict_configuration = (
|
|
|
22
22
|
{
|
|
23
23
|
"Product": "Grademaster",
|
|
24
24
|
|
|
25
|
-
"DefaultFormManifest": require(`./manifests/Gradebook-Manifest.js`)
|
|
25
|
+
"DefaultFormManifest": require(`./manifests/Gradebook-Manifest.js`),
|
|
26
|
+
"ConfigurationOnlyViews": require(`./views/BasicContent-View-Templates.json`)
|
|
26
27
|
});
|
|
@@ -1,3 +1,38 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
2
|
+
"Scope": "Assignment",
|
|
3
|
+
|
|
4
|
+
"Descriptors":
|
|
5
|
+
{
|
|
6
|
+
"Title":
|
|
7
|
+
{
|
|
8
|
+
"Name": "Assignment Title",
|
|
9
|
+
"Hash": "Title",
|
|
10
|
+
"DataType": "String",
|
|
11
|
+
"Default": "(unnamed assignment)",
|
|
12
|
+
"PictForm": { "Section": "AssignmentGrid", "Group":"AssignmentGrid" }
|
|
13
|
+
},
|
|
14
|
+
"Weight":
|
|
15
|
+
{
|
|
16
|
+
"Name": "Weight",
|
|
17
|
+
"Hash": "AssignmentWeight",
|
|
18
|
+
"DataType": "String",
|
|
19
|
+
"Default": "1.0",
|
|
20
|
+
"PictForm": { "Section": "AssignmentGrid", "Group":"AssignmentGrid" }
|
|
21
|
+
},
|
|
22
|
+
"Points":
|
|
23
|
+
{
|
|
24
|
+
"Name": "Points",
|
|
25
|
+
"Hash": "AssignmentPoints",
|
|
26
|
+
"DataType": "String",
|
|
27
|
+
"Default": "100",
|
|
28
|
+
"PictForm": { "Section": "AssignmentGrid", "Group":"AssignmentGrid" }
|
|
29
|
+
},
|
|
30
|
+
"EffectiveWeight":
|
|
31
|
+
{
|
|
32
|
+
"Name": "Effective Weight",
|
|
33
|
+
"Hash": "ClassWeight",
|
|
34
|
+
"DataType": "String",
|
|
35
|
+
"PictForm": { "Section": "AssignmentGrid", "Group":"AssignmentGrid" }
|
|
36
|
+
}
|
|
37
|
+
}
|
|
3
38
|
}
|
|
@@ -5,15 +5,23 @@ module.exports = (
|
|
|
5
5
|
"Sections": [
|
|
6
6
|
{
|
|
7
7
|
"Hash": "ClassManagement",
|
|
8
|
-
"Name": "
|
|
8
|
+
"Name": "My Classroom",
|
|
9
9
|
"Groups": [
|
|
10
10
|
{
|
|
11
11
|
"Hash": "StudentList",
|
|
12
|
-
"Name": "
|
|
12
|
+
"Name": "Student List",
|
|
13
13
|
|
|
14
14
|
"Layout": "Tabular",
|
|
15
15
|
"RecordSetAddress": "StudentList",
|
|
16
16
|
"RecordManifest": "Student"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"Hash": "AssignmentList",
|
|
20
|
+
"Name": "Assignment List",
|
|
21
|
+
|
|
22
|
+
"Layout": "Tabular",
|
|
23
|
+
"RecordSetAddress": "AssignmentList",
|
|
24
|
+
"RecordManifest": "Assignment"
|
|
17
25
|
}
|
|
18
26
|
]
|
|
19
27
|
},
|
|
@@ -21,14 +29,23 @@ module.exports = (
|
|
|
21
29
|
|
|
22
30
|
"Descriptors":
|
|
23
31
|
{
|
|
24
|
-
"
|
|
32
|
+
"StudentList":
|
|
25
33
|
{
|
|
26
34
|
"Name": "Student Roster",
|
|
27
35
|
"Hash": "StudentData",
|
|
28
36
|
"DataType": "Array",
|
|
29
37
|
"Default": []
|
|
30
38
|
, "PictForm": { "Section":"ClassManagement", "Group":"StudentList" }
|
|
39
|
+
},
|
|
40
|
+
"AssignmentList":
|
|
41
|
+
{
|
|
42
|
+
"Name": "Curriculum",
|
|
43
|
+
"Hash": "StudentData",
|
|
44
|
+
"DataType": "Array",
|
|
45
|
+
"Default": []
|
|
46
|
+
, "PictForm": { "Section":"ClassManagement", "Group":"AssignmentList" }
|
|
31
47
|
}
|
|
48
|
+
|
|
32
49
|
},
|
|
33
50
|
|
|
34
51
|
"ReferenceManifests":
|
|
@@ -1,28 +1,39 @@
|
|
|
1
1
|
{
|
|
2
2
|
"Scope": "Student",
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
"StudentName"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
, "PictForm": { "Section": "StudentGrid", "Group":"StudentGrid" }
|
|
13
|
-
},
|
|
14
|
-
"StudentID":
|
|
15
|
-
{
|
|
16
|
-
"Name": "Learning Style",
|
|
17
|
-
"Hash": "StudentLearningStyle",
|
|
18
|
-
"DataType": "String"
|
|
19
|
-
, "PictForm": { "Section": "StudentGrid", "Group":"StudentGrid" }
|
|
20
|
-
},
|
|
21
|
-
"StudentAge":
|
|
22
|
-
{
|
|
23
|
-
"Name": "Age",
|
|
24
|
-
"Hash": "Age",
|
|
25
|
-
"DataType": "Number"
|
|
3
|
+
"Descriptors": {
|
|
4
|
+
"StudentName": {
|
|
5
|
+
"Name": "Student Full Name",
|
|
6
|
+
"Hash": "StudentName",
|
|
7
|
+
"DataType": "String",
|
|
8
|
+
"Default": "(unnamed student)",
|
|
9
|
+
"PictForm": {
|
|
10
|
+
"Section": "StudentGrid",
|
|
11
|
+
"Group": "StudentGrid"
|
|
26
12
|
}
|
|
13
|
+
},
|
|
14
|
+
"StudentID": {
|
|
15
|
+
"Name": "Learning Style",
|
|
16
|
+
"Hash": "StudentLearningStyle",
|
|
17
|
+
"DataType": "String",
|
|
18
|
+
"PictForm": {
|
|
19
|
+
"Section": "StudentGrid",
|
|
20
|
+
"Group": "StudentGrid"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"ShoeSize": {
|
|
24
|
+
"Name": "Shoe Size",
|
|
25
|
+
"Hash": "ShoeSize",
|
|
26
|
+
"DataType": "Number",
|
|
27
|
+
"Default": 7.5,
|
|
28
|
+
"PictForm": {
|
|
29
|
+
"Section": "StudentGrid",
|
|
30
|
+
"Group": "StudentGrid"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"StudentAge": {
|
|
34
|
+
"Name": "Age",
|
|
35
|
+
"Hash": "Age",
|
|
36
|
+
"DataType": "Number"
|
|
27
37
|
}
|
|
38
|
+
}
|
|
28
39
|
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"BasicContent-AboutHtml-View": {
|
|
3
|
+
"ViewIdentifier": "BasicContent-AboutHtml-View",
|
|
4
|
+
"DefaultRenderable": "BasicContent-AboutHtml-Renderable",
|
|
5
|
+
"DefaultDestinationAddress": "#BasicContent-Content-Container",
|
|
6
|
+
"AutoRender": false,
|
|
7
|
+
"Templates": [
|
|
8
|
+
{
|
|
9
|
+
"Hash": "BasicContent-AboutHtml-Content-Template",
|
|
10
|
+
"Template": "<div class=\\\"header\\\">\n\t<h1>About Grademaster</h1>\n\t<h2>Where understanding and mastery are a weighed on a graduated scale.</h2>\n</div>\n<div class=\\\"content\\\">\n\t<p>Welcome to GradeMaster, your straightforward solution for managing and tracking student grades. Our web application is designed with simplicity and efficiency in mind, making it the perfect tool for teachers, students, and parents who want to stay informed and organized.</p>\n\n\t<h3>Our Mission</h3>\n\n\t<p>At GradeMaster, our mission is to streamline the grading process and provide an intuitive platform that fosters transparency and communication between educators, students, and parents. We believe that managing grades should be hassle-free, so you can focus on what truly matters: education.</p>\n\n\t<h4>Key Features</h4>\n\n\t<ul>\n\t\t<li>Easy Grade Entry: Inputting grades is quick and straightforward, saving teachers valuable time.</li>\n\t\t<li>Real-Time Updates: Students and parents can access up-to-date grades and performance summaries anytime, anywhere.</li>\n\t\t<li>Customizable Reports: Generate detailed reports to monitor progress and identify areas for improvement.</li>\n\t\t<li>Secure and Private: We prioritize your data privacy and security, ensuring that all information is protected.</li>\n\t</ul>\n\n\t<h3>Who Can Benefit?</h3>\n\t<ul>\n\t\t<li>Teachers: Simplify the grading process, save time, and maintain organized records.</li>\n\t\t<li>Students: Stay informed about your academic performance and track your progress.</li>\n\t\t<li>Parents: Keep up-to-date with your child's grades and support their educational journey.</li>\n\t</ul>\n\n\t<h3>Why Choose GradeMaster?</h3>\n\t</ul>\n\t\t<li>User-Friendly Interface: Our clean and intuitive design ensures that you can navigate the application with ease, regardless of your tech-savviness.</li>\n\t\t<li>Reliable Performance: Built with robust technology, GradeMaster is reliable and fast, ensuring a seamless experience.</li>\n\t\t<li>Dedicated Support: Our support team is here to help with any questions or issues you might encounter, ensuring you get the most out of GradeMaster.</li>\n\t</ul>\n\n\t<h3>Get Started</h3>\n\t<p>Ready to simplify your grading process? Sign up today and discover how GradeMaster can make managing grades easier and more efficient than ever.</p>\n\t<p>For more information, feel free to contact us or explore our FAQs.</p>\n\t<p>Thank you for choosing GradeMaster – where simplicity meets efficiency in grade management.</p>\n</div>"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"Renderables": [
|
|
14
|
+
{
|
|
15
|
+
"RenderableHash": "BasicContent-AboutHtml-Renderable",
|
|
16
|
+
"TemplateHash": "BasicContent-AboutHtml-Content-Template"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"CommentOriginalFilePath": "/Users/stevenvelozo/Code/retold/modules/pict/pict-section-form/example_applications/gradebook/source/views/html/About.html",
|
|
20
|
+
"CommentOriginalRootPath": "/Users/stevenvelozo/Code/retold/modules/pict/pict-section-form/example_applications/gradebook/source/views/html"
|
|
21
|
+
},
|
|
22
|
+
"BasicContent-LegalHtml-View": {
|
|
23
|
+
"ViewIdentifier": "BasicContent-LegalHtml-View",
|
|
24
|
+
"DefaultRenderable": "BasicContent-LegalHtml-Renderable",
|
|
25
|
+
"DefaultDestinationAddress": "#BasicContent-Content-Container",
|
|
26
|
+
"AutoRender": false,
|
|
27
|
+
"Templates": [
|
|
28
|
+
{
|
|
29
|
+
"Hash": "BasicContent-LegalHtml-Content-Template",
|
|
30
|
+
"Template": "<h1>Legal Stuff (The Fun Version)</h1>\n\n<p>Welcome to the GradeMaster Pro Legal Page! This is where we sprinkle a bit of humor on the otherwise dry and dusty legal stuff. Grab a cup of coffee, sit back, and enjoy our attempt to make legal jargon slightly less snooze-inducing.</p>\n\n<h2>Terms of Use</h2>\n<p>By using GradeMaster Pro, you agree to these terms. If you don’t agree, well, you probably shouldn’t be here. Seriously, we’ve put a lot of thought into this, so trust us, it’s worth agreeing to.</p>\n<ol>\n\t<li><strong>Don’t Be Evil</strong>: Stealing grades, hacking into accounts, or impersonating a teacher’s pet is strictly prohibited. Play nice!</li>\n\t<li><strong>No Robots Allowed</strong>: Unless you’re a cool, teaching robot from the future, no automated systems or scripts here, folks. We like our users human.</li>\n\t<li><strong>Use Responsibly</strong>: GradeMaster Pro is here to make your life easier, not to be used as a tool to procrastinate from actual grading. Use it wisely!</li>\n</ol>\n\n<h2>Privacy Policy</h2>\n<p>We take your privacy very seriously. Like, top-secret, James Bond seriously. Here’s how we handle your info:</p>\n<ul>\n\t<li><strong>Data Collection</strong>: We collect only what we need to make your experience awesome. No more, no less.</li>\n\t<li><strong>Cookies</strong>: Yes, we use cookies. Not the chocolate chip kind (sadly), but the digital kind to keep things running smoothly.</li>\n\t<li><strong>Sharing Information</strong>: We don’t sell your data to third parties. We wouldn’t even know how to price it. Your secrets are safe with us.</li>\n</ul>\n\n<h2>Limitation of Liability</h2>\n<p>Let’s keep this simple: if something goes wrong (like the internet breaking, your computer spontaneously combusting, or an alien invasion), GradeMaster Pro is not liable. We’re here to help, but some things are just out of our control.</p>\n<ol>\n\t<li><strong>No Guarantees</strong>: We strive for perfection, but we’re not perfect. If things go awry, we’ll do our best to fix them. No guarantees, but plenty of effort.</li>\n\t<li><strong>Damages</strong>: In the rare event that GradeMaster Pro causes you any damages (physical, emotional, or psychological), our liability is limited to making funny jokes and sending good vibes your way.</li>\n</ol>\n\n<h2>Changes to This Agreement</h2>\n<p>We might update these terms occasionally. When we do, we promise to give you a heads-up. No sneaky stuff. Check back here from time to time, or just trust that we’ll keep things reasonable.</p>\n\n<h2>Contact Us</h2>\n<p>Still awake? Impressive! If you have any questions, comments, or jokes to share, feel free to reach out to us at <a href=\"mailto:legal@grademasterpro.com\">legal@grademasterpro.com</a>. We promise to respond faster than you can say “legal mumbo jumbo.”</p>\n\n<p>Thanks for choosing GradeMaster Pro! Remember, with great grading power comes great responsibility. Use it wisely and keep on grading like a pro!</p>\n"
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"Renderables": [
|
|
34
|
+
{
|
|
35
|
+
"RenderableHash": "BasicContent-LegalHtml-Renderable",
|
|
36
|
+
"TemplateHash": "BasicContent-LegalHtml-Content-Template"
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"CommentOriginalFilePath": "/Users/stevenvelozo/Code/retold/modules/pict/pict-section-form/example_applications/gradebook/source/views/html/Legal.html",
|
|
40
|
+
"CommentOriginalRootPath": "/Users/stevenvelozo/Code/retold/modules/pict/pict-section-form/example_applications/gradebook/source/views/html"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -31,16 +31,30 @@ class PostcardApplication extends libPictApplication
|
|
|
31
31
|
changeToDefaultTheme()
|
|
32
32
|
{
|
|
33
33
|
this.pict.views.PictFormMetacontroller.formTemplatePrefix = _Pict.providers.PictFormSectionDefaultTemplateProvider.formsTemplateSetPrefix
|
|
34
|
+
// This generates the container metatemplates after we switch themes.
|
|
35
|
+
this.pict.views.PictFormMetacontroller.generateMetatemplate();
|
|
36
|
+
// This generates the view templates for each dynamic view generated from config.
|
|
34
37
|
this.pict.views.PictFormMetacontroller.regenerateFormSectionTemplates();
|
|
38
|
+
// Now render the new containers for the dynamic sections
|
|
39
|
+
this.pict.views.PictFormMetacontroller.render();
|
|
40
|
+
// This renders each of the dynamic view form sections.
|
|
35
41
|
this.pict.views.PictFormMetacontroller.renderFormSections();
|
|
42
|
+
// This puts the data into the view from AppData after it's rendered.
|
|
36
43
|
this.marshalDataFromAppDataToView();
|
|
37
44
|
}
|
|
38
45
|
|
|
39
46
|
changeToPostcardTheme()
|
|
40
47
|
{
|
|
41
48
|
this.pict.views.PictFormMetacontroller.formTemplatePrefix = _Pict.providers['Postcard-Default-Theme-Provider'].formsTemplateSetPrefix;
|
|
49
|
+
// This generates the container metatemplates after we switch themes.
|
|
50
|
+
this.pict.views.PictFormMetacontroller.generateMetatemplate();
|
|
51
|
+
// This generates the view templates for each dynamic view generated from config.
|
|
42
52
|
this.pict.views.PictFormMetacontroller.regenerateFormSectionTemplates();
|
|
53
|
+
// Now render the new containers for the dynamic sections
|
|
54
|
+
this.pict.views.PictFormMetacontroller.render();
|
|
55
|
+
// This renders each of the dynamic view form sections.
|
|
43
56
|
this.pict.views.PictFormMetacontroller.renderFormSections();
|
|
57
|
+
// This puts the data into the view from AppData after it's rendered.
|
|
44
58
|
this.marshalDataFromAppDataToView();
|
|
45
59
|
}
|
|
46
60
|
|
|
@@ -55,6 +69,7 @@ class PostcardApplication extends libPictApplication
|
|
|
55
69
|
|
|
56
70
|
this.pict.views.PostcardNavigation.render()
|
|
57
71
|
this.pict.views.PostcardMainApplication.render();
|
|
72
|
+
this.changeToPostcardTheme();
|
|
58
73
|
this.pict.views.PictFormMetacontroller.render();
|
|
59
74
|
|
|
60
75
|
return super.onAfterInitialize(fCallback);
|
|
@@ -6,128 +6,101 @@ const _Theme = (
|
|
|
6
6
|
|
|
7
7
|
"Templates":
|
|
8
8
|
[
|
|
9
|
-
/*
|
|
10
|
-
*
|
|
11
|
-
* [ Section Wrap Templates ]
|
|
12
|
-
*
|
|
13
|
-
*/
|
|
14
|
-
// -Form-Template-Wrap-Prefix
|
|
15
9
|
{
|
|
16
|
-
"HashPostfix": "-Template-
|
|
10
|
+
"HashPostfix": "-Template-Form-Container-Header",
|
|
17
11
|
"Template": /*HTML*/`
|
|
18
|
-
|
|
19
|
-
|
|
12
|
+
<!-- Pict Form Metacontroller container Header
|
|
13
|
+
|
|
14
|
+
;,//;, ,;/
|
|
15
|
+
o:::::::;;///
|
|
16
|
+
>::::::::;;\\\
|
|
17
|
+
''\\\\\'" ';\
|
|
18
|
+
|
|
19
|
+
Glug glug CUSTOMIZED glug Oo... -->
|
|
20
|
+
<div id="Pict-{~D:Context[0].UUID~}-FormContainer" class="pict-form">`
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"HashPostfix": "-Template-Wrap-Prefix",
|
|
24
|
+
"Template": /*HTML*/` `
|
|
20
25
|
},
|
|
21
|
-
// -Form-Template-Wrap-Postfix
|
|
22
26
|
{
|
|
23
27
|
"HashPostfix": "-Template-Wrap-Postfix",
|
|
24
|
-
"Template": /*HTML*/`
|
|
25
|
-
<!-- Pict Form Wrap Postfix [{~D:Context[0].UUID~}]::[{~D:Context[0].Hash~}] -->
|
|
26
|
-
`
|
|
28
|
+
"Template": /*HTML*/` `
|
|
27
29
|
},
|
|
28
30
|
|
|
29
31
|
|
|
30
|
-
// -Form-Template-Section-Prefix
|
|
31
32
|
{
|
|
32
33
|
"HashPostfix": "-Template-Section-Prefix",
|
|
33
34
|
"Template": /*HTML*/`
|
|
34
|
-
<!-- Form Section Prefix [{~D:Context[0].UUID~}]::[{~D:Context[0].Hash~}] {~D:Record.Hash~}::{~D:Record.Name~} -->
|
|
35
35
|
<form class="pure-form pure-form-stacked">
|
|
36
36
|
<fieldset>
|
|
37
37
|
`
|
|
38
38
|
},
|
|
39
|
-
// -Form-Template-Section-Postfix
|
|
40
39
|
{
|
|
41
40
|
"HashPostfix": "-Template-Section-Postfix",
|
|
42
41
|
"Template": /*HTML*/`
|
|
43
42
|
</fieldset>
|
|
44
43
|
</form>
|
|
45
|
-
<!-- Form Section Postfix [{~D:Context[0].UUID~}]::[{~D:Context[0].Hash~}] {~D:Record.Hash~}::{~D:Record.Name~} -->
|
|
46
44
|
`
|
|
47
45
|
},
|
|
48
46
|
|
|
49
47
|
|
|
50
|
-
/*
|
|
51
|
-
*
|
|
52
|
-
* [ Group and Row Templates (default) ]
|
|
53
|
-
*
|
|
54
|
-
*/
|
|
55
|
-
// -Form-Template-Group-Prefix
|
|
56
48
|
{
|
|
57
49
|
"HashPostfix": "-Template-Group-Prefix",
|
|
58
50
|
"Template": /*HTML*/`
|
|
59
|
-
<!-- Form Template Group Prefix [{~D:Context[0].UUID~}]::[{~D:Context[0].Hash~}] {~D:Record.Hash~}::{~D:Record.Name~} -->
|
|
60
51
|
<legend>{~D:Record.Name~}</legend>
|
|
61
52
|
<div class="pure-g">
|
|
62
53
|
`
|
|
63
54
|
},
|
|
64
|
-
// -Form-Template-Row-Prefix
|
|
65
55
|
{
|
|
66
56
|
"HashPostfix": "-Template-Row-Prefix",
|
|
67
57
|
"Template": /*HTML*/`
|
|
68
|
-
<!-- Form Template Row Prefix [{~D:Context[0].UUID~}]::[{~D:Context[0].Hash~}] {~D:Record.Hash~}::{~D:Record.Name~} -->
|
|
69
58
|
<div>
|
|
70
59
|
`
|
|
71
60
|
},
|
|
72
|
-
// -Form-Template-Row-Postfix
|
|
73
61
|
{
|
|
74
62
|
"HashPostfix": "-Template-Row-Postfix",
|
|
75
|
-
"Template": /*HTML*/`
|
|
76
|
-
<!-- Form Template Row Postfix [{~D:Context[0].UUID~}]::[{~D:Context[0].Hash~}] {~D:Record.Hash~}::{~D:Record.Name~} -->
|
|
77
|
-
`
|
|
63
|
+
"Template": /*HTML*/` `
|
|
78
64
|
},
|
|
79
|
-
// -Form-Template-Group-Postfix
|
|
80
65
|
{
|
|
81
66
|
"HashPostfix": "-Template-Group-Postfix",
|
|
82
|
-
"Template": /*HTML*/`
|
|
83
|
-
<!-- Form Template Group Prefix [{~D:Context[0].UUID~}]::[{~D:Context[0].Hash~}] {~D:Record.Hash~}::{~D:Record.Name~} -->
|
|
84
|
-
`
|
|
67
|
+
"Template": /*HTML*/` `
|
|
85
68
|
},
|
|
86
69
|
|
|
87
70
|
|
|
88
71
|
/*
|
|
89
|
-
*
|
|
90
|
-
* [ Input Templates (Default) ]
|
|
91
|
-
*
|
|
72
|
+
* [ Input Templates ]
|
|
92
73
|
*/
|
|
93
|
-
// -Form-Template-Input
|
|
94
74
|
{
|
|
95
75
|
"HashPostfix": "-Template-Input",
|
|
96
76
|
"Template": /*HTML*/`
|
|
97
|
-
<!-- DEFAULT Input {~"D:Record.Hash~} {~D:Record.DataType~} -->
|
|
98
77
|
<div class="pure-u-1 pure-u-md-1-3">
|
|
99
78
|
<label {~D:Record.Macro.HTMLForID~}>{~D:Record.Name~}:</label>
|
|
100
79
|
<input type="text" {~D:Record.Macro.HTMLID~} {~D:Record.Macro.InputFullProperties~} class="pure-u-23-24" />
|
|
101
80
|
</div>
|
|
102
81
|
`
|
|
103
82
|
},
|
|
104
|
-
// -Form-Template-Input-DataType-String
|
|
105
83
|
{
|
|
106
84
|
"HashPostfix": "-Template-Input-DataType-String",
|
|
107
85
|
"Template": /*HTML*/`
|
|
108
|
-
<!-- DataType Number {~D:Record.Hash~} {~D:Record.DataType~} -->
|
|
109
86
|
<div class="pure-u-1 pure-u-md-1-3">
|
|
110
87
|
<label {~D:Record.Macro.HTMLForID~}>{~D:Record.Name~}:</label>
|
|
111
88
|
<input type="text" {~D:Record.Macro.HTMLID~} {~D:Record.Macro.InputFullProperties~} class="pure-u-23-24" />
|
|
112
89
|
</div>
|
|
113
90
|
`
|
|
114
91
|
},
|
|
115
|
-
// -Form-Template-Input-DataType-Number
|
|
116
92
|
{
|
|
117
93
|
"HashPostfix": "-Template-Input-DataType-Number",
|
|
118
94
|
"Template": /*HTML*/`
|
|
119
|
-
<!-- DataType Number {~D:Record.Hash~} {~D:Record.DataType~} -->
|
|
120
95
|
<div class="pure-u-1 pure-u-md-1-3">
|
|
121
96
|
<label {~D:Record.Macro.HTMLForID~}>{~D:Record.Name~}:</label>
|
|
122
97
|
<input type="number" {~D:Record.Macro.HTMLID~} {~D:Record.Macro.InputFullProperties~} class="pure-u-23-24" />
|
|
123
98
|
</div>
|
|
124
99
|
`
|
|
125
100
|
},
|
|
126
|
-
// -Form-Template-Input-InputType-TextArea
|
|
127
101
|
{
|
|
128
102
|
"HashPostfix": "-Template-Input-InputType-TextArea",
|
|
129
103
|
"Template": /*HTML*/`
|
|
130
|
-
<!-- InputType TextArea {~D:Record.Hash~} {~D:Record.DataType~} -->
|
|
131
104
|
<div class="pure-u-1 pure-u-md-1-3">
|
|
132
105
|
<label {~D:Record.Macro.HTMLForID~}>{~D:Record.Name~}:</label>
|
|
133
106
|
<textarea {~D:Record.Macro.HTMLID~} {~D:Record.Macro.InputFullProperties~} class="pure-u-23-24"></textarea>
|
|
@@ -135,7 +108,7 @@ const _Theme = (
|
|
|
135
108
|
|
|
136
109
|
`
|
|
137
110
|
}
|
|
138
|
-
]});
|
|
111
|
+
]});
|
|
139
112
|
|
|
140
113
|
class PostcardTheme extends libPictFormSection.PictFormTemplateProvider
|
|
141
114
|
{
|
|
@@ -30,7 +30,11 @@
|
|
|
30
30
|
"Name": "Delivery Confirmation Contact Info",
|
|
31
31
|
"Hash": "Confirmation",
|
|
32
32
|
"Description": "The email address and phone number of the sender.",
|
|
33
|
-
"Groups": [
|
|
33
|
+
"Groups": [{
|
|
34
|
+
"Name": "Delivery Confirmation Information",
|
|
35
|
+
"Hash": "DeliveryConfirmationInfo",
|
|
36
|
+
"Description": "How should we tell you that it got there safely."
|
|
37
|
+
}]
|
|
34
38
|
}
|
|
35
39
|
],
|
|
36
40
|
|
|
@@ -122,7 +126,7 @@
|
|
|
122
126
|
"Hash":"SenderEmailAddress",
|
|
123
127
|
"Description":"The email address of the sender, for notification when the postcard is shipped.",
|
|
124
128
|
"DataType":"String"
|
|
125
|
-
,"PictForm": { "Section":"
|
|
129
|
+
,"PictForm": { "Section":"DeliveryConfirmationInfo", "Row":1, "Width":12 }
|
|
126
130
|
},
|
|
127
131
|
"SenderData.PhoneNumber":
|
|
128
132
|
{
|
|
@@ -130,7 +134,7 @@
|
|
|
130
134
|
"Hash":"SenderPhoneNumber",
|
|
131
135
|
"Description":"The phone number where the sender can be texted, for notification when the postcard is shipped.",
|
|
132
136
|
"DataType":"String"
|
|
133
|
-
,"PictForm": { "Section":"
|
|
137
|
+
,"PictForm": { "Section":"DeliveryConfirmationInfo", "Row":2, "Width":10, "CSSClasses": ["VeryImportantData"] }
|
|
134
138
|
},
|
|
135
139
|
"SenderData.ExplicitConsentToMailers":
|
|
136
140
|
{
|
|
@@ -138,7 +142,7 @@
|
|
|
138
142
|
"Hash":"SenderExplicitMarketingConsent",
|
|
139
143
|
"Description":"I agree to receiving marketing material at this phone number and email address.",
|
|
140
144
|
"DataType":"Boolean"
|
|
141
|
-
,"PictForm": { "Section":"
|
|
145
|
+
,"PictForm": { "Section":"DeliveryConfirmationInfo", "Row":1, "Width":2 }
|
|
142
146
|
}
|
|
143
147
|
}
|
|
144
148
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<title>Simple.</title>
|
|
5
5
|
<style id="PICT-CSS"></style>
|
|
6
6
|
<script src="./pict.min.js" type="text/javascript"></script>
|
|
7
|
-
<script type="text/javascript">Pict.safeOnDocumentReady(() => { Pict.safeLoadPictApplication(SimpleApplication,
|
|
7
|
+
<script type="text/javascript">Pict.safeOnDocumentReady(() => { Pict.safeLoadPictApplication(SimpleApplication, 1)});</script>
|
|
8
8
|
</head>
|
|
9
9
|
<body>
|
|
10
10
|
<div id="Pict-Form-Container"></div>
|