-
Notifications
You must be signed in to change notification settings - Fork 7
/
inj-template.html
690 lines (642 loc) · 19.8 KB
/
inj-template.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
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
<!DOCTYPE html>
<html>
<head>
<title>content script template</title>
</head>
<body>
<template id="email-archive-setting">
</template>
<template id="field-mapping-dialog-content">
<div class="field-mapping-dialog-content">
<br/>
<label>Target module: </label>
<select name="module"><option value="Meetings">Meetings</option></select>
<br/><br/>
<div class="row ydn-title">
<div>Google Event Field</div>
<div>SugarCRM Record Field</div>
</div>
<br/>
<div class="row">
<div>Title</div>
<div>
<textarea name="summary" rows="1" placeholder="$name"></textarea>
<div class="result" name="summary-result"></div>
</div>
</div>
<div class="row">
<div>Description</div>
<div>
<textarea name="description" rows="1" placeholder="$description"></textarea>
<div class="result" name="description-result"></div>
</div>
</div>
<div class="row">
<div>Color</div>
<div>
<div>
<label class="r-lbl" title="Event does not have color"><input type=radio name="color-type" value="none"/> None</label>
</div>
<div>
<label class="r-lbl" title="All sync events has a color">
<input type=radio name="color-type" value="fix" checked/> Fix</label>
<input name="color" type="number" min="0" max="11" value="6" title="Event color id"/></div>
<div style="display: none">
<label class="r-lbl" title="Event has a color depending on record field value">
<input type=radio name="color-type" value="by-field"/> By Field</label>
<select name="by-field-name" title="Record field name that a color depend on"></select>
<input name="by-field-colors" type="text" title="Event color ids corresponding to field option values."/>
</div>
<div class="color-sample"></div>
<div class="color-result"></div></div>
</div>
<p class="message"></p>
<p>
<button name="reset">Restore default</button>
<button name="test">Test</button>
</p>
<br/>
<details>
<summary>Note 1: Field template</summary>
<p>Field mapping template string is similar to SugarCRM template string, but without module name prefix.
The module name has already defined by target module. </p>
<p>Field mapping template are transformed to respective Event field by substituting SugarCRM record field variable
placeholder with its actual value. Record placeholder is denoted by it name prefix with $ sign. </p>
<p>Suppose our target record has name of "test" and parent_name of "Kyaw",
the template, <code>$_module: [$parent_name] $name</code> yield to <code>Meetings: Kyaw: test</code>.
Where <code>$_module</code> evaluate to module name, Meetings.</p>
</details>
<br/>
<details>
<summary>Note 2: Color</summary>
<p>Color id is defined in <a href="https://developers.google.com/google-apps/calendar/v3/reference/events#resource">Google calendar color id</a>.
It ranges from 1 to 11. You can see in your Google calendar color event. Set to 0, if you don't want to annotate with color.</p>
</details>
<br/>
</div>
</template>
<dialog id="field-display-dialog" class="ydn-crm">
<div class="header">
<h3>Record field display setting</h3>
</div>
<div class="ydn-content"></div>
<div class="button-bar">
<button class="restore">Restore default</button>
<button class="apply">Apply</button>
<button class="cancel">Cancel</button>
</div>
</dialog>
<dialog id="record-detail-dialog" class="ydn-crm">
<div class="header">
<h3>Record detail</h3>
</div>
<div class="ydn-content"></div>
<div class="button-bar">
<button value="ok">OK</button>
</div>
</dialog>
<dialog id="record-delete-dialog" class="ydn-crm">
<div class="header">
<h3>Confirm delete?</h3>
</div>
<div class="ydn-content">
Are you sure you want to delete <a class="record">the</a> <span class="type"></span>
record?
</div>
<div class="button-bar">
<button name="ok" value="ok">OK</button>
<button name="cancel" value="cancel">Cancel</button>
</div>
</dialog>
<template id="field-table">
<table>
<thead>
<tr>
<th colspan="3">Groups</th>
</tr>
</thead>
<tbody class="group-body"></tbody>
<thead>
<tr>
<th colspan="3">Fields</th>
</tr>
</thead>
<tbody class="field-body"></tbody>
</table>
</template>
<template id="feedback-page-template">
<h3>Feedback</h3>
<div>
<ul></ul>
</div>
</template>
<template id="log-template">
<h3>Log</h3>
<div class="users">
<ol></ol>
</div>
</template>
<template id="error-template">
<div class="list">
<ul style="max-height: 30em; overflow-y: auto;"></ul>
</div>
<div class="detail">
<ol></ol>
</div>
</template>
<template id="sugarcrm-home-template">
<section> <!-- remove this section -->
<div id="gdata" style="display: none;"></div>
</section>
<section name="sugarcrm">
<div id="sugarcrm-widget"></div>
</section>
<section name="calendar">
</section>
<section id="email-archive">
</section>
<p><br/></p>
</template>
<template id="sugarcrm-details">
<div class="sugarcrm">
<h3>SugarCRM</h3>
<div class="name">SugarCRM <span class="flavor"></span> <span class="version">
</span> (<span class="gmt_time"></span> GMT)</div>
<div>Instance domain: <span class="domain"></span></div>
<div>Username: <span class="username"></span></div>
</div>
</template>
<template id="feed-widget-template">
<style>
ul.feed-log {
max-height: 20em;
overflow-y: scroll;
padding-left: 4px;
list-style: none;
}
</style>
<details>
<summary>Logs</summary>
<div>
<input type="checkbox" name="show-log" id="show-log"/><label for="show-log">Show detail</label>
</div>
<ul class="feed-log"></ul>
</details>
</template>
<template id="gdata-credentail-template">
<h3>Google Services Credential</h3>
<div class="widget-content">
<div class="authorize" style="display: none">
<a>Authorize</a>
<p>This extension requires your authorization to read and write your data from Google services.</p>
</div>
<div class="display" style="display: none">
<p><span name="auth-provider">You</span> have provided <span name="email"></span> Google services available offline assess. <br />
<span style="display: none;">Scopes: <span name="scopes"></span></span></p>
<a href="#" name="gdata-token-revoke">Revoke</a>
</div>
</div>
</template>
<template id="sugarcrm-template">
<style>
</style>
<h3>SugarCRM</h3>
<div class="widget-content">
<form name="login-panel" class="login-panel" style="display: none">
<div class="domain">
<div><label>Enter your SugarCRM web site url</label></div>
<div><input name="domain" class="sugarcrm-domain" type="text" placeholder="https://tocahz5358.sugarcrm.com/index.php" />
<span class="ydn-message" name="message"></span></div>
</div>
<div>
<div><label>Username</label></div>
<div><input name="username" class="sugarcrm-username" type="text"/></div>
</div>
<div>
<div><label>Password</label></div>
<div><input name="password" class="sugarcrm-password" type="password" autocomplete="off"/></div>
</div>
<div>
<div><label for="sugarcrm-auth">Authentication</label>
<select name="sugarcrm-auth" id="sugarcrm-auth">
<option value="" selected>Default</option>
<option value="ldap">SSO</option>
</select></div>
</div>
<div>
<div class="ydn-message"></div>
</div>
<div>
<button name="login">Login</button>
</div>
<div class="ydn-notes">
<p>Your SugarCRM username and password are NOT sent to any server except your SugarCRM server. Your SugarCRM username and password are stored in this browser with encryption.</p>
</div>
<input name="baseurl" type="text" hidden/>
</form>
<div name="info-panel" style="display: none">
<div>Host: <a name="instance"></a> </div>
<div>Type: <span name="instance-info"></span></div>
<div>User: <span name="user"></span></div>
<div name="grant-host-permission" style="display: none">
<button>Grant host permission</button>
<p>Your permission is required to connect your server from this extension.</p>
</div>
</div>
<div name="remove-panel" style="display: none">
<p>
<a href="#" name="remove" title="Remove this SugarCRM credentials.">Logout</a>
</p>
</div>
<div name="stats-panel" style="display: none">
<details>
<summary>Cached data</summary>
<p>List of cached module in this browser</p>
<ul></ul>
<p>
<button name="clear-cache">Clear cache</button>
<button name="update-now">Update now</button>
</p>
</details>
</div>
</div>
</template>
<template id="record-patch-compare-template">
<div class="flex-bar record-patch-compare">
<div>
<h3>Original from server</h3>
<pre name="original"></pre>
</div>
<div>
<h3>Your edit</h3>
<pre name="patch"></pre>
</div>
</div>
<div class="record-patch-note">Only fields that are changed is shown.</div>
</template>
<template id="feedback-template">
<div class="feedback-panel">
<div>
<select>
<option value="feature">Feature request</option>
<option value="bug">Bug report</option>
<option value="suggestion">Suggestion</option>
<option value="discussion">Question</option>
</select>
</div>
<div>
<textarea class="message"></textarea>
</div>
<div style="display: none;" class="attachment">
Attachment:
<input name="page" type="checkbox"/> <a target="dom" name="page">page.html</a>
<span style="display: none;">
<input name="screenshot" type="checkbox"/> <a target="screenshot" name="page">screenshot.png</a>
</span>
</div>
<div>
<button value="submit">Submit</button>
<button value="close">Close</button>
</div>
</div>
</template>
<template id="template-tracking-datalist">
<div class="datalist-item">
<div class="ydn-head row">
<div class="label recipient"></div>
<div class="ydn-center"></div>
<div class="stats">
<span title="Number of emails opened"><span class="opens"></span><span class="symbol">O</span></span>
<span title="Number of links clicked"><span class="clicks"></span><span class="symbol">L</span></span>
</div>
</div>
<div class="ydn-content row">
<div class="label subject"></div>
<div class="ydn-center"></div>
<div class="stats lastopen"></div>
</div>
</div>
</template>
<template id="template-tracking-sidebar">
<div class="tracking-sidebar">
<div class="sidebar-head">
<span class="head-icon" title="Email tracking"></span>
<span class="stat-panel opens"
title="Number of emails open in last 24 hours">0/0</span>
<span class="stat-panel clicks"
title="Number of link clicked in last 24 hours">0/0</span>
<span class="ydn-center"></span>
<span class="more-less-toggle svg-button"></span>
</div>
<div class="sidebar-content" style="display: none;">
<div class="ydn-toolbar">
<input class="picker" type="date" title="Target date"/>
<span class="select-view"></span>
</div>
</div>
</div>
</template>
<template id="template-tracking-feeditem">
<div class="feeditem">
<span class="recipient"></span>
<span class="verb"></span>
<span class="object"></span>
</div>
</template>
<template id="template-tracking-detail-item">
<div>
<div class="item">
<span></span>
<span></span>
<a class="ydn-center"></a>
<span></span>
</div>
</div>
</template>
<template id="template-tweet">
<li class="tweet-item">
<div class="text"></div>
<div class="tweet-footer">
<span class="location"></span>
<span class="time"></span>
</div>
</li>
</template>
<template id="template-detail-twitter">
<div class="header">
<div class="logo">
<img/>
</div>
<div class="ydn-content">
<div class="name">
<a target="_blank"></a>
</div>
<div class="description"></div>
<div class="head-footer">
<span>Followers <span class="followers"></span></span>
<span>Following <span class="following"></span></span>
<span class="location"></span>
</div>
</div>
</div>
<div class="ydn-content">
<ul class="tweets">
</ul>
</div>
</template>
<template id="template-detail-googleplus">
<div class="header">
<div class="logo">
<img />
</div>
<div class="ydn-content">
<div class="name">
<a target="_blank"></a>
</div>
<div class="description"></div>
<div class="work"></div>
<div class="school"></div>
<div class="head-footer">
<span class="location"></span>
</div>
</div>
</div>
</template>
<template id="template-detail-linkedin">
<div class="header">
<div class="logo">
<img />
</div>
<div class="ydn-content">
<div class="name">
<a target="_blank"></a>
</div>
<div class="description"></div>
<div class="head-footer">
<span>Followers <span class="followers"></span></span>
<span>Following <span class="following"></span></span>
<span class="location"></span>
</div>
</div>
</div>
</template>
<template id="template-detail-angellist">
<div class="header">
<div class="ydn-content">
<div class="name">
<a target="_blank"></a>
</div>
<div class="description"></div>
<div class="roles"></div>
<div class="head-footer">
<span>Followers <span class="followers"></span></span>
<span class="location"></span>
</div>
</div>
</div>
</template>
<template id="template-detail-facebook">
<div class="header">
<div class="logo">
<img />
</div>
<div class="ydn-content">
<div class="name">
<a target="_blank"></a>
</div>
<div class="description"></div>
<div class="head-footer">
<span class="location"></span>
</div>
</div>
</div>
</template>
<template id="template-social-menu">
<div class="social-start-menu">
<div class="header">
<div class="logo">
<img />
</div>
<div class="ydn-content">
<div class="name">
</div>
<div class="description"></div>
<div class="head-footer">
</div>
</div>
</div>
<div class="employment"></div>
<div class="location"></div>
<div class="ydn-content">
</div>
<div>
Sources: <span class="sources"></span>
</div>
</div>
</template>
<template id="template-detail-generic">
<div class="header">
<div class="logo">
<img />
</div>
<div class="ydn-content">
<div class="name">
<a target="_blank"></a>
</div>
<div class="description"></div>
<div class="head-footer">
<span>Followers <span class="followers"></span></span>
<span>Following <span class="following"></span></span>
<span class="location"></span>
</div>
</div>
</div>
</template>
<template id="select-calendar-template">
<div style="display: none;">
<button name="new-calendar" title="Create a new Google calendar">Create New...</button><br/><br/>
</div>
Select a Google calendar to sync: <select name="select-calendar" title="Select a Google calendar to Sync with CRM">
</select><br/>
<p>A sync calendar must be owned by you. You can manage your calendars in <a href="https://www.google.com/calendar/">Google Calendar</a>.</p>
</template>
<template id="sugarcrm-sync-template">
<div class="header">
<span class="ydn-title">Synchronization</span>
<span></span>
<a class="domain" title="Go to SugarCRM portal" target="_blank"></a>
</div>
<div class="ydn-content"></div>
<div class="ydn-footer"></div>
</template>
<template id="sync-content-template">
<div class="sync-contact">
<div class="header">
<select name="select-panel">
<option value="gdata-contact">Gmail contacts</option>
<option value="accounts">Accounts</option>
<option value="contacts">Contacts</option>
<option value="leads">Leads</option>
</select>
<span class="ydn-toolbar"></span>
</div>
<div class="content"></div>
</div>
</template>
<template id="sync-panel-template">
<div class="header"></div>
<div class="ydn-content">
<ul class="infinite-scroll"></ul>
</div>
<div class="ydn-footer">
</div>
</template>
<template id="sync-gdata-toolbar-template">
<select name="order-by" title="Order by">
<option value="" selected>Id</option>
<option value="updated.$t">Last modified</option>
<option value="name">Name</option>
</select>
<select name="direction" title="Direction of order">
<option value="asc" selected>Ascending</option>
<option value="des">Descending</option>
</select>
<span name="gdata-contact-count"></span> contacts
<button name="sync">Sync Now</button>
</template>
<template id="sync-record-toolbar-template">
<select name="order-by" title="Order by">
<option value="" selected>Id</option>
<option value="date_modified">Last modified</option>
<option value="name">Name</option>
</select>
<select name="direction" title="Direction of order">
<option value="asc" selected>Ascending</option>
<option value="des">Descending</option>
</select>
<span name="record-count"></span> records.
</template>
<template id="sync-pair-template">
<li class="sync-pair">
<div class="primary"></div>
<div class="secondary"></div>
</li>
</template>
<template id="sync-gdata-primary-template">
<div class="gdata">
<div class="header">
<span class="badge-icon google"></span>
<a name="name" target="_blank" title="View in Gmail contact"></a>
</div>
<div class="ydn-content">
<span name="emails"></span>
</div>
<div class="ydn-footer">
<span name="import" class="inline-block" title="Import to SugarCRM"></span>
</div>
</div>
</template>
<template id="sync-record-primary-template">
<div class="record">
<div class="header">
<span name="name"></span>
</div>
<div class="ydn-content">
<span name="emails"></span>
</div>
<div class="ydn-footer">
<span class="svg-button" name="export"></span>
</div>
</div>
</template>
<template id="sync-gdata-secondary-template">
<div class="record">
<div class="header">
<span class="ydn-icon record-header-icon"></span>
<a name="label" target="_blank" title="View in SugarCRM"></a>
</div>
<div>
<button name="link" title="Synchronize with Gmail contact">Link</button>
</div>
</div>
</template>
<template id="sync-record-secondary-template">
<div class="gdata">
<div class="header">
<span class="ydn-icon record-header-icon"></span>
<a name="label" target="_blank" title="View in SugarCRM"></a>
</div>
<div>
<button name="sync" title="Synchronize with Gmail contact">Sync</button>
</div>
</div>
</template>
<template id="hover-context-panel-template">
<div class="hover-context-panel">
<div class="header">
<div class="flex-bar">
<span class="ydn-icon"></span>
<span class="ydn-center">
<a></a>
</span>
<span class="menu-holder"></span>
</div>
<div class="header-content"></div>
</div>
<div class="ydn-content"></div>
<div class="ydn-footer"></div>
</div>
</template>
<template id="record-item-template">
<div class="record-item">
<div class="record-header flex-bar">
<span class="ydn-icon"></span>
<span class="ydn-center ydn-title"></span>
</div>
<div class="ydn-content">
<span class="ydn-center summary"></span>
</div>
</div>
</template>
</body>
</html>