-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtemplates.html
302 lines (266 loc) · 13.8 KB
/
templates.html
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
<!-- Templates -->
<script id="panel-base" type="text/template">
<div class="panel panel-default panel-drag panel-resize" data-id="<%- item.id %>" data-component="" data-name="" data-type="<%- item.typeElement %>"
<% if(item.style){ %>
style="<%=item.style%>"
<%}%>
>
<div class="panel-heading">
<span><% print(item.name) %></span>
<div class="pull-right">
<div class="col-md-10">
<select class="select-type-element form-control" value="<%-item.typeElement%>" name="typeElement" style="margin-top: -7px">
<optgroup label="Container">
<option value="div">div</option>
</optgroup>
<optgroup label="Texto">
<option value="p" <% if(item.typeElement == 'p') print('selected')%>>p</option>
<option value="header" <% if(item.typeElement == 'header') print('selected')%>>h1 - h6</option>
<option value="a" <% if(item.typeElement == 'a') print('selected')%>>link</option>
<option value="label" <% if(item.typeElement == 'label') print('selected')%>>label</option>
<option value="span" <% if(item.typeElement == 'span') print('selected')%>>span</option>
</optgroup>
<optgroup label="Lista">
<option value="list" <% if(item.typeElement == 'list') print('selected')%>>ul-ol</option>
<option value="list-item" <% if(item.typeElement == 'list-item') print('selected')%>>li</option>
</optgroup>
<optgroup label="Imagem">
<option value="image" <% if(item.typeElement == 'image') print('selected')%>>img</option>
<option value="carousel" <% if(item.typeElement == 'carousel') print('selected')%>>carousel</option>
<option value="carousel-item" <% if(item.typeElement == 'carousel-item') print('selected')%>>carousel-item</option>
</optgroup>
<optgroup label="Navegação - Menu">
<option value="navigation" <% if(item.typeElement == 'navigation') print('selected')%>>BootstrapNavigation</option>
<option value="navigation-list" <% if(item.typeElement == 'navigation-list') print('selected')%>>BootstrapNavigationList</option>
<option value="navigation-list-item" <% if(item.typeElement == 'navigation-list-item') print('selected')%>>BootstrapNavigationListItem</option>
</optgroup>
<optgroup label="Formulário">
<option value="form" <% if(item.typeElement == 'form') print('selected')%>>form</option>
<option value="input-text" <% if(item.typeElement == 'input-text') print('selected')%>>input - text</option>
<option value="input-textarea" <% if(item.typeElement == 'input-textarea') print('selected')%>>input - textarea</option>
<option value="input-radio" <% if(item.typeElement == 'input-radio') print('selected')%>>input - radio/checkbox</option>
<option value="input-select" <% if(item.typeElement == 'input-select') print('selected')%>>select</option>
<option value="input-option" <% if(item.typeElement == 'input-option') print('selected')%>>option</option>
<option value="input-button" <% if(item.typeElement == 'input-button') print('selected')%>>button</option>
</optgroup>
</select>
</div>
<button data-open="0" class="btn-prop btn btn-primary btn-xs pull-right" data-container="body" data-trigger="hover" data-toggle="popover" data-placement="top" data-content="Exibe o formulário de opções do widget concreto."><i class="fa fa-cog"></i></button>
<span class="btn-handle btn btn-warning btn-xs pull-right" data-container="body" data-trigger="hover" data-toggle="popover" data-placement="top" data-content="Possibita arrastar o elemento."><i class="fa fa-arrows"></i></span>
</div>
</div>
<div class="panel-body">
<%= item.html ? item.html.html() : "" %>
</div>
</div>
</script>
<!-- Template BootstrapNavigationItem -->
<script type="text/template" id="template-navigationitem">
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Brand</a>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li class="active"><a href="#">Item 1 <span class="sr-only">(current)</span></a></li>
<li><a href="#">Item 2</a></li>
<li><a href="#">Item 3</a></li>
</ul>
</div>
</div>
</nav>
</script>
<!-- Template Paragraph -->
<script type="text/template" id="template-paragraph">
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas laoreet, sem sit amet tempor luctus, erat lorem cursus turpis, nec condimentum est leo eu massa. Integer tincidunt sodales enim in interdum. Nam ac elit enim. Mauris neque quam, viverra eu magna quis, suscipit fermentum ligula. Vestibulum tempor tortor ac lacus egestas lobortis. Praesent placerat porttitor ante, a maximus tellus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.
</p>
</script>
<!-- Template Title -->
<script type="text/template" id="template-title">
<h1>Título de Exemplo</h1>
</script>
<!-- Template link -->
<script type="text/template" id="template-link">
<a href="#">Link de exemplo</a>
</script>
<!-- Template span -->
<script type="text/template" id="template-span">
<span href="#">Texto de exemplo do span</span>
</script>
<!-- Template label -->
<script type="text/template" id="template-label">
<label>Texto de exemplo do label</label>
</script>
<!-- Template listItem -->
<script type="text/template" id="template-listitem">
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
</script>
<!-- Template img -->
<script type="text/template" id="template-img">
<img src="img/template-img.png" alt="Imagem de Exemplo" class="img-responsive" />
</script>
<!-- Template Carousel Item -->
<script type="text/template" id="template-carouselitem">
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
<div class="carousel-inner" role="listbox">
<div class="item active">
<img src="img/carousel-item.jpg" alt="Imagem de Exemplo" />
</div>
<div class="item">
<img src="img/carousel-item.jpg" alt="Imagem de Exemplo" />
</div>
<div class="item">
<img src="img/carousel-item.jpg" alt="Imagem de Exemplo" />
</div>
</div>
<a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</script>
<!-- Template text/textarea -->
<script type="text/template" id="template-inputtext">
<input type="text" class="form-control text-concrete" placeholder="Digite seu texto aqui" />
</script>
<!-- Template text/textarea -->
<script type="text/template" id="template-inputtextarea">
<textarea class="form-control text-concrete" placeholder="Digite seu texto aqui"></textarea>
</script>
<!-- Template radio/checkbox -->
<script type="text/template" id="template-inputradio">
<div class="radio">
<label><input type="radio" name="optionsRadios" checked> Opçao 1</label>
</div>
<div class="radio">
<label><input type="radio" name="optionsRadios"> Opçao 2</label>
</div>
<div class="radio">
<label><input type="radio" name="optionsRadios"> Opçao 3</label>
</div>
</script>
<!-- Template option -->
<script type="text/template" id="template-inputoption">
<select class="form-control text-concrete">
<option value="v1">Opção 1</option>
<option value="v2">Opção 2</option>
<option value="v3">Opção 3</option>
</select>
</script>
<!-- Template button -->
<script type="text/template" id="template-button">
<button class="btn btn-primary text-concrete">Botão</button>
</script>
<script type="text/template" id="form-prop">
<form class="form-horizontal form-properties" id="form-properties">
<% if(item.value != undefined) { %>
<div class="form-group">
<label>Valor</label>
<textarea class="form-control" name="value" rows="10"><%=item.value%></textarea>
</div>
<%}%>
<% if(item.headerTag != undefined) { %>
<div class="form-group">
<label>Tag</label>
<select class="form-control" id="select-header-tag" name="headerTag" value="<%=item.headerTag%>">
<option value="h1">h1</option>
<option value="h2" <% if(item.headerTag == 'h2') print('selected') %> >h2</option>
<option value="h3" <% if(item.headerTag == 'h2') print('selected') %> >h3</option>
<option value="h4" <% if(item.headerTag == 'h2') print('selected') %> >h4</option>
<option value="h5" <% if(item.headerTag == 'h2') print('selected') %> >h5</option>
<option value="h6" <% if(item.headerTag == 'h2') print('selected') %> >h6</option>
</select>
</div>
<%}%>
<% if(item.action != undefined) { %>
<div class="form-group">
<label>Action</label>
<input type="text" class="form-control" name="action" value="<%=item.action%>" />
</div>
<%}%>
<% if(item.simpleHtmlTag != undefined) { %>
<div class="form-group">
<label>Tag</label>
<input type="text" class="form-control" name="alt" value="<%=item.simpleHtmlTag%>" />
</div>
<%}%>
<% if(item.href != undefined) { %>
<div class="form-group">
<label>Href</label>
<input type="text" class="form-control" name="href" value="<%=item.href%>" />
</div>
<%}%>
<% if(item.src != undefined) { %>
<div class="form-group">
<label>Src</label>
<input type="text" class="form-control" name="src" value="<%=item.src%>" />
</div>
<%}%>
<% if(item.tagRadio != undefined) { %>
<div class="form-group">
<label>Tag</label>
<select class="form-control" id="select-tag-text" name="tagRadio" value="<%=item.tagRadio%>">
<option value="radio">radio</option>
<option value="checkbox" <% if(item.tagRadio == 'checkbox') print('selected') %> >checkbox</option>
</select>
</div>
<%}%>
<% if(item.listTag != undefined) { %>
<div class="form-group">
<label>Tag</label>
<select class="form-control" id="select-tag-text" name="listTag" value="<%=item.listTag%>">
<option value="ul">ul</option>
<option value="ol" <% if(item.listTag == 'ol') print('selected') %> >ol</option>
</select>
</div>
<%}%>
<% if(item.alt != undefined) { %>
<div class="form-group">
<label>Alt</label>
<input type="text" class="form-control" name="alt" value="<%=item.alt%>" />
</div>
<%}%>
<% if(item.width != undefined) { %>
<div class="form-group">
<label>Largura</label>
<input type="text" class="form-control" name="width" value="<%=item.width%>" />
</div>
<%}%>
<% if(item.height != undefined) { %>
<div class="form-group">
<label>Altura</label>
<input type="text" class="form-control" name="height" value="<%=item.height%>" />
</div>
<%}%>
<% if(item.text != undefined) { %>
<div class="form-group">
<label>Texto</label>
<textarea class="form-control" name="text" rows="5"><%=item.text%></textarea>
</div>
<%}%>
<div class="form-group">
<label>Classes</label>
<textarea class="form-control" id="txtClasses" name="class" rows="5"><%=item.class%></textarea>
</div>
<div class="form-group">
<button class="btn btn-primary" id="btnSalvar">Salvar</button>
<button class="btn btn-default" id="btnFechar">Fechar</button>
</div>
</form>
</script>