Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(616)

Unified Diff: chrome/third_party/jstemplate/tutorial_examples/02-gettpl.html

Issue 11971042: Move chrome\third_party\jstemplate to third_party\jstemplate since it's used from ui\. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/third_party/jstemplate/tutorial_examples/02-gettpl.html
===================================================================
--- chrome/third_party/jstemplate/tutorial_examples/02-gettpl.html (revision 177458)
+++ chrome/third_party/jstemplate/tutorial_examples/02-gettpl.html (working copy)
@@ -1,57 +0,0 @@
-<html>
-<head><title>Jstemplates: Quick example</title>
- <script src="../util.js" type="text/javascript"></script>
- <script src="../jsevalcontext.js" type="text/javascript"></script>
- <script src="../jstemplate.js" type="text/javascript"></script>
- <script type="text/javascript">
- var favdata = {title: 'Favorite Things', favs:['raindrops', 'whiskers', 'mittens']};
-
- function showData(reprocess) {
- var templateToProcess;
- var peg = document.getElementById('peg');
-
- if (!reprocess) { // Get a copy of the template:
- templateToProcess = jstGetTemplate('t1');
- // Clear the element to which we'll attach the template:
- peg.innerHTML = '';
- // Attach the template
- domAppendChild(peg, templateToProcess);
- }
- else { // Use the copy we already have
- templateToProcess = peg;
- }
- // Wrap our data in a context object:
- var processingContext = new JsEvalContext(favdata);
-
- // Process the template
- jstProcess(processingContext, templateToProcess);
- }
- </script>
- <link rel="stylesheet" type="text/css" href="css/maps2.deb.css"/>
-</head>
-<body onload="showData(false)">
-<!--
-The element to which our template will be attached at display-time:
--->
-<div id="peg"></div>
-
-<!--
-A container to hide our template:
--->
-<div style="display:none">
-
-<!--
-This is the template div. It will be copied and attached to the div above.
--->
-<div id="t1">
- <h1 jscontent="title"></h1>
- <ul><li jscontent="$this" jsselect="favs"></li></ul>
-</div>
-
-</div>
-
-<p>
-<a href="#" onclick="favdata.favs.push('packages');showData(true);">Reprocess</a>
-</p>
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698