|
@@ -1,451 +0,0 @@
|
1
|
|
-<!DOCTYPE html>
|
2
|
|
-<html lang="en">
|
3
|
|
-<head>
|
4
|
|
- <title>RPG cards</title>
|
5
|
|
- <meta charset="UTF-8">
|
6
|
|
- <!-- Library: jQuery -->
|
7
|
|
- <script type="text/javascript" src="lib/jquery/jquery.min.js" charset="utf-8"></script>
|
8
|
|
- <!-- Library: Bootstrap -->
|
9
|
|
- <script type="text/javascript" src="lib/bootstrap/js/bootstrap.min.js" charset="utf-8"></script>
|
10
|
|
- <link rel="stylesheet" type="text/css" href="lib/bootstrap/css/bootstrap.min.css" />
|
11
|
|
- <link rel="stylesheet" type="text/css" href="lib/bootstrap/css/bootstrap-theme.min.css" />
|
12
|
|
- <!-- Library: Bootstrap typeahead -->
|
13
|
|
- <script type="text/javascript" src="lib/typeahead/bootstrap3-typeahead.min.js" charset="utf-8"></script>
|
14
|
|
- <!-- Library: Color picker -->
|
15
|
|
- <link href="lib/colorpicker/css/bootstrap-colorselector.css" rel="stylesheet" />
|
16
|
|
- <script type="text/javascript" src="lib/colorpicker/js/bootstrap-colorselector.js" charset="utf-8"></script>
|
17
|
|
- <!-- Data -->
|
18
|
|
- <script type="text/javascript" src="data/card_data_example.js"></script>
|
19
|
|
- <!-- Javascript -->
|
20
|
|
- <script type="text/javascript" src="js/cards.js"></script>
|
21
|
|
- <script type="text/javascript" src="js/colors.js"></script>
|
22
|
|
- <script type="text/javascript" src="js/icons.js"></script>
|
23
|
|
- <script type="text/javascript" defer src="js/ui.js"></script>
|
24
|
|
- <!-- CSS -->
|
25
|
|
- <link href="css/ui.css" rel="stylesheet" />
|
26
|
|
- <link href="css/cards.css" rel="stylesheet" />
|
27
|
|
- <link href="css/card-size.css" rel="stylesheet" />
|
28
|
|
- <link href="css/icons.css" rel="stylesheet" />
|
29
|
|
- <link href="css/class-icons.css" rel="stylesheet" />
|
30
|
|
- <link href="css/custom-icons.css" rel="stylesheet" />
|
31
|
|
- <!-- Fonts -->
|
32
|
|
- <link href='https://fonts.googleapis.com/css?family=Noto+Sans:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
|
33
|
|
- <link href='https://fonts.googleapis.com/css?family=Lora:700' rel='stylesheet' type='text/css'>
|
34
|
|
-</head>
|
35
|
|
-<body>
|
36
|
|
- <div class="container-fluid">
|
37
|
|
- <!--<h1 class="page-header">RPG card generator</h1>-->
|
38
|
|
- <div class="row">
|
39
|
|
- <div class="alert alert-warning alert-dismissible" role="alert">
|
40
|
|
- <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
|
41
|
|
- <strong>Note</strong>
|
42
|
|
- Click on "Open help" to display some information about how to use this generator and what to do if you have a feature request or found a bug.
|
43
|
|
- </div>
|
44
|
|
- </div>
|
45
|
|
- <div class="row">
|
46
|
|
- <div class="col-md-12 col-lg-3">
|
47
|
|
- <!--<h3>Menu</h3>-->
|
48
|
|
- <form style="display:none" id="file-load-form">
|
49
|
|
- <input type="file" id="file-load" name="files[]" multiple class="form-control" style="display:none" />
|
50
|
|
- </form>
|
51
|
|
- <form role="form" class="form-horizontal">
|
52
|
|
- <div class="form-group">
|
53
|
|
- <div class="col-sm-6">
|
54
|
|
- <button type="button" class="btn btn-info btn-block" id="button-help">Open Help</button>
|
55
|
|
- </div>
|
56
|
|
- <div class="col-sm-6">
|
57
|
|
- <button type="button" class="btn btn-danger btn-block" id="button-clear">Delete all</button>
|
58
|
|
- </div>
|
59
|
|
- </div>
|
60
|
|
- <div class="form-group">
|
61
|
|
- <div class="col-sm-6">
|
62
|
|
- <button type="button" class="btn btn-primary btn-block" id="button-load-sample">Load sample</button>
|
63
|
|
- </div>
|
64
|
|
- <div class="col-sm-6">
|
65
|
|
- <button type="button" class="btn btn-primary btn-block" id="button-load">Load from file</button>
|
66
|
|
- </div>
|
67
|
|
- </div>
|
68
|
|
- <div class="form-group">
|
69
|
|
- <div class="col-sm-6">
|
70
|
|
- <button type="button" class="btn btn-primary btn-block" id="button-sort">Sort</button>
|
71
|
|
- </div>
|
72
|
|
- <div class="col-sm-6">
|
73
|
|
- <button type="button" class="btn btn-primary btn-block" id="button-save" onclick="ui_save_file()">Save to file</button>
|
74
|
|
- <a href="" download="rpg_cards.json" id="file-save-link" style="display:none">Hidden download link</a>
|
75
|
|
- </div>
|
76
|
|
- </div>
|
77
|
|
- <div class="form-group">
|
78
|
|
- <div class="col-sm-6">
|
79
|
|
- <button type="button" class="btn btn-primary btn-block" id="button-filter">Map/Filter</button>
|
80
|
|
- </div>
|
81
|
|
- <div class="col-sm-6">
|
82
|
|
- <button type="button" class="btn btn-success btn-block" id="button-generate">Generate</button>
|
83
|
|
- </div>
|
84
|
|
- </div>
|
85
|
|
- <!--<span class="help-block">Generated cards open in a new tab or window.</span>-->
|
86
|
|
- </form>
|
87
|
|
- <h3>Page settings</h3>
|
88
|
|
- <form role="form" class="form-horizontal">
|
89
|
|
- <div class="form-group">
|
90
|
|
- <label for="page-size" class="col-sm-4 control-label">Page Size</label>
|
91
|
|
- <div class="col-sm-8">
|
92
|
|
- <select class="form-control" id="page-size" data-option="page_size">
|
93
|
|
- <option value="A4" selected>A4</option>
|
94
|
|
- <option value="Letter">US letter</option>
|
95
|
|
- <option value="25x35">2.5" x 3.5"</option>
|
96
|
|
- </select>
|
97
|
|
- </div>
|
98
|
|
- </div>
|
99
|
|
- <div class="form-group">
|
100
|
|
- <label for="card-size" class="col-sm-4 control-label">Card Size</label>
|
101
|
|
- <div class="col-sm-8">
|
102
|
|
- <select class="form-control" id="card-size" data-option="card_size">
|
103
|
|
- <option value="225x35">2.25" x 3.5" (Bridge)</option>
|
104
|
|
- <option value="25x35" selected>2.5" x 3.5" (Poker)</option>
|
105
|
|
- <option value="35x50">3.5" x 5.0"</option>
|
106
|
|
- <option value="75x50">7.5" x 5.0"</option>
|
107
|
|
- </select>
|
108
|
|
- </div>
|
109
|
|
- </div>
|
110
|
|
- <div class="form-group">
|
111
|
|
- <label for="card-size" class="col-sm-4 control-label">Cards/page</label>
|
112
|
|
- <div class="col-sm-3">
|
113
|
|
- <input type="text" id="page-rows" class="form-control" data-option="page_rows" value="3">
|
114
|
|
- </div>
|
115
|
|
- <div class="col-sm-2">
|
116
|
|
- <p class="form-control-static">x</p>
|
117
|
|
- </div>
|
118
|
|
- <div class="col-sm-3">
|
119
|
|
- <input type="text" id="page-columns" class="form-control" data-option="page_columns" value="3">
|
120
|
|
- </div>
|
121
|
|
- </div>
|
122
|
|
- <div class="form-group">
|
123
|
|
- <label for="card-arrangement" class="col-sm-4 control-label">Arrangement</label>
|
124
|
|
- <div class="col-sm-8">
|
125
|
|
- <select class="form-control" id="card-arrangement" data-option="card_arrangement">
|
126
|
|
- <option value="doublesided" selected>Double sided printing</option>
|
127
|
|
- <option value="front_only">Front side only</option>
|
128
|
|
- <option value="side_by_side">Side by side</option>
|
129
|
|
- </select>
|
130
|
|
- </div>
|
131
|
|
- </div>
|
132
|
|
- <div class="form-group">
|
133
|
|
- <label for="foreground-color" class="col-sm-4 control-label">Front color</label>
|
134
|
|
- <div class="col-sm-8">
|
135
|
|
- <div class="input-group">
|
136
|
|
- <select id="foreground_color_selector" class="colorselector-data"></select>
|
137
|
|
- <input type="text" id="foreground-color" class="form-control" placeholder="Front page color" data-property="color" value="white">
|
138
|
|
- </div>
|
139
|
|
- </div>
|
140
|
|
- </div>
|
141
|
|
- <div class="form-group">
|
142
|
|
- <label for="background-color" class="col-sm-4 control-label">Back color</label>
|
143
|
|
- <div class="col-sm-8">
|
144
|
|
- <div class="input-group">
|
145
|
|
- <select id="background_color_selector" class="colorselector-data"></select>
|
146
|
|
- <input type="text" id="background-color" class="form-control" placeholder="Back page color" data-property="color" value="white">
|
147
|
|
- </div>
|
148
|
|
- </div>
|
149
|
|
- </div>
|
150
|
|
- </form>
|
151
|
|
- <h3>Default values</h3>
|
152
|
|
- <form role="form" class="form-horizontal">
|
153
|
|
- <div class="form-group">
|
154
|
|
- <label for="small-icons" class="col-sm-2 control-label">Icon</label>
|
155
|
|
- <div class="col-sm-10">
|
156
|
|
- <div class="checkbox">
|
157
|
|
- <label>
|
158
|
|
- <input type="checkbox" checked id="small-icons"> Use small front icons
|
159
|
|
- </label>
|
160
|
|
- </div>
|
161
|
|
- </div>
|
162
|
|
- </div>
|
163
|
|
- <div class="form-group">
|
164
|
|
- <label for="default-color" class="col-sm-2 control-label">Color</label>
|
165
|
|
- <div class="col-sm-10">
|
166
|
|
- <div class="input-group">
|
167
|
|
- <select id="default_color_selector" class="colorselector-data"></select>
|
168
|
|
- <input type="text" id="default-color" class="form-control" placeholder="Card color" data-property="color" value="black">
|
169
|
|
- </div>
|
170
|
|
- </div>
|
171
|
|
- </div>
|
172
|
|
- <div class="form-group">
|
173
|
|
- <label for="default-icon" class="col-sm-2 control-label">Icon</label>
|
174
|
|
- <div class="col-sm-10">
|
175
|
|
- <div class="input-group">
|
176
|
|
- <span class="input-group-btn">
|
177
|
|
- <button class="btn btn-default icon-select-button" type="button">Search</button>
|
178
|
|
- </span>
|
179
|
|
- <input type="text" id="default-icon" class="form-control icon-list" placeholder="Icon name">
|
180
|
|
- </div>
|
181
|
|
- </div>
|
182
|
|
- </div>
|
183
|
|
- <div class="form-group">
|
184
|
|
- <label for="default-title-size" class="col-sm-2 control-label">Title</label>
|
185
|
|
- <div class="col-sm-10">
|
186
|
|
- <select class="form-control" id="default-title-size">
|
187
|
|
- <option value="16">16pt font</option>
|
188
|
|
- <option value="15">15pt font</option>
|
189
|
|
- <option value="14">14pt font</option>
|
190
|
|
- <option value="13" selected>13pt font</option>
|
191
|
|
- <option value="12">12pt font</option>
|
192
|
|
- <option value="11">11pt font</option>
|
193
|
|
- <option value="10">10pt font</option>
|
194
|
|
- </select>
|
195
|
|
- </div>
|
196
|
|
- </div>
|
197
|
|
- <div class="form-group">
|
198
|
|
- <div class="col-sm-6">
|
199
|
|
- <button type="button" class="btn btn-primary btn-block" id="button-apply-color">Apply color</button>
|
200
|
|
- </div>
|
201
|
|
- <div class="col-sm-6">
|
202
|
|
- <button type="button" class="btn btn-primary btn-block" id="button-apply-font">Apply title font</button>
|
203
|
|
- </div>
|
204
|
|
- </div>
|
205
|
|
- <div class="form-group">
|
206
|
|
- <div class="col-sm-6">
|
207
|
|
- <button type="button" class="btn btn-primary btn-block" id="button-apply-icon">Apply icon</button>
|
208
|
|
- </div>
|
209
|
|
- <div class="col-sm-6">
|
210
|
|
- <button type="button" class="btn btn-primary btn-block" id="button-apply-icon-back">Apply back icon</button>
|
211
|
|
- </div>
|
212
|
|
- </div>
|
213
|
|
- </form>
|
214
|
|
- </div>
|
215
|
|
- <div class="col-md-12 col-lg-5">
|
216
|
|
- <!--<h3>Card</h3>-->
|
217
|
|
- <form class="form-horizontal" role="form">
|
218
|
|
- <div class="form-group">
|
219
|
|
- <label for="selected-card" class="col-sm-2 control-label">Deck</label>
|
220
|
|
- <div class="col-sm-10">
|
221
|
|
- <p class="form-control-static" id="total_card_count">Deck contains 0 cards.</p>
|
222
|
|
- </div>
|
223
|
|
- </div>
|
224
|
|
- <div class="form-group">
|
225
|
|
- <label for="selected-card" class="col-sm-2 control-label">Card</label>
|
226
|
|
- <div class="col-sm-10">
|
227
|
|
- <select class="form-control" id="selected-card"></select>
|
228
|
|
- </div>
|
229
|
|
- </div>
|
230
|
|
- <div class="form-group">
|
231
|
|
- <label class="col-sm-2 control-label"></label>
|
232
|
|
- <div class="col-sm-4">
|
233
|
|
- <button type="button" class="btn btn-danger btn-block" id="button-delete-card">Delete card</button>
|
234
|
|
- </div>
|
235
|
|
- <div class="col-sm-3">
|
236
|
|
- <button type="button" class="btn btn-primary btn-block" id="button-add-card">Add new card</button>
|
237
|
|
- </div>
|
238
|
|
- <div class="col-sm-3">
|
239
|
|
- <button type="button" class="btn btn-primary btn-block" id="button-duplicate-card">Duplicate card</button>
|
240
|
|
- </div>
|
241
|
|
- </div>
|
242
|
|
- <div class="form-group">
|
243
|
|
- <label for="card-title" class="col-sm-2 control-label">Name</label>
|
244
|
|
- <div class="col-sm-10">
|
245
|
|
- <input type="text" id="card-title" class="form-control" placeholder="Title">
|
246
|
|
- </div>
|
247
|
|
- </div>
|
248
|
|
- <div class="form-group">
|
249
|
|
- <label for="card-title-size" class="col-sm-2 control-label">Title</label>
|
250
|
|
- <div class="col-sm-10">
|
251
|
|
- <select class="form-control" id="card-title-size" data-property="title_size">
|
252
|
|
- <option value="" selected>default font</option>
|
253
|
|
- <option value="16">16pt font</option>
|
254
|
|
- <option value="15">15pt font</option>
|
255
|
|
- <option value="14">14pt font</option>
|
256
|
|
- <option value="13">13pt font</option>
|
257
|
|
- <option value="12">12pt font</option>
|
258
|
|
- <option value="11">11pt font</option>
|
259
|
|
- <option value="10">10pt font</option>
|
260
|
|
- </select>
|
261
|
|
- </div>
|
262
|
|
- </div>
|
263
|
|
- <div class="form-group">
|
264
|
|
- <label for="card-count" class="col-sm-2 control-label">Count</label>
|
265
|
|
- <div class="col-sm-10">
|
266
|
|
- <input type="number" id="card-count" class="form-control" placeholder="Count" data-property="count" value="1">
|
267
|
|
- </div>
|
268
|
|
- </div>
|
269
|
|
- <div class="form-group">
|
270
|
|
- <label for="card-tags" class="col-sm-2 control-label">Tags</label>
|
271
|
|
- <div class="col-sm-10">
|
272
|
|
- <input type="text" id="card-tags" class="form-control" placeholder="Tags">
|
273
|
|
- </div>
|
274
|
|
- </div>
|
275
|
|
- <div class="form-group">
|
276
|
|
- <label for="card-icon" class="col-sm-2 control-label">Icon</label>
|
277
|
|
- <div class="col-sm-10">
|
278
|
|
- <div class="input-group">
|
279
|
|
- <span class="input-group-btn">
|
280
|
|
- <button class="btn btn-default icon-select-button" type="button">Search</button>
|
281
|
|
- </span>
|
282
|
|
- <input type="text" id="card-icon" class="form-control icon-list" placeholder="Default icon" data-property="icon">
|
283
|
|
- </div>
|
284
|
|
- </div>
|
285
|
|
- </div>
|
286
|
|
- <div class="form-group">
|
287
|
|
- <label for="card-icon-back" class="col-sm-2 control-label">Back icon</label>
|
288
|
|
- <div class="col-sm-10">
|
289
|
|
- <div class="input-group">
|
290
|
|
- <span class="input-group-btn">
|
291
|
|
- <button class="btn btn-default icon-select-button" type="button">Search</button>
|
292
|
|
- </span>
|
293
|
|
- <input type="text" id="card-icon-back" class="form-control icon-list" placeholder="Same as front" data-property="icon_back">
|
294
|
|
- </div>
|
295
|
|
- </div>
|
296
|
|
- </div>
|
297
|
|
- <div class="form-group">
|
298
|
|
- <label for="card-color" class="col-sm-2 control-label">Color</label>
|
299
|
|
- <div class="col-sm-10">
|
300
|
|
- <div class="input-group">
|
301
|
|
- <select id="card_color_selector" class="colorselector-data"></select>
|
302
|
|
- <input type="text" id="card-color" class="form-control" placeholder="Default color" data-property="color">
|
303
|
|
- </div>
|
304
|
|
- </div>
|
305
|
|
- </div>
|
306
|
|
- <div class="form-group">
|
307
|
|
- <label for="card-contents" class="col-sm-2 control-label">Contents</label>
|
308
|
|
- <div class="col-sm-10">
|
309
|
|
- <textarea class="form-control" rows="14" id="card-contents" wrap="off"></textarea>
|
310
|
|
- </div>
|
311
|
|
- </div>
|
312
|
|
- </form>
|
313
|
|
- </div>
|
314
|
|
- <div class="col-md-12 col-lg-4">
|
315
|
|
- <!--<h3>Preview</h3>-->
|
316
|
|
- <div id="preview-container" class="preview-container">
|
317
|
|
- </div>
|
318
|
|
- </div>
|
319
|
|
- </div>
|
320
|
|
- </div>
|
321
|
|
- <!-- Modal -->
|
322
|
|
- <div class="modal" id="print-modal" tabindex="-1" role="dialog">
|
323
|
|
- <div class="modal-dialog">
|
324
|
|
- <div class="modal-content">
|
325
|
|
- <div class="modal-header">
|
326
|
|
- <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
|
327
|
|
- <h4 class="modal-title" id="myModalLabel">Printing generated cards</h4>
|
328
|
|
- </div>
|
329
|
|
- <div class="modal-body">
|
330
|
|
- <ul>
|
331
|
|
- <li>The generated cards open in a new tab or window. If you don't see any new tab or window, check your popup and script blockers. If that does not help, try disabling all addons.</li>
|
332
|
|
- <li>Make sure you enable the printing of background images and colors in your browser.</li>
|
333
|
|
- <li>Make sure your printer uses the correct paper size (same as in the editor).</li>
|
334
|
|
- <li>Enable double sided printing (flip on long edge).</li>
|
335
|
|
- <li>Do not scale the document to fit the page. Print at original size.</li>
|
336
|
|
- <li>
|
337
|
|
- Some printers are not very precise (pages print slightly shifted or rotated) and the cards will not line up with the card backs.
|
338
|
|
- If this is the case, there's not much you can do.
|
339
|
|
- Try making the page background the same color as the cards, so that you won't get any white edges on the card.
|
340
|
|
- If that does not help, try a different printer or print single-sided.
|
341
|
|
- </li>
|
342
|
|
- </ul>
|
343
|
|
- </div>
|
344
|
|
- <div class="modal-footer">
|
345
|
|
- <button type="button" class="btn btn-default" data-dismiss="modal">Ok, got it</button>
|
346
|
|
- </div>
|
347
|
|
- </div>
|
348
|
|
- </div>
|
349
|
|
- </div>
|
350
|
|
- <!-- Modal (Info)-->
|
351
|
|
- <div class="modal" id="help-modal" tabindex="-1" role="dialog">
|
352
|
|
- <div class="modal-dialog">
|
353
|
|
- <div class="modal-content">
|
354
|
|
- <div class="modal-header">
|
355
|
|
- <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
|
356
|
|
- <h4 class="modal-title" id="myModalLabel">RGP card generator</h4>
|
357
|
|
- </div>
|
358
|
|
- <div class="modal-body">
|
359
|
|
- <ul>
|
360
|
|
- <li>Some RPG systems are protected by copyright. Even if some spell/item data is freely available, it does not mean you may redistribute cards containing such data.</li>
|
361
|
|
- <li>If you find a bug or have a feature request, post them at the <a href="https://github.com/crobi/rpg-cards/issues">Github project site</a>.</li>
|
362
|
|
- <li>
|
363
|
|
- The user interface consists of three columns:
|
364
|
|
- <img alt="help" src="img/help/help.png" style="max-width:95%; display:block; padding: 5px; margin: 10px 0 10px 0; border: 1px solid #ebebeb; box-shadow: 0 0 5px #ebebeb;"/>
|
365
|
|
- The left column contains the menu and global settings.
|
366
|
|
- In the middle menu, you can select and edit individual cards.
|
367
|
|
- The right column contains a preview of the selected card.
|
368
|
|
- </li>
|
369
|
|
- <li>
|
370
|
|
- To use the generator, either load the sample card deck ("Load sample"),
|
371
|
|
- load a card deck from a file ("Load from file"),
|
372
|
|
- or manually add some cards.
|
373
|
|
- When you're done, click on "Generate" to generate a document with all your cards, which can then be printed.
|
374
|
|
- </li>
|
375
|
|
- <li>
|
376
|
|
- To learn about what features are available to define a card, inspect the sample deck or
|
377
|
|
- read some basic documentation at the <a href="http://crobi.github.io/rpg-cards/">project site</a>.
|
378
|
|
- </li>
|
379
|
|
- </ul>
|
380
|
|
- </div>
|
381
|
|
- <div class="modal-footer">
|
382
|
|
- <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
383
|
|
- </div>
|
384
|
|
- </div>
|
385
|
|
- </div>
|
386
|
|
- </div>
|
387
|
|
- <!-- Modal (Sort)-->
|
388
|
|
- <div class="modal" id="sort-modal" tabindex="-1" role="dialog">
|
389
|
|
- <div class="modal-dialog">
|
390
|
|
- <div class="modal-content">
|
391
|
|
- <div class="modal-header">
|
392
|
|
- <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
|
393
|
|
- <h4 class="modal-title" id="myModalLabel">Sort cards</h4>
|
394
|
|
- </div>
|
395
|
|
- <div class="modal-body">
|
396
|
|
- <p>
|
397
|
|
- Enter the comparison function below.
|
398
|
|
- The comparison function is a block of javascript code.
|
399
|
|
- Return -1 if card_a should appear before card_b.
|
400
|
|
- </p>
|
401
|
|
- <textarea class="form-control" rows="10" id="sort-function" wrap="off">
|
402
|
|
-if (card_a.title < card_b.title) {
|
403
|
|
- return -1;
|
404
|
|
-}
|
405
|
|
-else if (card_a.title > card_b.title) {
|
406
|
|
- return 1;
|
407
|
|
-}
|
408
|
|
-else {
|
409
|
|
- return 0;
|
410
|
|
-}
|
411
|
|
- </textarea>
|
412
|
|
- </div>
|
413
|
|
- <div class="modal-footer">
|
414
|
|
- <button type="button" class="btn btn-default" id="sort-execute">Sort</button>
|
415
|
|
- </div>
|
416
|
|
- </div>
|
417
|
|
- </div>
|
418
|
|
- </div>
|
419
|
|
- <!-- Modal (Filter)-->
|
420
|
|
- <div class="modal" id="filter-modal" tabindex="-1" role="dialog">
|
421
|
|
- <div class="modal-dialog">
|
422
|
|
- <div class="modal-content">
|
423
|
|
- <div class="modal-header">
|
424
|
|
- <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
|
425
|
|
- <h4 class="modal-title" id="myModalLabel">Filter/map cards</h4>
|
426
|
|
- </div>
|
427
|
|
- <div class="modal-body">
|
428
|
|
- <p>
|
429
|
|
- Enter code below that will be executed for each card in the deck.
|
430
|
|
- Return false to remove the current card from the deck.
|
431
|
|
- </p>
|
432
|
|
- <textarea class="form-control" rows="10" id="filter-function" wrap="off">
|
433
|
|
-// Color all spell cards yellow
|
434
|
|
-if (card_has_tag(card, "spell")) {
|
435
|
|
- card.color = "yellow";
|
436
|
|
-}
|
437
|
|
-
|
438
|
|
-// Remove all creature cards
|
439
|
|
-if (card_has_tag(card, "creature")) {
|
440
|
|
- return false;
|
441
|
|
-}
|
442
|
|
- </textarea>
|
443
|
|
- </div>
|
444
|
|
- <div class="modal-footer">
|
445
|
|
- <button type="button" class="btn btn-default" id="filter-execute">Filter</button>
|
446
|
|
- </div>
|
447
|
|
- </div>
|
448
|
|
- </div>
|
449
|
|
- </div>
|
450
|
|
-</body>
|
451
|
|
-</html>
|