-
Notifications
You must be signed in to change notification settings - Fork 3
/
help.js
2275 lines (2043 loc) · 124 KB
/
help.js
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
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/// <reference path="intellisense.js" />
var g_bNeedStartTourBubble = false;
var g_bNeedShowPro = false;
const CLASS_onlyPlusSE = "onlyPlusSE";
const CLASS_onlyNonPlusSE = "onlyNonPlusSE";
const CLASS_onlyPlusEst = "onlyPlusEst";
var SYNCMETHOD = {
disabled:0,
trelloComments: 1,
googleSheetLegacy: 2,
googleSheetStealth: 3
};
function showHideSEFeatures() {
if (!g_bNoSE) {
$("." + CLASS_onlyNonPlusSE).hide();
$("." + CLASS_onlyPlusSE).show();
}
else {
$("." + CLASS_onlyPlusSE).hide();
$("." + CLASS_onlyNonPlusSE).show();
}
showHideEstFeatures();
}
function showHideEstFeatures() {
if (g_bNoEst || g_bNoSE) {
$("." + CLASS_onlyPlusEst).hide();
}
else {
$("." + CLASS_onlyPlusEst).show();
}
}
function helpTooltip(ev, html) {
var target = $(ev.target);
target.replaceWith("<p>" + html + "</p>");
}
function putKeywordsStringInUi(rg, inputKeywords) {
var strKeywords = "";
rg.forEach(function (keyword) {
if (strKeywords.length == 0)
strKeywords = keyword;
else
strKeywords = strKeywords + ", " + keyword;
});
inputKeywords.val(strKeywords);
}
function convertKWListToArray(inputKeywords) {
var rg = inputKeywords.val().split(",");
var rgNew = [];
rg.forEach(function (keyword) {
var k = keyword.trim().toLowerCase();
if (k)
rgNew.push(k); //skip blanks etc
});
return rgNew;
}
var Help = {
m_bShowing: false, //necessary to catch the possibility of null m_container on a consecutive display call
m_container: null,
m_extraElems: [],
refreshProSections: function () { }, //review: fix dependencies so it can be defined here
raw: function (h, container) {
if (!container)
container = this.m_container;
var elem = $(h);
container.append(elem);
return elem;
},
rawSE: function (h, container) {
if (!container)
container = this.m_container;
var elem = $(h);
elem.addClass(CLASS_onlyPlusSE);
container.append(elem);
return elem;
},
para: function (h, container, title) {
var p = $('<p></p>').html(h);
if (title)
p.prop('title', title);
if (!container)
container = this.m_container;
container.append(p);
return p;
},
paraSE: function (h, container, title) {
var p = $('<p></p>').html(h);
p.addClass(CLASS_onlyPlusSE);
if (title)
p.prop('title', title);
if (!container)
container = this.m_container;
container.append(p);
return p;
},
paraEst: function (h, container, title) {
var p = $('<p></p>').html(h);
p.addClass(CLASS_onlyPlusSE).addClass(CLASS_onlyPlusEst);
if (title)
p.prop('title', title);
if (!container)
container = this.m_container;
container.append(p);
return p;
},
storageTotalSync: 0,
storageTotalLocal: 0,
storageTotalLocalStorage: 0,
totalDbRowsHistory: 0,
totalDbRowsHistoryNotSync: 0,
totalDbMessages: 0,
hasLegacyRows: false,
hasLiCS: false,
hasLiStripe: false,
bDontShowAgainSyncWarn: false,
bStartTourBubbleOnClose: false,
bStartSyncOnClose: false,
isVisible: function () {
return ($('#agile_help_container').size() > 0 || this.m_bShowing);
},
isSyncEnabled: function () {
var bDisabled = (g_bDisableSync || (g_strServiceUrl == "" && !g_optEnterSEByComment.IsEnabled()));
return !bDisabled;
},
hasLi: function () {
return (this.hasLiCS || this.hasLiStripe);
},
populateSyncProps: function (callback) {
var thisObj = this;
chrome.storage.sync.get([SYNCPROP_CARDPOPUPTYPE, SYNCPROP_LIDATA, SYNCPROP_LIDATA_STRIPE], function (obj) {
if (chrome.runtime.lastError) {
console.error(chrome.runtime.lastError.message);
return;
}
thisObj.cardPopupType = obj[SYNCPROP_CARDPOPUPTYPE] || CARDPOPUPTYPE.DEFAULT;
var liData = obj[SYNCPROP_LIDATA];
var liDataStripe = obj[SYNCPROP_LIDATA_STRIPE];
thisObj.liDataCS = null;
thisObj.liDataStripe = null;
if (liData) {
thisObj.liDataCS = liData;
thisObj.hasLiCS = !!(liData.li);
} else {
thisObj.liDataCS = null;
thisObj.hasLiCS = false;
}
if (liDataStripe) {
thisObj.liDataStripe = liDataStripe;
thisObj.hasLiStripe = !!(liDataStripe.li);
} else {
thisObj.liDataStripe = null;
thisObj.hasLiStripe = false;
}
if (callback)
callback();
});
},
display: function () {
if (this.m_bShowing || !g_dbOpened) {
return;
}
this.m_bShowing = true;
this.bStartSyncOnClose = false;
removeAllGrumbleBubbles();
var thisObj = this;
testExtension(function () { //show help only if connected, plus this also commits pending log messages
chrome.storage.sync.getBytesInUse(null,
function (bytesInUse) {
thisObj.storageTotalSync = bytesInUse;
chrome.storage.local.getBytesInUse(null,
function (bytesInUse2) {
thisObj.storageTotalLocal = bytesInUse2;
sendExtensionMessage({ method: "getlocalStorageSize" },
function (response) {
thisObj.storageTotalLocalStorage = response.result;
sendExtensionMessage({ method: "getTotalDBRows" },
function (response) {
if (response.status != STATUS_OK)
thisObj.totalDbRowsHistory = response.status; //review zig: ugly. dont allow plus to start
else {
thisObj.totalDbRowsHistory = response.cRowsTotal;
}
sendExtensionMessage({ method: "getTotalDBRowsNotSync" },
function (response) {
if (response.status != STATUS_OK)
thisObj.totalDbRowsHistoryNotSync = response.status;
else
thisObj.totalDbRowsHistoryNotSync = response.cRowsTotal;
chrome.storage.local.get([LOCALPROP_DONTSHOWSYNCWARN], function (obj) {
var value = obj[LOCALPROP_DONTSHOWSYNCWARN];
if (value !== undefined)
thisObj.bDontShowAgainSyncWarn = value;
sendExtensionMessage({ method: "getTotalDBMessages" },
function (response) {
if (response.status != STATUS_OK)
thisObj.totalDbMessages = response.status;
else
thisObj.totalDbMessages = response.cRowsTotal;
sendExtensionMessage({ method: "detectLegacyHistoryRows" },
function (response) {
thisObj.hasLegacyRows = response.hasLegacyRows;
thisObj.populateSyncProps(function () {
thisObj.displayWorker();
});
});
});
});
});
});
});
}
);
}
);
});
},
enableIntervalScroll: function (bEnable) {
if (bEnable) {
if (this.intervalCorrectScroll)
return;
this.intervalCorrectScroll=setInterval(function () {
var url = document.URL;
var iPound = url.indexOf("#");
if (iPound > 0) {
//prevent scrolling of body when clicking on a topic at the end
$("body").scrollTop(0);
url = url.substr(0, iPound);
window.history.replaceState('data', '', url);
}
}, 50);
return;
}
assert(!bEnable);
if (this.intervalCorrectScroll != null) {
clearInterval(this.intervalCorrectScroll);
this.intervalCorrectScroll = null;
}
},
displayWorker: function () {
var bShowPro = g_bNeedShowPro;
g_bNeedShowPro = false;
var helpWin = this;
var comboSync = null;
var spanButtonGS = null;
var spanButtonGSStealth = null;
var bNotSetUp = (g_configData == null);
var bSEByComments = g_optEnterSEByComment.IsEnabled();
if (bNotSetUp && bSEByComments)
bNotSetUp = false;
if (g_bDisableSync)
bNotSetUp = true;
function keepSyncPaused(bForce) {
if (bForce || helpWin.m_bShowing) {
sendExtensionMessage({ method: "beginPauseSync" }, function (response) { });
setTimeout(function () { keepSyncPaused(false); }, 1000);
}
}
function setNoSe(bValue) {
g_bNoSE = bValue;
showHideSEFeatures();
}
function setNoEst(bValue) {
g_bNoEst = bValue;
showHideEstFeatures();
}
function closeMiniDialog(selector) {
var dialog = $(selector);
if (dialog.length > 0 && dialog[0].open) {
dialog[0].close();
}
}
closeMiniDialog("#agile_dialog_EnableSync");
closeMiniDialog("#agile_dialog_TryPro");
if (bShowPro) {
setTimeout(function () {
var step = {
selector: $("#agile_plus_checkPro").parent().children("label"),
text: 'Enable "Pro"<br />from here',
angle: 0,
distance: 5,
size: 150,
hiliteTime: 5000
};
showBubbleFromStep(step, true, true, 0);
setTimeout(function () {
removeAllGrumbleBubbles();
}, 3000);
},1000);
}
keepSyncPaused(true);
var container = $('<div id="agile_help_container" tabindex="0"></div>');
resizeHelp(container);
container.keydown(function (evt) {
evt.stopPropagation(); //dont let it bubble to document. in some pages like boards, document hooks into keyboard events for card navigation, which breaks scrolling here with down-arrow etc
return true; //do default action for this element
});
helpWin.m_container = container;
helpWin.m_extraElems = [];
function onClosePane() {
if (!helpWin.isSyncEnabled() && !helpWin.bDontShowAgainSyncWarn) {
var msgAlert = "You have not enabled sync! You will not see full reports, Chrome Boards & Cards menu and team Spent & Estimates.\n\nClick Cancel to configure sync, or click OK to use without sync.";
var bHiliteGSButton = false;
if (g_strServiceUrl == "" && (comboSync.val() == SYNCMETHOD.googleSheetLegacy || comboSync.val() == SYNCMETHOD.googleSheetStealth)) {
msgAlert = "You have not set a google spreadsheet sync url.\nClick Cancel to configure it, or click OK to use without sync.";
bHiliteGSButton = true;
}
if (!confirm(msgAlert)) {
var section = $("#agile_help_trellosync");
var top = section.offset().top;
container.animate({
scrollTop: top + container[0].scrollTop
}, 1000, function () {
if (bHiliteGSButton) {
hiliteOnce(spanButtonGS, 3000);
hiliteOnce(spanButtonGSStealth, 3000);
}
});
return;
}
}
Help.close(false);
}
setTimeout(function () {
//NOTE: these two fixed elements must go outside of the scrolling element to avoid an issue (most likely a chrome bug) where the element is not painted unless the window is very wide.
//in that case, while resizing the window, a transparent area starts to cover these fixed elements. After much debugging, I found that when the help pane has no scrollbar, the issue goes away,
//this is likely related to stacking context changes in chrome, in this case there are two scrollbars: one in trello and another in the help pane.
//This was fixed by moving these two elements out of the pane, make them topmost, and track them with m_extraElems
var containerFixed = getDialogParent(true);
var elemClose = helpWin.raw('<img id="agile_help_close" class="agile_close_button agile_almostTopmost1" src="' + chrome.extension.getURL("images/close.png") + '"></img>', containerFixed);
helpWin.m_extraElems.push(elemClose);
elemClose.click(onClosePane);
var elemTop = helpWin.raw('<img class="agile_help_top agile_almostTopmost1" src="' + chrome.extension.getURL("images/helptop.png") + '"></img>', containerFixed);
helpWin.m_extraElems.push(elemTop);
elemTop.click(function () {
helpWin.m_container.animate({ scrollTop: helpWin.m_container.offset().top }, 350);
});
//dim help button after a few seconds. css hover will make it black again
setTimeout(function () {
elemClose.animate({
opacity: 0.33
}, 4000);
elemTop.animate({
opacity: 0.33
}, 4000);
}, 8000);
}, 200);
helpWin.raw('<span style="font-size:1.7em;font-weight:bold;">Plus for Trello Help</span>');
if (!g_bFirstTimeUse) {
helpWin.raw('<span style="float:right;padding-right:6em;">\
<A href="#agile_help_prefs">Preferences</A>  \
<A target="_blank" href="https://chrome.google.com/webstore/detail/plus-for-trello-time-trac/gjjpophepkbhejnglcmkdnncmaanojkf/reviews" title="Love Plus?">Rate us!</A>   \
<a href="http://www.plusfortrello.com/p/change-log.html" target="_blank">Change log</A>  \
<a class="agile_link_noUnderlineNever" href="https://plus.google.com/collection/khxOc" rel="publisher" target="_blank"> \
<img src="https://ssl.gstatic.com/images/icons/gplus-16.png" title="Follow the official news page" style="margin-bottom:-3px;margin-right:1px;border:0;width:16px;height:16px;"/></A>  \
<a class="agile_link_noUnderlineNever" href="https://twitter.com/PlusForTrello" rel="publisher" target="_blank"> \
<img src="https://abs.twimg.com/favicons/favicon.ico" title="Follow us on Twitter" style="margin-bottom:-3px;margin-right:1px;border:0;width:16px;height:16px;"/></A>  \
<a class="agile_link_noUnderlineNever" href="https://www.linkedin.com/in/zigmandel" rel="publisher" target="_blank"> \
<img src="https://www.linkedin.com/favicon.ico" title="Connect at LinkedIn" style="margin-bottom:-3px;margin-right:1px;border:0;width:16px;height:16px;"/></A></span>');
}
helpWin.para("version " + g_manifestVersion + "  <button style='float:right' class='agile_buton'>Close</button>").children("button").click(onClosePane);
helpWin.para('Fixed by <a href="https://github.com/men232" target="_blank">Andrew L.</a>');
helpWin.para(" ");
if (g_bFirstTimeUse) {
var elemFirstTime = helpWin.raw("<div class='agile-help-firstTime'><b>To show this help again click <img src='" + chrome.extension.getURL("images/iconspenthelp.png") + "' style='width:22px;height:22px;' /> next to the tour <img style='padding-left:4px;padding-bottom:5px' src='" + chrome.extension.getURL("images/helparrow.png") + "' /></b></div>");
helpWin.bStartTourBubbleOnClose = true;
}
helpWin.para('<b><h3>Language</h3></b>');
var pComboLang = helpWin.para('<select style="width:auto" class="agile_combo_input"></select>');
var comboLang = pComboLang.children('select');
comboLang.append($(new Option("English", "en")));
comboLang.append($(new Option("Chinese - 中文", "zh-CN")));
comboLang.append($(new Option("Danish - Dansk", "da")));
comboLang.append($(new Option("Dutch - Nederlands", "nl")));
comboLang.append($(new Option("French - Français", "fr")));
comboLang.append($(new Option("Portuguese - Português", "pt")));
comboLang.append($(new Option("Russian - Русский", "ru")));
comboLang.append($(new Option("Spanish - Español", "es")));
comboLang.append($(new Option("Other", "")));
var paraLangOtherDetails = helpWin.raw('<p>Currently only the Plus Tour is translated.<br>\
Plus is compatible with <A target="_blank" href="https://chrome.google.com/webstore/detail/google-translate/aapbdbdomjkkjkaonfhkkikfgjllcleb" >Google Translate Chrome extension</a> and\
<A href="https://support.google.com/chrome/answer/173424" target="_blank">Chrome right-click translation</A>.<br>\
<A href="http://www.plusfortrello.com/p/help-us-translate-plus-to-your-language.html" target="_blank">Help translate or improve the tour</A> for your language!');
helpWin.para(' ');
function onComboLangChange() {
var pair = {};
var valNew = comboLang.val();
if (valNew != "en") {
paraLangOtherDetails.show();
}
else
paraLangOtherDetails.hide();
if (valNew == "")
return; //dont save the fake "other" selection. just there so user sees the help text below when lang is not english
pair[SYNCPROP_language] = valNew;
chrome.storage.sync.set(pair, function () {
if (chrome.runtime.lastError) {
alert(chrome.runtime.lastError.message);
comboLang.val(g_language);
return;
}
g_language = comboLang.val();
});
}
comboLang.val(g_language);
onComboLangChange();
comboLang.change(function () { onComboLangChange();});
var bNeedUpgrade = newerStoreVersion();
if (bNeedUpgrade) {
helpWin.para("<h3>New version available!</h3>");
helpWin.para("There is a new version of Plus for Trello. Click below to install it now.");
var paraUpgrade = helpWin.para("Installing now will close any open Plus chart/reports and refresh all Trello pages.<br><input type='button' value='Install now' />");
helpWin.para("If you dont install now, Chrome will eventually install the upgrade automatically.");
var buttonUpgrade = paraUpgrade.children('input:button:first');
helpWin.para(' ');
helpWin.para(' ');
hiliteOnce(buttonUpgrade, null, null, 3);
buttonUpgrade.click(function () {
buttonUpgrade.val("Installing...");
buttonUpgrade.prop('disabled', true);
sendExtensionMessage({ method: "reloadExtension" }, function (response) {
//do nothing. we catch EXTENSION_RESTARTING and reload all trello windows
});
});
}
if (getIdBoardFromUrl(document.URL) != "0jHOl1As") {
helpWin.para("<div style='display:inline-block;border: 1px solid;border-radius:3px;border-color:var(--ds-border);padding:1em;background-color: var(--ds-background-inverse-subtle);'>Visit the <span style='font-weight:bold;font-size:110%;'><A target='_blank' href=''>Plus Help board</A></span> for the best place to learn about Plus.</div>").find("A").click(function (e) {
window.open("https://trello.com/b/0jHOl1As/plus-for-trello-help", "_blank");
e.preventDefault();
});
helpWin.para(' ');
}
if (helpWin.totalDbMessages > 0) {
helpWin.para('Alert: Error log has entries. <A target="_blank" href="' + chrome.extension.getURL("plusmessages.html") + '">View</A>.').css("color", COLOR_ERROR);
helpWin.para(' ');
helpWin.para(' ');
}
if (!g_bFirstTimeUse) {
helpWin.para("<h3>Enable or disable Plus</h3>");
helpWin.para('In the rare case you have issues with the display of trello pages:');
var paraCheckDisable = helpWin.para('<input style="vertical-align:middle;" type="checkbox" class="agile_checkHelp" value="checkedDisablePlus">Disable changing trello.com pages. </input>\
<a href="">Tell me more</a>');
var checkDisablePlus = paraCheckDisable.children('input:checkbox:first');
paraCheckDisable.children('a').click(function (ev) {
helpTooltip(ev,"If checked, Plus will still sync and reports will continue working.<br>This is an emergency option so you can keep using Trello in the unlikely case of a conflict.");
});
var bAddedRefresh = false;
if (isPlusDisplayDisabled())
checkDisablePlus[0].checked = true;
//.css("color", COLOR_ERROR);
function setEDColor(check) {
if (check.is(':checked'))
paraCheckDisable.addClass("agile_color_warning");
else
paraCheckDisable.removeClass("agile_color_warning");
}
setEDColor(checkDisablePlus);
checkDisablePlus.click(function () {
var bValue = checkDisablePlus.is(':checked');
if (bValue && !confirm("Are you sure you want to disable changing trello.com pages?\n\nPlus will not show S/E, timers, hashtags and other Plus elements inside Trello.")) {
checkDisablePlus[0].checked = false;
return;
}
localStorage.setItem(g_lsKeyDisablePlus, !!bValue); //make this explicit even thout js would convert it
if (!bAddedRefresh) {
bAddedRefresh = true;
paraCheckDisable.append($("<span> Refresh all trello tabs to take effect.</span>"));
}
setEDColor(checkDisablePlus);
});
helpWin.para(' ');
}
var divAnalogy = null;
if (true) {
helpWin.para("<h3>Not using Timers, Spent, Estimates?</h3>");
helpWin.para('If so, check this option to simplify this help and hide features you wont use.');
var checkNoSE = helpWin.para('<input style="vertical-align:bottom;" type="checkbox" class="agile_checkHelp">\
Do not use Timers, Spent, Estimates or Points.</input>').children('input:checkbox:first');
var checkNoEst = helpWin.para('<input style="vertical-align:bottom;" type="checkbox" class="agile_checkHelp">\
Do not use Estimates (just Spent/Points).</input>').children('input:checkbox:first');
checkNoSE[0].checked = g_bNoSE;
checkNoEst[0].checked = g_bNoEst;
checkNoEst.prop('disabled', g_bNoSE);
checkNoSE.click(function () {
var bValue = checkNoSE.is(':checked');
var pair = {};
pair[SYNCPROP_NO_SE] = bValue;
chrome.storage.sync.set(pair, function () {
if (chrome.runtime.lastError !== undefined) {
alert(chrome.runtime.lastError.message);
checkNoSE[0].checked = g_bNoSE; //reset
return;
} else {
setNoSe(bValue);
checkNoEst.prop('disabled', bValue);
if (divAnalogy && bValue)
divAnalogy.hide();
if (bValue) {
if (g_bDisableSync && g_strServiceUrl == "" && comboSync.val() == SYNCMETHOD.disabled) {
//set the default sync method, as no other applies when not using S/E
comboSync.val(SYNCMETHOD.trelloComments);
onComboSyncChange();
}
}
}
});
});
checkNoEst.click(function () {
var bValue = checkNoEst.is(':checked');
var pair = {};
pair[SYNCPROP_NO_EST] = bValue;
chrome.storage.sync.set(pair, function () {
if (chrome.runtime.lastError !== undefined) {
alert(chrome.runtime.lastError.message);
checkNoEst[0].checked = g_bNoEst; //reset
return;
} else {
setNoEst(bValue);
}
});
});
helpWin.para(' ');
}
if (bNotSetUp) {
if (!g_bFirstTimeUse) {
helpWin.para('<div class="agile_box_input_hilite_red" style="display:inline-block;border: 1px solid;border-radius:3px;border-color:RGB(77,77,77);padding:1em;">\
Enable "➤ sync" below to see Reports, full Chrome Plus menu, team S/E and use from mobile\
</div><br><br>');
}
} else {
if (!bSEByComments && helpWin.totalDbRowsHistoryNotSync > 0) {
var strPre = "" + helpWin.totalDbRowsHistoryNotSync + ' S/E rows pending spreadsheet sync verification. ';
if (helpWin.totalDbRowsHistoryNotSync > 9) { //simple sync test. could happen also if user entered a lot of S/E rows within 5 minutes.
helpWin.para('If still not finished in 10 minutes, make sure spreadsheet sharing is setup correctly with Write access to you.').css("color", COLOR_ERROR);
} else {
helpWin.para(strPre + 'Plus will do so in the next 10 minutes.');
}
helpWin.para(' ');
}
}
var strUsingPlusDays = "";
var cDaysUsingPlus = 0;
if (g_msStartPlusUsage !== null) {
var dms = (Date.now() - g_msStartPlusUsage);
cDaysUsingPlus = Math.floor(dms / 1000 / 60 / 60 / 24);
if (cDaysUsingPlus > 2)
strUsingPlusDays = '' + cDaysUsingPlus + ' days with Plus. ';
}
if (g_bFirstTimeUse) {
helpWin.para('If you skip help, make sure to configure <b>Sync</b> and <b>Preferences</b> before using Plus.');
helpWin.para(' ');
}
function addProSection() {
helpWin.para('<h2 id="agile_pro_section">Plus Pro version</h2>');
var paraPro = helpWin.para('<input style="vertical-align:middle;margin-bottom:0px;" type="checkbox" class="agile_checkHelp" value="checkedProVersion" id="agile_plus_checkPro" /><label style="display:inline-block;color:var(--ds-text-brand) !important;" for="agile_plus_checkPro">Enable "Pro" features</label>');
var checkEnablePro = paraPro.children('input:checkbox:first');
var textEnablePro = '<div id="sectionWhyPro">If you love Plus, enable Pro!';
if (bNotSetUp)
textEnablePro += ' <a href="" id="agile_pro_more">Tell me more</a>';
textEnablePro += '<br><div id="agile_pro_more_content" style="display:none;">\
• Trello card members in reports.<br>\
• Trello custom fields in reports.<br>\
• Card labels in reports and charts (view, group, filter, stack).<br>\
• Custom report columns, extra export options useful for integrations.<br>\
• Custom board views. Pick which S, E, R boxes show in boards, lists and cards (see Preferences).<br>\
<A href="http://www.plusfortrello.com/p/plus-for-trello-pro-version.html" target="_blank">More</A>';
textEnablePro += '<br /></div></div><div id="sectionPayProNow" style="display:none;">➤ <A id="linkPayProNow" href="">Activate your "Pro" license now</A></div>\
<a href="" id="agile_showLiDetails">Show license details</a></div>\
<div id="agile_showLiDetails_contents" style="display:none;"><div id="sectionLiDetailsCS" style="display:none;">\
<p><span class="agile_cs_licData"></span> <a href="" style="margin-left:1em;" id="agile_more_pmt_options" >More payment options</a></p>\
<div id="agile_more_pmt_options_content" style="display:none;">\
<div>Use stripe.com for payment and group licenses. You can keep the Chrome store subscription or\
</div>\
<span>later cancel it if you include yourself in the group license.<\span> <button id="agile_more_pmt_options_stripe">Add stripe license</button>\
</div>\
</div>\
<div id="sectionLiDetailsStripe" style="display:none;">\
<p><span class="agile_stripe_licData"></span><button style="margin-left:1em;margin-top:0px;" id="editStripeLicense" >Edit license</button></p>\
<p>Apply this license to other computers with this URL<span class="agile_stripe_liUrlOwnerNote"> (its also in your license email)</span>:</p>\
<input readonly class="agile_stripe_liUrl" size="80" title="copy and email this URL to the team" spellcheck="false" />\
</div></div>';
var paraProEnable = helpWin.para(textEnablePro);
var sectionWhyPro = paraProEnable.find("#sectionWhyPro");
var sectionPayProNow = paraProEnable.find("#sectionPayProNow");
var sectionLiDetailsCS = paraProEnable.find("#sectionLiDetailsCS");
var sectionLiDetailsStripe = paraProEnable.find("#sectionLiDetailsStripe");
var elemLinkPay = sectionPayProNow.find("#linkPayProNow");
checkEnablePro[0].checked = g_bProVersion;
if (!bNotSetUp)
paraProEnable.find("#agile_pro_more_content").show();
paraProEnable.find("#agile_pro_more").click(function () {
paraProEnable.find("#agile_pro_more").hide();
paraProEnable.find("#agile_pro_more_content").show();
});
function handlePayClick() {
checkLi(true, true, function () {
helpWin.refreshProSections();
});
}
sectionLiDetailsCS.find("#agile_more_pmt_options_stripe").click(function (ev) {
handlePayClick();
});
var btnshowLiDetails = paraProEnable.find("#agile_showLiDetails");
btnshowLiDetails.click(function (ev) {
btnshowLiDetails.hide();
paraProEnable.find("#agile_showLiDetails_contents").show();
});
var btnMorePmtOptions = sectionLiDetailsCS.find("#agile_more_pmt_options");
if (helpWin.hasLiStripe)
btnMorePmtOptions.hide();
btnMorePmtOptions.click(function (ev) {
btnMorePmtOptions.hide();
sectionLiDetailsCS.find("#agile_more_pmt_options_content").show();
return false;
});
var btnEditLicense = sectionLiDetailsStripe.find("#editStripeLicense");
btnEditLicense.click(function (ev) {
if (!helpWin.liDataStripe)
return;
handleStripePay(function () {
helpWin.refreshProSections();
});
});
var showProSections = function (bProEnabled, bHilitePay) {
var bShowPay = bProEnabled;
var bShowWhyPro = !bProEnabled;
var bShowLicDetailsCS = bProEnabled && helpWin.hasLiCS;
var bShowLicDetailsStripe = bProEnabled && helpWin.hasLiStripe;
//if (helpWin.hasLi())
bShowPay = false;
if (bShowLicDetailsCS)
sectionLiDetailsCS.find(".agile_cs_licData").html("<b>Chrome store License</b> start date: " + makeDateCustomString(new Date(helpWin.liDataCS.msCreated)) + " <A target='_blank' href='https://payments.google.com/#subscriptionsAndServices'>View</A>");
if (bShowLicDetailsStripe) {
sectionLiDetailsStripe.find(".agile_stripe_licData").html("<b>stripe.com License</b> start date: " + makeDateCustomString(new Date(helpWin.liDataStripe.msCreated)) + " for " + (helpWin.liDataStripe.quantity || "0") + " Trello users.");
sectionLiDetailsStripe.find(".agile_stripe_liUrl").val("https://trello.com/" + URLPART_PLUSLICENSE + "/" + helpWin.liDataStripe.userTrello + "/" + helpWin.liDataStripe.li);
if (getCurrentTrelloUser() != helpWin.liDataStripe.userTrello) {
btnEditLicense.hide();
sectionLiDetailsStripe.find("#agile_stripe_liUrlOwnerNote").hide();
} else {
btnEditLicense.show();
sectionLiDetailsStripe.find("#agile_stripe_liUrlOwnerNote").show();
}
}
elemShowHide(btnshowLiDetails, (bShowLicDetailsCS || bShowLicDetailsStripe) && !$("#agile_showLiDetails_contents").is(":visible"));
elemShowHide(sectionPayProNow, bShowPay);
elemShowHide(sectionLiDetailsCS, bShowLicDetailsCS);
elemShowHide(sectionLiDetailsStripe, bShowLicDetailsStripe);
elemShowHide(sectionWhyPro, bShowWhyPro);
if (bShowPay && bHilitePay)
hiliteOnce(elemLinkPay, 5000);
};
helpWin.refreshProSections = function () {
helpWin.populateSyncProps(function () {
if (helpWin.hasLi()) {
btnshowLiDetails.hide();
paraProEnable.find("#agile_showLiDetails_contents").show();
} else {
btnshowLiDetails.show();
paraProEnable.find("#agile_showLiDetails_contents").hide();
}
showProSections(g_bProVersion);
});
};
showProSections(g_bProVersion);
elemLinkPay.click(function () {
handlePayClick();
});
checkEnablePro.click(function () {
var bValue = checkEnablePro.is(':checked');
if (!bValue) {
var msgTurnOffPro = 'Are you sure you want to turn off "Pro"?';
if (helpWin.hasLi()) {
if (helpWin.hasLiStripe)
msgTurnOffPro += "\nYou have a Plus 'Pro' license. To also cancel that license click 'Cancel' here, then click 'Show license details', edit the license and set it to '0' total licenses."
else
msgTurnOffPro += "\nYou have a Plus 'Pro' license. To also cancel that license click 'Cancel' here, then click 'Show license details' and 'view' go to the Google license page."
}
if (!confirm(msgTurnOffPro)) {
checkEnablePro[0].checked = true;
return;
}
saveCheck();
hitAnalytics("ProCheckbox", "disabled");
showProSections(false);
}
else {
checkEnablePro[0].checked = false; //temporarily while we authorize
handleProAproval(function (status) {
if (status != STATUS_OK) {
bValue = false;
if (status != STATUS_CANCEL)
sendDesktopNotification(status, 10000);
}
saveCheck();
if (bValue) {
hitAnalytics("ProCheckbox", "enabled");
showProSections(bValue, true);
setTimeout(function () {
return;
if (!helpWin.hasLi())
$("#linkPayProNow").click();
}, 200);
} else {
showProSections(bValue);
}
});
}
function saveCheck() {
setProVersionOption(bValue, function () {
checkEnablePro[0].checked = g_bProVersion;
setTimeout(updateBoardUI, 100);
});
}
});
helpWin.para(' ');
}
addProSection();
helpWin.para("<h2 style='display:inline-block;'>Contents</h2><span style='color: #8c8c8c;margin-left:1em;'>click a section</span><ul id='tocAgileHelp'></ul>");
helpWin.para('<hr class="agile_hr_help"><br>');
var bSpentBackendCase = isBackendMode();
helpWin.para('<b><h2 id="agile_help_basichelp">Basics</h2></b>');
helpWin.para('<A target="_blank" href="">Our Plus help board</A> is the best place to learn about Plus.').children("A").click(function (e) {
window.open("https://trello.com/b/0jHOl1As/plus-for-trello-help", "_blank");
e.preventDefault();
});
helpWin.para('Plus has features for all Trello users, even if not using Spent & Estimates');
if (helpWin.bStartTourBubbleOnClose)
helpWin.para('Once you close this help Plus will offer a product tour to show you Plus features inside Trello.');
if (bAddFirstSyncNote)
helpWin.para('Now you only need to decide if Plus stores data inside or outside Trello, called the "sync" mode (later below).');
helpWin.para('<br>');
helpWin.para("<b>Plus header</b>");
helpWin.para('<img src="' + chrome.extension.getURL("images/s3.png") + '"/>');
helpWin.para("The <A target='_blank' href='http://en.wikipedia.org/wiki/ISO_week_date'>ISO week</A> as in 2014-W49 is 2014's week 49. Weeks start on Sunday unless you change it in <b>Preferences</b>.");
helpWin.paraSE('Click the week to change the view on trello.com charts and reports. <A href="https://plus.google.com/photos/+PlusfortrelloNews/albums/6004371895359551937/6004371896981799010" target="_blank"><br>Click chart titles</A> in trello.com to zoom charts to full window.');
helpWin.para(' ');
helpWin.para('<b>Plus Board toolbar</b>');
helpWin.para('<img src="' + chrome.extension.getURL("images/s2.png") + '"/>');
helpWin.para('The full toolbar shows when the board has Spent & Estimates. Otherwise shows only the Report icon.');
helpWin.para('Use the Report icon to make reports and charts for the board.')
.addClass(CLASS_onlyNonPlusSE);
helpWin.paraEst('Boxes display <b>S</b>pent / <b>E</b>stimate / <b>R</b>emaining totals of all visible cards. Mouse-over them to see <b>% complete</b>.');
helpWin.para(' ');
helpWin.paraSE('<b>Plus card "S/E bar"</b>');
helpWin.paraSE('<img src="' + chrome.extension.getURL("images/cardplusbar.png") + '"/>');
helpWin.paraSE('Open any card and click "Add S/E" or the little Plus icon inside the card comment.');
helpWin.paraSE('<img src="' + chrome.extension.getURL("images/showsebar.png") + '"/>');
helpWin.paraSE(' ');
helpWin.paraEst('<b>E</b>stimate the units needed (per card or per user).');
helpWin.paraEst('<b>S</b>pend units from the estimate.');
helpWin.paraEst('<b>R</b>emain units: How many more units until all Estimate is Spent (Remain = Estimate minus Spent)');
helpWin.paraSE('Units (days, hours or minutes) can be configured in Preferences below. Do so before entering any S/E.');
helpWin.paraSE(' ');
helpWin.paraSE('<hr class="agile_hr_help"><br>');
helpWin.paraSE('<b><h2 id="agile_help_sesystem">The Plus Spent / Estimate system</h2></b>');
helpWin.paraSE('Plus tracks estimate, spent and changes by storing "S/E rows" per card and user, then summing the rows.');
helpWin.paraSE('For a given card, its S/E total "sum" is the sum of all its S/E rows.');
helpWin.paraEst('Estimates are optional, and normally entered before or at the same time as entering spent.');
helpWin.paraSE('★ The best way to learn the system is to <b><A href="http://www.plusfortrello.com/p/how-plus-tracks-spent-and-estimate-in.html" target="_blank">read a typical case of using Plus (web page)</A>.');
helpWin.paraSE('It is similar to summing rows on a spreadsheet, with columns for Estimate and Spent.<br><br>');
var linkShowAnalogy = helpWin.paraSE('★ <A href="">Click here</A> for an analogy with time tracking on a spreadsheet.<br><br>').find("A").eq(0);
linkShowAnalogy.click(function () {
var elem = $(".helpSectionAnalogy");
elemShowHide(elem, !elem.is(":visible"),200);
});
divAnalogy = $('<div class="helpSectionAnalogy"></div>').hide();
helpWin.m_container.append(divAnalogy);
helpWin.para('Imagine you are entering Spent time as rows in a spreadsheet, adding rows from top to bottom:', divAnalogy);
helpWin.para('Using the Plus "Card S/E bar" is inserting new rows to the table below above the running total:', divAnalogy);
helpWin.para('<img src="' + chrome.extension.getURL("images/help-spent-table.png") + '"/>', divAnalogy);
helpWin.para(' ', divAnalogy);
helpWin.para('Plus does the same, except the "rows" are entered inside Trello cards as special card comments (or as Google spreadsheet rows, when using stealth sync mode).', divAnalogy);
helpWin.para('In the sample above, the current Spent is 13, the sum of all spend history.', divAnalogy);
helpWin.paraEst('Plus uses the same concept for estimates: Enter a "first estimate" on the first row, then increase or decrease it in later rows if needed:', divAnalogy);
helpWin.paraEst('<img src="' + chrome.extension.getURL("images/help-spent-est-table.png") + '"/>', divAnalogy);
helpWin.paraEst('This gives more information that just the previous "spent history" table because it shows a first estimate of 11, later increased by 2 hours.', divAnalogy);
helpWin.paraEst('Plus reports and charts show these estimate changes per user, board, label, hashtag and much more. Knowing the actual estimate gives you burn-downs and projected end dates as Plus knows how much work Remains and how it changed over time.', divAnalogy);
helpWin.paraEst('Plus automatically fills the "Estimate" column as you type "Spent" or stop timers, calculating any Estimate increases needed (which you can overwrite.)', divAnalogy);
helpWin.paraEst('Plus also has an extra "User" column for each S/E row as Plus keeps Spent/Estimates per user.', divAnalogy);
helpWin.para('Use the Plus "Card S/E bar" to add more rows, or directly modify the running totals using "Modify" (which adds a row for you with the needed differences, positive or negative) or transfer Estimates.', divAnalogy);
helpWin.para(' ', divAnalogy);
helpWin.paraEst('Plus can also assign a "global" card estimate and transfer estimates.');
helpWin.paraSE('This is the "Plus S/E bar" inside a card front, along with a card report and commands like "modify" above it.');
helpWin.paraSE('<img id="seHelpAfterSpreadsheet" src="' + chrome.extension.getURL("images/cardplusreport.png") + '"/>');
helpWin.paraSE('Open a card to enter new <b>S</b>pent<span class="onlyPlusEst"> or <b>E</b>stimate</span> history rows.');
helpWin.paraSE('The table above the "card S/E bar" shows totals per user.');
helpWin.paraEst('Normally you first enter an estimate as in 0/2 (S:blank, E:2) and later spend it with 2/0 (S:2, E:blank)');
helpWin.paraEst('If you didn\'t estimate it previously, enter 2/2 which estimates and spends it on the same entry.');
helpWin.paraEst('Plus automatically pre-fills E when you type <b>S</b> that causes Remain to be negative (S sum bigger than E sum).');
helpWin.paraEst('Plus considers your card finished when your <b>S sum</b> equals <b>E sum</b> thus R (Remain) is zero.');
helpWin.paraEst('You dont have to spend all the estimate right away. Maybe you enter 0/5, then 3/0 then 2/0. The sum is 5/5.');
helpWin.paraEst('Your first S/E row per card is the 1ˢᵗ estimate (E 1ˢᵗ) to compare with the current estimate <b>E sum</b>.');
helpWin.paraSE('When you enter S/E for another user (not "me") Plus generates a special note in that S/E row: "[by user]."');
helpWin.paraSE('All special notes that Plus generates with [brackets] are secure and cannot be faked or removed by other users making Plus actions fully traceable.');
helpWin.paraEst('To use a different system you might want to "allow negative <b>R</b>emaining" in Preferences.');
helpWin.para(' ');
helpWin.para('<hr class="agile_hr_help"><br>');
helpWin.paraSE('<b><h2 id="agile_help_reportingSE">Entering Spent / Estimate</h2></b>');
helpWin.paraSE('Enter Spent with card timers, manually with the Plus card bar, our mobile app or power-up.');
helpWin.paraSE('To track time spent in lists automatically, see <A href="http://www.plusfortrello.com/p/automated-time-tracking-with-butler-plus.html" target="_blank">using Plus & Butler</A>.');
helpWin.paraSE(' ');
helpWin.paraSE('As you or others enter Estimates, Spent, Transfers or Modify, Plus makes special card comments (unless using "Stealth" sync mode).');
helpWin.paraEst('Here is an example of entering S/E, starting from the bottom (oldest) card comment:');
helpWin.paraEst('<img src="' + chrome.extension.getURL("images/s1.png") + '"/>');
helpWin.paraSE(' ');
helpWin.paraSE('You do not need to see those card comments to figure out totals or history. Plus has special reports and charts for that purpose.');
helpWin.paraSE('• <b>Do not delete or edit a card S/E comment.</b> Instead use "<u>modify</u>" in the card front report.');
helpWin.paraEst('• You can also add a "global" estimate or S/E for other users.');
helpWin.paraSE('• Use "modify" if you prefer to work with total S/E ("sum") instead of adding or substracting with the "card S/E bar".');
helpWin.paraSE(' "modify" will do the math for you and enter the needed S/E row.');
helpWin.paraSE(' Example: if you entered a Spent of 3 and modify it to zero, "modify" will enter a new row of "-3/0".');
helpWin.paraSE("• Enter S/E back in time by clicking on 'now' and pick how many days ago it happened.");
helpWin.paraSE('• Keyboard: Use TAB or SHIFT+TAB to move between fields. Enter with the "Enter" key or button.');
helpWin.paraSE('<b>More:</b> <A target="_blank" href="http://www.plusfortrello.com/p/s-e-entry-methods.html">Which S/E entry method should you use?</A>');
helpWin.paraSE(' ');
helpWin.paraSE('<hr class="agile_hr_help"><br>');
helpWin.para('<b><h2 id="agile_help_trellosync">➤ Sync (by Card comment keywords or Stealth)</h2></b>');
helpWin.para('<b>Pick your team\'s sync method. It defines whether Plus stores information inside or outside Trello.</b>');
helpWin.para('Enable sync even if you wont use Spent or Estimates. Our <A target="_blank" href="">Plus help board</A> has more information.').children("A").click(function (e) {
window.open("https://trello.com/b/0jHOl1As/plus-for-trello-help", "_blank");
e.preventDefault();
});
comboSync = helpWin.para('<select id="agile_idComboSync" style="width:auto;height:2em;" class="agile_combo_input">').children('select');
comboSync.append($(new Option("Sync off", SYNCMETHOD.disabled)).addClass("agile_box_input_hilite_red"));
comboSync.append($(new Option("Recommended - Store inside Trello (S/E in Trello card comments)", SYNCMETHOD.trelloComments)).addClass("agile_normalBackground"));
comboSync.append($(new Option("Stealth - Store outside Trello (S/E in Google spreadsheet)", SYNCMETHOD.googleSheetStealth)).addClass("agile_normalBackground"));
comboSync.append($(new Option("Legacy - Store outside Trello (S/E in Google spreadsheet)", SYNCMETHOD.googleSheetLegacy)).addClass("agile_normalBackground"));
var syncSectionsMap = {};
for (var sMethod in SYNCMETHOD) {
var div = $('<div class="helpSectionAnim"></div>').hide();
helpWin.m_container.append(div);
syncSectionsMap[SYNCMETHOD[sMethod]] = div;
}
var bAddFirstSyncNote = !g_bEnableTrelloSync;
var bDisplayedLegacyNote = false;
if (helpWin.hasLegacyRows) {
helpWin.para('<A target="_blank" href="http://www.plusfortrello.com/2014/11/plus-for-trello-upgrade-from-legacy.html">Legacy "Google spreadsheet sync" users read here</A>.');
bDisplayedLegacyNote = true;
}
var paraFirstSync = helpWin.para("<b>Your first sync will start after you close help</b>.\nKeep using Trello normally or close it, it will not affect sync.");
helpWin.para('If you switch sync methods or change keywords, "Reset Sync" from <A href="#agile_help_utilities">Utilities</A>.');
helpWin.para('<A target="_blank" href="http://www.plusfortrello.com/p/sync-features.html">More</A>');
var divCur = syncSectionsMap[SYNCMETHOD.disabled];
helpWin.para("Do not leave 'off' unless you are having a sync issue (very rare). Once enabled you get:", divCur);
helpWin.para("• Chrome Plus menu (top-right in Chrome)", divCur);
helpWin.para("• Plus reports (full columns), charts, burn-downs.", divCur);
helpWin.para("• View team Spent/Estimate/Points, not just yours.", divCur);
helpWin.para("• Use from other devices, mobile or power-up.", divCur);
divCur = syncSectionsMap[SYNCMETHOD.trelloComments];
helpWin.para('• This is the recommended sync method, even if you do not use S/E.', divCur);
helpWin.para('• Users must be <b>direct board members</b> to view a board reports, charts or S/E.', divCur);
helpWin.paraSE('• Enter S/E using the card plus bar, mobile app, power-up or as a manual card comment.', divCur);
helpWin.para('• This is the only method compatible with Butler for Trello to automatically <A target="_blank" href="http://www.plusfortrello.com/p/automated-time-tracking-with-butler-plus.html">track time spent in lists</A>.', divCur);
if (g_strServiceUrl)
helpWin.para('Plus will no longer use the Google spreadsheet or rename card titles. You can also remove existing S/E inside card titles from Utilities.', divCur);
var txtSEByCardComments = '<br>Use the default single keyword "plus!" to store and read S/E from card comments. Customize it here:<br><input style="display:inline;text-transform: lowercase;" type="text" spellcheck="false" maxlength="150" /> <input type="button" value="Save keywords" /> Separate <A target="_blank" href="http://www.plusfortrello.com/p/faq.html#use_keywords">multiple keywords</A> with comma.';
txtSEByCardComments = txtSEByCardComments + "<br>Your team should use the same keyword unless you want to further categorize or separate multiple subteams.";
txtSEByCardComments = txtSEByCardComments + "<br>Home charts and the weekly report in the header can be filtered by keywords, see Preferences.";
txtSEByCardComments = txtSEByCardComments + "<br>See <A href='http://www.plusfortrello.com/p/spent-estimate-card-comment-format.html' target='_blank'>card comment format help</A> for advanced features and keyword configuration ideas.";
txtSEByCardComments = txtSEByCardComments + "<br><br>If your team entered S/E in Plus before 2015, also add 'plus s/e' as your last keyword. <A target='_blank' href='http://www.plusfortrello.com/2014/11/plus-for-trello-upgrade-from-legacy.html'>More</A>";
var buttonshowNonMemberBoardsDialog = null;
var txtSEByCardCommentsLast = "";
if (!bAddFirstSyncNote)
txtSEByCardCommentsLast = '<br>Find all boards in which you are not a member (Plus only syncs on boards with your direct membership):<br><input type="button" value="Find boards" />';
var paraEnterSEByCardComments = helpWin.paraSE(txtSEByCardComments, divCur);
var inputKeywords = paraEnterSEByCardComments.children('input:text:first');
var buttonSaveKeywords = paraEnterSEByCardComments.children('input:button:first');
if (!bAddFirstSyncNote) {
var paraEnterSEByCardCommentsLast = helpWin.para(txtSEByCardCommentsLast, divCur);
buttonshowNonMemberBoardsDialog = paraEnterSEByCardCommentsLast.children('input:button:first');
}
helpWin.para(" ", divCur);
divCur = syncSectionsMap[SYNCMETHOD.googleSheetStealth];
helpWin.para('Use this option when you must completely hide S/E from others that have access to your boards (like clients).', divCur);
helpWin.para('Stores S/E only in a private Google spreadsheet. S/E is not recorded anywhere inside Trello.', divCur);
helpWin.para('The other sync modes make a card comment each time you enter S/E.', divCur);
helpWin.para('Only those that use the same sync spreadsheet will see the team S/E, regardless of Trello board permissions.', divCur);
helpWin.para(" ", divCur);
helpWin.para('If you only want to prevent your S/E from appearing other user\'s reports and do not mind S/E appearing in card comments, you should instead use the 1ˢᵗ sync option and use a different "keyword".', divCur);
helpWin.para(" ", divCur);
helpWin.para('How is this mode different from "Trello card comments" sync:', divCur);
helpWin.para('• Requires you to be <A target="_blank" href="https://support.google.com/chrome/answer/185277">signed-into Chrome</A>', divCur);
helpWin.para('• Enter S/E using the "card S/E bar", not as card comments nor from mobile, power-up or other browsers.', divCur);
helpWin.para('• No <A href="http://www.plusfortrello.com/p/faq.html#use_keywords" target="_blank">multiple keywords</A> feature.', divCur);
helpWin.para('• No board-based permissions. Share the private spreadsheet using Google permissions.', divCur);
helpWin.para('• No mobile app or power-up support yet.', divCur);
helpWin.para(" ", divCur);
helpWin.para('Plus will ask you for permission to access your Google spreadsheets once configured below.', divCur);
spanButtonGSStealth = setupPlusConfigLink(divCur, true);
helpWin.para(" ", divCur);
function showCurrentSpreadsheetLink() {
if (g_strServiceUrl == "")
helpWin.para('Spreadsheet not yet configured.', divCur);
else {
helpWin.para('Current sync spreadsheet url:', divCur);
setSmallFont(helpWin.para(g_strServiceUrl, divCur), 0.85);
}
}
showCurrentSpreadsheetLink();