-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Conflicts: # dist/fore-dev.js # dist/fore-dev.js.map # dist/fore.js # dist/fore.js.map
- Loading branch information
Showing
15 changed files
with
309 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"/> | ||
<meta content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes" name="viewport"/> | ||
|
||
<title>the 'if' attribute</title> | ||
|
||
<!-- <script src="./node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>--> | ||
<link href="../../resources/demo.css" rel="stylesheet"> | ||
|
||
|
||
|
||
</head> | ||
<body unresolved="unresolved"> | ||
<fore-corner href="../../doc/demos.html" title="Back to Demos"></fore-corner> | ||
<div class="wrapper"> | ||
|
||
<h1>Call an action or a function</h1> | ||
|
||
<p> | ||
<code>fx-call</code> allows to call action or a function. | ||
</p> | ||
|
||
<h2>Calling an action</h2> | ||
<p>Calling an action is useful to avoid duplication of actions needed in several places of a page.</p> | ||
<demo-snippet> | ||
<template> | ||
<fx-fore> | ||
<fx-action id="myAction"> | ||
<fx-message>one</fx-message> | ||
<fx-message delay="500">two</fx-message> | ||
<fx-message delay="1000">three</fx-message> | ||
</fx-action> | ||
<fx-trigger> | ||
<button>call action</button> | ||
<fx-call action="myAction"></fx-call> | ||
</fx-trigger> | ||
</fx-fore> | ||
</template> | ||
</demo-snippet> | ||
|
||
|
||
<h2>Calling a function</h2> | ||
<p>Sometimes you probably just want to call a function for its side-effects without using a bound node.</p> | ||
<demo-snippet> | ||
<template> | ||
<style> | ||
div { | ||
width: 100%; | ||
margin: 1rem 0; | ||
} | ||
</style> | ||
|
||
<fx-fore> | ||
<fx-model> | ||
<fx-function signature="hello() as item()?" type="text/javascript"> | ||
alert('hello'); | ||
return null; | ||
</fx-function> | ||
</fx-model> | ||
<fx-trigger> | ||
<button>call hello()</button> | ||
<fx-call function="hello()"></fx-call> | ||
</fx-trigger> | ||
</fx-fore> | ||
</template> | ||
</demo-snippet> | ||
|
||
</div> | ||
|
||
|
||
<script type="module" src="../demo.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Name;email;phone number;address; | ||
Example;[email protected];555-555-5555;Example Address; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"/> | ||
<meta content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes" name="viewport"/> | ||
|
||
<title>Submission - new tab</title> | ||
|
||
<!-- <script src="./node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>--> | ||
|
||
<link rel="stylesheet" href="../resources/demo.css"> | ||
|
||
|
||
|
||
|
||
<custom-style> | ||
<style is="custom-style"> | ||
.dynamic { | ||
background: #76ff03; | ||
} | ||
|
||
[unresolved] { | ||
display: none; | ||
} | ||
|
||
fx-trigger { | ||
display: block; | ||
} | ||
|
||
.demo{ | ||
border-radius: 10px; | ||
backdrop-filter: blur(5px); | ||
background-color: rgba(135,135,135, 0.2); | ||
box-shadow: rgba(0, 0, 0, 0.2) 2px 8px 8px; | ||
border: 2px rgba(255,255,255,0.4) solid; | ||
border-bottom: 2px rgba(40,40,40,0.35) solid; | ||
border-right: 2px rgba(40,40,40,0.35) solid; | ||
|
||
} | ||
|
||
|
||
</style> | ||
</custom-style> | ||
|
||
</head> | ||
<body unresolved="unresolved"> | ||
<fore-corner href="../doc/demos.html" title="Back to Demos"></fore-corner> | ||
|
||
<div class="wrapper"> | ||
<h1>Send response to new tab</h1> | ||
<p>In this demo a little CSV file it loaded into an instance of type 'text'. When the submission is triggered | ||
it will use the '#echo' handler to just return that instance back but sending it to a new browser tab.</p> | ||
|
||
<demo-snippet> | ||
<template> | ||
<fx-fore> | ||
<fx-message event="ready">Hey it's ready</fx-message> | ||
|
||
<fx-model> | ||
<fx-instance src="data/sample.csv" type="text"> | ||
</fx-instance> | ||
|
||
<fx-submission id="send" | ||
url="#echo" | ||
method="post" | ||
replace="all" | ||
target="_blank"> | ||
</fx-submission> | ||
</fx-model> | ||
<fx-group collapse="true"> | ||
<fx-trigger> | ||
<button>open response in new tab</button> | ||
<fx-send submission="send"></fx-send> | ||
</fx-trigger> | ||
|
||
</fx-group> | ||
{instance()} | ||
</fx-fore> | ||
</template> | ||
</demo-snippet> | ||
</div> | ||
<script type="module" src="./demo.js"></script> | ||
|
||
</body> | ||
</html> |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.