Repository navigation
Expand file tree
/
Copy pathdebug.soy
More file actions
137 lines (115 loc) · 3.12 KB
/
Copy pathdebug.soy
File metadata and controls
137 lines (115 loc) · 3.12 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
137
/**
* @fileoverview Debug overview for Coding in Chrome editor.
*
* @license Copyright 2015 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* @author mbordihn@google.com (Markus Bordihn)
*/
{namespace cwc.soy.Debug autoescape="strict"}
/**
* Debug template.
*/
{template .template}
{@param prefix: string}
{@param file_types: ?}
{@param mode_types: ?}
{@param message_types: ?}
{@param dialog_types: ?}
<div id="{$prefix}body" class="mdl-dialog">
<h2 class="mdl-dialog__title">Debug screen</h2>
<div id="{$prefix}close" class="icon_24px icon_button">close</div>
<h3>File Types</h3>
<select id="{$prefix}file_types">
{foreach $file_type in keys($file_types)}
<option value="{$file_type}">{$file_type}</option>
{/foreach}
</select>
<h3>Mode Types</h3>
<select id="{$prefix}mode_types">
{foreach $mode_type in keys($mode_types)}
<option value="{$mode_type}">{$mode_type}</option>
{/foreach}
</select>
<h3>Message Types</h3>
<select id="{$prefix}message_types">
{foreach $message_type in keys($message_types)}
<option value="{$message_type}">{$message_type}</option>
{/foreach}
</select>
<h3>Dialog Types</h3>
<select id="{$prefix}dialog_types">
{foreach $dialog_type in keys($dialog_types)}
<option value="{$dialog_type}">{$dialog_type}</option>
{/foreach}
</select>
<p>
<button id="{$prefix}dialog_show">show</button>
<button id="{$prefix}dialog_showModal">showModal</button>
<button id="{$prefix}dialog_showPrompt">showPrompt</button>
<button id="{$prefix}dialog_close">close</button>
</p>
<h3>i18n</h3>
<p>
<button id="{$prefix}i18n_untranslated">Untranslated</button>
</p>
<div id="{$prefix}footer">
Note: Not all features are implemented yet!
</div>
</div>
{/template}
/**
* Style definitions.
*/
{template .style}
{@param prefix: string}
#{$prefix}body {lb}
position: relative;
border: 1px solid red;
padding: 10px;
background: #ccc;
width: 250px;
{rb}
#{$prefix}body h2,
#{$prefix}body h3,
#{$prefix}body h4 {lb}
margin-bottom: 0;
{rb}
#{$prefix}body h2 {lb}
font-size: 24px;
{rb}
#{$prefix}body h3 {lb}
font-size: 16px;
{rb}
#{$prefix}body h4 {lb}
font-size: 12px;
{rb}
#{$prefix}close {lb}
position: absolute;
right: 5px;
top: 5px;
{rb}
#{$prefix}left {lb}
width: 300px;
float: left;
{rb}
#{$prefix}right {lb}
width: 300px;
float: right;
{rb}
#{$prefix}footer {lb}
clear: both;
margin-top: 10px;
{rb}
{/template}