forked from joaool/MotherGithub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
newsletter_editor.html
480 lines (452 loc) · 19.1 KB
/
newsletter_editor.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
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
<!DOCTYPE html>
<html>
<head>
<title>Mail Template Editor </title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="stylesheet" type="text/css" href="./mailer/bootstrap/css/bootstrap.min.css"/>
<link rel="stylesheet" type="text/css" href="./mailer/css/hover-min.css"/>
<!-- <link rel="stylesheet" type="text/css" href="bootstrap/css/bootstrap-theme.min.css"/> -->
<link rel="stylesheet" type="text/css" href="./mailer/css/simple-sidebar.css"/>
<link rel="stylesheet" type="text/css" href="./mailer/css/style.css"/>
<link rel="stylesheet" type="text/css" href="./mailer/css/template-holder.css"/>
<link href="./mailer/js/lib/formpicker/css/bootstrap-formhelpers.min.css" rel="stylesheet" media="screen">
<script src="./mailer/js/lib/ckeditor/ckeditor.js"></script>
<script src="./mailer/js/lib/underscore.js"></script>
<script src="./mailer/js/lib/jquery-1.11.0.js"></script>
<script src="./mailer/js/lib/backbone.js"></script>
<script src="./mailer/js/lib/jquery-ui-1.10.4.js"></script>
<script src="./mailer/js/lib/handlebars-v1.3.0.js"></script>
<script src="./mailer/bootstrap/js/bootstrap.min.js"></script>
<script src="./mailer/js/lib/formpicker/js/bootstrap-formhelpers.min.js"></script>
<script type="text/javascript" src="https://rawgithub.com/powmedia/backbone.bootstrap-modal/master/src/backbone.bootstrap-modal.js"></script>
<script src="./mailer/js/bussinesslogic/JsonGenerator.js"></script>
<script>
window.ParsleyConfig = {
classHandler: function ( elem, isRadioOrCheckbox ) {
// specify where parsley error-success classes are set
return $(elem).parents(".form-group");
},
errorsWrapper: '<span class="parsley-help-block"></span>',
errorTemplate: '<span></span>'
};
</script>
<script src="FL_ui/js/parsley.js"></script>
<link href="FL_ui/css/FLred.css" rel="stylesheet">
<script src="FL_ui/flClient/flClient.js"></script>
<script src="FL_ui/flClient/ajaxBrowser.js"></script>
<script src="FL_ui/js/spin.min.js"></script>
<script src="FL_ui/js/FLCommon2.js"></script>
<script src="FL_ui/js/FLdd2.js"></script>
<script src="FL_ui/js/FLLoadCss2.js"></script>
<script src="FL_ui/js/FLAPI.js"></script>
<script src="./mailer/js/Common.js"></script>
<script src="./mailer/js/MailerTemplate.js"></script>
<script src="./mailer/js/Model/TitleModel.js"></script>
<script src="./mailer/js/Model/ImageModel.js"></script>
<script src="./mailer/js/View/BackboneModal.js"></script>
<script src="./mailer/js/View/MainView.js"></script>
<script src="./mailer/js/View/PropertyPanels/StyleTab.js"></script>
<script src="./mailer/js/View/PropertyPanels/TitlePanel.js"></script>
<script src="./mailer/js/View/PropertyPanels/ImagePanel.js"></script>
<script src="./mailer/js/View/PropertiesPanel.js"></script>
<script src="./mailer/js/View/DesignTemplateBody.js"></script>
<script src="./mailer/js/View/DesignTemplateFooter.js"></script>
<script src="./mailer/js/View/DesignTemplatePage.js"></script>
<script src="./mailer/js/View/DesignTemplatePageHeader.js"></script>
<script src="./mailer/js/View/TemplateItems.js"></script>
<script src="./mailer/js/View/TemplateElements/TitleElement.js"></script>
<script src="./mailer/js/View/TemplateElements/ImageElement.js"></script>
<script src="./mailer/js/View/TemplateHolder.js"></script>
<script src="./mailer/js/View/PropertyToolbar.js"></script>
<script src="./mailer/js/DragNDrop.js"></script>
</head>
<style>
.modal-header-success {
color:#fff;
padding:9px 15px;
border-bottom:1px solid #eee;
background-color: #5cb85c;
-webkit-border-top-left-radius: 5px;
-webkit-border-top-right-radius: 5px;
-moz-border-radius-topleft: 5px;
-moz-border-radius-topright: 5px;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
}
.modal-header-warning {
color:#fff;
padding:9px 15px;
border-bottom:1px solid #eee;
background-color: #f0ad4e;
-webkit-border-top-left-radius: 5px;
-webkit-border-top-right-radius: 5px;
-moz-border-radius-topleft: 5px;
-moz-border-radius-topright: 5px;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
}
.modal-header-danger {
color:#fff;
padding:9px 15px;
border-bottom:1px solid #eee;
background-color: #d9534f;
-webkit-border-top-left-radius: 5px;
-webkit-border-top-right-radius: 5px;
-moz-border-radius-topleft: 5px;
-moz-border-radius-topright: 5px;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
}
.modal-header-info {
color:#fff;
padding:9px 15px;
border-bottom:1px solid #eee;
background-color: #5bc0de;
-webkit-border-top-left-radius: 5px;
-webkit-border-top-right-radius: 5px;
-moz-border-radius-topleft: 5px;
-moz-border-radius-topright: 5px;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
}
.modal-header-primary {
color:#fff;
padding:9px 15px;
border-bottom:1px solid #eee;
background-color: #428bca;
-webkit-border-top-left-radius: 5px;
-webkit-border-top-right-radius: 5px;
-moz-border-radius-topleft: 5px;
-moz-border-radius-topright: 5px;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
}
.spinner {
position: fixed;
top: 50%;
left: 50%;
}
.dropGroup{
/*right: 0;*/
color:white;
/*width:580px;*/
margin-left:-1px;
}
.modal-dialog{
z-index:1041;
}
</style>
<script id="_templateForm" type="text/template">
<div class="_templateForm" style="margin-top:0px;">
<form id="form__templateForm" novalidate="novalidate">
<div class="row">
<div class="col-xs-12" >
<legend>Give a name to a new template:</legend>
<div class="input-group" style="line-height:0px;">
<span class="input-group-addon">Give a template name:</span>
<input type="text" class="form-control" id="_templateForm_name" placeholder="Give a name that you can recall later" value="<%= masterDetailItems.master.name %>" data-parsley-trigger="change" >
<span class="input-group-addon"><span class="glyphicon glyphicon-edit"></span></span>
</div>
<legend></legend>
<legend>or overwrite an existing template:</legend>
<div class="input-group" style="line-height:0px;">
<span class="input-group-addon">Choose template to overwrite:</span>
<div class="btn-group">
<a class="btn btn-default dropdown-toggle" data-toggle="dropdown" style="font-size:14px;font-weight:bold;margin-right:-4.0em" href="#"> Choose Template <span class="caret"></span></a>
<ul id="_templateForm_template" class="dropdown-menu">
<li><a href="#">templ1</a></li>
<li><a href="#">templ2</a></li>
</ul>
</div>
</div>
</div>
</div>
</form>
</div>
</script>
<script id="_loadTemplateForm" type="text/template">
<div class="_loadTemplateForm" style="margin-top:0px;">
<form id="form__loadTemplateForm" novalidate="novalidate">
<div class="row">
<div class="col-xs-12" >
<legend>Choose an existing template:</legend>
<div class="input-group" style="line-height:0px;">
<span class="input-group-addon">Template to load:</span>
<div class="btn-group">
<a class="btn btn-default dropdown-toggle" data-toggle="dropdown" style="font-size:14px;font-weight:bold;margin-right:-4.0em" id="_loadTemplateForm_option" href="#"> Choose from existing templates <span class="caret"></span></a>
<ul id="_loadTemplateForm_name" class="dropdown-menu">
<li><a href="#">templ1</a></li>
<li><a href="#">templ2</a></li>
</ul>
</div>
</div>
</div>
</div>
</form>
</div>
</script>
<script id="_test" type="text/template">
<!-- Button trigger modal -->
<a data-toggle="modal" href="#myModal1" class="btn btn-primary btn-lg">Launch demo modal</a>
<!-- Modal -->
<div class="modal fade" id="myModal1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title">Modal title</h4>
</div>
<div class="modal-body">
Modal body content...
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
</script>
<script id="charge_dialog_template" type="text/template">
<div class="modal fade" id="myModal1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title">Modal title</h4>
</div>
<div class="modal-body">
Modal body content...
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
</script>
<body>
<!-- -->
<div id="_modalDialog"></div>
<div id="_modalDialogA"></div>
<div id="_modalDialogB"></div>
<div id='spinnerDiv'></div>
<div id="_placeHolder"></div>
<div id="templates"></div>
<div id="wrapper">
<!-- Sidebar -->
<div id="sidebar-wrapper">
<ul class="ButtonHolder">
<li class="btn-group" data-toggle="buttons">
<label class="btn btn-default active">
<input type="radio" name="options" id="option2" autocomplete="off"> Content
</label>
<label class="btn btn-default">
<input type="radio" name="options" id="option2" autocomplete="off"> Design
</label>
</li>
</ul>
<hr class="hr_margin">
<ul class="sidebar-nav" id="templateItems">
<li class="sidebar-brand">
<div style="text-align: center;"><h3>Template Items</h3></div>
</li>
</ul>
<ul id="templateDesign">
<li class="sidebar-brand">
<div style="text-align: center;color:white;"><h3>Design</h3></div>
</li>
<li><a href="javascript:void(0)">Page</a></li>
<li><a href="javascript:void(0)">PreHeader</a></li>
<li><a href="javascript:void(0)">Header</a></li>
<li><a href="javascript:void(0)">Columns</a></li>
<li><a href="javascript:void(0)">Footer</a></li>
</ul>
<div id="propertyPanel" class="PropertyPanel">
<div id="propertyParent">
<div id="propteryHeader" class="page-header"></div>
<div id="propertyTab">
<div class="nav nav-tabs btn-group" role="tablist" data-toggle="buttons">
<div href="#propertyBody" class="btn btn-default active propertyTabBtn" role="tab" aria-controls="propertyBody" data-toggle="tab">
<input type="radio" name="options" id="contentTabButton" autocomplete="off" checked>
Content
</div>
<div href="#styletab" class="btn btn-default propertyTabBtn" role="tab" aria-controls="styletab" data-toggle="tab">
<input type="radio" name="options" id="contentTabButton" autocomplete="off" checked>
Style
</div>
<div href="#settingsTab" class="btn btn-default propertyTabBtn" role="tab" aria-controls="settingsTab" data-toggle="tab">
<input type="radio" name="options" id="contentTabButton" autocomplete="off" checked>
Settings
</div>
</div>
<!-- Tab panes -->
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="propertyBody">
<div id="titleBody">
<textarea name="titleText" id="titleText"> </textarea>
</div>
<div id="imageBody">
<input id="imageUploadBtn" type="file" class="custom-file-input file-loading" id="imageUploadBtn">
<img id="imagePreview" class="imagePreview" src="">
<div class="">
<strong class="" data-image-title="" id ="imageName">default.png</strong>
<div class="small-meta" id="imageSize"></div>
<div class="imageAlt selfclear pad-lv2 pad-lr0">
<label for="">Image Link</label>
<input type="text" class="float-left altTextInput" style="width:50%;" id="txtImageLink" value="">
<a href="#" class="btn btn-primary btn-primary" id="updateImageLinkBtn">Update</a>
</div>
</div>
</div>
</div>
<div role="tabpanel" class="tab-pane" id="styletab">
<div class="styleHeader" id="StyleTypeHeader">
Type
</div>
<div id="styleType">
<div id="textColorParent">
<div> Text Color </div>
<div style="width:150px">
<div class="bfh-colorpicker" data-name="colorpicker1" id="fontColor"></div>
</div>
</div>
<div id="backgroundColorParent">
<div> Background Color </div>
<div style="width:150px">
<div class="bfh-colorpicker" data-name="colorpicker1" id="backgroundColor"></div>
</div>
</div>
<div id="headingTextColorParent">
<div>Heading Text Color</div>
<div class="bfh-colorpicker" data-name="colorpicker1" id="headingTextColor"></div>
</div>
<div id="fontFamilyParent">
<div>Font Family</div>
<div class="bfh-selectbox bfh-fonts" data-font="Lato" id="fontFamily" data-blank=false></div>
</div>
<div id="fontSizeParent">
<div>Font Size</div>
<div class="bfh-selectbox bfh-fontsizes" data-fontsize="12" id="fontSize" data-blank=false></div>
</div>
<div id="fontWeightParent">
<div>Font Weight</div>
<div class="bfh-selectbox" data-name="selectbox1" id="fontWeight">
<div data-value="1">Not Specified</div>
<div data-value="2">Normal</div>
<div data-value="3">Bold</div>
</div>
</div>
<div id="lineHeightParent">
<div>Line Height</div>
<div class="bfh-selectbox" data-name="selectbox1" id="lineHeight">
<div data-value="1">Not Specified</div>
<div data-value="2">Normal</div>
<div data-value="3">Slight</div>
<div data-value="4">1 1/2 spacing</div>
<div data-value="5">Double Space</div>
</div>
</div>
<div id="textAlignParent">
<div> Text Align</div>
<div class="btn-group" data-toggle="buttons" id="textAlign">
<label class="btn btn-default active">
<input type="radio" name="options" id="textAlignLeft" autocomplete="off" checked alignType="left">
<span class="glyphicon glyphicon-align-left" aria-hidden="true"></span>
</label>
<label class="btn btn-default">
<input type="radio" name="options" id="textAlignCenter" autocomplete="off" checked alignType="center">
<span class="glyphicon glyphicon-align-center" aria-hidden="true"></span>
</label>
<label class="btn btn-default">
<input type="radio" name="options" id="textAlignRight" autocomplete="off" checked alignType="right">
<span class="glyphicon glyphicon-align-right" aria-hidden="true"></span>
</label>
<label class="btn btn-default">
<input type="radio" name="options" id="textAlignJustified" autocomplete="off" checked alignType="justified">
<span class="glyphicon glyphicon-align-justify" aria-hidden="true"></span>
</label>
</div>
</div>
</div>
<div class="styleHeader" id="ImageSettingsHeader">
Image Settings
</div>
<div id="ImageSettings">
<div id="imageAlignParent">
<div>Align</div>
<div class="bfh-selectbox" data-name="selectbox1" id="imageAlignment">
<div data-value="left">Left</div>
<div data-value="center">Center</div>
<div data-value="right">Right</div>
</div>
</div>
<div id="imageMarginParent">
<div>Margin</div>
<div class="checkbox">
<label>
<input type="checkbox" value="" id="imageMargin"> Edge to Edge
</label>
</div>
</div>
</div>
</div>
<div role="tabpanel" class="tab-pane" id="settingsTab">settings</div>
<input type="button" class="btn btn-primary btn-success" value="Save" id="saveProperties"/>
</div>
</div>
</div>
</div>
</div>
<!-- /#sidebar-wrapper -->
<!-- Page Content -->
<div id="page-content-wrapper">
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<div>
<h1><center>Mail Editor</center></h1>
<div style="position:absolute;top:0px;left:0px">
<a href="#" class="btn btn-danger" id="exitNoSave">Exit</a>
<a href="#" class="btn btn-success" id="saveTemplate">Save Template</a>
<a href="#" class="btn btn-info" id="loadTemplate">Load Template</a>
</div>
<div style="position:absolute;top:0px;right:0px">
<a href="#" class="btn btn-success" id="previewTemplate">Generate Preview</a>
</div>
</div>
<div class="">
<div>
<div id="templateHolder" class="template_holder">
<div id="template_holder_header" class="header sortable droppable" >
</div>
<br/><br/>
<div id="template_holder_body" class="template_holder_body sortable droppable">
</div>
<br/><br/>
<div id="template_holder_footer" class="footer sortable droppable">
</div>
<div id="propertyToolbar">
<div id="toolbarItemsWrapper">
<div class="moveable">
<a id="move" href="#" class="btn btn-primary btn-primary"><span class="glyphicon glyphicon-move"></span> </a>
</div>
<a id = "edit" href="#" class="btn btn-primary btn-default"><span class="glyphicon glyphicon-pencil"></span> </a>
<a id = "copy" href="#" class="btn btn-primary btn-default"><span class="glyphicon glyphicon-copy"></span> </a>
<a id="delete" href="#" class="btn btn-primary btn-default"><span class="glyphicon glyphicon-trash"></span> </a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div id='test'>
</div>
</div>
</div>
<!-- /#page-content-wrapper -->
</div>
</body>
</html>