-
Notifications
You must be signed in to change notification settings - Fork 194
Expand file tree
/
Copy pathindex.html
More file actions
136 lines (119 loc) · 5.09 KB
/
Copy pathindex.html
File metadata and controls
136 lines (119 loc) · 5.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<!doctype html>
<html>
<head>
<title>loadTemplate Test Suite</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" type="text/javascript"></script>
<script src="../dist/jquery.loadTemplate.js" type="text/javascript"></script>
<script src="testRunner.js" type="text/javascript"></script>
<!--TEST SCRIPTS-->
<script>
runTests([
'files/general.js',
'files/formatters.js',
'files/callback.js',
'files/error.js',
'files/bindingOptions.js'
]);
</script>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" />
<style type="text/css">
.hide {
display: none;
}
.red {
background: red;
color: white;
}
#wru div.testfile {
padding: 10px;
color: green;
font-weight: bold;
}
#wru {
font-family: sans-serif;
font-size: 11pt;
border: 1px solid #333;
}
#wru div {
cursor: default;
padding: 0;
color: #000;
}
#wru div span,
#wru div strong {
display: block;
padding: 4px;
margin: 0;
}
#wru div ul {
margin: 0;
padding-bottom: 4px;
}
#wru div.pass {
background: #90EE90;
}
#wru div.fail {
background: #FF6347;
}
#wru div.error {
background: #000;
color: #FFF;
}
</style>
</head>
<body>
<!--ELEMENT TO RENDER IN-->
<div id="render" class="hide"><div>should disappear</div></div>
<!--TEMPLATE-->
<script type="text/html" id="template">
<div class="container">
<div class="name" data-content="name"></div>
<div class= "id" data-content="id"></div>
<input class="hidden" type="text" value="" data-value="id" />
</div>
</script>
<!--TEMPLATE 2-->
<script type="text/html" id="template2">
<div class="container">
<div class="name" data-content="name" data-format="UpperCaseFormatter"></div>
<div class= "id" data-content="id" data-format="idFormatter"></div>
<input class="hidden" type="text" value="" data-value="id" />
</div>
</script>
<!--TEMPLATE 3-->
<script type="text/html" id="template3">
<div class="container">
<div class="name" data-content="name" data-format="singleFormatter"></div>
<div class= "id" data-content="id" data-format="idFormatter"></div>
<input class="hidden" type="text" data-value="id" data-format-target="value" data-format="singleFormatter2" />
</div>
</script>
<!--THIS TEMPLATE-->
<script type="text/html" id="thisTemplate">
<li data-template-bind='
{"attribute": "content", "value": "this"}'></li>
</script>
<!--NESTED TEMPLATE-->
<script type="text/html" id="nestTemplate">
<div class='single-attribute' data-content="testSingle"></div>
<div class='template-bind-nest' data-template-bind='{"attribute": "content", "value": "testArray", "formatter": "nestedTemplateFormatter", "formatOptions": {"parentElement": "ul", "template": "#thisTemplate"}}'></div>
<div class='attribute-nest' data-content="testArray" data-format="nestedTemplateFormatter" data-format-options='{"parentElement": "ul", "template": "#thisTemplate"}'></div>
</script>
<script type="text/html" id="templateWithBindingOptions">
<h3><a href="#" data-content-append="title">Titel: </a></h3>
<h4 data-content-append="subtitle" data-binding-options='{"ignoreUndefined": true, "ignoreNull": true, "ignoreEmptyString": true}'>Subtitle: </h4>
</script>
<script type="text/html" id="templateWithoutBindingOptions">
<h3><a href="#" data-content-append="title">Titel: </a></h3>
<h4 data-content-append="subtitle">Subtitle: </h4>
</script>
<script type="text/html" id="templateWithBindingOptionsAsDataBindTemplateAttribute">
<h3><a href="#" data-content-append="title">Titel: </a></h3>
<h4 data-template-bind='[{"attribute": "contentAppend", "value": "subtitle", "bindingOptions": {"ignoreUndefined": true, "ignoreNull": true, "ignoreEmptyString": true}}]'>Subtitle: </h4>
</script>
<div id="bindingOptionsContainer" class="hide" ></div>
<div id="wru"></div>
<script src="wru.js" type="text/javascript"></script>
</body>
</html>