-
Notifications
You must be signed in to change notification settings - Fork 430
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for
data-turbo-action="refresh"
to force a morph
- Loading branch information
Showing
7 changed files
with
84 additions
and
4 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
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,27 @@ | ||
<!DOCTYPE html> | ||
<html id="html" data-skip-event-details="turbo:submit-start turbo:submit-end turbo:fetch-request-error"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="turbo-refresh-method" content="morph"> | ||
<meta name="turbo-refresh-scroll" content="reset"> | ||
|
||
<title>Turbo</title> | ||
<link rel="icon" href="data:;base64,iVBORw0KGgo="> | ||
<script src="/dist/turbo.es2017-umd.js" data-turbo-track="reload"></script> | ||
<script src="/src/tests/fixtures/test.js"></script> | ||
</head> | ||
<body> | ||
<h1>Page to be refreshed</h1> | ||
|
||
<h2 id="subtitle">The subtitle will be replaced with morphing. Imagine we are now on a /posts/123 page within the same complex layout.</h2> | ||
|
||
<p><a id="refresh-link" data-turbo-action="refresh" href="/src/tests/fixtures/page_refresh_action_destination.html">Link to a new page but explicitly set the action to refresh</a></p> | ||
|
||
<form id="form" action="/__turbo/redirect" method="post" class="redirect" data-turbo-action="refresh"> | ||
<input id="form-text" type="text" name="text" value=""> | ||
<input type="hidden" name="path" value="/src/tests/fixtures/page_refresh_action_destination.html"> | ||
<input type="hidden" name="sleep" value="50"> | ||
<input id="form-submit" type="submit" value="form[method=post]" data-turbo-action="refresh"> | ||
</form> | ||
</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,27 @@ | ||
<!DOCTYPE html> | ||
<html id="html" data-skip-event-details="turbo:submit-start turbo:submit-end turbo:fetch-request-error"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="turbo-refresh-method" content="morph"> | ||
<meta name="turbo-refresh-scroll" content="reset"> | ||
|
||
<title>Turbo</title> | ||
<link rel="icon" href="data:;base64,iVBORw0KGgo="> | ||
<script src="/dist/turbo.es2017-umd.js" data-turbo-track="reload"></script> | ||
<script src="/src/tests/fixtures/test.js"></script> | ||
</head> | ||
<body> | ||
<h1>Page to be refreshed</h1> | ||
|
||
<h2 id="subtitle">The subtitle will be replaced with morphing. Imagine this page is a /posts/new page within a complex layout.</h2> | ||
|
||
<p><a id="refresh-link" data-turbo-action="refresh" href="/src/tests/fixtures/page_refresh_action_destination.html">Link to a new page but explicitly set the action to refresh</a></p> | ||
|
||
<form id="form" action="/__turbo/redirect" method="post" class="redirect" data-turbo-action="refresh"> | ||
<input id="form-text" type="text" name="text" value=""> | ||
<input type="hidden" name="path" value="/src/tests/fixtures/page_refresh_action_destination.html"> | ||
<input type="hidden" name="sleep" value="50"> | ||
<input id="form-submit" type="submit" value="form[method=post]" data-turbo-action="refresh"> | ||
</form> | ||
</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
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